addToken(currentToken); currentToken = null; addToken(new RETokenStart(subIndex,((cflags & REG_MULTILINE) > 0) ? syntax.getLineSeparator() : null));
remove(bufferSwitcher); revalidate(); bufferSwitcher = null;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/gnu/regexp/RE.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/EditPane.java
Method name: void initialize(Object, int, RESyntax, int, int) Method name: void loadBufferSwitcher()
Number of AST nodes: 3 Number of AST nodes: 3
1
addToken(currentToken);
2
	currentToken = null;
3
	addToken(new RETokenStart(subIndex,((cflags & REG_MULTILINE) > 0) ? syntax.getLineSeparator() :
1
remove(bufferSwitcher);
2
			revalidate();
4
 null));
3
			bufferSwitcher = null;
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.0
Clones locationClones are in different classes
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                          
    11
    remove(bufferSwitcher);
    Preondition Violations
    Unmatched statement remove(bufferSwitcher); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    11
    remove(bufferSwitcher);
    187
    addToken(currentToken);
    187
    addToken(currentToken);
    12
    revalidate();
    Differences
    Expression1Expression2Difference
    addTokenrevalidateMETHOD_INVOCATION_NAME_MISMATCH
    addToken(currentToken)revalidate()ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression addToken(currentToken) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method addToken
    Expression addToken(currentToken) is a void method call, and thus it cannot be parameterized
    Expression revalidate() is a void method call, and thus it cannot be parameterized
    Expression addToken(currentToken) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method addToken
    Expression addToken(currentToken) is a void method call, and thus it cannot be parameterized
    Expression revalidate() is a void method call, and thus it cannot be parameterized
    12
    revalidate();
                                                    
    13
    bufferSwitcher = null;
    Preondition Violations
    Unmatched statement bufferSwitcher=null; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    13
    bufferSwitcher = null;
    188
    currentToken = null;
    188
    currentToken = null;
    Preondition Violations
    Unmatched statement currentToken=null; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                  
    189
    addToken(new RETokenStart(subIndex, ((cflags & REG_MULTILINE) > 0) ? syntax.getLineSeparator() : null));
    189
    addToken(new RETokenStart(subIndex, ((cflags & REG_MULTILINE) > 0) ? syntax.getLineSeparator() : null));
    Preondition Violations
    Unmatched statement addToken(new RETokenStart(subIndex,((cflags & REG_MULTILINE) > 0) ? syntax.getLineSeparator() : null)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                                                                                                                            
    Precondition Violations (11)
    Row Violation
    1Unmatched statement remove(bufferSwitcher); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Expression addToken(currentToken) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression addToken(currentToken) is a void method call, and thus it cannot be parameterized
    4Expression revalidate() is a void method call, and thus it cannot be parameterized
    5Expression addToken(currentToken) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression addToken(currentToken) is a void method call, and thus it cannot be parameterized
    7Expression revalidate() is a void method call, and thus it cannot be parameterized
    8Unmatched statement bufferSwitcher=null; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    9Unmatched statement currentToken=null; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    10Unmatched statement addToken(new RETokenStart(subIndex,((cflags & REG_MULTILINE) > 0) ? syntax.getLineSeparator() : null)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    11The refactoring of the clones is infeasible, because classes gnu.regexp.RE and org.gjt.sp.jedit.EditPane do not have a common superclass