File path: /jruby-1.4.0/src/org/jruby/RubyJRuby.java | File path: /jruby-1.4.0/src/org/jruby/RubyJRuby.java | |||
Method name: IRubyObject add_class_annotation(ThreadContext, IRubyObject, IRubyObject)
|
Method name: IRubyObject add_parameter_annotations(ThreadContext, IRubyObject, IRubyObject, IRubyObject)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | for (Map.Entry<Class,Map<String,Object>> entry : annos.entrySet()) {↵ | 1 | for (Map.Entry<Class,Map<String,Object>> entry : paramAnnos.entrySet()) {↵ | |
2 | Map<String,Object> value = entry.getValue();↵ | 2 | Map<String,Object> value = entry.getValue();↵ | |
3 | if (value == null) value = Collections.EMPTY_MAP;↵ | 3 | if (value == null) value = Collections.EMPTY_MAP;↵ | |
4 | clazz.addClassAnnotation(getAnnoClass(context, entry.getKey()), value);↵ | 4 | clazz.addParameterAnnotation(method, i, getAnnoClass(context, entry.getKey()), value);↵ | |
5 | } | 5 | } | |
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 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) | 5.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | for (Map.Entry<Class, Map<String, Object>> entry : annos.entrySet()) |
| 6 | for (Map.Entry<Class, Map<String, Object>> entry : paramAnnos.entrySet()) | |||||||||||||||||||||
4 | Map<String, Object> value = entry.getValue(); | 7 | Map<String, Object> value = entry.getValue(); | ||||||||||||||||||||||
5 | if (value == null) | 8 | if (value == null) | ||||||||||||||||||||||
6 | value = Collections.EMPTY_MAP; | 9 | value = Collections.EMPTY_MAP; | ||||||||||||||||||||||
7 | clazz.addClassAnnotation(getAnnoClass(context, entry.getKey()), value); |
| 10 | clazz.addParameterAnnotation(method, i, getAnnoClass(context, entry.getKey()), value); |
Row | Violation |
---|---|
1 | Expression clazz.addClassAnnotation(getAnnoClass(context,entry.getKey()),value) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression clazz.addParameterAnnotation(method,i,getAnnoClass(context,entry.getKey()),value) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression clazz.addClassAnnotation(getAnnoClass(context,entry.getKey()),value) is a void method call, and thus it cannot be parameterized |
4 | Expression clazz.addParameterAnnotation(method,i,getAnnoClass(context,entry.getKey()),value) is a void method call, and thus it cannot be parameterized |
5 | Expression clazz.addClassAnnotation(getAnnoClass(context,entry.getKey()),value) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression clazz.addParameterAnnotation(method,i,getAnnoClass(context,entry.getKey()),value) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression clazz.addClassAnnotation(getAnnoClass(context,entry.getKey()),value) is a void method call, and thus it cannot be parameterized |
8 | Expression clazz.addParameterAnnotation(method,i,getAnnoClass(context,entry.getKey()),value) is a void method call, and thus it cannot be parameterized |