for (int i = 0; i < fileDigest.length; i++) { String hexStr = Integer.toHexString(0x00ff & fileDigest[i]); if (hexStr.length() < 2) { checksumSb.append("0"); } checksumSb.append(hexStr); }
for (int i = 0; i < fileDigest.length; i++) { String hexStr = Integer.toHexString(0x00ff & fileDigest[i]); if (hexStr.length() < 2) { checksumSb.append("0"); } checksumSb.append(hexStr); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Checksum.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
for (int i = 0; i < fileDigest.length; i++) {
1
for (int i = 0; i < fileDigest.length; i++) {
2
            String hexStr = Integer.toHexString(0x00ff & fileDigest[i]);
2
                    String hexStr = Integer.toHexString(0x00ff & fileDigest[i]);
3
            if (hexStr.length() < 2) {
3
                    if (hexStr.length() < 2) {
4
                checksumSb.append("0");
4
                        checksumSb.append("0");
5
            }
5
            
6
        }
6
            checksumSb.append(hexStr);
7
                    checksumSb.append(hexStr);
7
        }
8
                }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0