CloneSet1150


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
37220.985compilation_unit
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
13711
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/EvaluationContextStatusHandler.java
23611
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/EvaluationStackFrameContextStatusHandler.java
Clone Instance
1
Line Count
37
Source Line
11
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/EvaluationContextStatusHandler.java

/*******************************************************************************
 * Copyright (c) 2000, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.debug.ui;

import org.eclipse.core.runtime.IStatus;
import org.eclipse.debug.core.IStatusHandler;
import org.eclipse.debug.core.model.IDebugElement;
import org.eclipse.jdt.debug.core.IJavaDebugTarget;
import org.eclipse.jdt.debug.core.IJavaStackFrame;
import org.eclipse.ui.IWorkbenchWindow;

/**
 * Supplies a thread that can be used for an evaluation, given an element
 * from a java debug model. Currently use for logical object structure
 * computations.
 * 
 * @since 3.0
 */
public class EvaluationContextStatusHandler implements IStatusHandler {

        /* (non-Javadoc)
         * @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, java.lang.Object)
         */
        public Object handleStatus(IStatus status, Object source) {
                if (source instanceof IDebugElement) {
                        IDebugElement element = (IDebugElement) source;
                        IJavaDebugTarget target = (IJavaDebugTarget) element.getDebugTarget().getAdapter(IJavaDebugTarget.class );
                        if (target != null) {
                                IJavaStackFrame frame = EvaluationContextManager.getEvaluationContext((IWorkbenchWindow) null);
                                if (frame != null && frame.getDebugTarget().equals(target)) {
                                        return frame.getThread();
                                }
                        }
                }
                return null;
        }
}




Clone Instance
2
Line Count
36
Source Line
11
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/EvaluationStackFrameContextStatusHandler.java

/*******************************************************************************
 * Copyright (c) 2004, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.debug.ui;

import org.eclipse.core.runtime.IStatus;
import org.eclipse.debug.core.IStatusHandler;
import org.eclipse.debug.core.model.IDebugElement;
import org.eclipse.jdt.debug.core.IJavaDebugTarget;
import org.eclipse.jdt.debug.core.IJavaStackFrame;
import org.eclipse.ui.IWorkbenchWindow;

/**
 * Supplies the current stack frame context. Currently use for logical object structure
 * computations.
 * 
 * @since 3.1
 */
public class EvaluationStackFrameContextStatusHandler implements IStatusHandler {

        /* (non-Javadoc)
         * @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, java.lang.Object)
         */
        public Object handleStatus(IStatus status, Object source) {
                if (source instanceof IDebugElement) {
                        IDebugElement element = (IDebugElement) source;
                        IJavaDebugTarget target = (IJavaDebugTarget) element.getDebugTarget().getAdapter(IJavaDebugTarget.class );
                        if (target != null) {
                                IJavaStackFrame frame = EvaluationContextManager.getEvaluationContext((IWorkbenchWindow) null);
                                if (frame != null && frame.getDebugTarget().equals(target)) {
                                        return frame;
                                }
                        }
                }
                return null;
        }
}




Clone AbstractionParameter Count: 2Parameter Bindings

/*******************************************************************************
 * Copyright (c) 2000, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * Copyright (c) 2004, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.debug.ui;

import org.eclipse.core.runtime.IStatus;
import org.eclipse.debug.core.IStatusHandler;
import org.eclipse.debug.core.model.IDebugElement;
import org.eclipse.jdt.debug.core.IJavaDebugTarget;
import org.eclipse.jdt.debug.core.IJavaStackFrame;
import org.eclipse.ui.IWorkbenchWindow;

/**
 * Supplies a thread that can be used for an evaluation, given an element
 * from a java debug model. Currently use for logical object structure
 * computations.
 * 
 * @since 3.0
 */
/**
 * Supplies the current stack frame context. Currently use for logical object structure
 * computations.
 * 
 * @since 3.1
 */
public class [[#variablebac30840]]implements IStatusHandler {
  /* (non-Javadoc)
           * @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, java.lang.Object)
           */
  public Object handleStatus(IStatus status, Object source) {
    if (source instanceof IDebugElement) {
      IDebugElement element = (IDebugElement) source;
      IJavaDebugTarget target = (IJavaDebugTarget) element.getDebugTarget().getAdapter(IJavaDebugTarget.class );
      if (target != null) {
        IJavaStackFrame frame = EvaluationContextManager.getEvaluationContext((IWorkbenchWindow) null);
        if (frame != null && frame.getDebugTarget().equals(target)) {
          return [[#variablea3c68900]];
        }
      }
    }
    return null;
  }
}


 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#bac30840]]
EvaluationContextStatusHandler 
12[[#bac30840]]
EvaluationStackFrameContextStatusHandler 
21[[#a3c68900]]
frame.getThread() 
22[[#a3c68900]]
frame