CloneSet818


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
26201.000class_body_declarations[4]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12661
plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
225265
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SerialVersionLaunchConfigurationDelegate.java
Clone Instance
1
Line Count
26
Source Line
61
Source File
plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java

        /**
         * Convenience handle to the system-specific file separator character
         */
        private static final char fgSeparator = File.separatorChar;

        /**
         * The list of locations in which to look for the java executable in candidate
         * VM install locations, relative to the VM install location.
         */
        private static final String[] fgCandidateJavaFiles = {
                                                              "javaw", "javaw.exe", "java", "java.exe", "j9w", "j9w.exe", "j9", "j9.exe"
                                      };                                                                                                   //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$

        private static final String[] fgCandidateJavaLocations = {
                                                                  "bin" + fgSeparator, "jre" + fgSeparator + "bin" + fgSeparator
                                      };                                                                                           //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

        /**
         * Starting in the specified VM install location, attempt to find the 'java' executable
         * file.  If found, return the corresponding <code>File</code> object, otherwise return
         * <code>null</code>.
         */
        public static File findJavaExecutable(File vmInstallLocation) {
                // Try each candidate in order.  The first one found wins.  Thus, the order
                // of fgCandidateJavaLocations and fgCandidateJavaFiles is significant.
                for (int i = 0; i < fgCandidateJavaFiles.length; i++) {
                        for (int j = 0; j < fgCandidateJavaLocations.length; j++) {
                                File javaFile = new File(vmInstallLocation, fgCandidateJavaLocations[j] + fgCandidateJavaFiles[i]);
                                if (javaFile.isFile()) {
                                        return javaFile;
                                }
                        }
                }
                return null;
        }


Clone Instance
2
Line Count
25
Source Line
265
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SerialVersionLaunchConfigurationDelegate.java

        private static final char fgSeparator = File.separatorChar;

        /**
         * The list of locations in which to look for the java executable in candidate
         * VM install locations, relative to the VM install location.
         */
        private static final String[] fgCandidateJavaFiles = {
                                                              "javaw", "javaw.exe", "java", "java.exe", "j9w", "j9w.exe", "j9", "j9.exe"
                                      };                                                                                                   //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$

        private static final String[] fgCandidateJavaLocations = {
                                                                  "bin" + fgSeparator, "jre" + fgSeparator + "bin" + fgSeparator
                                      };                                                                                           //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

        /**
         * Starting in the specified VM install location, attempt to find the 'java' executable
         * file.  If found, return the corresponding <code>File</code> object, otherwise return
         * <code>null</code>.
         */
        public static File findJavaExecutable(File vmInstallLocation) {
                // Try each candidate in order.  The first one found wins.  Thus, the order
                // of fgCandidateJavaLocations and fgCandidateJavaFiles is significant.
                for (int i = 0; i < fgCandidateJavaFiles.length; i++) {
                        for (int j = 0; j < fgCandidateJavaLocations.length; j++) {
                                File javaFile = new File(vmInstallLocation, fgCandidateJavaLocations[j] + fgCandidateJavaFiles[i]);
                                if (javaFile.isFile()) {
                                        return javaFile;
                                }
                        }
                }
                return null;
        }


Clone AbstractionParameter Count: 0Parameter Bindings

/**
         * Convenience handle to the system-specific file separator character
         */
private static final char fgSeparator = File.separatorChar;

/**
         * The list of locations in which to look for the java executable in candidate
         * VM install locations, relative to the VM install location.
         */
private static final String[] fgCandidateJavaFiles = {
                                "javaw",
                                "javaw.exe",
                                "java",
                                "java.exe",
                                "j9w",
                                "j9w.exe",
                                "j9",
                                "j9.exe"
                              }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$

private static final String[] fgCandidateJavaLocations = {
                                "bin" + fgSeparator,
                                "jre" + fgSeparator + "bin" + fgSeparator
                              }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

/**
         * Starting in the specified VM install location, attempt to find the 'java' executable
         * file.  If found, return the corresponding <code>File</code> object, otherwise return
         * <code>null</code>.
         */
public static File findJavaExecutable(File vmInstallLocation) {
  // Try each candidate in order.  The first one found wins.  Thus, the order
  // of fgCandidateJavaLocations and fgCandidateJavaFiles is significant.
  for (int i = 0; i < fgCandidateJavaFiles.length; i++) {
    for (int j = 0; j < fgCandidateJavaLocations.length; j++) {
      File javaFile = new File(vmInstallLocation, fgCandidateJavaLocations[j] + fgCandidateJavaFiles[i]);
      if (javaFile.isFile()) {
        return javaFile;
      }
    }
  }
  return null;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None