File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/perforce/P4Fstat.java | |||
Method name: void execute()
|
Method name: void execute()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 6 | |||
1 | File f = new File(ds.getBasedir(), srcFiles[j]);↵ | 1 | File f = new File(ds.getBasedir(), srcFiles[j]);↵ | |
2 | filelist.append(" ").append('"').append(f.getAbsolutePath()).append('"');↵ | 2 | filelist.append(" ").append('"').append(f.getAbsolutePath()).append('"');↵ | |
3 | doneFileNum++;↵ | |||
3 | if (filelist.length() > cmdLength) {↵ | 4 | if (filelist.length() > cmdLength) {↵ | |
4 | execP4Add(filelist);↵ | 5 | execP4Fstat(filelist);↵ | |
5 | filelist = new StringBuffer();↵ | 6 | filelist = new StringBuffer();↵ | |
6 | } | 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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 15 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.4 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11 | File f = new File(ds.getBasedir(), srcFiles[j]); | 13 | File f = new File(ds.getBasedir(), srcFiles[j]); | |||||||||||||||
12 | filelist.append(" ").append('"').append(f.getAbsolutePath()).append('"'); | 14 | filelist.append(" ").append('"').append(f.getAbsolutePath()).append('"'); | |||||||||||||||
| 15 | doneFileNum++; | ||||||||||||||||
13 | if (filelist.length() > cmdLength) | 16 | if (filelist.length() > cmdLength) | |||||||||||||||
14 | execP4Add(filelist); |
| 17 | execP4Fstat(filelist); | ||||||||||||||
15 | filelist = new StringBuffer(); | 18 | filelist = new StringBuffer(); |
Row | Violation |
---|---|
1 | Expression execP4Add(filelist) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression execP4Fstat(filelist) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression execP4Add(filelist) is a void method call, and thus it cannot be parameterized |
4 | Expression execP4Fstat(filelist) is a void method call, and thus it cannot be parameterized |
5 | Clone fragment #1 returns variables filelist , while Clone fragment #2 returns variables |