| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 65 | 2 | 0 | 1.000 | statement_sequence_member |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 65 | 1503 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java |
| 2 | 65 | 1622 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java |
| ||||
switch (op) {
case OR_OR:
this.expressionStack[this.expressionPtr] =
new OR_OR_Expression(
expr1,
expr2,
op );
break;
case AND_AND:
this.expressionStack[this.expressionPtr] =
new AND_AND_Expression(
expr1,
expr2,
op );
break;
case PLUS:
// look for "string1" + "string2"
if (this.optimizeStringLiterals) {
if (expr1 instanceof StringLiteral) {
if (expr2 instanceof CharLiteral) { // string+char
this.expressionStack[this.expressionPtr] =
((StringLiteral) expr1).extendWith((CharLiteral) expr2);
}
else if (expr2 instanceof StringLiteral) { //string+string
this.expressionStack[this.expressionPtr] =
((StringLiteral) expr1).extendWith((StringLiteral) expr2);
}
else {
this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, PLUS);
}
}
else {
this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, PLUS);
}
}
else if (expr1 instanceof StringLiteral) {
if (expr2 instanceof StringLiteral) {
// string + string
this.expressionStack[this.expressionPtr] =
((StringLiteral) expr1).extendsWith((StringLiteral) expr2);
}
else {
this.expressionStack[this.expressionPtr] =
new BinaryExpression(
expr1,
expr2,
op );
}
}
else {
this.expressionStack[this.expressionPtr] =
new BinaryExpression(
expr1,
expr2,
op );
}
break;
case LESS:
this.intPtr--;
this.expressionStack[this.expressionPtr] =
new BinaryExpression(
expr1,
expr2,
op );
break;
default:
this.expressionStack[this.expressionPtr] =
new BinaryExpression(
expr1,
expr2,
op );
}
|
| ||||
switch (op) {
case OR_OR:
this.expressionStack[this.expressionPtr] =
new OR_OR_Expression(
expr1,
expr2,
op );
break;
case AND_AND:
this.expressionStack[this.expressionPtr] =
new AND_AND_Expression(
expr1,
expr2,
op );
break;
case PLUS:
// look for "string1" + "string2"
if (this.optimizeStringLiterals) {
if (expr1 instanceof StringLiteral) {
if (expr2 instanceof CharLiteral) { // string+char
this.expressionStack[this.expressionPtr] =
((StringLiteral) expr1).extendWith((CharLiteral) expr2);
}
else if (expr2 instanceof StringLiteral) { //string+string
this.expressionStack[this.expressionPtr] =
((StringLiteral) expr1).extendWith((StringLiteral) expr2);
}
else {
this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, PLUS);
}
}
else {
this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, PLUS);
}
}
else if (expr1 instanceof StringLiteral) {
if (expr2 instanceof StringLiteral) {
// string + string
this.expressionStack[this.expressionPtr] =
((StringLiteral) expr1).extendsWith((StringLiteral) expr2);
}
else {
this.expressionStack[this.expressionPtr] =
new BinaryExpression(
expr1,
expr2,
op );
}
}
else {
this.expressionStack[this.expressionPtr] =
new BinaryExpression(
expr1,
expr2,
op );
}
break;
case LESS:
this.intPtr--;
this.expressionStack[this.expressionPtr] =
new BinaryExpression(
expr1,
expr2,
op );
break;
default:
this.expressionStack[this.expressionPtr] =
new BinaryExpression(
expr1,
expr2,
op );
}
|
| |||
switch (op) {
case OR_OR:
this.expressionStack[this.expressionPtr] = new OR_OR_Expression(expr1, expr2, op);
break;
case AND_AND:
this.expressionStack[this.expressionPtr] = new AND_AND_Expression(expr1, expr2, op);
break;
case PLUS:
// look for "string1" + "string2"
if (this.optimizeStringLiterals) {
if (expr1 instanceof StringLiteral) {
if (expr2 instanceof CharLiteral) { // string+char
this.expressionStack[this.expressionPtr] = ((StringLiteral) expr1).extendWith((CharLiteral) expr2);
}
else
if (expr2 instanceof StringLiteral) { //string+string
this.expressionStack[this.expressionPtr] = ((StringLiteral) expr1).extendWith((StringLiteral) expr2);
}
else {
this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, PLUS);
}
}
else {
this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, PLUS);
}
}
else
if (expr1 instanceof StringLiteral) {
if (expr2 instanceof StringLiteral) {
// string + string
this.expressionStack[this.expressionPtr] = ((StringLiteral) expr1).extendsWith((StringLiteral) expr2);
}
else {
this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, op);
}
}
else {
this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, op);
}
break;
case LESS:
this.intPtr--;
this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, op);
break;
default:
this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, op);
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| None | |||