CloneSet2741


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
18240.964compilation_unit
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11811
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/AsyncJavaOwnedMonitorAdapter.java
21711
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/AsyncJavaWaitingThreadAdapter.java
Clone Instance
1
Line Count
18
Source Line
11
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/AsyncJavaOwnedMonitorAdapter.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 AsyncJavaOwnedMonitorAdapter extends AsyncMonitorAdapter {

        protected Object[] getChildren(Object parent, IPresentationContext context) throws CoreException {
        return ((JavaOwnedMonitor) parent).getWaitingThreads();
        }

        protected boolean hasChildren(Object element, IPresentationContext context) throws CoreException {
                JavaOwnedMonitor monitor = (JavaOwnedMonitor) element;
                return monitor.getWaitingThreads().length > 0;
        }
}




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

/*******************************************************************************
 * Copyright (c) 2000, 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 AsyncJavaWaitingThreadAdapter extends AsyncMonitorAdapter {
        protected Object[] getChildren(Object parent, IPresentationContext context) throws CoreException {
                return ((JavaWaitingThread) parent).getOwnedMonitors();
        }

        protected boolean hasChildren(Object element, IPresentationContext context) throws CoreException {
                JavaWaitingThread thread = (JavaWaitingThread) element;
                return thread.getOwnedMonitors().length > 0;
        }
}




Clone AbstractionParameter Count: 4Parameter 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
 *******************************************************************************/
/*******************************************************************************
 * Copyright (c) 2000, 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 [[#variable54843a80]]extends AsyncMonitorAdapter {
  protected Object[] getChildren(Object parent, IPresentationContext context) throws CoreException {
    return (( [[#variable54843a00]]) parent). [[#variable54843900]]();
  }

  protected boolean hasChildren(Object element, IPresentationContext context) throws CoreException {
     [[#variable54843a00]]  [[#variable54843920]]= ( [[#variable54843a00]]) element;
    return [[#variable54843920]]. [[#variable54843900]]().length > 0;
  }
}


 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#54843a80]]
AsyncJavaOwnedMonitorAdapter 
12[[#54843a80]]
AsyncJavaWaitingThreadAdapter 
21[[#54843a00]]
JavaOwnedMonitor 
22[[#54843a00]]
JavaWaitingThread 
31[[#54843900]]
getWaitingThreads 
32[[#54843900]]
getOwnedMonitors 
41[[#54843920]]
monitor 
42[[#54843920]]
thread