Program: 80028
Project: 80028
Buggy source:
/** 
 * Execute the command given on the command line
 * @param command   The command to execute. The command itself was determined by an earlier call to parseArgs().
 * @exception Exception	throws an exception if an error occurssee class comments for more information
 */
public void executeWork(int command) throws Exception {
  if (command == COMMAND_UNKNOWN)   return;
  if (commandArgs.size() != COMMAND_ARGS[command])   consolePropertyMessage("String_Node_Str",COMMANDS[command]);
  int min;
  int max;
switch (command) {
case COMMAND_START:
    shutdownDatabasesOnShutdown=true;
  blockingStart(makePrintWriter(System.out));
break;
case COMMAND_SHUTDOWN:
shutdown();
consolePropertyMessage("String_Node_Str",new String[]{att_srvclsnm,versionString});
break;
case COMMAND_TRACE:
{
boolean on=isOn((String)commandArgs.get(0));
trace(sessionArg,on);
consoleTraceMessage(sessionArg,on);
break;
}
case COMMAND_TRACEDIRECTORY:
String directory=(String)commandArgs.get(0);
sendSetTraceDirectory(directory);
consolePropertyMessage("String_Node_Str",directory);
break;
case COMMAND_TESTCONNECTION:
ping();
consolePropertyMessage("String_Node_Str",new String[]{hostArg,Integer.toString(portNumber)});
break;
case COMMAND_LOGCONNECTIONS:
{
boolean on=isOn((String)commandArgs.get(0));
logConnections(on);
consolePropertyMessage("String_Node_Str",on ? "String_Node_Str" : "String_Node_Str");
break;
}
case COMMAND_SYSINFO:
{
String info=sysinfo();
consoleMessage(info,false);
break;
}
case COMMAND_MAXTHREADS:
max=0;
try {
max=Integer.parseInt((String)commandArgs.get(0));
}
 catch (NumberFormatException e) {
consolePropertyMessage("String_Node_Str",new String[]{(String)commandArgs.get(0),"String_Node_Str"});
}
if (max < MIN_MAXTHREADS) consolePropertyMessage("String_Node_Str",new String[]{Integer.toString(max),"String_Node_Str"});
netSetMaxThreads(max);
break;
case COMMAND_RUNTIME_INFO:
String reply=runtimeInfo();
consoleMessage(reply,false);
break;
case COMMAND_TIMESLICE:
int timeslice=0;
String timeSliceArg=(String)commandArgs.get(0);
try {
timeslice=Integer.parseInt(timeSliceArg);
}
 catch (NumberFormatException e) {
consolePropertyMessage("String_Node_Str",new String[]{(String)commandArgs.get(0),"String_Node_Str"});
}
if (timeslice < MIN_TIMESLICE) consolePropertyMessage("String_Node_Str",new String[]{Integer.toString(timeslice),"String_Node_Str"});
netSetTimeSlice(timeslice);
break;
default :
if (SanityManager.DEBUG) SanityManager.THROWASSERT("String_Node_Str" + command);
}
}

Fixed version (ground truth):
/** 
 * Execute the command given on the command line
 * @param command   The command to execute. The command itself was determined by an earlier call to parseArgs().
 * @exception Exception	throws an exception if an error occurssee class comments for more information
 */
public void executeWork(int command) throws Exception {
  if (command == COMMAND_UNKNOWN)   return;
  if (commandArgs.size() != COMMAND_ARGS[command])   consolePropertyMessage("String_Node_Str",COMMANDS[command]);
  int min;
  int max;
switch (command) {
case COMMAND_START:
    shutdownDatabasesOnShutdown=true;
  blockingStart(makePrintWriter(System.out));
break;
case COMMAND_SHUTDOWN:
shutdown();
consolePropertyMessage("String_Node_Str",new String[]{att_srvclsnm,versionString});
break;
case COMMAND_TRACE:
{
boolean on=isOn((String)commandArgs.get(0));
trace(sessionArg,on);
consoleTraceMessage(sessionArg,on);
break;
}
case COMMAND_TRACEDIRECTORY:
String directory=(String)commandArgs.get(0);
sendSetTraceDirectory(directory);
consolePropertyMessage("String_Node_Str",directory);
break;
case COMMAND_TESTCONNECTION:
ping();
consolePropertyMessage("String_Node_Str",new String[]{hostArg,Integer.toString(portNumber)});
break;
case COMMAND_LOGCONNECTIONS:
{
boolean on=isOn((String)commandArgs.get(0));
logConnections(on);
logConnectionsChange(on);
break;
}
case COMMAND_SYSINFO:
{
String info=sysinfo();
consoleMessage(info,false);
break;
}
case COMMAND_MAXTHREADS:
max=0;
try {
max=Integer.parseInt((String)commandArgs.get(0));
}
 catch (NumberFormatException e) {
consolePropertyMessage("String_Node_Str",new String[]{(String)commandArgs.get(0),"String_Node_Str"});
}
if (max < MIN_MAXTHREADS) consolePropertyMessage("String_Node_Str",new String[]{Integer.toString(max),"String_Node_Str"});
netSetMaxThreads(max);
break;
case COMMAND_RUNTIME_INFO:
String reply=runtimeInfo();
consoleMessage(reply,false);
break;
case COMMAND_TIMESLICE:
int timeslice=0;
String timeSliceArg=(String)commandArgs.get(0);
try {
timeslice=Integer.parseInt(timeSliceArg);
}
 catch (NumberFormatException e) {
consolePropertyMessage("String_Node_Str",new String[]{(String)commandArgs.get(0),"String_Node_Str"});
}
if (timeslice < MIN_TIMESLICE) consolePropertyMessage("String_Node_Str",new String[]{Integer.toString(timeslice),"String_Node_Str"});
netSetTimeSlice(timeslice);
break;
default :
if (SanityManager.DEBUG) SanityManager.THROWASSERT("String_Node_Str" + command);
}
}