File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/AliasFolderState.java | File path: /sql12/plugins/dbdiff/src/net/sourceforge/squirrel_sql/plugins/dbdiff/DiffExecutor.java | |||
Method name: void sort()
|
Method name: void _execute()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 4 | |||
1 | Arrays.sort(_kids);↵ | |||
2 | for (AliasFolderState kid : _kids)↵ | |||
3 | {↵ | |||
4 | kid.sort();↵ | |||
1 | if (columnDiffs != null && columnDiffs.size() > 0) {↵ | |||
2 | colDifferences.addAll(columnDiffs);↵ | |||
3 | for (ColumnDifference colDiff : columnDiffs) {↵ | |||
4 | System.out.println(colDiff.toString());↵ | |||
5 | }↵ | |||
5 | } | 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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 5 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 1.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Arrays.sort(_kids); | | ||||||||||||||||||||
| 23 | colDifferences.addAll(columnDiffs); | ||||||||||||||||||||
2 | for (AliasFolderState kid : _kids) |
| 24 | for (ColumnDifference colDiff : columnDiffs) | ||||||||||||||||||
3 | kid.sort(); |
| | |||||||||||||||||||
|
| 25 | System.out.println(colDiff.toString()); |
Row | Violation |
---|---|
1 | Type net.sourceforge.squirrel_sql.client.gui.db.AliasFolderState does not match with type net.sourceforge.squirrel_sql.plugins.dbdiff.ColumnDifference |
2 | Type net.sourceforge.squirrel_sql.client.gui.db.AliasFolderState[] of variable _kids does not match with type java.util.List<net.sourceforge.squirrel_sql.plugins.dbdiff.ColumnDifference> of variable columnDiffs |
3 | Unmatched statement kid.sort(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement System.out.println(colDiff.toString()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Clone fragment #1 returns variable kid with type net.sourceforge.squirrel_sql.client.gui.db.AliasFolderState , while Clone fragment #2 returns variable colDiff with type net.sourceforge.squirrel_sql.plugins.dbdiff.ColumnDifference |
6 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |