if (currentLoopLabels != null) {
value.call(this);
issueLoopNext();
} else if (inNestedMethod) {
value.call(this);
invokeUtilityMethod("nextJump", sig(IRubyObject.class, IRubyObject.class));
} else {
// in method body with no containing loop, issue jump error
// load runtime and value, issue jump error
loadRuntime();
value.call(this);
invokeUtilityMethod("nextLocalJumpError", sig(IRubyObject.class, Ruby.class, IRubyObject.class));
}
if (currentLoopLabels != null) {
value.call(this);
issueLoopNext();
} else if (inNestedMethod) {
value.call(this);
invokeUtilityMethod("nextJump", sig(IRubyObject.class, IRubyObject.class));
} else {
// in method body with no containing loop, issue jump error
// load runtime and value, issue jump error
loadRuntime();
value.call(this);
invokeUtilityMethod("nextLocalJumpError", sig(IRubyObject.class, Ruby.class, IRubyObject.class));
}
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/compiler/impl/RootScopedBodyCompiler.java
|
|
File path: /jruby-1.4.0/src/org/jruby/compiler/impl/MethodBodyCompiler.java
|
Method name: void issueNextEvent(CompilerCallback)
|
|
Method name: void issueNextEvent(CompilerCallback)
|
Number of AST nodes: 9
|
|
Number of AST nodes: 9
|
|
1 | if (currentLoopLabels != null) {↵ | | 1 | if (currentLoopLabels != null) {↵
|
2 | value.call(this);↵ | | 2 | value.call(this);↵
|
3 | issueLoopNext();↵ | | 3 | issueLoopNext();↵
|
4 | } else if (inNestedMethod) {↵ | | 4 | } else if (inNestedMethod) {↵
|
5 | value.call(this);↵ | | 5 | value.call(this);↵
|
6 | invokeUtilityMethod("nextJump", sig(IRubyObject.class, IRubyObject.class));↵ | | 6 | invokeUtilityMethod("nextJump", sig(IRubyObject.class, IRubyObject.class));↵
|
7 | } else {↵ | | 7 | } else {↵
|
8 | // in method body with no containing loop, issue jump error↵ | | 8 | // in method body with no containing loop, issue jump error↵
|
9 | // load runtime and value, issue jump error↵ | | 9 | // load runtime and value, issue jump error↵
|
10 | loadRuntime();↵ | | 10 | loadRuntime();↵
|
11 | value.call(this);↵ | | 11 | value.call(this);↵
|
12 | invokeUtilityMethod("nextLocalJumpError", sig(IRubyObject.class, Ruby.class, IRubyObject.class));↵ | | 12 | invokeUtilityMethod("nextLocalJumpError", sig(IRubyObject.class, Ruby.class, IRubyObject.class));↵
|
13 | } | | 13 | }
|
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 64 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 9 |
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) | 3.2 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (currentLoopLabels != null) | | 1 | if (currentLoopLabels != null) |
2 | | | 2 | |
3 | | | 3 | |
4 | | | 4 | |
5 | | | 5 | |
6 | invokeUtilityMethod("nextJump", sig(IRubyObject.class, IRubyObject.class)); | | 6 | invokeUtilityMethod("nextJump", sig(IRubyObject.class, IRubyObject.class)); |
| | | | |
7 | | | 7 | |
8 | | | 8 | |
9 | invokeUtilityMethod("nextLocalJumpError", sig(IRubyObject.class, Ruby.class, IRubyObject.class)); | | 9 | invokeUtilityMethod("nextLocalJumpError", sig(IRubyObject.class, Ruby.class, IRubyObject.class)); |
Precondition Violations (0)
Row |
Violation |