Program: 14284
Project: 14284
Buggy source:
public void getConsoleOutput(final GetConsoleOutputType request) throws EucalyptusCloudException {
  VmInstance v=null;
  try {
    v=VmInstances.lookup(request.getInstanceId());
  }
 catch (  final NoSuchElementException e2) {
    try {
      v=VmInstances.lookup(request.getInstanceId());
      final GetConsoleOutputResponseType reply=request.getReply();
      reply.setInstanceId(request.getInstanceId());
      reply.setTimestamp(new Date());
      reply.setOutput(v.getConsoleOutputString());
      Contexts.response(reply);
    }
 catch (    final NoSuchElementException ex) {
      throw new EucalyptusCloudException("String_Node_Str" + request.getInstanceId());
    }
  }
  if (!RestrictedTypes.filterPrivileged().apply(v)) {
    throw new EucalyptusCloudException("String_Node_Str" + request.getInstanceId());
  }
 else   if (!VmState.RUNNING.equals(v.getState())) {
    final GetConsoleOutputResponseType reply=request.getReply();
    reply.setInstanceId(request.getInstanceId());
    reply.setTimestamp(new Date());
    reply.setOutput(v.getConsoleOutputString());
    Contexts.response(reply);
  }
 else {
    Cluster cluster=null;
    try {
      ServiceConfiguration ccConfig=Topology.lookup(ClusterController.class,v.lookupPartition());
      cluster=Clusters.lookup(ccConfig);
    }
 catch (    final NoSuchElementException e1) {
      throw new EucalyptusCloudException("String_Node_Str" + v.getPartition() + "String_Node_Str"+ request.getInstanceId());
    }
    RequestContext.getEventContext().setStopFurtherProcessing(true);
    AsyncRequests.newRequest(new ConsoleOutputCallback(request)).dispatch(cluster.getConfiguration());
  }
}

Fixed version (ground truth):
public void getConsoleOutput(final GetConsoleOutputType request) throws EucalyptusCloudException {
  VmInstance v=null;
  try {
    v=VmInstances.lookup(request.getInstanceId());
  }
 catch (  final NoSuchElementException e2) {
    try {
      v=VmInstances.lookup(request.getInstanceId());
      final GetConsoleOutputResponseType reply=request.getReply();
      reply.setInstanceId(request.getInstanceId());
      reply.setTimestamp(new Date());
      reply.setOutput(v.getConsoleOutputString());
      Contexts.response(reply);
    }
 catch (    final NoSuchElementException ex) {
      throw new EucalyptusCloudException("String_Node_Str" + request.getInstanceId());
    }
  }
  if (!RestrictedTypes.filterPrivileged().apply(v)) {
    throw new EucalyptusCloudException("String_Node_Str" + request.getInstanceId());
  }
 else   if (!VmState.RUNNING.equals(v.getState())) {
    final GetConsoleOutputResponseType reply=request.getReply();
    reply.setInstanceId(request.getInstanceId());
    reply.setTimestamp(new Date());
    reply.setOutput(v.getConsoleOutputString());
    Contexts.response(reply);
  }
 else {
    Cluster cluster=null;
    try {
      ServiceConfiguration ccConfig=Topology.lookup(ClusterController.class,v.lookupPartition());
      cluster=Clusters.lookup(ccConfig);
    }
 catch (    final NoSuchElementException e1) {
      throw new EucalyptusCloudException("String_Node_Str" + v.getPartition() + "String_Node_Str"+ request.getInstanceId());
    }
    RequestContext.getEventContext().setStopFurtherProcessing(true);
    ConsoleOutputCallback messageCallback=new ConsoleOutputCallback(request);
    try {
      AsyncRequests.newRequest(messageCallback).sendSync(cluster.getConfiguration());
    }
 catch (    Exception e) {
      GetConsoleOutputResponseType reply=request.getReply();
      reply.setTimestamp(new Date());
      reply.setOutput("String_Node_Str");
      reply.set_return(false);
      reply.setStatusMessage("String_Node_Str");
      messageCallback.fire(reply);
    }
  }
}