File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/selectors/SelectorUtils.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/selectors/SelectorUtils.java | |||
Method name: boolean matchPath(String, String, boolean)
|
Method name: boolean matchPatternStart(String, String, boolean)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | String[] patDirs = tokenizePathAsArray(pattern);↵ | 1 | String[] patDirs = tokenizePathAsArray(pattern);↵ | |
2 | String[] strDirs = tokenizePathAsArray(str);↵ | 2 | String[] strDirs = tokenizePathAsArray(str);↵ | |
3 | int patIdxStart = 0;↵ | 3 | int patIdxStart = 0;↵ | |
4 | int patIdxEnd = patDirs.length - 1;↵ | 4 | int patIdxEnd = patDirs.length - 1;↵ | |
5 | int strIdxStart = 0;↵ | 5 | int strIdxStart = 0;↵ | |
6 | int strIdxEnd = strDirs.length - 1; | 6 |
| |
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 42 |
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) | 0.0 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | String[] patDirs = tokenizePathAsArray(pattern); | 3 | String[] patDirs = tokenizePathAsArray(pattern); | |
2 | String[] strDirs = tokenizePathAsArray(str); | 4 | String[] strDirs = tokenizePathAsArray(str); | |
3 | int patIdxStart = 0; | 5 | int patIdxStart = 0; | |
4 | int patIdxEnd = patDirs.length - 1; | 6 | int patIdxEnd = patDirs.length - 1; | |
5 | int strIdxStart = 0; | 7 | int strIdxStart = 0; | |
6 | int strIdxEnd = strDirs.length - 1; | 8 | int strIdxEnd = strDirs.length - 1; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables patIdxStart, patIdxEnd, strIdxStart, strIdxEnd, patDirs, strDirs , while Clone fragment #2 returns variables patIdxStart, patIdxEnd, strIdxStart, strIdxEnd, patDirs, strDirs |