| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 9 | 2 | 1 | 0.989 | statement_sequence_member |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 9 | 66 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java |
| 2 | 9 | 230 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java |
| ||||
// check if accessing enum static field in initializer
if (declaringClass.isEnum()) {
MethodScope methodScope = currentScope.methodScope();
SourceTypeBinding sourceType = methodScope.enclosingSourceType();
if (lastFieldBinding.isStatic() &&
(sourceType == declaringClass || sourceType.superclass == declaringClass) // enum constant body
&& lastFieldBinding.constant() == Constant.NotAConstant &&
!methodScope.isStatic &&
methodScope.isInsideInitializerOrConstructor()) {
currentScope.problemReporter().enumStaticFieldUsedDuringInitialization(lastFieldBinding, this );
}
}
|
| ||||
// check if accessing enum static field in initializer
if (declaringClass.isEnum()) {
MethodScope methodScope = currentScope.methodScope();
SourceTypeBinding sourceType = methodScope.enclosingSourceType();
if (fieldBinding.isStatic() &&
(sourceType == declaringClass || sourceType.superclass == declaringClass) // enum constant body
&& fieldBinding.constant() == Constant.NotAConstant &&
!methodScope.isStatic &&
methodScope.isInsideInitializerOrConstructor()) {
currentScope.problemReporter().enumStaticFieldUsedDuringInitialization(fieldBinding, this );
}
}
|
| |||
// check if accessing enum static field in initializer
if (declaringClass.isEnum()) {
MethodScope methodScope = currentScope.methodScope();
SourceTypeBinding sourceType = methodScope.enclosingSourceType();
if ( [[#variableb3132060]].isStatic() && (sourceType == declaringClass || sourceType.superclass == declaringClass) // enum constant body
&& [[#variableb3132060]].constant() == Constant.NotAConstant && !methodScope.isStatic && methodScope.isInsideInitializerOrConstructor()) {
currentScope.problemReporter().enumStaticFieldUsedDuringInitialization( [[#variableb3132060]], this );
}
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#b3132060]] | lastFieldBinding |
| 1 | 2 | [[#b3132060]] | fieldBinding |