File path: /jruby-1.4.0/src/org/jruby/anno/AnnotationBinder.java | File path: /jruby-1.4.0/src/org/jruby/RubyModule.java | |||
Method name: void visitClassDeclaration(ClassDeclaration)
|
Method name: void clump(Class)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (anno.compat() == CompatVersion.RUBY1_8) {↵ | 1 | if (anno.compat() == CompatVersion.RUBY1_8) {↵ | |
2 | methodsHash = staticAnnotatedMethods1_8;↵ | 2 | methodsHash = annotatedMethods1_8;↵ | |
3 | } else if (anno.compat() == CompatVersion.RUBY1_9) {↵ | 3 | } else if (anno.compat() == CompatVersion.RUBY1_9) {↵ | |
4 | methodsHash = staticAnnotatedMethods1_9;↵ | 4 | methodsHash = annotatedMethods1_9;↵ | |
5 | } else {↵ | 5 | } else {↵ | |
6 | methodsHash = staticAnnotatedMethods;↵ | 6 | methodsHash = annotatedMethods;↵ | |
7 | } | 7 |
| |
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.9 |
Clones location | Clones are in different classes |
Number of node comparisons | 21 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 1.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
48 | if (anno.compat() == CompatVersion.RUBY1_8) | 16 | if (anno.compat() == CompatVersion.RUBY1_8) | ||||
|
| 17 | methodsHash = annotatedMethods1_8; | ||||
49 | methodsHash = staticAnnotatedMethods1_8; |
| | ||||
50 | else if (anno.compat() == CompatVersion.RUBY1_9) | 18 | else if (anno.compat() == CompatVersion.RUBY1_9) | ||||
|
| 19 | methodsHash = annotatedMethods1_9; | ||||
51 | methodsHash = staticAnnotatedMethods1_9; |
| | ||||
else | | ||||||
|
| 20 | methodsHash = annotatedMethods; | ||||
52 | methodsHash = staticAnnotatedMethods; |
| |
Row | Violation |
---|---|
1 | Unmatched statement methodsHash=staticAnnotatedMethods1_8; cannot be moved, because it updates a variable modified in other unmapped statements |
2 | Unmatched statement methodsHash=staticAnnotatedMethods1_9; cannot be moved, because it updates a variable modified in other unmapped statements |
3 | Unmatched statement methodsHash=staticAnnotatedMethods; cannot be moved, because it updates a variable modified in other unmapped statements |
4 | Unmatched statement methodsHash=annotatedMethods1_8; cannot be moved, because it updates a variable modified in other unmapped statements |
5 | Unmatched statement methodsHash=annotatedMethods1_9; cannot be moved, because it updates a variable modified in other unmapped statements |
6 | Unmatched statement methodsHash=annotatedMethods; cannot be moved, because it updates a variable modified in other unmapped statements |