JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass(); JavaProxyMethod jpm; if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) { return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, arg0); } else { return invokeDirectWithExceptionHandling(method, javaInvokee, arg0); }
JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass(); JavaProxyMethod jpm; if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) { return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, args); } else { return invokeDirectWithExceptionHandling(method, javaInvokee, args); }
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/javasupport/JavaMethod.java File path: /jruby-1.4.0/src/org/jruby/javasupport/JavaMethod.java
Method name: IRubyObject tryProxyInvocation(Object, Object) Method name: IRubyObject tryProxyInvocation(Object, Object[])
Number of AST nodes: 5 Number of AST nodes: 5
1
JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass();
1
JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass();
2
        JavaProxyMethod jpm;
2
        JavaProxyMethod jpm;
3
        if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) {
3
        if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) {
4
            return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, arg0);
4
            return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, args);
5
        } else {
5
        } else {
6
            return invokeDirectWithExceptionHandling(method, javaInvokee, arg0);
6
            return invokeDirectWithExceptionHandling(method, javaInvokee, args);
7
        }
7
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.5
Clones locationClones are declared in the same class
Number of node comparisons13
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    JavaProxyClass jpc = ((InternalJavaProxy)javaInvokee).___getProxyClass();
    1
    JavaProxyClass jpc = ((InternalJavaProxy)javaInvokee).___getProxyClass();
    2
    JavaProxyMethod jpm;
    2
    JavaProxyMethod jpm;
    3
    if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation())
    3
    if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation())
    4
    return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, arg0);
    4
    return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, arg0);
    4
    return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, args);
    Differences
    Expression1Expression2Difference
    arg0argsVARIABLE_NAME_MISMATCH
    java.lang.Objectjava.lang.Object[]VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.Object of variable arg0 does not match with type java.lang.Object[] of variable args
    • Make classes java.lang.Object and java.lang.Object[] extend a common superclass
    4
    return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, args);
    else
    else
    5
    return invokeDirectWithExceptionHandling(method, javaInvokee, arg0);
    5
    return invokeDirectWithExceptionHandling(method, javaInvokee, arg0);
    5
    return invokeDirectWithExceptionHandling(method, javaInvokee, args);
    Differences
    Expression1Expression2Difference
    arg0argsVARIABLE_NAME_MISMATCH
    java.lang.Objectjava.lang.Object[]VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.Object of variable arg0 does not match with type java.lang.Object[] of variable args
    • Make classes java.lang.Object and java.lang.Object[] extend a common superclass
    5
    return invokeDirectWithExceptionHandling(method, javaInvokee, args);
    Precondition Violations (2)
    Row Violation
    1Type java.lang.Object of variable arg0 does not match with type java.lang.Object[] of variable args
    2Type java.lang.Object of variable arg0 does not match with type java.lang.Object[] of variable args