| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 20 | 3 | 2 | 0.985 | statement_sequence[2] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 20 | 603 | plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/BasicSearchEngine.java |
| 2 | 20 | 805 | plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/BasicSearchEngine.java |
| 3 | 20 | 944 | plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/BasicSearchEngine.java |
| ||||
// Accept document path
AccessRestriction accessRestriction = null;
if (access != null) {
// Compute document relative path
int pkgLength = (record.pkg == null || record.pkg.length == 0) ? 0: record.pkg.length + 1;
int nameLength = record.simpleName == null ? 0: record.simpleName.length;
char[] path = new char[pkgLength + nameLength];
int pos = 0;
if (pkgLength > 0) {
System.arraycopy(record.pkg, 0, path, pos, pkgLength - 1);
CharOperation.replace(path, '.', '/');
path[pkgLength - 1] = '/';
pos += pkgLength;
}
if (nameLength > 0) {
System.arraycopy(record.simpleName, 0, path, pos, nameLength);
pos += nameLength;
}
// Update access restriction if path is not empty
if (pos > 0) {
accessRestriction = access.getViolatedRestriction(path);
}
}
|
| ||||
// Accept document path
AccessRestriction accessRestriction = null;
if (access != null) {
// Compute document relative path
int pkgLength = (record.pkg == null || record.pkg.length == 0) ? 0: record.pkg.length + 1;
int nameLength = record.simpleName == null ? 0: record.simpleName.length;
char[] path = new char[pkgLength + nameLength];
int pos = 0;
if (pkgLength > 0) {
System.arraycopy(record.pkg, 0, path, pos, pkgLength - 1);
CharOperation.replace(path, '.', '/');
path[pkgLength - 1] = '/';
pos += pkgLength;
}
if (nameLength > 0) {
System.arraycopy(record.simpleName, 0, path, pos, nameLength);
pos += nameLength;
}
// Update access restriction if path is not empty
if (pos > 0) {
accessRestriction = access.getViolatedRestriction(path);
}
}
|
| ||||
AccessRestriction accessRestriction = null;
if (access != null) {
// Compute document relative path
int qualificationLength = (record.qualification == null || record.qualification.length == 0) ? 0: record.qualification.length + 1;
int nameLength = record.simpleName == null ? 0: record.simpleName.length;
char[] path = new char[qualificationLength + nameLength];
int pos = 0;
if (qualificationLength > 0) {
System.arraycopy(record.qualification, 0, path, pos, qualificationLength - 1);
CharOperation.replace(path, '.', '/');
path[qualificationLength - 1] = '/';
pos += qualificationLength;
}
if (nameLength > 0) {
System.arraycopy(record.simpleName, 0, path, pos, nameLength);
pos += nameLength;
}
// Update access restriction if path is not empty
if (pos > 0) {
accessRestriction = access.getViolatedRestriction(path);
}
}
|
| |||
// Accept document path
AccessRestriction accessRestriction = null;
if (access != null) {
// Compute document relative path
int [[#variableb3b35b00]]= (record. [[#variableba041520]]== null || record. [[#variableba041520]].length == 0) ? 0: record. [[#variableba041520]].length + 1;
int nameLength = record.simpleName == null ? 0: record.simpleName.length;
char[] path = new char[ [[#variableb3b35b00]] + nameLength];
int pos = 0;
if ( [[#variableb3b35b00]] > 0) {
System.arraycopy(record. [[#variableba041520]], 0, path, pos, [[#variableb3b35b00]] - 1);
CharOperation.replace(path, '.', '/');
path[ [[#variableb3b35b00]] - 1] = '/';
pos += [[#variableb3b35b00]];
}
if (nameLength > 0) {
System.arraycopy(record.simpleName, 0, path, pos, nameLength);
pos += nameLength;
}
// Update access restriction if path is not empty
if (pos > 0) {
accessRestriction = access.getViolatedRestriction(path);
}
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#b3b35b00]] | pkgLength |
| 1 | 2 | [[#b3b35b00]] | qualificationLength |
| 1 | 3 | [[#b3b35b00]] | pkgLength |
| 2 | 1 | [[#ba041520]] | pkg |
| 2 | 2 | [[#ba041520]] | qualification |
| 2 | 3 | [[#ba041520]] | pkg |