Program: 80902
Project: 80902
Buggy source:
@Test public void test_normal_read() throws IOException {
  byte[] boundary=Lang.toBytes("String_Node_Str".toCharArray());
  String str="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  InputStream ins=Lang.ins(str);
  BufferRing br=new BufferRing(ins,3,5);
  String s;
  MarkMode mode;
  RingItem ri;
  br.load();
  assertEquals(15,br.readed);
  mode=br.mark(boundary);
  assertEquals(MarkMode.NOT_FOUND,mode);
  s=br.dumpAsString();
  assertEquals('1',(char)br.item.buffer[0]);
  assertTrue(br.item.isDone4Mark());
  assertFalse(br.item.isLoaded);
  assertEquals("String_Node_Str",s);
  br.load();
  assertEquals(30,br.readed);
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  ri=br.item;
  assertTrue(ri.isLoaded);
  assertEquals(0,ri.l);
  assertEquals(3,ri.r);
  assertEquals(5,ri.nextmark);
  assertTrue(ri.isDone4Mark());
  ri=br.item.next;
  assertTrue(ri.isLoaded);
  assertEquals(1,ri.l);
  assertEquals(1,ri.r);
  assertEquals(1,ri.nextmark);
  assertFalse(ri.isDone4Mark());
  ri=br.item.next.next;
  assertTrue(ri.isLoaded);
  assertEquals(0,ri.l);
  assertEquals(0,ri.r);
  assertEquals(0,ri.nextmark);
  assertFalse(ri.isDone4Mark());
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  br.load();
  assertEquals(30,br.readed);
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  ri=br.item;
  assertTrue(ri.isLoaded);
  assertEquals(1,ri.l);
  assertEquals(2,ri.r);
  assertEquals(5,ri.nextmark);
  assertTrue(ri.isDone4Mark());
  ri=br.item.next;
  assertTrue(ri.isLoaded);
  assertEquals(0,ri.l);
  assertEquals(0,ri.r);
  assertEquals(0,ri.nextmark);
  assertFalse(ri.isDone4Mark());
  ri=br.item.next.next;
  assertFalse(ri.isLoaded);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  br.load();
  assertEquals(30,br.readed);
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  ri=br.item;
  assertTrue(ri.isLoaded);
  assertEquals(0,ri.l);
  assertEquals(1,ri.r);
  assertEquals(4,ri.nextmark);
  assertFalse(ri.isDone4Mark());
  ri=br.item.next;
  assertFalse(ri.isLoaded);
  ri=br.item.next.next;
  assertFalse(ri.isLoaded);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  ri=br.item;
  assertTrue(ri.isLoaded);
  assertEquals(4,ri.l);
  assertEquals(4,ri.r);
  assertEquals(4,ri.nextmark);
  assertFalse(ri.isDone4Mark());
  br.load();
  assertEquals(30,br.readed);
  mode=br.mark(boundary);
  assertEquals(35,br.readed);
  assertEquals(MarkMode.FOUND,mode);
  ri=br.item;
  assertTrue(ri.isLoaded);
  assertEquals(4,ri.l);
  assertEquals(4,ri.r);
  assertEquals(5,ri.nextmark);
  assertTrue(ri.isDone4Mark());
  ri=br.item.next;
  assertTrue(ri.isLoaded);
  assertEquals(2,ri.l);
  assertEquals(2,ri.r);
  assertEquals(2,ri.nextmark);
  assertFalse(ri.isDone4Mark());
  ri=br.item.next.next;
  assertFalse(ri.isLoaded);
  s=br.dumpAsString();
  assertEquals('-',(char)br.item.buffer[0]);
  assertEquals("String_Node_Str",s);
  br.load();
  assertEquals(35,br.readed);
  mode=br.mark(boundary);
  assertEquals(38,br.readed);
  assertTrue(br.item.next.isStreamEnd);
  ri=br.item;
  assertTrue(ri.isLoaded);
  assertEquals(2,ri.l);
  assertEquals(5,ri.r);
  assertEquals(5,ri.nextmark);
  assertTrue(ri.isDone4Mark());
  ri=br.item.next;
  assertTrue(ri.isLoaded);
  assertEquals(0,ri.l);
  assertEquals(3,ri.r);
  assertEquals(3,ri.nextmark);
  assertTrue(ri.isDone4Mark());
  assertEquals(MarkMode.STREAM_END,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
}

Fixed version (ground truth):
@Test public void test_normal_read() throws IOException {
  RemountBytes boundary=RemountBytes.create("String_Node_Str");
  String str="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  str+="String_Node_Str";
  InputStream ins=Lang.ins(str);
  BufferRing br=new BufferRing(ins,3,5);
  String s;
  MarkMode mode;
  RingItem ri;
  br.load();
  assertEquals(15,br.readed);
  mode=br.mark(boundary);
  assertEquals(MarkMode.NOT_FOUND,mode);
  s=br.dumpAsString();
  assertEquals('1',(char)br.item.buffer[0]);
  assertTrue(br.item.isDone4Mark());
  assertFalse(br.item.isLoaded);
  assertEquals("String_Node_Str",s);
  br.load();
  assertEquals(30,br.readed);
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  ri=br.item;
  assertTrue(ri.isLoaded);
  assertEquals(0,ri.l);
  assertEquals(3,ri.r);
  assertEquals(5,ri.nextmark);
  assertTrue(ri.isDone4Mark());
  ri=br.item.next;
  assertTrue(ri.isLoaded);
  assertEquals(1,ri.l);
  assertEquals(1,ri.r);
  assertEquals(1,ri.nextmark);
  assertFalse(ri.isDone4Mark());
  ri=br.item.next.next;
  assertTrue(ri.isLoaded);
  assertEquals(0,ri.l);
  assertEquals(0,ri.r);
  assertEquals(0,ri.nextmark);
  assertFalse(ri.isDone4Mark());
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  br.load();
  assertEquals(30,br.readed);
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  ri=br.item;
  assertTrue(ri.isLoaded);
  assertEquals(1,ri.l);
  assertEquals(2,ri.r);
  assertEquals(5,ri.nextmark);
  assertTrue(ri.isDone4Mark());
  ri=br.item.next;
  assertTrue(ri.isLoaded);
  assertEquals(0,ri.l);
  assertEquals(0,ri.r);
  assertEquals(0,ri.nextmark);
  assertFalse(ri.isDone4Mark());
  ri=br.item.next.next;
  assertFalse(ri.isLoaded);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  br.load();
  assertEquals(30,br.readed);
  mode=br.mark(boundary);
  assertEquals(MarkMode.FOUND,mode);
  ri=br.item;
  assertTrue(ri.isLoaded);
  assertEquals(0,ri.l);
  assertEquals(1,ri.r);
  assertEquals(4,ri.nextmark);
  assertFalse(ri.isDone4Mark());
  ri=br.item.next;
  assertFalse(ri.isLoaded);
  ri=br.item.next.next;
  assertFalse(ri.isLoaded);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
  ri=br.item;
  assertTrue(ri.isLoaded);
  assertEquals(4,ri.l);
  assertEquals(4,ri.r);
  assertEquals(4,ri.nextmark);
  assertFalse(ri.isDone4Mark());
  br.load();
  assertEquals(30,br.readed);
  mode=br.mark(boundary);
  assertEquals(35,br.readed);
  assertEquals(MarkMode.FOUND,mode);
  ri=br.item;
  assertTrue(ri.isLoaded);
  assertEquals(4,ri.l);
  assertEquals(4,ri.r);
  assertEquals(5,ri.nextmark);
  assertTrue(ri.isDone4Mark());
  ri=br.item.next;
  assertTrue(ri.isLoaded);
  assertEquals(2,ri.l);
  assertEquals(2,ri.r);
  assertEquals(2,ri.nextmark);
  assertFalse(ri.isDone4Mark());
  ri=br.item.next.next;
  assertFalse(ri.isLoaded);
  s=br.dumpAsString();
  assertEquals('-',(char)br.item.buffer[0]);
  assertEquals("String_Node_Str",s);
  br.load();
  assertEquals(35,br.readed);
  mode=br.mark(boundary);
  assertEquals(38,br.readed);
  assertTrue(br.item.next.isStreamEnd);
  ri=br.item;
  assertTrue(ri.isLoaded);
  assertEquals(2,ri.l);
  assertEquals(5,ri.r);
  assertEquals(5,ri.nextmark);
  assertTrue(ri.isDone4Mark());
  ri=br.item.next;
  assertTrue(ri.isLoaded);
  assertEquals(0,ri.l);
  assertEquals(3,ri.r);
  assertEquals(3,ri.nextmark);
  assertTrue(ri.isDone4Mark());
  assertEquals(MarkMode.STREAM_END,mode);
  s=br.dumpAsString();
  assertEquals("String_Node_Str",s);
}