if (isStatic) args--; if (hasContext) args--; if (hasBlock) args--; // minus one more for IRubyObject[] args--; // TODO: confirm expected args are IRubyObject (or similar) actualRequired = args;
if (isStatic) args--; if (hasContext) args--; if (hasBlock) args--; // TODO: confirm expected args are IRubyObject (or similar) actualRequired = args;
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/anno/JavaMethodDescriptor.java File path: /jruby-1.4.0/src/org/jruby/anno/JavaMethodDescriptor.java
Method name: void JavaMethodDescriptor(Method) Method name: void JavaMethodDescriptor(Method)
Number of AST nodes: 8 Number of AST nodes: 7
1
if (isStatic) args--;
1
if (isStatic) args--;
2
                if (hasContext) args--;
2
                if (hasContext) args--;
3
                if (hasBlock) args--;
3
                if (hasBlock) args--;
4
                // minus one more for IRubyObject[]
5
                args--;
6
                // TODO: confirm expected args are IRubyObject (or similar)
4
                // TODO: confirm expected args are IRubyObject (or similar)
7
                actualRequired = args;
5
                actualRequired = args;
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.3
Clones locationClones are in the same method
Number of node comparisons29
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    43
    if (isStatic)
    33
    if (isStatic)
    44
    args--;
    34
    args--;
    45
    if (hasContext)
    35
    if (hasContext)
    46
    args--;
    36
    args--;
    47
    if (hasBlock)
    37
    if (hasBlock)
    48
    args--;
    38
    args--;
    49
    args--;
    49
    args--;
    Preondition Violations
    Unmatched statement args--; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                          
    50
    actualRequired = args;
    39
    actualRequired = args;
    Precondition Violations (2)
    Row Violation
    1Unmatched statement args--; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Clone fragment #1 returns variables args , while Clone fragment #2 returns variables