File path: /apache-ant-1.7.0/src/org/apache/tools/ant/IntrospectionHelper.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/IntrospectionHelper.java | |||
Method name: void IntrospectionHelper(Class)
|
Method name: void IntrospectionHelper(Class)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | Constructor constructor = null;↵ | 1 | Constructor constructor = null;↵ | |
2 | try {↵ | 2 | try {↵ | |
3 | constructor = args[0].getConstructor(new Class[] {});↵ | 3 | constructor = args[0].getConstructor(new Class[] {});↵ | |
4 | } catch (NoSuchMethodException ex) {↵ | 4 | } catch (NoSuchMethodException ex) {↵ | |
5 | constructor =↵ | 5 | constructor =↵ | |
6 | args[0].getConstructor(new Class[] {Project.class});↵ | 6 | args[0].getConstructor(new Class[] {Project.class});↵ | |
7 | }↵ | 7 | }↵ | |
8 | String propName = getPropertyName(name, "addConfigured"); | 8 | String propName = getPropertyName(name, "add"); | |
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 the same method |
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) | 2.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
33 | Constructor constructor = null; | 41 | Constructor constructor = null; | |||||||||||
34 | try | 42 | try | |||||||||||
35 | constructor = args[0].getConstructor(new Class[] {}); | 43 | constructor = args[0].getConstructor(new Class[] {}); | |||||||||||
36 | String propName = getPropertyName(name, "addConfigured"); |
| 44 | String propName = getPropertyName(name, "add"); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables propName, constructor , while Clone fragment #2 returns variables propName, constructor |