MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "call", FAST_CALL_SIG, null, null);
mv.visitCode();
Label line = new Label();
mv.visitLineNumber(0, line);
mv.visitVarInsn(ALOAD, 1);
mv.visitTypeInsn(CHECKCAST, typePath);
return mv;
MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "call", FAST_CALL_SIG, null, null);
mv.visitCode();
Label line = new Label();
mv.visitLineNumber(0, line);
mv.visitVarInsn(ALOAD, 1);
mv.visitTypeInsn(CHECKCAST, IRUB);
return mv;
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/runtime/callback/InvocationCallbackFactory.java
|
|
File path: /jruby-1.4.0/src/org/jruby/runtime/callback/InvocationCallbackFactory.java
|
Method name: MethodVisitor startCallFast(ClassWriter)
|
|
Method name: MethodVisitor startCallSFast(ClassWriter)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "call", FAST_CALL_SIG, null, null);↵ | | 1 | MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "call", FAST_CALL_SIG, null, null);↵
|
2 | ↵ | | 2 | ↵
|
3 | mv.visitCode();↵ | | 3 | mv.visitCode();↵
|
4 | Label line = new Label();↵ | | 4 | Label line = new Label();↵
|
5 | mv.visitLineNumber(0, line);↵ | | 5 | mv.visitLineNumber(0, line);↵
|
6 | mv.visitVarInsn(ALOAD, 1);↵ | | 6 | mv.visitVarInsn(ALOAD, 1);↵
|
7 | mv.visitTypeInsn(CHECKCAST, typePath);↵ | | 7 | mv.visitTypeInsn(CHECKCAST, IRUB);↵
|
8 | return mv; | | 8 | return mv;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
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 | 37 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 7 |
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 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "call", FAST_CALL_SIG, null, null); | | 1 | MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "call", FAST_CALL_SIG, null, null); |
2 | mv.visitCode(); | | 2 | mv.visitCode(); |
3 | Label line = new Label(); | | 3 | Label line = new Label(); |
4 | mv.visitLineNumber(0, line); | | 4 | mv.visitLineNumber(0, line); |
5 | mv.visitVarInsn(ALOAD, 1); | | 5 | mv.visitVarInsn(ALOAD, 1); |
6 | mv.visitTypeInsn(CHECKCAST, typePath); | | 6 | mv.visitTypeInsn(CHECKCAST, IRUB); |
7 | return mv; | | 7 | return mv; |
Precondition Violations (0)
Row |
Violation |