File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/Application.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/Application.java | |||
Method name: void loadEditWhereColsInfo()
|
Method name: void loadSQLHistory()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 5 | |||
1 | XMLBeanReader doc = new XMLBeanReader();↵ | 1 | XMLBeanReader doc = new XMLBeanReader();↵ | |
2 | doc.load(new ApplicationFiles().getEditWhereColsFile());↵ | 2 | doc.load(new ApplicationFiles().getUserSQLHistoryFile());↵ | |
3 | Iterator it = doc.iterator();↵ | 3 | Iterator it = doc.iterator();↵ | |
4 | if (it.hasNext())↵ | 4 | if (it.hasNext())↵ | |
5 | {↵ | 5 | {↵ | |
6 | editWhereCols = (EditWhereCols) it.next();↵ | 6 | ↵ | |
7 | editWhereCols.setApplication(this);↵ | 7 | _sqlHistory = (SQLHistory) it.next();↵ | |
8 | } | 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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 12 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 6.6 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | XMLBeanReader doc = new XMLBeanReader(); | 2 | XMLBeanReader doc = new XMLBeanReader(); | |||||||||||
3 | doc.load(new ApplicationFiles().getEditWhereColsFile()); |
| 3 | doc.load(new ApplicationFiles().getUserSQLHistoryFile()); | ||||||||||
4 | Iterator it = doc.iterator(); | 4 | Iterator it = doc.iterator(); | |||||||||||
5 | if (it.hasNext()) | 5 | if (it.hasNext()) | |||||||||||
|
| 6 | _sqlHistory = (SQLHistory)it.next(); | |||||||||||
6 | editWhereCols = (EditWhereCols)it.next(); |
| | |||||||||||
7 | editWhereCols.setApplication(this); |
| |
Row | Violation |
---|---|
1 | Unmatched statement _sqlHistory=(SQLHistory)it.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement editWhereCols=(EditWhereCols)it.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement editWhereCols.setApplication(this); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement editWhereCols.setApplication(this); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |