addToken(currentToken); currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.ALNUM,insens,false); } // NON-ALPHANUMERIC OPERATOR // \W else if (unit.bk && (unit.ch == 'W') && syntax.get(RESyntax.RE_CHAR_CLASS_ESCAPES)) { addToken(currentToken); currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.ALNUM,insens,true);
addToken(currentToken); currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.DIGIT,insens,false); } // NON-DIGIT OPERATOR // \D else if (unit.bk && (unit.ch == 'D') && syntax.get(RESyntax.RE_CHAR_CLASS_ESCAPES)) { addToken(currentToken); currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.DIGIT,insens,true);
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/gnu/regexp/RE.java File path: /jEdit-4.2/src/gnu/regexp/RE.java
Method name: void initialize(Object, int, RESyntax, int, int) Method name: void initialize(Object, int, RESyntax, int, int)
Number of AST nodes: 4 Number of AST nodes: 4
1
addToken(currentToken);
1
addToken(currentToken);
2
	  currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.ALNUM,insens,false);
2
	currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.DIGIT,insens,false);
3
	}
4
	// NON-ALPHANUMERIC
3
      }
5
 OPERATOR
4
      // NON-DIGIT OPERATOR
6
        //  \W
5
      //  \D
7
	else if (unit.bk && (unit.ch == 'W') && syntax.get(RESyntax.RE_CHAR_CLASS_ESCAPES)) {
6
	else if (unit.bk && (unit.ch == 'D') && syntax.get(RESyntax.RE_CHAR_CLASS_ESCAPES)) {
8
	  addToken(currentToken);
7
	  addToken(currentToken);
9
	  currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.ALNUM,insens,true);
8
	  currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.DIGIT,insens,true);
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.0
Clones locationClones are in the same method
Number of node comparisons3
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    267
    addToken(currentToken);
    246
    addToken(currentToken);
    268
    currentToken = new RETokenPOSIX(subIndex, RETokenPOSIX.ALNUM, insens, false);
    268
    currentToken = new RETokenPOSIX(subIndex, RETokenPOSIX.ALNUM, insens, false);
    247
    currentToken = new RETokenPOSIX(subIndex, RETokenPOSIX.DIGIT, insens, false);
    Differences
    Expression1Expression2Difference
    ALNUMDIGITVARIABLE_NAME_MISMATCH
    247
    currentToken = new RETokenPOSIX(subIndex, RETokenPOSIX.DIGIT, insens, false);
    Precondition Violations (0)
    Row Violation