File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/ErrorListDialog.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/ServiceManager.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if(o instanceof ErrorEntry)↵ | 1 | if(o instanceof Descriptor)↵ | |
2 | {↵ | 2 | {↵ | |
3 | ErrorEntry e = (ErrorEntry)o;↵ | 3 | ↵ | |
4 | return e.path↵ | 4 | Descriptor d = (Descriptor)o;↵ | |
5 | return d.clazz.equals(clazz)↵ | |||
5 | .equals(path);↵ | 6 | && d.name.equals(name);↵ | |
6 | }↵ | 7 | }↵ | |
7 | else↵ | 8 | else↵ | |
8 | return false; | 9 |
| |
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 16 |
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.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (o instanceof ErrorEntry) |
| 1 | if (o instanceof Descriptor) | ||||||||||||
|
| 2 | Descriptor d = (Descriptor)o; | |||||||||||||
2 | ErrorEntry e = (ErrorEntry)o; |
| | |||||||||||||
3 | return e.path.equals(path); |
| 3 | return d.clazz.equals(clazz) && d.name.equals(name); | ||||||||||||
else | else | |||||||||||||||
4 | return false; | 4 | return false; |
Row | Violation |
---|---|
1 | Type org.gjt.sp.jedit.gui.ErrorListDialog.ErrorEntry does not match with type org.gjt.sp.jedit.ServiceManager.Descriptor |
2 | Unmatched statement Descriptor d=(Descriptor)o; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement ErrorEntry e=(ErrorEntry)o; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Expression e.path.equals(path) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression d.clazz.equals(clazz) && d.name.equals(name) cannot be parameterized, because it has dependencies to/from statements that will be extracted |