Program: 145290
Project: 145290
Buggy source:
private void workflowLaunch(IActivity returningActivity,String returnCode,Hashtable returnVals){
  if (returningActivity == null) {
    returningActivity=null;
    launchActivity(new FormListActivity(this,"String_Node_Str"),context);
    String passwordVAR=midlet.getAppProperty("String_Node_Str");
    String usernameVAR=midlet.getAppProperty("String_Node_Str");
    if ((usernameVAR == null) || (passwordVAR == null)) {
      context.setElement("String_Node_Str","String_Node_Str");
      context.setElement("String_Node_Str","String_Node_Str");
    }
 else {
      context.setElement("String_Node_Str",usernameVAR);
      context.setElement("String_Node_Str",passwordVAR);
    }
    context.setElement("String_Node_Str","String_Node_Str");
    launchActivity(new LoginActivity(this,"String_Node_Str"),context);
  }
 else   if (returningActivity instanceof LoginActivity) {
    Object returnVal=returnVals.get(LoginActivity.COMMAND_KEY);
    if (returnVal == "String_Node_Str") {
      User user=(User)returnVals.get(LoginActivity.USER);
      FormListActivity formList=new FormListActivity(this,"String_Node_Str");
      if (user != null) {
        context.setCurrentUser(user.getUsername());
      }
      launchActivity(formList,context);
    }
 else     if (returnVal == "String_Node_Str") {
      exitShell();
    }
  }
 else   if (returningActivity instanceof FormListActivity) {
    String returnVal=(String)returnVals.get(FormListActivity.COMMAND_KEY);
    if (returnVal == Commands.CMD_SETTINGS) {
      launchActivity(new PropertyScreenActivity(this),context);
    }
 else     if (returnVal == Commands.CMD_VIEW_DATA) {
      launchActivity(new ModelListActivity(this),context);
    }
 else     if (returnVal == Commands.CMD_SELECT_XFORM) {
      launchFormEntryActivity(context,((Integer)returnVals.get(FormListActivity.FORM_ID_KEY)).intValue(),-1);
    }
 else     if (returnVal == Commands.CMD_EXIT) {
      exitShell();
    }
  }
 else   if (returningActivity instanceof ModelListActivity) {
    Object returnVal=returnVals.get(ModelListActivity.returnKey);
    if (returnVal == ModelListActivity.CMD_MSGS) {
      launchFormTransportActivity(context,TransportContext.MESSAGE_VIEW,null);
    }
 else     if (returnVal == ModelListActivity.CMD_EDIT) {
      launchFormEntryActivity(context,((FormDef)returnVals.get("String_Node_Str")).getID(),((DataModelTree)returnVals.get("String_Node_Str")).getId());
    }
 else     if (returnVal == ModelListActivity.CMD_SEND) {
      launchFormTransportActivity(context,TransportContext.SEND_DATA,(DataModelTree)returnVals.get("String_Node_Str"));
    }
 else     if (returnVal == ModelListActivity.CMD_BACK) {
      launchActivity(new FormListActivity(this,"String_Node_Str"),context);
    }
  }
 else   if (returningActivity instanceof FormEntryActivity) {
    if (((Boolean)returnVals.get("String_Node_Str")).booleanValue()) {
      launchFormTransportActivity(context,TransportContext.SEND_DATA,(DataModelTree)returnVals.get("String_Node_Str"));
    }
 else {
      relaunchListActivity();
    }
  }
 else   if (returningActivity instanceof FormTransportActivity) {
    relaunchListActivity();
  }
}

Fixed version (ground truth):
private void workflowLaunch(IActivity returningActivity,String returnCode,Hashtable returnVals){
  if (returningActivity == null) {
    returningActivity=null;
    launchActivity(new FormListActivity(this,"String_Node_Str"),context);
    String passwordVAR=midlet.getAppProperty("String_Node_Str");
    String usernameVAR=midlet.getAppProperty("String_Node_Str");
    if ((usernameVAR == null) || (passwordVAR == null)) {
      context.setElement("String_Node_Str","String_Node_Str");
      context.setElement("String_Node_Str","String_Node_Str");
    }
 else {
      context.setElement("String_Node_Str",usernameVAR);
      context.setElement("String_Node_Str",passwordVAR);
    }
    context.setElement("String_Node_Str","String_Node_Str");
    launchActivity(new LoginActivity(this,"String_Node_Str"),context);
  }
 else   if (returningActivity instanceof LoginActivity) {
    Object returnVal=returnVals.get(LoginActivity.COMMAND_KEY);
    if (returnVal == "String_Node_Str") {
      User user=(User)returnVals.get(LoginActivity.USER);
      FormListActivity formList=new FormListActivity(this,"String_Node_Str");
      if (user != null) {
        context.setCurrentUser(user.getUsername());
        context.setElement("String_Node_Str",user);
      }
      launchActivity(formList,context);
    }
 else     if (returnVal == "String_Node_Str") {
      exitShell();
    }
  }
 else   if (returningActivity instanceof FormListActivity) {
    String returnVal=(String)returnVals.get(FormListActivity.COMMAND_KEY);
    if (returnVal == Commands.CMD_SETTINGS) {
      launchActivity(new PropertyScreenActivity(this),context);
    }
 else     if (returnVal == Commands.CMD_VIEW_DATA) {
      launchActivity(new ModelListActivity(this),context);
    }
 else     if (returnVal == Commands.CMD_SELECT_XFORM) {
      launchFormEntryActivity(context,((Integer)returnVals.get(FormListActivity.FORM_ID_KEY)).intValue(),-1);
    }
 else     if (returnVal == Commands.CMD_EXIT) {
      exitShell();
    }
  }
 else   if (returningActivity instanceof ModelListActivity) {
    Object returnVal=returnVals.get(ModelListActivity.returnKey);
    if (returnVal == ModelListActivity.CMD_MSGS) {
      launchFormTransportActivity(context,TransportContext.MESSAGE_VIEW,null);
    }
 else     if (returnVal == ModelListActivity.CMD_EDIT) {
      launchFormEntryActivity(context,((FormDef)returnVals.get("String_Node_Str")).getID(),((DataModelTree)returnVals.get("String_Node_Str")).getId());
    }
 else     if (returnVal == ModelListActivity.CMD_SEND) {
      launchFormTransportActivity(context,TransportContext.SEND_DATA,(DataModelTree)returnVals.get("String_Node_Str"));
    }
 else     if (returnVal == ModelListActivity.CMD_BACK) {
      launchActivity(new FormListActivity(this,"String_Node_Str"),context);
    }
  }
 else   if (returningActivity instanceof FormEntryActivity) {
    if (((Boolean)returnVals.get("String_Node_Str")).booleanValue()) {
      launchFormTransportActivity(context,TransportContext.SEND_DATA,(DataModelTree)returnVals.get("String_Node_Str"));
    }
 else {
      relaunchListActivity();
    }
  }
 else   if (returningActivity instanceof FormTransportActivity) {
    relaunchListActivity();
  }
}