if (!staticAnnotatedMethods1_9.isEmpty()) {
out.println(" if (compatVersion == CompatVersion.RUBY1_9 || compatVersion == CompatVersion.BOTH) {");
processMethodDeclarations(staticAnnotatedMethods1_9);
out.println(" }");
}
if (!annotatedMethods1_9.isEmpty()) {
out.println(" if (compatVersion == CompatVersion.RUBY1_9 || compatVersion == CompatVersion.BOTH) {");
processMethodDeclarations(annotatedMethods1_9);
out.println(" }");
}
Clone fragments detected by clone detection tool
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 visitClassDeclaration(ClassDeclaration)
|
|
Method name: void visitClassDeclaration(ClassDeclaration)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (!staticAnnotatedMethods1_9.isEmpty()) {↵ | | 1 | if (!annotatedMethods1_9.isEmpty()) {↵
|
2 | out.println(" if (compatVersion == CompatVersion.RUBY1_9 || compatVersion == CompatVersion.BOTH) {");↵ | | 2 | out.println(" if (compatVersion == CompatVersion.RUBY1_9 || compatVersion == CompatVersion.BOTH) {");↵
|
3 | processMethodDeclarations(staticAnnotatedMethods1_9);↵ | | 3 | processMethodDeclarations(annotatedMethods1_9);↵
|
4 | out.println(" }");↵ | | 4 | out.println(" }");↵
|
5 | } | | 5 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 18 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 2.1 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
73 | if (!staticAnnotatedMethods1_9.isEmpty()) | | 82 | if (!annotatedMethods1_9.isEmpty()) |
74 | out.println(" if (compatVersion == CompatVersion.RUBY1_9 || compatVersion == CompatVersion.BOTH) {"); | | 83 | out.println(" if (compatVersion == CompatVersion.RUBY1_9 || compatVersion == CompatVersion.BOTH) {"); |
75 | processMethodDeclarations(staticAnnotatedMethods1_9); | | 84 | processMethodDeclarations(annotatedMethods1_9); |
76 | | | 85 | |
Precondition Violations (0)
Row |
Violation |