Program: 146933
Project: 146933
Buggy source:
public void configureApp(MIDlet m,InitializationListener listener){
  failsafeInit(m);
  Logger.log("String_Node_Str","String_Node_Str");
  this.midlet=m;
  setProperties();
  loadModules();
  registerAddtlStorage();
  StorageManager.repairAll();
  RMSTransaction.cleanup();
  initReferences();
  Localization.registerLanguageReference("String_Node_Str","String_Node_Str");
  Localization.registerLanguageReference("String_Node_Str","String_Node_Str");
  final CommCareStartupInteraction interaction=new CommCareStartupInteraction(CommCareStartupInteraction.failSafeText("String_Node_Str","String_Node_Str"));
  Display.getDisplay(m).setCurrent(interaction);
  CommCareInitializer initializer=new CommCareInitializer(){
    private String validate(){
      this.setMessage(CommCareStartupInteraction.failSafeText("String_Node_Str","String_Node_Str"));
      Vector<UnresolvedResourceException> problems=global.verifyInstallation();
      if (problems.size() > 0) {
        String message=CommCareStartupInteraction.failSafeText("String_Node_Str","String_Node_Str");
        Hashtable<String,Vector<String>> problemList=new Hashtable<String,Vector<String>>();
        for (        UnresolvedResourceException ure : problems) {
          String res=ure.getResource().getResourceId();
          Vector<String> list;
          if (problemList.containsKey(res)) {
            list=problemList.get(res);
          }
 else {
            list=new Vector<String>();
          }
          list.addElement(ure.getMessage());
          problemList.put(res,list);
        }
        for (Enumeration en=problemList.keys(); en.hasMoreElements(); ) {
          String resource=(String)en.nextElement();
          message+="String_Node_Str" + resource;
          message+="String_Node_Str";
          for (          String s : problemList.get(resource)) {
            message+="String_Node_Str" + s;
          }
        }
        return message;
      }
      return null;
    }
    protected boolean runWrapper() throws UnfullfilledRequirementsException {
      manager=new CommCarePlatform(CommCareUtil.getMajorVersion(),CommCareUtil.getMinorVersion());
      try {
        ResourceTable global=RetrieveGlobalResourceTable();
        boolean firstStart=false;
        if (global.isEmpty()) {
          firstStart=true;
          this.setMessage(CommCareStartupInteraction.failSafeText("String_Node_Str","String_Node_Str"));
        }
        manager.init(CommCareUtil.getProfileReference(),global,false);
      }
 catch (      UnfullfilledRequirementsException e) {
        if (e.getSeverity() == UnfullfilledRequirementsException.SEVERITY_PROMPT) {
          String message=e.getMessage();
          if (e.getRequirementCode() == UnfullfilledRequirementsException.REQUIREMENT_MAJOR_APP_VERSION || e.getRequirementCode() == UnfullfilledRequirementsException.REQUIREMENT_MAJOR_APP_VERSION) {
            message=CommCareStartupInteraction.failSafeText("String_Node_Str","String_Node_Str");
          }
          if (this.blockForResponse(message)) {
            try {
              RetrieveGlobalResourceTable().clear();
              manager.init(CommCareUtil.getProfileReference(),RetrieveGlobalResourceTable(),true);
            }
 catch (            UnfullfilledRequirementsException e1) {
              throw e1;
            }
catch (            UnresolvedResourceException e3) {
              throw new RuntimeException(e3.getMessage());
            }
          }
 else {
            throw e;
          }
        }
 else {
          throw e;
        }
      }
catch (      UnresolvedResourceException e) {
        throw new RuntimeException(e.getMessage());
      }
      if (!CommCareUtil.getAppProperty("String_Node_Str","String_Node_Str").equals("String_Node_Str") && !CommCareProperties.PROPERTY_YES.equals(PropertyManager._().getSingularProperty(CommCareProperties.CONTENT_VALIDATED))) {
        String failureMessage=this.validate();
        while (failureMessage != null) {
          Logger.log("String_Node_Str","String_Node_Str");
          this.blockForResponse(failureMessage);
          if (this.response == CommCareInitializer.RESPONSE_YES) {
            failureMessage=this.validate();
          }
 else {
            CommCareContext.this.exitApp();
            return false;
          }
        }
        PropertyManager._().setProperty(CommCareProperties.CONTENT_VALIDATED,CommCareProperties.PROPERTY_YES);
      }
      Localization.setLocale("String_Node_Str");
      manager.initialize(RetrieveGlobalResourceTable());
      purgeScheduler();
      postProfilePropertyInit();
      initUserFramework();
      LogReportUtils.initPendingDates(new Date().getTime());
      LanguageUtils.initializeLanguage(true,"String_Node_Str");
      J2MEDisplay.init(CommCareContext.this.midlet);
      if (CommCareSense.isAutoSendEnabled()) {
        AutomatedSenderService.InitializeAndSpawnSenderService();
      }
      return true;
    }
    protected void askForResponse(    String message,    YesNoListener yesNoListener){
      interaction.AskYesNo(message,yesNoListener);
    }
    protected void setMessage(    String message){
      interaction.setMessage(message);
    }
  }
;
  initializer.initialize(listener);
}

Fixed version (ground truth):
public void configureApp(MIDlet m,InitializationListener listener){
  failsafeInit(m);
  Logger.log("String_Node_Str","String_Node_Str");
  this.midlet=m;
  setProperties();
  loadModules();
  registerAddtlStorage();
  StorageManager.repairAll();
  RMSTransaction.cleanup();
  initReferences();
  Localization.registerLanguageReference("String_Node_Str","String_Node_Str");
  Localization.registerLanguageReference("String_Node_Str","String_Node_Str");
  final CommCareStartupInteraction interaction=new CommCareStartupInteraction(CommCareStartupInteraction.failSafeText("String_Node_Str","String_Node_Str"));
  Display.getDisplay(m).setCurrent(interaction);
  CommCareInitializer initializer=new CommCareInitializer(){
    private String validate(){
      this.setMessage(CommCareStartupInteraction.failSafeText("String_Node_Str","String_Node_Str"));
      Vector<UnresolvedResourceException> problems=global.verifyInstallation();
      if (problems.size() > 0) {
        String message=CommCareStartupInteraction.failSafeText("String_Node_Str","String_Node_Str");
        Hashtable<String,Vector<String>> problemList=new Hashtable<String,Vector<String>>();
        for (        UnresolvedResourceException ure : problems) {
          String res=ure.getResource().getResourceId();
          Vector<String> list;
          if (problemList.containsKey(res)) {
            list=problemList.get(res);
          }
 else {
            list=new Vector<String>();
          }
          list.addElement(ure.getMessage());
          problemList.put(res,list);
        }
        for (Enumeration en=problemList.keys(); en.hasMoreElements(); ) {
          String resource=(String)en.nextElement();
          message+="String_Node_Str" + resource;
          message+="String_Node_Str";
          for (          String s : problemList.get(resource)) {
            message+="String_Node_Str" + s;
          }
        }
        return message;
      }
      return null;
    }
    protected boolean runWrapper() throws UnfullfilledRequirementsException {
      manager=new CommCarePlatform(CommCareUtil.getMajorVersion(),CommCareUtil.getMinorVersion());
      try {
        ResourceTable global=RetrieveGlobalResourceTable();
        boolean firstStart=false;
        if (global.isEmpty()) {
          firstStart=true;
          this.setMessage(CommCareStartupInteraction.failSafeText("String_Node_Str","String_Node_Str"));
        }
        manager.init(CommCareUtil.getProfileReference(),global,false);
      }
 catch (      UnfullfilledRequirementsException e) {
        if (e.getSeverity() == UnfullfilledRequirementsException.SEVERITY_PROMPT) {
          String message=e.getMessage();
          if (e.getRequirementCode() == UnfullfilledRequirementsException.REQUIREMENT_MAJOR_APP_VERSION || e.getRequirementCode() == UnfullfilledRequirementsException.REQUIREMENT_MAJOR_APP_VERSION) {
            message=CommCareStartupInteraction.failSafeText("String_Node_Str","String_Node_Str");
          }
          if (this.blockForResponse(message)) {
            try {
              RetrieveGlobalResourceTable().clear();
              manager.init(CommCareUtil.getProfileReference(),RetrieveGlobalResourceTable(),true);
            }
 catch (            UnfullfilledRequirementsException e1) {
              throw e1;
            }
catch (            UnresolvedResourceException e3) {
              throw new RuntimeException(e3.getMessage());
            }
          }
 else {
            throw e;
          }
        }
 else {
          throw e;
        }
      }
catch (      UnresolvedResourceException e) {
        throw new RuntimeException(e.getMessage());
      }
      if (!CommCareUtil.getAppProperty("String_Node_Str","String_Node_Str").equals("String_Node_Str") && !CommCareProperties.PROPERTY_YES.equals(PropertyManager._().getSingularProperty(CommCareProperties.CONTENT_VALIDATED))) {
        String failureMessage=this.validate();
        while (failureMessage != null) {
          Logger.log("String_Node_Str","String_Node_Str");
          this.blockForResponse(failureMessage);
          if (this.response == CommCareInitializer.RESPONSE_YES) {
            failureMessage=this.validate();
          }
 else {
            CommCareContext.this.exitApp();
            return false;
          }
        }
        PropertyManager._().setProperty(CommCareProperties.CONTENT_VALIDATED,CommCareProperties.PROPERTY_YES);
      }
      Localization.setLocale("String_Node_Str");
      manager.initialize(RetrieveGlobalResourceTable());
      purgeScheduler();
      postProfilePropertyInit();
      initUserFramework();
      LogReportUtils.initPendingDates(new Date().getTime());
      LanguageUtils.initializeLanguage(true,"String_Node_Str");
      J2MEDisplay.init(CommCareContext.this.midlet);
      if (CommCareSense.isAutoSendEnabled()) {
        AutomatedSenderService.InitializeAndSpawnSenderService();
      }
      return true;
    }
    protected void askForResponse(    String message,    YesNoListener yesNoListener){
      interaction.AskYesNo(message,yesNoListener);
    }
    protected void setMessage(    String message){
      interaction.setMessage(message,true);
    }
  }
;
  initializer.initialize(listener);
}