CloneSet30


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
50710.999class_body_declarations[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
150156
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/AddArchiveToBuildpathAction.java
250278
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/AddFolderToBuildpathAction.java
350197
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/AddLibraryToBuildpathAction.java
450176
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/AddSelectedLibraryToBuildpathAction.java
550167
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ExcludeFromBuildpathAction.java
650162
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/IncludeToBuildpathAction.java
750251
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/RemoveFromBuildpathAction.java
Clone Instance
1
Line Count
50
Source Line
156
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/AddArchiveToBuildpathAction.java

        private void showExceptionDialog(CoreException exception) {
                showError(exception, fSite.getShell(), NewWizardMessages.AddArchiveToBuildpathAction_ErrorTitle, exception.getMessage());
        }

        private void showError(CoreException e, Shell shell, String title, String message) {
                IStatus status = e.getStatus();
                if (status != null) {
                        ErrorDialog.openError(shell, message, title, status);
                }
                else   {
                        MessageDialog.openError(shell, title, message);
                }
        }

        private void selectAndReveal( final ISelection selection) {
                // validate the input
                IWorkbenchPage page = fSite.getPage();
                if (page == null)
                        return;

                // get all the view and editor parts
                List parts = new ArrayList();
                IWorkbenchPartReference refs[] = page.getViewReferences();
                for (int i = 0; i < refs.length; i++) {
                        IWorkbenchPart part = refs[i].getPart(false);
                        if (part != null)
                                parts.add(part);
                }
                refs = page.getEditorReferences();
                for (int i = 0; i < refs.length; i++) {
                        if (refs[i].getPart(false) != null)
                                parts.add(refs[i].getPart(false));
                }

                Iterator itr = parts.iterator();
                while (itr.hasNext()) {
                        IWorkbenchPart part = (IWorkbenchPart) itr.next();

                        // get the part's ISetSelectionTarget implementation
                        ISetSelectionTarget target = null;
                        if (part instanceof ISetSelectionTarget)
                                target = (ISetSelectionTarget) part;
                        else
                                target = (ISetSelectionTarget) part.getAdapter(ISetSelectionTarget.class );

                        if (target != null) {
                                // select and reveal resource
                                final ISetSelectionTarget finalTarget = target;
                                page.getWorkbenchWindow().getShell().getDisplay().asyncExec(new Runnable() {
                                        public void run() {
                                                finalTarget.selectReveal(selection);
                                        }
                                                                                            } );
                        }
                }
        }


Clone Instance
2
Line Count
50
Source Line
278
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/AddFolderToBuildpathAction.java

        private void showExceptionDialog(CoreException exception) {
                showError(exception, fSite.getShell(), NewWizardMessages.AddSourceFolderToBuildpathAction_ErrorTitle, exception.getMessage());
        }

        private void showError(CoreException e, Shell shell, String title, String message) {
                IStatus status = e.getStatus();
                if (status != null) {
                        ErrorDialog.openError(shell, message, title, status);
                }
                else   {
                        MessageDialog.openError(shell, title, message);
                }
        }

        private void selectAndReveal( final ISelection selection) {
                // validate the input
                IWorkbenchPage page = fSite.getPage();
                if (page == null)
                        return;

                // get all the view and editor parts
                List parts = new ArrayList();
                IWorkbenchPartReference refs[] = page.getViewReferences();
                for (int i = 0; i < refs.length; i++) {
                        IWorkbenchPart part = refs[i].getPart(false);
                        if (part != null)
                                parts.add(part);
                }
                refs = page.getEditorReferences();
                for (int i = 0; i < refs.length; i++) {
                        if (refs[i].getPart(false) != null)
                                parts.add(refs[i].getPart(false));
                }

                Iterator itr = parts.iterator();
                while (itr.hasNext()) {
                        IWorkbenchPart part = (IWorkbenchPart) itr.next();

                        // get the part's ISetSelectionTarget implementation
                        ISetSelectionTarget target = null;
                        if (part instanceof ISetSelectionTarget)
                                target = (ISetSelectionTarget) part;
                        else
                                target = (ISetSelectionTarget) part.getAdapter(ISetSelectionTarget.class );

                        if (target != null) {
                                // select and reveal resource
                                final ISetSelectionTarget finalTarget = target;
                                page.getWorkbenchWindow().getShell().getDisplay().asyncExec(new Runnable() {
                                        public void run() {
                                                finalTarget.selectReveal(selection);
                                        }
                                                                                            } );
                        }
                }
        }


Clone Instance
3
Line Count
50
Source Line
197
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/AddLibraryToBuildpathAction.java

        private void showExceptionDialog(CoreException exception) {
                showError(exception, fSite.getShell(), NewWizardMessages.AddLibraryToBuildpathAction_ErrorTitle, exception.getMessage());
        }

        private void showError(CoreException e, Shell shell, String title, String message) {
                IStatus status = e.getStatus();
                if (status != null) {
                        ErrorDialog.openError(shell, message, title, status);
                }
                else   {
                        MessageDialog.openError(shell, title, message);
                }
        }

        private void selectAndReveal( final ISelection selection) {
                // validate the input
                IWorkbenchPage page = fSite.getPage();
                if (page == null)
                        return;

                // get all the view and editor parts
                List parts = new ArrayList();
                IWorkbenchPartReference refs[] = page.getViewReferences();
                for (int i = 0; i < refs.length; i++) {
                        IWorkbenchPart part = refs[i].getPart(false);
                        if (part != null)
                                parts.add(part);
                }
                refs = page.getEditorReferences();
                for (int i = 0; i < refs.length; i++) {
                        if (refs[i].getPart(false) != null)
                                parts.add(refs[i].getPart(false));
                }

                Iterator itr = parts.iterator();
                while (itr.hasNext()) {
                        IWorkbenchPart part = (IWorkbenchPart) itr.next();

                        // get the part's ISetSelectionTarget implementation
                        ISetSelectionTarget target = null;
                        if (part instanceof ISetSelectionTarget)
                                target = (ISetSelectionTarget) part;
                        else
                                target = (ISetSelectionTarget) part.getAdapter(ISetSelectionTarget.class );

                        if (target != null) {
                                // select and reveal resource
                                final ISetSelectionTarget finalTarget = target;
                                page.getWorkbenchWindow().getShell().getDisplay().asyncExec(new Runnable() {
                                        public void run() {
                                                finalTarget.selectReveal(selection);
                                        }
                                                                                            } );
                        }
                }
        }


Clone Instance
4
Line Count
50
Source Line
176
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/AddSelectedLibraryToBuildpathAction.java

        private void showExceptionDialog(CoreException exception) {
                showError(exception, fSite.getShell(), NewWizardMessages.AddSelectedLibraryToBuildpathAction_ErrorTitle, exception.getMessage());
        }

        private void showError(CoreException e, Shell shell, String title, String message) {
                IStatus status = e.getStatus();
                if (status != null) {
                        ErrorDialog.openError(shell, message, title, status);
                }
                else   {
                        MessageDialog.openError(shell, title, message);
                }
        }

        private void selectAndReveal( final ISelection selection) {
                // validate the input
                IWorkbenchPage page = fSite.getPage();
                if (page == null)
                        return;

                // get all the view and editor parts
                List parts = new ArrayList();
                IWorkbenchPartReference refs[] = page.getViewReferences();
                for (int i = 0; i < refs.length; i++) {
                        IWorkbenchPart part = refs[i].getPart(false);
                        if (part != null)
                                parts.add(part);
                }
                refs = page.getEditorReferences();
                for (int i = 0; i < refs.length; i++) {
                        if (refs[i].getPart(false) != null)
                                parts.add(refs[i].getPart(false));
                }

                Iterator itr = parts.iterator();
                while (itr.hasNext()) {
                        IWorkbenchPart part = (IWorkbenchPart) itr.next();

                        // get the part's ISetSelectionTarget implementation
                        ISetSelectionTarget target = null;
                        if (part instanceof ISetSelectionTarget)
                                target = (ISetSelectionTarget) part;
                        else
                                target = (ISetSelectionTarget) part.getAdapter(ISetSelectionTarget.class );

                        if (target != null) {
                                // select and reveal resource
                                final ISetSelectionTarget finalTarget = target;
                                page.getWorkbenchWindow().getShell().getDisplay().asyncExec(new Runnable() {
                                        public void run() {
                                                finalTarget.selectReveal(selection);
                                        }
                                                                                            } );
                        }
                }
        }


Clone Instance
5
Line Count
50
Source Line
167
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ExcludeFromBuildpathAction.java

        private void showExceptionDialog(CoreException exception) {
                showError(exception, fSite.getShell(), NewWizardMessages.ExcludeFromBuildathAction_ErrorTitle, exception.getMessage());
        }

        private void showError(CoreException e, Shell shell, String title, String message) {
                IStatus status = e.getStatus();
                if (status != null) {
                        ErrorDialog.openError(shell, message, title, status);
                }
                else   {
                        MessageDialog.openError(shell, title, message);
                }
        }

        private void selectAndReveal( final ISelection selection) {
                // validate the input
                IWorkbenchPage page = fSite.getPage();
                if (page == null)
                        return;

                // get all the view and editor parts
                List parts = new ArrayList();
                IWorkbenchPartReference refs[] = page.getViewReferences();
                for (int i = 0; i < refs.length; i++) {
                        IWorkbenchPart part = refs[i].getPart(false);
                        if (part != null)
                                parts.add(part);
                }
                refs = page.getEditorReferences();
                for (int i = 0; i < refs.length; i++) {
                        if (refs[i].getPart(false) != null)
                                parts.add(refs[i].getPart(false));
                }

                Iterator itr = parts.iterator();
                while (itr.hasNext()) {
                        IWorkbenchPart part = (IWorkbenchPart) itr.next();

                        // get the part's ISetSelectionTarget implementation
                        ISetSelectionTarget target = null;
                        if (part instanceof ISetSelectionTarget)
                                target = (ISetSelectionTarget) part;
                        else
                                target = (ISetSelectionTarget) part.getAdapter(ISetSelectionTarget.class );

                        if (target != null) {
                                // select and reveal resource
                                final ISetSelectionTarget finalTarget = target;
                                page.getWorkbenchWindow().getShell().getDisplay().asyncExec(new Runnable() {
                                        public void run() {
                                                finalTarget.selectReveal(selection);
                                        }
                                                                                            } );
                        }
                }
        }


Clone Instance
6
Line Count
50
Source Line
162
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/IncludeToBuildpathAction.java

        private void showExceptionDialog(CoreException exception) {
                showError(exception, fSite.getShell(), NewWizardMessages.IncludeToBuildpathAction_ErrorTitle, exception.getMessage());
        }

        private void showError(CoreException e, Shell shell, String title, String message) {
                IStatus status = e.getStatus();
                if (status != null) {
                        ErrorDialog.openError(shell, message, title, status);
                }
                else   {
                        MessageDialog.openError(shell, title, message);
                }
        }

        private void selectAndReveal( final ISelection selection) {
                // validate the input
                IWorkbenchPage page = fSite.getPage();
                if (page == null)
                        return;

                // get all the view and editor parts
                List parts = new ArrayList();
                IWorkbenchPartReference refs[] = page.getViewReferences();
                for (int i = 0; i < refs.length; i++) {
                        IWorkbenchPart part = refs[i].getPart(false);
                        if (part != null)
                                parts.add(part);
                }
                refs = page.getEditorReferences();
                for (int i = 0; i < refs.length; i++) {
                        if (refs[i].getPart(false) != null)
                                parts.add(refs[i].getPart(false));
                }

                Iterator itr = parts.iterator();
                while (itr.hasNext()) {
                        IWorkbenchPart part = (IWorkbenchPart) itr.next();

                        // get the part's ISetSelectionTarget implementation
                        ISetSelectionTarget target = null;
                        if (part instanceof ISetSelectionTarget)
                                target = (ISetSelectionTarget) part;
                        else
                                target = (ISetSelectionTarget) part.getAdapter(ISetSelectionTarget.class );

                        if (target != null) {
                                // select and reveal resource
                                final ISetSelectionTarget finalTarget = target;
                                page.getWorkbenchWindow().getShell().getDisplay().asyncExec(new Runnable() {
                                        public void run() {
                                                finalTarget.selectReveal(selection);
                                        }
                                                                                            } );
                        }
                }
        }


Clone Instance
7
Line Count
50
Source Line
251
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/RemoveFromBuildpathAction.java

        private void showExceptionDialog(CoreException exception) {
                showError(exception, fSite.getShell(), NewWizardMessages.RemoveFromBuildpathAction_ErrorTitle, exception.getMessage());
        }

        private void showError(CoreException e, Shell shell, String title, String message) {
                IStatus status = e.getStatus();
                if (status != null) {
                        ErrorDialog.openError(shell, message, title, status);
                }
                else   {
                        MessageDialog.openError(shell, title, message);
                }
        }

        private void selectAndReveal( final ISelection selection) {
                // validate the input
                IWorkbenchPage page = fSite.getPage();
                if (page == null)
                        return;

                // get all the view and editor parts
                List parts = new ArrayList();
                IWorkbenchPartReference refs[] = page.getViewReferences();
                for (int i = 0; i < refs.length; i++) {
                        IWorkbenchPart part = refs[i].getPart(false);
                        if (part != null)
                                parts.add(part);
                }
                refs = page.getEditorReferences();
                for (int i = 0; i < refs.length; i++) {
                        if (refs[i].getPart(false) != null)
                                parts.add(refs[i].getPart(false));
                }

                Iterator itr = parts.iterator();
                while (itr.hasNext()) {
                        IWorkbenchPart part = (IWorkbenchPart) itr.next();

                        // get the part's ISetSelectionTarget implementation
                        ISetSelectionTarget target = null;
                        if (part instanceof ISetSelectionTarget)
                                target = (ISetSelectionTarget) part;
                        else
                                target = (ISetSelectionTarget) part.getAdapter(ISetSelectionTarget.class );

                        if (target != null) {
                                // select and reveal resource
                                final ISetSelectionTarget finalTarget = target;
                                page.getWorkbenchWindow().getShell().getDisplay().asyncExec(new Runnable() {
                                        public void run() {
                                                finalTarget.selectReveal(selection);
                                        }
                                                                                            } );
                        }
                }
        }


Clone AbstractionParameter Count: 1Parameter Bindings

private void showExceptionDialog(CoreException exception) {
  showError(exception, fSite.getShell(), NewWizardMessages. [[#variableb85d3a60]], exception.getMessage());
}

private void showError(CoreException e, Shell shell, String title, String message) {
  IStatus status = e.getStatus();
  if (status != null) {
    ErrorDialog.openError(shell, message, title, status);
  }
  else {
    MessageDialog.openError(shell, title, message);
  }
}

private void selectAndReveal( final ISelection selection) {
  // validate the input
  IWorkbenchPage page = fSite.getPage();
  if (page == null)
    return;
  // get all the view and editor parts
  List parts = new ArrayList();
  IWorkbenchPartReference refs[] = page.getViewReferences();
  for (int i = 0; i < refs.length; i++) {
    IWorkbenchPart part = refs[i].getPart(false);
    if (part != null)
      parts.add(part);
  }
  refs = page.getEditorReferences();
  for (int i = 0; i < refs.length; i++) {
    if (refs[i].getPart(false) != null)
      parts.add(refs[i].getPart(false));
  }
  Iterator itr = parts.iterator();
  while (itr.hasNext()) {
    IWorkbenchPart part = (IWorkbenchPart) itr.next();
    // get the part's ISetSelectionTarget implementation
    ISetSelectionTarget target = null;
    if (part instanceof ISetSelectionTarget)
      target = (ISetSelectionTarget) part;
    else
      target = (ISetSelectionTarget) part.getAdapter(ISetSelectionTarget.class );
    if (target != null) {
      // select and reveal resource
      final ISetSelectionTarget finalTarget = target;
      page.getWorkbenchWindow().getShell().getDisplay().asyncExec(new Runnable() {
                                                                    public void run() {
                                                                      finalTarget.selectReveal(selection);
                                                                    }
                                                                  } );
    }
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b85d3a60]]
AddArchiveToBuildpathAction_ErrorTitle 
12[[#b85d3a60]]
AddSourceFolderToBuildpathAction_ErrorTitle 
13[[#b85d3a60]]
AddLibraryToBuildpathAction_ErrorTitle 
14[[#b85d3a60]]
AddSelectedLibraryToBuildpathAction_ErrorTitle 
15[[#b85d3a60]]
ExcludeFromBuildathAction_ErrorTitle 
16[[#b85d3a60]]
IncludeToBuildpathAction_ErrorTitle 
17[[#b85d3a60]]
RemoveFromBuildpathAction_ErrorTitle