File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql/TableInfo.java | File path: /sql12/plugins/oracle/src/net/sourceforge/squirrel_sql/plugins/oracle/explainplan/ExplainPlanExecuter.java | |||
Method name: void addChild(ITableInfo)
|
Method name: Enumeration
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if (_childList == null)↵ | 1 | if (children == null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | _childList = new TreeSet<ITableInfo>();↵ | 3 | children = new ↵ | |
4 | }↵ | |||
5 | _childList.add(tab↵ | 4 | ArrayList<ExplainRow>();↵ | |
5 | }↵ | |||
6 | ); | 6 | return Collections.enumeration(children); | |
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 | 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) | 0.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (_childList == null) |
| 1 | if (children == null) | ||||||||||||||
|
| 2 | children = new ArrayList<ExplainRow>(); | |||||||||||||||
2 | _childList = new TreeSet<ITableInfo>(); |
| | |||||||||||||||
|
| 3 | return Collections.enumeration(children); | |||||||||||||||
3 | _childList.add(tab); | |
Row | Violation |
---|---|
1 | Type java.util.SortedSet<net.sourceforge.squirrel_sql.fw.sql.ITableInfo> of variable _childList does not match with type java.util.List<net.sourceforge.squirrel_sql.plugins.oracle.explainplan.ExplainPlanExecuter.ExplainPlanModel.ExplainRow> of variable children |
2 | Unmatched statement children=new ArrayList<ExplainRow>(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement _childList=new TreeSet<ITableInfo>(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched return Collections.enumeration(children); |
5 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |