File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/XSLTProcess.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/PatternSet.java | |||
Method name: boolean shouldUse()
|
Method name: boolean valid(Project)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (ifProperty != null && project.getProperty(ifProperty) == null) {↵ | 1 | if (ifCond != null && p.getProperty(ifCond) == null) {↵ | |
2 | return false;↵ | 2 | return false;↵ | |
3 | } else if (unlessProperty != null↵ | 3 | } else if (unless↵ | |
4 | && project.getProperty(unlessProperty) != null) {↵ | 4 | Cond != null && p.getProperty(unlessCond) != null) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | return true; | 7 |
| |
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.9 |
Clones location | Clones are in different classes |
Number of node comparisons | 14 |
Number of mapped statements | 5 |
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) | 1.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (ifProperty != null && project.getProperty(ifProperty) == null) |
| 1 | if (ifCond != null && p.getProperty(ifCond) == null) | ||||||||||||||||
2 | return false; | 2 | return false; | |||||||||||||||||
3 | else if (unlessProperty != null && project.getProperty(unlessProperty) != null) |
| 3 | else if (unlessCond != null && p.getProperty(unlessCond) != null) | ||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||
5 | return true; | 5 | return true; |
Row | Violation |
---|