Program: 28574
Project: 28574
Buggy source:
public void execute(AdminCommandContext context){
  report=context.getActionReport();
  logger=context.getLogger();
  SSHLauncher launcher;
  int dasPort;
  String dasHost;
  if (env.isDas()) {
    if (kill) {
      errorMessage=killInstance(context);
    }
 else {
      errorMessage=callInstance();
    }
  }
 else {
    errorMessage=Strings.get("String_Node_Str",env.getRuntimeType().toString());
  }
  if (errorMessage == null && !kill) {
    errorMessage=pollForDeath();
  }
  if (errorMessage != null) {
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    report.setMessage(errorMessage);
    return;
  }
  report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
  report.setMessage(Strings.get("String_Node_Str",instanceName));
  if (kill) {
    return;
  }
  String nodeName=instance.getNodeRef();
  Node node=nodes.getNode(nodeName);
  String nodeHost=node.getNodeHost();
  InstanceDirUtils insDU=new InstanceDirUtils(node,serverContext);
  dasPort=helper.getAdminPort(SystemPropertyConstants.DAS_SERVER_NAME);
  dasHost=System.getProperty(SystemPropertyConstants.HOST_NAME_PROPERTY);
  if (node.isLocal()) {
    try {
      pidFile=new File(insDU.getLocalInstanceDir(instance.getName()),"String_Node_Str");
    }
 catch (    java.io.IOException eio) {
      return;
    }
    if (pidFile.exists()) {
      errorMessage=pollForRealDeath("String_Node_Str");
    }
  }
 else   if (node.getType().equals("String_Node_Str")) {
    try {
      pidFile=new File(insDU.getLocalInstanceDir(instance.getName()),"String_Node_Str");
    }
 catch (    java.io.IOException eio) {
      return;
    }
    launcher=habitat.getService(SSHLauncher.class);
    launcher.init(node,logger);
    try {
      ftpClient=launcher.getSFTPClient();
      if (ftpClient.exists(pidFile.toString())) {
        errorMessage=pollForRealDeath("String_Node_Str");
      }
    }
 catch (    IOException ex) {
    }
 finally {
      if (ftpClient != null) {
        ftpClient.close();
      }
    }
  }
 else   if (node.getType().equals("String_Node_Str")) {
    DcomInfo info;
    try {
      info=new DcomInfo(node);
      String path=info.getRemoteNodeRootDirectory() + "String_Node_Str";
      wrf=new WindowsRemoteFile(info.getCredentials(),path);
      if (wrf.exists())       errorMessage=pollForRealDeath("String_Node_Str");
    }
 catch (    WindowsException ex) {
    }
  }
  if (errorMessage != null) {
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    report.setMessage(errorMessage);
  }
}

Fixed version (ground truth):
public void execute(AdminCommandContext context){
  report=context.getActionReport();
  logger=context.getLogger();
  SSHLauncher launcher;
  if (env.isDas()) {
    if (kill) {
      errorMessage=killInstance(context);
    }
 else {
      errorMessage=callInstance();
    }
  }
 else {
    errorMessage=Strings.get("String_Node_Str",env.getRuntimeType().toString());
  }
  if (errorMessage == null && !kill) {
    errorMessage=pollForDeath();
  }
  if (errorMessage != null) {
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    report.setMessage(errorMessage);
    return;
  }
  report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
  report.setMessage(Strings.get("String_Node_Str",instanceName));
  if (kill) {
    return;
  }
  String nodeName=instance.getNodeRef();
  Node node=nodes.getNode(nodeName);
  InstanceDirUtils insDU=new InstanceDirUtils(node,serverContext);
  if (node.isLocal()) {
    try {
      pidFile=new File(insDU.getLocalInstanceDir(instance.getName()),"String_Node_Str");
    }
 catch (    java.io.IOException eio) {
      return;
    }
    if (pidFile.exists()) {
      errorMessage=pollForRealDeath("String_Node_Str");
    }
  }
 else   if (node.getType().equals("String_Node_Str")) {
    try {
      pidFile=new File(insDU.getLocalInstanceDir(instance.getName()),"String_Node_Str");
    }
 catch (    java.io.IOException eio) {
      return;
    }
    launcher=habitat.getService(SSHLauncher.class);
    launcher.init(node,logger);
    try {
      ftpClient=launcher.getSFTPClient();
      if (ftpClient.exists(pidFile.toString())) {
        errorMessage=pollForRealDeath("String_Node_Str");
      }
    }
 catch (    IOException ex) {
    }
 finally {
      if (ftpClient != null) {
        ftpClient.close();
      }
    }
  }
 else   if (node.getType().equals("String_Node_Str")) {
    DcomInfo info;
    try {
      info=new DcomInfo(node);
      String path=info.getRemoteNodeRootDirectory() + "String_Node_Str";
      wrf=new WindowsRemoteFile(info.getCredentials(),path);
      if (wrf.exists())       errorMessage=pollForRealDeath("String_Node_Str");
    }
 catch (    WindowsException ex) {
    }
  }
  if (errorMessage != null) {
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    report.setMessage(errorMessage);
  }
}