File path: /jEdit-4.2/src/org/gjt/sp/jedit/pluginmgr/InstallPanel.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/pluginmgr/ManagePanel.java | |||
Method name: int compare(Object, Object)
|
Method name: int compare(Object, Object)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | int result;↵ | 1 | int result;↵ | |
2 | if ((result = e1.set.compareToIgnoreCase(e2.set)) == 0)↵ | 2 | if ((result = e1.status.compareToIgnoreCase(e2.status)) == 0)↵ | |
3 | return e1.name.compareToIgnoreCase(e2.name);↵ | 3 | return compareNames(e1,e2);↵ | |
4 | return result; | 4 |
| |
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 in different classes |
Number of node comparisons | 9 |
Number of mapped statements | 3 |
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) | 1.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | int result; | 5 | int result; | ||||||||||||||||||||||
6 | if ((result = e1.set.compareToIgnoreCase(e2.set)) == 0) |
| 6 | if ((result = e1.status.compareToIgnoreCase(e2.status)) == 0) | |||||||||||||||||||||
|
| 7 | return compareNames(e1, e2); | ||||||||||||||||||||||
7 | return e1.name.compareToIgnoreCase(e2.name); |
| | ||||||||||||||||||||||
8 | return result; | 8 | return result; |
Row | Violation |
---|---|
1 | Type java.lang.String of variable e2.set does not match with type java.lang.String of variable e2.status |
2 | Type java.lang.String of variable e1.set does not match with type java.lang.String of variable e1.status |
3 | Unmatched statement return compareNames(e1,e2); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement return compareNames(e1,e2); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
5 | Unmatched return compareNames(e1,e2); |
6 | Unmatched statement return e1.name.compareToIgnoreCase(e2.name); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
7 | Unmatched return e1.name.compareToIgnoreCase(e2.name); |
8 | Not all possible execution flows end in a return statement |