File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/depend/Depend.java | |||
Method name: void record()
|
Method name: void determineDependencies()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | Vector v = (Vector) byDir.get(parent↵ | 1 | Hashtable affectedClasses↵ | |
2 | );↵ | 2 | = (Hashtable) affectedClassMap.get(dependentClass);↵ | |
3 | if (v == null) {↵ | 3 | if (affectedClasses == null) {↵ | |
4 | v = new Vector();↵ | 4 | affectedClasses = new Hashtable();↵ | |
5 | byDir.put(parent, v);↵ | 5 | affectedClassMap.put(dependentClass, affectedClasses);↵ | |
6 | } | 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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 11 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 2.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12 | Vector v = (Vector)byDir.get(parent); |
| | ||||||||||||||||||
|
| 37 | Hashtable affectedClasses = (Hashtable)affectedClassMap.get(dependentClass); | ||||||||||||||||||
13 | if (v == null) |
| 38 | if (affectedClasses == null) | |||||||||||||||||
14 | v = new Vector(); |
| | ||||||||||||||||||
|
| 39 | affectedClasses = new Hashtable(); | ||||||||||||||||||
15 | byDir.put(parent, v); |
| 40 | affectedClassMap.put(dependentClass, affectedClasses); |
Row | Violation |
---|---|
1 | Unmatched statement Vector v=(Vector)byDir.get(parent); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement Hashtable affectedClasses=(Hashtable)affectedClassMap.get(dependentClass); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Type java.util.Vector of variable v does not match with type java.util.Hashtable of variable affectedClasses |
4 | Unmatched statement v=new Vector(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement affectedClasses=new Hashtable(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Type java.io.File of variable parent does not match with type java.lang.String of variable dependentClass |