String filename = line.substring(0, index);
String rev = null;
int indexrev = -1;
if ((indexrev = line.indexOf(REVISION, index)) != -1) {
rev = line.substring(indexrev + REVISION.length());
}
String filename = line.substring(0, index);
String rev = null;
int indexrev = -1;
if ((indexrev = line.indexOf(REVISION, index)) != -1) {
rev = line.substring(indexrev + REVISION.length());
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java
|
Method name: CvsTagEntry[] parseRDiff(File)
|
|
Method name: CvsTagEntry[] parseRDiff(File)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | String filename = line.substring(0, index);↵ | | 1 | String filename = line.substring(0, index);↵
|
2 | String rev = null;↵ | | 2 | String rev = null;↵
|
3 | int indexrev = -1;↵ | | 3 | int indexrev = -1;↵
|
4 | if ((indexrev = line.indexOf(REVISION, index)) != -1) {↵ | | 4 | if ((indexrev = line.indexOf(REVISION, index)) != -1) {↵
|
5 | rev = line.substring(indexrev + REVISION.length());↵ | | 5 | rev = line.substring(indexrev + REVISION.length());↵
|
6 | } | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 15 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 3.4 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
16 | String filename = line.substring(0, index); | | 33 | String filename = line.substring(0, index); |
17 | String rev = null; | | 34 | String rev = null; |
18 | int indexrev = -1; | | 35 | int indexrev = -1; |
19 | if ((indexrev = line.indexOf(REVISION, index)) != -1) | | 36 | if ((indexrev = line.indexOf(REVISION, index)) != -1) |
20 | rev = line.substring(indexrev + REVISION.length()); | | 37 | rev = line.substring(indexrev + REVISION.length()); |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables filename, rev , while Clone fragment #2 returns variables filename, rev |