CloneSet771


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
17210.990statement_sequence_member
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
116422
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaClasspathTab.java
217215
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaMainTab.java
Clone Instance
1
Line Count
16
Source Line
422
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaClasspathTab.java

                if (projectName.length() > 0) {
                        IWorkspace workspace = ResourcesPlugin.getWorkspace();
                        IStatus status = workspace.validateName(projectName, IResource.PROJECT);
                        if (status.isOK()) {
                                IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
                                if ( !project.exists()) {
                                        setErrorMessage(MessageFormat.format(LauncherMessages.JavaMainTab_20, new String[] {
                                                                                                                            projectName
                                                                                                                           } ));
                                        return false;
                                }
                                if ( !project.isOpen()) {
                                        setErrorMessage(MessageFormat.format(LauncherMessages.JavaMainTab_21, new String[] {
                                                                                                                            projectName
                                                                                                                           } ));
                                        return false;
                                }
                        }
                        else   {
                                setErrorMessage(MessageFormat.format(LauncherMessages.JavaMainTab_19, new String[] {
                                                                                                                    status.getMessage()
                                                                                                                   } ));
                                return false;
                        }
                }


Clone Instance
2
Line Count
17
Source Line
215
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaMainTab.java

                if (name.length() > 0) {
                        IWorkspace workspace = ResourcesPlugin.getWorkspace();
                        IStatus status = workspace.validateName(name, IResource.PROJECT);
                        if (status.isOK()) {
                                IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
                                if ( !project.exists()) {
                                        setErrorMessage(MessageFormat.format(LauncherMessages.JavaMainTab_20, new String[] {
                                                                                                                            name
                                                                                                                           } ));
                                        return false;
                                } //end if
                                if ( !project.isOpen()) {
                                        setErrorMessage(MessageFormat.format(LauncherMessages.JavaMainTab_21, new String[] {
                                                                                                                            name
                                                                                                                           } ));
                                        return false;
                                } //end if
                        } //end if 
                        else {
                                setErrorMessage(MessageFormat.format(LauncherMessages.JavaMainTab_19, new String[] {
                                                                                                                    status.getMessage()
                                                                                                                   } ));
                                return false;
                        } //end else
                } //end if


Clone AbstractionParameter Count: 1Parameter Bindings

if ( [[#variableb305b9a0]].length() > 0) {
  IWorkspace workspace = ResourcesPlugin.getWorkspace();
  IStatus status = workspace.validateName( [[#variableb305b9a0]], IResource.PROJECT);
  if (status.isOK()) {
    IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject( [[#variableb305b9a0]]);
    if ( !project.exists()) {
      setErrorMessage(MessageFormat.format(LauncherMessages.JavaMainTab_20, new String[] {
                                                                                            [[#variableb305b9a0]]
                                                                                         } ));
      return false;
    } //end if
    if ( !project.isOpen()) {
      setErrorMessage(MessageFormat.format(LauncherMessages.JavaMainTab_21, new String[] {
                                                                                            [[#variableb305b9a0]]
                                                                                         } ));
      return false;
    } //end if
  } //end if 
  else {
    setErrorMessage(MessageFormat.format(LauncherMessages.JavaMainTab_19, new String[] {
                                                                                         status.getMessage()
                                                                                       } ));
    return false;
  } //end else
} //end if
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b305b9a0]]
name 
12[[#b305b9a0]]
projectName