File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/selectors/DepthSelector.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/selectors/SizeSelector.java | |||
Method name: String toString()
|
Method name: String toString()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 5 | |||
1 | StringBuffer buf = new StringBuffer("{depthselector min: ");↵ | 1 | StringBuffer buf = new StringBuffer("{sizeselector value: ");↵ | |
2 | buf.append(min);↵ | 2 | buf.append(sizelimit);↵ | |
3 | buf.append(" max: ");↵ | 3 | buf.append("↵ | |
4 | buf.append(max);↵ | 4 | compare: ").append(when.getValue());↵ | |
5 | buf.append("}");↵ | 5 | buf.append("}");↵ | |
6 | return buf.toString(); | 6 |
| |
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 22 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | StringBuffer buf = new StringBuffer("{depthselector min: "); |
| 1 | StringBuffer buf = new StringBuffer("{sizeselector value: "); | |||||||||||||||
2 | buf.append(min); |
| 2 | buf.append(sizelimit); | |||||||||||||||
3 | buf.append(" max: "); |
| 3 | buf.append("compare: ").append(when.getValue()); | |||||||||||||||
4 | buf.append(max); |
| | ||||||||||||||||
5 | buf.append("}"); | 4 | buf.append("}"); | ||||||||||||||||
6 | return buf.toString(); | 5 | return buf.toString(); |
Row | Violation |
---|---|
1 | Type int of variable min does not match with type long of variable sizelimit |
2 | Expression buf cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression buf.append("compare: ") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement buf.append(max); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Clone fragment #1 returns variables buf , while Clone fragment #2 returns variables |