Program: 48677
Project: 48677
Buggy source:
private void prettyOutputDetailNodegroups(TopologyType topology,LinkedHashMap<String,List<String>> ngColumnNamesWithGetMethodNames,List<NodeGroupRead> nodegroups) throws Exception {
  LinkedHashMap<String,List<String>> nColumnNamesWithGetMethodNames=new LinkedHashMap<String,List<String>>();
  nColumnNamesWithGetMethodNames.put(Constants.FORMAT_TABLE_COLUMN_NODE_NAME,Arrays.asList("String_Node_Str"));
  nColumnNamesWithGetMethodNames.put(Constants.FORMAT_TABLE_COLUMN_NODE_VERSION,Arrays.asList("String_Node_Str"));
  nColumnNamesWithGetMethodNames.put(Constants.FORMAT_TABLE_COLUMN_HOST,Arrays.asList("String_Node_Str"));
  if (topology == TopologyType.RACK_AS_RACK || topology == TopologyType.HVE) {
    nColumnNamesWithGetMethodNames.put(Constants.FORMAT_TABLE_COLUMN_RACK,Arrays.asList("String_Node_Str"));
  }
  nColumnNamesWithGetMethodNames.put(Constants.FORMAT_TABLE_COLUMN_IP,Arrays.asList("String_Node_Str"));
  nColumnNamesWithGetMethodNames.put(Constants.FORMAT_TABLE_COLUMN_HDFS_IP,Arrays.asList("String_Node_Str"));
  nColumnNamesWithGetMethodNames.put(Constants.FORMAT_TABLE_COLUMN_MAPRED_IP,Arrays.asList("String_Node_Str"));
  nColumnNamesWithGetMethodNames.put(Constants.FORMAT_TABLE_COLUMN_STATUS,Arrays.asList("String_Node_Str"));
  nColumnNamesWithGetMethodNames.put(Constants.FORMAT_TABLE_COLUMN_TASK,Arrays.asList("String_Node_Str"));
  for (  NodeGroupRead nodegroup : nodegroups) {
    CommandsUtils.printInTableFormat(ngColumnNamesWithGetMethodNames,new NodeGroupRead[]{nodegroup},Constants.OUTPUT_INDENT);
    List<NodeRead> nodes=nodegroup.getInstances();
    if (nodes != null) {
      LinkedHashMap<String,List<String>> nColumnNamesWithGetMethodNamesClone=(LinkedHashMap<String,List<String>>)nColumnNamesWithGetMethodNames.clone();
      if (!nodes.isEmpty() && (nodes.get(0).getIpConfigs() == null || (!nodes.get(0).getIpConfigs().containsKey(NetTrafficType.HDFS_NETWORK) && !nodes.get(0).getIpConfigs().containsKey(NetTrafficType.MAPRED_NETWORK)))) {
        nColumnNamesWithGetMethodNamesClone.remove(Constants.FORMAT_TABLE_COLUMN_HDFS_IP);
        nColumnNamesWithGetMethodNamesClone.remove(Constants.FORMAT_TABLE_COLUMN_MAPRED_IP);
      }
      System.out.println();
      CommandsUtils.printInTableFormat(nColumnNamesWithGetMethodNamesClone,nodes.toArray(),new StringBuilder().append(Constants.OUTPUT_INDENT).append(Constants.OUTPUT_INDENT).toString());
    }
    System.out.println();
  }
  prettyOutputErrorNode(nodegroups);
}

Fixed version (ground truth):
private void prettyOutputDetailNodegroups(TopologyType topology,LinkedHashMap<String,List<String>> ngColumnNamesWithGetMethodNames,List<NodeGroupRead> nodegroups) throws Exception {
  LinkedHashMap<String,List<String>> nColumnNamesWithGetMethodNames=new LinkedHashMap<String,List<String>>();
  nColumnNamesWithGetMethodNames.put(Constants.FORMAT_TABLE_COLUMN_NODE_NAME,Arrays.asList("String_Node_Str"));
  nColumnNamesWithGetMethodNames.put(Constants.FORMAT_TABLE_COLUMN_NODE_VERSION,Arrays.asList("String_Node_Str"));
  nColumnNamesWithGetMethodNames.put(Constants.FORMAT_TABLE_COLUMN_HOST,Arrays.asList("String_Node_Str"));
  if (topology == TopologyType.RACK_AS_RACK || topology == TopologyType.HVE) {
    nColumnNamesWithGetMethodNames.put(Constants.FORMAT_TABLE_COLUMN_RACK,Arrays.asList("String_Node_Str"));
  }
  nColumnNamesWithGetMethodNames.put(Constants.FORMAT_TABLE_COLUMN_IP,Arrays.asList("String_Node_Str"));
  nColumnNamesWithGetMethodNames.put(Constants.FORMAT_TABLE_COLUMN_HDFS_IP,Arrays.asList("String_Node_Str"));
  nColumnNamesWithGetMethodNames.put(Constants.FORMAT_TABLE_COLUMN_MAPRED_IP,Arrays.asList("String_Node_Str"));
  nColumnNamesWithGetMethodNames.put(Constants.FORMAT_TABLE_COLUMN_STATUS,Arrays.asList("String_Node_Str"));
  nColumnNamesWithGetMethodNames.put(Constants.FORMAT_TABLE_COLUMN_TASK,Arrays.asList("String_Node_Str"));
  for (  NodeGroupRead nodegroup : nodegroups) {
    CommandsUtils.printInTableFormat(ngColumnNamesWithGetMethodNames,new NodeGroupRead[]{nodegroup},Constants.OUTPUT_INDENT);
    List<NodeRead> nodes=nodegroup.getInstances();
    if (nodes != null) {
      LinkedHashMap<String,List<String>> nColumnNamesWithGetMethodNamesClone=(LinkedHashMap<String,List<String>>)nColumnNamesWithGetMethodNames.clone();
      if (!nodes.isEmpty() && (nodes.get(0).getIpConfigs() == null || (!nodes.get(0).getIpConfigs().containsKey(NetTrafficType.HDFS_NETWORK) && !nodes.get(0).getIpConfigs().containsKey(NetTrafficType.MAPRED_NETWORK)))) {
        nColumnNamesWithGetMethodNamesClone.remove(Constants.FORMAT_TABLE_COLUMN_HDFS_IP);
        nColumnNamesWithGetMethodNamesClone.remove(Constants.FORMAT_TABLE_COLUMN_MAPRED_IP);
      }
      System.out.println();
      CommandsUtils.printInTableFormat(nColumnNamesWithGetMethodNamesClone,nodes.toArray(),new StringBuilder().append(Constants.OUTPUT_INDENT).append(Constants.OUTPUT_INDENT).toString());
    }
    System.out.println();
  }
  CommandsUtils.prettyOutputErrorNode(nodegroups);
}