CloneSet894


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
29240.951executable_statement
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12949
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FinallyFlowContext.java
22670
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/LoopingFlowContext.java
Clone Instance
1
Line Count
29
Source Line
49
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FinallyFlowContext.java

                                                   {
                VariableBinding variable = this.finalVariables[i];
                if (variable == null) continue ;

                boolean complained = false; // remember if have complained on this final assignment
                if (variable instanceof FieldBinding) {
                        // final field
                        if (flowInfo.isPotentiallyAssigned((FieldBinding) variable)) {
                                complained = true;
                                scope.problemReporter().duplicateInitializationOfBlankFinalField((FieldBinding) variable, finalAssignments[i]);
                        }
                }
                else   {
                        // final local variable
                        if (flowInfo.isPotentiallyAssigned((LocalVariableBinding) variable)) {
                                complained = true;
                                scope.problemReporter().duplicateInitializationOfFinalLocal(
                                        (LocalVariableBinding) variable, 
                                        this.finalAssignments[i]                           );
                        }
                }
                // any reference reported at this level is removed from the parent context 
                // where it could also be reported again
                if (complained) {
                        FlowContext currentContext = this.parent;
                        while (currentContext != null) {
                                //if (currentContext.isSubRoutine()) {
                                currentContext.removeFinalAssignmentIfAny(this.finalAssignments[i]);
                                //}
                                currentContext = currentContext.parent;
                        }
                }
                                                   }


Clone Instance
2
Line Count
26
Source Line
70
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/LoopingFlowContext.java

                                              {
                VariableBinding variable = finalVariables[i];
                if (variable == null) continue ;
                boolean complained = false; // remember if have complained on this final assignment
                if (variable instanceof FieldBinding) {
                        if (flowInfo.isPotentiallyAssigned((FieldBinding) variable)) {
                                complained = true;
                                scope.problemReporter().duplicateInitializationOfBlankFinalField(
                                        (FieldBinding) variable, 
                                        finalAssignments[i]                                     );
                        }
                }
                else   {
                        if (flowInfo.isPotentiallyAssigned((LocalVariableBinding) variable)) {
                                complained = true;
                                scope.problemReporter().duplicateInitializationOfFinalLocal(
                                        (LocalVariableBinding) variable, 
                                        finalAssignments[i]                                );
                        }
                }
                // any reference reported at this level is removed from the parent context where it 
                // could also be reported again
                if (complained) {
                        FlowContext context = parent;
                        while (context != null) {
                                context.removeFinalAssignmentIfAny(finalAssignments[i]);
                                context = context.parent;
                        }
                }
                                              }


Clone AbstractionParameter Count: 4Parameter Bindings

{
  VariableBinding variable = [[#variable9c944180]][i];
  if (variable == null)
    continue ;
  boolean complained = false; // remember if have complained on this final assignment
  if (variable instanceof FieldBinding) {
    // final field
    if (flowInfo.isPotentiallyAssigned((FieldBinding) variable)) {
      complained = true;
      scope.problemReporter().duplicateInitializationOfBlankFinalField((FieldBinding) variable, finalAssignments[i]);
    }
  }
  else {
    // final local variable
    if (flowInfo.isPotentiallyAssigned((LocalVariableBinding) variable)) {
      complained = true;
      scope.problemReporter().duplicateInitializationOfFinalLocal((LocalVariableBinding) variable,  [[#variable9c944120]][i]);
    }
  }
  // any reference reported at this level is removed from the parent context 
  // where it could also be reported again
  // any reference reported at this level is removed from the parent context where it 
  // could also be reported again
  if (complained) {
    FlowContext  [[#variable5d4c0c20]]= [[#variablebe8592e0]];
    while ( [[#variable5d4c0c20]]!= null) {
       [[#variable5d4c0c20]].removeFinalAssignmentIfAny( [[#variable9c944120]][i]);
       [[#variable5d4c0c20]]= [[#variable5d4c0c20]].parent;
    }
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#9c944180]]
this.finalVariables 
12[[#9c944180]]
finalVariables 
21[[#9c944120]]
this.finalAssignments 
22[[#9c944120]]
finalAssignments 
31[[#5d4c0c20]]
currentContext 
32[[#5d4c0c20]]
context 
41[[#be8592e0]]
this.parent 
42[[#be8592e0]]
parent