if (expr) {
context.loadNil();
context.pollThreadEvents();
}
if (expr) {
method.dup();
}
method.astore(baseVariableIndex + index);
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/compiler/ASTCompiler.java
|
|
File path: /jruby-1.4.0/src/org/jruby/compiler/impl/StackBasedVariableCompiler.java
|
Method name: void compileNil(Node, BodyCompiler, boolean)
|
|
Method name: void assignLocalVariable(int, boolean)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (expr) {↵ | | 1 | if (expr) {↵
|
2 | context.loadNil();↵ | | 2 | method.dup();↵
|
3 | ↵ | | 3 | }↵
|
|
4 | context.pollThreadEvents();↵ | | 4 | ↵
|
5 | } | | 5 | method.astore(baseVariableIndex + index);
|
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 6 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.5 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | if (expr) | | 1 | if (expr) |
| | | 2 | |
3 | | | | |
4 | context.pollThreadEvents(); | | | |
| | | 3 | method.astore(baseVariableIndex + index); |
Precondition Violations (0)
Row |
Violation |