CloneSet678


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
41210.968statement_sequence[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
140365
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.java
241379
plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchPattern.java
Clone Instance
1
Line Count
40
Source Line
365
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.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;
                                }
                }


Clone Instance
2
Line Count
41
Source Line
379
Source File
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.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;
                                }
                }


Clone AbstractionParameter Count: 1Parameter Bindings

// 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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#917eddc0]]
name.charAt(iName) 
12[[#917eddc0]]
name[iName]