CloneSet464


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
33260.989class_body_declarations[5]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
133214
plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ConstructorPattern.java
233244
plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodPattern.java
Clone Instance
1
Line Count
33
Source Line
214
Source File
plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ConstructorPattern.java

public void decodeIndexKey(char[] key) {
        int last = key.length - 1;
        this.parameterCount = 0;
        this.declaringSimpleName = null;
        int power = 1;
        for (int i = last; i >= 0; i--) {
                if (key[i] == SEPARATOR) {
                        System.arraycopy(key, 0, this.declaringSimpleName = new char[i], 0, i);
                        break;
                }
                if (i == last) {
                        this.parameterCount = key[i] - '0';
                }
                else   {
                        power *= 10;
                        this.parameterCount += power * (key[i] - '0');
                }
        }
}

public SearchPattern getBlankPattern() {
        return new ConstructorPattern(R_EXACT_MATCH|  R_CASE_SENSITIVE);
}

public char[][] getIndexCategories() {
        if (this.findReferences)
                return this.findDeclarations ? REF_AND_DECL_CATEGORIES:  REF_CATEGORIES;
        if (this.findDeclarations)
                return DECL_CATEGORIES;
        return CharOperation.NO_CHAR_CHAR;
}

boolean hasConstructorArguments() {
        return constructorArguments != null && constructorArguments.length > 0;
}

boolean hasConstructorParameters() {
        return constructorParameters;
}


Clone Instance
2
Line Count
33
Source Line
244
Source File
plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodPattern.java

public void decodeIndexKey(char[] key) {
        int last = key.length - 1;
        this.parameterCount = 0;
        this.selector = null;
        int power = 1;
        for (int i = last; i >= 0; i--) {
                if (key[i] == SEPARATOR) {
                        System.arraycopy(key, 0, this.selector = new char[i], 0, i);
                        break;
                }
                if (i == last) {
                        this.parameterCount = key[i] - '0';
                }
                else   {
                        power *= 10;
                        this.parameterCount += power * (key[i] - '0');
                }
        }
}

public SearchPattern getBlankPattern() {
        return new MethodPattern(R_EXACT_MATCH|  R_CASE_SENSITIVE);
}

public char[][] getIndexCategories() {
        if (this.findReferences)
                return this.findDeclarations ? REF_AND_DECL_CATEGORIES:  REF_CATEGORIES;
        if (this.findDeclarations)
                return DECL_CATEGORIES;
        return CharOperation.NO_CHAR_CHAR;
}

boolean hasMethodArguments() {
        return methodArguments != null && methodArguments.length > 0;
}

boolean hasMethodParameters() {
        return methodParameters;
}


Clone AbstractionParameter Count: 6Parameter Bindings

public void decodeIndexKey(char[] key) {
  int last = key.length - 1;
  this.parameterCount = 0;
  this. [[#variable76255760]]= null;
  int power = 1;
  for (int i = last; i >= 0; i--) {
    if (key[i] == SEPARATOR) {
      System.arraycopy(key, 0, this. [[#variable76255760]]= new char[i], 0, i);
      break;
    }
    if (i == last) {
      this.parameterCount = key[i] - '0';
    }
    else {
      power *= 10;
      this.parameterCount += power * (key[i] - '0');
    }
  }
}

public SearchPattern getBlankPattern() {
  return new [[#variable762556c0]](R_EXACT_MATCH|R_CASE_SENSITIVE);
}

public char[][] getIndexCategories() {
  if (this.findReferences)
    return this.findDeclarations ? REF_AND_DECL_CATEGORIES: REF_CATEGORIES;
  if (this.findDeclarations)
    return DECL_CATEGORIES;
  return CharOperation.NO_CHAR_CHAR;
}

boolean  [[#variable76255660]]() {
  return [[#variable76255560]]!= null && [[#variable76255560]].length > 0;
}

boolean  [[#variable76255480]]() {
  return [[#variable762554a0]];
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#76255760]]
declaringSimpleName 
12[[#76255760]]
selector 
21[[#762556c0]]
ConstructorPattern 
22[[#762556c0]]
MethodPattern 
31[[#76255660]]
hasConstructorArguments 
32[[#76255660]]
hasMethodArguments 
41[[#76255560]]
constructorArguments 
42[[#76255560]]
methodArguments 
51[[#76255480]]
hasConstructorParameters 
52[[#76255480]]
hasMethodParameters 
61[[#762554a0]]
constructorParameters 
62[[#762554a0]]
methodParameters