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: ForeignKeyInfo[] getExportedKeys(ITableInfo, SQLDatabaseMetaData)
|
Method name: ForeignKeyInfo[] getImportedKeys(ITableInfo, SQLDatabaseMetaData)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | ForeignKeyInfo[] result = ti.getExportedKeys();↵ | 1 | ForeignKeyInfo[] result = ti.getImportedKeys();↵ | |
2 | if (result == null)↵ | 2 | if (result == null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | result = md.getExportedKeysInfo(ti);↵ | 4 | result = md.getImportedKeysInfo(ti);↵ | |
5 | // Avoid the hit next time↵ | 5 | // Avoid the hit next time↵ | |
6 | ti.setExportedKeys(result);↵ | 6 | ti.setImportedKeys(result);↵ | |
7 | }↵ | 7 | }↵ | |
8 | return result; | 8 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 13 |
Number of mapped statements | 5 |
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) | 32.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | ForeignKeyInfo[] result = ti.getExportedKeys(); |
| 1 | ForeignKeyInfo[] result = ti.getImportedKeys(); | ||||||||||||||
2 | if (result == null) | 2 | if (result == null) | |||||||||||||||
3 | result = md.getExportedKeysInfo(ti); |
| 3 | result = md.getImportedKeysInfo(ti); | ||||||||||||||
4 | ti.setExportedKeys(result); |
| 4 | ti.setImportedKeys(result); | ||||||||||||||
5 | return result; | 5 | return result; |
Row | Violation |
---|---|
1 | Expression md.getExportedKeysInfo(ti) is a method call throwing exception(s) that should be caught by a try block that will be extracted |
2 | Expression md.getImportedKeysInfo(ti) is a method call throwing exception(s) that should be caught by a try block that will be extracted |
3 | Expression ti.setExportedKeys(result) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression ti.setImportedKeys(result) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression ti.setExportedKeys(result) is a void method call, and thus it cannot be parameterized |
6 | Expression ti.setImportedKeys(result) is a void method call, and thus it cannot be parameterized |