File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/AntStructure.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/DeweyDecimal.java | |||
Method name: void printElementDecl(PrintWriter, Project, String, Class)
|
Method name: String toString()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | for (int i = 0; i < values.length; i++) {↵ | 1 | for (int i = 0; i < components.length; i++) {↵ | |
2 | if (i != 0) {↵ | 2 | if (i != 0) {↵ | |
3 | sb.append(" | ");↵ | 3 | sb.append('.');↵ | |
4 | }↵ | 4 | ↵ | |
5 | sb.append(type.getMethod("name", (Class[]) null)↵ | |||
6 | .invoke(values[i], (Object[]) null));↵ | |||
7 | ↵ | 5 | }↵ | |
6 | sb.append(components[ i ]);↵ | |||
8 | } | 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 |
Number of node comparisons | 9 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
70 | for (int i = 0; i < values.length; i++) |
| 2 | for (int i = 0; i < components.length; i++) | ||||||||||||||
71 | if (i != 0) | 3 | if (i != 0) | |||||||||||||||
| 4 | sb.append('.'); | ||||||||||||||||
72 | sb.append(" | "); | | ||||||||||||||||
|
| 5 | sb.append(components[i]); | |||||||||||||||
73 | sb.append(type.getMethod("name", (Class[])null).invoke(values[i], (Object[])null)); |
| |
Row | Violation |
---|---|
1 | Type java.lang.Object[] of variable values does not match with type int[] of variable components |
2 | Unmatched statement sb.append(components[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement sb.append(type.getMethod("name",(Class[])null).invoke(values[i],(Object[])null)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |