MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "call", CALL_SIG, null, null); mv.visitCode(); Label line = new Label(); mv.visitLineNumber(0, line); mv.visitVarInsn(ALOAD, 1); checkCast(mv, IRubyObject.class); 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 startCallS(ClassWriter) Method name: MethodVisitor startCallSFast(ClassWriter)
Number of AST nodes: 7 Number of AST nodes: 7
1
MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "call", 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
        checkCast(mv, IRubyObject.class);
7
        mv.visitTypeInsn(CHECKCAST, IRUB);
8
        return mv;
8
        return mv;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons37
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "call", CALL_SIG, null, null);
    1
    MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "call", CALL_SIG, null, null);
    1
    MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "call", FAST_CALL_SIG, null, null);
    Differences
    Expression1Expression2Difference
    CALL_SIGFAST_CALL_SIGVARIABLE_NAME_MISMATCH
    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, IRUB);
    6
    checkCast(mv, IRubyObject.class);
                                                                          
    7
    return mv;
    7
    return mv;
    Precondition Violations (0)
    Row Violation