CloneSet772


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
22250.965statement_sequence[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
120845
plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchPattern.java
2221611
plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchPattern.java
Clone Instance
1
Line Count
20
Source Line
845
Source File
plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchPattern.java

                try {
                        declaringTypeSignature = Signature.createTypeSignature(declaringType, false);
                        if (declaringTypeSignature.indexOf(Signature.C_GENERIC_START) < 0) {
                                declaringTypePart = declaringType.toCharArray();
                        }
                        else   {
                                declaringTypePart = Signature.toCharArray(Signature.getTypeErasure(declaringTypeSignature.toCharArray()));
                        }
                }
                catch (IllegalArgumentException iae) {
                        // declaring type is invalid
                        return null;
                }
                int lastDotPosition = CharOperation.lastIndexOf('.', declaringTypePart);
                if (lastDotPosition >= 0) {
                        declaringTypeQualification = CharOperation.subarray(declaringTypePart, 0, lastDotPosition);
                        if (declaringTypeQualification.length == 1 && declaringTypeQualification[0] == '*')
                                declaringTypeQualification = null;
                        declaringTypeSimpleName = CharOperation.subarray(declaringTypePart, lastDotPosition + 1, declaringTypePart.length);
                }
                else   {
                        declaringTypeSimpleName = declaringTypePart;
                }


Clone Instance
2
Line Count
22
Source Line
1611
Source File
plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchPattern.java

        try {
                typeSignature = Signature.createTypeSignature(type, false);
                if (typeSignature.indexOf(Signature.C_GENERIC_START) < 0) {
                        typePart = type.toCharArray();
                }
                else   {
                        typePart = Signature.toCharArray(Signature.getTypeErasure(typeSignature.toCharArray()));
                }
        }
        catch (IllegalArgumentException iae) {
                // string is not a valid type syntax
                return null;
        }
        // get qualification name
        int lastDotPosition = CharOperation.lastIndexOf('.', typePart);
        if (lastDotPosition >= 0) {
                qualificationChars = CharOperation.subarray(typePart, 0, lastDotPosition);
                if (qualificationChars.length == 1 && qualificationChars[0] == '*')
                        qualificationChars = null;
                typeChars = CharOperation.subarray(typePart, lastDotPosition + 1, typePart.length);
        }
        else   {
                typeChars = typePart;
        }


Clone AbstractionParameter Count: 5Parameter Bindings

try {
   [[#variableb4f7d6a0]]= Signature.createTypeSignature( [[#variableb4f7d640]], false);
  if ( [[#variableb4f7d6a0]].indexOf(Signature.C_GENERIC_START) < 0) {
     [[#variableb4f7d5a0]]= [[#variableb4f7d640]].toCharArray();
  }
  else {
     [[#variableb4f7d5a0]]= Signature.toCharArray(Signature.getTypeErasure( [[#variableb4f7d6a0]].toCharArray()));
  }
}
catch (IllegalArgumentException iae) {
  // string is not a valid type syntax
  // declaring type is invalid
  return null;
}
// get qualification name
int lastDotPosition = CharOperation.lastIndexOf('.',  [[#variableb4f7d5a0]]);
if (lastDotPosition >= 0) {
   [[#variableb9240520]]= CharOperation.subarray( [[#variableb4f7d5a0]], 0, lastDotPosition);
  if ( [[#variableb9240520]].length == 1 && [[#variableb9240520]][0] == '*')
     [[#variableb9240520]]= null;
   [[#variableb56221e0]]= CharOperation.subarray( [[#variableb4f7d5a0]], lastDotPosition + 1,  [[#variableb4f7d5a0]].length);
}
else {
   [[#variableb56221e0]]= [[#variableb4f7d5a0]];
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b4f7d6a0]]
typeSignature 
12[[#b4f7d6a0]]
declaringTypeSignature 
21[[#b4f7d640]]
type 
22[[#b4f7d640]]
declaringType 
31[[#b4f7d5a0]]
typePart 
32[[#b4f7d5a0]]
declaringTypePart 
41[[#b9240520]]
qualificationChars 
42[[#b9240520]]
declaringTypeQualification 
51[[#b56221e0]]
typeChars 
52[[#b56221e0]]
declaringTypeSimpleName