Operand v1 = build(argsCatNode.getFirstNode(), s);
Operand v2 = build(argsCatNode.getSecondNode(), s);
return new CompoundArray(v1, v2);
Operand v1 = build(argsCatNode.getFirstNode(), s);
Operand v2 = build(argsCatNode.getSecondNode(), s);
args.add(new CompoundArray(v1, v2));
Clone fragments detected by clone detection tool
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 buildArgsCat(ArgsCatNode, IR_Scope)
|
|
Method name: void buildArgsCatArguments(List, ArgsCatNode, IR_Scope)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | Operand v1 = build(argsCatNode.getFirstNode(), s);↵ | | 1 | Operand v1 = build(argsCatNode.getFirstNode(), s);↵
|
2 | Operand v2 = build(argsCatNode.getSecondNode(), s);↵ | | 2 | Operand v2 = build(argsCatNode.getSecondNode(), s);↵
|
3 | return new CompoundArray(v1, v2); | | 3 | args.add(new CompoundArray(v1, v2));
|
See real code fragment |
|
See real code fragment |
Summary
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 | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | Operand v1 = build(argsCatNode.getFirstNode(), s); | | 1 | Operand v1 = build(argsCatNode.getFirstNode(), s); |
2 | Operand v2 = build(argsCatNode.getSecondNode(), s); | | 2 | Operand v2 = build(argsCatNode.getSecondNode(), s); |
| | | 3 | args.add(new CompoundArray(v1, v2)); |
3 | return new CompoundArray(v1, v2); | | | |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables v1, v2 , while Clone fragment #2 returns variables v1, v2 |