Program: 135651
Project: 135651
Buggy source:
public void run(){
  try {
    while (!cancelled) {
      long start=System.currentTimeMillis();
      ManagedEntity[] vms=null;
      ManagedEntity[] clusters=null;
      clusterMap=new HashMap<String,String>();
      for (int i=0; i < Integer.parseInt(appConfig.get("String_Node_Str")); i++) {
        String stats="String_Node_Str";
        this.vm_mob_queue.put(stats);
      }
      try {
        vms=new InventoryNavigator(this.si.getRootFolder()).searchManagedEntities("String_Node_Str");
        clusters=new InventoryNavigator(si.getRootFolder()).searchManagedEntities(new String[][]{new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"}},true);
      }
 catch (      RemoteException e) {
        e.getStackTrace();
        logger.info("String_Node_Str" + e);
        System.exit(200);
      }
      for (      ManagedEntity cluster : clusters) {
        String name=cluster.getName();
        ManagedObjectReference[] hosts=(ManagedObjectReference[])cluster.getPropertyByPath("String_Node_Str");
        if (hosts == null)         continue;
        for (        ManagedObjectReference host : hosts) {
          clusterMap.put(host.val,name.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str"));
        }
      }
      if (vms != null) {
        logger.info("String_Node_Str" + vms.length + "String_Node_Str");
        for (        ManagedEntity vm : vms) {
          if (vm != null) {
            String cluster="String_Node_Str";
            ManagedObjectReference host=(ManagedObjectReference)vm.getPropertyByPath("String_Node_Str");
            if (clusterMap.containsKey(host.val)) {
              cluster=clusterMap.get(host.val);
            }
            this.vm_mob_queue.put(new Object[]{vm,cluster});
          }
        }
      }
 else {
        logger.info("String_Node_Str");
      }
      long vm_stop=System.currentTimeMillis();
      long vm_loop_took=vm_stop - start;
      logger.debug("String_Node_Str" + vm_loop_took + "String_Node_Str");
      for (int i=0; i < Integer.parseInt(appConfig.get("String_Node_Str")); i++) {
        String stats="String_Node_Str";
        this.vm_mob_queue.put(stats);
      }
      long esx_loop_took=0;
      String graphEsx=this.appConfig.get("String_Node_Str");
      if (graphEsx.contains("String_Node_Str")) {
        for (int i=0; i < Integer.parseInt(appConfig.get("String_Node_Str")); i++) {
          String stats="String_Node_Str";
          this.esx_mob_queue.put(stats);
        }
        ManagedEntity[] esx=null;
        try {
          esx=new InventoryNavigator(this.si.getRootFolder()).searchManagedEntities("String_Node_Str");
        }
 catch (        RemoteException e) {
          e.getStackTrace();
          logger.info("String_Node_Str" + e);
          System.exit(201);
        }
        logger.info("String_Node_Str" + esx.length + "String_Node_Str");
        if (esx != null) {
          for (          ManagedEntity anEsx : esx) {
            if (anEsx != null) {
              String cluster="String_Node_Str";
              String id=anEsx.getMOR().val;
              if (clusterMap.containsKey(id)) {
                cluster=clusterMap.get(id);
              }
              this.esx_mob_queue.put(new Object[]{anEsx,cluster});
            }
          }
        }
        long esx_stop=System.currentTimeMillis();
        esx_loop_took=esx_stop - start;
        logger.debug("String_Node_Str" + esx_loop_took + "String_Node_Str");
        for (int i=0; i < Integer.parseInt(appConfig.get("String_Node_Str")); i++) {
          String stats="String_Node_Str";
          this.esx_mob_queue.put(stats);
        }
      }
      long loop_took=vm_loop_took + esx_loop_took;
      int user_sleep_time=Integer.parseInt(appConfig.get("String_Node_Str")) * 1000;
      long sleep_time=user_sleep_time - loop_took;
      logger.debug("String_Node_Str" + sleep_time + "String_Node_Str");
      Thread.sleep(sleep_time);
      String dump="String_Node_Str";
      sender.put(dump);
      if (appConfig.get("String_Node_Str").contains("String_Node_Str")) {
        logger.info("String_Node_Str");
        System.exit(0);
      }
    }
  }
 catch (  InterruptedException e) {
    Thread.currentThread().interrupt();
    logger.info("String_Node_Str" + Thread.currentThread().getName() + "String_Node_Str"+ e.getMessage());
    System.exit(202);
  }
catch (  Exception e) {
    System.out.println(Arrays.toString(e.getStackTrace()));
    logger.info("String_Node_Str" + Thread.currentThread().getName() + "String_Node_Str"+ e.getMessage());
    System.exit(203);
  }
}

Fixed version (ground truth):
public void run(){
  try {
    while (!cancelled) {
      long start=System.currentTimeMillis();
      ManagedEntity[] vms=null;
      ManagedEntity[] clusters=null;
      clusterMap=new HashMap<String,String>();
      for (int i=0; i < Integer.parseInt(appConfig.get("String_Node_Str")); i++) {
        String stats="String_Node_Str";
        this.vm_mob_queue.put(stats);
      }
      try {
        vms=new InventoryNavigator(this.si.getRootFolder()).searchManagedEntities("String_Node_Str");
        clusters=new InventoryNavigator(si.getRootFolder()).searchManagedEntities(new String[][]{new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"}},true);
      }
 catch (      RemoteException e) {
        e.getStackTrace();
        logger.info("String_Node_Str" + e);
        System.exit(200);
      }
      for (      ManagedEntity cluster : clusters) {
        String name=cluster.getName();
        ManagedObjectReference[] hosts=(ManagedObjectReference[])cluster.getPropertyByPath("String_Node_Str");
        if (hosts == null)         continue;
        for (        ManagedObjectReference host : hosts) {
          clusterMap.put(host.val,name.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str"));
        }
      }
      if (vms != null) {
        logger.info("String_Node_Str" + vms.length + "String_Node_Str");
        for (        ManagedEntity vm : vms) {
          if (vm != null) {
            String cluster="String_Node_Str";
            ManagedObjectReference host=(ManagedObjectReference)vm.getPropertyByPath("String_Node_Str");
            if (clusterMap.containsKey(host.val)) {
              cluster=clusterMap.get(host.val);
            }
            this.vm_mob_queue.put(new Object[]{vm,cluster});
          }
        }
      }
 else {
        logger.info("String_Node_Str");
      }
      long vm_stop=System.currentTimeMillis();
      long vm_loop_took=vm_stop - start;
      logger.debug("String_Node_Str" + vm_loop_took + "String_Node_Str");
      for (int i=0; i < Integer.parseInt(appConfig.get("String_Node_Str")); i++) {
        String stats="String_Node_Str";
        this.vm_mob_queue.put(stats);
      }
      long esx_start=System.currentTimeMillis();
      long esx_loop_took=0;
      String graphEsx=this.appConfig.get("String_Node_Str");
      if (graphEsx.contains("String_Node_Str")) {
        for (int i=0; i < Integer.parseInt(appConfig.get("String_Node_Str")); i++) {
          String stats="String_Node_Str";
          this.esx_mob_queue.put(stats);
        }
        ManagedEntity[] esx=null;
        try {
          esx=new InventoryNavigator(this.si.getRootFolder()).searchManagedEntities("String_Node_Str");
        }
 catch (        RemoteException e) {
          e.getStackTrace();
          logger.info("String_Node_Str" + e);
          System.exit(201);
        }
        logger.info("String_Node_Str" + esx.length + "String_Node_Str");
        if (esx != null) {
          for (          ManagedEntity anEsx : esx) {
            if (anEsx != null) {
              String cluster="String_Node_Str";
              String id=anEsx.getMOR().val;
              if (clusterMap.containsKey(id)) {
                cluster=clusterMap.get(id);
              }
              this.esx_mob_queue.put(new Object[]{anEsx,cluster});
            }
          }
        }
        esx_loop_took=System.currentTimeMillis() - esx_start;
        logger.debug("String_Node_Str" + esx_loop_took + "String_Node_Str");
        for (int i=0; i < Integer.parseInt(appConfig.get("String_Node_Str")); i++) {
          String stats="String_Node_Str";
          this.esx_mob_queue.put(stats);
        }
      }
      long loop_took=vm_loop_took + esx_loop_took;
      int user_sleep_time=Integer.parseInt(appConfig.get("String_Node_Str")) * 1000;
      long sleep_time=user_sleep_time - loop_took;
      logger.debug("String_Node_Str" + sleep_time + "String_Node_Str");
      Thread.sleep(sleep_time);
      String dump="String_Node_Str";
      sender.put(dump);
      if (appConfig.get("String_Node_Str").contains("String_Node_Str")) {
        logger.info("String_Node_Str");
        System.exit(0);
      }
    }
  }
 catch (  InterruptedException e) {
    Thread.currentThread().interrupt();
    logger.info("String_Node_Str" + Thread.currentThread().getName() + "String_Node_Str"+ e.getMessage());
    System.exit(202);
  }
catch (  Exception e) {
    System.out.println(Arrays.toString(e.getStackTrace()));
    logger.info("String_Node_Str" + Thread.currentThread().getName() + "String_Node_Str"+ e.getMessage());
    System.exit(203);
  }
}