File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/XSLTProcess.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Pack.java | |||
Method name: void addConfiguredStyle(Resources)
|
Method name: void addConfigured(ResourceCollection)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if (rc.size() != 1) {↵ | 1 | if (a.size() != 1) {↵ | |
2 | throw new BuildException("The style element must be specified"↵ | 2 | throw new BuildException("↵ | |
3 | + " with exactly one nested resource.↵ | 3 | only single argument resource collections"↵ | |
4 | ");↵ | 4 | + " are supported as archives");↵ | |
5 | }↵ | 5 | }↵ | |
6 | setXslResource((Resource) rc.iterator().next()); | 6 | setSrcResource((Resource) a.iterator().next()); | |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 5 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (rc.size() != 1) |
| 1 | if (a.size() != 1) | ||||||||||||||
2 | throw new BuildException("The style element must be specified" + " with exactly one nested resource."); |
| 2 | throw new BuildException("only single argument resource collections" + " are supported as archives"); | ||||||||||||||
|
| 3 | setSrcResource((Resource)a.iterator().next()); | |||||||||||||||
3 | setXslResource((Resource)rc.iterator().next()); |
| |
Row | Violation |
---|---|
1 | Type org.apache.tools.ant.types.resources.Resources of variable rc does not match with type org.apache.tools.ant.types.ResourceCollection of variable a |
2 | Unmatched statement setSrcResource((Resource)a.iterator().next()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement setXslResource((Resource)rc.iterator().next()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |