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 compileSplatArguments(Node, BodyCompiler, boolean)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | ArgsPushNode argsPush = (ArgsPushNode) node;↵ | 1 | SplatNode splatNode = (SplatNode) node;↵ | |
2 | compile(argsPush.getFirstNode(), context,true);↵ | 2 | compile(splatNode.getValue(), context,true);↵ | |
3 | compile(argsPush.getSecondNode(), context,true);↵ | 3 | context.splatCurrentValue();↵ | |
4 | context.appendToArray();↵ | 4 | context.convertToJavaArray();↵ | |
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) | 97.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | ArgsPushNode argsPush = (ArgsPushNode)node; |
| 1 | SplatNode splatNode = (SplatNode)node; | ||||||||||||||||||||||||
2 | compile(argsPush.getFirstNode(), context, true); |
| 3 | context.splatCurrentValue(); | ||||||||||||||||||||||||
3 | compile(argsPush.getSecondNode(), context, true); |
| 2 | compile(splatNode.getValue(), context, true); | ||||||||||||||||||||||||
4 | context.appendToArray(); |
| 4 | context.convertToJavaArray(); | ||||||||||||||||||||||||
5 | if (!expr) | 5 | if (!expr) | |||||||||||||||||||||||||
6 | context.consumeCurrentValue(); | 6 | context.consumeCurrentValue(); |
Row | Violation |
---|---|
1 | Expression compile(argsPush.getFirstNode(),context,true) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression context.splatCurrentValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression compile(argsPush.getFirstNode(),context,true) is a void method call, and thus it cannot be parameterized |
4 | Expression context.splatCurrentValue() is a void method call, and thus it cannot be parameterized |
5 | Expression compile(argsPush.getFirstNode(),context,true) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression context.splatCurrentValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression compile(argsPush.getFirstNode(),context,true) is a void method call, and thus it cannot be parameterized |
8 | Expression context.splatCurrentValue() is a void method call, and thus it cannot be parameterized |
9 | Expression argsPush.getSecondNode() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression splatNode.getValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression context.appendToArray() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression context.convertToJavaArray() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression context.appendToArray() is a void method call, and thus it cannot be parameterized |
14 | Expression context.convertToJavaArray() is a void method call, and thus it cannot be parameterized |