File path: /jruby-1.4.0/src/org/jruby/compiler/impl/ChildScopedBodyCompiler.java | File path: /jruby-1.4.0/src/org/jruby/compiler/impl/ChildScopedBodyCompiler.java | |||
Method name: void issueBreakEvent(CompilerCallback)
|
Method name: void issueNextEvent(CompilerCallback)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 5 | |||
1 | if (currentLoopLabels != null) {↵ | 1 | if (currentLoopLabels != null) {↵ | |
2 | value.call(this);↵ | 2 | value.call(this);↵ | |
3 | issueLoopBreak();↵ | 3 | issueLoopNext();↵ | |
4 | } else {↵ | 4 | } else {↵ | |
5 | loadThreadContext();↵ | |||
6 | value.call(this);↵ | 5 | value.call(this);↵ | |
7 | invokeUtilityMethod("breakJump", sig(IRubyObject.class, ThreadContext.class, IRubyObject.class));↵ | 6 | invokeUtilityMethod("nextJump", sig(IRubyObject.class, IRubyObject.class));↵ | |
8 | } | 7 |
| |
See real code fragment | See real code fragment |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 30 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (currentLoopLabels != null) | 1 | if (currentLoopLabels != null) | |||||||||||||||
2 | value.call(this); | 2 | value.call(this); | |||||||||||||||
3 | issueLoopBreak(); |
| 3 | issueLoopNext(); | ||||||||||||||
else | else | |||||||||||||||||
4 | loadThreadContext(); | | ||||||||||||||||
5 | value.call(this); | 4 | value.call(this); | |||||||||||||||
6 | invokeUtilityMethod("breakJump", sig(IRubyObject.class, ThreadContext.class, IRubyObject.class)); |
| 5 | invokeUtilityMethod("nextJump", sig(IRubyObject.class, IRubyObject.class)); |
Row | Violation |
---|---|
1 | Expression issueLoopBreak() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression issueLoopNext() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression issueLoopBreak() is a void method call, and thus it cannot be parameterized |
4 | Expression issueLoopNext() is a void method call, and thus it cannot be parameterized |