File path: /jruby-1.4.0/src/org/jruby/javasupport/proxy/JavaProxyClass.java | File path: /jruby-1.4.0/src/org/jruby/RubyModule.java | |||
Method name: RubyObject get_with_class(IRubyObject, IRubyObject)
|
Method name: void addClassProvider(ClassProvider)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 3 | |||
1 | for (String methodName: methods.keySet()) {↵ | |||
2 | ↵ | 1 | synchronized(classProviders) {↵ | |
3 | if (!EXCLUDE_METHODS.contains(methodName)) {↵ | 2 | if (!classProviders.contains(provider)) {↵ | |
4 | names.add(methodName);↵ | 3 | ↵ | |
5 | methodNames.append(runtime.newString(methodName));↵ | |||
6 | }↵ | |||
7 | ↵ | 4 | classProviders.add(provider);↵ | |
5 | }↵ | |||
8 | } | 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 | 7 |
Number of mapped statements | 2 |
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) | 1.1 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
49 | if (!EXCLUDE_METHODS.contains(methodName)) |
| 6 | if (!classProviders.contains(provider)) | |||||||||||||||||||||
50 | names.add(methodName); |
| 7 | classProviders.add(provider); | |||||||||||||||||||||
51 | methodNames.append(runtime.newString(methodName)); | |
Row | Violation |
---|---|
1 | Type java.lang.String of variable methodName does not match with type org.jruby.util.ClassProvider of variable provider |
2 | Type java.util.HashSet<java.lang.String> of variable EXCLUDE_METHODS does not match with type java.util.List<org.jruby.util.ClassProvider> of variable classProviders |
3 | Type java.lang.String of variable methodName does not match with type org.jruby.util.ClassProvider of variable provider |
4 | Type java.util.Set<java.lang.String> of variable names does not match with type java.util.List<org.jruby.util.ClassProvider> of variable classProviders |