Program: 48431
Project: 48431
Buggy source:
@CliCommand(value="String_Node_Str",help="String_Node_Str") public void targetCluster(@CliOption(key={"String_Node_Str"},mandatory=false,help="String_Node_Str") final String name,@CliOption(key={"String_Node_Str"},mandatory=false,specifiedDefaultValue="String_Node_Str",unspecifiedDefaultValue="String_Node_Str",help="String_Node_Str") final boolean info){
  ClusterRead cluster=null;
  boolean noCluster=false;
  try {
    if (info) {
      if (name != null) {
        System.out.println("String_Node_Str");
        return;
      }
      String fsUrl=hadoopConfiguration.get("String_Node_Str");
      String jtUrl=hadoopConfiguration.get("String_Node_Str");
      if ((fsUrl == null || fsUrl.length() == 0) && (jtUrl == null || jtUrl.length() == 0)) {
        System.out.println("String_Node_Str");
        return;
      }
      if (targetClusterName != null && targetClusterName.length() > 0) {
        System.out.println("String_Node_Str" + targetClusterName);
      }
      if (fsUrl != null && fsUrl.length() > 0) {
        System.out.println("String_Node_Str" + fsUrl);
      }
      if (jtUrl != null && jtUrl.length() > 0) {
        System.out.println("String_Node_Str" + jtUrl);
      }
      if (hiveServerUrl != null && hiveServerUrl.length() > 0) {
        System.out.println("String_Node_Str" + hiveServerUrl);
      }
    }
 else {
      if (name == null) {
        ClusterRead[] clusters=restClient.getAll(false);
        if (clusters != null && clusters.length > 0) {
          cluster=clusters[0];
        }
 else {
          noCluster=true;
        }
      }
 else {
        cluster=restClient.get(name,false);
      }
      if (cluster == null) {
        if (noCluster) {
          System.out.println("String_Node_Str");
        }
 else {
          System.out.println("String_Node_Str" + name + "String_Node_Str");
        }
        setFsURL("String_Node_Str");
        setJobTrackerURL("String_Node_Str");
        this.setHiveServerUrl("String_Node_Str");
      }
 else {
        targetClusterName=cluster.getName();
        boolean hasHDFS=false;
        boolean hasHiveServer=false;
        for (        NodeGroupRead nodeGroup : cluster.getNodeGroups()) {
          for (          String role : nodeGroup.getRoles()) {
            if (role.equals("String_Node_Str")) {
              List<NodeRead> nodes=nodeGroup.getInstances();
              if (nodes != null && nodes.size() > 0) {
                String nameNodeIP=nodes.get(0).fetchMgtIp();
                setNameNode(nameNodeIP);
                hasHDFS=true;
              }
 else {
                throw new CliRestException("String_Node_Str");
              }
            }
            if (role.equals("String_Node_Str")) {
              List<NodeRead> nodes=nodeGroup.getInstances();
              if (nodes != null && nodes.size() > 0) {
                String jobTrackerIP=nodes.get(0).fetchMgtIp();
                setJobTracker(jobTrackerIP);
              }
 else {
                throw new CliRestException("String_Node_Str");
              }
            }
            if (role.equals("String_Node_Str")) {
              List<NodeRead> nodes=nodeGroup.getInstances();
              if (nodes != null && nodes.size() > 0) {
                String hiveServerIP=nodes.get(0).fetchMgtIp();
                setHiveServerAddress(hiveServerIP);
                hasHiveServer=true;
              }
 else {
                throw new CliRestException("String_Node_Str");
              }
            }
          }
        }
        if (cluster.getExternalHDFS() != null && !cluster.getExternalHDFS().isEmpty()) {
          setFsURL(cluster.getExternalHDFS());
          hasHDFS=true;
        }
        if (!hasHDFS) {
          setFsURL("String_Node_Str");
        }
        if (!hasHiveServer) {
          this.setHiveServerUrl("String_Node_Str");
        }
      }
    }
  }
 catch (  CliRestException e) {
    CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_CLUSTER,name,Constants.OUTPUT_OP_TARGET,Constants.OUTPUT_OP_RESULT_FAIL,e.getMessage());
    setFsURL("String_Node_Str");
    setJobTrackerURL("String_Node_Str");
    this.setHiveServerUrl("String_Node_Str");
  }
}

Fixed version (ground truth):
@CliCommand(value="String_Node_Str",help="String_Node_Str") public void targetCluster(@CliOption(key={"String_Node_Str"},mandatory=false,help="String_Node_Str") final String name,@CliOption(key={"String_Node_Str"},mandatory=false,specifiedDefaultValue="String_Node_Str",unspecifiedDefaultValue="String_Node_Str",help="String_Node_Str") final boolean info){
  ClusterRead cluster=null;
  boolean noCluster=false;
  try {
    if (info) {
      if (name != null) {
        System.out.println("String_Node_Str");
        return;
      }
      String fsUrl=hadoopConfiguration.get("String_Node_Str");
      String jtUrl=hadoopConfiguration.get("String_Node_Str");
      if ((fsUrl == null || fsUrl.length() == 0) && (jtUrl == null || jtUrl.length() == 0)) {
        System.out.println("String_Node_Str");
        return;
      }
      if (targetClusterName != null && targetClusterName.length() > 0) {
        System.out.println("String_Node_Str" + targetClusterName);
      }
      if (fsUrl != null && fsUrl.length() > 0) {
        System.out.println("String_Node_Str" + fsUrl);
      }
      if (jtUrl != null && jtUrl.length() > 0) {
        System.out.println("String_Node_Str" + jtUrl);
      }
      if (hiveServerUrl != null && hiveServerUrl.length() > 0) {
        System.out.println("String_Node_Str" + hiveServerUrl);
      }
    }
 else {
      if (name == null) {
        ClusterRead[] clusters=restClient.getAll(false);
        if (clusters != null && clusters.length > 0) {
          cluster=clusters[0];
        }
 else {
          noCluster=true;
        }
      }
 else {
        cluster=restClient.get(name,false);
      }
      if (cluster == null) {
        if (noCluster) {
          System.out.println("String_Node_Str");
        }
 else {
          System.out.println("String_Node_Str" + name + "String_Node_Str");
        }
        setFsURL("String_Node_Str");
        setJobTrackerURL("String_Node_Str");
        this.setHiveServerUrl("String_Node_Str");
      }
 else {
        targetClusterName=cluster.getName();
        boolean hasHDFS=false;
        boolean hasHiveServer=false;
        for (        NodeGroupRead nodeGroup : cluster.getNodeGroups()) {
          for (          String role : nodeGroup.getRoles()) {
            if ("String_Node_Str".equals(role)) {
              List<NodeRead> nodes=nodeGroup.getInstances();
              if (nodes != null && nodes.size() > 0) {
                String nameNodeIP=nodes.get(0).fetchMgtIp();
                setNameNode(nameNodeIP);
                hasHDFS=true;
              }
 else {
                throw new CliRestException("String_Node_Str");
              }
            }
            if ("String_Node_Str".equals(role)) {
              List<NodeRead> nodes=nodeGroup.getInstances();
              if (nodes != null && nodes.size() > 0) {
                String jobTrackerIP=nodes.get(0).fetchMgtIp();
                setJobTracker(jobTrackerIP);
              }
 else {
                throw new CliRestException("String_Node_Str");
              }
            }
            if ("String_Node_Str".equals(role)) {
              List<NodeRead> nodes=nodeGroup.getInstances();
              if (nodes != null && nodes.size() > 0) {
                String hiveServerIP=nodes.get(0).fetchMgtIp();
                setHiveServerAddress(hiveServerIP);
                hasHiveServer=true;
              }
 else {
                throw new CliRestException("String_Node_Str");
              }
            }
          }
        }
        if (cluster.getExternalHDFS() != null && !cluster.getExternalHDFS().isEmpty()) {
          setFsURL(cluster.getExternalHDFS());
          hasHDFS=true;
        }
        if (!hasHDFS) {
          setFsURL("String_Node_Str");
        }
        if (!hasHiveServer) {
          this.setHiveServerUrl("String_Node_Str");
        }
      }
    }
  }
 catch (  CliRestException e) {
    CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_CLUSTER,name,Constants.OUTPUT_OP_TARGET,Constants.OUTPUT_OP_RESULT_FAIL,e.getMessage());
    setFsURL("String_Node_Str");
    setJobTrackerURL("String_Node_Str");
    this.setHiveServerUrl("String_Node_Str");
  }
}