Program: 116682
Project: 116682
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;
    }
    Cartridge[] cartridges=new Cartridge[cartridgeList.getCartridge().size()];
    cartridges=cartridgeList.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[9] : new String[7];
        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());
        if (full) {
          data[7]=getAccessURLs(cartridge);
          data[8]=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");
    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.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[9] : new String[7];
        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());
        if (full) {
          data[7]=getAccessURLs(cartridge);
          data[8]=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");
    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();
  }
}