| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 19 | 2 | 3 | 0.983 | class_body_declaration |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 19 | 355 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java |
| 2 | 19 | 474 | 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;
}
|
| ||||
/* 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;
}
|
| |||
/* 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 Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#9c026320]] | FieldBinding |
| 1 | 2 | [[#9c026320]] | MethodBinding |
| 2 | 1 | [[#9c026280]] | targetField |
| 2 | 2 | [[#9c026280]] | targetMethod |
| 3 | 1 | [[#9c026200]] | isReadAccess |
| 3 | 2 | [[#9c026200]] | isSuperAccess |