Program: 15122
Project: 15122
Buggy source:
public StartInstancesResponseType startInstances(final StartInstancesType request) throws EucalyptusCloudException {
  Context ctx=Contexts.lookup();
  final StartInstancesResponseType reply=request.getReply();
  for (  String instanceId : request.getInstancesSet()) {
    VmInstance vm=null;
    try {
      vm=VmInstances.getInstance().lookup(instanceId);
    }
 catch (    NoSuchElementException ex) {
      try {
        vm=Transactions.find(VmInstance.named(ctx.getUserFullName(),instanceId));
      }
 catch (      ExecutionException ex1) {
        throw new EucalyptusCloudException("String_Node_Str" + instanceId);
      }
      final VmInstance v=vm;
      try {
        RunInstancesType runRequest=new RunInstancesType(){
{
            this.setMinCount(1);
            this.setMaxCount(1);
            this.setImageId(v.getImageId());
            this.setAvailabilityZone(v.getPartition());
            this.getGroupSet().addAll(v.getNetworkNames());
            this.setInstanceType(v.getVmType().getName());
          }
        }
;
        Allocation allocInfo=VerifyMetadata.handle(runRequest);
        allocInfo=AdmissionControl.handle(allocInfo);
        final int oldCode=v.getState().getCode(), newCode=VmState.SHUTTING_DOWN.getCode();
        final String oldState=v.getState().getName(), newState=VmState.SHUTTING_DOWN.getName();
        reply.getInstancesSet().add(new TerminateInstancesItemType(v.getInstanceId(),oldCode,oldState,newCode,newState));
      }
 catch (      MetadataException ex1) {
        LOG.error(ex1,ex1);
      }
    }
  }
  return reply;
}

Fixed version (ground truth):
public StartInstancesResponseType startInstances(final StartInstancesType request) throws EucalyptusCloudException {
  Context ctx=Contexts.lookup();
  final StartInstancesResponseType reply=request.getReply();
  for (  String instanceId : request.getInstancesSet()) {
    VmInstance vm=null;
    try {
      vm=VmInstances.getInstance().lookup(instanceId);
    }
 catch (    NoSuchElementException ex) {
      try {
        vm=Transactions.find(VmInstance.named(ctx.getUserFullName(),instanceId));
      }
 catch (      Throwable ex1) {
        throw new EucalyptusCloudException("String_Node_Str" + instanceId);
      }
      final VmInstance v=vm;
      try {
        RunInstancesType runRequest=new RunInstancesType(){
{
            this.setMinCount(1);
            this.setMaxCount(1);
            this.setImageId(v.getImageId());
            this.setAvailabilityZone(v.getPartition());
            this.getGroupSet().addAll(v.getNetworkNames());
            this.setInstanceType(v.getVmType().getName());
          }
        }
;
        Allocation allocInfo=VerifyMetadata.handle(runRequest);
        allocInfo=AdmissionControl.handle(allocInfo);
        final int oldCode=v.getState().getCode(), newCode=VmState.SHUTTING_DOWN.getCode();
        final String oldState=v.getState().getName(), newState=VmState.SHUTTING_DOWN.getName();
        reply.getInstancesSet().add(new TerminateInstancesItemType(v.getInstanceId(),oldCode,oldState,newCode,newState));
      }
 catch (      MetadataException ex1) {
        LOG.error(ex1,ex1);
      }
    }
  }
  return reply;
}