CloneSet518


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
23210.998statement_sequence[6]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
123802
plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java
22397
plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java
Clone Instance
1
Line Count
23
Source Line
802
Source File
plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java

                                        SwitchStatement switchStatement = new SwitchStatement();
                                        switchStatement.expression = this.expressionStack[this.expressionPtr - 1];
                                        if (this.astLengthPtr > -1 && this.astPtr > -1) {
                                                int length = this.astLengthStack[this.astLengthPtr];
                                                int newAstPtr = this.astPtr - length;
                                                ASTNode firstNode = this.astStack[newAstPtr + 1];
                                                if (length != 0 && firstNode.sourceStart > switchStatement.expression.sourceEnd) {
                                                        switchStatement.statements = new Statement[length + 1];
                                                        System.arraycopy(
                                                                this.astStack, 
                                                                newAstPtr + 1, 
                                                                switchStatement.statements, 
                                                                0, 
                                                                length  );
                                                }
                                        }
                                        CaseStatement caseStatement = new CaseStatement(expression, expression.sourceStart, expression.sourceEnd);
                                        if (switchStatement.statements == null) {
                                                switchStatement.statements = new Statement[] {
                                                                                              caseStatement
                                                                                             };
                                        }
                                        else   {
                                                switchStatement.statements[switchStatement.statements.length - 1] = caseStatement;
                                        }
                                        assistNodeParent = switchStatement;


Clone Instance
2
Line Count
23
Source Line
97
Source File
plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java

                                        SwitchStatement switchStatement = new SwitchStatement();
                                        switchStatement.expression = this.expressionStack[this.expressionPtr - 1];
                                        if (this.astLengthPtr > -1 && this.astPtr > -1) {
                                                int length = this.astLengthStack[this.astLengthPtr];
                                                int newAstPtr = this.astPtr - length;
                                                ASTNode firstNode = this.astStack[newAstPtr + 1];
                                                if (length != 0 && firstNode.sourceStart > switchStatement.expression.sourceEnd) {
                                                        switchStatement.statements = new Statement[length + 1];
                                                        System.arraycopy(
                                                                this.astStack, 
                                                                newAstPtr + 1, 
                                                                switchStatement.statements, 
                                                                0, 
                                                                length  );
                                                }
                                        }
                                        CaseStatement caseStatement = new CaseStatement(expression, expression.sourceStart, expression.sourceEnd);
                                        if (switchStatement.statements == null) {
                                                switchStatement.statements = new Statement[] {
                                                                                              caseStatement
                                                                                             };
                                        }
                                        else   {
                                                switchStatement.statements[switchStatement.statements.length - 1] = caseStatement;
                                        }
                                        parentNode = switchStatement;


Clone AbstractionParameter Count: 1Parameter Bindings

SwitchStatement switchStatement = new SwitchStatement();
switchStatement.expression = this.expressionStack[this.expressionPtr - 1];
if (this.astLengthPtr > -1 && this.astPtr > -1) {
  int length = this.astLengthStack[this.astLengthPtr];
  int newAstPtr = this.astPtr - length;
  ASTNode firstNode = this.astStack[newAstPtr + 1];
  if (length != 0 && firstNode.sourceStart > switchStatement.expression.sourceEnd) {
    switchStatement.statements = new Statement[length + 1];
    System.arraycopy(this.astStack, newAstPtr + 1, switchStatement.statements, 0, length);
  }
}
CaseStatement caseStatement = new CaseStatement(expression, expression.sourceStart, expression.sourceEnd);
if (switchStatement.statements == null) {
  switchStatement.statements = new Statement[] {
                                                 caseStatement
                                               };
}
else {
  switchStatement.statements[switchStatement.statements.length - 1] = caseStatement;
}
 [[#variablea18cf2a0]]= switchStatement;
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#a18cf2a0]]
assistNodeParent 
12[[#a18cf2a0]]
parentNode