| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 20 | 2 | 6 | 0.968 | class_body_declaration |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 20 | 325 | plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/logicalstructures/JavaLogicalStructure.java |
| 2 | 20 | 143 | plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/logicalstructures/LogicalObjectStructureInterfaceType.java |
| ||||
/**
* Return the current stack frame context, or a valid stack frame for the given value.
*/
private IJavaStackFrame getStackFrame(IValue value) throws CoreException {
IStatusHandler handler = getStackFrameProvider();
if (handler != null) {
IJavaStackFrame stackFrame = (IJavaStackFrame) handler.handleStatus(fgNeedStackFrame, value);
if (stackFrame != null) {
return stackFrame;
}
}
IDebugTarget target = value.getDebugTarget();
IJavaDebugTarget javaTarget = (IJavaDebugTarget) target.getAdapter(IJavaDebugTarget.class );
if (javaTarget != null) {
IThread[] threads = javaTarget.getThreads();
for (int i = 0; i < threads.length; i++) {
IThread thread = threads[i];
if (thread.isSuspended()) {
return (IJavaStackFrame) thread.getTopStackFrame();
}
}
}
return null;
}
|
| ||||
private IJavaThread getThread(IValue value) throws CoreException {
IStatusHandler handler = getThreadProvider();
if (handler != null) {
IJavaThread thread = (IJavaThread) handler.handleStatus(fgNeedThread, value);
if (thread != null) {
return thread;
}
}
IDebugTarget target = value.getDebugTarget();
IJavaDebugTarget javaTarget = (IJavaDebugTarget) target.getAdapter(IJavaDebugTarget.class );
if (javaTarget != null) {
IThread[] threads = javaTarget.getThreads();
for (int i = 0; i < threads.length; i++) {
IThread thread = threads[i];
if (thread.isSuspended()) {
return (IJavaThread) thread;
}
}
}
return null;
}
|
| |||
/**
* Return the current stack frame context, or a valid stack frame for the given value.
*/
private [[#variable59c49020]] [[#variable59c48f80]](IValue value) throws CoreException {
IStatusHandler handler = [[#variable59c48f20]]();
if (handler != null) {
[[#variable59c49020]] [[#variable59c48e80]]= ( [[#variable59c49020]]) handler.handleStatus( [[#variable59c48de0]], value);
if ( [[#variable59c48e80]]!= null) {
return [[#variable59c48e80]];
}
}
IDebugTarget target = value.getDebugTarget();
IJavaDebugTarget javaTarget = (IJavaDebugTarget) target.getAdapter(IJavaDebugTarget.class );
if (javaTarget != null) {
IThread[] threads = javaTarget.getThreads();
for (int i = 0; i < threads.length; i++) {
IThread thread = threads[i];
if (thread.isSuspended()) {
return ( [[#variable59c49020]]) [[#variable59c48d40]];
}
}
}
return null;
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#59c49020]] | IJavaThread |
| 1 | 2 | [[#59c49020]] | IJavaStackFrame |
| 2 | 1 | [[#59c48f80]] | getThread |
| 2 | 2 | [[#59c48f80]] | getStackFrame |
| 3 | 1 | [[#59c48f20]] | getThreadProvider |
| 3 | 2 | [[#59c48f20]] | getStackFrameProvider |
| 4 | 1 | [[#59c48e80]] | thread |
| 4 | 2 | [[#59c48e80]] | stackFrame |
| 5 | 1 | [[#59c48de0]] | fgNeedThread |
| 5 | 2 | [[#59c48de0]] | fgNeedStackFrame |
| 6 | 1 | [[#59c48d40]] | thread |
| 6 | 2 | [[#59c48d40]] | thread.getTopStackFrame() |