File path: /jruby-1.4.0/src/org/jruby/anno/AnnotationBinder.java | File path: /jruby-1.4.0/src/org/jruby/anno/AnnotationBinder.java | |||
Method name: void generateMethodAddCalls(MethodDeclaration, JRubyMethod)
|
Method name: void generateMethodAddCalls(MethodDeclaration, JRubyMethod)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | baseName = jrubyMethod.name()[0];↵ | 1 | baseName = jrubyMethod.name()[0];↵ | |
2 | for (String name : jrubyMethod.name()) {↵ | 2 | for (String name : jrubyMethod.name()) {↵ | |
3 | out.println(" cls.addMethodAtBootTimeOnly(\"" + name + "\", javaMethod);");↵ | 3 | out.println(" singletonClass.addMethodAtBootTimeOnly(\"" + name + "\", moduleMethod);");↵ | |
4 | } | 4 | } | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 6 |
Number of mapped statements | 3 |
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) | 0.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16 | baseName = jrubyMethod.name()[0]; | 28 | baseName = jrubyMethod.name()[0]; | ||||||||||||||
17 | for (String name : jrubyMethod.name()) | 29 | for (String name : jrubyMethod.name()) | ||||||||||||||
18 | out.println(" cls.addMethodAtBootTimeOnly(\"" + name + "\", javaMethod);"); |
| 30 | out.println(" singletonClass.addMethodAtBootTimeOnly(\"" + name + "\", moduleMethod);"); |
Row | Violation |
---|