nus-yam/ex-repair huggingface dataset:
Program: 115839
Project: 115839
Buggy source:
public static String readResource(String fileName) throws IOException {
  BufferedReader br=new BufferedReader(new FileReader(fileName));
  try {
    StringBuilder sb=new StringBuilder();
    String line=br.readLine();
    while (line != null) {
      sb.append(line);
      sb.append(System.lineSeparator());
      line=br.readLine();
    }
    return sb.toString();
  }
  finally {
    br.close();
  }
}

Fixed version (ground truth):
public static String readResource(String fileName) throws IOException {
  BufferedReader br=new BufferedReader(new FileReader(fileName));
  try {
    StringBuilder sb=new StringBuilder();
    String line=br.readLine();
    while (line != null) {
      sb.append(line);
      sb.append(LINE_SEPARATOR);
      line=br.readLine();
    }
    return sb.toString();
  }
  finally {
    br.close();
  }
}
Program: 115840
Project: 115840
Buggy source:
public ListKubernetesHostsCommand(){
}

Fixed version (ground truth):
public ListKubernetesHostsCommand(){
  options=constructOptions();
}
Program: 115841
Project: 115841
Buggy source:
public String getArgumentSyntax(){
  return "String_Node_Str";
}

Fixed version (ground truth):
public String getArgumentSyntax(){
  return null;
}
Program: 115842
Project: 115842
Buggy source:
public Options getOptions(){
  return null;
}

Fixed version (ground truth):
public Options getOptions(){
  return options;
}
Program: 115843
Project: 115843
Buggy source:
public int execute(StratosCommandContext context,String[] args,Option[] already_parsed_opts) throws CommandException {
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str",getName());
  }
  if ((args == null) || (args.length == 0)) {
    context.getStratosApplication().printUsage(getName());
    return CliConstants.COMMAND_FAILED;
  }
 else {
    String clusterId=args[0];
    RestCommandLineService.getInstance().listKubernetesHosts(clusterId);
    return CliConstants.COMMAND_SUCCESSFULL;
  }
}

Fixed version (ground truth):
public int execute(StratosCommandContext context,String[] args,Option[] already_parsed_opts) throws CommandException {
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str",getName());
  }
  if (args != null && args.length > 0) {
    String clusterId=null;
    final CommandLineParser parser=new GnuParser();
    CommandLine commandLine;
    try {
      commandLine=parser.parse(options,args);
      Options opts=mergeOptionArrays(already_parsed_opts,commandLine.getOptions());
      if (logger.isDebugEnabled()) {
        logger.debug("String_Node_Str");
      }
      if (opts.hasOption(CliConstants.CLUSTER_ID_OPTION)) {
        if (logger.isTraceEnabled()) {
          logger.trace("String_Node_Str");
        }
        clusterId=opts.getOption(CliConstants.CLUSTER_ID_OPTION).getValue();
      }
      if (clusterId == null) {
        System.out.println("String_Node_Str" + getName() + "String_Node_Str"+ getName()+ "String_Node_Str");
        return CliConstants.COMMAND_FAILED;
      }
      RestCommandLineService.getInstance().listKubernetesHosts(clusterId);
      return CliConstants.COMMAND_SUCCESSFULL;
    }
 catch (    ParseException e) {
      if (logger.isErrorEnabled()) {
        logger.error("String_Node_Str",e);
      }
      System.out.println(e.getMessage());
      return CliConstants.COMMAND_FAILED;
    }
  }
 else {
    context.getStratosApplication().printUsage(getName());
    return CliConstants.COMMAND_FAILED;
  }
}
Program: 115846
Project: 115846
Buggy source:
@Override public void deleteApplication(String applicationId){
  if (AutoscalerContext.getInstance().removeApplicationContext(applicationId) == null) {
    String msg=String.format("String_Node_Str",applicationId);
    throw new RuntimeException(msg);
  }
  log.info(String.format("String_Node_Str",applicationId));
}

Fixed version (ground truth):
@Override public void deleteApplication(String applicationId){
  ApplicationContext appContext=AutoscalerContext.getInstance().getApplicationContext(applicationId);
  if (appContext == null) {
    String msg=String.format("String_Node_Str",applicationId);
    throw new RuntimeException(msg);
  }
  if (ApplicationContext.STATUS_DEPLOYED.equals(appContext.getStatus())) {
    String msg=String.format("String_Node_Str",applicationId);
    throw new AutoScalerException(msg);
  }
  AutoscalerContext.getInstance().removeApplicationContext(applicationId);
  if (RegistryManager.getInstance().getApplication(applicationId) == null) {
    String msg=String.format("String_Node_Str",applicationId);
    throw new RuntimeException(msg);
  }
  ApplicationBuilder.handleApplicationRemoval(applicationId);
  RegistryManager.getInstance().removeApplication(applicationId);
  log.info(String.format("String_Node_Str",applicationId));
}
Program: 115847
Project: 115847
Buggy source:
/** 
 * Delete an application.
 * @param applicationId the application id
 * @return the response
 * @throws RestAPIException the rest api exception
 */
@DELETE @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes("String_Node_Str") @AuthorizationAction("String_Node_Str") @SuperTenantService(true) public Response removeApplication(@PathParam("String_Node_Str") String applicationId) throws RestAPIException {
  ApplicationBean applicationDefinition=StratosApiV41Utils.getApplication(applicationId);
  if (applicationDefinition == null) {
    return Response.status(Response.Status.NOT_FOUND).build();
  }
  if (StratosApiV41Utils.getApplicationRuntime(applicationId) != null) {
    return Response.status(Response.Status.NOT_ACCEPTABLE).build();
  }
  StratosApiV41Utils.removeApplication(applicationId);
  return Response.ok().entity(new SuccessResponseBean(Response.Status.OK.getStatusCode(),String.format("String_Node_Str",applicationId))).build();
}

Fixed version (ground truth):
/** 
 * Delete an application.
 * @param applicationId the application id
 * @return the response
 * @throws RestAPIException the rest api exception
 */
@DELETE @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes("String_Node_Str") @AuthorizationAction("String_Node_Str") @SuperTenantService(true) public Response removeApplication(@PathParam("String_Node_Str") String applicationId) throws RestAPIException {
  ApplicationBean applicationDefinition=StratosApiV41Utils.getApplication(applicationId);
  if (applicationDefinition == null) {
    return Response.status(Response.Status.NOT_FOUND).build();
  }
  StratosApiV41Utils.removeApplication(applicationId);
  return Response.ok().entity(new SuccessResponseBean(Response.Status.OK.getStatusCode(),String.format("String_Node_Str",applicationId))).build();
}
Program: 115849
Project: 115849
Buggy source:
/** 
 * List cartridge groups
 * @throws CommandException
 */
public void listCartridgeGroups() throws CommandException {
  try {
    Type listType=new TypeToken<ArrayList<GroupBean>>(){
    }
.getType();
    List<GroupBean> cartridgeGroupList=(List<GroupBean>)restClient.listEntity(ENDPOINT_LIST_CARTRIDGE_GROUPS,listType,"String_Node_Str");
    if ((cartridgeGroupList == null) || (cartridgeGroupList.size() == 0)) {
      System.out.println("String_Node_Str");
      return;
    }
    RowMapper<GroupBean> cartridgeGroupMapper=new RowMapper<GroupBean>(){
      public String[] getData(      GroupBean cartridgeGroup){
        String[] data=new String[4];
        data[0]=cartridgeGroup.getName();
        data[1]=String.valueOf(cartridgeGroup.getCartridges().size());
        data[2]=String.valueOf(cartridgeGroup.getGroups().size());
        data[3]=String.valueOf(cartridgeGroup.isGroupScalingEnabled());
        return data;
      }
    }
;
    GroupBean[] cartridgeGroups=new GroupBean[cartridgeGroupList.size()];
    cartridgeGroups=cartridgeGroupList.toArray(cartridgeGroups);
    System.out.println("String_Node_Str");
    CliUtils.printTable(cartridgeGroups,cartridgeGroupMapper,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    printError(message,e);
  }
}

Fixed version (ground truth):
/** 
 * List cartridge groups
 * @throws CommandException
 */
public void listCartridgeGroups() throws CommandException {
  try {
    Type listType=new TypeToken<ArrayList<GroupBean>>(){
    }
.getType();
    List<GroupBean> cartridgeGroupList=(List<GroupBean>)restClient.listEntity(ENDPOINT_LIST_CARTRIDGE_GROUPS,listType,"String_Node_Str");
    if ((cartridgeGroupList == null) || (cartridgeGroupList.size() == 0)) {
      System.out.println("String_Node_Str");
      return;
    }
    RowMapper<GroupBean> cartridgeGroupMapper=new RowMapper<GroupBean>(){
      public String[] getData(      GroupBean cartridgeGroup){
        String[] data=new String[4];
        data[0]=cartridgeGroup.getName();
        data[1]=cartridgeGroup.getCartridges() == null ? "String_Node_Str" : String.valueOf(cartridgeGroup.getCartridges().size());
        data[2]=cartridgeGroup.getGroups() == null ? "String_Node_Str" : String.valueOf(cartridgeGroup.getGroups().size());
        data[3]=String.valueOf(cartridgeGroup.isGroupScalingEnabled());
        return data;
      }
    }
;
    GroupBean[] cartridgeGroups=new GroupBean[cartridgeGroupList.size()];
    cartridgeGroups=cartridgeGroupList.toArray(cartridgeGroups);
    System.out.println("String_Node_Str");
    CliUtils.printTable(cartridgeGroups,cartridgeGroupMapper,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    printError(message,e);
  }
}
Program: 115850
Project: 115850
Buggy source:
/** 
 * Executing the commands. Returns a code
 * @param context The context assoicated with the Command Line Application
 * @param args The arguments for the command
 * @return The status code
 * @throws org.apache.stratos.cli.exception.CommandException if any errors occur when executing the command
 */
int execute(T context,String[] args) throws CommandException ;

Fixed version (ground truth):
/** 
 * Executing the commands. Returns a code
 * @param context The context assoicated with the Command Line Application
 * @param args The arguments for the command
 * @param already_parsed_opts Options parsed by any parent parsers.
 * @return The status code
 * @throws org.apache.stratos.cli.exception.CommandException if any errors occur when executing the command
 */
int execute(T context,String[] args,Option[] already_parsed_opts) throws CommandException ;
Program: 115852
Project: 115852
Buggy source:
@Override protected int executeCommand(String line){
  String[] tokens=new StrTokenizer(line).getTokenArray();
  String action=tokens[0];
  String[] actionArgs=Arrays.copyOfRange(tokens,1,tokens.length);
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str",action,tokens.length);
  }
  Command<StratosCommandContext> command=commands.get(action);
  if (command == null) {
    System.out.println(action + "String_Node_Str");
    return CliConstants.COMMAND_FAILED;
  }
  try {
    return command.execute(context,actionArgs);
  }
 catch (  CommandException e) {
    if (logger.isErrorEnabled()) {
      logger.error("String_Node_Str" + action,e);
    }
    return CliConstants.ERROR_CODE;
  }
}

Fixed version (ground truth):
@Override protected int executeCommand(String line){
  String[] tokens=new StrTokenizer(line).getTokenArray();
  String action=tokens[0];
  String[] actionArgs=Arrays.copyOfRange(tokens,1,tokens.length);
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str",action,tokens.length);
  }
  Command<StratosCommandContext> command=commands.get(action);
  if (command == null) {
    System.out.println(action + "String_Node_Str");
    return CliConstants.COMMAND_FAILED;
  }
  try {
    return command.execute(context,actionArgs,new Option[0]);
  }
 catch (  CommandException e) {
    if (logger.isErrorEnabled()) {
      logger.error("String_Node_Str" + action,e);
    }
    return CliConstants.ERROR_CODE;
  }
}
Program: 115853
Project: 115853
Buggy source:
@Override public int execute(StratosCommandContext context,String[] args) throws CommandException {
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str",getName());
  }
  if (args != null && args.length == 1) {
    String id=args[0];
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str",id);
    }
    RestCommandLineService.getInstance().activateTenant(id);
    return CliConstants.COMMAND_SUCCESSFULL;
  }
 else {
    context.getStratosApplication().printUsage(getName());
    return CliConstants.COMMAND_FAILED;
  }
}

Fixed version (ground truth):
@Override public int execute(StratosCommandContext context,String[] args,Option[] already_parsed_opts) throws CommandException {
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str",getName());
  }
  if (args != null && args.length == 1) {
    String id=args[0];
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str",id);
    }
    RestCommandLineService.getInstance().activateTenant(id);
    return CliConstants.COMMAND_SUCCESSFULL;
  }
 else {
    context.getStratosApplication().printUsage(getName());
    return CliConstants.COMMAND_FAILED;
  }
}
Program: 115862
Project: 115862
Buggy source:
protected void stopScheduler(){
  scheduler.shutdownNow();
}

Fixed version (ground truth):
protected void stopScheduler(){
  schedulerFuture.cancel(true);
}
Program: 115863
Project: 115863
Buggy source:
public void startScheduler(){
  scheduler.scheduleAtFixedRate(this,0,monitoringIntervalMilliseconds,TimeUnit.MILLISECONDS);
}

Fixed version (ground truth):
public void startScheduler(){
  schedulerFuture=scheduler.scheduleAtFixedRate(this,0,monitoringIntervalMilliseconds,TimeUnit.MILLISECONDS);
}
Program: 115864
Project: 115864
Buggy source:
public void run(){
  long startTime=System.currentTimeMillis();
  long endTime=startTime;
  int retries=5;
  boolean success=false;
  ApplicationMonitor applicationMonitor=null;
  while (!success && retries != 0) {
    try {
      startTime=System.currentTimeMillis();
      log.info("String_Node_Str" + applicationId);
      try {
        applicationMonitor=MonitorFactory.getApplicationMonitor(applicationId);
      }
 catch (      PolicyValidationException e) {
        String msg="String_Node_Str" + applicationId;
        log.warn(msg,e);
        retries--;
      }
      success=true;
      endTime=System.currentTimeMillis();
    }
 catch (    DependencyBuilderException e) {
      String msg="String_Node_Str" + applicationId;
      log.warn(msg,e);
      retries--;
    }
catch (    TopologyInConsistentException e) {
      String msg="String_Node_Str" + applicationId;
      log.warn(msg,e);
      retries--;
    }
  }
  if (applicationMonitor == null) {
    String msg="String_Node_Str" + "String_Node_Str" + applicationId;
    log.error(msg);
    throw new RuntimeException(msg);
  }
  AutoscalerContext autoscalerContext=AutoscalerContext.getInstance();
  autoscalerContext.removeAppMonitor(applicationId);
  autoscalerContext.addAppMonitor(applicationMonitor);
  long startupTime=((endTime - startTime) / 1000);
  if (log.isInfoEnabled()) {
    log.info(String.format("String_Node_Str" + "String_Node_Str",applicationMonitor.getId(),applicationMonitor.getStartupDependencyTree(),startupTime));
  }
}

Fixed version (ground truth):
public void run(){
  long startTime=System.currentTimeMillis();
  long endTime=startTime;
  int retries=5;
  boolean success=false;
  ApplicationMonitor applicationMonitor=null;
  while (!success && retries != 0) {
    try {
      startTime=System.currentTimeMillis();
      log.info("String_Node_Str" + applicationId);
      try {
        applicationMonitor=MonitorFactory.getApplicationMonitor(applicationId);
      }
 catch (      PolicyValidationException e) {
        String msg="String_Node_Str" + applicationId;
        log.warn(msg,e);
        retries--;
      }
      success=true;
      endTime=System.currentTimeMillis();
    }
 catch (    DependencyBuilderException e) {
      String msg="String_Node_Str" + applicationId;
      log.warn(msg,e);
      retries--;
    }
catch (    TopologyInConsistentException e) {
      String msg="String_Node_Str" + applicationId;
      log.warn(msg,e);
      retries--;
    }
  }
  if (applicationMonitor == null) {
    String msg="String_Node_Str" + "String_Node_Str" + applicationId;
    log.error(msg);
    throw new RuntimeException(msg);
  }
  AutoscalerContext autoscalerContext=AutoscalerContext.getInstance();
  autoscalerContext.removeApplicationPendingMonitor(applicationId);
  autoscalerContext.removeAppMonitor(applicationId);
  autoscalerContext.addAppMonitor(applicationMonitor);
  long startupTime=((endTime - startTime) / 1000);
  if (log.isInfoEnabled()) {
    log.info(String.format("String_Node_Str" + "String_Node_Str",applicationMonitor.getId(),applicationMonitor.getStartupDependencyTree(),startupTime));
  }
}
Program: 115865
Project: 115865
Buggy source:
/** 
 * List Kubernetes Hosts
 * @throws CommandException
 */
public void listKubernetesHosts(String clusterId){
  try {
    Type listType=new TypeToken<ArrayList<KubernetesHostBean>>(){
    }
.getType();
    List<KubernetesHostBean> list=(List<KubernetesHostBean>)restClient.listEntity(ENDPOINT_LIST_KUBERNETES_HOSTS.replace("String_Node_Str",clusterId),listType,"String_Node_Str");
    if ((list != null) && (list.size() > 0)) {
      RowMapper<KubernetesHostBean> partitionMapper=new RowMapper<KubernetesHostBean>(){
        public String[] getData(        KubernetesHostBean kubernetesHost){
          String[] data=new String[3];
          data[0]=kubernetesHost.getHostId();
          data[1]=kubernetesHost.getHostname();
          data[2]=emptyStringIfNullOrEmpty(kubernetesHost.getPrivateIPAddress());
          data[3]=emptyStringIfNullOrEmpty(kubernetesHost.getPublicIPAddress());
          return data;
        }
      }
;
      KubernetesHostBean[] array=new KubernetesHostBean[list.size()];
      array=list.toArray(array);
      System.out.println("String_Node_Str");
      CliUtils.printTable(array,partitionMapper,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
    }
 else {
      System.out.println("String_Node_Str");
      return;
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    printError(message,e);
  }
}

Fixed version (ground truth):
/** 
 * List Kubernetes Hosts
 * @throws CommandException
 */
public void listKubernetesHosts(String clusterId){
  try {
    Type listType=new TypeToken<ArrayList<KubernetesHostBean>>(){
    }
.getType();
    List<KubernetesHostBean> list=(List<KubernetesHostBean>)restClient.listEntity(ENDPOINT_LIST_KUBERNETES_HOSTS.replace("String_Node_Str",clusterId),listType,"String_Node_Str");
    if ((list != null) && (list.size() > 0)) {
      RowMapper<KubernetesHostBean> partitionMapper=new RowMapper<KubernetesHostBean>(){
        public String[] getData(        KubernetesHostBean kubernetesHost){
          String[] data=new String[4];
          data[0]=kubernetesHost.getHostId();
          data[1]=kubernetesHost.getHostname();
          data[2]=emptyStringIfNullOrEmpty(kubernetesHost.getPrivateIPAddress());
          data[3]=emptyStringIfNullOrEmpty(kubernetesHost.getPublicIPAddress());
          return data;
        }
      }
;
      KubernetesHostBean[] array=new KubernetesHostBean[list.size()];
      array=list.toArray(array);
      System.out.println("String_Node_Str");
      CliUtils.printTable(array,partitionMapper,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
    }
 else {
      System.out.println("String_Node_Str");
      return;
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    printError(message,e);
  }
}
Program: 115866
Project: 115866
Buggy source:
/** 
 * Executing the commands. Returns a code
 * @param context The context assoicated with the Command Line Application
 * @param args The arguments for the command
 * @return The status code
 * @throws org.apache.stratos.cli.exception.CommandException if any errors occur when executing the command
 */
int execute(T context,String[] args) throws CommandException ;

Fixed version (ground truth):
/** 
 * Executing the commands. Returns a code
 * @param context The context assoicated with the Command Line Application
 * @param args The arguments for the command
 * @param already_parsed_opts Options parsed by any parent parsers.
 * @return The status code
 * @throws org.apache.stratos.cli.exception.CommandException if any errors occur when executing the command
 */
int execute(T context,String[] args,Option[] already_parsed_opts) throws CommandException ;
Program: 115868
Project: 115868
Buggy source:
@Override protected int executeCommand(String line){
  String[] tokens=new StrTokenizer(line).getTokenArray();
  String action=tokens[0];
  String[] actionArgs=Arrays.copyOfRange(tokens,1,tokens.length);
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str",action,tokens.length);
  }
  Command<StratosCommandContext> command=commands.get(action);
  if (command == null) {
    System.out.println(action + "String_Node_Str");
    return CliConstants.COMMAND_FAILED;
  }
  try {
    return command.execute(context,actionArgs);
  }
 catch (  CommandException e) {
    if (logger.isErrorEnabled()) {
      logger.error("String_Node_Str" + action,e);
    }
    return CliConstants.ERROR_CODE;
  }
}

Fixed version (ground truth):
@Override protected int executeCommand(String line){
  String[] tokens=new StrTokenizer(line).getTokenArray();
  String action=tokens[0];
  String[] actionArgs=Arrays.copyOfRange(tokens,1,tokens.length);
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str",action,tokens.length);
  }
  Command<StratosCommandContext> command=commands.get(action);
  if (command == null) {
    System.out.println(action + "String_Node_Str");
    return CliConstants.COMMAND_FAILED;
  }
  try {
    return command.execute(context,actionArgs,new Option[0]);
  }
 catch (  CommandException e) {
    if (logger.isErrorEnabled()) {
      logger.error("String_Node_Str" + action,e);
    }
    return CliConstants.ERROR_CODE;
  }
}
Program: 115869
Project: 115869
Buggy source:
@Override public int execute(StratosCommandContext context,String[] args) throws CommandException {
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str",getName());
  }
  if (args != null && args.length == 1) {
    String id=args[0];
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str",id);
    }
    RestCommandLineService.getInstance().activateTenant(id);
    return CliConstants.COMMAND_SUCCESSFULL;
  }
 else {
    context.getStratosApplication().printUsage(getName());
    return CliConstants.COMMAND_FAILED;
  }
}

Fixed version (ground truth):
@Override public int execute(StratosCommandContext context,String[] args,Option[] already_parsed_opts) throws CommandException {
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str",getName());
  }
  if (args != null && args.length == 1) {
    String id=args[0];
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str",id);
    }
    RestCommandLineService.getInstance().activateTenant(id);
    return CliConstants.COMMAND_SUCCESSFULL;
  }
 else {
    context.getStratosApplication().printUsage(getName());
    return CliConstants.COMMAND_FAILED;
  }
}
Program: 115878
Project: 115878
Buggy source:
public void undeployEntity(String serviceEndpoint,String entityName,String entityId){
  try {
    int responseCode=executeDelete(serviceEndpoint,entityId);
    if (responseCode == 404) {
      System.out.println(String.format("String_Node_Str",StringUtils.capitalize(entityName)));
    }
 else     if (responseCode >= 200 && responseCode < 300) {
      System.out.println(String.format("String_Node_Str",entityName));
    }
  }
 catch (  Exception e) {
    String message=String.format("String_Node_Str",entityName);
    System.out.println(message);
    logger.error(message,e);
  }
}

Fixed version (ground truth):
public void undeployEntity(String serviceEndpoint,String entityName,String entityId){
  try {
    int responseCode=executeDelete(serviceEndpoint.replace("String_Node_Str",entityId));
    if (responseCode == 404) {
      System.out.println(String.format("String_Node_Str",StringUtils.capitalize(entityName)));
    }
 else     if (responseCode >= 200 && responseCode < 300) {
      System.out.println(String.format("String_Node_Str",entityName,entityId));
    }
  }
 catch (  Exception e) {
    String message=String.format("String_Node_Str",entityName,entityId);
    System.out.println(message);
    logger.error(message,e);
  }
}
Program: 115879
Project: 115879
Buggy source:
private int executeDelete(String serviceEndpoint,String identifier) throws IOException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    System.out.println(getBaseURL() + serviceEndpoint.replace("String_Node_Str",identifier));
    HttpResponse response=doDelete(httpClient,getBaseURL() + serviceEndpoint);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode < 200 || responseCode >= 300) {
      CliUtils.printError(response);
    }
    return responseCode;
  }
  finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
private int executeDelete(String serviceEndpoint) throws IOException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=doDelete(httpClient,getBaseURL() + serviceEndpoint);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode < 200 || responseCode >= 300) {
      CliUtils.printError(response);
    }
    return responseCode;
  }
  finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115880
Project: 115880
Buggy source:
public Object getEntity(String serviceEndpoint,Type responseType,String identifierPlaceHolder,String identifier,String entityName){
  try {
    return executeGet(serviceEndpoint.replace(identifierPlaceHolder,identifier),responseType);
  }
 catch (  Exception e) {
    String message=String.format("String_Node_Str",entityName);
    System.out.println(message);
    logger.error(message,e);
    return null;
  }
}

Fixed version (ground truth):
public Object getEntity(String serviceEndpoint,Type responseType,String identifierPlaceHolder,String identifier,String entityName){
  try {
    return executeGet(serviceEndpoint.replace(identifierPlaceHolder,identifier),responseType);
  }
 catch (  Exception e) {
    String message=String.format("String_Node_Str",entityName,identifier);
    System.out.println(message);
    logger.error(message,e);
    return null;
  }
}
Program: 115881
Project: 115881
Buggy source:
public void deleteEntity(String serviceEndpoint,String identifier,String entityName){
  try {
    int responseCode=executeDelete(serviceEndpoint,identifier);
    if (responseCode == 404) {
      System.out.println(String.format("String_Node_Str",StringUtils.capitalize(entityName)));
    }
 else     if (responseCode >= 200 && responseCode < 300) {
      System.out.println(String.format("String_Node_Str",entityName));
    }
  }
 catch (  Exception e) {
    String message=String.format("String_Node_Str",entityName);
    System.out.println(message);
    logger.error(message,e);
  }
}

Fixed version (ground truth):
public void deleteEntity(String serviceEndpoint,String identifier,String entityName){
  try {
    int responseCode=executeDelete(serviceEndpoint);
    if (responseCode == 404) {
      System.out.println(String.format("String_Node_Str",StringUtils.capitalize(entityName)));
    }
 else     if (responseCode >= 200 && responseCode < 300) {
      System.out.println(String.format("String_Node_Str",entityName,identifier));
    }
  }
 catch (  Exception e) {
    String message=String.format("String_Node_Str",entityName);
    System.out.println(message);
    logger.error(message,e);
  }
}
Program: 115882
Project: 115882
Buggy source:
/** 
 * Add user
 * @throws CommandException
 */
public void addUser(String userName,String credential,String role,String firstName,String lastName,String email,String profileName) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    UserInfoBean userInfoBean=new UserInfoBean();
    userInfoBean.setUserName(userName);
    userInfoBean.setCredential(credential);
    userInfoBean.setRole(role);
    userInfoBean.setFirstName(firstName);
    userInfoBean.setLastName(lastName);
    userInfoBean.setEmail(email);
    userInfoBean.setProfileName(profileName);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    String jsonString=gson.toJson(userInfoBean,UserInfoBean.class);
    HttpResponse response=restClient.doPost(httpClient,restClient.getBaseURL() + ENDPOINT_ADD_USER,jsonString);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode < 200 || responseCode >= 300) {
      CliUtils.printError(response);
    }
 else {
      System.out.println("String_Node_Str");
      return;
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Add user
 * @throws CommandException
 */
public void addUser(String userName,String credential,String role,String firstName,String lastName,String email,String profileName) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    UserInfoBean userInfoBean=new UserInfoBean();
    userInfoBean.setUserName(userName);
    userInfoBean.setCredential(credential);
    userInfoBean.setRole(role);
    userInfoBean.setFirstName(firstName);
    userInfoBean.setLastName(lastName);
    userInfoBean.setEmail(email);
    userInfoBean.setProfileName(profileName);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    String jsonString=gson.toJson(userInfoBean,UserInfoBean.class);
    HttpResponse response=restClient.doPost(httpClient,restClient.getBaseURL() + ENDPOINT_ADD_USER,jsonString);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode < 200 || responseCode >= 300) {
      CliUtils.printError(response);
    }
 else {
      System.out.println("String_Node_Str" + userName);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + userName;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115883
Project: 115883
Buggy source:
/** 
 * Update an existing tenant
 * @throws CommandException
 */
public void updateTenant(int id,String admin,String firstName,String lastName,String password,String domain,String email) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    TenantInfoBean tenantInfo=new TenantInfoBean();
    tenantInfo.setAdmin(admin);
    tenantInfo.setFirstname(firstName);
    tenantInfo.setLastname(lastName);
    tenantInfo.setAdminPassword(password);
    tenantInfo.setTenantDomain(domain);
    tenantInfo.setEmail(email);
    tenantInfo.setTenantId(id);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    String jsonString=gson.toJson(tenantInfo,TenantInfoBean.class);
    HttpResponse response=restClient.doPut(httpClient,restClient.getBaseURL() + ENDPOINT_UPDATE_TENANT,jsonString);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode < 200 || responseCode >= 300) {
      CliUtils.printError(response);
    }
 else {
      System.out.println("String_Node_Str" + domain);
      return;
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + domain;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Update an existing tenant
 * @throws CommandException
 */
public void updateTenant(int id,String admin,String firstName,String lastName,String password,String domain,String email) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    TenantInfoBean tenantInfo=new TenantInfoBean();
    tenantInfo.setAdmin(admin);
    tenantInfo.setFirstname(firstName);
    tenantInfo.setLastname(lastName);
    tenantInfo.setAdminPassword(password);
    tenantInfo.setTenantDomain(domain);
    tenantInfo.setEmail(email);
    tenantInfo.setTenantId(id);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    String jsonString=gson.toJson(tenantInfo,TenantInfoBean.class);
    HttpResponse response=restClient.doPut(httpClient,restClient.getBaseURL() + ENDPOINT_UPDATE_TENANT,jsonString);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode < 200 || responseCode >= 300) {
      CliUtils.printError(response);
    }
 else {
      System.out.println("String_Node_Str" + domain);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + domain;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115884
Project: 115884
Buggy source:
/** 
 * Delete tenant
 * @throws CommandException
 */
public void deleteTenant(String tenantDomain) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doDelete(httpClient,restClient.getBaseURL() + ENDPOINT_ADD_TENANT + "String_Node_Str"+ tenantDomain);
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    if (responseCode.equals(CliConstants.RESPONSE_OK)) {
      System.out.println("String_Node_Str" + tenantDomain + "String_Node_Str");
      return;
    }
 else {
      String resultString=CliUtils.getHttpResponseString(response);
      ExceptionMapper exception=gson.fromJson(resultString,ExceptionMapper.class);
      System.out.println(exception);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Delete tenant
 * @throws CommandException
 */
public void deleteTenant(String tenantDomain) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doDelete(httpClient,restClient.getBaseURL() + ENDPOINT_ADD_TENANT + "String_Node_Str"+ tenantDomain);
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    if (responseCode.equals(CliConstants.RESPONSE_OK)) {
      System.out.println("String_Node_Str" + tenantDomain);
    }
 else {
      String resultString=CliUtils.getHttpResponseString(response);
      ExceptionMapper exception=gson.fromJson(resultString,ExceptionMapper.class);
      System.out.println(exception);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + tenantDomain;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115885
Project: 115885
Buggy source:
/** 
 * Undeploy application
 * @throws CommandException
 */
public void undeployApplication(String applicationId) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doPost(httpClient,restClient.getBaseURL() + ENDPOINT_UNDEPLOY_APPLICATION.replace("String_Node_Str",applicationId),"String_Node_Str");
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    if (Integer.parseInt(responseCode) < 300 && Integer.parseInt(responseCode) >= 200) {
      System.out.println("String_Node_Str" + applicationId);
      return;
    }
 else {
      String resultString=CliUtils.getHttpResponseString(response);
      ExceptionMapper exception=gson.fromJson(resultString,ExceptionMapper.class);
      System.out.println(exception);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Undeploy application
 * @throws CommandException
 */
public void undeployApplication(String applicationId) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doPost(httpClient,restClient.getBaseURL() + ENDPOINT_UNDEPLOY_APPLICATION.replace("String_Node_Str",applicationId),"String_Node_Str");
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    if (Integer.parseInt(responseCode) < 300 && Integer.parseInt(responseCode) >= 200) {
      System.out.println("String_Node_Str" + applicationId);
    }
 else {
      String resultString=CliUtils.getHttpResponseString(response);
      ExceptionMapper exception=gson.fromJson(resultString,ExceptionMapper.class);
      System.out.println(exception);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + applicationId;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115886
Project: 115886
Buggy source:
/** 
 * Delete user
 * @throws CommandException
 */
public void deleteUser(String userName) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doDelete(httpClient,restClient.getBaseURL() + ENDPOINT_ADD_USER + "String_Node_Str"+ userName);
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    if (responseCode.equals(CliConstants.RESPONSE_NO_CONTENT) || responseCode.equals(CliConstants.RESPONSE_OK)) {
      System.out.println("String_Node_Str" + userName + "String_Node_Str");
      return;
    }
 else {
      String resultString=CliUtils.getHttpResponseString(response);
      ExceptionMapper exception=gson.fromJson(resultString,ExceptionMapper.class);
      System.out.println(exception);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Delete user
 * @throws CommandException
 */
public void deleteUser(String userName) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doDelete(httpClient,restClient.getBaseURL() + ENDPOINT_ADD_USER + "String_Node_Str"+ userName);
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    if (responseCode.equals(CliConstants.RESPONSE_NO_CONTENT) || responseCode.equals(CliConstants.RESPONSE_OK)) {
      System.out.println("String_Node_Str" + userName);
    }
 else {
      String resultString=CliUtils.getHttpResponseString(response);
      ExceptionMapper exception=gson.fromJson(resultString,ExceptionMapper.class);
      System.out.println(exception);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + userName;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115887
Project: 115887
Buggy source:
/** 
 * Activate tenant
 * @throws CommandException
 */
public void activateTenant(String tenantDomain) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doPut(httpClient,restClient.getBaseURL() + ENDPOINT_ACTIVATE_TENANT.replace("String_Node_Str",tenantDomain),"String_Node_Str");
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    if (responseCode.equals(CliConstants.RESPONSE_OK)) {
      System.out.println("String_Node_Str" + tenantDomain + "String_Node_Str");
      return;
    }
 else {
      String resultString=CliUtils.getHttpResponseString(response);
      ExceptionMapper exception=gson.fromJson(resultString,ExceptionMapper.class);
      System.out.println(exception);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Activate tenant
 * @throws CommandException
 */
public void activateTenant(String tenantDomain) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doPut(httpClient,restClient.getBaseURL() + ENDPOINT_ACTIVATE_TENANT.replace("String_Node_Str",tenantDomain),"String_Node_Str");
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    if (responseCode.equals(CliConstants.RESPONSE_OK)) {
      System.out.println("String_Node_Str" + tenantDomain);
    }
 else {
      String resultString=CliUtils.getHttpResponseString(response);
      ExceptionMapper exception=gson.fromJson(resultString,ExceptionMapper.class);
      System.out.println(exception);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + tenantDomain;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115888
Project: 115888
Buggy source:
/** 
 * Synchronize artifacts
 * @throws CommandException
 */
public void synchronizeArtifacts(String cartridgeAlias) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doPost(httpClient,restClient.getBaseURL() + ENDPOINT_SYNCHRONIZE_ARTIFACTS.replace("String_Node_Str",cartridgeAlias),cartridgeAlias);
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    if (responseCode.equals(CliConstants.RESPONSE_OK)) {
      System.out.println(String.format("String_Node_Str",cartridgeAlias));
      return;
    }
 else {
      GsonBuilder gsonBuilder=new GsonBuilder();
      Gson gson=gsonBuilder.create();
      String resultString=CliUtils.getHttpResponseString(response);
      ExceptionMapper exception=gson.fromJson(resultString,ExceptionMapper.class);
      System.out.println(exception);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + cartridgeAlias;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Synchronize artifacts
 * @throws CommandException
 */
public void synchronizeArtifacts(String cartridgeAlias) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    HttpResponse response=restClient.doPost(httpClient,restClient.getBaseURL() + ENDPOINT_SYNCHRONIZE_ARTIFACTS.replace("String_Node_Str",cartridgeAlias),cartridgeAlias);
    String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
    if (responseCode.equals(CliConstants.RESPONSE_OK)) {
      System.out.println(String.format("String_Node_Str",cartridgeAlias));
    }
 else {
      GsonBuilder gsonBuilder=new GsonBuilder();
      Gson gson=gsonBuilder.create();
      String resultString=CliUtils.getHttpResponseString(response);
      ExceptionMapper exception=gson.fromJson(resultString,ExceptionMapper.class);
      System.out.println(exception);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + cartridgeAlias;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115889
Project: 115889
Buggy source:
/** 
 * Add new tenant
 * @throws CommandException
 */
public void addTenant(String admin,String firstName,String lastaName,String password,String domain,String email) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    TenantInfoBean tenantInfo=new TenantInfoBean();
    tenantInfo.setAdmin(admin);
    tenantInfo.setFirstname(firstName);
    tenantInfo.setLastname(lastaName);
    tenantInfo.setAdminPassword(password);
    tenantInfo.setTenantDomain(domain);
    tenantInfo.setEmail(email);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    String jsonString=gson.toJson(tenantInfo,TenantInfoBean.class);
    HttpResponse response=restClient.doPost(httpClient,restClient.getBaseURL() + ENDPOINT_ADD_TENANT,jsonString);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode < 200 || responseCode >= 300) {
      CliUtils.printError(response);
    }
 else {
      System.out.println("String_Node_Str");
      return;
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Add new tenant
 * @throws CommandException
 */
public void addTenant(String admin,String firstName,String lastName,String password,String domain,String email) throws CommandException {
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    TenantInfoBean tenantInfo=new TenantInfoBean();
    tenantInfo.setAdmin(admin);
    tenantInfo.setFirstname(firstName);
    tenantInfo.setLastname(lastName);
    tenantInfo.setAdminPassword(password);
    tenantInfo.setTenantDomain(domain);
    tenantInfo.setEmail(email);
    GsonBuilder gsonBuilder=new GsonBuilder();
    Gson gson=gsonBuilder.create();
    String jsonString=gson.toJson(tenantInfo,TenantInfoBean.class);
    HttpResponse response=restClient.doPost(httpClient,restClient.getBaseURL() + ENDPOINT_ADD_TENANT,jsonString);
    int responseCode=response.getStatusLine().getStatusCode();
    if (responseCode < 200 || responseCode >= 300) {
      CliUtils.printError(response);
    }
 else {
      System.out.println("String_Node_Str" + domain);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str" + domain;
    printError(message,e);
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}
Program: 115890
Project: 115890
Buggy source:
/** 
 * List Kubernetes Clusters
 * @throws CommandException
 */
public void listKubernetesClusters(){
  try {
    Type listType=new TypeToken<ArrayList<KubernetesClusterBean>>(){
    }
.getType();
    List<KubernetesClusterBean> list=(List<KubernetesClusterBean>)restClient.listEntity(ENDPOINT_LIST_KUBERNETES_CLUSTERS,listType,"String_Node_Str");
    if ((list != null) && (list.size() > 0)) {
      RowMapper<KubernetesClusterBean> partitionMapper=new RowMapper<KubernetesClusterBean>(){
        public String[] getData(        KubernetesClusterBean kubernetesCluster){
          String[] data=new String[2];
          data[0]=kubernetesCluster.getClusterId();
          data[1]=kubernetesCluster.getDescription();
          return data;
        }
      }
;
      KubernetesClusterBean[] array=new KubernetesClusterBean[list.size()];
      array=list.toArray(array);
      System.out.println("String_Node_Str");
      CliUtils.printTable(array,partitionMapper,"String_Node_Str","String_Node_Str");
    }
 else {
      System.out.println("String_Node_Str");
      return;
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    printError(message,e);
  }
}

Fixed version (ground truth):
/** 
 * List Kubernetes Clusters
 * @throws CommandException
 */
public void listKubernetesClusters(){
  try {
    Type listType=new TypeToken<ArrayList<KubernetesClusterBean>>(){
    }
.getType();
    List<KubernetesClusterBean> list=(List<KubernetesClusterBean>)restClient.listEntity(ENDPOINT_LIST_KUBERNETES_CLUSTERS,listType,"String_Node_Str");
    if ((list != null) && (list.size() > 0)) {
      RowMapper<KubernetesClusterBean> partitionMapper=new RowMapper<KubernetesClusterBean>(){
        public String[] getData(        KubernetesClusterBean kubernetesCluster){
          String[] data=new String[2];
          data[0]=kubernetesCluster.getClusterId();
          data[1]=kubernetesCluster.getDescription();
          return data;
        }
      }
;
      KubernetesClusterBean[] array=new KubernetesClusterBean[list.size()];
      array=list.toArray(array);
      System.out.println("String_Node_Str");
      CliUtils.printTable(array,partitionMapper,"String_Node_Str","String_Node_Str");
    }
 else {
      System.out.println("String_Node_Str");
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    printError(message,e);
  }
}