Cross Language Clone Analysis Team 2 March 3, 2011
Parsing/CodeDOM Clone Analysis GUI Implementation Documentation Testing Current Status Path Forward 2
Allen Tucker Patricia Bradford Greg Rodgers Ashley Chafin 3
Parsing and conversion to CodeDOM 4
Accomplishments 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
The Algorithm 6
7 CodeNamespace CodeTypeDeclaration CodeMemberMethod ◦ CodeParameterDeclarationExpression
8 TokenizeAnalyze Expressions9/260/26 Statements9/150/26 Other7/240/24 Others Include: CodeMemberField CodeMemberMethod CodeMemberProperty CodeNamespace CodeTypeDeclaration CodeTypeMember CodeTypeParameter Others Include: CodeCatchClause CodeMemberEvent CodeComment CodeDirective CodeEntryPointMethod CodeTypeDelegate
9 Namespace Compile Unit Namespace Type Declaration Member Method Statement Expression Type Declaration Member Method Statement Expression Tokenize() Compare() $T$P(){$T$P} 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
Sketches / Demo 11
12
13
14
15
16
17
Documentation Status 18
19
White Box and Black Box Testing 20
White Box Testing: ◦ Unit Testing Black Box Testing: ◦ Production Rule Testing ◦ Stress Testing ◦ Functional Testing 21
Console Project…bypasses GUI ◦ Parses source and builds CodeDOM ◦ No analysis ◦ Targets JDK1.6 Microsoft Visual Studio
23
24
Current Test Count: 33 Added test code to cover ◦ Clone analysis ◦ Some stress
28
We are using our to track our bugs. 29
30
Where 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%
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 = lines (including unit tests) 34 - Used lcounter.exe to count SLOC
35 - Used lcounter.exe to count SLOC
36 - Used lcounter.exe to count SLOC
Path 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