File path: /jEdit-4.2/src/org/gjt/sp/jedit/pluginmgr/ManagePanel.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/pluginmgr/InstallPanel.java | |||
Method name: int compare(Object, Object)
|
Method name: int compare(Object, Object)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | ManagePanel.Entry e1 = (ManagePanel.Entry)o1;↵ | 1 | InstallPanel.Entry e1 = (InstallPanel.Entry)o1;↵ | |
2 | ManagePanel.Entry e2 = (ManagePanel.Entry)o2;↵ | 2 | InstallPanel.Entry e2 = (InstallPanel.Entry)o2;↵ | |
3 | if (type == NAME)↵ | 3 | if (type == NAME)↵ | |
4 | return compareNames(e1,e2);↵ | 4 | return e1.name.compareToIgnoreCase(e2.name);↵ | |
5 | else↵ | 5 | else↵ | |
6 | {↵ | 6 | {↵ | |
7 | int result;↵ | 7 | int result;↵ | |
8 | if ((result = e1.status.compareToIgnoreCase(e2.status)) == 0)↵ | 8 | if ((result = e1.set.compareToIgnoreCase(e2.set)) == 0)↵ | |
9 | return compareNames(e1,e2);↵ | 9 | return e1.name.compareToIgnoreCase(e2.name);↵ | |
10 | return result;↵ | 10 | return result;↵ | |
11 | } | 11 |
| |
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 in different classes |
Number of node comparisons | 24 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 4.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | InstallPanel.Entry e1 = (InstallPanel.Entry)o1; | |||||||||||||||||||||||
1 | ManagePanel.Entry e1 = (ManagePanel.Entry)o1; | | |||||||||||||||||||||||
| 2 | InstallPanel.Entry e2 = (InstallPanel.Entry)o2; | |||||||||||||||||||||||
2 | ManagePanel.Entry e2 = (ManagePanel.Entry)o2; | | |||||||||||||||||||||||
3 | if (type == NAME) | 3 | if (type == NAME) | ||||||||||||||||||||||
4 | return compareNames(e1, e2); |
| 4 | return e1.name.compareToIgnoreCase(e2.name); | |||||||||||||||||||||
else | else | ||||||||||||||||||||||||
5 | int result; | 5 | int result; | ||||||||||||||||||||||
6 | if ((result = e1.status.compareToIgnoreCase(e2.status)) == 0) |
| 6 | if ((result = e1.set.compareToIgnoreCase(e2.set)) == 0) | |||||||||||||||||||||
7 | return compareNames(e1, e2); |
| 7 | return e1.name.compareToIgnoreCase(e2.name); | |||||||||||||||||||||
8 | return result; | 8 | return result; |
Row | Violation |
---|---|
1 | Type org.gjt.sp.jedit.pluginmgr.ManagePanel.Entry of variable e2 does not match with type org.gjt.sp.jedit.pluginmgr.InstallPanel.Entry of variable e2 |
2 | Type org.gjt.sp.jedit.pluginmgr.ManagePanel.Entry of variable e1 does not match with type org.gjt.sp.jedit.pluginmgr.InstallPanel.Entry of variable e1 |