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: boolean match(CharIndexed, REMatch)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (results != null) {↵ | 1 | if (↵ | |
2 | if (allResult↵ | 2 | token.match(input, recurrent)) {↵ | |
3 | // add all items in current to doables array↵ | |||
3 | s == null) {↵ | 4 | if (doables == null) {↵ | |
4 | allResults = results;↵ | 5 | ↵ | |
5 | allResultsLast = results;↵ | |||
6 | ↵ | 6 | doables = recurrent;↵ | |
7 | doablesLast = recurrent;↵ | |||
7 | } else {↵ | 8 | } else {↵ | |
8 | // Order these from longest to shortest↵ | 9 | // Order these from longest to shortest↵ | |
9 | // Start by assuming longest (more repeats)↵ | 10 | // Start by assuming longest (more repeats)↵ | |
10 | allResultsLast.next = results;↵ | 11 | doablesLast.next = re↵ | |
11 | }↵ | |||
12 | ↵ | 12 | current;↵ | |
13 | }↵ | |||
13 | // Find new doablesLast↵ | 14 | // Find new doablesLast↵ | |
14 | while (allResultsLast.next != null) {↵ | 15 | while (doablesLast.next != null) {↵ | |
15 | allResultsLast = allResultsLast.next;↵ | 16 | doablesLast = doablesLast.next;↵ | |
16 | }↵ | 17 | ↵ | |
17 | } | 18 | }↵ | |
19 |
| |||
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) | 1.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 35 |
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) | 4.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
42 | if (allResults == null) |
| 20 | if (doables == null) | |||||||||||||
43 | allResults = results; |
| 21 | doables = recurrent; | |||||||||||||
44 | allResultsLast = results; |
| 22 | doablesLast = recurrent; | |||||||||||||
else | else | ||||||||||||||||
45 | allResultsLast.next = results; |
| 23 | doablesLast.next = recurrent; | |||||||||||||
46 | while (allResultsLast.next != null) |
| 24 | while (doablesLast.next != null) | |||||||||||||
47 | allResultsLast = allResultsLast.next; |
| 25 | doablesLast = doablesLast.next; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables allResults, allResultsLast , while Clone fragment #2 returns variables doables, doablesLast |