addToken(currentToken);
currentToken = new RETokenChar(subIndex,'\r',false);
}
// WHITESPACE OPERATOR
// \s if RE_CHAR_CLASS_ESCAPES is set
else if (unit.bk && (unit.ch == 's') && syntax.get(RESyntax.RE_CHAR_CLASS_ESCAPES)) {
addToken(currentToken);
currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.SPACE,insens,false);
}
// NON-WHITESPACE OPERATOR
// \S
else if (unit.bk && (unit.ch == 'S') && syntax.get(RESyntax.RE_CHAR_CLASS_ESCAPES)) {
addToken(currentToken);
currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.SPACE,insens,true);
addToken(currentToken);
currentToken = new RETokenChar(subIndex,'\t',false);
}
// 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,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);
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: 6
|
|
Number of AST nodes: 6
|
|
1 | addToken(currentToken);↵ | | 1 | addToken(currentToken);↵
|
2 | currentToken = new RETokenChar(subIndex,'\r',false);↵ | | 2 | currentToken = new RETokenChar(subIndex,'\t',false);↵
|
3 | }↵ | | 3 | }↵
|
|
4 | // WHITESPACE OPERATOR↵ | | 4 | // ALPHANUMERIC OPERATOR↵
|
5 | // \s if RE_CHAR_CLASS_ESCAPES is set↵ | | 5 | // \w↵
|
|
6 | else if (unit.bk && (unit.ch == 's') && syntax.get(RESyntax.RE_CHAR_CLASS_ESCAPES)) {↵ | | 6 | else if (unit.bk && (unit.ch == 'w') && syntax.get(RESyntax.RE_CHAR_CLASS_ESCAPES)) {↵
|
7 | addToken(currentToken);↵ | | 7 | addToken(currentToken);↵
|
8 | currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.SPACE,insens,false);↵ | | 8 | currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.ALNUM,insens,false);↵
|
9 | }↵ | | 9 | }↵
|
|
10 | // NON-WHITESPACE OPERATOR↵ | | 10 | // NON-ALPHANUMERIC OPERATOR↵
|
11 | // \S↵ | | 11 | // \W↵
|
|
12 | else if (unit.bk && (unit.ch == 'S') && syntax.get(RESyntax.RE_CHAR_CLASS_ESCAPES)) {↵ | | 12 | else if (unit.bk && (unit.ch == 'W') && syntax.get(RESyntax.RE_CHAR_CLASS_ESCAPES)) {↵
|
13 | addToken(currentToken);↵ | | 13 | addToken(currentToken);↵
|
14 | currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.SPACE,insens,true); | | 14 | currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.ALNUM,insens,true);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 3 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
255 | addToken(currentToken); | | 264 | addToken(currentToken); |
256 | currentToken = new RETokenChar(subIndex, '\r', false); | | 265 | currentToken = new RETokenChar(subIndex, '\t', false); |
Precondition Violations (0)
Row |
Violation |