File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/condition/And.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/condition/Or.java | |||
Method name: boolean eval()
|
Method name: boolean eval()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | Enumeration e = getConditions();↵ | 1 | Enumeration e = getConditions();↵ | |
2 | while (e.hasMoreElements()) {↵ | 2 | while (e.hasMoreElements()) {↵ | |
3 | Condition c = (Condition) e.nextElement();↵ | 3 | Condition c = (Condition) e.nextElement();↵ | |
4 | if (!c.eval()) {↵ | 4 | if (c.eval()) {↵ | |
5 | return false;↵ | 5 | return true;↵ | |
6 | }↵ | 6 | }↵ | |
7 | }↵ | 7 | }↵ | |
8 | return true; | 8 | return false; | |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 12 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 144.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Enumeration e = getConditions(); | 1 | Enumeration e = getConditions(); | |||||||||||||
2 | while (e.hasMoreElements()) | 2 | while (e.hasMoreElements()) | |||||||||||||
3 | Condition c = (Condition)e.nextElement(); | 3 | Condition c = (Condition)e.nextElement(); | |||||||||||||
4 | if (!c.eval()) |
| 4 | if (c.eval()) | ||||||||||||
5 | return false; |
| 5 | return true; | ||||||||||||
6 | return true; |
| 6 | return false; |
Row | Violation |
---|---|
1 | Expression !c.eval() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression c.eval() cannot be parameterized, because it has dependencies to/from statements that will be extracted |