| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 23 | 2 | 1 | 0.998 | statement_sequence[6] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 23 | 802 | plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java |
| 2 | 23 | 97 | 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;
}
assistNodeParent = switchStatement;
|
| ||||
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;
|
| |||
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 Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#a18cf2a0]] | assistNodeParent |
| 1 | 2 | [[#a18cf2a0]] | parentNode |