if (currentToken == null) throw new REException(getLocalizedMessage("repeat.no.token"),REException.REG_BADRPT,index); if (currentToken instanceof RETokenRepeated) throw new REException(getLocalizedMessage("repeat.chained"),REException.REG_BADRPT,index); if (currentToken instanceof RETokenWordBoundary || currentToken instanceof RETokenWordBoundary) throw new REException(getLocalizedMessage("repeat.assertion"),REException.REG_BADRPT,index); if (currentToken.getMinimumLength() == 0) throw new REException(getLocalizedMessage("repeat.empty.token"),REException.REG_BADRPT,index); currentToken = setRepeated(currentToken,0,Integer.MAX_VALUE,index);
if (currentToken == null) throw new REException(getLocalizedMessage("repeat.no.token"),REException.REG_BADRPT,index); if (currentToken instanceof RETokenRepeated) throw new REException(getLocalizedMessage("repeat.chained"),REException.REG_BADRPT,index); if (currentToken instanceof RETokenWordBoundary || currentToken instanceof RETokenWordBoundary) throw new REException(getLocalizedMessage("repeat.assertion"),REException.REG_BADRPT,index); if (currentToken.getMinimumLength() == 0) throw new REException(getLocalizedMessage("repeat.empty.token"),REException.REG_BADRPT,index); currentToken = setRepeated(currentToken,1,Integer.MAX_VALUE,index);
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: 9 Number of AST nodes: 9
1
if (currentToken == null)
1
if (currentToken == null)
2
          throw new REException(getLocalizedMessage("repeat.no.token"),REException.REG_BADRPT,index);
2
          throw new REException(getLocalizedMessage("repeat.no.token"),REException.REG_BADRPT,index);
3
	if (currentToken instanceof RETokenRepeated)
3
	if (currentToken instanceof RETokenRepeated)
4
          throw new REException(getLocalizedMessage("repeat.chained"),REException.REG_BADRPT,index);
4
          throw new REException(getLocalizedMessage("repeat.chained"),REException.REG_BADRPT,index);
5
	if (currentToken instanceof RETokenWordBoundary || currentToken instanceof RETokenWordBoundary)
5
	if (currentToken instanceof RETokenWordBoundary || currentToken instanceof RETokenWordBoundary)
6
	  throw new REException(getLocalizedMessage("repeat.assertion"),REException.REG_BADRPT,index);
6
	  throw new REException(getLocalizedMessage("repeat.assertion"),REException.REG_BADRPT,index);
7
	if (currentToken.getMinimumLength() == 0)
7
	if (currentToken.getMinimumLength() == 0)
8
	  throw new REException(getLocalizedMessage("repeat.empty.token"),REException.REG_BADRPT,index);
8
	  throw new REException(getLocalizedMessage("repeat.empty.token"),REException.REG_BADRPT,index);
9
	currentToken = setRepeated(currentToken,0,Integer.MAX_VALUE,index);
9
	currentToken = setRepeated(currentToken,1,Integer.MAX_VALUE,index);
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)1.8
Clones locationClones are in the same method
Number of node comparisons31
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements9
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)78.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    198
    if (currentToken == null)
    208
    if (currentToken == null)
    199
    throw new REException(getLocalizedMessage("repeat.no.token"), REException.REG_BADRPT, index);
    209
    throw new REException(getLocalizedMessage("repeat.no.token"), REException.REG_BADRPT, index);
    200
    if (currentToken instanceof RETokenRepeated)
    210
    if (currentToken instanceof RETokenRepeated)
    201
    throw new REException(getLocalizedMessage("repeat.chained"), REException.REG_BADRPT, index);
    211
    throw new REException(getLocalizedMessage("repeat.chained"), REException.REG_BADRPT, index);
    202
    if (currentToken instanceof RETokenWordBoundary || currentToken instanceof RETokenWordBoundary)
    212
    if (currentToken instanceof RETokenWordBoundary || currentToken instanceof RETokenWordBoundary)
    203
    throw new REException(getLocalizedMessage("repeat.assertion"), REException.REG_BADRPT, index);
    213
    throw new REException(getLocalizedMessage("repeat.assertion"), REException.REG_BADRPT, index);
    204
    if (currentToken.getMinimumLength() == 0)
    214
    if (currentToken.getMinimumLength() == 0)
    205
    throw new REException(getLocalizedMessage("repeat.empty.token"), REException.REG_BADRPT, index);
    215
    throw new REException(getLocalizedMessage("repeat.empty.token"), REException.REG_BADRPT, index);
    206
    currentToken = setRepeated(currentToken, 0, Integer.MAX_VALUE, index);
    206
    currentToken = setRepeated(currentToken, 0, Integer.MAX_VALUE, index);
    216
    currentToken = setRepeated(currentToken, 1, Integer.MAX_VALUE, index);
    Differences
    Expression1Expression2Difference
    01LITERAL_VALUE_MISMATCH
    216
    currentToken = setRepeated(currentToken, 1, Integer.MAX_VALUE, index);
    Precondition Violations (0)
    Row Violation