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 compileYield(Node, BodyCompiler, boolean)
|
Method name: void compileArgs(Node, BodyCompiler, boolean)
|
|||
Number of AST nodes: 2 | Number of AST nodes: 2 | |||
1 | if (yieldNode.getArgsNode() != null) {↵ | 1 | if (argsNode.getBlock() != null) {↵ | |
2 | argsCallback2 = new CompilerCallback() {↵ | 2 | blockAssignment = new CompilerCallback() {↵ | |
3 | public void call(BodyCompiler context) {↵ | 3 | public void call(BodyCompiler context) {↵ | |
4 | compile(yieldNode.getArgsNode(), context,true);↵ | 4 | ↵ | |
5 | context.getVariableCompiler().assignLocalVariable(argsNode.getBlock().getCount(), false);↵ | |||
5 | }↵ | 6 | }↵ | |
6 | };↵ | 7 | ↵ | |
7 | ↵ | 8 | };↵ | |
8 | } | 9 |
| |
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 | 4 |
Number of mapped statements | 2 |
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) | 1.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8 | if (yieldNode.getArgsNode() != null) |
| 17 | if (argsNode.getBlock() != null) | |||||||||||||||||||||||||
9 | argsCallback2 = new CompilerCallback() {...}; |
| 18 | blockAssignment = new CompilerCallback() {...}; |
Row | Violation |
---|---|
1 | Expression compile(yieldNode.getArgsNode(),context,true) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression compile(yieldNode.getArgsNode(),context,true) is a void method call, and thus it cannot be parameterized |
3 | Expression context.getVariableCompiler().assignLocalVariable(argsNode.getBlock().getCount(),false) is a void method call, and thus it cannot be parameterized |
4 | Expression compile(yieldNode.getArgsNode(),context,true) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression compile(yieldNode.getArgsNode(),context,true) is a void method call, and thus it cannot be parameterized |
6 | Expression context.getVariableCompiler().assignLocalVariable(argsNode.getBlock().getCount(),false) is a void method call, and thus it cannot be parameterized |