CloneSet455


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
19230.983class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
119355
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
219474
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
Clone Instance
1
Line Count
19
Source Line
355
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java

/* Add a new synthetic access method for read/write access to <targetField>.
        Answer the new method or the existing method if one already existed.
*/
public SyntheticMethodBinding addSyntheticMethod(FieldBinding targetField, boolean isReadAccess) {
        if (this.synthetics == null)
                this.synthetics = new HashMap[4];
        if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null)
                this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5);

        SyntheticMethodBinding accessMethod = null;
        SyntheticMethodBinding[] accessors = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(targetField);
        if (accessors == null) {
                accessMethod = new SyntheticMethodBinding(targetField, isReadAccess, this );
                this.synthetics[SourceTypeBinding.METHOD_EMUL].put(targetField, accessors = new SyntheticMethodBinding[2]);
                accessors[isReadAccess ? 0:  1] = accessMethod;
        }
        else   {
                if ((accessMethod = accessors[isReadAccess ? 0:  1]) == null) {
                        accessMethod = new SyntheticMethodBinding(targetField, isReadAccess, this );
                        accessors[isReadAccess ? 0:  1] = accessMethod;
                }
        }
        return accessMethod;
}


Clone Instance
2
Line Count
19
Source Line
474
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java

/* Add a new synthetic access method for access to <targetMethod>.
 * Must distinguish access method used for super access from others (need to use invokespecial bytecode)
        Answer the new method or the existing method if one already existed.
*/
public SyntheticMethodBinding addSyntheticMethod(MethodBinding targetMethod, boolean isSuperAccess) {
        if (this.synthetics == null)
                this.synthetics = new HashMap[4];
        if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null)
                this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5);

        SyntheticMethodBinding accessMethod = null;
        SyntheticMethodBinding[] accessors = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(targetMethod);
        if (accessors == null) {
                accessMethod = new SyntheticMethodBinding(targetMethod, isSuperAccess, this );
                this.synthetics[SourceTypeBinding.METHOD_EMUL].put(targetMethod, accessors = new SyntheticMethodBinding[2]);
                accessors[isSuperAccess ? 0:  1] = accessMethod;
        }
        else   {
                if ((accessMethod = accessors[isSuperAccess ? 0:  1]) == null) {
                        accessMethod = new SyntheticMethodBinding(targetMethod, isSuperAccess, this );
                        accessors[isSuperAccess ? 0:  1] = accessMethod;
                }
        }
        return accessMethod;
}


Clone AbstractionParameter Count: 3Parameter Bindings

/* Add a new synthetic access method for read/write access to <targetField>.
        Answer the new method or the existing method if one already existed.
*/
/* Add a new synthetic access method for access to <targetMethod>.
 * Must distinguish access method used for super access from others (need to use invokespecial bytecode)
        Answer the new method or the existing method if one already existed.
*/
public SyntheticMethodBinding addSyntheticMethod( [[#variable9c026320]]  [[#variable9c026280]], boolean  [[#variable9c026200]]) {
  if (this.synthetics == null)
    this.synthetics = new HashMap[4];
  if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null)
    this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5);
  SyntheticMethodBinding accessMethod = null;
  SyntheticMethodBinding[] accessors = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get( [[#variable9c026280]]);
  if (accessors == null) {
    accessMethod = new SyntheticMethodBinding( [[#variable9c026280]],  [[#variable9c026200]], this );
    this.synthetics[SourceTypeBinding.METHOD_EMUL].put( [[#variable9c026280]], accessors = new SyntheticMethodBinding[2]);
    accessors[ [[#variable9c026200]]? 0: 1] = accessMethod;
  }
  else {
    if ((accessMethod = accessors[ [[#variable9c026200]]? 0: 1]) == null) {
      accessMethod = new SyntheticMethodBinding( [[#variable9c026280]],  [[#variable9c026200]], this );
      accessors[ [[#variable9c026200]]? 0: 1] = accessMethod;
    }
  }
  return accessMethod;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#9c026320]]
FieldBinding 
12[[#9c026320]]
MethodBinding 
21[[#9c026280]]
targetField 
22[[#9c026280]]
targetMethod 
31[[#9c026200]]
isReadAccess 
32[[#9c026200]]
isSuperAccess