Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
17 | 2 | 5 | 0.954 | executable_statement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 17 | 230 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java |
2 | 17 | 208 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OR_OR_Expression.java |
| ||||
{ left.generateOptimizedBoolean(currentScope, codeStream, null, falseLabel, !leftIsConst); // need value, e.g. if (a == 1 && ((b = 2) > 0)) {} -> shouldn't initialize 'b' if a!=1 if (leftIsConst && !leftIsTrue) { codeStream.goto_(falseLabel); codeStream.updateLastRecordedEndPC(currentScope, codeStream.position); break generateOperands; // no need to generate right operand } if (rightInitStateIndex != -1) { codeStream. addDefinitelyAssignedVariables(currentScope, rightInitStateIndex); } right.generateOptimizedBoolean(currentScope, codeStream, null, falseLabel, valueRequired && !rightIsConst); if (valueRequired && rightIsConst && !rightIsTrue) { codeStream.goto_(falseLabel); codeStream.updateLastRecordedEndPC(currentScope, codeStream.position); } } |
| ||||
{ // implicit falling through the FALSE case left.generateOptimizedBoolean(currentScope, codeStream, trueLabel, null, !leftIsConst); // need value, e.g. if (a == 1 || ((b = 2) > 0)) {} -> shouldn't initialize 'b' if a==1 if (leftIsConst && leftIsTrue) { codeStream.goto_(trueLabel); codeStream.updateLastRecordedEndPC(currentScope, codeStream.position); break generateOperands; // no need to generate right operand } if (rightInitStateIndex != -1) { codeStream. addDefinitelyAssignedVariables(currentScope, rightInitStateIndex); } right.generateOptimizedBoolean(currentScope, codeStream, trueLabel, null, valueRequired && !rightIsConst); if (valueRequired && rightIsConst && rightIsTrue) { codeStream.goto_(trueLabel); codeStream.updateLastRecordedEndPC(currentScope, codeStream.position); } } |
| |||
{ // implicit falling through the FALSE case left.generateOptimizedBoolean(currentScope, codeStream, [[#variable59cbf360]], [[#variable59cbf2a0]], !leftIsConst); // need value, e.g. if (a == 1 && ((b = 2) > 0)) {} -> shouldn't initialize 'b' if a!=1 // need value, e.g. if (a == 1 || ((b = 2) > 0)) {} -> shouldn't initialize 'b' if a==1 if (leftIsConst && [[#variable59cbf240]]) { codeStream.goto_( [[#variable59cbf1e0]]); codeStream.updateLastRecordedEndPC(currentScope, codeStream.position); break generateOperands; // no need to generate right operand } if (rightInitStateIndex != -1) { codeStream.addDefinitelyAssignedVariables(currentScope, rightInitStateIndex); } right.generateOptimizedBoolean(currentScope, codeStream, [[#variable59cbf360]], [[#variable59cbf2a0]], valueRequired && !rightIsConst); if (valueRequired && rightIsConst && [[#variable59cbf160]]) { codeStream.goto_( [[#variable59cbf1e0]]); codeStream.updateLastRecordedEndPC(currentScope, codeStream.position); } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#59cbf360]] | null |
1 | 2 | [[#59cbf360]] | trueLabel |
2 | 1 | [[#59cbf2a0]] | falseLabel |
2 | 2 | [[#59cbf2a0]] | null |
3 | 1 | [[#59cbf240]] | !leftIsTrue |
3 | 2 | [[#59cbf240]] | leftIsTrue |
4 | 1 | [[#59cbf1e0]] | falseLabel |
4 | 2 | [[#59cbf1e0]] | trueLabel |
5 | 1 | [[#59cbf160]] | !rightIsTrue |
5 | 2 | [[#59cbf160]] | rightIsTrue |