Program: 30269
Project: 30269
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);
  try {
    pidFile=new File(insDU.getLocalInstanceDir(instance.getName()),"String_Node_Str");
  }
 catch (  java.io.IOException eio) {
    return;
  }
  dasPort=helper.getAdminPort(SystemPropertyConstants.DAS_SERVER_NAME);
  dasHost=System.getProperty(SystemPropertyConstants.HOST_NAME_PROPERTY);
  if (node.isLocal()) {
    if (pidFile.exists()) {
      errorMessage=pollForRealDeath("String_Node_Str");
    }
  }
 else   if (node.getType().equals("String_Node_Str")) {
    launcher=habitat.getComponent(SSHLauncher.class);
    launcher.init(node,logger);
    try {
      ftpClient=launcher.getSFTPClient();
      if (ftpClient.exists(pidFile.toString())) {
        errorMessage=pollForRealDeath("String_Node_Str");
      }
    }
 catch (    IOException 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;
  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.getComponent(SSHLauncher.class);
    launcher.init(node,logger);
    try {
      ftpClient=launcher.getSFTPClient();
      if (ftpClient.exists(pidFile.toString())) {
        errorMessage=pollForRealDeath("String_Node_Str");
      }
    }
 catch (    IOException ex) {
    }
  }
 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);
  }
}