Program: 17816
Project: 17816
Buggy source:
@Test public void testChangeSetBatch() throws Exception {
  List<BatchPart> batch=new ArrayList<BatchPart>();
  BatchChangeSet changeSet=BatchChangeSet.newBuilder().build();
  Map<String,String> changeSetHeaders=new HashMap<String,String>();
  changeSetHeaders.put("String_Node_Str","String_Node_Str");
  BatchChangeSetPart changeRequest=BatchChangeSetPart.method(PUT).uri("String_Node_Str").body("String_Node_Str").headers(changeSetHeaders).build();
  changeSet.add(changeRequest);
  batch.add(changeSet);
  BatchPart request=BatchQueryPart.method(GET).uri("String_Node_Str").build();
  batch.add(request);
  InputStream body=EntityProvider.writeBatchRequestBody(batch,BOUNDARY);
  String bodyAsString=StringHelper.inputStreamToString(body,true);
  checkMimeHeaders(bodyAsString);
  checkBoundaryDelimiters(bodyAsString);
  assertTrue(bodyAsString.contains("String_Node_Str"));
  assertTrue(bodyAsString.contains("String_Node_Str"));
  assertTrue(bodyAsString.contains("String_Node_Str"));
  HttpResponse batchResponse=execute(bodyAsString);
  InputStream responseBody=batchResponse.getEntity().getContent();
  String contentType=batchResponse.getFirstHeader(HttpHeaders.CONTENT_TYPE).getValue();
  List<BatchSingleResponse> responses=EntityProvider.parseBatchResponse(responseBody,contentType);
  for (  BatchSingleResponse response : responses) {
    if ("String_Node_Str".equals(response.getStatusCode())) {
      assertEquals("String_Node_Str",response.getStatusInfo());
    }
 else     if ("String_Node_Str".equals(response.getStatusCode())) {
      assertEquals("String_Node_Str",response.getStatusInfo());
      assertTrue(response.getBody().contains("String_Node_Str"));
    }
 else {
      fail();
    }
  }
}

Fixed version (ground truth):
@Test public void testChangeSetBatch() throws Exception {
  List<BatchPart> batch=new ArrayList<BatchPart>();
  BatchChangeSet changeSet=BatchChangeSet.newBuilder().build();
  Map<String,String> changeSetHeaders=new HashMap<String,String>();
  changeSetHeaders.put("String_Node_Str","String_Node_Str");
  BatchChangeSetPart changeRequest=BatchChangeSetPart.method(PUT).uri("String_Node_Str").body("String_Node_Str").headers(changeSetHeaders).build();
  changeSet.add(changeRequest);
  batch.add(changeSet);
  BatchPart request=BatchQueryPart.method(GET).uri("String_Node_Str").build();
  batch.add(request);
  InputStream body=EntityProvider.writeBatchRequest(batch,BOUNDARY);
  String bodyAsString=StringHelper.inputStreamToString(body,true);
  checkMimeHeaders(bodyAsString);
  checkBoundaryDelimiters(bodyAsString);
  assertTrue(bodyAsString.contains("String_Node_Str"));
  assertTrue(bodyAsString.contains("String_Node_Str"));
  assertTrue(bodyAsString.contains("String_Node_Str"));
  HttpResponse batchResponse=execute(bodyAsString);
  InputStream responseBody=batchResponse.getEntity().getContent();
  String contentType=batchResponse.getFirstHeader(HttpHeaders.CONTENT_TYPE).getValue();
  List<BatchSingleResponse> responses=EntityProvider.parseBatchResponse(responseBody,contentType);
  for (  BatchSingleResponse response : responses) {
    if ("String_Node_Str".equals(response.getStatusCode())) {
      assertEquals("String_Node_Str",response.getStatusInfo());
    }
 else     if ("String_Node_Str".equals(response.getStatusCode())) {
      assertEquals("String_Node_Str",response.getStatusInfo());
      assertTrue(response.getBody().contains("String_Node_Str"));
    }
 else {
      fail();
    }
  }
}