Program: 61245
Project: 61245
Buggy source:
@Test public void testBinaryCase(){
  Random gen=RandomUtils.getRandom();
  OnlineSummarizer[] stats=new OnlineSummarizer[4];
  for (int i=0; i < 4; i++) {
    stats[i]=new OnlineSummarizer();
  }
  for (int i=0; i < 500; i++) {
    OnlineAuc a1=new OnlineAuc();
    a1.setPolicy(FAIR);
    OnlineAuc a2=new OnlineAuc();
    a2.setPolicy(FIFO);
    OnlineAuc a3=new OnlineAuc();
    a3.setPolicy(RANDOM);
    Auc a4=new Auc();
    for (int j=0; j < 10000; j++) {
      double x=gen.nextGaussian();
      a1.addSample(0,x);
      a2.addSample(0,x);
      a3.addSample(0,x);
      a4.add(0,x);
      x=gen.nextGaussian() + 1;
      a1.addSample(1,x);
      a2.addSample(1,x);
      a3.addSample(1,x);
      a4.add(1,x);
    }
    stats[0].add(a1.auc());
    stats[1].add(a2.auc());
    stats[2].add(a3.auc());
    stats[3].add(a4.auc());
  }
  int i=0;
  for (  OnlineAuc.ReplacementPolicy policy : new OnlineAuc.ReplacementPolicy[]{FAIR,FIFO,RANDOM,null}) {
    OnlineSummarizer summary=stats[i++];
    System.out.printf("String_Node_Str",policy,summary.getMean(),summary.getQuartile(0),summary.getQuartile(1),summary.getQuartile(2),summary.getQuartile(3));
  }
  assertEquals(0.7603,stats[0].getMean(),0.03);
  assertEquals(0.7603,stats[0].getQuartile(1),0.025);
  assertEquals(0.7603,stats[0].getQuartile(3),0.025);
  assertEquals(0.7603,stats[1].getMean(),0.001);
  assertEquals(0.7603,stats[1].getQuartile(1),0.006);
  assertEquals(0.7603,stats[1].getQuartile(3),0.006);
  assertEquals(0.7603,stats[2].getMean(),0.001);
  assertEquals(0.7603,stats[2].getQuartile(1),0.006);
  assertEquals(0.7603,stats[2].getQuartile(1),0.006);
}

Fixed version (ground truth):
@Test public void testBinaryCase(){
  Random gen=RandomUtils.getRandom();
  OnlineSummarizer[] stats=new OnlineSummarizer[4];
  for (int i=0; i < 4; i++) {
    stats[i]=new OnlineSummarizer();
  }
  for (int i=0; i < 500; i++) {
    OnlineAuc a1=new OnlineAuc();
    a1.setPolicy(FAIR);
    OnlineAuc a2=new OnlineAuc();
    a2.setPolicy(FIFO);
    OnlineAuc a3=new OnlineAuc();
    a3.setPolicy(RANDOM);
    Auc a4=new Auc();
    for (int j=0; j < 10000; j++) {
      double x=gen.nextGaussian();
      a1.addSample(0,x);
      a2.addSample(0,x);
      a3.addSample(0,x);
      a4.add(0,x);
      x=gen.nextGaussian() + 1;
      a1.addSample(1,x);
      a2.addSample(1,x);
      a3.addSample(1,x);
      a4.add(1,x);
    }
    stats[0].add(a1.auc());
    stats[1].add(a2.auc());
    stats[2].add(a3.auc());
    stats[3].add(a4.auc());
  }
  int i=0;
  for (  OnlineAuc.ReplacementPolicy policy : new OnlineAuc.ReplacementPolicy[]{FAIR,FIFO,RANDOM,null}) {
    OnlineSummarizer summary=stats[i++];
    System.out.printf("String_Node_Str",policy,summary.getMean(),summary.getQuartile(0),summary.getQuartile(1),summary.getQuartile(2),summary.getQuartile(3));
  }
  assertEquals(0.7603,stats[0].getMean(),0.03);
  assertEquals(0.7603,stats[0].getQuartile(1),0.03);
  assertEquals(0.7603,stats[0].getQuartile(3),0.03);
  assertEquals(0.7603,stats[1].getMean(),0.001);
  assertEquals(0.7603,stats[1].getQuartile(1),0.006);
  assertEquals(0.7603,stats[1].getQuartile(3),0.006);
  assertEquals(0.7603,stats[2].getMean(),0.001);
  assertEquals(0.7603,stats[2].getQuartile(1),0.006);
  assertEquals(0.7603,stats[2].getQuartile(1),0.006);
}