File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/email/EmailTask.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Tar.java | |||
Method name: void execute()
|
Method name: void tar(ResourceCollection, TarOutputStream)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | if (attachments != null) {↵ | |||
2 | Iterator iter = attachments.iterator();↵ | 1 | Iterator iter = rc.iterator();↵ | |
3 | while (iter.hasNext()) {↵ | 2 | while (iter.hasNext()) {↵ | |
4 | FileResource fr = (FileResource) iter.next();↵ | 3 | Resource r = (Resource) iter.next();↵ | |
5 | files.addElement(fr.getFile());↵ | 4 | ↵ | |
6 | }↵ | 5 | tarResource(r, tOut, r.getName(), tfs);↵ | |
7 | } | 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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 10 |
Number of mapped statements | 4 |
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) | 19.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
42 | Iterator iter = attachments.iterator(); |
| 22 | Iterator iter = rc.iterator(); | ||||||||||||||||||||||||
43 | while (iter.hasNext()) | 23 | while (iter.hasNext()) | |||||||||||||||||||||||||
44 | FileResource fr = (FileResource)iter.next(); |
| 24 | Resource r = (Resource)iter.next(); | ||||||||||||||||||||||||
45 | files.addElement(fr.getFile()); |
| 25 | tarResource(r, tOut, r.getName(), tfs); |
Row | Violation |
---|---|
1 | Type org.apache.tools.ant.types.Path of variable attachments does not match with type org.apache.tools.ant.types.ResourceCollection of variable rc |
2 | Expression (FileResource)iter.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression (Resource)iter.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression files.addElement(fr.getFile()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression tarResource(r,tOut,r.getName(),tfs) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression files.addElement(fr.getFile()) is a void method call, and thus it cannot be parameterized |
7 | Expression tarResource(r,tOut,r.getName(),tfs) is a void method call, and thus it cannot be parameterized |
8 | Expression files.addElement(fr.getFile()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression tarResource(r,tOut,r.getName(),tfs) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression files.addElement(fr.getFile()) is a void method call, and thus it cannot be parameterized |
11 | Expression tarResource(r,tOut,r.getName(),tfs) is a void method call, and thus it cannot be parameterized |