Program: 30386
Project: 30386
Buggy source:
@Override public ListenableFuture<AllocationPhase,VirtualMachine> allocate(final TemplateInstance template,final VirtualCluster cluster) throws VirtException {
  int park=size();
  if (park == 0) {
    throw new VirtException("String_Node_Str");
  }
  final List<ListenableFuture<AllocationPhase,VirtualMachine>> vms=new ArrayList<ListenableFuture<AllocationPhase,VirtualMachine>>();
  Iterator<? extends Machine> machines=machines().iterator();
  Machine machine;
  int machineTried=0;
  do {
    if (!machines.hasNext()) {
      machines=machines().iterator();
    }
    machine=machines.next();
    machineTried++;
    if (!machine.isUp()) {
      RuntimeContext.logger.info("String_Node_Str" + machine.getName());
      try {
        Habitat habitat=Dom.unwrap(config).getHabitat();
        habitat.getComponent(OsInterface.class).resume(machine);
      }
 catch (      IOException e) {
        RuntimeContext.logger.log(Level.SEVERE,"String_Node_Str" + machine.getName(),e);
      }
      int tries=0;
      do {
        try {
          Thread.sleep(1000);
        }
 catch (        InterruptedException e) {
        }
        tries++;
      }
 while (!machine.isUp() && tries < 5);
      if (!machine.isUp()) {
        RuntimeContext.logger.log(Level.SEVERE,"String_Node_Str" + machine.getConfig().getDisksLocation());
      }
    }
  }
 while (!machine.isUp() || machineTried > park);
  if (!machine.isUp()) {
    RuntimeContext.logger.log(Level.SEVERE,"String_Node_Str");
    throw new VirtException("String_Node_Str");
  }
  final Machine targetMachine=machine;
  allocationCount.incrementAndGet();
  final String suffix=allocationCount.toString();
  ListenableFuture<AllocationPhase,VirtualMachine> vm=null;
  try {
    vm=targetMachine.create(template,cluster);
  }
 catch (  IOException e) {
    throw new VirtException(e);
  }
  RuntimeContext.logger.info("String_Node_Str" + getName() + "String_Node_Str"+ cluster.getConfig().getName());
  return vm;
}

Fixed version (ground truth):
@Override public ListenableFuture<AllocationPhase,VirtualMachine> allocate(final TemplateInstance template,final VirtualCluster cluster) throws VirtException {
  int park=size();
  if (park == 0) {
    throw new VirtException("String_Node_Str");
  }
  Iterator<? extends Machine> machines=machines().iterator();
  Machine machine;
  int machineTried=0;
  do {
    if (!machines.hasNext()) {
      machines=machines().iterator();
    }
    machine=machines.next();
    machineTried++;
    if (!machine.isUp()) {
      RuntimeContext.logger.info("String_Node_Str" + machine.getName());
      try {
        Habitat habitat=Dom.unwrap(config).getHabitat();
        habitat.getComponent(OsInterface.class).resume(machine);
      }
 catch (      IOException e) {
        RuntimeContext.logger.log(Level.SEVERE,"String_Node_Str" + machine.getName(),e);
      }
      int tries=0;
      do {
        try {
          Thread.sleep(1000);
        }
 catch (        InterruptedException e) {
        }
        tries++;
      }
 while (!machine.isUp() && tries < 5);
      if (!machine.isUp()) {
        RuntimeContext.logger.log(Level.SEVERE,"String_Node_Str" + machine.getConfig().getDisksLocation());
      }
    }
  }
 while (!machine.isUp() || machineTried > park);
  if (!machine.isUp()) {
    RuntimeContext.logger.log(Level.SEVERE,"String_Node_Str");
    throw new VirtException("String_Node_Str");
  }
  final Machine targetMachine=machine;
  allocationCount.incrementAndGet();
  final String suffix=allocationCount.toString();
  ListenableFuture<AllocationPhase,VirtualMachine> vm=null;
  try {
    vm=targetMachine.create(template,cluster);
  }
 catch (  IOException e) {
    throw new VirtException(e);
  }
  RuntimeContext.logger.info("String_Node_Str" + getName() + "String_Node_Str"+ cluster.getConfig().getName());
  return vm;
}