CloneSet215


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
33330.990class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1335058
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
2335094
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
3335130
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
Clone Instance
1
Line Count
33
Source Line
5058
Source File
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java

        protected void setTypeForSingleVariableDeclaration(SingleVariableDeclaration singleVariableDeclaration, Type type, int extraDimension) {
                if (extraDimension != 0) {
                        if (type.isArrayType()) {
                                ArrayType arrayType = (ArrayType) type;
                                int remainingDimensions = arrayType.getDimensions() - extraDimension;
                                if (remainingDimensions == 0)  {
                                        // the dimensions are after the name so the type of the fieldDeclaration is a simpleType
                                        Type elementType = arrayType.getElementType();
                                        // cut the child loose from its parent (without creating garbage)
                                        elementType.setParent(null, null);
                                        this.ast.getBindingResolver().updateKey(type, elementType);
                                        singleVariableDeclaration.setType(elementType);
                                }
                                else   {
                                        int start = type.getStartPosition();
                                        ArrayType subarrayType = arrayType;
                                        int index = extraDimension;
                                        while (index > 0) {
                                                subarrayType = (ArrayType) subarrayType.getComponentType();
                                                index--;
                                        }
                                        int end = retrieveProperRightBracketPosition(remainingDimensions, start);
                                        subarrayType.setSourceRange(start, end - start + 1);
                                        // cut the child loose from its parent (without creating garbage)
                                        subarrayType.setParent(null, null);
                                        updateInnerPositions(subarrayType, remainingDimensions);
                                        singleVariableDeclaration.setType(subarrayType);
                                        this.ast.getBindingResolver().updateKey(type, subarrayType);
                                }
                        }
                        else   {
                                singleVariableDeclaration.setType(type);
                        }
                }
                else   {
                        singleVariableDeclaration.setType(type);
                }
        }


Clone Instance
2
Line Count
33
Source Line
5094
Source File
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java

        protected void setTypeForVariableDeclarationExpression(VariableDeclarationExpression variableDeclarationExpression, Type type, int extraDimension) {
                if (extraDimension != 0) {
                        if (type.isArrayType()) {
                                ArrayType arrayType = (ArrayType) type;
                                int remainingDimensions = arrayType.getDimensions() - extraDimension;
                                if (remainingDimensions == 0)  {
                                        // the dimensions are after the name so the type of the fieldDeclaration is a simpleType
                                        Type elementType = arrayType.getElementType();
                                        // cut the child loose from its parent (without creating garbage)
                                        elementType.setParent(null, null);
                                        this.ast.getBindingResolver().updateKey(type, elementType);
                                        variableDeclarationExpression.setType(elementType);
                                }
                                else   {
                                        int start = type.getStartPosition();
                                        ArrayType subarrayType = arrayType;
                                        int index = extraDimension;
                                        while (index > 0) {
                                                subarrayType = (ArrayType) subarrayType.getComponentType();
                                                index--;
                                        }
                                        int end = retrieveProperRightBracketPosition(remainingDimensions, start);
                                        subarrayType.setSourceRange(start, end - start + 1);
                                        // cut the child loose from its parent (without creating garbage)
                                        subarrayType.setParent(null, null);
                                        updateInnerPositions(subarrayType, remainingDimensions);
                                        variableDeclarationExpression.setType(subarrayType);
                                        this.ast.getBindingResolver().updateKey(type, subarrayType);
                                }
                        }
                        else   {
                                variableDeclarationExpression.setType(type);
                        }
                }
                else   {
                        variableDeclarationExpression.setType(type);
                }
        }


Clone Instance
3
Line Count
33
Source Line
5130
Source File
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java

        protected void setTypeForVariableDeclarationStatement(VariableDeclarationStatement variableDeclarationStatement, Type type, int extraDimension) {
                if (extraDimension != 0) {
                        if (type.isArrayType()) {
                                ArrayType arrayType = (ArrayType) type;
                                int remainingDimensions = arrayType.getDimensions() - extraDimension;
                                if (remainingDimensions == 0)  {
                                        // the dimensions are after the name so the type of the fieldDeclaration is a simpleType
                                        Type elementType = arrayType.getElementType();
                                        // cut the child loose from its parent (without creating garbage)
                                        elementType.setParent(null, null);
                                        this.ast.getBindingResolver().updateKey(type, elementType);
                                        variableDeclarationStatement.setType(elementType);
                                }
                                else   {
                                        int start = type.getStartPosition();
                                        ArrayType subarrayType = arrayType;
                                        int index = extraDimension;
                                        while (index > 0) {
                                                subarrayType = (ArrayType) subarrayType.getComponentType();
                                                index--;
                                        }
                                        int end = retrieveProperRightBracketPosition(remainingDimensions, start);
                                        subarrayType.setSourceRange(start, end - start + 1);
                                        // cut the child loose from its parent (without creating garbage)
                                        subarrayType.setParent(null, null);
                                        updateInnerPositions(subarrayType, remainingDimensions);
                                        variableDeclarationStatement.setType(subarrayType);
                                        this.ast.getBindingResolver().updateKey(type, subarrayType);
                                }
                        }
                        else   {
                                variableDeclarationStatement.setType(type);
                        }
                }
                else   {
                        variableDeclarationStatement.setType(type);
                }
        }


Clone AbstractionParameter Count: 3Parameter Bindings

protected void [[#variable52f19a80]]( [[#variableb57ddea0]]  [[#variable52f19a20]], Type type, int extraDimension) {
  if (extraDimension != 0) {
    if (type.isArrayType()) {
      ArrayType arrayType = (ArrayType) type;
      int remainingDimensions = arrayType.getDimensions() - extraDimension;
      if (remainingDimensions == 0) {
        // the dimensions are after the name so the type of the fieldDeclaration is a simpleType
        Type elementType = arrayType.getElementType();
        // cut the child loose from its parent (without creating garbage)
        elementType.setParent(null, null);
        this.ast.getBindingResolver().updateKey(type, elementType);
         [[#variable52f19a20]].setType(elementType);
      }
      else {
        int start = type.getStartPosition();
        ArrayType subarrayType = arrayType;
        int index = extraDimension;
        while (index > 0) {
          subarrayType = (ArrayType) subarrayType.getComponentType();
          index--;
        }
        int end = retrieveProperRightBracketPosition(remainingDimensions, start);
        subarrayType.setSourceRange(start, end - start + 1);
        // cut the child loose from its parent (without creating garbage)
        subarrayType.setParent(null, null);
        updateInnerPositions(subarrayType, remainingDimensions);
         [[#variable52f19a20]].setType(subarrayType);
        this.ast.getBindingResolver().updateKey(type, subarrayType);
      }
    }
    else {
       [[#variable52f19a20]].setType(type);
    }
  }
  else {
     [[#variable52f19a20]].setType(type);
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#52f19a80]]
setTypeForSingleVariableDeclaration 
12[[#52f19a80]]
setTypeForVariableDeclarationExpression 
13[[#52f19a80]]
setTypeForVariableDeclarationStatement 
21[[#b57ddea0]]
SingleVariableDeclaration 
22[[#b57ddea0]]
VariableDeclarationExpression 
23[[#b57ddea0]]
VariableDeclarationStatement 
31[[#52f19a20]]
singleVariableDeclaration 
32[[#52f19a20]]
variableDeclarationExpression 
33[[#52f19a20]]
variableDeclarationStatement