CloneSet313


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
23240.963statement_sequence_member
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
123221
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java
223194
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
Clone Instance
1
Line Count
23
Source Line
221
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java

                                                if (this.initialization.isConstantValueOfTypeAssignableToType(initializationType, fieldType) ||
                                                                   (fieldType.isBaseType() && BaseTypeBinding.isWidening(fieldType.id, initializationType.id)) ||
                                                                   initializationType.isCompatibleWith(fieldType)) {
                                                        this.initialization.computeConversion(initializationScope, fieldType, initializationType);
                                                        if (initializationType.needsUncheckedConversion(fieldType)) {
                                                                    initializationScope.problemReporter().unsafeTypeConversion(this.initialization, initializationType, fieldType);
                                                        }
                                                        if (this.initialization instanceof CastExpression &&
                                                                           (this.initialization.bits&  ASTNode.UnnecessaryCast) == 0) {
                                                                CastExpression.checkNeedForAssignedCast(initializationScope, fieldType, (CastExpression) this.initialization);
                                                        }
                                                }
                                                else   if (initializationScope.isBoxingCompatibleWith(initializationType, fieldType) ||
                                                                                           (initializationType.isBaseType()  // narrowing then boxing ?
                                                                                            &&             initializationScope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5 // autoboxing
                                                                                            &&             !fieldType.isBaseType() &&
                                                                                                           initialization.isConstantValueOfTypeAssignableToType(initializationType, initializationScope.environment().computeBoxingType(fieldType)))) {
                                                        this.initialization.computeConversion(initializationScope, fieldType, initializationType);
                                                        if (this.initialization instanceof CastExpression &&
                                                                           (this.initialization.bits&  ASTNode.UnnecessaryCast) == 0) {
                                                                CastExpression.checkNeedForAssignedCast(initializationScope, fieldType, (CastExpression) this.initialization);
                                                        }
                                                       }
                                                       else {
                                                        initializationScope.problemReporter().typeMismatchError(initializationType, fieldType, this );
                                                       }


Clone Instance
2
Line Count
23
Source Line
194
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java

                                        if (initialization.isConstantValueOfTypeAssignableToType(initializationType, variableType) ||
                                                   (variableType.isBaseType() && BaseTypeBinding.isWidening(variableType.id, initializationType.id)) ||
                                                   initializationType.isCompatibleWith(variableType)) {
                                                this.initialization.computeConversion(scope, variableType, initializationType);
                                                if (initializationType.needsUncheckedConversion(variableType)) {
                                                    scope.problemReporter().unsafeTypeConversion(this.initialization, initializationType, variableType);
                                                }
                                                if (this.initialization instanceof CastExpression &&
                                                                   (this.initialization.bits&  ASTNode.UnnecessaryCast) == 0) {
                                                        CastExpression.checkNeedForAssignedCast(scope, variableType, (CastExpression) this.initialization);
                                                }
                                        }
                                        else   if (scope.isBoxingCompatibleWith(initializationType, variableType) ||
                                                                                   (initializationType.isBaseType()  // narrowing then boxing ?
                                                                                    &&             scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5 // autoboxing
                                                                                    &&             !variableType.isBaseType() &&
                                                                                                   initialization.isConstantValueOfTypeAssignableToType(initializationType, scope.environment().computeBoxingType(variableType)))) {
                                                this.initialization.computeConversion(scope, variableType, initializationType);
                                                if (this.initialization instanceof CastExpression &&
                                                                   (this.initialization.bits&  ASTNode.UnnecessaryCast) == 0) {
                                                        CastExpression.checkNeedForAssignedCast(scope, variableType, (CastExpression) this.initialization);
                                                }
                                               }
                                               else {
                                                scope.problemReporter().typeMismatchError(initializationType, variableType, this.initialization);
                                               }


Clone AbstractionParameter Count: 4Parameter Bindings

if ( [[#variable526e65c0]].isConstantValueOfTypeAssignableToType(initializationType,  [[#variable526e6540]]) || ( [[#variable526e6540]].isBaseType() && BaseTypeBinding.isWidening( [[#variable526e6540]].id, initializationType.id)) || initializationType.isCompatibleWith( [[#variable526e6540]])) {
  this.initialization.computeConversion( [[#variable526e64a0]],  [[#variable526e6540]], initializationType);
  if (initializationType.needsUncheckedConversion( [[#variable526e6540]])) {
     [[#variable526e64a0]].problemReporter().unsafeTypeConversion(this.initialization, initializationType,  [[#variable526e6540]]);
  }
  if (this.initialization instanceof CastExpression && (this.initialization.bits&ASTNode.UnnecessaryCast) == 0) {
    CastExpression.checkNeedForAssignedCast( [[#variable526e64a0]],  [[#variable526e6540]], (CastExpression) this.initialization);
  }
}
else
  if ( [[#variable526e64a0]].isBoxingCompatibleWith(initializationType,  [[#variable526e6540]]) || (initializationType.isBaseType() // narrowing then boxing ?
                                                                                                    && [[#variable526e64a0]].compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5 // autoboxing
                                                                                                    && ! [[#variable526e6540]].isBaseType() && initialization.isConstantValueOfTypeAssignableToType(initializationType,  [[#variable526e64a0]].environment().computeBoxingType( [[#variable526e6540]])))) {
    this.initialization.computeConversion( [[#variable526e64a0]],  [[#variable526e6540]], initializationType);
    if (this.initialization instanceof CastExpression && (this.initialization.bits&ASTNode.UnnecessaryCast) == 0) {
      CastExpression.checkNeedForAssignedCast( [[#variable526e64a0]],  [[#variable526e6540]], (CastExpression) this.initialization);
    }
  }
  else {
     [[#variable526e64a0]].problemReporter().typeMismatchError(initializationType,  [[#variable526e6540]],  [[#variable526e63a0]]);
  }
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#526e65c0]]
initialization 
12[[#526e65c0]]
this.initialization 
21[[#526e6540]]
variableType 
22[[#526e6540]]
fieldType 
31[[#526e64a0]]
scope 
32[[#526e64a0]]
initializationScope 
41[[#526e63a0]]
this.initialization 
42[[#526e63a0]]
this