File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql/SQLUtilities.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql/SQLUtilities.java | |||
Method name: int compare(ITableInfo, ITableInfo)
|
Method name: int compare(ITableInfo, ITableInfo)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | ForeignKeyInfo info = t1ImportedKeys[i];↵ | 1 | ForeignKeyInfo info = t2ImportedKeys[i];↵ | |
2 | if (info.getPrimaryKeyTableName().equals(t2.getSimpleName()))↵ | 2 | if (info.getPrimaryKeyTableName().equals(t1.getSimpleName()))↵ | |
3 | {↵ | 3 | {↵ | |
4 | // t1 depends on t2↵ | 4 | // t2 depends on t1↵ | |
5 | return 1;↵ | 5 | return -1;↵ | |
6 | } | 6 |
| |
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 6 |
Number of mapped statements | 3 |
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.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | ForeignKeyInfo info = t1ImportedKeys[i]; |
| 8 | ForeignKeyInfo info = t2ImportedKeys[i]; | ||||||||||
4 | if (info.getPrimaryKeyTableName().equals(t2.getSimpleName())) |
| 9 | if (info.getPrimaryKeyTableName().equals(t1.getSimpleName())) | ||||||||||
5 | return 1; |
| 10 | return -1; |
Row | Violation |
---|---|
1 | Not all possible execution flows end in a return statement |