Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
15 | 2 | 0 | 1.000 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 15 | 189 | plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketLaunchingConnectorImpl.java |
2 | 15 | 73 | plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/SocketUtil.java |
| ||||
/** * Returns a free port number on localhost, or -1 if unable to find a free port. * * @return a free port number on localhost, or -1 if unable to find a free port * @since 3.2 */ public static int findFreePort() { ServerSocket socket = null; try { socket = new ServerSocket(0); return socket.getLocalPort(); } catch (IOException e) { } finally { if (socket != null) { try { socket.close(); } catch (IOException e) { } } } return -1; } |
| ||||
/** * Returns a free port number on localhost, or -1 if unable to find a free port. * * @return a free port number on localhost, or -1 if unable to find a free port * @since 3.0 */ public static int findFreePort() { ServerSocket socket = null; try { socket = new ServerSocket(0); return socket.getLocalPort(); } catch (IOException e) { } finally { if (socket != null) { try { socket.close(); } catch (IOException e) { } } } return -1; } |
| |||
/** * Returns a free port number on localhost, or -1 if unable to find a free port. * * @return a free port number on localhost, or -1 if unable to find a free port * @since 3.0 */ /** * Returns a free port number on localhost, or -1 if unable to find a free port. * * @return a free port number on localhost, or -1 if unable to find a free port * @since 3.2 */ public static int findFreePort() { ServerSocket socket = null; try { socket = new ServerSocket(0); return socket.getLocalPort(); } catch (IOException e) { } finally { if (socket != null) { try { socket.close(); } catch (IOException e) { } } } return -1; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
None |