CloneSet1792


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
22250.967compilation_unit
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12211
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/AsyncJavaContendedMonitorAdapter.java
22211
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/AsyncJavaOwningThreadAdapter.java
Clone Instance
1
Line Count
22
Source Line
11
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/AsyncJavaContendedMonitorAdapter.java

/*******************************************************************************
 * Copyright (c) 2005, 2006 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.monitors;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext;

public class AsyncJavaContendedMonitorAdapter extends AsyncMonitorAdapter {

        protected Object[] getChildren(Object parent, IPresentationContext context) throws CoreException {
        JavaOwningThread owningThread = ((JavaContendedMonitor) parent).getOwningThread();
        if (owningThread == null) {
            return EMPTY;
        }
        return new Object[] {
                             owningThread
                            };
        }

        protected boolean hasChildren(Object element, IPresentationContext context) throws CoreException {
                JavaContendedMonitor monitor = (JavaContendedMonitor) element;
                return monitor.getOwningThread() != null;
        }
}




Clone Instance
2
Line Count
22
Source Line
11
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/AsyncJavaOwningThreadAdapter.java

/*******************************************************************************
 * Copyright (c) 2005, 2006 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.monitors;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext;

public class AsyncJavaOwningThreadAdapter extends AsyncMonitorAdapter {

        protected Object[] getChildren(Object parent, IPresentationContext context) throws CoreException {
                JavaContendedMonitor contendedMonitor = ((JavaOwningThread) parent).getContendedMonitor();
                if (contendedMonitor == null) {
                    return EMPTY;
                }
                return new Object[] {
                                     contendedMonitor
                                    };
        }

        protected boolean hasChildren(Object element, IPresentationContext context) throws CoreException {
                JavaOwningThread monitor = (JavaOwningThread) element;
                return monitor.getContendedMonitor() != null;
        }
}




Clone AbstractionParameter Count: 5Parameter Bindings

/*******************************************************************************
 * Copyright (c) 2005, 2006 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.monitors;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext;

public class [[#variableb4431260]]extends AsyncMonitorAdapter {
  protected Object[] getChildren(Object parent, IPresentationContext context) throws CoreException {
     [[#variableb44311c0]]  [[#variableb4431120]]= (( [[#variableb44310e0]]) parent). [[#variableb4431060]]();
    if ( [[#variableb4431120]]== null) {
      return EMPTY;
    }
    return new Object[] {
                           [[#variableb4431120]]
                        };
  }

  protected boolean hasChildren(Object element, IPresentationContext context) throws CoreException {
     [[#variableb44310e0]] monitor = ( [[#variableb44310e0]]) element;
    return monitor. [[#variableb4431060]]() != null;
  }
}


 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b4431260]]
AsyncJavaContendedMonitorAdapter 
12[[#b4431260]]
AsyncJavaOwningThreadAdapter 
21[[#b44311c0]]
JavaOwningThread 
22[[#b44311c0]]
JavaContendedMonitor 
31[[#b4431120]]
owningThread 
32[[#b4431120]]
contendedMonitor 
41[[#b44310e0]]
JavaContendedMonitor 
42[[#b44310e0]]
JavaOwningThread 
51[[#b4431060]]
getOwningThread 
52[[#b4431060]]
getContendedMonitor