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(sources, datesel);↵ | 1 | logFuture(targets, datesel);↵ | |
2 | int neSources = new NonExistent(sources).size();↵ | 2 | int neTargets = new NonExistent(targets).size();↵ | |
3 | if (neSources > 0) {↵ | 3 | if (neTargets > 0) {↵ | |
4 | log(neSources + " nonexistent sources", Project.MSG_VERBOSE);↵ | 4 | log(neTargets + " nonexistent targets", Project.MSG_VERBOSE);↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | Resource newestSource = (Resource) (new Newest(sources).iterator().next()); | 7 | FileResource oldestTarget = (FileResource) (new Oldest(targets).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) | 1.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11 | logFuture(sources, datesel); |
| 4 | logFuture(targets, datesel); | ||||||||||||||||||||||||||||
12 | int neSources = new NonExistent(sources).size(); |
| 5 | int neTargets = new NonExistent(targets).size(); | ||||||||||||||||||||||||||||
13 | if (neSources > 0) |
| 6 | if (neTargets > 0) | ||||||||||||||||||||||||||||
14 | log(neSources + " nonexistent sources", Project.MSG_VERBOSE); |
| 7 | log(neTargets + " nonexistent targets", Project.MSG_VERBOSE); | ||||||||||||||||||||||||||||
15 | return false; |
| 8 | return false; | ||||||||||||||||||||||||||||
16 | Resource newestSource = (Resource)(new Newest(sources).iterator().next()); |
| 9 | FileResource oldestTarget = (FileResource)(new Oldest(targets).iterator().next()); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variable newestSource with type org.apache.tools.ant.types.Resource , while Clone fragment #2 returns variable oldestTarget with type org.apache.tools.ant.types.resources.FileResource |
2 | Conditional return false; |
3 | Conditional return false; |