| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 21 | 2 | 3 | 0.988 | class_body_declaration |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 21 | 92 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelCache.java |
| 2 | 21 | 130 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelCache.java |
| ||||
/**
* Returns the info for the element.
*/
public Object getInfo(IJavaElement element) {
switch (element.getElementType()) {
case IJavaElement.JAVA_MODEL:
return this.modelInfo;
case IJavaElement.JAVA_PROJECT:
return this.projectCache.get(element);
case IJavaElement.PACKAGE_FRAGMENT_ROOT:
return this.rootCache.get(element);
case IJavaElement.PACKAGE_FRAGMENT:
return this.pkgCache.get(element);
case IJavaElement.COMPILATION_UNIT:
case IJavaElement.CLASS_FILE:
return this.openableCache.get(element);
case IJavaElement.TYPE:
Object result = this.jarTypeCache.get(element);
if (result != null)
return result;
else
return this.childrenCache.get(element);
default:
return this.childrenCache.get(element);
}
}
|
| ||||
/**
* Returns the info for this element without
* disturbing the cache ordering.
*/
protected Object peekAtInfo(IJavaElement element) {
switch (element.getElementType()) {
case IJavaElement.JAVA_MODEL:
return this.modelInfo;
case IJavaElement.JAVA_PROJECT:
return this.projectCache.get(element);
case IJavaElement.PACKAGE_FRAGMENT_ROOT:
return this.rootCache.peek(element);
case IJavaElement.PACKAGE_FRAGMENT:
return this.pkgCache.peek(element);
case IJavaElement.COMPILATION_UNIT:
case IJavaElement.CLASS_FILE:
return this.openableCache.peek(element);
case IJavaElement.TYPE:
Object result = this.jarTypeCache.peek(element);
if (result != null)
return result;
else
return this.childrenCache.get(element);
default:
return this.childrenCache.get(element);
}
}
|
| |||
[[#variableb9310580]]Object [[#variableb9310500]](IJavaElement element) {
switch (element.getElementType()) {
case IJavaElement.JAVA_MODEL:
return this.modelInfo;
case IJavaElement.JAVA_PROJECT:
return this.projectCache.get(element);
case IJavaElement.PACKAGE_FRAGMENT_ROOT:
return this.rootCache. [[#variableb9310480]](element);
case IJavaElement.PACKAGE_FRAGMENT:
return this.pkgCache. [[#variableb9310480]](element);
case IJavaElement.COMPILATION_UNIT:
case IJavaElement.CLASS_FILE:
return this.openableCache. [[#variableb9310480]](element);
case IJavaElement.TYPE:
Object result = this.jarTypeCache. [[#variableb9310480]](element);
if (result != null)
return result;
else
return this.childrenCache.get(element);
default:
return this.childrenCache.get(element);
}
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#b9310580]] | /** * Returns the info for this element without * disturbing the cache ordering. */ protected |
| 1 | 2 | [[#b9310580]] | /** * Returns the info for the element. */ public |
| 2 | 1 | [[#b9310500]] | peekAtInfo |
| 2 | 2 | [[#b9310500]] | getInfo |
| 3 | 1 | [[#b9310480]] | peek |
| 3 | 2 | [[#b9310480]] | get |