Program: 11608
Project: 11608
Buggy source:
@Override public SimplePlot2D getLayout(){
  final SimplePlot2D polyplot=new SimplePlot2D();
  polyplot.setTitle("String_Node_Str");
  polyplot.setAxisLabelX("String_Node_Str","String_Node_Str",false);
  polyplot.setAxisLabelY("String_Node_Str","String_Node_Str",false);
  polyplot.setAxisLabelZ("String_Node_Str","String_Node_Str");
  polyplot.setAxisSizeZ(65);
  polyplot.setMinX(-20.0f);
  polyplot.setMaxX(20.0f);
  polyplot.setMinY(-20.0f);
  polyplot.setMaxY(20.0f);
  polyplot.setMinZ(0.0f);
  polyplot.setMaxZ(1000.0f);
  polyplot.lockAspectRatioXY(1.0f);
  polyplot.setSelectionSize(50000.0f);
  polyplot.addPainter(new CopyrightPainter());
  polyplot.addPainter(new FpsPainter());
  final PolygonPainter polygonPainter=new PolygonPainter();
  polyplot.addPainter(polygonPainter);
  for (int i=0; i < 100; i++) {
    polygonPainter.addPolygon(1,i,i,i,new float[]{0f,i,i,0f},new float[]{0f,0f,i,i},i);
  }
  for (int i=0; i < 100; i++) {
    polygonPainter.addPolygon(2,i,i,i,new float[]{0f,-i,-i,0f},new float[]{0f,0f,-i,-i},i + 100);
  }
  polygonPainter.addPolygon(4,1,new float[]{-10f,0,10,10,0f},new float[]{-10f,8,0f,10,10},200);
  polygonPainter.setLineWidth(1,3);
  polygonPainter.setLineColor(2,0.0f,0.0f,1.0f,1.0f);
  polygonPainter.setLineDotted(2,true);
  polygonPainter.setFill(3,true);
  polygonPainter.setLineWidth(3,3);
  polygonPainter.setFillColor(3,0.0f,1.0f,0.0f,1.0f);
  polygonPainter.setFill(4,true);
  polygonPainter.setLineColor(6,1.0f,0.0f,0.0f,1.0f);
  polygonPainter.setFill(6,false);
  (new Thread(){
    @Override public void run(){
      int i=0;
      while (true) {
        polygonPainter.addPolygon(6,i,i,i + 20,new float[]{0f,-i,-i,0f},new float[]{0f,0f,i,i},100);
        int deleteId=(int)(Math.random() * i);
        polygonPainter.deletePolygon(6,deleteId);
        i++;
        try {
          Thread.sleep(100);
        }
 catch (        InterruptedException e) {
          e.printStackTrace();
        }
      }
    }
  }
).start();
  (new Thread(){
    int i=5;
    ColorGradient c=ColorGradients.jet;
    float[] rgba=new float[4];
    Random r=new Random();
    @Override public void run(){
      while (true) {
        float x0=200 * r.nextFloat();
        float y0=200 * r.nextFloat();
        float t=(float)(r.nextFloat() * Math.PI * 2);
        float d=15;
        float dt=(float)(Math.PI / 36);
        float x1=(float)(x0 + d * Math.sin(t - dt));
        float y1=(float)(y0 + d * Math.cos(t - dt));
        float x2=(float)(x0 + d * Math.sin(t + dt));
        float y2=(float)(y0 + d * Math.cos(t + dt));
        if (i % 2 == 0) {
          polygonPainter.addPolygon(5,i,i,i + 1000,new float[]{x0,x1,x2},new float[]{y0,y1,y2},200 + i);
        }
 else {
          polygonPainter.addPolygon(5 + i,0,i,i + 1000,new float[]{x0,x1,x2},new float[]{y0,y1,y2},200 + i);
        }
        polygonPainter.setFill(5 + i,true);
        polygonPainter.setShowLines(5 + i,false);
        c.toColor((i % 50) / 50f,rgba);
        polygonPainter.setFillColor(5 + i,rgba[0],rgba[1],rgba[2],r.nextFloat());
        polygonPainter.setFillColor(5,rgba[0],rgba[1],rgba[2],0.2f);
        polygonPainter.setLineColor(5,rgba[0],rgba[1],rgba[2],1.0f);
        i=i + 1;
        try {
          if (i < 2000) {
            Thread.sleep(1);
          }
 else {
            Thread.sleep(100);
          }
        }
 catch (        InterruptedException e) {
          e.printStackTrace();
        }
      }
    }
  }
).start();
  polyplot.getAxisZ().addAxisListener(new RateLimitedAxisListener1D(){
    double prevMinTime=-1;
    double prevMaxTime=-1;
    @Override public void axisUpdatedRateLimited(    Axis1D handler){
      double minTime=handler.getMin();
      double maxTime=handler.getMax();
      if (prevMinTime != minTime || prevMaxTime != maxTime) {
        polygonPainter.displayTimeRange(minTime,maxTime);
        prevMinTime=minTime;
        prevMaxTime=maxTime;
      }
    }
  }
);
  return polyplot;
}

Fixed version (ground truth):
@Override public SimplePlot2D getLayout(){
  final SimplePlot2D polyplot=new SimplePlot2D();
  polyplot.setTitle("String_Node_Str");
  polyplot.setAxisLabelX("String_Node_Str","String_Node_Str",false);
  polyplot.setAxisLabelY("String_Node_Str","String_Node_Str",false);
  polyplot.setAxisLabelZ("String_Node_Str","String_Node_Str");
  polyplot.setAxisSizeZ(65);
  polyplot.setMinX(-20.0f);
  polyplot.setMaxX(20.0f);
  polyplot.setMinY(-20.0f);
  polyplot.setMaxY(20.0f);
  polyplot.setMinZ(0.0f);
  polyplot.setMaxZ(1000.0f);
  polyplot.lockAspectRatioXY(1.0f);
  polyplot.setSelectionSize(50000.0f);
  polyplot.addPainter(new CopyrightPainter());
  polyplot.addPainter(new FpsPainter());
  final PolygonPainter polygonPainter=new PolygonPainter();
  polyplot.addPainter(polygonPainter);
  for (int i=0; i < 100; i++) {
    polygonPainter.addPolygon(1,i,i,i,new float[]{0f,i,i,0f},new float[]{0f,0f,i,i},i);
  }
  for (int i=0; i < 100; i++) {
    polygonPainter.addPolygon(2,i,i,i,new float[]{0f,-i,-i,0f},new float[]{0f,0f,-i,-i},i + 100);
  }
  polygonPainter.addPolygon(4,1,new float[]{-10f,0,10,10,0f},new float[]{-10f,8,0f,10,10},200);
  polygonPainter.setLineWidth(1,3);
  polygonPainter.setLineColor(2,0.0f,0.0f,1.0f,1.0f);
  polygonPainter.setLineDotted(2,true);
  polygonPainter.setFill(3,true);
  polygonPainter.setLineWidth(3,3);
  polygonPainter.setFillColor(3,0.0f,1.0f,0.0f,1.0f);
  polygonPainter.setFill(4,true);
  polygonPainter.setLineColor(6,1.0f,0.0f,0.0f,1.0f);
  polygonPainter.setFill(6,false);
  polygonPainter.setPolyDotted(4,true);
  polygonPainter.setPolyDotted(3,true);
  (new Thread(){
    @Override public void run(){
      int i=0;
      while (true) {
        polygonPainter.addPolygon(6,i,i,i + 20,new float[]{0f,-i,-i,0f},new float[]{0f,0f,i,i},100);
        int deleteId=(int)(Math.random() * i);
        polygonPainter.deletePolygon(6,deleteId);
        i++;
        try {
          Thread.sleep(100);
        }
 catch (        InterruptedException e) {
          e.printStackTrace();
        }
      }
    }
  }
).start();
  (new Thread(){
    int i=5;
    ColorGradient c=ColorGradients.jet;
    float[] rgba=new float[4];
    Random r=new Random();
    @Override public void run(){
      while (true) {
        float x0=200 * r.nextFloat();
        float y0=200 * r.nextFloat();
        float t=(float)(r.nextFloat() * Math.PI * 2);
        float d=15;
        float dt=(float)(Math.PI / 36);
        float x1=(float)(x0 + d * Math.sin(t - dt));
        float y1=(float)(y0 + d * Math.cos(t - dt));
        float x2=(float)(x0 + d * Math.sin(t + dt));
        float y2=(float)(y0 + d * Math.cos(t + dt));
        if (i % 2 == 0) {
          polygonPainter.addPolygon(5,i,i,i + 1000,new float[]{x0,x1,x2},new float[]{y0,y1,y2},200 + i);
        }
 else {
          polygonPainter.addPolygon(5 + i,0,i,i + 1000,new float[]{x0,x1,x2},new float[]{y0,y1,y2},200 + i);
        }
        polygonPainter.setFill(5 + i,true);
        polygonPainter.setShowLines(5 + i,false);
        c.toColor((i % 50) / 50f,rgba);
        polygonPainter.setFillColor(5 + i,rgba[0],rgba[1],rgba[2],r.nextFloat());
        polygonPainter.setFillColor(5,rgba[0],rgba[1],rgba[2],0.2f);
        polygonPainter.setLineColor(5,rgba[0],rgba[1],rgba[2],1.0f);
        i=i + 1;
        try {
          if (i < 2000) {
            Thread.sleep(1);
          }
 else {
            Thread.sleep(100);
          }
        }
 catch (        InterruptedException e) {
          e.printStackTrace();
        }
      }
    }
  }
).start();
  polyplot.getAxisZ().addAxisListener(new RateLimitedAxisListener1D(){
    double prevMinTime=-1;
    double prevMaxTime=-1;
    @Override public void axisUpdatedRateLimited(    Axis1D handler){
      double minTime=handler.getMin();
      double maxTime=handler.getMax();
      if (prevMinTime != minTime || prevMaxTime != maxTime) {
        polygonPainter.displayTimeRange(minTime,maxTime);
        prevMinTime=minTime;
        prevMaxTime=maxTime;
      }
    }
  }
);
  return polyplot;
}