File path: /sql12/plugins/favs/src/net/sourceforge/squirrel_sql/plugins/favs/Folder.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/id/UidIdentifier.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | boolean rc = false;↵ | 1 | boolean rc = false;↵ | |
2 | if (rhs != null && rhs.getClass().equals(getClass())) {↵ | 2 | if (rhs != null && rhs.getClass().equals(getClass()))↵ | |
3 | rc = ((Folder)rhs).getIdentifier().equals(getIdentifier());↵ | |||
4 | }↵ | |||
5 | ↵ | |||
3 | {↵ | |||
4 | rc = ((UidIdentifier)rhs).toString().equals(toString());↵ | |||
5 | }↵ | |||
6 | return rc; | 6 | return rc; | |
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 | 8 |
Number of mapped statements | 4 |
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) | 1.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | boolean rc = false; | 1 | boolean rc = false; | ||||||||||||||||||||||||||||||
2 | if (rhs != null && rhs.getClass().equals(getClass())) |
| 2 | if (rhs != null && rhs.getClass().equals(getClass())) | |||||||||||||||||||||||||||||
3 | rc = ((Folder)rhs).getIdentifier().equals(getIdentifier()); |
| 3 | rc = ((UidIdentifier)rhs).toString().equals(toString()); | |||||||||||||||||||||||||||||
4 | return rc; | 4 | return rc; |
Row | Violation |
---|---|
1 | Type java.lang.Class<> of variable getClass() does not match with type java.lang.Class<> of variable getClass() |
2 | Type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable getIdentifier() does not match with type java.lang.String of variable toString() |
3 | Expression ((Folder)rhs).getIdentifier() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression ((UidIdentifier)rhs).toString() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable ((Folder)rhs).getIdentifier() does not match with type java.lang.String of variable ((UidIdentifier)rhs).toString() |
6 | Expression (Folder)rhs cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression (UidIdentifier)rhs cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Type net.sourceforge.squirrel_sql.plugins.favs.Folder does not match with type net.sourceforge.squirrel_sql.fw.id.UidIdentifier |