| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 32 | 2 | 5 | 0.974 | class_body_declarations[3] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 32 | 379 | plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddImportsOperation.java |
| 2 | 27 | 313 | plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/OrganizeImportsOperation.java |
| ||||
private boolean isOfKind(TypeInfo curr, int typeKinds, boolean is50OrHigher) {
int flags = curr.getModifiers();
if (Flags.isAnnotation(flags)) {
return is50OrHigher && ((typeKinds& SimilarElementsRequestor.ANNOTATIONS) != 0);
}
if (Flags.isEnum(flags)) {
return is50OrHigher && ((typeKinds& SimilarElementsRequestor.ENUMS) != 0);
}
if (Flags.isInterface(flags)) {
return (typeKinds& SimilarElementsRequestor.INTERFACES) != 0;
}
return (typeKinds& SimilarElementsRequestor.CLASSES) != 0;
}
private boolean isVisible(TypeInfo curr) {
int flags = curr.getModifiers();
if (Flags.isPrivate(flags)) {
return false;
}
if (Flags.isPublic(flags) || Flags.isProtected(flags)) {
return true;
}
return curr.getPackageName().equals(fCompilationUnit.getParent().getElementName());
}
/**
* @return Returns the scheduling rule for this operation
*/
public ISchedulingRule getScheduleRule() {
return fCompilationUnit.getJavaProject().getResource();
}
|
| ||||
private boolean isOfKind(TypeInfo curr, int typeKinds, boolean is50OrHigher) {
int flags = curr.getModifiers();
if (Flags.isAnnotation(flags)) {
return is50OrHigher && ((typeKinds& SimilarElementsRequestor.ANNOTATIONS) != 0);
}
if (Flags.isEnum(flags)) {
return is50OrHigher && ((typeKinds& SimilarElementsRequestor.ENUMS) != 0);
}
if (Flags.isInterface(flags)) {
return (typeKinds& SimilarElementsRequestor.INTERFACES) != 0;
}
return (typeKinds& SimilarElementsRequestor.CLASSES) != 0;
}
private boolean isVisible(TypeInfo curr) {
int flags = curr.getModifiers();
if (Flags.isPrivate(flags)) {
return false;
}
if (Flags.isPublic(flags) || Flags.isProtected(flags)) {
return true;
}
return curr.getPackageName().equals(fCurrPackage.getElementName());
}
public TypeInfo[][] getChoices() {
return fOpenChoices;
}
|
| |||
private boolean isOfKind(TypeInfo curr, int typeKinds, boolean is50OrHigher) {
int flags = curr.getModifiers();
if (Flags.isAnnotation(flags)) {
return is50OrHigher && ((typeKinds&SimilarElementsRequestor.ANNOTATIONS) != 0);
}
if (Flags.isEnum(flags)) {
return is50OrHigher && ((typeKinds&SimilarElementsRequestor.ENUMS) != 0);
}
if (Flags.isInterface(flags)) {
return (typeKinds&SimilarElementsRequestor.INTERFACES) != 0;
}
return (typeKinds&SimilarElementsRequestor.CLASSES) != 0;
}
private boolean isVisible(TypeInfo curr) {
int flags = curr.getModifiers();
if (Flags.isPrivate(flags)) {
return false;
}
if (Flags.isPublic(flags) || Flags.isProtected(flags)) {
return true;
}
return curr.getPackageName().equals( [[#variablebbbf1b00]].getElementName());
}
/**
* @return Returns the scheduling rule for this operation
*/
public [[#variablebbbf1aa0]] [[#variablebbbf1a60]] [[#variablebbbf1a00]]() {
return [[#variablebbbf19a0]];
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#bbbf1b00]] | fCompilationUnit.getParent() |
| 1 | 2 | [[#bbbf1b00]] | fCurrPackage |
| 2 | 1 | [[#bbbf1aa0]] | ISchedulingRule |
| 2 | 2 | [[#bbbf1aa0]] | TypeInfo |
| 3 | 1 | [[#bbbf1a60]] | |
| 3 | 2 | [[#bbbf1a60]] | [][] |
| 4 | 1 | [[#bbbf1a00]] | getScheduleRule |
| 4 | 2 | [[#bbbf1a00]] | getChoices |
| 5 | 1 | [[#bbbf19a0]] | fCompilationUnit.getJavaProject().getResource() |
| 5 | 2 | [[#bbbf19a0]] | fOpenChoices |