Program: 59378
Project: 59378
Buggy source:
public CreateContainerResponse createContainer(String name,Map<String,Object> containerConfiguration){
  String image=asString(containerConfiguration,IMAGE);
  CreateContainerCmd createContainerCmd=this.dockerClient.createContainerCmd(image);
  createContainerCmd.withName(name);
  if (containerConfiguration.containsKey(EXPOSED_PORTS)) {
    List<String> exposedPorts=asListOfString(containerConfiguration,EXPOSED_PORTS);
    createContainerCmd.withExposedPorts(toExposedPorts(exposedPorts));
  }
  if (containerConfiguration.containsKey(WORKING_DIR)) {
    createContainerCmd.withWorkingDir(asString(containerConfiguration,WORKING_DIR));
  }
  if (containerConfiguration.containsKey(DISABLE_NETWORK)) {
    createContainerCmd.withDisableNetwork(asBoolean(containerConfiguration,DISABLE_NETWORK));
  }
  if (containerConfiguration.containsKey(HOST_NAME)) {
    createContainerCmd.withHostName(asString(containerConfiguration,HOST_NAME));
  }
  if (containerConfiguration.containsKey(PORT_SPECS)) {
    List<String> portSpecs=asListOfString(containerConfiguration,PORT_SPECS);
    createContainerCmd.withPortSpecs(portSpecs.toArray(new String[portSpecs.size()]));
  }
  if (containerConfiguration.containsKey(USER)) {
    createContainerCmd.withUser(asString(containerConfiguration,USER));
  }
  if (containerConfiguration.containsKey(TTY)) {
    createContainerCmd.withTty(asBoolean(containerConfiguration,TTY));
  }
  if (containerConfiguration.containsKey(STDIN_OPEN)) {
    createContainerCmd.withStdinOpen(asBoolean(containerConfiguration,STDIN_OPEN));
  }
  if (containerConfiguration.containsKey(STDIN_ONCE)) {
    createContainerCmd.withStdInOnce(asBoolean(containerConfiguration,STDIN_ONCE));
  }
  if (containerConfiguration.containsKey(MEMORY_LIMIT)) {
    createContainerCmd.withMemoryLimit(asInt(containerConfiguration,MEMORY_LIMIT));
  }
  if (containerConfiguration.containsKey(MEMORY_SWAP)) {
    createContainerCmd.withMemorySwap(asInt(containerConfiguration,MEMORY_SWAP));
  }
  if (containerConfiguration.containsKey(CPU_SHARES)) {
    createContainerCmd.withCpuShares(asInt(containerConfiguration,CPU_SHARES));
  }
  if (containerConfiguration.containsKey(ATTACH_STDIN)) {
    createContainerCmd.withAttachStdin(asBoolean(containerConfiguration,ATTACH_STDIN));
  }
  if (containerConfiguration.containsKey(ATTACH_STDERR)) {
    createContainerCmd.withAttachStderr(asBoolean(containerConfiguration,ATTACH_STDERR));
  }
  if (containerConfiguration.containsKey(ENV)) {
    List<String> env=asListOfString(containerConfiguration,ENV);
    createContainerCmd.withEnv(env.toArray(new String[env.size()]));
  }
  if (containerConfiguration.containsKey(CMD)) {
    List<String> cmd=asListOfString(containerConfiguration,CMD);
    createContainerCmd.withCmd(cmd.toArray(new String[cmd.size()]));
  }
  if (containerConfiguration.containsKey(DNS)) {
    List<String> dns=asListOfString(containerConfiguration,DNS);
    createContainerCmd.withDns(dns.toArray(new String[dns.size()]));
  }
  if (containerConfiguration.containsKey(VOLUMES)) {
    List<String> volumes=asListOfString(containerConfiguration,VOLUMES);
    createContainerCmd.withVolumes(toVolumes(volumes));
  }
  if (containerConfiguration.containsKey(VOLUMES_FROM)) {
    List<String> volumesFrom=asListOfString(containerConfiguration,VOLUMES_FROM);
    createContainerCmd.withVolumesFrom(volumesFrom.toArray(new String[volumesFrom.size()]));
  }
  return createContainerCmd.exec();
}

Fixed version (ground truth):
public CreateContainerResponse createContainer(String name,Map<String,Object> containerConfiguration){
  this.pingDockerServer();
  String image=asString(containerConfiguration,IMAGE);
  CreateContainerCmd createContainerCmd=this.dockerClient.createContainerCmd(image);
  createContainerCmd.withName(name);
  if (containerConfiguration.containsKey(EXPOSED_PORTS)) {
    List<String> exposedPorts=asListOfString(containerConfiguration,EXPOSED_PORTS);
    createContainerCmd.withExposedPorts(toExposedPorts(exposedPorts));
  }
  if (containerConfiguration.containsKey(WORKING_DIR)) {
    createContainerCmd.withWorkingDir(asString(containerConfiguration,WORKING_DIR));
  }
  if (containerConfiguration.containsKey(DISABLE_NETWORK)) {
    createContainerCmd.withDisableNetwork(asBoolean(containerConfiguration,DISABLE_NETWORK));
  }
  if (containerConfiguration.containsKey(HOST_NAME)) {
    createContainerCmd.withHostName(asString(containerConfiguration,HOST_NAME));
  }
  if (containerConfiguration.containsKey(PORT_SPECS)) {
    List<String> portSpecs=asListOfString(containerConfiguration,PORT_SPECS);
    createContainerCmd.withPortSpecs(portSpecs.toArray(new String[portSpecs.size()]));
  }
  if (containerConfiguration.containsKey(USER)) {
    createContainerCmd.withUser(asString(containerConfiguration,USER));
  }
  if (containerConfiguration.containsKey(TTY)) {
    createContainerCmd.withTty(asBoolean(containerConfiguration,TTY));
  }
  if (containerConfiguration.containsKey(STDIN_OPEN)) {
    createContainerCmd.withStdinOpen(asBoolean(containerConfiguration,STDIN_OPEN));
  }
  if (containerConfiguration.containsKey(STDIN_ONCE)) {
    createContainerCmd.withStdInOnce(asBoolean(containerConfiguration,STDIN_ONCE));
  }
  if (containerConfiguration.containsKey(MEMORY_LIMIT)) {
    createContainerCmd.withMemoryLimit(asInt(containerConfiguration,MEMORY_LIMIT));
  }
  if (containerConfiguration.containsKey(MEMORY_SWAP)) {
    createContainerCmd.withMemorySwap(asInt(containerConfiguration,MEMORY_SWAP));
  }
  if (containerConfiguration.containsKey(CPU_SHARES)) {
    createContainerCmd.withCpuShares(asInt(containerConfiguration,CPU_SHARES));
  }
  if (containerConfiguration.containsKey(ATTACH_STDIN)) {
    createContainerCmd.withAttachStdin(asBoolean(containerConfiguration,ATTACH_STDIN));
  }
  if (containerConfiguration.containsKey(ATTACH_STDERR)) {
    createContainerCmd.withAttachStderr(asBoolean(containerConfiguration,ATTACH_STDERR));
  }
  if (containerConfiguration.containsKey(ENV)) {
    List<String> env=asListOfString(containerConfiguration,ENV);
    createContainerCmd.withEnv(env.toArray(new String[env.size()]));
  }
  if (containerConfiguration.containsKey(CMD)) {
    List<String> cmd=asListOfString(containerConfiguration,CMD);
    createContainerCmd.withCmd(cmd.toArray(new String[cmd.size()]));
  }
  if (containerConfiguration.containsKey(DNS)) {
    List<String> dns=asListOfString(containerConfiguration,DNS);
    createContainerCmd.withDns(dns.toArray(new String[dns.size()]));
  }
  if (containerConfiguration.containsKey(VOLUMES)) {
    List<String> volumes=asListOfString(containerConfiguration,VOLUMES);
    createContainerCmd.withVolumes(toVolumes(volumes));
  }
  if (containerConfiguration.containsKey(VOLUMES_FROM)) {
    List<String> volumesFrom=asListOfString(containerConfiguration,VOLUMES_FROM);
    createContainerCmd.withVolumesFrom(volumesFrom.toArray(new String[volumesFrom.size()]));
  }
  return createContainerCmd.exec();
}