if(gapWidth != 0) { if(Debug.OFFSET_DEBUG && gapLine != lineCount) Log.log(Log.DEBUG,this,method + ": update from " + gapLine + " to " + lineCount + " width " + gapWidth); for(int i = gapLine; i < lineCount; i++) setLineEndOffset(i,getLineEndOffset(i)); }
if(gapWidth != 0) { if(Debug.OFFSET_DEBUG && gapLine != newGapLine) Log.log(Log.DEBUG,this,method + ": update from " + gapLine + " to " + newGapLine + " width " + gapWidth); for(int i = gapLine; i < newGapLine; i++) setLineEndOffset(i,getLineEndOffset(i)); }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/buffer/LineManager.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/buffer/LineManager.java
Method name: void moveGap(int, int, String) Method name: void moveGap(int, int, String)
Number of AST nodes: 5 Number of AST nodes: 5
1
if(gapWidth != 0)
1
if(gapWidth != 0)
2
			{
2
			{
3
				if(Debug.OFFSET_DEBUG && gapLine != lineCount)
3
				if(Debug.OFFSET_DEBUG && gapLine != newGapLine)
4
					Log.log(Log.DEBUG,this,method + ": update from " + gapLine + " to " + lineCount + " width " + gapWidth);
4
					Log.log(Log.DEBUG,this,method + ": update from " + gapLine + " to " + newGapLine + " width " + gapWidth);
5
				for(int i = gapLine; i < lineCount; i++)
5
				for(int i = gapLine; i < newGapLine; i++)
6
					setLineEndOffset(i,getLineEndOffset(i));
6
					setLineEndOffset(i,getLineEndOffset(i));
7
			}
7
			}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.4
Clones locationClones are in the same method
Number of node comparisons14
  1. {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.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    4
    if (gapWidth != 0)
    17
    if (gapWidth != 0)
    5
    if (Debug.OFFSET_DEBUG && gapLine != lineCount)
    5
    if (Debug.OFFSET_DEBUG && gapLine != lineCount)
    18
    if (Debug.OFFSET_DEBUG && gapLine != newGapLine)
    Differences
    Expression1Expression2Difference
    lineCountnewGapLineVARIABLE_NAME_MISMATCH
    18
    if (Debug.OFFSET_DEBUG && gapLine != newGapLine)
    6
    Log.log(Log.DEBUG, this, method + ": update from " + gapLine + " to " + lineCount + " width " + gapWidth);
    6
    Log.log(Log.DEBUG, this, method + ": update from " + gapLine + " to " + lineCount + " width " + gapWidth);
    19
    Log.log(Log.DEBUG, this, method + ": update from " + gapLine + " to " + newGapLine + " width " + gapWidth);
    Differences
    Expression1Expression2Difference
    lineCountnewGapLineVARIABLE_NAME_MISMATCH
    19
    Log.log(Log.DEBUG, this, method + ": update from " + gapLine + " to " + newGapLine + " width " + gapWidth);
    7
    for (int i = gapLine; i < lineCount; i++)
    7
    for (int i = gapLine; i < lineCount; i++)
    20
    for (int i = gapLine; i < newGapLine; i++)
    Differences
    Expression1Expression2Difference
    lineCountnewGapLineVARIABLE_NAME_MISMATCH
    20
    for (int i = gapLine; i < newGapLine; i++)
    8
    setLineEndOffset(i, getLineEndOffset(i));
    21
    setLineEndOffset(i, getLineEndOffset(i));
    Precondition Violations (0)
    Row Violation