Program: 111383
Project: 111383
Buggy source:
@Test(groups="String_Node_Str") public void inspectExec() throws Exception {
  String containerName="String_Node_Str" + new SecureRandom().nextInt();
  CreateContainerResponse container=dockerClient.createContainerCmd("String_Node_Str").withCmd("String_Node_Str","String_Node_Str").withName(containerName).exec();
  LOG.info("String_Node_Str",container.toString());
  assertThat(container.getId(),not(isEmptyString()));
  dockerClient.startContainerCmd(container.getId()).exec();
  ExecCreateCmdResponse checkFileExec1=dockerClient.execCreateCmd(container.getId()).withAttachStdout(false).withAttachStderr(false).withCmd("String_Node_Str","String_Node_Str","String_Node_Str").exec();
  LOG.info("String_Node_Str",checkFileExec1.toString());
  assertThat(checkFileExec1.getId(),not(isEmptyString()));
  dockerClient.execStartCmd(checkFileExec1.getId()).exec(new ExecStartResultCallback(System.out,System.err));
  InspectExecResponse first=dockerClient.inspectExecCmd(checkFileExec1.getId()).exec();
  assertThat(first.getExitCode(),is(1));
  ExecCreateCmdResponse touchFileExec=dockerClient.execCreateCmd(container.getId()).withAttachStdout(true).withAttachStderr(true).withCmd("String_Node_Str","String_Node_Str").exec();
  LOG.info("String_Node_Str",touchFileExec.toString());
  assertThat(touchFileExec.getId(),not(isEmptyString()));
  dockerClient.execStartCmd(container.getId()).withExecId(touchFileExec.getId()).exec(new ExecStartResultCallback(System.out,System.err));
  InspectExecResponse second=dockerClient.inspectExecCmd(touchFileExec.getId()).exec();
  assertThat(second.getExitCode(),is(0));
  ExecCreateCmdResponse checkFileExec2=dockerClient.execCreateCmd(container.getId()).withAttachStdout(true).withAttachStderr(true).withCmd("String_Node_Str","String_Node_Str","String_Node_Str").exec();
  LOG.info("String_Node_Str",checkFileExec2.toString());
  assertThat(checkFileExec2.getId(),not(isEmptyString()));
  dockerClient.execStartCmd(container.getId()).withExecId(checkFileExec2.getId()).exec(new ExecStartResultCallback(System.out,System.err));
  InspectExecResponse third=dockerClient.inspectExecCmd(checkFileExec2.getId()).exec();
  assertThat(third.getExitCode(),is(0));
  InspectContainerResponse containerInfo=dockerClient.inspectContainerCmd(container.getId()).exec();
  assertEquals(containerInfo.getId(),container.getId());
  JSONTestHelper.testRoundTrip(containerInfo);
}

Fixed version (ground truth):
@Test(groups="String_Node_Str") public void inspectExec() throws Exception {
  String containerName="String_Node_Str" + new SecureRandom().nextInt();
  CreateContainerResponse container=dockerClient.createContainerCmd("String_Node_Str").withCmd("String_Node_Str","String_Node_Str").withName(containerName).exec();
  LOG.info("String_Node_Str",container.toString());
  assertThat(container.getId(),not(isEmptyString()));
  dockerClient.startContainerCmd(container.getId()).exec();
  ExecCreateCmdResponse checkFileExec1=dockerClient.execCreateCmd(container.getId()).withAttachStdout(true).withAttachStderr(true).withCmd("String_Node_Str","String_Node_Str","String_Node_Str").exec();
  LOG.info("String_Node_Str",checkFileExec1.toString());
  assertThat(checkFileExec1.getId(),not(isEmptyString()));
  dockerClient.execStartCmd(checkFileExec1.getId()).withDetach(false).exec(new ExecStartResultCallback(System.out,System.err)).awaitCompletion();
  InspectExecResponse first=dockerClient.inspectExecCmd(checkFileExec1.getId()).exec();
  assertThat(first.isRunning(),is(false));
  assertThat(first.getExitCode(),is(1));
  ExecCreateCmdResponse touchFileExec=dockerClient.execCreateCmd(container.getId()).withAttachStdout(true).withAttachStderr(true).withCmd("String_Node_Str","String_Node_Str").exec();
  LOG.info("String_Node_Str",touchFileExec.toString());
  assertThat(touchFileExec.getId(),not(isEmptyString()));
  dockerClient.execStartCmd(touchFileExec.getId()).withDetach(false).exec(new ExecStartResultCallback(System.out,System.err)).awaitCompletion();
  InspectExecResponse second=dockerClient.inspectExecCmd(touchFileExec.getId()).exec();
  assertThat(second.isRunning(),is(false));
  assertThat(second.getExitCode(),is(0));
  ExecCreateCmdResponse checkFileExec2=dockerClient.execCreateCmd(container.getId()).withAttachStdout(true).withAttachStderr(true).withCmd("String_Node_Str","String_Node_Str","String_Node_Str").exec();
  LOG.info("String_Node_Str",checkFileExec2.toString());
  assertThat(checkFileExec2.getId(),not(isEmptyString()));
  dockerClient.execStartCmd(checkFileExec2.getId()).withDetach(false).exec(new ExecStartResultCallback(System.out,System.err)).awaitCompletion();
  InspectExecResponse third=dockerClient.inspectExecCmd(checkFileExec2.getId()).exec();
  assertThat(third.isRunning(),is(false));
  assertThat(third.getExitCode(),is(0));
  InspectContainerResponse containerInfo=dockerClient.inspectContainerCmd(container.getId()).exec();
  assertEquals(containerInfo.getId(),container.getId());
  JSONTestHelper.testRoundTrip(containerInfo);
}