if(positions.size() == 0) return; /* get all positions from offset to the end, inclusive */ Iterator iter = positions.tailMap(new PosBottomHalf(offset)) .keySet().iterator(); iteration = true;
if(positions.size() == 0) return; /* get all positions from offset to the end, inclusive */ Iterator iter = positions.tailMap(new PosBottomHalf(offset)) .keySet().iterator(); iteration = true;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/buffer/PositionManager.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/buffer/PositionManager.java
Method name: void contentInserted(int, int) Method name: void contentRemoved(int, int)
Number of AST nodes: 4 Number of AST nodes: 4
1
if(positions.size() == 0)
1
if(positions.size() == 0)
2
			return;
2
			return;
3
		/* get all positions from offset to the end, inclusive */
3
		/* get all positions from offset to the end, inclusive */
4
		Iterator iter = positions.tailMap(new PosBottomHalf(offset))
4
		Iterator iter = positions.tailMap(new PosBottomHalf(offset))
5
			.keySet().iterator();
5
			.keySet().iterator();
6
		iteration = true;
6
		iteration = true;
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 comparisons7
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    if (positions.size() == 0)
    1
    if (positions.size() == 0)
    2
    return;
    2
    return;
    2
    return;
    Preondition Violations
    Conditional return;
    Conditional return;
    2
    return;
    3
    Iterator iter = positions.tailMap(new PosBottomHalf(offset)).keySet().iterator();
    3
    Iterator iter = positions.tailMap(new PosBottomHalf(offset)).keySet().iterator();
    4
    iteration = true;
    4
    iteration = true;
    Precondition Violations (2)
    Row Violation
    1Conditional return;
    2Conditional return;