if (isCaseSensitive && ch != strArr[strIdxStart]) {
return false; // Character mismatch
}
if (!isCaseSensitive && Character.toUpperCase(ch)
!= Character.toUpperCase(strArr[strIdxStart])) {
return false;
if (isCaseSensitive && ch != strArr[strIdxEnd]) {
return false; // Character mismatch
}
if (!isCaseSensitive && Character.toUpperCase(ch)
!= Character.toUpperCase(strArr[strIdxEnd])) {
return false;
Clone fragments detected by clone detection tool
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 match(String, String, boolean)
|
|
Method name: boolean match(String, String, boolean)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (isCaseSensitive && ch != strArr[strIdxStart]) {↵ | | 1 | if (isCaseSensitive && ch != strArr[strIdxEnd]) {↵
|
2 | return false; // Character mismatch↵ | | 2 | return false; // Character mismatch↵
|
3 | }↵ | | 3 | }↵
|
4 | if (!isCaseSensitive && Character.toUpperCase(ch)↵ | | 4 | if (!isCaseSensitive && Character.toUpperCase(ch)↵
|
5 | != Character.toUpperCase(strArr[strIdxStart])) {↵ | | 5 | != Character.toUpperCase(strArr[strIdxEnd])) {↵
|
6 | return false; | | 6 | return false;
|
See real code fragment |
|
See real code fragment |
Summary
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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 6 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
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.2 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
28 | if (isCaseSensitive && ch != strArr[strIdxStart]) | | 41 | if (isCaseSensitive && ch != strArr[strIdxEnd]) |
29 | | | 42 | |
Precondition Violations (1)
Row |
Violation |
1 | Not all possible execution flows end in a return statement |