Program: 173679
Project: 173679
Buggy source:
protected void executeNetworkInfo(String companyName){
  GameManagerI gm=orUIManager.getGameUIManager().getGameManager();
  if (companyName.equals("String_Node_Str")) {
    NetworkGraphBuilder nwGraph=NetworkGraphBuilder.create(gm);
    SimpleGraph<NetworkVertex,NetworkEdge> mapGraph=nwGraph.getMapGraph();
    mapGraph=NetworkGraphBuilder.optimizeGraph(mapGraph);
    NetworkGraphBuilder.visualize(mapGraph,"String_Node_Str");
  }
 else {
    CompanyManagerI cm=gm.getCompanyManager();
    PublicCompanyI company=cm.getPublicCompany(companyName);
    List<String> addTrainList=new ArrayList<String>();
    boolean anotherTrain=true;
    RevenueAdapter ra=null;
    while (anotherTrain) {
      ra=RevenueAdapter.createRevenueAdapter(gm,company,gm.getCurrentPhase());
      for (      String addTrain : addTrainList) {
        ra.addTrainByString(addTrain);
      }
      ra.initRevenueCalculator(true);
      log.info("String_Node_Str" + ra);
      int revenueValue=ra.calculateRevenue();
      log.info("String_Node_Str" + revenueValue);
      log.info("String_Node_Str" + ra.getOptimalRunPrettyPrint(true));
      ra.drawOptimalRunAsPath(orUIManager.getMap());
      orUIManager.getMap().repaint();
      JOptionPane.showMessageDialog(orWindow,"String_Node_Str" + revenueValue + "String_Node_Str"+ ra.getOptimalRunPrettyPrint(true));
      ra=RevenueAdapter.createRevenueAdapter(gm,company,gm.getCurrentPhase());
      for (      String addTrain : addTrainList) {
        ra.addTrainByString(addTrain);
      }
      ra.initRevenueCalculator(false);
      log.info("String_Node_Str" + ra);
      revenueValue=ra.calculateRevenue();
      log.info("String_Node_Str" + revenueValue);
      log.info("String_Node_Str" + ra.getOptimalRunPrettyPrint(true));
      ra.drawOptimalRunAsPath(orUIManager.getMap());
      orUIManager.getMap().repaint();
      JOptionPane.showMessageDialog(orWindow,"String_Node_Str" + revenueValue + "String_Node_Str"+ ra.getOptimalRunPrettyPrint(true));
      String trainString=JOptionPane.showInputDialog(orWindow,"String_Node_Str","String_Node_Str",JOptionPane.QUESTION_MESSAGE);
      if (trainString == null || trainString.equals("String_Node_Str")) {
        anotherTrain=false;
      }
 else {
        addTrainList.add(trainString);
      }
    }
    revenueAdapter=ra;
  }
}

Fixed version (ground truth):
protected void executeNetworkInfo(String companyName){
  GameManagerI gm=orUIManager.getGameUIManager().getGameManager();
  if (companyName.equals("String_Node_Str")) {
    NetworkGraphBuilder nwGraph=NetworkGraphBuilder.create(gm);
    SimpleGraph<NetworkVertex,NetworkEdge> mapGraph=nwGraph.getMapGraph();
    mapGraph=NetworkGraphBuilder.optimizeGraph(mapGraph);
    NetworkGraphBuilder.visualize(mapGraph,"String_Node_Str");
  }
 else {
    CompanyManagerI cm=gm.getCompanyManager();
    PublicCompanyI company=cm.getPublicCompany(companyName);
    List<String> addTrainList=new ArrayList<String>();
    boolean anotherTrain=true;
    RevenueAdapter ra=null;
    while (anotherTrain) {
      ra=RevenueAdapter.createRevenueAdapter(gm,company,gm.getCurrentPhase());
      for (      String addTrain : addTrainList) {
        ra.addTrainByString(addTrain);
      }
      ra.initRevenueCalculator(true);
      log.debug("String_Node_Str" + ra);
      int revenueValue=ra.calculateRevenue();
      log.debug("String_Node_Str" + revenueValue);
      log.debug("String_Node_Str" + ra.getOptimalRunPrettyPrint(true));
      ra.drawOptimalRunAsPath(orUIManager.getMap());
      orUIManager.getMap().repaint();
      JOptionPane.showMessageDialog(orWindow,"String_Node_Str" + revenueValue + "String_Node_Str"+ ra.getOptimalRunPrettyPrint(true));
      String trainString=JOptionPane.showInputDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.QUESTION_MESSAGE);
      if (trainString == null || trainString.equals("String_Node_Str")) {
        anotherTrain=false;
      }
 else {
        addTrainList.add(trainString);
      }
    }
    revenueAdapter=ra;
  }
}