File path: /jEdit-4.2/src/org/gjt/sp/jedit/MiscUtilities.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/MiscUtilities.java | |||
Method name: String getLongestPrefix(List, boolean)
|
Method name: String getLongestPrefix(Object[], boolean)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | s = str.get(i).toString();↵ | 1 | String s = str[i].toString();↵ | |
2 | if(prefixLength >= s.length())↵ | 2 | if(prefixLength >= s.length())↵ | |
3 | break loop;↵ | 3 | break loop;↵ | |
4 | if(!compareChars(s.charAt(prefixLength),ch,ignoreCase))↵ | 4 | if(!compareChars(s.charAt(prefixLength),ch,ignoreCase))↵ | |
5 | break loop; | 5 |
| |
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.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 17 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||
---|---|---|---|---|---|---|---|---|---|---|
|
| 10 | String s = str[i].toString(); | |||||||
10 | s = str.get(i).toString(); |
| | |||||||
11 | if (prefixLength >= s.length()) | 11 | if (prefixLength >= s.length()) | |||||||
12 | break loop; |
| 12 | break loop; | ||||||
13 | if (!compareChars(s.charAt(prefixLength), ch, ignoreCase)) | 13 | if (!compareChars(s.charAt(prefixLength), ch, ignoreCase)) | |||||||
14 | break loop; |
| 14 | break loop; |
Row | Violation |
---|---|
1 | Unmatched statement String s=str[i].toString(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement s=str.get(i).toString(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Statement break loop; without innermost loop |
4 | Statement break loop; without innermost loop |
5 | Statement break loop; without innermost loop |
6 | Statement break loop; without innermost loop |