Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
41 | 2 | 1 | 0.968 | statement_sequence[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 40 | 365 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.java |
2 | 41 | 379 | plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchPattern.java |
| ||||
// If characters are not equals, then it's not a match if patternChar is lowercase if (patternChar < ScannerHelper.MAX_OBVIOUS) { if ((ScannerHelper.OBVIOUS_IDENT_CHAR_NATURES[patternChar]& ScannerHelper.C_UPPER_LETTER) == 0) { return false; } } else if (Character.isJavaIdentifierPart(patternChar) && !Character.isUpperCase(patternChar)) { return false; } // patternChar is uppercase, so let's find the next uppercase in name while (true) { if (iName == nameEnd) { // We have exhausted name (and not pattern), so it's not a match return false; } nameChar = name[iName]; if (nameChar < ScannerHelper.MAX_OBVIOUS) { if ((ScannerHelper.OBVIOUS_IDENT_CHAR_NATURES[nameChar]& (ScannerHelper.C_LOWER_LETTER| ScannerHelper.C_SPECIAL| ScannerHelper.C_DIGIT)) != 0) { // nameChar is lowercase iName++; // nameChar is uppercase... } else if (patternChar != nameChar) { //.. and it does not match patternChar, so it's not a match return false; } else { //.. and it matched patternChar. Back to the big loop break; } } else if (Character.isJavaIdentifierPart(nameChar) && !Character.isUpperCase(nameChar)) { // nameChar is lowercase iName++; // nameChar is uppercase... } else if (patternChar != nameChar) { //.. and it does not match patternChar, so it's not a match return false; } else { //.. and it matched patternChar. Back to the big loop break; } } |
| ||||
// If characters are not equals, then it's not a match if patternChar is lowercase if (patternChar < ScannerHelper.MAX_OBVIOUS) { if ((ScannerHelper.OBVIOUS_IDENT_CHAR_NATURES[patternChar]& ScannerHelper.C_UPPER_LETTER) == 0) { return false; } } else if (Character.isJavaIdentifierPart(patternChar) && !Character.isUpperCase(patternChar)) { return false; } // patternChar is uppercase, so let's find the next uppercase in name while (true) { if (iName == nameEnd) { // We have exhausted name (and not pattern), so it's not a match return false; } nameChar = name.charAt(iName); if (nameChar < ScannerHelper.MAX_OBVIOUS) { if ((ScannerHelper.OBVIOUS_IDENT_CHAR_NATURES[nameChar]& (ScannerHelper.C_LOWER_LETTER| ScannerHelper.C_SPECIAL| ScannerHelper.C_DIGIT)) != 0) { // nameChar is lowercase iName++; // nameChar is uppercase... } else if (patternChar != nameChar) { //.. and it does not match patternChar, so it's not a match return false; } else { //.. and it matched patternChar. Back to the big loop break; } } else if (Character.isJavaIdentifierPart(nameChar) && !Character.isUpperCase(nameChar)) { // nameChar is lowercase iName++; // nameChar is uppercase... } else if (patternChar != nameChar) { //.. and it does not match patternChar, so it's not a match return false; } else { //.. and it matched patternChar. Back to the big loop break; } } |
| |||
// If characters are not equals, then it's not a match if patternChar is lowercase if (patternChar < ScannerHelper.MAX_OBVIOUS) { if ((ScannerHelper.OBVIOUS_IDENT_CHAR_NATURES[patternChar]&ScannerHelper.C_UPPER_LETTER) == 0) { return false; } } else if (Character.isJavaIdentifierPart(patternChar) && !Character.isUpperCase(patternChar)) { return false; } // patternChar is uppercase, so let's find the next uppercase in name while (true) { if (iName == nameEnd) { // We have exhausted name (and not pattern), so it's not a match return false; } nameChar = [[#variable917eddc0]]; if (nameChar < ScannerHelper.MAX_OBVIOUS) { if ((ScannerHelper.OBVIOUS_IDENT_CHAR_NATURES[nameChar]&(ScannerHelper.C_LOWER_LETTER|ScannerHelper.C_SPECIAL|ScannerHelper.C_DIGIT)) != 0) { // nameChar is lowercase iName++; // nameChar is uppercase... } else if (patternChar != nameChar) { //.. and it does not match patternChar, so it's not a match return false; } else { //.. and it matched patternChar. Back to the big loop break; } } else if (Character.isJavaIdentifierPart(nameChar) && !Character.isUpperCase(nameChar)) { // nameChar is lowercase iName++; // nameChar is uppercase... } else if (patternChar != nameChar) { //.. and it does not match patternChar, so it's not a match return false; } else { //.. and it matched patternChar. Back to the big loop break; } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#917eddc0]] | name.charAt(iName) |
1 | 2 | [[#917eddc0]] | name[iName] |