Program: 35900
Project: 35900
Buggy source:
@Before public void setup() throws DockerException, IOException {
  testObj=new DockerOrchestrator(dockerMock,repoMock,fileOrchestratorMock,EnumSet.noneOf(BuildFlag.class),logger,dockerfileValidator);
  when(repoMock.src(idMock)).thenReturn(srcFileMock);
  when(repoMock.conf(idMock)).thenReturn(confMock);
  when(repoMock.imageName(idMock)).thenReturn(IMAGE_NAME);
  when(repoMock.findImageId(idMock)).thenReturn(IMAGE_ID);
  when(repoMock.containerName(idMock)).thenReturn(CONTAINER_NAME);
  when(confMock.getLinks()).thenReturn(new ArrayList<Link>());
  when(confMock.getHealthChecks()).thenReturn(new HealthChecks());
  when(confMock.getTags()).thenReturn(Arrays.asList(IMAGE_NAME + "String_Node_Str" + TAG_NAME));
  when(repoMock.findImageId(idMock)).thenReturn(IMAGE_ID);
  when(repoMock.findContainer(idMock)).thenReturn(containerMock);
  when(containerMock.getId()).thenReturn(CONTAINER_ID);
  when(fileOrchestratorMock.prepare(idMock,srcFileMock,confMock)).thenReturn(fileMock);
  when(repoMock.ids(false)).thenReturn(Arrays.asList(idMock));
  when(repoMock.ids(true)).thenReturn(Arrays.asList(idMock));
  when(repoMock.tag(any(Id.class))).thenReturn(IMAGE_NAME + "String_Node_Str" + TAG_NAME);
  when(dockerMock.buildImageCmd(eq(fileMock))).thenReturn(buildImageCmdMock);
  when(buildImageCmdMock.withTag(any(String.class))).thenReturn(buildImageCmdMock);
  when(buildImageCmdMock.exec()).thenReturn(IOUtils.toInputStream("String_Node_Str"));
  when(dockerMock.createContainerCmd(IMAGE_ID)).thenReturn(createContainerCmdMock);
  when(createContainerCmdMock.exec()).thenReturn(createContainerResponse);
  when(createContainerCmdMock.withName(eq(CONTAINER_NAME))).thenReturn(createContainerCmdMock);
  when(createContainerResponse.getId()).thenReturn(CONTAINER_ID);
  when(dockerMock.startContainerCmd(CONTAINER_ID)).thenReturn(startContainerCmdMock);
  when(dockerMock.stopContainerCmd(CONTAINER_ID)).thenReturn(stopContainerCmdMock);
  when(dockerMock.removeContainerCmd(CONTAINER_ID)).thenReturn(removeContainerCmdMock);
  when(dockerMock.listContainersCmd()).thenReturn(listContainersCmdMockOnlyRunning);
  when(listContainersCmdMockOnlyRunning.withShowAll(false)).thenReturn(listContainersCmdMockOnlyRunning);
  when(listContainersCmdMockOnlyRunning.exec()).thenReturn(Collections.<Container>emptyList());
  when(stopContainerCmdMock.withTimeout(anyInt())).thenReturn(stopContainerCmdMock);
  when(dockerMock.inspectContainerCmd(CONTAINER_ID)).thenReturn(inspectContainerCmdMock);
  when(inspectContainerCmdMock.exec()).thenReturn(containerInspectResponseMock);
  when(containerInspectResponseMock.getImageId()).thenReturn(IMAGE_ID);
  when(dockerMock.tagImageCmd(anyString(),anyString(),anyString())).thenReturn(tagImageCmdMock);
  when(tagImageCmdMock.withForce()).thenReturn(tagImageCmdMock);
  when(dockerMock.pushImageCmd(anyString())).thenReturn(pushImageCmd);
  when(pushImageCmd.withAuthConfig(any(AuthConfig.class))).thenReturn(pushImageCmd);
  when(pushImageCmd.exec()).thenReturn(IOUtils.toInputStream("String_Node_Str"));
}

Fixed version (ground truth):
@Before public void setup() throws DockerException, IOException {
  testObj=new DockerOrchestrator(dockerMock,repoMock,fileOrchestratorMock,EnumSet.noneOf(BuildFlag.class),logger,dockerfileValidator);
  when(repoMock.src(idMock)).thenReturn(srcFileMock);
  when(repoMock.conf(idMock)).thenReturn(confMock);
  when(repoMock.imageName(idMock)).thenReturn(IMAGE_NAME);
  when(repoMock.findImageId(idMock)).thenReturn(IMAGE_ID);
  when(repoMock.containerName(idMock)).thenReturn(CONTAINER_NAME);
  when(confMock.getLinks()).thenReturn(new ArrayList<Link>());
  when(confMock.getHealthChecks()).thenReturn(new HealthChecks());
  when(confMock.getTags()).thenReturn(Arrays.asList(IMAGE_NAME + "String_Node_Str" + TAG_NAME));
  when(repoMock.findImageId(idMock)).thenReturn(IMAGE_ID);
  when(repoMock.findContainer(idMock)).thenReturn(containerMock);
  when(containerMock.getId()).thenReturn(CONTAINER_ID);
  when(fileOrchestratorMock.prepare(idMock,srcFileMock,confMock)).thenReturn(fileMock);
  when(repoMock.ids(false)).thenReturn(Arrays.asList(idMock));
  when(repoMock.ids(true)).thenReturn(Arrays.asList(idMock));
  when(repoMock.tag(any(Id.class))).thenReturn(IMAGE_NAME + "String_Node_Str" + TAG_NAME);
  when(dockerMock.buildImageCmd(eq(fileMock))).thenReturn(buildImageCmdMock);
  when(buildImageCmdMock.withTag(any(String.class))).thenReturn(buildImageCmdMock);
  when(buildImageCmdMock.exec()).thenReturn(new BuildImageCmdExec.ResponseImpl(IOUtils.toInputStream("String_Node_Str")));
  when(dockerMock.createContainerCmd(IMAGE_ID)).thenReturn(createContainerCmdMock);
  when(createContainerCmdMock.exec()).thenReturn(createContainerResponse);
  when(createContainerCmdMock.withName(eq(CONTAINER_NAME))).thenReturn(createContainerCmdMock);
  when(createContainerResponse.getId()).thenReturn(CONTAINER_ID);
  when(dockerMock.startContainerCmd(CONTAINER_ID)).thenReturn(startContainerCmdMock);
  when(dockerMock.stopContainerCmd(CONTAINER_ID)).thenReturn(stopContainerCmdMock);
  when(dockerMock.removeContainerCmd(CONTAINER_ID)).thenReturn(removeContainerCmdMock);
  when(dockerMock.listContainersCmd()).thenReturn(listContainersCmdMockOnlyRunning);
  when(listContainersCmdMockOnlyRunning.withShowAll(false)).thenReturn(listContainersCmdMockOnlyRunning);
  when(listContainersCmdMockOnlyRunning.exec()).thenReturn(Collections.<Container>emptyList());
  when(stopContainerCmdMock.withTimeout(anyInt())).thenReturn(stopContainerCmdMock);
  when(dockerMock.inspectContainerCmd(CONTAINER_ID)).thenReturn(inspectContainerCmdMock);
  when(inspectContainerCmdMock.exec()).thenReturn(containerInspectResponseMock);
  when(containerInspectResponseMock.getImageId()).thenReturn(IMAGE_ID);
  when(dockerMock.tagImageCmd(anyString(),anyString(),anyString())).thenReturn(tagImageCmdMock);
  when(tagImageCmdMock.withForce()).thenReturn(tagImageCmdMock);
  when(dockerMock.pushImageCmd(anyString())).thenReturn(pushImageCmd);
  when(pushImageCmd.withAuthConfig(any(AuthConfig.class))).thenReturn(pushImageCmd);
  when(pushImageCmd.exec()).thenReturn(new PushImageCmd.Response(){
    private final InputStream proxy=IOUtils.toInputStream("String_Node_Str");
    @Override public int read() throws IOException {
      return proxy.read();
    }
    @Override public Iterable<PushEventStreamItem> getItems() throws IOException {
      return null;
    }
  }
);
}