| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 29 | 2 | 4 | 0.951 | executable_statement |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 29 | 49 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FinallyFlowContext.java |
| 2 | 26 | 70 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/LoopingFlowContext.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;
}
}
}
|
| ||||
{
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;
}
}
}
|
| |||
{
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 Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#9c944180]] | this.finalVariables |
| 1 | 2 | [[#9c944180]] | finalVariables |
| 2 | 1 | [[#9c944120]] | this.finalAssignments |
| 2 | 2 | [[#9c944120]] | finalAssignments |
| 3 | 1 | [[#5d4c0c20]] | currentContext |
| 3 | 2 | [[#5d4c0c20]] | context |
| 4 | 1 | [[#be8592e0]] | this.parent |
| 4 | 2 | [[#be8592e0]] | parent |