File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/scm/AntStarTeamCheckOut.java | |||
Method name: boolean matchPatterns(String, String)
|
Method name: boolean matchPatterns(String, String)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (patterns == null) {↵ | 1 | if (patterns == null) {↵ | |
2 | return false;↵ | 2 | return false;↵ | |
3 | }↵ | 3 | }↵ | |
4 | StringTokenizer exStr = new StringTokenizer(patterns, ",");↵ | 4 | StringTokenizer exStr = new StringTokenizer(patterns, " ");↵ | |
5 | while (exStr.hasMoreTokens()) {↵ | 5 | while (exStr.hasMoreTokens()) {↵ | |
6 | if (DirectoryScanner.match(exStr.nextToken(), pName)) {↵ | 6 | if (DirectoryScanner.match(exStr.nextToken(), pName)) {↵ | |
7 | return true;↵ | 7 | return true;↵ | |
8 | }↵ | 8 | }↵ | |
9 | }↵ | 9 | }↵ | |
10 | return false; | 10 |
| |
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 11 |
Number of mapped statements | 7 |
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) | 0.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (patterns == null) | 1 | if (patterns == null) | |||||||||||
2 | return false; | 2 | return false; | |||||||||||
3 | StringTokenizer exStr = new StringTokenizer(patterns, ","); |
| 3 | StringTokenizer exStr = new StringTokenizer(patterns, " "); | ||||||||||
4 | while (exStr.hasMoreTokens()) | 4 | while (exStr.hasMoreTokens()) | |||||||||||
5 | if (DirectoryScanner.match(exStr.nextToken(), pName)) | 5 | if (DirectoryScanner.match(exStr.nextToken(), pName)) | |||||||||||
6 | return true; | 6 | return true; | |||||||||||
7 | return false; | 7 | return false; |
Row | Violation |
---|