| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 50 | 4 | 2 | 0.996 | class_body_declaration |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 50 | 622 | plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java |
| 2 | 50 | 728 | plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java |
| 3 | 50 | 840 | plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java |
| 4 | 50 | 909 | plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java |
| ||||
protected void consumeStaticImportOnDemandDeclarationName() {
// TypeImportOnDemandDeclarationName ::= 'import' 'static' Name '.' '*'
/* push an ImportRef build from the last name
stored in the identifier stack. */
int index;
/* no need to take action if not inside assist identifiers */
if ((index = indexOfAssistIdentifier()) < 0) {
super.consumeStaticImportOnDemandDeclarationName();
return;
}
/* retrieve identifiers subset and whole positions, the assist node positions
should include the entire replaced source. */
int length = identifierLengthStack[identifierLengthPtr];
char[][] subset = identifierSubSet(index + 1); // include the assistIdentifier
identifierLengthPtr--;
identifierPtr -= length;
long[] positions = new long[length];
System.arraycopy(
identifierPositionStack,
identifierPtr + 1,
positions,
0,
length );
/* build specific assist node on import statement */
ImportReference reference = this.createAssistImportReference(subset, positions, ClassFileConstants.AccStatic);
reference.onDemand = true;
assistNode = reference;
this.lastCheckPoint = reference.sourceEnd + 1;
pushOnAstStack(reference);
if (currentToken == TokenNameSEMICOLON) {
reference.declarationSourceEnd = scanner.currentPosition - 1;
}
else {
reference.declarationSourceEnd = (int) positions[length - 1];
}
//endPosition is just before the ;
reference.declarationSourceStart = intStack[intPtr-- ];
// flush annotations defined prior to import statements
reference.declarationSourceEnd = this.flushCommentsDefinedPriorTo(reference.declarationSourceEnd);
// recovery
if (currentElement != null) {
lastCheckPoint = reference.declarationSourceEnd + 1;
currentElement = currentElement.add(reference, 0);
lastIgnoredToken = -1;
restartRecovery = true; // used to avoid branching back into the regular automaton
}
}
|
| ||||
protected void consumeTypeImportOnDemandDeclarationName() {
// TypeImportOnDemandDeclarationName ::= 'import' Name '.' '*'
/* push an ImportRef build from the last name
stored in the identifier stack. */
int index;
/* no need to take action if not inside assist identifiers */
if ((index = indexOfAssistIdentifier()) < 0) {
super.consumeTypeImportOnDemandDeclarationName();
return;
}
/* retrieve identifiers subset and whole positions, the assist node positions
should include the entire replaced source. */
int length = identifierLengthStack[identifierLengthPtr];
char[][] subset = identifierSubSet(index + 1); // include the assistIdentifier
identifierLengthPtr--;
identifierPtr -= length;
long[] positions = new long[length];
System.arraycopy(
identifierPositionStack,
identifierPtr + 1,
positions,
0,
length );
/* build specific assist node on import statement */
ImportReference reference = this.createAssistImportReference(subset, positions, ClassFileConstants.AccDefault);
reference.onDemand = true;
assistNode = reference;
this.lastCheckPoint = reference.sourceEnd + 1;
pushOnAstStack(reference);
if (currentToken == TokenNameSEMICOLON) {
reference.declarationSourceEnd = scanner.currentPosition - 1;
}
else {
reference.declarationSourceEnd = (int) positions[length - 1];
}
//endPosition is just before the ;
reference.declarationSourceStart = intStack[intPtr-- ];
// flush comments defined prior to import statements
reference.declarationSourceEnd = this.flushCommentsDefinedPriorTo(reference.declarationSourceEnd);
// recovery
if (currentElement != null) {
lastCheckPoint = reference.declarationSourceEnd + 1;
currentElement = currentElement.add(reference, 0);
lastIgnoredToken = -1;
restartRecovery = true; // used to avoid branching back into the regular automaton
}
}
|
| ||||
protected void consumeStaticImportOnDemandDeclarationName() {
// TypeImportOnDemandDeclarationName ::= 'import' 'static' Name '.' '*'
/* push an ImportRef build from the last name
stored in the identifier stack. */
int index;
/* no need to take action if not inside assist identifiers */
if ((index = indexOfAssistIdentifier()) < 0) {
super.consumeStaticImportOnDemandDeclarationName();
return;
}
/* retrieve identifiers subset and whole positions, the assist node positions
should include the entire replaced source. */
int length = identifierLengthStack[identifierLengthPtr];
char[][] subset = identifierSubSet(index + 1); // include the assistIdentifier
identifierLengthPtr--;
identifierPtr -= length;
long[] positions = new long[length];
System.arraycopy(
identifierPositionStack,
identifierPtr + 1,
positions,
0,
length );
/* build specific assist node on import statement */
ImportReference reference = this.createAssistImportReference(subset, positions, ClassFileConstants.AccStatic);
reference.onDemand = true;
assistNode = reference;
this.lastCheckPoint = reference.sourceEnd + 1;
pushOnAstStack(reference);
if (currentToken == TokenNameSEMICOLON) {
reference.declarationSourceEnd = scanner.currentPosition - 1;
}
else {
reference.declarationSourceEnd = (int) positions[length - 1];
}
//endPosition is just before the ;
reference.declarationSourceStart = intStack[intPtr-- ];
// flush annotations defined prior to import statements
reference.declarationSourceEnd = this.flushCommentsDefinedPriorTo(reference.declarationSourceEnd);
// recovery
if (currentElement != null) {
lastCheckPoint = reference.declarationSourceEnd + 1;
currentElement = currentElement.add(reference, 0);
lastIgnoredToken = -1;
restartRecovery = true; // used to avoid branching back into the regular automaton
}
}
|
| ||||
protected void consumeTypeImportOnDemandDeclarationName() {
// TypeImportOnDemandDeclarationName ::= 'import' Name '.' '*'
/* push an ImportRef build from the last name
stored in the identifier stack. */
int index;
/* no need to take action if not inside assist identifiers */
if ((index = indexOfAssistIdentifier()) < 0) {
super.consumeTypeImportOnDemandDeclarationName();
return;
}
/* retrieve identifiers subset and whole positions, the assist node positions
should include the entire replaced source. */
int length = identifierLengthStack[identifierLengthPtr];
char[][] subset = identifierSubSet(index + 1); // include the assistIdentifier
identifierLengthPtr--;
identifierPtr -= length;
long[] positions = new long[length];
System.arraycopy(
identifierPositionStack,
identifierPtr + 1,
positions,
0,
length );
/* build specific assist node on import statement */
ImportReference reference = this.createAssistImportReference(subset, positions, ClassFileConstants.AccDefault);
reference.onDemand = true;
assistNode = reference;
this.lastCheckPoint = reference.sourceEnd + 1;
pushOnAstStack(reference);
if (currentToken == TokenNameSEMICOLON) {
reference.declarationSourceEnd = scanner.currentPosition - 1;
}
else {
reference.declarationSourceEnd = (int) positions[length - 1];
}
//endPosition is just before the ;
reference.declarationSourceStart = intStack[intPtr-- ];
// flush comments defined prior to import statements
reference.declarationSourceEnd = this.flushCommentsDefinedPriorTo(reference.declarationSourceEnd);
// recovery
if (currentElement != null) {
lastCheckPoint = reference.declarationSourceEnd + 1;
currentElement = currentElement.add(reference, 0);
lastIgnoredToken = -1;
restartRecovery = true; // used to avoid branching back into the regular automaton
}
}
|
| |||
protected void [[#variableb9a5f700]]() {
// TypeImportOnDemandDeclarationName ::= 'import' 'static' Name '.' '*'
// TypeImportOnDemandDeclarationName ::= 'import' Name '.' '*'
/* push an ImportRef build from the last name
stored in the identifier stack. */
int index;
/* no need to take action if not inside assist identifiers */
if ((index = indexOfAssistIdentifier()) < 0) {
super. [[#variableb9a5f700]]();
return;
}
/* retrieve identifiers subset and whole positions, the assist node positions
should include the entire replaced source. */
int length = identifierLengthStack[identifierLengthPtr];
char[][] subset = identifierSubSet(index + 1); // include the assistIdentifier
identifierLengthPtr--;
identifierPtr -= length;
long[] positions = new long[length];
System.arraycopy(identifierPositionStack, identifierPtr + 1, positions, 0, length);
/* build specific assist node on import statement */
ImportReference reference = this.createAssistImportReference(subset, positions, ClassFileConstants. [[#variableb9a5f4e0]]);
reference.onDemand = true;
assistNode = reference;
this.lastCheckPoint = reference.sourceEnd + 1;
pushOnAstStack(reference);
if (currentToken == TokenNameSEMICOLON) {
reference.declarationSourceEnd = scanner.currentPosition - 1;
}
else {
reference.declarationSourceEnd = (int) positions[length - 1];
}
//endPosition is just before the ;
reference.declarationSourceStart = intStack[intPtr-- ];
// flush annotations defined prior to import statements
// flush comments defined prior to import statements
reference.declarationSourceEnd = this.flushCommentsDefinedPriorTo(reference.declarationSourceEnd);
// recovery
if (currentElement != null) {
lastCheckPoint = reference.declarationSourceEnd + 1;
currentElement = currentElement.add(reference, 0);
lastIgnoredToken = -1;
restartRecovery = true; // used to avoid branching back into the regular automaton
}
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#b9a5f700]] | consumeStaticImportOnDemandDeclarationName |
| 1 | 2 | [[#b9a5f700]] | consumeTypeImportOnDemandDeclarationName |
| 1 | 3 | [[#b9a5f700]] | consumeStaticImportOnDemandDeclarationName |
| 1 | 4 | [[#b9a5f700]] | consumeTypeImportOnDemandDeclarationName |
| 2 | 1 | [[#b9a5f4e0]] | AccStatic |
| 2 | 2 | [[#b9a5f4e0]] | AccDefault |
| 2 | 3 | [[#b9a5f4e0]] | AccStatic |
| 2 | 4 | [[#b9a5f4e0]] | AccDefault |