Buggy code:
public class NetworkServerControl { public static final int DEFAULT_PORTNUMBER = 1527 ; private static final String DERBYNET_JAR = "derbynet.jar" ; private static final String POLICY_FILENAME = "server.policy" ; private static final String POLICY_FILE_PROPERTY = "java.security.policy" ; private static final String DERBY_HOSTNAME_WILDCARD = "0.0.0.0" ; private static final String IPV6_HOSTNAME_WILDCARD = "::" ; private static final String SOCKET_PERMISSION_HOSTNAME_WILDCARD = "*" ; private NetworkServerControlImpl serverImpl ; public NetworkServerControl ( InetAddress address , int portNumber , String userName , String password ) throws Exception { } public NetworkServerControl ( String userName , String password ) throws Exception { } public NetworkServerControl ( InetAddress address , int portNumber ) throws Exception { } public NetworkServerControl ( ) throws Exception { } public static void main ( String [ ] args ) { NetworkServerControlImpl server = null ; boolean printErrors = true ; try { server = new NetworkServerControlImpl ( ) ; int command = server . parseArgs ( args ) ; if ( NetworkServerControl . needsSecurityManager ( server , command ) ) { NetworkServerControl . verifySecurityState ( server ) ; NetworkServerControl . installSecurityManager ( server ) ; } printErrors = false ; server . executeWork ( command ) ; } catch ( Exception e ) { if ( ( ( ( e . getMessage ( ) ) == null ) || ( ! ( e . getMessage ( ) . equals ( UNEXPECTED_ERR ) ) ) ) || printErrors ) { if ( server != null ) <START_BUG> server . consoleExceptionPrint ( e ) ; <END_BUG> else e . printStackTrace ( ) ; } System . exit ( 1 ) ; } System . exit ( 0 ) ; } public void start ( PrintWriter consoleWriter ) throws Exception { } public void shutdown ( ) throws Exception { } public void ping ( ) throws Exception { } public void trace ( boolean on ) throws Exception { } public void trace ( int connNum , boolean on ) throws Exception { } public void logConnections ( boolean on ) throws Exception { } public void setTraceDirectory ( String traceDirectory ) throws Exception { } public String getSysinfo ( ) throws Exception { } public String getRuntimeInfo ( ) throws Exception { } public void setMaxThreads ( int max ) throws Exception { } public int getMaxThreads ( ) throws Exception { } public void setTimeSlice ( int timeslice ) throws Exception { } public int getTimeSlice ( ) throws Exception { } public Properties getCurrentProperties ( ) throws Exception { } protected void setClientLocale ( String locale ) { } private static boolean needsSecurityManager ( NetworkServerControlImpl server , int command ) throws Exception { } private static void verifySecurityState ( NetworkServerControlImpl server ) throws Exception { } private static void installSecurityManager ( NetworkServerControlImpl server ) throws Exception { } private static String getHostNameForSocketPermission ( NetworkServerControlImpl server ) throws Exception { } private static boolean hostnamesEqual ( String left , String right ) { } private static boolean isIPV6Address ( String hostname ) { } private static String getCodeSourcePrefix ( NetworkServerControlImpl server ) throws Exception { } private static String getPolicyFileURL ( ) throws Exception { } }

Fix:
server . consoleExceptionPrintTrace ( e ) ;