File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/DependSet.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/DependSet.java | |||
Method name: boolean uptodate(ResourceCollection, ResourceCollection)
|
Method name: boolean uptodate(ResourceCollection, ResourceCollection)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | logFuture(targets, datesel);↵ | 1 | logFuture(sources, datesel);↵ | |
2 | int neTargets = new NonExistent(targets).size();↵ | 2 | int neSources = new NonExistent(sources).size();↵ | |
3 | if (neTargets > 0) {↵ | 3 | if (neSources > 0) {↵ | |
4 | log(neTargets + " nonexistent targets", Project.MSG_VERBOSE);↵ | 4 | log(neSources + " nonexistent sources", Project.MSG_VERBOSE);↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | FileResource oldestTarget = (FileResource) (new Oldest(targets).iterator().next()); | 7 | Resource newestSource = (Resource) (new Newest(sources).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 the same method |
Number of node comparisons | 18 |
Number of mapped statements | 6 |
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) | 4.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | logFuture(targets, datesel); |
| 11 | logFuture(sources, datesel); | ||||||||||||||||||||||||||||
5 | int neTargets = new NonExistent(targets).size(); |
| 12 | int neSources = new NonExistent(sources).size(); | ||||||||||||||||||||||||||||
6 | if (neTargets > 0) |
| 13 | if (neSources > 0) | ||||||||||||||||||||||||||||
7 | log(neTargets + " nonexistent targets", Project.MSG_VERBOSE); |
| 14 | log(neSources + " nonexistent sources", Project.MSG_VERBOSE); | ||||||||||||||||||||||||||||
8 | return false; | 15 | return false; | |||||||||||||||||||||||||||||
9 | FileResource oldestTarget = (FileResource)(new Oldest(targets).iterator().next()); |
| 16 | Resource newestSource = (Resource)(new Newest(sources).iterator().next()); |
Row | Violation |
---|---|
1 | Expression targets cannot be unified with expression sources , because common superclass type org.apache.tools.ant.types.DataType cannot be passed as an argument to private void logFuture(org.apache.tools.ant.types.ResourceCollection, org.apache.tools.ant.types.resources.selectors.ResourceSelector) |
2 | Expression targets cannot be unified with expression sources , because common superclass type org.apache.tools.ant.types.DataType cannot be passed as an argument to private void <init>(org.apache.tools.ant.types.ResourceCollection) |
3 | Clone fragment #1 returns variable oldestTarget with type org.apache.tools.ant.types.resources.FileResource , while Clone fragment #2 returns variable newestSource with type org.apache.tools.ant.types.Resource |
4 | Not all possible execution flows end in a return statement |