CloneSet641


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
29210.998statement_sequence[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12951
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaLaunchTab.java
22957
plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchConfigurationTab.java
Clone Instance
1
Line Count
29
Source Line
51
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaLaunchTab.java

                IWorkbenchPage page = JDIDebugUIPlugin.getActivePage();
                if (page != null) {
                        ISelection selection = page.getSelection();
                        if (selection instanceof IStructuredSelection) {
                                IStructuredSelection ss = (IStructuredSelection) selection;
                                if ( !ss.isEmpty()) {
                                        Object obj = ss.getFirstElement();
                                        if (obj instanceof IJavaElement) {
                                                return (IJavaElement) obj;
                                        }
                                        if (obj instanceof IResource) {
                                                IJavaElement je = JavaCore.create((IResource) obj);
                                                if (je == null) {
                                                        IProject pro = ((IResource) obj).getProject();
                                                        je = JavaCore.create(pro);
                                                }
                                                if (je != null) {
                                                        return je;
                                                }
                                        }
                                }
                        }
                        IEditorPart part = page.getActiveEditor();
                        if (part != null) {
                                IEditorInput input = part.getEditorInput();
                                return (IJavaElement) input.getAdapter(IJavaElement.class );
                        }
                }
                return null;


Clone Instance
2
Line Count
29
Source Line
57
Source File
plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchConfigurationTab.java

                IWorkbenchPage page = activeWorkbenchWindow.getActivePage();
                if (page != null) {
                        ISelection selection = page.getSelection();
                        if (selection instanceof IStructuredSelection) {
                                IStructuredSelection ss = (IStructuredSelection) selection;
                                if ( !ss.isEmpty()) {
                                        Object obj = ss.getFirstElement();
                                        if (obj instanceof IJavaElement) {
                                                return (IJavaElement) obj;
                                        }
                                        if (obj instanceof IResource) {
                                                IJavaElement je = JavaCore.create((IResource) obj);
                                                if (je == null) {
                                                        IProject pro = ((IResource) obj).getProject();
                                                        je = JavaCore.create(pro);
                                                }
                                                if (je != null) {
                                                        return je;
                                                }
                                        }
                                }
                        }
                        IEditorPart part = page.getActiveEditor();
                        if (part != null) {
                                IEditorInput input = part.getEditorInput();
                                return (IJavaElement) input.getAdapter(IJavaElement.class );
                        }
                }
                return null;


Clone AbstractionParameter Count: 1Parameter Bindings

IWorkbenchPage page = [[#variable9b1c28c0]].getActivePage();
if (page != null) {
  ISelection selection = page.getSelection();
  if (selection instanceof IStructuredSelection) {
    IStructuredSelection ss = (IStructuredSelection) selection;
    if ( !ss.isEmpty()) {
      Object obj = ss.getFirstElement();
      if (obj instanceof IJavaElement) {
        return (IJavaElement) obj;
      }
      if (obj instanceof IResource) {
        IJavaElement je = JavaCore.create((IResource) obj);
        if (je == null) {
          IProject pro = ((IResource) obj).getProject();
          je = JavaCore.create(pro);
        }
        if (je != null) {
          return je;
        }
      }
    }
  }
  IEditorPart part = page.getActiveEditor();
  if (part != null) {
    IEditorInput input = part.getEditorInput();
    return (IJavaElement) input.getAdapter(IJavaElement.class );
  }
}
return null;
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#9b1c28c0]]
JDIDebugUIPlugin 
12[[#9b1c28c0]]
activeWorkbenchWindow