nus-yam/ex-repair huggingface dataset:
Program: 111438
Project: 111438
Buggy source:
@Override protected ResponseImpl execute(BuildImageCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str");
  String dockerFilePath=command.getPathToDockerfile();
  if (command.getTag() != null) {
    webResource=webResource.queryParam("String_Node_Str",command.getTag());
  }
  if (command.hasNoCacheEnabled()) {
    webResource=webResource.queryParam("String_Node_Str","String_Node_Str");
  }
  if (command.hasRemoveEnabled()) {
    webResource=webResource.queryParam("String_Node_Str","String_Node_Str");
  }
  if (command.isQuiet()) {
    webResource=webResource.queryParam("String_Node_Str","String_Node_Str");
  }
  if (command.hasPullEnabled()) {
    webResource=webResource.queryParam("String_Node_Str","String_Node_Str");
  }
  if (dockerFilePath != null && !"String_Node_Str".equals(dockerFilePath)) {
    webResource=webResource.queryParam("String_Node_Str",dockerFilePath);
  }
  webResource.property(ClientProperties.REQUEST_ENTITY_PROCESSING,RequestEntityProcessing.CHUNKED);
  webResource.property(ClientProperties.CHUNKED_ENCODING_SIZE,1024 * 1024);
  LOGGER.debug("String_Node_Str",webResource);
  Response response=resourceWithOptionalAuthConfig(command,webResource.request()).accept(MediaType.TEXT_PLAIN).post(entity(command.getTarInputStream(),"String_Node_Str"),Response.class);
  return new ResponseImpl(new WrappedResponseInputStream(response));
}

Fixed version (ground truth):
@Override protected ResponseImpl execute(BuildImageCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str");
  String dockerFilePath=command.getPathToDockerfile();
  if (command.getTag() != null) {
    webResource=webResource.queryParam("String_Node_Str",command.getTag());
  }
  if (command.hasNoCacheEnabled()) {
    webResource=webResource.queryParam("String_Node_Str","String_Node_Str");
  }
  if (!command.hasRemoveEnabled()) {
    webResource=webResource.queryParam("String_Node_Str","String_Node_Str");
  }
  if (command.isQuiet()) {
    webResource=webResource.queryParam("String_Node_Str","String_Node_Str");
  }
  if (command.hasPullEnabled()) {
    webResource=webResource.queryParam("String_Node_Str","String_Node_Str");
  }
  if (dockerFilePath != null && !"String_Node_Str".equals(dockerFilePath)) {
    webResource=webResource.queryParam("String_Node_Str",dockerFilePath);
  }
  webResource.property(ClientProperties.REQUEST_ENTITY_PROCESSING,RequestEntityProcessing.CHUNKED);
  webResource.property(ClientProperties.CHUNKED_ENCODING_SIZE,1024 * 1024);
  LOGGER.debug("String_Node_Str",webResource);
  Response response=resourceWithOptionalAuthConfig(command,webResource.request()).accept(MediaType.TEXT_PLAIN).post(entity(command.getTarInputStream(),"String_Node_Str"),Response.class);
  return new ResponseImpl(new WrappedResponseInputStream(response));
}
Program: 111439
Project: 111439
Buggy source:
@Override protected ResponseImpl execute(BuildImageCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str");
  String dockerFilePath=command.getPathToDockerfile();
  if (command.getTag() != null) {
    webResource=webResource.queryParam("String_Node_Str",command.getTag());
  }
  if (command.hasNoCacheEnabled()) {
    webResource=webResource.queryParam("String_Node_Str","String_Node_Str");
  }
  if (command.hasRemoveEnabled()) {
    webResource=webResource.queryParam("String_Node_Str","String_Node_Str");
  }
  if (command.isQuiet()) {
    webResource=webResource.queryParam("String_Node_Str","String_Node_Str");
  }
  if (command.hasPullEnabled()) {
    webResource=webResource.queryParam("String_Node_Str","String_Node_Str");
  }
  if (dockerFilePath != null && !"String_Node_Str".equals(dockerFilePath)) {
    webResource=webResource.queryParam("String_Node_Str",dockerFilePath);
  }
  webResource.property(ClientProperties.REQUEST_ENTITY_PROCESSING,RequestEntityProcessing.CHUNKED);
  webResource.property(ClientProperties.CHUNKED_ENCODING_SIZE,1024 * 1024);
  LOGGER.debug("String_Node_Str",webResource);
  Response response=resourceWithOptionalAuthConfig(command,webResource.request()).accept(MediaType.TEXT_PLAIN).post(entity(command.getTarInputStream(),"String_Node_Str"),Response.class);
  return new ResponseImpl(new WrappedResponseInputStream(response));
}

Fixed version (ground truth):
@Override protected ResponseImpl execute(BuildImageCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str");
  String dockerFilePath=command.getPathToDockerfile();
  if (command.getTag() != null) {
    webResource=webResource.queryParam("String_Node_Str",command.getTag());
  }
  if (command.hasNoCacheEnabled()) {
    webResource=webResource.queryParam("String_Node_Str","String_Node_Str");
  }
  if (!command.hasRemoveEnabled()) {
    webResource=webResource.queryParam("String_Node_Str","String_Node_Str");
  }
  if (command.isQuiet()) {
    webResource=webResource.queryParam("String_Node_Str","String_Node_Str");
  }
  if (command.hasPullEnabled()) {
    webResource=webResource.queryParam("String_Node_Str","String_Node_Str");
  }
  if (dockerFilePath != null && !"String_Node_Str".equals(dockerFilePath)) {
    webResource=webResource.queryParam("String_Node_Str",dockerFilePath);
  }
  webResource.property(ClientProperties.REQUEST_ENTITY_PROCESSING,RequestEntityProcessing.CHUNKED);
  webResource.property(ClientProperties.CHUNKED_ENCODING_SIZE,1024 * 1024);
  LOGGER.debug("String_Node_Str",webResource);
  Response response=resourceWithOptionalAuthConfig(command,webResource.request()).accept(MediaType.TEXT_PLAIN).post(entity(command.getTarInputStream(),"String_Node_Str"),Response.class);
  return new ResponseImpl(new WrappedResponseInputStream(response));
}
Program: 111440
Project: 111440
Buggy source:
public CreateContainerCmd withDns(String... dns);

Fixed version (ground truth):
/** 
 * Set custom DNS servers
 */
public CreateContainerCmd withDns(String... dns);
Program: 111441
Project: 111441
Buggy source:
public final DockerClientConfigBuilder withDockerCertPath(String dockerCertPath){
  this.sslConfig=new LocalDirectorySSLConfig(dockerCertPath);
  return this;
}

Fixed version (ground truth):
public final DockerClientConfigBuilder withDockerCertPath(String dockerCertPath){
  if (dockerCertPath != null) {
    this.sslConfig=new LocalDirectorySSLConfig(dockerCertPath);
  }
  return this;
}
Program: 111442
Project: 111442
Buggy source:
protected String filterForEnvironmentVars(Map<String,String> environmentMap,String extractedResource){
  if (environmentMap.size() > 0) {
    String currentResourceContent=extractedResource;
    for (    Map.Entry<String,String> entry : environmentMap.entrySet()) {
      String variable=entry.getKey();
      String replacementValue=entry.getValue();
      currentResourceContent=currentResourceContent.replaceAll("String_Node_Str" + variable,replacementValue);
      currentResourceContent=currentResourceContent.replaceAll("String_Node_Str" + variable + "String_Node_Str",replacementValue);
    }
    return currentResourceContent;
  }
 else {
    return extractedResource;
  }
}

Fixed version (ground truth):
protected String filterForEnvironmentVars(Map<String,String> environmentMap,String extractedResource){
  if (environmentMap.size() > 0) {
    String currentResourceContent=extractedResource;
    for (    Map.Entry<String,String> entry : environmentMap.entrySet()) {
      String variable=entry.getKey();
      String replacementValue=entry.getValue();
      currentResourceContent=currentResourceContent.replaceAll("String_Node_Str" + variable,Matcher.quoteReplacement(replacementValue));
      currentResourceContent=currentResourceContent.replaceAll("String_Node_Str" + variable + "String_Node_Str",Matcher.quoteReplacement(replacementValue));
    }
    return currentResourceContent;
  }
 else {
    return extractedResource;
  }
}
Program: 111443
Project: 111443
Buggy source:
public int getSwapLimit(){
  return swapLimit;
}

Fixed version (ground truth):
public boolean getSwapLimit(){
  return swapLimit;
}
Program: 111444
Project: 111444
Buggy source:
public String getIPv4Forwarding(){
  return IPv4Forwarding;
}

Fixed version (ground truth):
public boolean getIPv4Forwarding(){
  return IPv4Forwarding;
}
Program: 111445
Project: 111445
Buggy source:
@Test public void info() throws DockerException {
  if (dockerClient.listContainersCmd().withShowAll(true).exec().size() == 0) {
    CreateContainerResponse container=dockerClient.createContainerCmd("String_Node_Str").withName("String_Node_Str").withCmd("String_Node_Str","String_Node_Str").exec();
    LOG.info("String_Node_Str",container);
    assertThat(container.getId(),not(isEmptyOrNullString()));
    dockerClient.startContainerCmd(container.getId()).exec();
  }
  Info dockerInfo=dockerClient.infoCmd().exec();
  LOG.info(dockerInfo.toString());
  assertTrue(dockerInfo.toString().contains("String_Node_Str"));
  assertTrue(dockerInfo.toString().contains("String_Node_Str"));
  assertTrue(dockerInfo.toString().contains("String_Node_Str"));
  assertTrue(dockerInfo.getContainers() > 0);
  assertTrue(dockerInfo.getImages() > 0);
  assertTrue(dockerInfo.getNFd() > 0);
  assertTrue(dockerInfo.getNGoroutines() > 0);
}

Fixed version (ground truth):
@Test public void info() throws DockerException {
  if (dockerClient.listContainersCmd().withShowAll(true).exec().size() == 0) {
    CreateContainerResponse container=dockerClient.createContainerCmd("String_Node_Str").withName("String_Node_Str").withCmd("String_Node_Str","String_Node_Str").exec();
    LOG.info("String_Node_Str",container);
    assertThat(container.getId(),not(isEmptyOrNullString()));
    dockerClient.startContainerCmd(container.getId()).exec();
  }
  Info dockerInfo=dockerClient.infoCmd().exec();
  LOG.info(dockerInfo.toString());
  assertTrue(dockerInfo.toString().contains("String_Node_Str"));
  assertTrue(dockerInfo.toString().contains("String_Node_Str"));
  assertTrue(dockerInfo.toString().contains("String_Node_Str"));
  assertTrue(dockerInfo.getContainers() > 0);
  assertTrue(dockerInfo.getImages() > 0);
  assertTrue(dockerInfo.getNFd() > 0);
  assertTrue(dockerInfo.getNGoroutines() > 0);
  assertTrue(dockerInfo.getNCPU() > 0);
}
Program: 111446
Project: 111446
Buggy source:
/** 
 * This will set all fields in the builder to those contained in the Properties object. The Properties object should contain the following docker.io.* keys: url, version, username, password, email, dockerCertPath, and dockerCfgPath. If docker.io.readTimeout or docker.io.enableLoggingFilter are not contained, they will be set to 1000 and true, respectively.
 */
public DockerClientConfigBuilder withProperties(Properties p){
  return withUri(p.getProperty(DOCKER_IO_URL_PROPERTY)).withVersion(p.getProperty(DOCKER_IO_VERSION_PROPERTY)).withUsername(p.getProperty(DOCKER_IO_USERNAME_PROPERTY)).withPassword(p.getProperty(DOCKER_IO_PASSWORD_PROPERTY)).withEmail(p.getProperty(DOCKER_IO_EMAIL_PROPERTY)).withServerAddress(p.getProperty(DOCKER_IO_SERVER_ADDRESS_PROPERTY)).withReadTimeout(Integer.valueOf(p.getProperty(DOCKER_IO_READ_TIMEOUT_PROPERTY,"String_Node_Str"))).withLoggingFilter(Boolean.valueOf(p.getProperty(DOCKER_IO_ENABLE_LOGGING_FILTER_PROPERTY,"String_Node_Str"))).withDockerCertPath(p.getProperty(DOCKER_IO_DOCKER_CERT_PATH_PROPERTY)).withDockerCfgPath(p.getProperty(DOCKER_IO_DOCKER_CFG_PATH_PROPERTY)).withMaxPerRouteConnections(Integer.valueOf(p.getProperty(DOCKER_IO_MAX_PER_ROUTE_PROPERTY,"String_Node_Str"))).withMaxTotalConnections(Integer.valueOf(p.getProperty(DOCKER_IO_MAX_TOTAL_PROPERTY,"String_Node_Str")));
}

Fixed version (ground truth):
/** 
 * This will set all fields in the builder to those contained in the Properties object. The Properties object should contain the following docker.io.* keys: url, version, username, password, email, dockerCertPath, and dockerCfgPath. If docker.io.readTimeout or docker.io.enableLoggingFilter are not contained, they will be set to 1000 and true, respectively.
 */
public DockerClientConfigBuilder withProperties(Properties p){
  return withUri(p.getProperty(DOCKER_IO_URL_PROPERTY)).withVersion(p.getProperty(DOCKER_IO_VERSION_PROPERTY)).withUsername(p.getProperty(DOCKER_IO_USERNAME_PROPERTY)).withPassword(p.getProperty(DOCKER_IO_PASSWORD_PROPERTY)).withEmail(p.getProperty(DOCKER_IO_EMAIL_PROPERTY)).withServerAddress(p.getProperty(DOCKER_IO_SERVER_ADDRESS_PROPERTY)).withReadTimeout(Integer.valueOf(p.getProperty(DOCKER_IO_READ_TIMEOUT_PROPERTY,"String_Node_Str"))).withLoggingFilter(Boolean.valueOf(p.getProperty(DOCKER_IO_ENABLE_LOGGING_FILTER_PROPERTY,"String_Node_Str"))).withDockerCertPath(p.getProperty(DOCKER_IO_DOCKER_CERT_PATH_PROPERTY)).withDockerCfgPath(p.getProperty(DOCKER_IO_DOCKER_CFG_PATH_PROPERTY)).withMaxPerRouteConnections(integerValue(p.getProperty(DOCKER_IO_MAX_PER_ROUTE_PROPERTY))).withMaxTotalConnections(integerValue(p.getProperty(DOCKER_IO_MAX_TOTAL_PROPERTY)));
}
Program: 111447
Project: 111447
Buggy source:
public int getMaxTotalConnections(){
  return maxTotalConnections;
}

Fixed version (ground truth):
public Integer getMaxTotalConnections(){
  return maxTotalConnections;
}
Program: 111448
Project: 111448
Buggy source:
public int getMaxPerRoutConnections(){
  return maxPerRouteConnections;
}

Fixed version (ground truth):
public Integer getMaxPerRoutConnections(){
  return maxPerRouteConnections;
}
Program: 111449
Project: 111449
Buggy source:
DockerClientConfig(URI uri,String version,String username,String password,String email,String serverAddress,String dockerCfgPath,Integer readTimeout,boolean loggingFilterEnabled,SSLConfig sslConfig,int maxTotalConns,int maxPerRouteConns){
  this.uri=uri;
  this.version=version;
  this.username=username;
  this.password=password;
  this.email=email;
  this.serverAddress=serverAddress;
  this.dockerCfgPath=dockerCfgPath;
  this.readTimeout=readTimeout;
  this.loggingFilterEnabled=loggingFilterEnabled;
  this.sslConfig=sslConfig;
  this.maxTotalConnections=maxTotalConns;
  this.maxPerRouteConnections=maxPerRouteConns;
}

Fixed version (ground truth):
DockerClientConfig(URI uri,String version,String username,String password,String email,String serverAddress,String dockerCfgPath,Integer readTimeout,boolean loggingFilterEnabled,SSLConfig sslConfig,Integer maxTotalConns,Integer maxPerRouteConns){
  this.uri=uri;
  this.version=version;
  this.username=username;
  this.password=password;
  this.email=email;
  this.serverAddress=serverAddress;
  this.dockerCfgPath=dockerCfgPath;
  this.readTimeout=readTimeout;
  this.loggingFilterEnabled=loggingFilterEnabled;
  this.sslConfig=sslConfig;
  this.maxTotalConnections=maxTotalConns;
  this.maxPerRouteConnections=maxPerRouteConns;
}
Program: 111450
Project: 111450
Buggy source:
@Override public void filter(ClientRequestContext requestContext,ClientResponseContext responseContext) throws IOException {
  int status=responseContext.getStatus();
switch (status) {
case 200:
case 201:
case 204:
    return;
case 304:
  throw new NotModifiedException(getBodyAsMessage(responseContext));
case 400:
throw new BadRequestException(getBodyAsMessage(responseContext));
case 401:
throw new UnauthorizedException(getBodyAsMessage(responseContext));
case 404:
throw new NotFoundException(getBodyAsMessage(responseContext));
case 406:
throw new NotAcceptableException(getBodyAsMessage(responseContext));
case 409:
throw new ConflictException(getBodyAsMessage(responseContext));
case 500:
throw new InternalServerErrorException(getBodyAsMessage(responseContext));
default :
throw new DockerException(getBodyAsMessage(responseContext),status);
}
}

Fixed version (ground truth):
@Override public void filter(ClientRequestContext requestContext,ClientResponseContext responseContext) throws IOException {
  int status=responseContext.getStatus();
switch (status) {
case 200:
case 201:
case 204:
case 301:
    return;
case 304:
  throw new NotModifiedException(getBodyAsMessage(responseContext));
case 400:
throw new BadRequestException(getBodyAsMessage(responseContext));
case 401:
throw new UnauthorizedException(getBodyAsMessage(responseContext));
case 404:
throw new NotFoundException(getBodyAsMessage(responseContext));
case 406:
throw new NotAcceptableException(getBodyAsMessage(responseContext));
case 409:
throw new ConflictException(getBodyAsMessage(responseContext));
case 500:
throw new InternalServerErrorException(getBodyAsMessage(responseContext));
default :
throw new DockerException(getBodyAsMessage(responseContext),status);
}
}
Program: 111451
Project: 111451
Buggy source:
@Override public Iterable<EventStreamItem> getItems() throws IOException {
  ObjectMapper mapper=new ObjectMapper();
  ObjectReader reader=mapper.reader(EventStreamItem.class);
  Iterator<EventStreamItem> items=reader.readValues(proxy);
  return ImmutableList.copyOf(items);
}

Fixed version (ground truth):
@Override public Iterable<EventStreamItem> getItems() throws IOException {
  ObjectMapper mapper=new ObjectMapper();
  ObjectReader reader=mapper.reader(EventStreamItem.class);
  Iterator<EventStreamItem> items=reader.readValues(proxy);
  proxy.close();
  return ImmutableList.copyOf(items);
}
Program: 111452
Project: 111452
Buggy source:
@Override protected InputStream execute(CopyFileFromContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId());
  LOGGER.trace("String_Node_Str" + webResource.toString());
  return webResource.request().accept(MediaType.APPLICATION_OCTET_STREAM_TYPE).post(entity(command,MediaType.APPLICATION_JSON),Response.class).readEntity(InputStream.class);
}

Fixed version (ground truth):
@Override protected InputStream execute(CopyFileFromContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId());
  LOGGER.trace("String_Node_Str" + webResource.toString());
  return webResource.request().accept(MediaType.APPLICATION_OCTET_STREAM_TYPE).post(entity(command,MediaType.APPLICATION_JSON)).readEntity(InputStream.class);
}
Program: 111453
Project: 111453
Buggy source:
@Override protected Void execute(KillContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId());
  if (command.getSignal() != null) {
    webResource=webResource.queryParam("String_Node_Str",command.getSignal());
  }
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(null);
  return null;
}

Fixed version (ground truth):
@Override protected Void execute(KillContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId());
  if (command.getSignal() != null) {
    webResource=webResource.queryParam("String_Node_Str",command.getSignal());
  }
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(null).close();
  return null;
}
Program: 111454
Project: 111454
Buggy source:
@Override protected InputStream execute(LogContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId()).queryParam("String_Node_Str",command.hasTimestampsEnabled() ? "String_Node_Str" : "String_Node_Str").queryParam("String_Node_Str",command.hasStdoutEnabled() ? "String_Node_Str" : "String_Node_Str").queryParam("String_Node_Str",command.hasStderrEnabled() ? "String_Node_Str" : "String_Node_Str").queryParam("String_Node_Str",command.hasFollowStreamEnabled() ? "String_Node_Str" : "String_Node_Str").queryParam("String_Node_Str",command.getTail() < 0 ? "String_Node_Str" : "String_Node_Str" + command.getTail());
  LOGGER.trace("String_Node_Str",webResource);
  return webResource.request().get(Response.class).readEntity(InputStream.class);
}

Fixed version (ground truth):
@Override protected InputStream execute(LogContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId()).queryParam("String_Node_Str",command.hasTimestampsEnabled() ? "String_Node_Str" : "String_Node_Str").queryParam("String_Node_Str",command.hasStdoutEnabled() ? "String_Node_Str" : "String_Node_Str").queryParam("String_Node_Str",command.hasStderrEnabled() ? "String_Node_Str" : "String_Node_Str").queryParam("String_Node_Str",command.hasFollowStreamEnabled() ? "String_Node_Str" : "String_Node_Str").queryParam("String_Node_Str",command.getTail() < 0 ? "String_Node_Str" : "String_Node_Str" + command.getTail());
  LOGGER.trace("String_Node_Str",webResource);
  return webResource.request().get().readEntity(InputStream.class);
}
Program: 111455
Project: 111455
Buggy source:
@Override protected Void execute(PauseContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId());
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(null);
  return null;
}

Fixed version (ground truth):
@Override protected Void execute(PauseContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId());
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(null).close();
  return null;
}
Program: 111456
Project: 111456
Buggy source:
@Override protected Void execute(PingCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str");
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().get(Response.class);
  return null;
}

Fixed version (ground truth):
@Override protected Void execute(PingCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str");
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().get().close();
  return null;
}
Program: 111457
Project: 111457
Buggy source:
@Override public Iterable<PushEventStreamItem> getItems() throws IOException {
  ObjectMapper mapper=new ObjectMapper();
  ObjectReader reader=mapper.reader(PushEventStreamItem.class);
  Iterator<PushEventStreamItem> items=reader.readValues(proxy);
  return ImmutableList.copyOf(items);
}

Fixed version (ground truth):
@Override public Iterable<PushEventStreamItem> getItems() throws IOException {
  ObjectMapper mapper=new ObjectMapper();
  ObjectReader reader=mapper.reader(PushEventStreamItem.class);
  Iterator<PushEventStreamItem> items=reader.readValues(proxy);
  proxy.close();
  return ImmutableList.copyOf(items);
}
Program: 111458
Project: 111458
Buggy source:
@Override protected Void execute(RestartContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId()).queryParam("String_Node_Str",String.valueOf(command.getTimeout()));
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(null);
  return null;
}

Fixed version (ground truth):
@Override protected Void execute(RestartContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId()).queryParam("String_Node_Str",String.valueOf(command.getTimeout()));
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(null).close();
  return null;
}
Program: 111459
Project: 111459
Buggy source:
@Override protected Void execute(StartContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId());
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(entity(command,MediaType.APPLICATION_JSON));
  return null;
}

Fixed version (ground truth):
@Override protected Void execute(StartContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId());
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(entity(command,MediaType.APPLICATION_JSON)).close();
  return null;
}
Program: 111460
Project: 111460
Buggy source:
@Override protected Void execute(StopContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId()).queryParam("String_Node_Str",String.valueOf(command.getTimeout()));
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(null);
  return null;
}

Fixed version (ground truth):
@Override protected Void execute(StopContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId()).queryParam("String_Node_Str",String.valueOf(command.getTimeout()));
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(null).close();
  return null;
}
Program: 111461
Project: 111461
Buggy source:
@Override protected Void execute(TagImageCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str" + command.getImageId() + "String_Node_Str").queryParam("String_Node_Str",command.getRepository()).queryParam("String_Node_Str",command.getTag()).queryParam("String_Node_Str",command.hasForceEnabled() ? "String_Node_Str" : "String_Node_Str");
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().post(null);
  return null;
}

Fixed version (ground truth):
@Override protected Void execute(TagImageCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str" + command.getImageId() + "String_Node_Str").queryParam("String_Node_Str",command.getRepository()).queryParam("String_Node_Str",command.getTag()).queryParam("String_Node_Str",command.hasForceEnabled() ? "String_Node_Str" : "String_Node_Str");
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().post(null).close();
  return null;
}
Program: 111462
Project: 111462
Buggy source:
@Override protected Void execute(UnpauseContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId());
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(Entity.entity(Response.class,MediaType.APPLICATION_JSON));
  return null;
}

Fixed version (ground truth):
@Override protected Void execute(UnpauseContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId());
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(null).close();
  return null;
}
Program: 111463
Project: 111463
Buggy source:
@Test public void nullAuthConfig() throws Exception {
  PullImageCmdImpl pullImageCmd=new PullImageCmdImpl(NOP_EXEC,"String_Node_Str");
  try {
    pullImageCmd.withAuthConfig(null);
    fail();
  }
 catch (  Exception e) {
    assertEquals(e.getMessage(),"String_Node_Str");
  }
}

Fixed version (ground truth):
@Test public void nullAuthConfig() throws Exception {
  PullImageCmdImpl pullImageCmd=new PullImageCmdImpl(NOP_EXEC,null,"String_Node_Str");
  try {
    pullImageCmd.withAuthConfig(null);
    fail();
  }
 catch (  Exception e) {
    assertEquals(e.getMessage(),"String_Node_Str");
  }
}
Program: 111465
Project: 111465
Buggy source:
@Test public void testDockerBuilderAddFileInSubfolder() throws DockerException, IOException {
  File baseDir=new File(Thread.currentThread().getContextClassLoader().getResource("String_Node_Str").getFile());
  dockerfileBuild(baseDir,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testDockerBuilderAddFileInSubfolder() throws DockerException, IOException {
  File baseDir=new File(Thread.currentThread().getContextClassLoader().getResource("String_Node_Str").getFile());
  String response=dockerfileBuild(baseDir);
  assertThat(response,containsString("String_Node_Str"));
}
Program: 111466
Project: 111466
Buggy source:
@Test public void testAddAndCopySubstitution() throws DockerException, IOException {
  File baseDir=new File(Thread.currentThread().getContextClassLoader().getResource("String_Node_Str").getFile());
  dockerfileBuild(baseDir,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testAddAndCopySubstitution() throws DockerException, IOException {
  File baseDir=new File(Thread.currentThread().getContextClassLoader().getResource("String_Node_Str").getFile());
  String response=dockerfileBuild(baseDir);
  assertThat(response,containsString("String_Node_Str"));
}
Program: 111467
Project: 111467
Buggy source:
@Test public void testDockerBuilderAddUrl(){
  File baseDir=new File(Thread.currentThread().getContextClassLoader().getResource("String_Node_Str").getFile());
  dockerfileBuild(baseDir,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testDockerBuilderAddUrl(){
  File baseDir=new File(Thread.currentThread().getContextClassLoader().getResource("String_Node_Str").getFile());
  String response=dockerfileBuild(baseDir);
  assertThat(response,containsString("String_Node_Str"));
}
Program: 111468
Project: 111468
Buggy source:
@Test public void testDockerBuilderAddFolder() throws DockerException, IOException {
  File baseDir=new File(Thread.currentThread().getContextClassLoader().getResource("String_Node_Str").getFile());
  dockerfileBuild(baseDir,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testDockerBuilderAddFolder() throws DockerException, IOException {
  File baseDir=new File(Thread.currentThread().getContextClassLoader().getResource("String_Node_Str").getFile());
  String response=dockerfileBuild(baseDir);
  assertThat(response,containsString("String_Node_Str"));
}
Program: 111469
Project: 111469
Buggy source:
@Test public void testDockerIgnore() throws DockerException, IOException {
  File baseDir=new File(Thread.currentThread().getContextClassLoader().getResource("String_Node_Str").getFile());
  dockerfileBuild(baseDir,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testDockerIgnore() throws DockerException, IOException {
  File baseDir=new File(Thread.currentThread().getContextClassLoader().getResource("String_Node_Str").getFile());
  String response=dockerfileBuild(baseDir);
  assertThat(response,containsString("String_Node_Str"));
}
Program: 111470
Project: 111470
Buggy source:
private String dockerfileBuild(File baseDir,String expectedText){
  InputStream response=dockerClient.buildImageCmd(baseDir).withNoCache().exec();
  String fullLog=asString(response);
  assertThat(fullLog,containsString("String_Node_Str"));
  String imageId=StringUtils.substringBetween(fullLog,"String_Node_Str","String_Node_Str").trim();
  CreateContainerResponse container=dockerClient.createContainerCmd(imageId).exec();
  LOG.info("String_Node_Str",container.toString());
  assertThat(container.getId(),not(isEmptyString()));
  dockerClient.startContainerCmd(container.getId()).exec();
  dockerClient.waitContainerCmd(container.getId()).exec();
  InputStream logResponse=logContainer(container.getId());
  assertThat(asString(logResponse),containsString(expectedText));
  return container.getId();
}

Fixed version (ground truth):
private String dockerfileBuild(File baseDir){
  InputStream response=dockerClient.buildImageCmd(baseDir).withNoCache().exec();
  String fullLog=asString(response);
  assertThat(fullLog,containsString("String_Node_Str"));
  String imageId=StringUtils.substringBetween(fullLog,"String_Node_Str","String_Node_Str").trim();
  CreateContainerResponse container=dockerClient.createContainerCmd(imageId).exec();
  LOG.info("String_Node_Str",container.toString());
  assertThat(container.getId(),not(isEmptyString()));
  dockerClient.startContainerCmd(container.getId()).exec();
  dockerClient.waitContainerCmd(container.getId()).exec();
  InputStream logResponse=logContainer(container.getId());
  return asString(logResponse);
}
Program: 111471
Project: 111471
Buggy source:
public ExposedPorts(ExposedPort... exposedPorts){
  this.exposedPorts=exposedPorts;
}

Fixed version (ground truth):
public ExposedPorts(List<ExposedPort> exposedPorts){
  this.exposedPorts=exposedPorts.toArray(new ExposedPort[exposedPorts.size()]);
}
Program: 111472
Project: 111472
Buggy source:
public Volumes(Volume... volumes){
  this.volumes=volumes;
}

Fixed version (ground truth):
public Volumes(List<Volume> volumes){
  this.volumes=volumes.toArray(new Volume[volumes.size()]);
}
Program: 111473
Project: 111473
Buggy source:
@Override protected InputStream execute(AttachContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId()).queryParam("String_Node_Str",command.hasLogsEnabled() ? "String_Node_Str" : "String_Node_Str").queryParam("String_Node_Str",command.hasStdoutEnabled() ? "String_Node_Str" : "String_Node_Str").queryParam("String_Node_Str",command.hasStderrEnabled() ? "String_Node_Str" : "String_Node_Str").queryParam("String_Node_Str",command.hasFollowStreamEnabled() ? "String_Node_Str" : "String_Node_Str");
  LOGGER.trace("String_Node_Str",webResource);
  return webResource.request().accept(MediaType.APPLICATION_OCTET_STREAM_TYPE).post(entity(null,MediaType.APPLICATION_JSON),Response.class).readEntity(InputStream.class);
}

Fixed version (ground truth):
@Override protected InputStream execute(AttachContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId()).queryParam("String_Node_Str",command.hasLogsEnabled() ? "String_Node_Str" : "String_Node_Str").queryParam("String_Node_Str",command.hasStdoutEnabled() ? "String_Node_Str" : "String_Node_Str").queryParam("String_Node_Str",command.hasStderrEnabled() ? "String_Node_Str" : "String_Node_Str").queryParam("String_Node_Str",command.hasFollowStreamEnabled() ? "String_Node_Str" : "String_Node_Str");
  LOGGER.trace("String_Node_Str",webResource);
  return webResource.request().accept(MediaType.APPLICATION_OCTET_STREAM_TYPE).post(null,Response.class).readEntity(InputStream.class);
}
Program: 111474
Project: 111474
Buggy source:
@Override protected Void execute(KillContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId());
  if (command.getSignal() != null) {
    webResource=webResource.queryParam("String_Node_Str",command.getSignal());
  }
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(entity(null,MediaType.APPLICATION_JSON));
  return null;
}

Fixed version (ground truth):
@Override protected Void execute(KillContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId());
  if (command.getSignal() != null) {
    webResource=webResource.queryParam("String_Node_Str",command.getSignal());
  }
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(null);
  return null;
}
Program: 111475
Project: 111475
Buggy source:
@Override protected Void execute(PauseContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId());
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(entity(null,MediaType.APPLICATION_JSON),Response.class);
  return null;
}

Fixed version (ground truth):
@Override protected Void execute(PauseContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId());
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(null);
  return null;
}
Program: 111476
Project: 111476
Buggy source:
@Override protected InputStream execute(PullImageCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").queryParam("String_Node_Str",command.getTag()).queryParam("String_Node_Str",command.getRepository()).queryParam("String_Node_Str",command.getRegistry());
  LOGGER.trace("String_Node_Str",webResource);
  return resourceWithOptionalAuthConfig(command,webResource.request()).accept(MediaType.APPLICATION_OCTET_STREAM_TYPE).post(entity(Response.class,MediaType.APPLICATION_JSON)).readEntity(InputStream.class);
}

Fixed version (ground truth):
@Override protected InputStream execute(PullImageCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").queryParam("String_Node_Str",command.getTag()).queryParam("String_Node_Str",command.getRepository()).queryParam("String_Node_Str",command.getRegistry());
  LOGGER.trace("String_Node_Str",webResource);
  return resourceWithOptionalAuthConfig(command,webResource.request()).accept(MediaType.APPLICATION_OCTET_STREAM_TYPE).post(null).readEntity(InputStream.class);
}
Program: 111477
Project: 111477
Buggy source:
@Override protected InputStream execute(PushImageCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str" + name(command) + "String_Node_Str").queryParam("String_Node_Str",command.getTag());
  final String registryAuth=registryAuth(command.getAuthConfig());
  LOGGER.trace("String_Node_Str",webResource);
  return webResource.request().header("String_Node_Str",registryAuth).accept(MediaType.APPLICATION_JSON).post(entity(Response.class,MediaType.APPLICATION_JSON)).readEntity(InputStream.class);
}

Fixed version (ground truth):
@Override protected InputStream execute(PushImageCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str" + name(command) + "String_Node_Str").queryParam("String_Node_Str",command.getTag());
  final String registryAuth=registryAuth(command.getAuthConfig());
  LOGGER.trace("String_Node_Str",webResource);
  return webResource.request().header("String_Node_Str",registryAuth).accept(MediaType.APPLICATION_JSON).post(null).readEntity(InputStream.class);
}
Program: 111478
Project: 111478
Buggy source:
@Override protected Void execute(RestartContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId()).queryParam("String_Node_Str",String.valueOf(command.getTimeout()));
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(entity(null,MediaType.APPLICATION_JSON_TYPE));
  return null;
}

Fixed version (ground truth):
@Override protected Void execute(RestartContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId()).queryParam("String_Node_Str",String.valueOf(command.getTimeout()));
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(null);
  return null;
}
Program: 111479
Project: 111479
Buggy source:
@Override protected Void execute(StopContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId()).queryParam("String_Node_Str",String.valueOf(command.getTimeout()));
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(entity(null,MediaType.APPLICATION_JSON));
  return null;
}

Fixed version (ground truth):
@Override protected Void execute(StopContainerCmd command){
  WebTarget webResource=getBaseResource().path("String_Node_Str").resolveTemplate("String_Node_Str",command.getContainerId()).queryParam("String_Node_Str",String.valueOf(command.getTimeout()));
  LOGGER.trace("String_Node_Str",webResource);
  webResource.request().accept(MediaType.APPLICATION_JSON).post(null);
  return null;
}
Program: 111480
Project: 111480
Buggy source:
public StartContainerCmd withRestartPolicy(RestartPolicy restartPolicy);

Fixed version (ground truth):
/** 
 * Set custom   {@link RestartPolicy} for the container. Defaults to{@link RestartPolicy#noRestart()}
 */
public StartContainerCmd withRestartPolicy(RestartPolicy restartPolicy);
Program: 111481
Project: 111481
Buggy source:
public StartContainerCmd withLinks(Link... links);

Fixed version (ground truth):
/** 
 * Add link to another container.
 */
public StartContainerCmd withLinks(Link... links);
Program: 111482
Project: 111482
Buggy source:
public StartContainerCmd withDns(String... dns);

Fixed version (ground truth):
/** 
 * Set custom DNS servers
 */
public StartContainerCmd withDns(String... dns);
Program: 111483
Project: 111483
Buggy source:
public StartContainerCmd withCapDrop(String... capDrop);

Fixed version (ground truth):
/** 
 * Drop linux <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html">kernel capability</a> from the container. For example: dropping capability "CHOWN" prevents the container from changing the owner of any files.
 */
public StartContainerCmd withCapDrop(String... capDrop);
Program: 111484
Project: 111484
Buggy source:
public StartContainerCmd withDevices(Device... devices);

Fixed version (ground truth):
/** 
 * Add host devices to the container
 */
public StartContainerCmd withDevices(Device... devices);
Program: 111485
Project: 111485
Buggy source:
public StartContainerCmd withNetworkMode(String networkMode);

Fixed version (ground truth):
/** 
 * Set the Network mode for the container <ul> <li>'bridge': creates a new network stack for the container on the docker bridge</li> <li>'none': no networking for this container</li> <li>'container:<name|id>': reuses another container network stack</li> <li>'host': use the host network stack inside the container. Note: the host mode gives the container full access to local system services such as D-bus and is therefore considered insecure.</li> </ul>
 */
public StartContainerCmd withNetworkMode(String networkMode);
Program: 111486
Project: 111486
Buggy source:
public StartContainerCmd withCapAdd(String... capAdd);

Fixed version (ground truth):
/** 
 * Add linux <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html">kernel capability</a> to the container. For example: adding capability "MKNOD" allows the container to create special files using the 'mknod' command.
 */
public StartContainerCmd withCapAdd(String... capAdd);
Program: 111487
Project: 111487
Buggy source:
public StartContainerCmd withDnsSearch(String... dnsSearch);

Fixed version (ground truth):
/** 
 * Set custom DNS search domains
 */
public StartContainerCmd withDnsSearch(String... dnsSearch);
Program: 111488
Project: 111488
Buggy source:
/** 
 * @throws DockerException If something gets wrong
 */
@Override public RES_T exec() throws DockerException {
  LOGGER.debug("String_Node_Str",this);
  try {
    return execution.exec((CMD_T)this);
  }
 catch (  ClientErrorException exception) {
    int status=exception.getResponse().getStatus();
switch (status) {
case 204:
      return null;
case 304:
    throw new NotModifiedException(exception);
case 400:
  throw new BadRequestException(exception);
case 404:
throw new NotFoundException(exception);
case 406:
throw new NotAcceptableException(exception);
case 409:
throw new ConflictException(exception);
case 500:
throw new InternalServerErrorException(exception);
default :
throw toDockerException(exception);
}
}
}

Fixed version (ground truth):
@Override public RES_T exec() throws DockerException {
  LOGGER.debug("String_Node_Str",this);
  return execution.exec((CMD_T)this);
}
Program: 111489
Project: 111489
Buggy source:
@Override public void init(DockerClientConfig dockerClientConfig){
  Preconditions.checkNotNull(dockerClientConfig,"String_Node_Str");
  ClientConfig clientConfig=new ClientConfig();
  clientConfig.register(JsonClientFilter.class);
  clientConfig.register(JacksonJsonProvider.class);
  if (dockerClientConfig.isLoggingFilterEnabled()) {
    clientConfig.register(new SelectiveLoggingFilter(LOGGER,true));
  }
  if (dockerClientConfig.getReadTimeout() != null) {
    int readTimeout=dockerClientConfig.getReadTimeout();
    clientConfig.property(ClientProperties.READ_TIMEOUT,readTimeout);
  }
  client=ClientBuilder.newClient(clientConfig);
  WebTarget webResource=client.target(dockerClientConfig.getUri());
  if (dockerClientConfig.getVersion() != null) {
    baseResource=webResource.path("String_Node_Str" + dockerClientConfig.getVersion());
  }
 else {
    baseResource=webResource;
  }
}

Fixed version (ground truth):
@Override public void init(DockerClientConfig dockerClientConfig){
  Preconditions.checkNotNull(dockerClientConfig,"String_Node_Str");
  ClientConfig clientConfig=new ClientConfig();
  clientConfig.register(ResponseStatusExceptionFilter.class);
  clientConfig.register(JsonClientFilter.class);
  clientConfig.register(JacksonJsonProvider.class);
  if (dockerClientConfig.isLoggingFilterEnabled()) {
    clientConfig.register(new SelectiveLoggingFilter(LOGGER,true));
  }
  if (dockerClientConfig.getReadTimeout() != null) {
    int readTimeout=dockerClientConfig.getReadTimeout();
    clientConfig.property(ClientProperties.READ_TIMEOUT,readTimeout);
  }
  client=ClientBuilder.newClient(clientConfig);
  WebTarget webResource=client.target(dockerClientConfig.getUri());
  if (dockerClientConfig.getVersion() != null) {
    baseResource=webResource.path("String_Node_Str" + dockerClientConfig.getVersion());
  }
 else {
    baseResource=webResource;
  }
}
Program: 111490
Project: 111490
Buggy source:
public String getDnsSearch(){
  return dnsSearch;
}

Fixed version (ground truth):
public String[] getDnsSearch(){
  return dnsSearch;
}
Program: 111491
Project: 111491
Buggy source:
public DockerClient(Config config,CommandFactory cmdFactory){
  this.cmdFactory=cmdFactory;
  HttpClient httpClient=getPoolingHttpClient(config);
  ClientConfig clientConfig=new DefaultClientConfig();
  client=new ApacheHttpClient4(new ApacheHttpClient4Handler(httpClient,null,false),clientConfig);
  client.setReadTimeout(config.getReadTimeout());
  client.addFilter(new JsonClientFilter());
  if (config.isLoggingFilterEnabled())   client.addFilter(new SelectiveLoggingFilter());
  baseResource=client.resource(config.getUri() + "String_Node_Str" + config.getVersion());
}

Fixed version (ground truth):
public DockerClient(Config config,CommandFactory cmdFactory){
  this.cmdFactory=cmdFactory;
  HttpClient httpClient=getPoolingHttpClient(config);
  ClientConfig clientConfig=new DefaultClientConfig();
  client=new ApacheHttpClient4(new ApacheHttpClient4Handler(httpClient,null,false),clientConfig);
  if (config.getReadTimeout() != null) {
    client.setReadTimeout(config.getReadTimeout());
  }
  client.addFilter(new JsonClientFilter());
  if (config.isLoggingFilterEnabled())   client.addFilter(new SelectiveLoggingFilter());
  WebResource webResource=client.resource(config.getUri());
  if (config.getVersion() != null) {
    baseResource=webResource.path("String_Node_Str" + config.getVersion());
  }
 else {
    baseResource=webResource;
  }
}