File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/Path.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resources/selectors/Compare.java | |||
Method name: void dieOnCircularReference(Stack, Project)
|
Method name: void dieOnCircularReference(Stack, Project)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 8 | |||
1 | if (isChecked()) {↵ | 1 | if (isChecked()) {↵ | |
2 | return;↵ | 2 | return;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (isReference()) {↵ | 4 | if (isReference()) {↵ | |
5 | super.dieOnCircularReference(stk, p);↵ | 5 | super.dieOnCircularReference(stk, p);↵ | |
6 | } else {↵ | 6 | } else {↵ | |
7 | if (union != null) {↵ | 7 | if (control != null) {↵ | |
8 | stk.push(union);↵ | 8 | ↵ | |
9 | invokeCircularReferenceCheck(union, stk, p);↵ | 9 | DataType.invokeCircularReferenceCheck(control, stk, p);↵ | |
10 | ↵ | 10 | }↵ | |
11 | stk.pop();↵ | 11 | ↵ | |
12 | }↵ | 12 | DataType.invokeCircularReferenceCheck(comp, stk, p);↵ | |
13 | setChecked(true);↵ | 13 | setChecked(true);↵ | |
14 | } | 14 |
| |
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 having the same super class |
Number of node comparisons | 33 |
Number of mapped statements | 7 |
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) | 2.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (isChecked()) | 1 | if (isChecked()) | ||||||||||||||||
2 | return; | 2 | return; | ||||||||||||||||
3 | if (isReference()) | 3 | if (isReference()) | ||||||||||||||||
4 | super.dieOnCircularReference(stk, p); | 4 | super.dieOnCircularReference(stk, p); | ||||||||||||||||
else | else | ||||||||||||||||||
5 | if (union != null) |
| 5 | if (control != null) | |||||||||||||||
6 | stk.push(union); | | |||||||||||||||||
7 | invokeCircularReferenceCheck(union, stk, p); |
| 6 | DataType.invokeCircularReferenceCheck(control, stk, p); | |||||||||||||||
8 | stk.pop(); | | |||||||||||||||||
|
| 7 | DataType.invokeCircularReferenceCheck(comp, stk, p); | ||||||||||||||||
9 | setChecked(true); | 8 | setChecked(true); |
Row | Violation |
---|---|
1 | Expression invokeCircularReferenceCheck(union,stk,p) is a void method call, and thus it cannot be parameterized |
2 | Expression DataType.invokeCircularReferenceCheck(control,stk,p) is a void method call, and thus it cannot be parameterized |
3 | Unmatched statement DataType.invokeCircularReferenceCheck(comp,stk,p); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |