File path: /jruby-1.4.0/src/org/jruby/javasupport/JavaClass.java | File path: /jruby-1.4.0/src/org/jruby/javasupport/JavaClass.java | |||
Method name: void installInstanceMethods(Map
|
Method name: void installStaticMethods(Map
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | MethodInstaller invoker = (MethodInstaller) methodCallbacks.get(name);↵ | 1 | MethodInstaller invoker = (MethodInstaller) methodCallbacks.get(name);↵ | |
2 | if (invoker == null) {↵ | 2 | if (invoker == null) {↵ | |
3 | invoker = new InstanceMethodInvokerInstaller(name);↵ | 3 | invoker = new StaticMethodInvokerInstaller(name);↵ | |
4 | methodCallbacks.put(name, invoker);↵ | 4 | methodCallbacks.put(name, invoker);↵ | |
5 | }↵ | 5 | }↵ | |
6 | invoker.addMethod(method, javaClass); | 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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 13 |
Number of mapped statements | 5 |
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) | 1.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | MethodInstaller invoker = (MethodInstaller)methodCallbacks.get(name); | 1 | MethodInstaller invoker = (MethodInstaller)methodCallbacks.get(name); | ||||||||||||
2 | if (invoker == null) | 2 | if (invoker == null) | ||||||||||||
3 | invoker = new InstanceMethodInvokerInstaller(name); |
| 3 | invoker = new StaticMethodInvokerInstaller(name); | |||||||||||
4 | methodCallbacks.put(name, invoker); | 4 | methodCallbacks.put(name, invoker); | ||||||||||||
5 | invoker.addMethod(method, javaClass); |
| 5 | invoker.addMethod(method, javaClass); |
Row | Violation |
---|---|
1 | Type java.lang.Class<> of variable javaClass does not match with type java.lang.Class<> of variable javaClass |