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 readFiles(Project)
|
Method name: void readFiles(Project)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | if (includesFileList.size() > 0) {↵ | 1 | if (excludesFileList.size() > 0) {↵ | |
2 | Enumeration e = includesFileList.elements();↵ | 2 | Enumeration e = excludesFileList.elements();↵ | |
3 | while (e.hasMoreElements()) {↵ | 3 | while (e.hasMoreElements()) {↵ | |
4 | NameEntry ne = (NameEntry) e.nextElement();↵ | 4 | NameEntry ne = (NameEntry) e.nextElement();↵ | |
5 | String fileName = ne.evalName(p);↵ | 5 | String fileName = ne.evalName(p);↵ | |
6 | if (fileName != null) {↵ | 6 | if (fileName != null) {↵ | |
7 | File inclFile = p.resolveFile(fileName);↵ | 7 | File exclFile = p.resolveFile(fileName);↵ | |
8 | if (!inclFile.exists()) {↵ | 8 | if (!exclFile.exists()) {↵ | |
9 | throw new BuildException("Includesfile "↵ | 9 | throw new BuildException("Excludesfile "↵ | |
10 | + inclFile.getAbsolutePath()↵ | 10 | + exclFile.getAbsolutePath()↵ | |
11 | + " not found.");↵ | 11 | + " not found.");↵ | |
12 | }↵ | 12 | }↵ | |
13 | readPatterns(inclFile, includeList, p);↵ | 13 | readPatterns(exclFile, excludeList, p);↵ | |
14 | }↵ | 14 | }↵ | |
15 | }↵ | 15 | }↵ | |
16 | includesFileList.removeAllElements();↵ | 16 | excludesFileList.removeAllElements();↵ | |
17 | } | 17 |
| |
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.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 31 |
Number of mapped statements | 11 |
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.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (includesFileList.size() > 0) |
| 12 | if (excludesFileList.size() > 0) | |||||||||||||
2 | Enumeration e = includesFileList.elements(); |
| 13 | Enumeration e = excludesFileList.elements(); | |||||||||||||
3 | while (e.hasMoreElements()) | 14 | while (e.hasMoreElements()) | ||||||||||||||
4 | NameEntry ne = (NameEntry)e.nextElement(); | 15 | NameEntry ne = (NameEntry)e.nextElement(); | ||||||||||||||
5 | String fileName = ne.evalName(p); | 16 | String fileName = ne.evalName(p); | ||||||||||||||
6 | if (fileName != null) | 17 | if (fileName != null) | ||||||||||||||
7 | File inclFile = p.resolveFile(fileName); |
| 18 | File exclFile = p.resolveFile(fileName); | |||||||||||||
8 | if (!inclFile.exists()) |
| 19 | if (!exclFile.exists()) | |||||||||||||
9 | throw new BuildException("Includesfile " + inclFile.getAbsolutePath() + " not found."); |
| 20 | throw new BuildException("Excludesfile " + exclFile.getAbsolutePath() + " not found."); | |||||||||||||
10 | readPatterns(inclFile, includeList, p); |
| 21 | readPatterns(exclFile, excludeList, p); | |||||||||||||
11 | includesFileList.removeAllElements(); |
| 22 | excludesFileList.removeAllElements(); |
Row | Violation |
---|