if (children == null) {
children = new ArrayList<ExplainRow>();
}
children.add(row);
if (children == null) {
children = new ArrayList<ExplainRow>();
}
return Collections.enumeration(children);
Clone fragments detected by clone detection tool
File path: /sql12/plugins/oracle/src/net/sourceforge/squirrel_sql/plugins/oracle/explainplan/ExplainPlanExecuter.java
|
|
File path: /sql12/plugins/oracle/src/net/sourceforge/squirrel_sql/plugins/oracle/explainplan/ExplainPlanExecuter.java
|
Method name: void addChild(ExplainRow)
|
|
Method name: Enumeration children()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (children == null) {↵ | | 1 | if (children == null) {↵
|
2 | children = new ArrayList<ExplainRow>();↵ | | 2 | children = new ArrayList<ExplainRow>();↵
|
3 | }↵ | | 3 | }↵
|
4 | children.add(row); | | 4 | return Collections.enumeration(children);
|
See real code fragment |
|
See real code fragment |
Summary
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 | 5 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (children == null) | | 1 | if (children == null) |
2 | children = new ArrayList<ExplainRow>(); | | 2 | children = new ArrayList<ExplainRow>(); |
| | | 3 | return Collections.enumeration(children); |
3 | children.add(row); | | | |
Precondition Violations (0)
Row |
Violation |