Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
22 | 2 | 5 | 0.967 | compilation_unit |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 22 | 11 | plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/AsyncJavaContendedMonitorAdapter.java |
2 | 22 | 11 | 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 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; } } |
| ||||
/******************************************************************************* * 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; } } |
| |||
/******************************************************************************* * 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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b4431260]] | AsyncJavaContendedMonitorAdapter |
1 | 2 | [[#b4431260]] | AsyncJavaOwningThreadAdapter |
2 | 1 | [[#b44311c0]] | JavaOwningThread |
2 | 2 | [[#b44311c0]] | JavaContendedMonitor |
3 | 1 | [[#b4431120]] | owningThread |
3 | 2 | [[#b4431120]] | contendedMonitor |
4 | 1 | [[#b44310e0]] | JavaContendedMonitor |
4 | 2 | [[#b44310e0]] | JavaOwningThread |
5 | 1 | [[#b4431060]] | getOwningThread |
5 | 2 | [[#b4431060]] | getContendedMonitor |