Program: 116658
Project: 116658
Buggy source:
public void listSubscribedCartridges(final boolean full) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClientService.doGet(httpClient,restClientService.getUrl() + listSubscribedCartridgesRestEndpoint,restClientService.getUsername(),restClientService.getPassword());
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    if (!responseCode.equals(CliConstants.RESPONSE_OK)) {
      System.out.println("String_Node_Str");
      return;
    }
    String resultString=getHttpResponseString(response);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    CartridgeList cartridgeList=gson.fromJson(resultString,CartridgeList.class);
    if (cartridgeList == null) {
      System.out.println("String_Node_Str");
      return;
    }
    CartridgeList applicationCartridgeList=new CartridgeList();
    List<Cartridge> allCartridges=cartridgeList.getCartridge();
    for (    Cartridge cartridge : allCartridges) {
      if (!cartridge.getProvider().equals("String_Node_Str")) {
        applicationCartridgeList.getCartridge().add(cartridge);
      }
    }
    Cartridge[] cartridges=new Cartridge[applicationCartridgeList.getCartridge().size()];
    cartridges=applicationCartridgeList.getCartridge().toArray(cartridges);
    if (cartridges.length == 0) {
      if (logger.isDebugEnabled()) {
        logger.debug("String_Node_Str");
      }
      System.out.println("String_Node_Str");
      return;
    }
    RowMapper<Cartridge> cartridgeMapper=new RowMapper<Cartridge>(){
      public String[] getData(      Cartridge cartridge){
        String[] data=full ? new String[11] : new String[9];
        data[0]=cartridge.getCartridgeType();
        data[1]=cartridge.getDisplayName();
        data[2]=cartridge.getVersion();
        data[3]=cartridge.isMultiTenant() ? "String_Node_Str" : "String_Node_Str";
        data[4]=cartridge.getCartridgeAlias();
        data[5]=cartridge.getStatus();
        data[6]=cartridge.isMultiTenant() ? "String_Node_Str" : String.valueOf(cartridge.getActiveInstances());
        data[7]=cartridge.getLbClusterId();
        data[8]=cartridge.getHostName();
        if (full) {
          data[9]=getAccessURLs(cartridge);
          data[10]=cartridge.getRepoURL() != null ? cartridge.getRepoURL() : "String_Node_Str";
        }
        return data;
      }
    }
;
    List<String> headers=new ArrayList<String>();
    headers.add("String_Node_Str");
    headers.add("String_Node_Str");
    headers.add("String_Node_Str");
    headers.add("String_Node_Str");
    headers.add("String_Node_Str");
    headers.add("String_Node_Str");
    headers.add("String_Node_Str");
    headers.add("String_Node_Str");
    headers.add("String_Node_Str");
    if (full) {
      headers.add("String_Node_Str");
      headers.add("String_Node_Str");
    }
    System.out.println("String_Node_Str");
    CommandLineUtils.printTable(cartridges,cartridgeMapper,headers.toArray(new String[headers.size()]));
    System.out.println();
  }
 catch (  Exception e) {
    handleException("String_Node_Str",e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
public void listSubscribedCartridges(final boolean full) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClientService.doGet(httpClient,restClientService.getUrl() + listSubscribedCartridgesRestEndpoint,restClientService.getUsername(),restClientService.getPassword());
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    if (!responseCode.equals(CliConstants.RESPONSE_OK)) {
      System.out.println("String_Node_Str");
      return;
    }
    String resultString=getHttpResponseString(response);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    CartridgeList cartridgeList=gson.fromJson(resultString,CartridgeList.class);
    if (cartridgeList == null) {
      System.out.println("String_Node_Str");
      return;
    }
    CartridgeList applicationCartridgeList=new CartridgeList();
    List<Cartridge> allCartridges=cartridgeList.getCartridge();
    for (    Cartridge cartridge : allCartridges) {
      if (!cartridge.isLoadBalancer()) {
        applicationCartridgeList.getCartridge().add(cartridge);
      }
    }
    Cartridge[] cartridges=new Cartridge[applicationCartridgeList.getCartridge().size()];
    cartridges=applicationCartridgeList.getCartridge().toArray(cartridges);
    if (cartridges.length == 0) {
      if (logger.isDebugEnabled()) {
        logger.debug("String_Node_Str");
      }
      System.out.println("String_Node_Str");
      return;
    }
    RowMapper<Cartridge> cartridgeMapper=new RowMapper<Cartridge>(){
      public String[] getData(      Cartridge cartridge){
        String[] data=full ? new String[10] : new String[8];
        data[0]=cartridge.getCartridgeType();
        data[1]=cartridge.getDisplayName();
        data[2]=cartridge.getVersion();
        data[3]=cartridge.isMultiTenant() ? "String_Node_Str" : "String_Node_Str";
        data[4]=cartridge.getCartridgeAlias();
        data[5]=cartridge.getStatus();
        data[6]=cartridge.isMultiTenant() ? "String_Node_Str" : String.valueOf(cartridge.getActiveInstances());
        data[7]=cartridge.getHostName();
        if (full) {
          data[8]=getAccessURLs(cartridge);
          data[9]=cartridge.getRepoURL() != null ? cartridge.getRepoURL() : "String_Node_Str";
        }
        return data;
      }
    }
;
    List<String> headers=new ArrayList<String>();
    headers.add("String_Node_Str");
    headers.add("String_Node_Str");
    headers.add("String_Node_Str");
    headers.add("String_Node_Str");
    headers.add("String_Node_Str");
    headers.add("String_Node_Str");
    headers.add("String_Node_Str");
    headers.add("String_Node_Str");
    if (full) {
      headers.add("String_Node_Str");
      headers.add("String_Node_Str");
    }
    System.out.println("String_Node_Str");
    CommandLineUtils.printTable(cartridges,cartridgeMapper,headers.toArray(new String[headers.size()]));
    System.out.println();
  }
 catch (  Exception e) {
    handleException("String_Node_Str",e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}