| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 39 | 2 | 5 | 0.973 | block |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 39 | 269 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java |
| 2 | 39 | 312 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java |
| ||||
{
if (this.synthetics == null)
this.synthetics = new HashMap[4];
if (this.synthetics[SourceTypeBinding.FIELD_EMUL] == null)
this.synthetics[SourceTypeBinding.FIELD_EMUL] = new HashMap(5);
FieldBinding synthField = (FieldBinding) this.synthetics[SourceTypeBinding.FIELD_EMUL].get("assertionEmulation"); //$NON-NLS-1$
if (synthField == null) {
synthField = new SyntheticFieldBinding(
TypeConstants.SYNTHETIC_ASSERT_DISABLED,
TypeBinding.BOOLEAN,
ClassFileConstants.AccDefault| ClassFileConstants.AccStatic| ClassFileConstants.AccSynthetic| ClassFileConstants.AccFinal,
this,
Constant.NotAConstant,
this.synthetics[SourceTypeBinding.FIELD_EMUL].size());
this.synthetics[SourceTypeBinding.FIELD_EMUL].put("assertionEmulation", synthField); //$NON-NLS-1$
}
// ensure there is not already such a field defined by the user
// ensure there is not already such a field defined by the user
boolean needRecheck;
int index = 0;
do {
needRecheck = false;
FieldBinding existingField;
if ((existingField = this.getField(synthField.name, true
/*resolve*/
)) != null) {
TypeDeclaration typeDecl = this.scope.referenceContext;
for (int i = 0, max = typeDecl.fields.length; i < max; i++) {
FieldDeclaration fieldDecl = typeDecl.fields[i];
if (fieldDecl.binding == existingField) {
synthField.name = CharOperation.concat(
TypeConstants.SYNTHETIC_ASSERT_DISABLED,
("_" + String.valueOf(index++)).toCharArray()); //$NON-NLS-1$
needRecheck = true;
break;
}
}
}
}
while ( needRecheck);
return synthField;
}
|
| ||||
{
if (this.synthetics == null)
this.synthetics = new HashMap[4];
if (this.synthetics[SourceTypeBinding.FIELD_EMUL] == null)
this.synthetics[SourceTypeBinding.FIELD_EMUL] = new HashMap(5);
FieldBinding synthField = (FieldBinding) this.synthetics[SourceTypeBinding.FIELD_EMUL].get("enumConstantValues"); //$NON-NLS-1$
if (synthField == null) {
synthField = new SyntheticFieldBinding(
TypeConstants.SYNTHETIC_ENUM_VALUES,
this.scope.createArrayType(this, 1),
ClassFileConstants.AccPrivate| ClassFileConstants.AccStatic| ClassFileConstants.AccSynthetic| ClassFileConstants.AccFinal,
this,
Constant.NotAConstant,
this.synthetics[SourceTypeBinding.FIELD_EMUL].size());
this.synthetics[SourceTypeBinding.FIELD_EMUL].put("enumConstantValues", synthField); //$NON-NLS-1$
}
// ensure there is not already such a field defined by the user
// ensure there is not already such a field defined by the user
boolean needRecheck;
int index = 0;
do {
needRecheck = false;
FieldBinding existingField;
if ((existingField = this.getField(synthField.name, true
/*resolve*/
)) != null) {
TypeDeclaration typeDecl = this.scope.referenceContext;
for (int i = 0, max = typeDecl.fields.length; i < max; i++) {
FieldDeclaration fieldDecl = typeDecl.fields[i];
if (fieldDecl.binding == existingField) {
synthField.name = CharOperation.concat(
TypeConstants.SYNTHETIC_ENUM_VALUES,
("_" + String.valueOf(index++)).toCharArray()); //$NON-NLS-1$
needRecheck = true;
break;
}
}
}
}
while ( needRecheck);
return synthField;
}
|
| |||
{
if (this.synthetics == null)
this.synthetics = new HashMap[4];
if (this.synthetics[SourceTypeBinding.FIELD_EMUL] == null)
this.synthetics[SourceTypeBinding.FIELD_EMUL] = new HashMap(5);
FieldBinding synthField = (FieldBinding) this.synthetics[SourceTypeBinding.FIELD_EMUL].get( [[#variable52601ae0]]); //$NON-NLS-1$
if (synthField == null) {
synthField = new SyntheticFieldBinding(TypeConstants. [[#variable52601a40]], [[#variable526019e0]] [[#variable52601aa0]], ClassFileConstants. [[#variable52601a80]]|ClassFileConstants.AccStatic|ClassFileConstants.AccSynthetic|ClassFileConstants.AccFinal, this, Constant.NotAConstant, this.synthetics[SourceTypeBinding.FIELD_EMUL].size());
this.synthetics[SourceTypeBinding.FIELD_EMUL].put( [[#variable52601ae0]], synthField); //$NON-NLS-1$
}
// ensure there is not already such a field defined by the user
// ensure there is not already such a field defined by the user
boolean needRecheck;
int index = 0;
do {
needRecheck = false;
FieldBinding existingField;
if ((existingField = this.getField(synthField.name, true
/*resolve*/
)) != null) {
TypeDeclaration typeDecl = this.scope.referenceContext;
for (int i = 0, max = typeDecl.fields.length; i < max; i++) {
FieldDeclaration fieldDecl = typeDecl.fields[i];
if (fieldDecl.binding == existingField) {
synthField.name = CharOperation.concat(TypeConstants. [[#variable52601a40]], ("_" + String.valueOf(index++)).toCharArray()); //$NON-NLS-1$
needRecheck = true;
break;
}
}
}
}
while (needRecheck);
return synthField;
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#52601ae0]] | "assertionEmulation" |
| 1 | 2 | [[#52601ae0]] | "enumConstantValues" |
| 2 | 1 | [[#52601a40]] | SYNTHETIC_ASSERT_DISABLED |
| 2 | 2 | [[#52601a40]] | SYNTHETIC_ENUM_VALUES |
| 3 | 1 | [[#526019e0]] | TypeBinding |
| 3 | 2 | [[#526019e0]] | this.scope |
| 4 | 1 | [[#52601aa0]] | .BOOLEAN |
| 4 | 2 | [[#52601aa0]] | .createArrayType(this, 1) |
| 5 | 1 | [[#52601a80]] | AccDefault |
| 5 | 2 | [[#52601a80]] | AccPrivate |