Program: 145368
Project: 145368
Buggy source:
public void commandAction(Command c,Displayable d){
  System.out.println("String_Node_Str");
  if (c == CMD_EDIT) {
    try {
      if (this.getSelectedIndex() == -1) {
      }
 else {
        FormDataMetaData data=(FormDataMetaData)modelIDs.elementAt(this.getSelectedIndex());
        System.out.println(data.toString());
        FormDef selectedForm=new FormDef();
        System.out.println("String_Node_Str" + data.getFormIdReference());
        this.formDefRMSUtility.retrieveFromRMS(data.getFormIdReference(),selectedForm);
        System.out.println("String_Node_Str" + data.getRecordId());
        FormData formData=new FormData();
        this.formDataRMSUtility.retrieveFromRMS(data.getRecordId(),formData);
        selectedForm.setName(this.formDefRMSUtility.getName(data.getFormIdReference()));
        Hashtable formEditArgs=new Hashtable();
        formEditArgs.put(returnKey,CMD_EDIT);
        formEditArgs.put("String_Node_Str",selectedForm);
        formEditArgs.put("String_Node_Str",formData);
        mainShell.returnFromModule(this,Constants.ACTIVITY_COMPLETE,formEditArgs);
      }
    }
 catch (    Exception ex) {
      ex.printStackTrace();
    }
  }
 else   if (c == CMD_SEND) {
    if (this.getSelectedIndex() != -1) {
      FormDataMetaData data=(FormDataMetaData)modelIDs.elementAt(this.getSelectedIndex());
      FormData model=new FormData();
      try {
        this.formDataRMSUtility.retrieveFromRMS(data.getRecordId(),model);
        model.setRecordId(data.getRecordId());
      }
 catch (      IOException e) {
        javax.microedition.lcdui.Alert a=new javax.microedition.lcdui.Alert("String_Node_Str","String_Node_Str",null,AlertType.ERROR);
        mainShell.setDisplay(this,a);
        e.printStackTrace();
      }
catch (      IllegalAccessException e) {
        javax.microedition.lcdui.Alert a=new javax.microedition.lcdui.Alert("String_Node_Str","String_Node_Str",null,AlertType.ERROR);
        mainShell.setDisplay(this,a);
        e.printStackTrace();
      }
catch (      InstantiationException e) {
        javax.microedition.lcdui.Alert a=new javax.microedition.lcdui.Alert("String_Node_Str","String_Node_Str",null,AlertType.ERROR);
        mainShell.setDisplay(this,a);
        e.printStackTrace();
      }
      Hashtable formSendArgs=new Hashtable();
      formSendArgs.put(returnKey,CMD_SEND);
      formSendArgs.put("String_Node_Str",model);
      mainShell.returnFromModule(this,Constants.ACTIVITY_COMPLETE,formSendArgs);
    }
  }
 else   if (c == CMD_EMPTY) {
    this.formDataRMSUtility.tempEmpty();
    createView();
  }
 else   if (c == CMD_BACK) {
    mainShell.returnFromModule(this,Constants.ACTIVITY_COMPLETE,null);
  }
 else   if (c == CMD_DELETE) {
    FormDataMetaData data=(FormDataMetaData)modelIDs.elementAt(this.getSelectedIndex());
    formDataRMSUtility.deleteRecord(data.getRecordId());
    this.createView();
  }
 else   if (c == CMD_MSGS) {
    Hashtable returnArgs=new Hashtable();
    returnArgs.put(returnKey,CMD_MSGS);
  }
 else   if (c == CMD_REFRESH) {
    this.createView();
  }
}

Fixed version (ground truth):
public void commandAction(Command c,Displayable d){
  System.out.println("String_Node_Str");
  if (c == CMD_EDIT) {
    try {
      if (this.getSelectedIndex() == -1) {
      }
 else {
        FormDataMetaData data=(FormDataMetaData)modelIDs.elementAt(this.getSelectedIndex());
        System.out.println(data.toString());
        FormDef selectedForm=new FormDef();
        System.out.println("String_Node_Str" + data.getFormIdReference());
        this.formDefRMSUtility.retrieveFromRMS(data.getFormIdReference(),selectedForm);
        System.out.println("String_Node_Str" + data.getRecordId());
        FormData formData=new FormData();
        this.formDataRMSUtility.retrieveFromRMS(data.getRecordId(),formData);
        selectedForm.setName(this.formDefRMSUtility.getName(data.getFormIdReference()));
        Hashtable formEditArgs=new Hashtable();
        formEditArgs.put(returnKey,CMD_EDIT);
        formEditArgs.put("String_Node_Str",selectedForm);
        formEditArgs.put("String_Node_Str",formData);
        mainShell.returnFromModule(this,Constants.ACTIVITY_COMPLETE,formEditArgs);
      }
    }
 catch (    Exception ex) {
      ex.printStackTrace();
    }
  }
 else   if (c == CMD_SEND) {
    if (this.getSelectedIndex() != -1) {
      FormDataMetaData data=(FormDataMetaData)modelIDs.elementAt(this.getSelectedIndex());
      FormData model=new FormData();
      try {
        this.formDataRMSUtility.retrieveFromRMS(data.getRecordId(),model);
        model.setRecordId(data.getRecordId());
      }
 catch (      IOException e) {
        javax.microedition.lcdui.Alert a=new javax.microedition.lcdui.Alert("String_Node_Str","String_Node_Str",null,AlertType.ERROR);
        mainShell.setDisplay(this,a);
        e.printStackTrace();
      }
catch (      IllegalAccessException e) {
        javax.microedition.lcdui.Alert a=new javax.microedition.lcdui.Alert("String_Node_Str","String_Node_Str",null,AlertType.ERROR);
        mainShell.setDisplay(this,a);
        e.printStackTrace();
      }
catch (      InstantiationException e) {
        javax.microedition.lcdui.Alert a=new javax.microedition.lcdui.Alert("String_Node_Str","String_Node_Str",null,AlertType.ERROR);
        mainShell.setDisplay(this,a);
        e.printStackTrace();
      }
      Hashtable formSendArgs=new Hashtable();
      formSendArgs.put(returnKey,CMD_SEND);
      formSendArgs.put("String_Node_Str",model);
      mainShell.returnFromModule(this,Constants.ACTIVITY_COMPLETE,formSendArgs);
    }
  }
 else   if (c == CMD_EMPTY) {
    this.formDataRMSUtility.tempEmpty();
    createView();
  }
 else   if (c == CMD_BACK) {
    mainShell.returnFromModule(this,Constants.ACTIVITY_COMPLETE,null);
  }
 else   if (c == CMD_DELETE) {
    FormDataMetaData data=(FormDataMetaData)modelIDs.elementAt(this.getSelectedIndex());
    formDataRMSUtility.deleteRecord(data.getRecordId());
    this.createView();
  }
 else   if (c == CMD_MSGS) {
    Hashtable returnArgs=new Hashtable();
    returnArgs.put(returnKey,CMD_MSGS);
    mainShell.returnFromModule(this,Constants.ACTIVITY_NEEDS_RESOLUTION,returnArgs);
  }
 else   if (c == CMD_REFRESH) {
    this.createView();
  }
}