int size = stackSize + SIZE[opcode]; if (size > maxStackSize) { maxStackSize = size; } stackSize = size;
if (computeMaxs) { // updates max locals only (no stack change) int n = var + 1; if (n > maxLocals) { maxLocals = n; } }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/objectweb/asm/CodeWriter.java File path: /jEdit-4.2/src/org/objectweb/asm/CodeWriter.java
Method name: void visitVarInsn(int, int) Method name: void visitIincInsn(int, int)
Number of AST nodes: 4 Number of AST nodes: 4
1
int size = stackSize + SIZE[opcode];
1
i
2
  
2
f (computeMaxs) {
3
      // updates max locals only (no stack change)
4
      int n = var + 1;
3
      if (size > maxStackSize) {
5
      if (n > maxLocals) {
4
          maxStackSize = size;
6
        max
5
  
7
Locals = n;
6
      }
8
      }
7
        stackSize = size;
9
    }
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.2
Clones locationClones are declared in the same class
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    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
    6
    int size = stackSize + SIZE[opcode];
    6
    int size = stackSize + SIZE[opcode];
    2
    int n = var + 1;
    Differences
    Expression1Expression2Difference
    sizenVARIABLE_NAME_MISMATCH
    stackSizevarVARIABLE_NAME_MISMATCH
    SIZE[opcode]1TYPE_COMPATIBLE_REPLACEMENT
    2
    int n = var + 1;
    7
    if (size > maxStackSize)
    7
    if (size > maxStackSize)
    3
    if (n > maxLocals)
    Differences
    Expression1Expression2Difference
    sizenVARIABLE_NAME_MISMATCH
    maxStackSizemaxLocalsVARIABLE_NAME_MISMATCH
    3
    if (n > maxLocals)
    8
    maxStackSize = size;
    8
    maxStackSize = size;
    4
    maxLocals = n;
    Differences
    Expression1Expression2Difference
    maxStackSizemaxLocalsVARIABLE_NAME_MISMATCH
    sizenVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression maxStackSize is a field being modified, and thus it cannot be parameterized
    Expression maxLocals is a field being modified, and thus it cannot be parameterized
    4
    maxLocals = n;
    9
    stackSize = size;
                                        
    Precondition Violations (3)
    Row Violation
    1Expression maxStackSize is a field being modified, and thus it cannot be parameterized
    2Expression maxLocals is a field being modified, and thus it cannot be parameterized
    3Clone fragment #1 returns variables size , while Clone fragment #2 returns variables