File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ReflectiveItemProvider.java | File path: /emf-2.4.1/src/org/eclipse/emf/mapping/domain/AdapterFactoryMappingDomain.java | |||
Method name: List
|
Method name: List
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | if (!lastIsLower)↵ | 1 | if (!lastIsLower)↵ | |
2 | {↵ | 2 | {↵ | |
3 | int currentWordLength = currentWord.length();↵ | 3 | int currentWordLength = currentWord.length();↵ | |
4 | if (currentWordLength > 1)↵ | 4 | if (currentWordLength > 1)↵ | |
5 | {↵ | 5 | {↵ | |
6 | char lastChar = currentWord.charAt(--currentWordLength);↵ | 6 | char lastChar = currentWord.charAt(--currentWordLength);↵ | |
7 | currentWord.setLength(currentWordLength);↵ | 7 | currentWord.setLength(currentWordLength);↵ | |
8 | result.add(currentWord.toString());↵ | 8 | result.add(currentWord.toString());↵ | |
9 | currentWord = new StringBuffer();↵ | 9 | currentWord = new StringBuffer();↵ | |
10 | currentWord.append(lastChar);↵ | 10 | currentWord.append(lastChar);↵ | |
11 | }↵ | 11 | }↵ | |
12 | }↵ | 12 | }↵ | |
13 | lastIsLower = true; | 13 |
| |
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.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 44 |
Number of mapped statements | 9 |
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) | 8.7 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
12 | if (!lastIsLower) | 12 | if (!lastIsLower) | |
13 | int currentWordLength = currentWord.length(); | 13 | int currentWordLength = currentWord.length(); | |
14 | if (currentWordLength > 1) | 14 | if (currentWordLength > 1) | |
15 | char lastChar = currentWord.charAt(--currentWordLength); | 15 | char lastChar = currentWord.charAt(--currentWordLength); | |
16 | currentWord.setLength(currentWordLength); | 16 | currentWord.setLength(currentWordLength); | |
17 | result.add(currentWord.toString()); | 17 | result.add(currentWord.toString()); | |
18 | currentWord = new StringBuffer(); | 18 | currentWord = new StringBuffer(); | |
19 | currentWord.append(lastChar); | 19 | currentWord.append(lastChar); | |
20 | lastIsLower = true; | 20 | lastIsLower = true; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables lastIsLower, currentWord , while Clone fragment #2 returns variables lastIsLower, currentWord |