File path: /jruby-1.4.0/src/org/jruby/compiler/ASTCompiler19.java | File path: /jruby-1.4.0/src/org/jruby/compiler/ASTCompiler.java | |||
Method name: void compileArgsPush(Node, BodyCompiler, boolean)
|
Method name: void compileMatch3(Node, BodyCompiler, boolean)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | ArgsPushNode argsPush = (ArgsPushNode) node;↵ | 1 | Match3Node matchNode = (Match3Node) node;↵ | |
2 | compile(argsPush.getFirstNode(), context,true);↵ | 2 | compile(matchNode.getReceiverNode(), context,true);↵ | |
3 | compile(argsPush.getSecondNode(), context,true);↵ | 3 | compile(matchNode.getValueNode(), context,true);↵ | |
4 | context.appendToArray();↵ | 4 | context.match3();↵ | |
5 | // TODO: don't require pop↵ | 5 | // TODO: don't require pop↵ | |
6 | if (!expr) context.consumeCurrentValue(); | 6 |
| |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 20 |
Number of mapped statements | 6 |
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) | 6.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | ArgsPushNode argsPush = (ArgsPushNode)node; |
| 1 | Match3Node matchNode = (Match3Node)node; | |||||||||||||||||||
2 | compile(argsPush.getFirstNode(), context, true); |
| 2 | compile(matchNode.getReceiverNode(), context, true); | |||||||||||||||||||
3 | compile(argsPush.getSecondNode(), context, true); |
| 3 | compile(matchNode.getValueNode(), context, true); | |||||||||||||||||||
4 | context.appendToArray(); |
| 4 | context.match3(); | |||||||||||||||||||
5 | if (!expr) | 5 | if (!expr) | ||||||||||||||||||||
6 | context.consumeCurrentValue(); | 6 | context.consumeCurrentValue(); |
Row | Violation |
---|---|
1 | Expression argsPush.getFirstNode() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression matchNode.getReceiverNode() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression argsPush.getSecondNode() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression matchNode.getValueNode() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression context.appendToArray() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression context.match3() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression context.appendToArray() is a void method call, and thus it cannot be parameterized |
8 | Expression context.match3() is a void method call, and thus it cannot be parameterized |