File path: /jEdit-4.2/src/gnu/regexp/RETokenRepeated.java | File path: /jEdit-4.2/src/gnu/regexp/RETokenRepeated.java | |||
Method name: boolean match(CharIndexed, REMatch)
|
Method name: REMatch matchRest(CharIndexed, REMatch)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (results != null) {↵ | 1 | if (↵ | |
2 | if (allResults↵ | 2 | next(input, single)) {↵ | |
3 | // chain results to doneIndex↵ | |||
3 | == null) {↵ | 4 | if (doneIndex == null) {↵ | |
4 | allResults = results;↵ | 5 | ↵ | |
5 | allResultsLast = results;↵ | |||
6 | } else {↵ | |||
7 | // Order these from longest to shortest↵ | |||
8 | // Start by assuming longest (more repeats)↵ | |||
9 | allResults↵ | 6 | doneIndex = single;↵ | |
7 | doneIndexLast = single;↵ | |||
8 | } else {↵ | |||
10 | Last.next = results;↵ | 9 | doneIndexLast.next = single;↵ | |
11 | }↵ | 10 | }↵ | |
12 | // Find new doablesLast↵ | 11 | // Find new doneIndexLast↵ | |
13 | while (allResultsLast.next != null) {↵ | 12 | while (doneIndexLast.next != null) {↵ | |
14 | allResultsLast = allResultsLast.next;↵ | 13 | doneIndexLast = doneIndexLast.next;↵ | |
15 | }↵ | 14 | }↵ | |
16 | } | 15 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.7 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 26 |
Number of mapped statements | 6 |
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) | 6.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
42 | if (allResults == null) |
| 7 | if (doneIndex == null) | |||||||||||||||
43 | allResults = results; |
| 8 | doneIndex = single; | |||||||||||||||
44 | allResultsLast = results; |
| 9 | doneIndexLast = single; | |||||||||||||||
else | else | ||||||||||||||||||
45 | allResultsLast.next = results; |
| 10 | doneIndexLast.next = single; | |||||||||||||||
46 | while (allResultsLast.next != null) |
| 11 | while (doneIndexLast.next != null) | |||||||||||||||
47 | allResultsLast = allResultsLast.next; |
| 12 | doneIndexLast = doneIndexLast.next; |
Row | Violation |
---|---|
1 | Expression allResultsLast.next cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression doneIndexLast.next cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression allResultsLast.next cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression doneIndexLast.next cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression allResultsLast.next cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression doneIndexLast.next cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Clone fragment #1 returns variables allResults, allResultsLast , while Clone fragment #2 returns variables doneIndex, doneIndexLast |