Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
23 | 2 | 4 | 0.963 | statement_sequence_member |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 23 | 221 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java |
2 | 23 | 194 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.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 ); } |
| ||||
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); } |
| |||
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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#526e65c0]] | initialization |
1 | 2 | [[#526e65c0]] | this.initialization |
2 | 1 | [[#526e6540]] | variableType |
2 | 2 | [[#526e6540]] | fieldType |
3 | 1 | [[#526e64a0]] | scope |
3 | 2 | [[#526e64a0]] | initializationScope |
4 | 1 | [[#526e63a0]] | this.initialization |
4 | 2 | [[#526e63a0]] | this |