| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 36 | 4 | 3 | 0.997 | class_body_declaration |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 36 | 117 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/NullInfoRegistry.java |
| 2 | 36 | 158 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/NullInfoRegistry.java |
| 3 | 36 | 200 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/NullInfoRegistry.java |
| 4 | 36 | 241 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/NullInfoRegistry.java |
| ||||
public void markAsComparedEqualToNonNull(LocalVariableBinding local) {
// protected from non-object locals in calling methods
if (this != DEAD_END) {
this.tagBits |= NULL_FLAG_MASK;
int position;
// position is zero-based
if ((position = local.id + this.maxFieldCount) < BitCacheSize) { // use bits
// set protected non null
this.nullBit1 |= (1L << position);
if (coverageTestFlag && coverageTestId == 290) {
this.nullBit1 = 0;
}
}
else {
// use extra vector
int vectorIndex = (position / BitCacheSize) - 1;
if (this.extra == null) {
int length = vectorIndex + 1;
this.extra = new long[extraLength][];
for (int j = 2; j < extraLength; j++) {
this.extra[j] = new long[length];
}
}
else {
int oldLength; // might need to grow the arrays
if (vectorIndex >= (oldLength = this.extra[2].length)) {
for (int j = 2; j < extraLength; j++) {
System.arraycopy(this.extra[j], 0,
(this.extra[j] = new long[vectorIndex + 1]), 0,
oldLength);
}
}
}
this.extra[2][vectorIndex] |= (1L << (position % BitCacheSize));
if (coverageTestFlag && coverageTestId == 300) {
this.extra[5][vectorIndex] = ~0;
}
}
}
}
|
| ||||
public void markAsDefinitelyNonNull(LocalVariableBinding local) {
// protected from non-object locals in calling methods
if (this != DEAD_END) {
this.tagBits |= NULL_FLAG_MASK;
int position;
// position is zero-based
if ((position = local.id + this.maxFieldCount) < BitCacheSize) { // use bits
// set assigned non null
this.nullBit3 |= (1L << position);
if (coverageTestFlag && coverageTestId == 290) {
this.nullBit1 = 0;
}
}
else {
// use extra vector
int vectorIndex = (position / BitCacheSize) - 1;
if (this.extra == null) {
int length = vectorIndex + 1;
this.extra = new long[extraLength][];
for (int j = 2; j < extraLength; j++) {
this.extra[j] = new long[length];
}
}
else {
int oldLength; // might need to grow the arrays
if (vectorIndex >= (oldLength = this.extra[2].length)) {
for (int j = 2; j < extraLength; j++) {
System.arraycopy(this.extra[j], 0,
(this.extra[j] = new long[vectorIndex + 1]), 0,
oldLength);
}
}
}
this.extra[4][vectorIndex] |= (1L << (position % BitCacheSize));
if (coverageTestFlag && coverageTestId == 300) {
this.extra[5][vectorIndex] = ~0;
}
}
}
}
|
| ||||
// PREMATURE consider ignoring extra 0 to 2 included - means a1 should not be used either
// PREMATURE project protected non null onto something else
public void markAsDefinitelyNull(LocalVariableBinding local) {
// protected from non-object locals in calling methods
if (this != DEAD_END) {
this.tagBits |= NULL_FLAG_MASK;
int position;
// position is zero-based
if ((position = local.id + this.maxFieldCount) < BitCacheSize) { // use bits
// set assigned null
this.nullBit2 |= (1L << position);
if (coverageTestFlag && coverageTestId == 290) {
this.nullBit1 = 0;
}
}
else {
// use extra vector
int vectorIndex = (position / BitCacheSize) - 1;
if (this.extra == null) {
int length = vectorIndex + 1;
this.extra = new long[extraLength][];
for (int j = 2; j < extraLength; j++) {
this.extra[j] = new long[length];
}
}
else {
int oldLength; // might need to grow the arrays
if (vectorIndex >= (oldLength = this.extra[2].length)) {
for (int j = 2; j < extraLength; j++) {
System.arraycopy(this.extra[j], 0,
(this.extra[j] = new long[vectorIndex + 1]), 0,
oldLength);
}
}
}
this.extra[3][vectorIndex] |= (1L << (position % BitCacheSize));
if (coverageTestFlag && coverageTestId == 300) {
this.extra[5][vectorIndex] = ~0;
}
}
}
}
|
| ||||
public void markAsDefinitelyUnknown(LocalVariableBinding local) {
// protected from non-object locals in calling methods
if (this != DEAD_END) {
this.tagBits |= NULL_FLAG_MASK;
int position;
// position is zero-based
if ((position = local.id + this.maxFieldCount) < BitCacheSize) { // use bits
// set assigned unknown
this.nullBit4 |= (1L << position);
if (coverageTestFlag && coverageTestId == 290) {
this.nullBit1 = 0;
}
}
else {
// use extra vector
int vectorIndex = (position / BitCacheSize) - 1;
if (this.extra == null) {
int length = vectorIndex + 1;
this.extra = new long[extraLength][];
for (int j = 2; j < extraLength; j++) {
this.extra[j] = new long[length];
}
}
else {
int oldLength; // might need to grow the arrays
if (vectorIndex >= (oldLength = this.extra[2].length)) {
for (int j = 2; j < extraLength; j++) {
System.arraycopy(this.extra[j], 0,
(this.extra[j] = new long[vectorIndex + 1]), 0,
oldLength);
}
}
}
this.extra[5][vectorIndex] |= (1L << (position % BitCacheSize));
if (coverageTestFlag && coverageTestId == 300) {
this.extra[5][vectorIndex] = ~0;
}
}
}
}
|
| |||
// PREMATURE consider ignoring extra 0 to 2 included - means a1 should not be used either
// PREMATURE project protected non null onto something else
public void [[#variableb5fe8140]](LocalVariableBinding local) {
// protected from non-object locals in calling methods
if (this != DEAD_END) {
this.tagBits |= NULL_FLAG_MASK;
int position;
// position is zero-based
if ((position = local.id + this.maxFieldCount) < BitCacheSize) { // use bits
// set protected non null
// set assigned non null
// set assigned null
// set assigned unknown
this. [[#variableb5fe9a60]]|= (1L << position);
if (coverageTestFlag && coverageTestId == 290) {
this.nullBit1 = 0;
}
}
else {
// use extra vector
int vectorIndex = (position / BitCacheSize) - 1;
if (this.extra == null) {
int length = vectorIndex + 1;
this.extra = new long[extraLength][];
for (int j = 2; j < extraLength; j++) {
this.extra[j] = new long[length];
}
}
else {
int oldLength; // might need to grow the arrays
if (vectorIndex >= (oldLength = this.extra[2].length)) {
for (int j = 2; j < extraLength; j++) {
System.arraycopy(this.extra[j], 0, (this.extra[j] = new long[vectorIndex + 1]), 0, oldLength);
}
}
}
this.extra[ [[#variableb5fe8120]]][vectorIndex] |= (1L << (position % BitCacheSize));
if (coverageTestFlag && coverageTestId == 300) {
this.extra[5][vectorIndex] = ~0;
}
}
}
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#b5fe8140]] | markAsComparedEqualToNonNull |
| 1 | 2 | [[#b5fe8140]] | markAsDefinitelyNonNull |
| 1 | 3 | [[#b5fe8140]] | markAsDefinitelyNull |
| 1 | 4 | [[#b5fe8140]] | markAsDefinitelyUnknown |
| 2 | 1 | [[#b5fe9a60]] | nullBit1 |
| 2 | 2 | [[#b5fe9a60]] | nullBit3 |
| 2 | 3 | [[#b5fe9a60]] | nullBit2 |
| 2 | 4 | [[#b5fe9a60]] | nullBit4 |
| 3 | 1 | [[#b5fe8120]] | 2 |
| 3 | 2 | [[#b5fe8120]] | 4 |
| 3 | 3 | [[#b5fe8120]] | 3 |
| 3 | 4 | [[#b5fe8120]] | 5 |