CloneSet35


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
59301.000executable_statement
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
159616
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
2591030
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
3592131
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
Clone Instance
1
Line Count
59
Source Line
616
Source File
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java

                                                                                                                                    {
                        // create an extended string literal equivalent => use the extended operands list
                        infixExpression.extendedOperands().add(convert(expression.right));
                        org.eclipse.jdt.internal.compiler.ast.Expression leftOperand = expression.left;
                        org.eclipse.jdt.internal.compiler.ast.Expression rightOperand = null;
                        do {
                                rightOperand = ((org.eclipse.jdt.internal.compiler.ast.BinaryExpression) leftOperand).right;
                                if ((((leftOperand.bits&  org.eclipse.jdt.internal.compiler.ast.ASTNode.OperatorMASK) >> org.eclipse.jdt.internal.compiler.ast.ASTNode.OperatorSHIFT) != expressionOperatorID &&
                                                           ((leftOperand.bits&  org.eclipse.jdt.internal.compiler.ast.ASTNode.ParenthesizedMASK) == 0)) ||
                                            ((rightOperand instanceof org.eclipse.jdt.internal.compiler.ast.BinaryExpression &&
                                                           ((rightOperand.bits&  org.eclipse.jdt.internal.compiler.ast.ASTNode.OperatorMASK) >> org.eclipse.jdt.internal.compiler.ast.ASTNode.OperatorSHIFT) != expressionOperatorID) &&
                                                           ((rightOperand.bits&  org.eclipse.jdt.internal.compiler.ast.ASTNode.ParenthesizedMASK) == 0))) {
                                        List extendedOperands = infixExpression.extendedOperands();
                                        InfixExpression temp = new InfixExpression(this.ast);
                                        if (this.resolveBindings) {
                                                this.recordNodes(temp, expression);
                                        }
                                        temp.setOperator(getOperatorFor(expressionOperatorID));
                                        Expression leftSide = convert(leftOperand);
                                        temp.setLeftOperand(leftSide);
                                        temp.setSourceRange(leftSide.getStartPosition(), leftSide.getLength());
                                        int size = extendedOperands.size();
                                        for (int i = 0; i < size - 1; i++) {
                                                Expression expr = temp;
                                                temp = new InfixExpression(this.ast);

                                                if (this.resolveBindings) {
                                                        this.recordNodes(temp, expression);
                                                }
                                                temp.setLeftOperand(expr);
                                                temp.setOperator(getOperatorFor(expressionOperatorID));
                                                temp.setSourceRange(expr.getStartPosition(), expr.getLength());
                                        }
                                        infixExpression = temp;
                                        for (int i = 0; i < size; i++) {
                                                Expression extendedOperand = (Expression) extendedOperands.remove(size - 1 - i);
                                                temp.setRightOperand(extendedOperand);
                                                int startPosition = temp.getLeftOperand().getStartPosition();
                                                temp.setSourceRange(startPosition, extendedOperand.getStartPosition() + extendedOperand.getLength() - startPosition);
                                                if (temp.getLeftOperand().getNodeType() == ASTNode.INFIX_EXPRESSION) {
                                                        temp = (InfixExpression) temp.getLeftOperand();
                                                }
                                        }
                                        int startPosition = infixExpression.getLeftOperand().getStartPosition();
                                        infixExpression.setSourceRange(startPosition, expression.sourceEnd - startPosition + 1);
                                        if (this.resolveBindings) {
                                                this.recordNodes(infixExpression, expression);
                                        }
                                        return infixExpression;
                                }
                                infixExpression.extendedOperands().add(0, convert(rightOperand));
                                leftOperand = ((org.eclipse.jdt.internal.compiler.ast.BinaryExpression) leftOperand).left;
                        }
                        while (  leftOperand instanceof org.eclipse.jdt.internal.compiler.ast.BinaryExpression && ((leftOperand.bits&  org.eclipse.jdt.internal.compiler.ast.ASTNode.ParenthesizedMASK) == 0));
                        Expression leftExpression = convert(leftOperand);
                        infixExpression.setLeftOperand(leftExpression);
                        infixExpression.setRightOperand((Expression) infixExpression.extendedOperands().remove(0));
                        int startPosition = leftExpression.getStartPosition();
                        infixExpression.setSourceRange(startPosition, expression.sourceEnd - startPosition + 1);
                        return infixExpression;
                                                                                                                                    }


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

                                                                                                                                    {
                        // create an extended string literal equivalent => use the extended operands list
                        infixExpression.extendedOperands().add(convert(expression.right));
                        org.eclipse.jdt.internal.compiler.ast.Expression leftOperand = expression.left;
                        org.eclipse.jdt.internal.compiler.ast.Expression rightOperand = null;
                        do {
                                rightOperand = ((org.eclipse.jdt.internal.compiler.ast.BinaryExpression) leftOperand).right;
                                if ((((leftOperand.bits&  org.eclipse.jdt.internal.compiler.ast.ASTNode.OperatorMASK) >> org.eclipse.jdt.internal.compiler.ast.ASTNode.OperatorSHIFT) != expressionOperatorID &&
                                                           ((leftOperand.bits&  org.eclipse.jdt.internal.compiler.ast.ASTNode.ParenthesizedMASK) == 0)) ||
                                            ((rightOperand instanceof org.eclipse.jdt.internal.compiler.ast.BinaryExpression &&
                                                           ((rightOperand.bits&  org.eclipse.jdt.internal.compiler.ast.ASTNode.OperatorMASK) >> org.eclipse.jdt.internal.compiler.ast.ASTNode.OperatorSHIFT) != expressionOperatorID) &&
                                                           ((rightOperand.bits&  org.eclipse.jdt.internal.compiler.ast.ASTNode.ParenthesizedMASK) == 0))) {
                                        List extendedOperands = infixExpression.extendedOperands();
                                        InfixExpression temp = new InfixExpression(this.ast);
                                        if (this.resolveBindings) {
                                                this.recordNodes(temp, expression);
                                        }
                                        temp.setOperator(getOperatorFor(expressionOperatorID));
                                        Expression leftSide = convert(leftOperand);
                                        temp.setLeftOperand(leftSide);
                                        temp.setSourceRange(leftSide.getStartPosition(), leftSide.getLength());
                                        int size = extendedOperands.size();
                                        for (int i = 0; i < size - 1; i++) {
                                                Expression expr = temp;
                                                temp = new InfixExpression(this.ast);

                                                if (this.resolveBindings) {
                                                        this.recordNodes(temp, expression);
                                                }
                                                temp.setLeftOperand(expr);
                                                temp.setOperator(getOperatorFor(expressionOperatorID));
                                                temp.setSourceRange(expr.getStartPosition(), expr.getLength());
                                        }
                                        infixExpression = temp;
                                        for (int i = 0; i < size; i++) {
                                                Expression extendedOperand = (Expression) extendedOperands.remove(size - 1 - i);
                                                temp.setRightOperand(extendedOperand);
                                                int startPosition = temp.getLeftOperand().getStartPosition();
                                                temp.setSourceRange(startPosition, extendedOperand.getStartPosition() + extendedOperand.getLength() - startPosition);
                                                if (temp.getLeftOperand().getNodeType() == ASTNode.INFIX_EXPRESSION) {
                                                        temp = (InfixExpression) temp.getLeftOperand();
                                                }
                                        }
                                        int startPosition = infixExpression.getLeftOperand().getStartPosition();
                                        infixExpression.setSourceRange(startPosition, expression.sourceEnd - startPosition + 1);
                                        if (this.resolveBindings) {
                                                this.recordNodes(infixExpression, expression);
                                        }
                                        return infixExpression;
                                }
                                infixExpression.extendedOperands().add(0, convert(rightOperand));
                                leftOperand = ((org.eclipse.jdt.internal.compiler.ast.BinaryExpression) leftOperand).left;
                        }
                        while (  leftOperand instanceof org.eclipse.jdt.internal.compiler.ast.BinaryExpression && ((leftOperand.bits&  org.eclipse.jdt.internal.compiler.ast.ASTNode.ParenthesizedMASK) == 0));
                        Expression leftExpression = convert(leftOperand);
                        infixExpression.setLeftOperand(leftExpression);
                        infixExpression.setRightOperand((Expression) infixExpression.extendedOperands().remove(0));
                        int startPosition = leftExpression.getStartPosition();
                        infixExpression.setSourceRange(startPosition, expression.sourceEnd - startPosition + 1);
                        return infixExpression;
                                                                                                                                    }


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

                                                                                                                                    {
                        // create an extended string literal equivalent => use the extended operands list
                        infixExpression.extendedOperands().add(convert(expression.right));
                        org.eclipse.jdt.internal.compiler.ast.Expression leftOperand = expression.left;
                        org.eclipse.jdt.internal.compiler.ast.Expression rightOperand = null;
                        do {
                                rightOperand = ((org.eclipse.jdt.internal.compiler.ast.BinaryExpression) leftOperand).right;
                                if ((((leftOperand.bits&  org.eclipse.jdt.internal.compiler.ast.ASTNode.OperatorMASK) >> org.eclipse.jdt.internal.compiler.ast.ASTNode.OperatorSHIFT) != expressionOperatorID &&
                                                           ((leftOperand.bits&  org.eclipse.jdt.internal.compiler.ast.ASTNode.ParenthesizedMASK) == 0)) ||
                                            ((rightOperand instanceof org.eclipse.jdt.internal.compiler.ast.BinaryExpression &&
                                                           ((rightOperand.bits&  org.eclipse.jdt.internal.compiler.ast.ASTNode.OperatorMASK) >> org.eclipse.jdt.internal.compiler.ast.ASTNode.OperatorSHIFT) != expressionOperatorID) &&
                                                           ((rightOperand.bits&  org.eclipse.jdt.internal.compiler.ast.ASTNode.ParenthesizedMASK) == 0))) {
                                        List extendedOperands = infixExpression.extendedOperands();
                                        InfixExpression temp = new InfixExpression(this.ast);
                                        if (this.resolveBindings) {
                                                this.recordNodes(temp, expression);
                                        }
                                        temp.setOperator(getOperatorFor(expressionOperatorID));
                                        Expression leftSide = convert(leftOperand);
                                        temp.setLeftOperand(leftSide);
                                        temp.setSourceRange(leftSide.getStartPosition(), leftSide.getLength());
                                        int size = extendedOperands.size();
                                        for (int i = 0; i < size - 1; i++) {
                                                Expression expr = temp;
                                                temp = new InfixExpression(this.ast);

                                                if (this.resolveBindings) {
                                                        this.recordNodes(temp, expression);
                                                }
                                                temp.setLeftOperand(expr);
                                                temp.setOperator(getOperatorFor(expressionOperatorID));
                                                temp.setSourceRange(expr.getStartPosition(), expr.getLength());
                                        }
                                        infixExpression = temp;
                                        for (int i = 0; i < size; i++) {
                                                Expression extendedOperand = (Expression) extendedOperands.remove(size - 1 - i);
                                                temp.setRightOperand(extendedOperand);
                                                int startPosition = temp.getLeftOperand().getStartPosition();
                                                temp.setSourceRange(startPosition, extendedOperand.getStartPosition() + extendedOperand.getLength() - startPosition);
                                                if (temp.getLeftOperand().getNodeType() == ASTNode.INFIX_EXPRESSION) {
                                                        temp = (InfixExpression) temp.getLeftOperand();
                                                }
                                        }
                                        int startPosition = infixExpression.getLeftOperand().getStartPosition();
                                        infixExpression.setSourceRange(startPosition, expression.sourceEnd - startPosition + 1);
                                        if (this.resolveBindings) {
                                                this.recordNodes(infixExpression, expression);
                                        }
                                        return infixExpression;
                                }
                                infixExpression.extendedOperands().add(0, convert(rightOperand));
                                leftOperand = ((org.eclipse.jdt.internal.compiler.ast.BinaryExpression) leftOperand).left;
                        }
                        while (  leftOperand instanceof org.eclipse.jdt.internal.compiler.ast.BinaryExpression && ((leftOperand.bits&  org.eclipse.jdt.internal.compiler.ast.ASTNode.ParenthesizedMASK) == 0));
                        Expression leftExpression = convert(leftOperand);
                        infixExpression.setLeftOperand(leftExpression);
                        infixExpression.setRightOperand((Expression) infixExpression.extendedOperands().remove(0));
                        int startPosition = leftExpression.getStartPosition();
                        infixExpression.setSourceRange(startPosition, expression.sourceEnd - startPosition + 1);
                        return infixExpression;
                                                                                                                                    }


Clone AbstractionParameter Count: 0Parameter Bindings

{
  // create an extended string literal equivalent => use the extended operands list
  infixExpression.extendedOperands().add(convert(expression.right));
  org.eclipse.jdt.internal.compiler.ast.Expression leftOperand = expression.left;
  org.eclipse.jdt.internal.compiler.ast.Expression rightOperand = null;
  do {
    rightOperand = ((org.eclipse.jdt.internal.compiler.ast.BinaryExpression) leftOperand).right;
    if ((((leftOperand.bits&org.eclipse.jdt.internal.compiler.ast.ASTNode.OperatorMASK) >> org.eclipse.jdt.internal.compiler.ast.ASTNode.OperatorSHIFT) != expressionOperatorID && ((leftOperand.bits&org.eclipse.jdt.internal.compiler.ast.ASTNode.ParenthesizedMASK) == 0)) || ((rightOperand instanceof org.eclipse.jdt.internal.compiler.ast.BinaryExpression && ((rightOperand.bits&org.eclipse.jdt.internal.compiler.ast.ASTNode.OperatorMASK) >> org.eclipse.jdt.internal.compiler.ast.ASTNode.OperatorSHIFT) != expressionOperatorID) && ((rightOperand.bits&org.eclipse.jdt.internal.compiler.ast.ASTNode.ParenthesizedMASK) == 0))) {
      List extendedOperands = infixExpression.extendedOperands();
      InfixExpression temp = new InfixExpression(this.ast);
      if (this.resolveBindings) {
        this.recordNodes(temp, expression);
      }
      temp.setOperator(getOperatorFor(expressionOperatorID));
      Expression leftSide = convert(leftOperand);
      temp.setLeftOperand(leftSide);
      temp.setSourceRange(leftSide.getStartPosition(), leftSide.getLength());
      int size = extendedOperands.size();
      for (int i = 0; i < size - 1; i++) {
        Expression expr = temp;
        temp = new InfixExpression(this.ast);
        if (this.resolveBindings) {
          this.recordNodes(temp, expression);
        }
        temp.setLeftOperand(expr);
        temp.setOperator(getOperatorFor(expressionOperatorID));
        temp.setSourceRange(expr.getStartPosition(), expr.getLength());
      }
      infixExpression = temp;
      for (int i = 0; i < size; i++) {
        Expression extendedOperand = (Expression) extendedOperands.remove(size - 1 - i);
        temp.setRightOperand(extendedOperand);
        int startPosition = temp.getLeftOperand().getStartPosition();
        temp.setSourceRange(startPosition, extendedOperand.getStartPosition() + extendedOperand.getLength() - startPosition);
        if (temp.getLeftOperand().getNodeType() == ASTNode.INFIX_EXPRESSION) {
          temp = (InfixExpression) temp.getLeftOperand();
        }
      }
      int startPosition = infixExpression.getLeftOperand().getStartPosition();
      infixExpression.setSourceRange(startPosition, expression.sourceEnd - startPosition + 1);
      if (this.resolveBindings) {
        this.recordNodes(infixExpression, expression);
      }
      return infixExpression;
    }
    infixExpression.extendedOperands().add(0, convert(rightOperand));
    leftOperand = ((org.eclipse.jdt.internal.compiler.ast.BinaryExpression) leftOperand).left;
  }
  while (leftOperand instanceof org.eclipse.jdt.internal.compiler.ast.BinaryExpression && ((leftOperand.bits&org.eclipse.jdt.internal.compiler.ast.ASTNode.ParenthesizedMASK) == 0));
  Expression leftExpression = convert(leftOperand);
  infixExpression.setLeftOperand(leftExpression);
  infixExpression.setRightOperand((Expression) infixExpression.extendedOperands().remove(0));
  int startPosition = leftExpression.getStartPosition();
  infixExpression.setSourceRange(startPosition, expression.sourceEnd - startPosition + 1);
  return infixExpression;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None