File path: /jruby-1.4.0/src/org/jruby/compiler/ir/IR_Builder.java | File path: /jruby-1.4.0/src/org/jruby/compiler/ir/IR_Builder.java | |||
Method name: Operand buildMatch3(Match3Node, IR_Scope)
|
Method name: Operand buildMatch2(Match2Node, IR_Scope)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | Variable ret = m.getNewVariable();↵ | 1 | Variable ret = m.getNewVariable();↵ | |
2 | Operand receiver = build(matchNode.getReceiverNode(), m);↵ | 2 | Operand receiver = build(matchNode.getReceiverNode(), m);↵ | |
3 | Operand value = build(matchNode.getValueNode(), m);↵ | 3 | Operand value = build(matchNode.getValueNode(), m);↵ | |
4 | m.addInstr(new JRUBY_IMPL_CALL_Instr(ret, MethAddr.MATCH3, new Operand[]{receiver, value}));↵ | 4 | m.addInstr(new JRUBY_IMPL_CALL_Instr(ret, MethAddr.MATCH2, new Operand[]{receiver, value}));↵ | |
5 | return ret; | 5 |
| |
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 25 |
Number of mapped statements | 5 |
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) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Variable ret = m.getNewVariable(); | 1 | Variable ret = m.getNewVariable(); | ||||||||||||
2 | Operand receiver = build(matchNode.getReceiverNode(), m); |
| 2 | Operand receiver = build(matchNode.getReceiverNode(), m); | |||||||||||
3 | Operand value = build(matchNode.getValueNode(), m); |
| 3 | Operand value = build(matchNode.getValueNode(), m); | |||||||||||
4 | m.addInstr(new JRUBY_IMPL_CALL_Instr(ret, MethAddr.MATCH3, new Operand[] {receiver, value})); |
| 4 | m.addInstr(new JRUBY_IMPL_CALL_Instr(ret, MethAddr.MATCH2, new Operand[] {receiver, value})); | |||||||||||
5 | return ret; | 5 | return ret; |
Row | Violation |
---|---|
1 | Expression matchNode cannot be unified with expression matchNode , because common superclass org.jruby.ast.Node does not declare member(s) public org.jruby.ast.Node getReceiverNode() |
2 | Expression matchNode cannot be unified with expression matchNode , because common superclass org.jruby.ast.Node does not declare member(s) public org.jruby.ast.Node getValueNode() |