for (Class paramType : paramTypes) {
if (paramType == double.class || paramType == long.class) {
baseIndex += 2;
} else {
baseIndex += 1;
}
}
for (Class paramType : params) {
if (paramType == double.class || paramType == long.class) {
baseIndex += 2;
} else {
baseIndex += 1;
}
}
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/java/MiniJava.java
|
|
File path: /jruby-1.4.0/src/org/jruby/RubyClass.java
|
Method name: Class defineOldStyleImplClass(Ruby, String, String[], Map>)
|
|
Method name: void reify(String)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | for (Class paramType : paramTypes) {↵ | | 1 | for (Class paramType : params) {↵
|
2 | if (paramType == double.class || paramType == long.class) {↵ | | 2 | if (paramType == double.class || paramType == long.class) {↵
|
3 | baseIndex += 2;↵ | | 3 | baseIndex += 2;↵
|
4 | } else {↵ | | 4 | } else {↵
|
5 | baseIndex += 1;↵ | | 5 | baseIndex += 1;↵
|
6 | }↵ | | 6 | }↵
|
7 | } | | 7 | }
|
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 different classes |
Number of node comparisons | 13 |
-
{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) | 1.5 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
35 | for (Class paramType : paramTypes) | | 70 | for (Class paramType : params) |
36 | if (paramType == double.class || paramType == long.class) | | 71 | if (paramType == double.class || paramType == long.class) |
37 | | | 72 | |
| | | | |
38 | | | 73 | |
Precondition Violations (0)
Row |
Violation |