Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
26 | 2 | 0 | 1.000 | class_body_declarations[4] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 26 | 61 | plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java |
2 | 25 | 265 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SerialVersionLaunchConfigurationDelegate.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; } |
| ||||
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; } |
| |||
/** * 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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
None |