compile(flipNode.getEndNode(), context,true);
context.performBooleanBranch(new BranchCallback() {
public void branch(BodyCompiler context) {
context.loadFalse();
context.getVariableCompiler().assignLocalVariable(flipNode.getIndex(), flipNode.getDepth(), false);
}
}, new BranchCallback() {
public void branch(BodyCompiler context) {
}
});
context.loadTrue();
compile(flipNode.getEndNode(), context,true);
context.performBooleanBranch(new BranchCallback() {
public void branch(BodyCompiler context) {
context.loadFalse();
context.getVariableCompiler().assignLocalVariable(flipNode.getIndex(), flipNode.getDepth(), false);
}
}, new BranchCallback() {
public void branch(BodyCompiler context) {
}
});
context.loadTrue();
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 branch(BodyCompiler)
|
|
Method name: void branch(BodyCompiler)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | compile(flipNode.getEndNode(), context,true);↵ | | 1 | compile(flipNode.getEndNode(), context,true);↵
|
2 | context.performBooleanBranch(new BranchCallback() {↵ | | 2 | context.performBooleanBranch(new BranchCallback() {↵
|
|
3 | public void branch(BodyCompiler context) {↵ | | 3 | public void branch(BodyCompiler context) {↵
|
4 | context.loadFalse();↵ | | 4 | context.loadFalse();↵
|
5 | context.getVariableCompiler().assignLocalVariable(flipNode.getIndex(), flipNode.getDepth(), false);↵ | | 5 | context.getVariableCompiler().assignLocalVariable(flipNode.getIndex(), flipNode.getDepth(), false);↵
|
6 | }↵ | | 6 | }↵
|
7 | }, new BranchCallback() {↵ | | 7 | }, new BranchCallback() {↵
|
|
8 | public void branch(BodyCompiler context) {↵ | | 8 | public void branch(BodyCompiler context) {↵
|
9 | }↵ | | 9 | }↵
|
10 | });↵ | | 10 | });↵
|
11 | context.loadTrue(); | | 11 | context.loadTrue();
|
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.0 |
Clones location | Clones are in the same java file |
Number of node comparisons | 9 |
-
{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) | 0.0 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | compile(flipNode.getEndNode(), context, true); | | 1 | compile(flipNode.getEndNode(), context, true); |
2 | context.performBooleanBranch(new BranchCallback() {...}, new BranchCallback() {...}); | | 2 | context.performBooleanBranch(new BranchCallback() {...}, new BranchCallback() {...}); |
3 | context.loadTrue(); | | 3 | context.loadTrue(); |
Precondition Violations (0)
Row |
Violation |