File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/commands/DropUniqueConstraintCommand.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/update/UpdateUtilImpl.java | |||
Method name: void onExecute()
|
Method name: Set
|
|||
Number of AST nodes: 3 | Number of AST nodes: 2 | |||
1 | for (IndexInfo index : indexes) {↵ | |||
2 | if (!index.isNonUnique()) {↵ | |||
3 | uniqueIndexes.add(index);↵ | |||
4 | }↵ | |||
5 | ↵ | 1 | if (filename.startsWith("squirrel-sql_"))↵ | |
2 | {↵ | |||
3 | result.add(filename);↵ | |||
6 | } | 4 | } | |
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 different classes |
Number of node comparisons | 5 |
Number of mapped statements | 2 |
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) | 26.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | if (!index.isNonUnique()) |
| 4 | if (filename.startsWith("squirrel-sql_")) | |||||||||||||||||||||
6 | uniqueIndexes.add(index); |
| 5 | result.add(filename); |
Row | Violation |
---|---|
1 | Type net.sourceforge.squirrel_sql.fw.sql.IndexInfo of variable index does not match with type java.lang.String of variable filename |
2 | Type java.util.List<net.sourceforge.squirrel_sql.fw.sql.IndexInfo> of variable uniqueIndexes does not match with type java.util.HashSet<java.lang.String> of variable result |
3 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.refactoring.commands.DropUniqueConstraintCommand and net.sourceforge.squirrel_sql.client.update.UpdateUtilImpl do not have a common superclass |