| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 54 | 2 | 1 | 0.995 | switch_group |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 54 | 160 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java |
| 2 | 54 | 214 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java |
| ||||
case TypeConstants.CONSTRAINT_EQUAL: // A == F
switch (this.boundKind) {
case Wildcard.UNBOUND: // F={?}
// if (otherType.isWildcard()) {
// WildcardBinding otherWildcard = (WildcardBinding) otherType;
// switch(otherWildcard.kind) {
// case Wildcard.UNBOUND: // A={?} == F={?} --> 0
// break;
// case Wildcard.EXTENDS: // A={? extends V} == F={?} ---> 0
// break;
// case Wildcard.SUPER: // A={? super V} == F={?} ---> 0
// break;
// }
// } else { // A=V == F={?} ---> 0
// }
break;
case Wildcard.EXTENDS: // F={? extends U}
if (actualType.isWildcard()) {
WildcardBinding actualWildcard = (WildcardBinding) actualType;
switch (actualWildcard.boundKind) {
case Wildcard.UNBOUND: // A={?} == F={? extends U} --> 0
break;
case Wildcard.EXTENDS: // A={? extends V} == F={? extends U} ---> V == U
this.bound.collectSubstitutes(scope, actualWildcard.bound, substitutes, TypeConstants.CONSTRAINT_EQUAL);
for (int i = 0, length = actualWildcard.otherBounds == null ? 0: actualWildcard.otherBounds.length; i < length; i++) {
this.bound.collectSubstitutes(scope, actualWildcard.otherBounds[i], substitutes, TypeConstants.CONSTRAINT_EQUAL);
}
break;
case Wildcard.SUPER: // A={? super V} == F={? extends U} ---> 0
break;
}
}
else { // A=V == F={? extends U} ---> 0
}
break;
case Wildcard.SUPER: // F={? super U}
if (actualType.isWildcard()) {
WildcardBinding actualWildcard = (WildcardBinding) actualType;
switch (actualWildcard.boundKind) {
case Wildcard.UNBOUND: // A={?} == F={? super U} --> 0
break;
case Wildcard.EXTENDS: // A={? extends V} == F={? super U} ---> 0
break;
case Wildcard.SUPER: // A={? super V} == F={? super U} ---> 0
this.bound.collectSubstitutes(scope, actualWildcard.bound, substitutes, TypeConstants.CONSTRAINT_EQUAL);
for (int i = 0, length = actualWildcard.otherBounds == null ? 0: actualWildcard.otherBounds.length; i < length; i++) {
this.bound.collectSubstitutes(scope, actualWildcard.otherBounds[i], substitutes, TypeConstants.CONSTRAINT_EQUAL);
}
break;
}
}
else { // A=V == F={? super U} ---> 0
}
break;
}
break;
|
| ||||
case TypeConstants.CONSTRAINT_SUPER: // A >> F
switch (this.boundKind) {
case Wildcard.UNBOUND: // F={?}
// if (otherType.isWildcard()) {
// WildcardBinding otherWildcard = (WildcardBinding) otherType;
// switch(otherWildcard.kind) {
// case Wildcard.UNBOUND: // A={?} >> F={?} --> 0
// break;
// case Wildcard.EXTENDS: // A={? extends V} >> F={?} ---> 0
// break;
// case Wildcard.SUPER: // A={? super V} >> F={?} ---> 0
// break;
// }
// } else { // A=V >> F={?} ---> 0
// }
break;
case Wildcard.EXTENDS: // F={? extends U}
if (actualType.isWildcard()) {
WildcardBinding actualWildcard = (WildcardBinding) actualType;
switch (actualWildcard.boundKind) {
case Wildcard.UNBOUND: // A={?} >> F={? extends U} --> 0
break;
case Wildcard.EXTENDS: // A={? extends V} >> F={? extends U} ---> V >> U
this.bound.collectSubstitutes(scope, actualWildcard.bound, substitutes, TypeConstants.CONSTRAINT_SUPER);
for (int i = 0, length = actualWildcard.otherBounds == null ? 0: actualWildcard.otherBounds.length; i < length; i++) {
this.bound.collectSubstitutes(scope, actualWildcard.otherBounds[i], substitutes, TypeConstants.CONSTRAINT_SUPER);
}
break;
case Wildcard.SUPER: // A={? super V} >> F={? extends U} ---> 0
break;
}
}
else { // A=V == F={? extends U} ---> 0
}
break;
case Wildcard.SUPER: // F={? super U}
if (actualType.isWildcard()) {
WildcardBinding actualWildcard = (WildcardBinding) actualType;
switch (actualWildcard.boundKind) {
case Wildcard.UNBOUND: // A={?} >> F={? super U} --> 0
break;
case Wildcard.EXTENDS: // A={? extends V} >> F={? super U} ---> 0
break;
case Wildcard.SUPER: // A={? super V} >> F={? super U} ---> V >> U
this.bound.collectSubstitutes(scope, actualWildcard.bound, substitutes, TypeConstants.CONSTRAINT_SUPER);
for (int i = 0, length = actualWildcard.otherBounds == null ? 0: actualWildcard.otherBounds.length; i < length; i++) {
this.bound.collectSubstitutes(scope, actualWildcard.otherBounds[i], substitutes, TypeConstants.CONSTRAINT_SUPER);
}
break;
}
}
else { // A=V >> F={? super U} ---> 0
}
break;
}
break;
|
| |||
case TypeConstants. [[#variableb8b85200]]: // A == F // A >> F
switch (this.boundKind) {
case Wildcard.UNBOUND: // F={?}
// if (otherType.isWildcard()) {
// WildcardBinding otherWildcard = (WildcardBinding) otherType;
// switch(otherWildcard.kind) {
// case Wildcard.UNBOUND: // A={?} == F={?} --> 0
// case Wildcard.UNBOUND: // A={?} >> F={?} --> 0
// break;
// case Wildcard.EXTENDS: // A={? extends V} == F={?} ---> 0
// case Wildcard.EXTENDS: // A={? extends V} >> F={?} ---> 0
// break;
// case Wildcard.SUPER: // A={? super V} == F={?} ---> 0
// case Wildcard.SUPER: // A={? super V} >> F={?} ---> 0
// break;
// }
// } else { // A=V == F={?} ---> 0
// } else { // A=V >> F={?} ---> 0
// }
break;
case Wildcard.EXTENDS: // F={? extends U}
if (actualType.isWildcard()) {
WildcardBinding actualWildcard = (WildcardBinding) actualType;
switch (actualWildcard.boundKind) {
case Wildcard.UNBOUND: // A={?} == F={? extends U} --> 0 // A={?} >> F={? extends U} --> 0
break;
case Wildcard.EXTENDS: // A={? extends V} == F={? extends U} ---> V == U // A={? extends V} >> F={? extends U} ---> V >> U
this.bound.collectSubstitutes(scope, actualWildcard.bound, substitutes, TypeConstants. [[#variableb8b85200]]);
for (int i = 0, length = actualWildcard.otherBounds == null ? 0: actualWildcard.otherBounds.length; i < length; i++) {
this.bound.collectSubstitutes(scope, actualWildcard.otherBounds[i], substitutes, TypeConstants. [[#variableb8b85200]]);
}
break;
case Wildcard.SUPER: // A={? super V} == F={? extends U} ---> 0 // A={? super V} >> F={? extends U} ---> 0
break;
}
}
else { // A=V == F={? extends U} ---> 0
}
break;
case Wildcard.SUPER: // F={? super U}
if (actualType.isWildcard()) {
WildcardBinding actualWildcard = (WildcardBinding) actualType;
switch (actualWildcard.boundKind) {
case Wildcard.UNBOUND: // A={?} == F={? super U} --> 0 // A={?} >> F={? super U} --> 0
break;
case Wildcard.EXTENDS: // A={? extends V} == F={? super U} ---> 0 // A={? extends V} >> F={? super U} ---> 0
break;
case Wildcard.SUPER: // A={? super V} == F={? super U} ---> 0 // A={? super V} >> F={? super U} ---> V >> U
this.bound.collectSubstitutes(scope, actualWildcard.bound, substitutes, TypeConstants. [[#variableb8b85200]]);
for (int i = 0, length = actualWildcard.otherBounds == null ? 0: actualWildcard.otherBounds.length; i < length; i++) {
this.bound.collectSubstitutes(scope, actualWildcard.otherBounds[i], substitutes, TypeConstants. [[#variableb8b85200]]);
}
break;
}
}
else { // A=V == F={? super U} ---> 0 // A=V >> F={? super U} ---> 0
}
break;
}
break;
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#b8b85200]] | CONSTRAINT_EQUAL |
| 1 | 2 | [[#b8b85200]] | CONSTRAINT_SUPER |