Program: 34978
Project: 34978
Buggy source:
@Test @Ignore public void testBatchWithGetAndPost() throws BatchException, IOException {
  List<BatchPart> batch=new ArrayList<BatchPart>();
  Map<String,String> headers=new HashMap<String,String>();
  headers.put("String_Node_Str","String_Node_Str");
  BatchPart request=BatchQueryPart.method(GET).uri("String_Node_Str").headers(headers).contentId("String_Node_Str").build();
  batch.add(request);
  Map<String,String> changeSetHeaders=new HashMap<String,String>();
  changeSetHeaders.put("String_Node_Str","String_Node_Str");
  String body="String_Node_Str";
  BatchChangeSetPart changeRequest=BatchChangeSetPart.method(POST).uri("String_Node_Str").body(body).headers(changeSetHeaders).contentId("String_Node_Str").build();
  BatchChangeSet changeSet=BatchChangeSet.newBuilder().build();
  changeSet.add(changeRequest);
  batch.add(changeSet);
  BatchRequestWriter writer=new BatchRequestWriter();
  InputStream batchRequest=writer.writeBatchRequest(batch,BOUNDARY);
  assertNotNull(batchRequest);
  StringHelper.Stream batchRequestStream=StringHelper.toStream(batchRequest);
  String requestBody=batchRequestStream.asString();
  checkMimeHeaders(requestBody);
  checkHeaders(headers,requestBody);
  checkHeaders(changeSetHeaders,requestBody);
  assertTrue(requestBody.contains("String_Node_Str"));
  assertTrue(requestBody.contains("String_Node_Str"));
  assertTrue(requestBody.contains(body));
  assertEquals(23,batchRequestStream.linesCount());
  String contentType="String_Node_Str" + BOUNDARY;
  BatchParser parser=new BatchParser(contentType,parseProperties,true);
  List<BatchRequestPart> parseResult=parser.parseBatchRequest(batchRequestStream.asStream());
  assertEquals(2,parseResult.size());
}

Fixed version (ground truth):
@Test public void testBatchWithGetAndPost() throws BatchException, IOException {
  List<BatchPart> batch=new ArrayList<BatchPart>();
  Map<String,String> headers=new HashMap<String,String>();
  headers.put("String_Node_Str","String_Node_Str");
  BatchPart request=BatchQueryPart.method(GET).uri("String_Node_Str").headers(headers).contentId("String_Node_Str").build();
  batch.add(request);
  Map<String,String> changeSetHeaders=new HashMap<String,String>();
  changeSetHeaders.put("String_Node_Str","String_Node_Str");
  String body="String_Node_Str";
  BatchChangeSetPart changeRequest=BatchChangeSetPart.method(POST).uri("String_Node_Str").body(body).headers(changeSetHeaders).contentId("String_Node_Str").build();
  BatchChangeSet changeSet=BatchChangeSet.newBuilder().build();
  changeSet.add(changeRequest);
  batch.add(changeSet);
  BatchRequestWriter writer=new BatchRequestWriter();
  InputStream batchRequest=writer.writeBatchRequest(batch,BOUNDARY);
  assertNotNull(batchRequest);
  StringHelper.Stream batchRequestStream=StringHelper.toStream(batchRequest);
  String requestBody=batchRequestStream.asString();
  checkMimeHeaders(requestBody);
  checkHeaders(headers,requestBody);
  checkHeaders(changeSetHeaders,requestBody);
  assertTrue(requestBody.contains("String_Node_Str"));
  assertTrue(requestBody.contains("String_Node_Str"));
  assertTrue(requestBody.contains(body));
  assertEquals(25,batchRequestStream.linesCount());
  String contentType="String_Node_Str" + BOUNDARY;
  BatchParser parser=new BatchParser(contentType,parseProperties,true);
  List<BatchRequestPart> parseResult=parser.parseBatchRequest(batchRequestStream.asStream());
  assertEquals(2,parseResult.size());
}