Program: 49158
Project: 49158
Buggy source:
@CliCommand(value="String_Node_Str",help="String_Node_Str") public void stopCluster(@CliOption(key={"String_Node_Str"},mandatory=true,help="String_Node_Str") final String clusterName,@CliOption(key={"String_Node_Str"},mandatory=false,help="String_Node_Str") final String nodeGroupName,@CliOption(key={"String_Node_Str"},mandatory=false,help="String_Node_Str") final String nodeName){
  Map<String,String> queryStrings=new HashMap<String,String>();
  queryStrings.put(Constants.QUERY_ACTION_KEY,Constants.QUERY_ACTION_STOP);
  try {
    if (!validateNodeGroupName(nodeGroupName)) {
      CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_NODES_IN_CLUSTER,clusterName,Constants.OUTPUT_OP_STOP,Constants.OUTPUT_OP_RESULT_FAIL,"String_Node_Str");
      return;
    }
    if (!validateNodeName(clusterName,nodeGroupName,nodeName)) {
      CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_NODES_IN_CLUSTER,clusterName,Constants.OUTPUT_OP_STOP,Constants.OUTPUT_OP_RESULT_FAIL,"String_Node_Str");
      return;
    }
    String groupName=nodeGroupName;
    String fullNodeName=nodeName;
    if (nodeName != null) {
      if (nodeGroupName == null) {
        groupName=extractNodeGroupName(nodeName);
        if (groupName == null) {
          CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_NODES_IN_CLUSTER,clusterName,Constants.OUTPUT_OP_STOP,Constants.OUTPUT_OP_RESULT_FAIL,"String_Node_Str");
          return;
        }
      }
 else {
        fullNodeName=autoCompleteNodeName(clusterName,nodeGroupName,nodeName);
      }
    }
    String resource=getClusterResourceName(clusterName,nodeGroupName,fullNodeName);
    if (resource != null) {
      restClient.actionOps(resource,clusterName,queryStrings);
      CommandsUtils.printCmdSuccess(Constants.OUTPUT_OBJECT_NODES_IN_CLUSTER,clusterName,Constants.OUTPUT_OP_RESULT_STOP);
    }
  }
 catch (  CliRestException e) {
    CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_NODES_IN_CLUSTER,clusterName,Constants.OUTPUT_OP_STOP,Constants.OUTPUT_OP_RESULT_FAIL,e.getMessage());
  }
}

Fixed version (ground truth):
@CliCommand(value="String_Node_Str",help="String_Node_Str") public void stopCluster(@CliOption(key={"String_Node_Str"},mandatory=true,help="String_Node_Str") final String clusterName,@CliOption(key={"String_Node_Str"},mandatory=false,help="String_Node_Str") final String nodeGroupName,@CliOption(key={"String_Node_Str"},mandatory=false,help="String_Node_Str") final String nodeName){
  Map<String,String> queryStrings=new HashMap<String,String>();
  queryStrings.put(Constants.QUERY_ACTION_KEY,Constants.QUERY_ACTION_STOP);
  try {
    if (!validateNodeGroupName(nodeGroupName)) {
      CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_NODES_IN_CLUSTER,clusterName,Constants.OUTPUT_OP_STOP,Constants.OUTPUT_OP_RESULT_FAIL,"String_Node_Str");
      return;
    }
    if (!validateNodeName(clusterName,nodeGroupName,nodeName)) {
      CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_NODES_IN_CLUSTER,clusterName,Constants.OUTPUT_OP_STOP,Constants.OUTPUT_OP_RESULT_FAIL,"String_Node_Str");
      return;
    }
    String groupName=nodeGroupName;
    String fullNodeName=nodeName;
    if (nodeName != null) {
      if (nodeGroupName == null) {
        groupName=extractNodeGroupName(nodeName);
        if (groupName == null) {
          CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_NODES_IN_CLUSTER,clusterName,Constants.OUTPUT_OP_STOP,Constants.OUTPUT_OP_RESULT_FAIL,"String_Node_Str");
          return;
        }
      }
 else {
        fullNodeName=autoCompleteNodeName(clusterName,nodeGroupName,nodeName);
      }
    }
    String resource=getClusterResourceName(clusterName,groupName,fullNodeName);
    if (resource != null) {
      restClient.actionOps(resource,clusterName,queryStrings);
      CommandsUtils.printCmdSuccess(Constants.OUTPUT_OBJECT_NODES_IN_CLUSTER,clusterName,Constants.OUTPUT_OP_RESULT_STOP);
    }
  }
 catch (  CliRestException e) {
    CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_NODES_IN_CLUSTER,clusterName,Constants.OUTPUT_OP_STOP,Constants.OUTPUT_OP_RESULT_FAIL,e.getMessage());
  }
}