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: 8 | Number of AST nodes: 9 | |||
1 | if ((index = line.indexOf(FILE_WAS_REMOVED)) != -1) {↵ | |||
2 | // it is a removed file↵ | |||
1 | String filename = line.substring(0, index);↵ | 3 | String filename = line.substring(0, index);↵ | |
2 | String rev = null;↵ | 4 | String rev = null;↵ | |
3 | int indexrev = -1;↵ | 5 | int indexrev = -1;↵ | |
4 | if ((indexrev = line.indexOf(REVISION, index)) != -1) {↵ | 6 | if ((indexrev = line.indexOf(REVISION, index)) != -1) {↵ | |
5 | rev = line.substring(indexrev + REVISION.length());↵ | 7 | rev = line.substring(indexrev + REVISION.length());↵ | |
6 | }↵ | 8 | }↵ | |
7 | entry = new CvsTagEntry(filename, rev);↵ | 9 | entry = new CvsTagEntry(filename, null, rev);↵ | |
8 | entries.addElement(entry);↵ | 10 | entries.addElement(entry);↵ | |
9 | log(entry.toString(), Project.MSG_VERBOSE); | 11 | log(entry.toString(), Project.MSG_VERBOSE);↵ | |
12 |
| |||
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.5 |
Clones location | Clones are in the same method |
Number of node comparisons | 42 |
Number of mapped statements | 8 |
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) | 15.7 |
Clone type | Type 2 |
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()); | |||||||||||||
21 | entry = new CvsTagEntry(filename, rev); |
| 38 | entry = new CvsTagEntry(filename, null, rev); | ||||||||||||
22 | entries.addElement(entry); | 39 | entries.addElement(entry); | |||||||||||||
23 | log(entry.toString(), Project.MSG_VERBOSE); | 40 | log(entry.toString(), Project.MSG_VERBOSE); |
Row | Violation |
---|---|
1 | Expression new CvsTagEntry(filename,rev) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new CvsTagEntry(filename,null,rev) cannot be parameterized, because it has dependencies to/from statements that will be extracted |