CloneSet442


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
48201.000statement_sequence[11]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
14883
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
24796
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java
Clone Instance
1
Line Count
48
Source Line
83
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java

        int pc = codeStream.position;
        ReferenceBinding allocatedType = this.codegenBinding.declaringClass;

        codeStream.new_(allocatedType);
        if (valueRequired) {
                codeStream.dup();
        }
        // better highlight for allocation: display the type individually
        if (this.type != null) { // null for enum constant body
                codeStream.recordPositionsFrom(pc, this.type.sourceStart);
        }
        else   {
                // push enum constant name and ordinal
                codeStream.ldc(String.valueOf(enumConstant.name));
                codeStream.generateInlinedValue(enumConstant.binding.id);
        }
        // handling innerclass instance allocation - enclosing instance arguments
        if (allocatedType.isNestedType()) {
                codeStream.generateSyntheticEnclosingInstanceValues(
                        currentScope, 
                        allocatedType, 
                        enclosingInstance(), 
                        this                                       );
        }
        // generate the arguments for constructor
        generateArguments(binding, arguments, currentScope, codeStream);
        // handling innerclass instance allocation - outer local arguments
        if (allocatedType.isNestedType()) {
                codeStream.generateSyntheticOuterArgumentValues(
                        currentScope, 
                        allocatedType, 
                        this                                   );
        }
        // invoke constructor
        if (syntheticAccessor == null) {
                codeStream.invokespecial(this.codegenBinding);
        }
        else   {
                // synthetic accessor got some extra arguments appended to its signature, which need values
                for (int i = 0,
                        max = syntheticAccessor.parameters.length - this.codegenBinding.parameters.length;
                        i < max;
                        i++) {
                        codeStream.aconst_null();
                }
                codeStream.invokespecial(syntheticAccessor);
        }
        codeStream.generateImplicitConversion(this.implicitConversion);
        codeStream.recordPositionsFrom(pc, this.sourceStart);


Clone Instance
2
Line Count
47
Source Line
96
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java

                int pc = codeStream.position;
                ReferenceBinding allocatedType = this.codegenBinding.declaringClass;
                codeStream.new_(allocatedType);
                if (valueRequired) {
                        codeStream.dup();
                }
                // better highlight for allocation: display the type individually
                if (this.type != null) { // null for enum constant body
                        codeStream.recordPositionsFrom(pc, this.type.sourceStart);
                }
                else   {
                        // push enum constant name and ordinal
                        codeStream.ldc(String.valueOf(enumConstant.name));
                        codeStream.generateInlinedValue(enumConstant.binding.id);
                }
                // handling innerclass instance allocation - enclosing instance arguments
                if (allocatedType.isNestedType()) {
                        codeStream.generateSyntheticEnclosingInstanceValues(
                                currentScope, 
                                allocatedType, 
                                enclosingInstance(), 
                                this                                       );
                }
                // generate the arguments for constructor
                generateArguments(binding, arguments, currentScope, codeStream);
                // handling innerclass instance allocation - outer local arguments
                if (allocatedType.isNestedType()) {
                        codeStream.generateSyntheticOuterArgumentValues(
                                currentScope, 
                                allocatedType, 
                                this                                   );
                }
                // invoke constructor
                if (syntheticAccessor == null) {
                        codeStream.invokespecial(this.codegenBinding);
                }
                else   {
                        // synthetic accessor got some extra arguments appended to its signature, which need values
                        for (int i = 0,
                                max = syntheticAccessor.parameters.length - this.codegenBinding.parameters.length;
                                i < max;
                                i++) {
                                codeStream.aconst_null();
                        }
                        codeStream.invokespecial(syntheticAccessor);
                }
                codeStream.generateImplicitConversion(this.implicitConversion);
                codeStream.recordPositionsFrom(pc, this.sourceStart);


Clone AbstractionParameter Count: 0Parameter Bindings

int pc = codeStream.position;
ReferenceBinding allocatedType = this.codegenBinding.declaringClass;
codeStream.new_(allocatedType);
if (valueRequired) {
  codeStream.dup();
}
// better highlight for allocation: display the type individually
if (this.type != null) { // null for enum constant body
  codeStream.recordPositionsFrom(pc, this.type.sourceStart);
}
else {
  // push enum constant name and ordinal
  codeStream.ldc(String.valueOf(enumConstant.name));
  codeStream.generateInlinedValue(enumConstant.binding.id);
}
// handling innerclass instance allocation - enclosing instance arguments
if (allocatedType.isNestedType()) {
  codeStream.generateSyntheticEnclosingInstanceValues(currentScope, allocatedType, enclosingInstance(), this );
}
// generate the arguments for constructor
generateArguments(binding, arguments, currentScope, codeStream);
// handling innerclass instance allocation - outer local arguments
if (allocatedType.isNestedType()) {
  codeStream.generateSyntheticOuterArgumentValues(currentScope, allocatedType, this );
}
// invoke constructor
if (syntheticAccessor == null) {
  codeStream.invokespecial(this.codegenBinding);
}
else {
  // synthetic accessor got some extra arguments appended to its signature, which need values
  for (int i = 0, max = syntheticAccessor.parameters.length - this.codegenBinding.parameters.length; i < max; i++) {
    codeStream.aconst_null();
  }
  codeStream.invokespecial(syntheticAccessor);
}
codeStream.generateImplicitConversion(this.implicitConversion);
codeStream.recordPositionsFrom(pc, this.sourceStart);
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None