Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
32 | 2 | 5 | 0.966 | statement_sequence_member |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 32 | 137 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java |
2 | 32 | 140 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OR_OR_Expression.java |
| ||||
/* * improving code gen for such a case: boolean b = i < 0 && false since * the label has never been used, we have the inlined value on the * stack. */ if (valueRequired) { if (leftIsConst && !leftIsTrue) { codeStream.iconst_0(); codeStream.updateLastRecordedEndPC(currentScope, codeStream.position); } else { if (rightIsConst && !rightIsTrue) { codeStream.iconst_0(); codeStream.updateLastRecordedEndPC(currentScope, codeStream.position); } else { codeStream.iconst_1(); } if (falseLabel.forwardReferenceCount > 0) { if ((bits& IsReturnedValue) != 0) { codeStream.generateImplicitConversion(this.implicitConversion); codeStream.generateReturnBytecode(this ); falseLabel.place(); codeStream.iconst_0(); } else { codeStream.goto_(endLabel = new BranchLabel(codeStream)); codeStream.decrStackSize(1); falseLabel.place(); codeStream.iconst_0(); endLabel.place(); } } else { falseLabel.place(); } } codeStream.generateImplicitConversion(implicitConversion); codeStream.updateLastRecordedEndPC(currentScope, codeStream.position); } else { falseLabel.place(); } |
| ||||
/* * improving code gen for such a case: boolean b = i < 0 || true since * the label has never been used, we have the inlined value on the * stack. */ if (valueRequired) { if (leftIsConst && leftIsTrue) { codeStream.iconst_1(); codeStream.updateLastRecordedEndPC(currentScope, codeStream.position); } else { if (rightIsConst && rightIsTrue) { codeStream.iconst_1(); codeStream.updateLastRecordedEndPC(currentScope, codeStream.position); } else { codeStream.iconst_0(); } if (trueLabel.forwardReferenceCount > 0) { if ((bits& IsReturnedValue) != 0) { codeStream.generateImplicitConversion(this.implicitConversion); codeStream.generateReturnBytecode(this ); trueLabel.place(); codeStream.iconst_1(); } else { codeStream.goto_(endLabel = new BranchLabel(codeStream)); codeStream.decrStackSize(1); trueLabel.place(); codeStream.iconst_1(); endLabel.place(); } } else { trueLabel.place(); } } codeStream.generateImplicitConversion(implicitConversion); codeStream.updateLastRecordedEndPC(currentScope, codeStream.position); } else { trueLabel.place(); } |
| |||
/* * improving code gen for such a case: boolean b = i < 0 && false since * the label has never been used, we have the inlined value on the * stack. */ /* * improving code gen for such a case: boolean b = i < 0 || true since * the label has never been used, we have the inlined value on the * stack. */ if (valueRequired) { if (leftIsConst && [[#variable52be8ae0]]) { codeStream. [[#variable52be8a20]](); codeStream.updateLastRecordedEndPC(currentScope, codeStream.position); } else { if (rightIsConst && [[#variable52be8980]]) { codeStream. [[#variable52be8a20]](); codeStream.updateLastRecordedEndPC(currentScope, codeStream.position); } else { codeStream. [[#variable52be89e0]](); } if ( [[#variable52be89c0]].forwardReferenceCount > 0) { if ((bits&IsReturnedValue) != 0) { codeStream.generateImplicitConversion(this.implicitConversion); codeStream.generateReturnBytecode(this ); [[#variable52be89c0]].place(); codeStream. [[#variable52be8a20]](); } else { codeStream.goto_(endLabel = new BranchLabel(codeStream)); codeStream.decrStackSize(1); [[#variable52be89c0]].place(); codeStream. [[#variable52be8a20]](); endLabel.place(); } } else { [[#variable52be89c0]].place(); } } codeStream.generateImplicitConversion(implicitConversion); codeStream.updateLastRecordedEndPC(currentScope, codeStream.position); } else { [[#variable52be89c0]].place(); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#52be8ae0]] | !leftIsTrue |
1 | 2 | [[#52be8ae0]] | leftIsTrue |
2 | 1 | [[#52be8a20]] | iconst_0 |
2 | 2 | [[#52be8a20]] | iconst_1 |
3 | 1 | [[#52be8980]] | !rightIsTrue |
3 | 2 | [[#52be8980]] | rightIsTrue |
4 | 1 | [[#52be89e0]] | iconst_1 |
4 | 2 | [[#52be89e0]] | iconst_0 |
5 | 1 | [[#52be89c0]] | falseLabel |
5 | 2 | [[#52be89c0]] | trueLabel |