| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 51 | 4 | 4 | 0.995 | statement_sequence[4] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 51 | 616 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BinaryExpression.java |
| 2 | 51 | 724 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BinaryExpression.java |
| 3 | 49 | 832 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BinaryExpression.java |
| 4 | 51 | 936 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BinaryExpression.java |
| ||||
int promotedTypeID = (this.left.implicitConversion& TypeIds.IMPLICIT_CONVERSION_MASK) >> 4;
// both sides got promoted in the same way
if (promotedTypeID == TypeIds.T_int) {
// 0 > x
if ((this.left.constant != Constant.NotAConstant) && (this.left.constant.intValue() == 0)) {
this.right.generateCode(currentScope, codeStream, valueRequired);
if (valueRequired) {
if (falseLabel == null) {
if (trueLabel != null) {
// implicitly falling through the FALSE case
codeStream.iflt(trueLabel);
}
}
else {
if (trueLabel == null) {
// implicitly falling through the TRUE case
codeStream.ifge(falseLabel);
}
else {
// no implicit fall through TRUE/FALSE --> should never occur
}
}
}
// reposition the endPC
codeStream.updateLastRecordedEndPC(currentScope, codeStream.position);
return;
}
// x > 0
if ((this.right.constant != Constant.NotAConstant) && (this.right.constant.intValue() == 0)) {
this.left.generateCode(currentScope, codeStream, valueRequired);
if (valueRequired) {
if (falseLabel == null) {
if (trueLabel != null) {
// implicitly falling through the FALSE case
codeStream.ifgt(trueLabel);
}
}
else {
if (trueLabel == null) {
// implicitly falling through the TRUE case
codeStream.ifle(falseLabel);
}
else {
// no implicit fall through TRUE/FALSE --> should never occur
}
}
}
// reposition the endPC
codeStream.updateLastRecordedEndPC(currentScope, codeStream.position);
return;
}
}
// default comparison
this.left.generateCode(currentScope, codeStream, valueRequired);
this.right.generateCode(currentScope, codeStream, valueRequired);
|
| ||||
int promotedTypeID = (this.left.implicitConversion& TypeIds.IMPLICIT_CONVERSION_MASK) >> 4;
// both sides got promoted in the same way
if (promotedTypeID == TypeIds.T_int) {
// 0 >= x
if ((this.left.constant != Constant.NotAConstant) && (this.left.constant.intValue() == 0)) {
this.right.generateCode(currentScope, codeStream, valueRequired);
if (valueRequired) {
if (falseLabel == null) {
if (trueLabel != null) {
// implicitly falling through the FALSE case
codeStream.ifle(trueLabel);
}
}
else {
if (trueLabel == null) {
// implicitly falling through the TRUE case
codeStream.ifgt(falseLabel);
}
else {
// no implicit fall through TRUE/FALSE --> should never occur
}
}
}
// reposition the endPC
codeStream.updateLastRecordedEndPC(currentScope, codeStream.position);
return;
}
// x >= 0
if ((this.right.constant != Constant.NotAConstant) && (this.right.constant.intValue() == 0)) {
this.left.generateCode(currentScope, codeStream, valueRequired);
if (valueRequired) {
if (falseLabel == null) {
if (trueLabel != null) {
// implicitly falling through the FALSE case
codeStream.ifge(trueLabel);
}
}
else {
if (trueLabel == null) {
// implicitly falling through the TRUE case
codeStream.iflt(falseLabel);
}
else {
// no implicit fall through TRUE/FALSE --> should never occur
}
}
}
// reposition the endPC
codeStream.updateLastRecordedEndPC(currentScope, codeStream.position);
return;
}
}
// default comparison
this.left.generateCode(currentScope, codeStream, valueRequired);
this.right.generateCode(currentScope, codeStream, valueRequired);
|
| ||||
int promotedTypeID = (this.left.implicitConversion& TypeIds.IMPLICIT_CONVERSION_MASK) >> 4;
// both sides got promoted in the same way
if (promotedTypeID == TypeIds.T_int) {
// 0 < x
if ((this.left.constant != Constant.NotAConstant) && (this.left.constant.intValue() == 0)) {
this.right.generateCode(currentScope, codeStream, valueRequired);
if (valueRequired) {
if (falseLabel == null) {
if (trueLabel != null) {
// implicitly falling through the FALSE case
codeStream.ifgt(trueLabel);
}
}
else {
if (trueLabel == null) {
// implicitly falling through the TRUE case
codeStream.ifle(falseLabel);
}
else {
// no implicit fall through TRUE/FALSE --> should never occur
}
}
}
codeStream.updateLastRecordedEndPC(currentScope, codeStream.position);
return;
}
// x < 0
if ((this.right.constant != Constant.NotAConstant) && (this.right.constant.intValue() == 0)) {
this.left.generateCode(currentScope, codeStream, valueRequired);
if (valueRequired) {
if (falseLabel == null) {
if (trueLabel != null) {
// implicitly falling through the FALSE case
codeStream.iflt(trueLabel);
}
}
else {
if (trueLabel == null) {
// implicitly falling through the TRUE case
codeStream.ifge(falseLabel);
}
else {
// no implicit fall through TRUE/FALSE --> should never occur
}
}
}
codeStream.updateLastRecordedEndPC(currentScope, codeStream.position);
return;
}
}
// default comparison
this.left.generateCode(currentScope, codeStream, valueRequired);
this.right.generateCode(currentScope, codeStream, valueRequired);
|
| ||||
int promotedTypeID = (this.left.implicitConversion& TypeIds.IMPLICIT_CONVERSION_MASK) >> 4;
// both sides got promoted in the same way
if (promotedTypeID == TypeIds.T_int) {
// 0 <= x
if ((this.left.constant != Constant.NotAConstant) && (this.left.constant.intValue() == 0)) {
this.right.generateCode(currentScope, codeStream, valueRequired);
if (valueRequired) {
if (falseLabel == null) {
if (trueLabel != null) {
// implicitly falling through the FALSE case
codeStream.ifge(trueLabel);
}
}
else {
if (trueLabel == null) {
// implicitly falling through the TRUE case
codeStream.iflt(falseLabel);
}
else {
// no implicit fall through TRUE/FALSE --> should never occur
}
}
}
// reposition the endPC
codeStream.updateLastRecordedEndPC(currentScope, codeStream.position);
return;
}
// x <= 0
if ((this.right.constant != Constant.NotAConstant) && (this.right.constant.intValue() == 0)) {
this.left.generateCode(currentScope, codeStream, valueRequired);
if (valueRequired) {
if (falseLabel == null) {
if (trueLabel != null) {
// implicitly falling through the FALSE case
codeStream.ifle(trueLabel);
}
}
else {
if (trueLabel == null) {
// implicitly falling through the TRUE case
codeStream.ifgt(falseLabel);
}
else {
// no implicit fall through TRUE/FALSE --> should never occur
}
}
}
// reposition the endPC
codeStream.updateLastRecordedEndPC(currentScope, codeStream.position);
return;
}
}
// default comparison
this.left.generateCode(currentScope, codeStream, valueRequired);
this.right.generateCode(currentScope, codeStream, valueRequired);
|
| |||
int promotedTypeID = (this.left.implicitConversion&TypeIds.IMPLICIT_CONVERSION_MASK) >> 4;
// both sides got promoted in the same way
if (promotedTypeID == TypeIds.T_int) {
// 0 > x
// 0 < x
// 0 <= x
// 0 >= x
if ((this.left.constant != Constant.NotAConstant) && (this.left.constant.intValue() == 0)) {
this.right.generateCode(currentScope, codeStream, valueRequired);
if (valueRequired) {
if (falseLabel == null) {
if (trueLabel != null) {
// implicitly falling through the FALSE case
codeStream. [[#variableb43c9b60]](trueLabel);
}
}
else {
if (trueLabel == null) {
// implicitly falling through the TRUE case
codeStream. [[#variableb43c9a80]](falseLabel);
}
else {
// no implicit fall through TRUE/FALSE --> should never occur
}
}
}
// reposition the endPC
codeStream.updateLastRecordedEndPC(currentScope, codeStream.position);
return;
}
// x > 0
// x < 0
// x <= 0
// x >= 0
if ((this.right.constant != Constant.NotAConstant) && (this.right.constant.intValue() == 0)) {
this.left.generateCode(currentScope, codeStream, valueRequired);
if (valueRequired) {
if (falseLabel == null) {
if (trueLabel != null) {
// implicitly falling through the FALSE case
codeStream. [[#variableb2a73980]](trueLabel);
}
}
else {
if (trueLabel == null) {
// implicitly falling through the TRUE case
codeStream. [[#variableb43c9b00]](falseLabel);
}
else {
// no implicit fall through TRUE/FALSE --> should never occur
}
}
}
// reposition the endPC
codeStream.updateLastRecordedEndPC(currentScope, codeStream.position);
return;
}
}
// default comparison
this.left.generateCode(currentScope, codeStream, valueRequired);
this.right.generateCode(currentScope, codeStream, valueRequired);
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#b43c9b60]] | iflt |
| 1 | 2 | [[#b43c9b60]] | ifgt |
| 1 | 3 | [[#b43c9b60]] | ifge |
| 1 | 4 | [[#b43c9b60]] | ifle |
| 2 | 1 | [[#b43c9a80]] | ifge |
| 2 | 2 | [[#b43c9a80]] | ifle |
| 2 | 3 | [[#b43c9a80]] | iflt |
| 2 | 4 | [[#b43c9a80]] | ifgt |
| 3 | 1 | [[#b2a73980]] | ifgt |
| 3 | 2 | [[#b2a73980]] | iflt |
| 3 | 3 | [[#b2a73980]] | ifle |
| 3 | 4 | [[#b2a73980]] | ifge |
| 4 | 1 | [[#b43c9b00]] | ifle |
| 4 | 2 | [[#b43c9b00]] | ifge |
| 4 | 3 | [[#b43c9b00]] | ifgt |
| 4 | 4 | [[#b43c9b00]] | iflt |