JavaProxyClass jpc = ((InternalJavaProxy) javaInvokee).___getProxyClass(); JavaProxyMethod jpm; if ((jpm = jpc.getMethod(method.getName(), parameterTypes)) != null && jpm.hasSuperImplementation()) { return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee); } else { return invokeDirectWithExceptionHandling(method, javaInvokee); }
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) 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);
4
            return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, args);
5
        } else {
5
        } else {
6
            return invokeDirectWithExceptionHandling(method, javaInvokee);
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.9
    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);
    4
    return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee);
    4
    return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, args);
    Differences
    Expression1Expression2Difference
    invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(),javaInvokee)invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(),javaInvokee,args)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(),javaInvokee) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method invokeDirectSuperWithExceptionHandling
    Expression invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(),javaInvokee,args) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method invokeDirectSuperWithExceptionHandling
    4
    return invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(), javaInvokee, args);
    else
    else
    5
    return invokeDirectWithExceptionHandling(method, javaInvokee);
    5
    return invokeDirectWithExceptionHandling(method, javaInvokee);
    5
    return invokeDirectWithExceptionHandling(method, javaInvokee, args);
    Differences
    Expression1Expression2Difference
    invokeDirectWithExceptionHandling(method,javaInvokee)invokeDirectWithExceptionHandling(method,javaInvokee,args)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression invokeDirectWithExceptionHandling(method,javaInvokee) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method invokeDirectWithExceptionHandling
    Expression invokeDirectWithExceptionHandling(method,javaInvokee,args) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method invokeDirectWithExceptionHandling
    5
    return invokeDirectWithExceptionHandling(method, javaInvokee, args);
    Precondition Violations (4)
    Row Violation
    1Expression invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(),javaInvokee) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression invokeDirectSuperWithExceptionHandling(jpm.getSuperMethod(),javaInvokee,args) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression invokeDirectWithExceptionHandling(method,javaInvokee) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression invokeDirectWithExceptionHandling(method,javaInvokee,args) cannot be parameterized, because it has dependencies to/from statements that will be extracted