Upload
betty-fleming
View
222
Download
0
Tags:
Embed Size (px)
Citation preview
Presentation 12Cross Language Clone Analysis
Team 2March 3, 2011
• Parsing/CodeDOM• Clone Analysis• GUI Implementation• Documentation• Testing• Current Status• Path Forward
Agenda
2
Allen Tucker Patricia Bradford Greg Rodgers Ashley Chafin
Our Team
3
Parsing & CodeDOMParsing and conversion to CodeDOM
4
CodeDOM Status
Accomplishments
Language Element CodeDOM Java C# C++Source File CodeCompilationUnit Yes YesImports/Using CodeNamespaceImport Yes YesFormal Parameters CodeParameterDeclarationExpression Yes YesMethod Declaration CodeMemberMethod Yes YesInterface Declaration CodeTypeDeclaration Yes YesField Declaration CodeMemberField Yes YesEnumeration Declaration CodeTypeDeclaration Yes YesClass Declaration CodeTypeDeclaration Yes YesStruct Declaration CodeTypeDeclaration Yes YesConstructor Declaration CodeConstructor Yes Yes
Java and C# conversion into CodeDOM to support cross language detections are now equal (see green cells left)
Source code and statement line number associations now in place
5
Clone AnalysisThe Algorithm
6
Breadth First
7
CodeNamespace
CodeTypeDeclaration
CodeMemberMethod◦ CodeParameterDeclarationExpression
Deep Dive
8
Tokenize Analyze
Expressions 9/26 0/26
Statements 9/15 0/26
Other 7/24 0/24
Others Include:CodeMemberFieldCodeMemberMethodCodeMemberPropertyCodeNamespaceCodeTypeDeclarationCodeTypeMemberCodeTypeParameter
Others Include:CodeCatchClauseCodeMemberEventCodeCommentCodeDirectiveCodeEntryPointMethodCodeTypeDelegate
Analysis Changes
9
Namespace
Compile Unit
Namespace
Type Declaration
Member Method
Statement
Expression Expression
Type Declaration
Member Method
Statement
Expression Expression
Tokenize()
Compare() Compare()
$T$P(){$T$P}
$T$P(){$T$P}
$T$P(){$T$P}
$T$P(){$T$P}
$T$P(){$T$P}
$T$P(){$T$P}$T$P(){$T$P}
$T$P(){$T$P}
$T$P(){$T$P}
$T$P(){$T$P}
$T$P(){$T$P}
$T$P(){$T$P} $T$P(){$T$P}
Compare()
Compare()
Compare()
10
Next Iteration At least 75% Complete with Deep Dive
Tokenization Analysis
Add properties settings to the CloneDetection Interface
Setting lower bound on token length Setting bounds on confidence levels
GUI ImplementationSketches / Demo
11
Source File Properties
12
Namespace Properties
13
File Type Properties
14
File Group Properties
15
Density Graph
16
Clone View
17
DocumentationDocumentation Status
18
Documentation History
19
TestingWhite Box and Black Box Testing
20
White Box Testing: ◦ Unit Testing
Black Box Testing:◦ Production Rule Testing◦ Stress Testing◦ Functional Testing
Testing Our Project
21
Console Project…bypasses GUI◦ Parses source and builds CodeDOM◦ No analysis
◦ Targets JDK1.6 Microsoft Visual Studio 9.0
Stress Testing
22
Stress Testing (Good)
23
Stress Testing (Not So Good)
24
Current Test Count: 33
Added test code to cover◦ Clone analysis◦ Some stress
Project Unit Test Results
Project Metrics (Release 0.01)
Project Metrics (Release 0.02)
Project Metrics History
28
Bug Tracking History
30
Current StatusWhere we currently stand
31
32
Below is the status of the tasks for this past iteration:◦ Parsing/CodeDOM
C++ parsing – 15% C# and Java are both equal for CodeDOM
◦ Clone Analysis Tokenization & analysis – 75%
◦ GUI Project management – 100% Displaying source code – 100% Sketches for visual design – 100%
Where we stand….
33
◦ Documentation – 96% User Stories, Use Cases, UML Models, Sketches Functional Tests Update schedule
◦ Testing Unit tests – 90% Execute functional tests – 100%
Where we stand….
As of March 3, 2011 SLOC:
◦ CS666_Client = 5190 lines◦ CS666_Core = 2988 lines◦ CS666_Console = 287 lines◦ CS666_CppParser = 484 lines◦ CS666_CsParser = 3459 lines◦ CS666_JavaParser = 3502 lines◦ CS666_LanguageSupport = 84 lines◦ CS666_UnitTests = 944 lines
Total = 16938 lines (including unit tests)
SLOC For Our Project
34
- Used lcounter.exe to count SLOC
SLOC History
35
- Used lcounter.exe to count SLOC
SLOC History
36
- Used lcounter.exe to count SLOC
Path ForwardPath Forward for the next iteration
37
38
Schedule
39
Below is a list of the tasks for our next iteration:◦ Parsing/CodeDOM
C++ parsing Java, C#, C++ conversion to CodeDOM
◦ Clone Analysis Add property settings to clone analysis
◦ GUI Project management Clone analysis Sketches for visual design
Next Iteration
40
◦ Documentation User Stories, Use Cases, UML Models, Sketches Functional Tests Update schedule
◦ Testing Unit tests Execute functional tests Record bugs/issues found
Next Iteration