File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/PatternSet.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/PatternSet.java | |||
Method name: void addConfiguredPatternset(PatternSet)
|
Method name: void append(PatternSet, Project)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | if (isReference()) {↵ | 1 | if (isReference()) {↵ | |
2 | throw noChildrenAllowed();↵ | 2 | throw n↵ | |
3 | }↵ | |||
4 | String[] nestedIncludes = p.getIncludePatterns(getProject());↵ | |||
5 | String[] nestedExcludes = p↵ | 3 | ew BuildException("Cannot append to a reference");↵ | |
4 | }↵ | |||
6 | .getExcludePatterns(getProject());↵ | 5 | String[] incl = other.getIncludePatterns(p);↵ | |
7 | if (nestedIncludes != null) {↵ | 6 | if (incl != null) {↵ | |
8 | for (int i = 0; i < nestedIncludes.length; i++) {↵ | 7 | for (int i = 0; i < incl.length; i++) {↵ | |
9 | createInclude().setName(nestedIncludes[i]);↵ | 8 | createInclude().setName(incl[i]);↵ | |
10 | }↵ | 9 | }↵ | |
11 | }↵ | 10 | }↵ | |
12 | if (nestedExcludes↵ | 11 | String[] excl = other.getExcludePatterns(p);↵ | |
13 | != null) {↵ | 12 | if (excl != null) {↵ | |
14 | for (int i = 0; i < nestedExcludes.length; i++) {↵ | 13 | for (int i = 0; i < excl.length; i++) {↵ | |
15 | createExclude().setName(nestedExcludes[i]);↵ | 14 | createExclude().setName(excl[i]);↵ | |
16 | }↵ | 15 | }↵ | |
17 | } | 16 |
| |
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.8 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 27 |
Number of mapped statements | 10 |
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) | 2.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (isReference()) | 1 | if (isReference()) | |||||||||||||||||
2 | throw noChildrenAllowed(); |
| 2 | throw new BuildException("Cannot append to a reference"); | ||||||||||||||||
3 | String[] nestedIncludes = p.getIncludePatterns(getProject()); |
| 3 | String[] incl = other.getIncludePatterns(p); | ||||||||||||||||
4 | String[] nestedExcludes = p.getExcludePatterns(getProject()); |
| 7 | String[] excl = other.getExcludePatterns(p); | ||||||||||||||||
5 | if (nestedIncludes != null) |
| 4 | if (incl != null) | ||||||||||||||||
6 | for (int i = 0; i < nestedIncludes.length; i++) |
| 5 | for (int i = 0; i < incl.length; i++) | ||||||||||||||||
7 | createInclude().setName(nestedIncludes[i]); |
| 6 | createInclude().setName(incl[i]); | ||||||||||||||||
8 | if (nestedExcludes != null) |
| 8 | if (excl != null) | ||||||||||||||||
9 | for (int i = 0; i < nestedExcludes.length; i++) |
| 9 | for (int i = 0; i < excl.length; i++) | ||||||||||||||||
10 | createExclude().setName(nestedExcludes[i]); |
| 10 | createExclude().setName(excl[i]); |
Row | Violation |
---|