File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/cvslib/CvsVersion.java | |||
Method name: void testRootFilesInIndex()
|
Method name: void execute()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (line.equals("foo")) {↵ | 1 | if (currentToken.equals("Client:")) {↵ | |
2 | foundFoo = true;↵ | 2 | client = true;↵ | |
3 | } else if (line.equals("sub")) {↵ | 3 | } else if (currentToken.equals("Server:")) {↵ | |
4 | foundSub = true;↵ | 4 | server = true;↵ | |
5 | } else if (line.equals("sub/foo")) {↵ | 5 | } else if (currentToken.equals("(CVS)")) {↵ | |
6 | foundSubFoo = true;↵ | 6 | cvs = true;↵ | |
7 | } | 7 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 28 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13 | if (line.equals("foo")) |
| 14 | if (currentToken.equals("Client:")) | |||||||||||||
14 | foundFoo = true; |
| 15 | client = true; | |||||||||||||
15 | else if (line.equals("sub")) |
| 16 | else if (currentToken.equals("Server:")) | |||||||||||||
16 | foundSub = true; |
| 17 | server = true; | |||||||||||||
17 | else if (line.equals("sub/foo")) |
| 18 | else if (currentToken.equals("(CVS)")) | |||||||||||||
18 | foundSubFoo = true; |
| 19 | cvs = true; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables foundSub, foundSubFoo, foundFoo , while Clone fragment #2 returns variables client, cvs, server |