File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/depend/AntAnalyzer.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/depend/bcel/FullAnalyzer.java | |||
Method name: void determineDependencies(Vector, Vector)
|
Method name: void determineDependencies(Vector, Vector)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | toAnalyze.clear();↵ | 1 | toAnalyze.clear();↵ | |
2 | // now recover all the dependencies collected and add to the list.↵ | 2 | // now recover all the dependencies collected and add to the list.↵ | |
3 | Enumeration depsEnum = analyzedDeps.elements();↵ | 3 | Enumeration depsEnum = dependencyVisitor.getDependencies();↵ | |
4 | while (depsEnum.hasMoreElements()) {↵ | 4 | while (depsEnum.hasMoreElements()) {↵ | |
5 | String className = (String) depsEnum.nextElement();↵ | 5 | String className = (String) depsEnum.nextElement();↵ | |
6 | if (!dependencies.containsKey(className)) {↵ | 6 | if (!dependencies.containsKey(className)) {↵ | |
7 | toAnalyze.put(className, className);↵ | 7 | toAnalyze.put(className, className);↵ | |
8 | }↵ | 8 | }↵ | |
9 | } | 9 |
| |
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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 24 |
Number of mapped statements | 5 |
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) | 2.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
36 | toAnalyze.clear(); | 26 | toAnalyze.clear(); | ||||
|
| 27 | Enumeration depsEnum = dependencyVisitor.getDependencies(); | ||||
37 | Enumeration depsEnum = analyzedDeps.elements(); |
| | ||||
38 | while (depsEnum.hasMoreElements()) | 28 | while (depsEnum.hasMoreElements()) | ||||
39 | String className = (String)depsEnum.nextElement(); | 29 | String className = (String)depsEnum.nextElement(); | ||||
40 | if (!dependencies.containsKey(className)) | 30 | if (!dependencies.containsKey(className)) | ||||
41 | toAnalyze.put(className, className); | 31 | toAnalyze.put(className, className); |
Row | Violation |
---|---|
1 | Unmatched statement Enumeration depsEnum=dependencyVisitor.getDependencies(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement Enumeration depsEnum=analyzedDeps.elements(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |