for (Map.Entry<String, NamedInstaller> entry : staticCallbacks.entrySet()) {
if (entry.getValue().type == NamedInstaller.STATIC_METHOD && entry.getValue().hasLocalMethod()) {
assignAliases((MethodInstaller)entry.getValue(), staticNames);
}
}
for (Map.Entry<String, NamedInstaller> entry : staticCallbacks.entrySet()) {
if (entry.getValue().type == NamedInstaller.STATIC_METHOD && entry.getValue().hasLocalMethod()) {
assignAliases((MethodInstaller) entry.getValue(), staticNames);
}
}
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/javasupport/JavaClass.java
|
|
File path: /jruby-1.4.0/src/org/jruby/javasupport/JavaClass.java
|
Method name: void initializeInterface(Class>)
|
|
Method name: void setupClassMethods(Class>, Map, Map, Map, Map)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | for (Map.Entry<String, NamedInstaller> entry : staticCallbacks.entrySet()) {↵ | | 1 | for (Map.Entry<String, NamedInstaller> entry : staticCallbacks.entrySet()) {↵
|
2 | if (entry.getValue().type == NamedInstaller.STATIC_METHOD && entry.getValue().hasLocalMethod()) {↵ | | 2 | if (entry.getValue().type == NamedInstaller.STATIC_METHOD && entry.getValue().hasLocalMethod()) {↵
|
3 | assignAliases((MethodInstaller)entry.getValue(), staticNames);↵ | | 3 | assignAliases((MethodInstaller) entry.getValue(), staticNames);↵
|
4 | }↵ | | 4 | }↵
|
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.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 5 |
-
{Refactorable}
Mapping Summary
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) | 8.3 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
14 | for (Map.Entry<String, NamedInstaller> entry : staticCallbacks.entrySet()) | | 28 | for (Map.Entry<String, NamedInstaller> entry : staticCallbacks.entrySet()) |
15 | if (entry.getValue().type == NamedInstaller.STATIC_METHOD && entry.getValue().hasLocalMethod()) | | 29 | if (entry.getValue().type == NamedInstaller.STATIC_METHOD && entry.getValue().hasLocalMethod()) |
16 | assignAliases((MethodInstaller)entry.getValue(), staticNames); | | 30 | assignAliases((MethodInstaller)entry.getValue(), staticNames); |
Precondition Violations (0)
Row |
Violation |