File path: /apache-ant-1.7.0/src/org/apache/tools/ant/dispatch/DispatchUtils.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/dispatch/DispatchUtils.java | |||
Method name: void execute(Object)
|
Method name: void execute(Object)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | Method executeM = null;↵ | 1 | Method executeM = null;↵ | |
2 | executeM = dispatchable.getClass().getMethod(↵ | 2 | ↵ | |
3 | methodName, new Class[0]);↵ | 3 | executeM = task.getClass().getMethod(methodName, new Class[0]);↵ | |
4 | if (executeM == null) {↵ | 4 | if (executeM == null) {↵ | |
5 | throw new BuildException(↵ | 5 | throw new BuildException(↵ | |
6 | "No public " + methodName + "() in "↵ | 6 | "No public " + methodName + "() in "↵ | |
7 | + dispatchable.getClass());↵ | 7 | ↵ | |
8 | }↵ | |||
9 | ↵ | 8 | + task.getClass());↵ | |
9 | }↵ | |||
10 | executeM.invoke(dispatchable, (Object[]) null);↵ | 10 | executeM.invoke(task, (Object[]) null);↵ | |
11 | if (task instanceof UnknownElement) {↵ | 11 | if (task instanceof UnknownElement) {↵ | |
12 | ((UnknownElement) task).setRealThing(null);↵ | 12 | ((UnknownElement) task).setRealThing(null);↵ | |
13 | } | 13 |
| |
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 15 |
Number of mapped statements | 7 |
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) | 3.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
27 | Method executeM = null; | 37 | Method executeM = null; | |||||||||||||||
28 | executeM = dispatchable.getClass().getMethod(methodName, new Class[0]); |
| 38 | executeM = task.getClass().getMethod(methodName, new Class[0]); | ||||||||||||||
29 | if (executeM == null) | 39 | if (executeM == null) | |||||||||||||||
30 | throw new BuildException("No public " + methodName + "() in " + dispatchable.getClass()); |
| 40 | throw new BuildException("No public " + methodName + "() in " + task.getClass()); | ||||||||||||||
31 | executeM.invoke(dispatchable, (Object[])null); |
| 41 | executeM.invoke(task, (Object[])null); | ||||||||||||||
32 | if (task instanceof UnknownElement) | 42 | if (task instanceof UnknownElement) | |||||||||||||||
33 | ((UnknownElement)task).setRealThing(null); | 43 | ((UnknownElement)task).setRealThing(null); |
Row | Violation |
---|---|
1 | Type org.apache.tools.ant.dispatch.Dispatchable of variable dispatchable does not match with type java.lang.Object of variable task |
2 | Type org.apache.tools.ant.dispatch.Dispatchable of variable dispatchable does not match with type java.lang.Object of variable task |
3 | Type org.apache.tools.ant.dispatch.Dispatchable of variable dispatchable does not match with type java.lang.Object of variable task |