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: 8 | Number of AST nodes: 7 | |||
1 | methodName = s.trim();↵ | |||
2 | Method executeM = null;↵ | 1 | Method executeM = null;↵ | |
3 | executeM = dispatchable.getClass().getMethod(↵ | 2 | executeM = task.getClass().getMethod(↵ | |
4 | methodName, new Class[0]);↵ | 3 | methodName, new Class[0]);↵ | |
5 | if (executeM == null) {↵ | 4 | if (executeM == null) {↵ | |
6 | throw new BuildException(↵ | 5 | throw new BuildException(↵ | |
7 | "No public " + methodName + "() in "↵ | 6 | "No public " + methodName + "() in "↵ | |
8 | + dispatchable.getClass());↵ | 7 | + task.getClass());↵ | |
9 | }↵ | 8 | ↵ | |
10 | ↵ | 9 | }↵ | |
11 | executeM.invoke(dispatchable, (Object[]) null);↵ | 10 | executeM.invoke(task, (Object[]) null);↵ | |
12 | if (task instanceof UnknownElement) {↵ | 11 | if (task instanceof UnknownElement) {↵ | |
13 | ((UnknownElement) task).setRealThing(null);↵ | 12 | ((UnknownElement) task).setRealThing(null);↵ | |
14 | } | 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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 19 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
26 | methodName = s.trim(); | | ||||||||||||||||||||
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 java.lang.Class<> of variable dispatchable.getClass() does not match with type java.lang.Class<> of variable task.getClass() |
2 | Type org.apache.tools.ant.dispatch.Dispatchable of variable dispatchable does not match with type java.lang.Object of variable task |
3 | Type java.lang.Class<> of variable dispatchable.getClass() does not match with type java.lang.Class<> of variable task.getClass() |
4 | Type org.apache.tools.ant.dispatch.Dispatchable of variable dispatchable does not match with type java.lang.Object of variable task |
5 | Type org.apache.tools.ant.dispatch.Dispatchable of variable dispatchable does not match with type java.lang.Object of variable task |