if (doit) {
CompilerCallback beginEndCallback = new CompilerCallback() {
public void call(BodyCompiler context) {
compile(dotNode.getBeginNode(), context, true);
compile(dotNode.getEndNode(), context, true);
}
};
context.createNewRange(beginEndCallback, dotNode.isExclusive());
}
CompilerCallback value = new CompilerCallback() {
public void call(BodyCompiler context) {
compile(localAsgnNode.getValueNode(), context,true);
}
};
context.getVariableCompiler().assignLocalVariable(localAsgnNode.getIndex(), localAsgnNode.getDepth(), value, expr);
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/ASTCompiler.java
|
Method name: void compileDot(Node, BodyCompiler, boolean)
|
|
Method name: void compileLocalAsgn(Node, BodyCompiler, boolean)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 2
|
|
1 | if (doit) {↵ | | |
|
2 | CompilerCallback beginEndCallback = new CompilerCallback() {↵ | | 1 | CompilerCallback value = new CompilerCallback() {↵
|
3 | public void call(BodyCompiler context) {↵ | | 2 | public void call(BodyCompiler context) {↵
|
4 | compile(dotNode.getBeginNode(), context, true);↵ | | 3 | compile(↵
|
5 | compile(dotNode.getEndNode(), context, true);↵ | | 4 | localAsgnNode.getValueNode(), context,true);↵
|
6 | }↵ | | 5 | }↵
|
7 | };↵ | | 6 | };↵
|
|
8 | context.createNewRange(beginEndCallback, dotNode.isExclusive());↵ | | 7 | context.↵
|
9 | } | | 8 | getVariableCompiler().assignLocalVariable(localAsgnNode.getIndex(), localAsgnNode.getDepth(), value, expr);
|
See real code fragment |
|
See real code fragment |
Summary
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 4 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 0 |
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) | 0.0 |
Clone type | Unknown type |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
Precondition Violations (0)
Row |
Violation |