CloneSet260


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
39250.973block
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
139269
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
239312
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
Clone Instance
1
Line Count
39
Source Line
269
Source File
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;
                                                                      }


Clone Instance
2
Line Count
39
Source Line
312
Source File
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("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;
                                                     }


Clone AbstractionParameter Count: 5Parameter Bindings

{
  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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#52601ae0]]
"assertionEmulation" 
12[[#52601ae0]]
"enumConstantValues" 
21[[#52601a40]]
SYNTHETIC_ASSERT_DISABLED 
22[[#52601a40]]
SYNTHETIC_ENUM_VALUES 
31[[#526019e0]]
TypeBinding 
32[[#526019e0]]
this.scope 
41[[#52601aa0]]
.BOOLEAN 
42[[#52601aa0]]
.createArrayType(this, 1) 
51[[#52601a80]]
AccDefault 
52[[#52601a80]]
AccPrivate