Program: 38043
Project: 38043
Buggy source:
/** 
 * Oversee the execution of spawned agents Once all agents are finished processing, signal end of simulation.
 */
public void body(){
  super.gridSimHold(10.0);
  for (int i=0; i < agents.size(); i++) {
    super.sim_schedule(GridSim.getEntityId(agents.get(i).getEntityName()),60,AleaSimTags.EVENT_WAKE);
  }
  while (agents_finished != agents_total) {
    Sim_event ev=new Sim_event();
    sim_get_next(ev);
    if (ev.get_tag() == AleaSimTags.AGENT_DONE) {
      Integer total_jobs=(Integer)ev.get_data();
      jobs_finished+=total_jobs;
      agents_finished++;
      System.out.println("String_Node_Str" + GridSim.getEntityName(ev.get_src()) + "String_Node_Str"+ total_jobs+ "String_Node_Str");
      agent_names.remove(GridSim.getEntityName(ev.get_src()));
      for (      String i : agent_names) {
        System.out.printf("String_Node_Str",i);
      }
      System.out.printf("String_Node_Str");
    }
 else     if (ev.get_tag() == AleaSimTags.AGENT_ONJOBSTART) {
    }
 else     if (ev.get_tag() == AleaSimTags.AGENT_ONJOBCOMPL) {
    }
 else     if (ev.get_tag() == AleaSimTags.AGENT_ONJOBFAIL) {
    }
  }
  super.sim_schedule(this.getEntityId("String_Node_Str"),super.clock(),AleaSimTags.SUBMISSION_DONE,new Integer(jobs_finished));
  while (true) {
    Sim_event ev_local=new Sim_event();
    sim_get_next(ev_local);
    if (ev_local.get_tag() == GridSimTags.END_OF_SIMULATION) {
      System.out.println("String_Node_Str" + data_set + "String_Node_Str"+ fail+ "String_Node_Str");
      shutdownUserEntity();
      break;
    }
  }
  super.terminateIOEntities();
}

Fixed version (ground truth):
/** 
 * Oversee the execution of spawned agents Once all agents are finished processing, signal end of simulation.
 */
public void body(){
  Calendar myCal=Calendar.getInstance();
  myCal.setTimeInMillis(ExperimentSetup.firstArrival * 1000L);
  if (!(myCal.get(Calendar.HOUR_OF_DAY) == 0 && myCal.get(Calendar.MINUTE) == 0 && myCal.get(Calendar.SECOND) == 0 && myCal.get(Calendar.MILLISECOND) == 0)) {
    throw new RuntimeException("String_Node_Str" + Integer.toString(myCal.get(Calendar.HOUR_OF_DAY)) + "String_Node_Str"+ Integer.toString(myCal.get(Calendar.MINUTE))+ "String_Node_Str"+ Integer.toString(myCal.get(Calendar.SECOND))+ "String_Node_Str"+ "String_Node_Str");
  }
  super.gridSimHold(10.0);
  for (int i=0; i < agents.size(); i++) {
    super.sim_schedule(GridSim.getEntityId(agents.get(i).getEntityName()),60,AleaSimTags.EVENT_WAKE);
  }
  while (agents_finished != agents_total) {
    Sim_event ev=new Sim_event();
    sim_get_next(ev);
    if (ev.get_tag() == AleaSimTags.AGENT_DONE) {
      Integer total_jobs=(Integer)ev.get_data();
      jobs_finished+=total_jobs;
      agents_finished++;
      System.out.println("String_Node_Str" + GridSim.getEntityName(ev.get_src()) + "String_Node_Str"+ total_jobs+ "String_Node_Str");
      agent_names.remove(GridSim.getEntityName(ev.get_src()));
      for (      String i : agent_names) {
        System.out.printf("String_Node_Str",i);
      }
      System.out.printf("String_Node_Str");
    }
 else     if (ev.get_tag() == AleaSimTags.AGENT_ONJOBSTART) {
    }
 else     if (ev.get_tag() == AleaSimTags.AGENT_ONJOBCOMPL) {
    }
 else     if (ev.get_tag() == AleaSimTags.AGENT_ONJOBFAIL) {
    }
  }
  System.out.println("String_Node_Str" + data_set + "String_Node_Str");
  super.sim_schedule(this.getEntityId("String_Node_Str"),0.0,AleaSimTags.SUBMISSION_DONE,new Integer(jobs_finished));
  while (true) {
    Sim_event ev_local=new Sim_event();
    sim_get_next(ev_local);
    if (ev_local.get_tag() == GridSimTags.END_OF_SIMULATION) {
      System.out.println("String_Node_Str" + data_set + "String_Node_Str"+ fail+ "String_Node_Str");
      shutdownUserEntity();
      break;
    }
  }
  super.terminateIOEntities();
}