nus-yam/ex-repair huggingface dataset:
Program: 11355
Project: 11355
Buggy source:
protected void doPaintTo(GlimpseContext context){
  GL3 gl=context.getGL().getGL3();
  GlimpseBounds bounds=getBounds(context);
  initIfNecessary(gl);
  if (texture == null)   return;
  double[] quadGeometry=computeQuadGeometry(texture.getWidth(),texture.getHeight(),bounds.getWidth(),bounds.getHeight());
  double wQuad=quadGeometry[0];
  double hQuad=quadGeometry[1];
  double padding=quadGeometry[2];
  float xLeft;
  float xRight;
switch (config.horizontalPos) {
case LEFT:
{
      xLeft=(float)(padding);
      xRight=(float)(xLeft + wQuad);
    }
  break;
default :
{
  xRight=(float)(bounds.getWidth() - padding);
  xLeft=(float)(xRight - wQuad);
}
break;
}
float yTop;
float yBottom;
switch (config.verticalPos) {
case TOP:
{
yTop=(float)(bounds.getHeight() - padding);
yBottom=(float)(yTop - hQuad);
}
break;
default :
{
yBottom=(float)(padding);
yTop=(float)(yBottom + hQuad);
}
break;
}
inXy.clear();
inXy.addQuad2f(xLeft,yBottom,xRight,yTop);
inS.clear();
inS.addQuad2f(0,1,1,0);
texture.setTexParameteri(gl,GL3.GL_TEXTURE_MAG_FILTER,GL3.GL_LINEAR);
texture.setTexParameteri(gl,GL3.GL_TEXTURE_MIN_FILTER,GL3.GL_LINEAR);
texture.enable(gl);
texture.bind(gl);
gl.glEnable(GL3.GL_BLEND);
gl.glBlendFunc(GL3.GL_ONE,GL3.GL_ONE_MINUS_SRC_ALPHA);
prog.begin(gl);
try {
prog.setPixelOrtho(gl,bounds);
prog.setTexture(gl,0);
prog.draw(gl,texture,inXy,inS);
}
  finally {
prog.end(gl);
gl.glDisable(GL3.GL_BLEND);
}
}

Fixed version (ground truth):
@Override protected void doPaintTo(GlimpseContext context){
  GL3 gl=context.getGL().getGL3();
  GlimpseBounds bounds=getBounds(context);
  initIfNecessary(gl);
  if (texture == null)   return;
  double[] quadGeometry=computeQuadGeometry(texture.getWidth(),texture.getHeight(),bounds.getWidth(),bounds.getHeight());
  double wQuad=quadGeometry[0];
  double hQuad=quadGeometry[1];
  double padding=quadGeometry[2];
  float xLeft;
  float xRight;
switch (config.horizontalPos) {
case LEFT:
{
      xLeft=(float)(padding);
      xRight=(float)(xLeft + wQuad);
    }
  break;
default :
{
  xRight=(float)(bounds.getWidth() - padding);
  xLeft=(float)(xRight - wQuad);
}
break;
}
float yTop;
float yBottom;
switch (config.verticalPos) {
case TOP:
{
yTop=(float)(bounds.getHeight() - padding);
yBottom=(float)(yTop - hQuad);
}
break;
default :
{
yBottom=(float)(padding);
yTop=(float)(yBottom + hQuad);
}
break;
}
inXy.clear();
inXy.addQuad2f(xLeft,yBottom,xRight,yTop);
inS.clear();
inS.addQuad2f(0,1,1,0);
texture.setTexParameteri(gl,GL3.GL_TEXTURE_MAG_FILTER,GL3.GL_LINEAR);
texture.setTexParameteri(gl,GL3.GL_TEXTURE_MIN_FILTER,GL3.GL_LINEAR);
texture.enable(gl);
texture.bind(gl);
gl.glEnable(GL3.GL_BLEND);
gl.glBlendFunc(GL3.GL_ONE,GL3.GL_ONE_MINUS_SRC_ALPHA);
prog.begin(context);
try {
prog.setPixelOrtho(context,bounds);
prog.setTexture(context,0);
prog.draw(context,texture,inXy,inS);
}
  finally {
prog.end(context);
gl.glDisable(GL3.GL_BLEND);
}
}
Program: 11356
Project: 11356
Buggy source:
public GlimpseLayout getLayout(final FBOGlimpseCanvas offscreenCanvas) throws Exception {
  Axis2D axis=new Axis2D();
  axis.set(-10,10,-10,10);
  GlimpseAxisLayout2D layout2=new GlimpseAxisLayout2D(axis);
  AxisUtil.attachMouseListener(layout2);
  ShadedTexturePainter painter=new ShadedTexturePainter(){
    boolean initialized=false;
    @Override public void paintTo(    GlimpseContext context,    GlimpseBounds bounds,    Axis2D axis){
      super.paintTo(context,bounds,axis);
      if (!initialized && offscreenCanvas.getGLDrawable().isInitialized()) {
        TextureProjected2D texture=offscreenCanvas.getProjectedTexture();
        texture.setProjection(new PolarProjection(0,10,0,360));
        addDrawableTexture(texture);
        initialized=true;
      }
    }
  }
;
  layout2.addPainter(new BackgroundPainter(true));
  layout2.addPainter(painter);
  return layout2;
}

Fixed version (ground truth):
public GlimpseLayout getLayout(final FBOGlimpseCanvas offscreenCanvas) throws Exception {
  Axis2D axis=new Axis2D();
  axis.set(-10,10,-10,10);
  GlimpseAxisLayout2D layout2=new GlimpseAxisLayout2D(axis);
  AxisUtil.attachMouseListener(layout2);
  ShadedTexturePainter painter=new ShadedTexturePainter(){
    boolean initialized=false;
    @Override public void doPaintTo(    GlimpseContext context){
      if (!initialized && offscreenCanvas.getGLDrawable().isInitialized()) {
        TextureProjected2D texture=offscreenCanvas.getProjectedTexture();
        texture.setProjection(new PolarProjection(0,10,0,360));
        addDrawableTexture(texture);
        initialized=true;
      }
      super.doPaintTo(context);
    }
  }
;
  painter.setProgram(new ColorTexture2DProgram());
  layout2.addPainter(new BackgroundPainter(true));
  layout2.addPainter(painter);
  return layout2;
}
Program: 11357
Project: 11357
Buggy source:
public void begin(GlimpseContext context);

Fixed version (ground truth):
public void begin(GlimpseContext context,float xMin,float xMax,float yMin,float yMax);
Program: 11358
Project: 11358
Buggy source:
@Override public void draw(GlimpseContext context,DrawableTextureProgram program,int texUnit,Collection<TextureUnit<Texture>> multiTextureList){
  boolean ready=true;
  for (  TextureUnit<Texture> texture : multiTextureList) {
    if (!texture.prepare(context))     ready=false;
  }
  if (!prepare(context,texUnit))   ready=false;
  if (!ready) {
    logger.log(WARNING,"String_Node_Str");
    return;
  }
  Axis2D axis=GlimpsePainterBase.getAxis2D(context);
  program.setOrtho(context,(float)axis.getMinX(),(float)axis.getMaxX(),(float)axis.getMinY(),(float)axis.getMaxY());
  program.begin(context);
  try {
    program.draw(context,getMode(),xyVbo(context),sVbo(context),0,this.xyBuilder.numFloats() / 2);
  }
  finally {
    program.end(context);
  }
}

Fixed version (ground truth):
@Override public void draw(GlimpseContext context,DrawableTextureProgram program,int texUnit,Collection<TextureUnit<Texture>> multiTextureList){
  boolean ready=true;
  for (  TextureUnit<Texture> texture : multiTextureList) {
    if (!texture.prepare(context))     ready=false;
  }
  if (!prepare(context,texUnit))   ready=false;
  if (!ready) {
    logger.log(WARNING,"String_Node_Str");
    return;
  }
  Axis2D axis=GlimpsePainterBase.getAxis2D(context);
  program.begin(context,(float)axis.getMinX(),(float)axis.getMaxX(),(float)axis.getMinY(),(float)axis.getMaxY());
  try {
    program.draw(context,getMode(),xyVbo(context),sVbo(context),0,this.xyBuilder.numFloats() / 2);
  }
  finally {
    program.end(context);
  }
}
Program: 11359
Project: 11359
Buggy source:
@Override public void setOrtho(GlimpseContext context,float xMin,float xMax,float yMin,float yMax){
  this.AXIS_RECT.setData(FloatBuffer.wrap(new float[]{xMin,xMax,yMin,yMax}));
}

Fixed version (ground truth):
public void setOrtho(GlimpseContext context,float xMin,float xMax,float yMin,float yMax){
  this.AXIS_RECT.setData(FloatBuffer.wrap(new float[]{xMin,xMax,yMin,yMax}));
}
Program: 11360
Project: 11360
Buggy source:
protected void initialize(Axis1D colorAxis,int targetTexUnit,int colorTexUnit){
  this.addShaders();
  this.dataMin=this.addUniformData(new GLUniformData("String_Node_Str",getMin(colorAxis)));
  this.dataMax=this.addUniformData(new GLUniformData("String_Node_Str",getMax(colorAxis)));
  this.alpha=this.addUniformData(new GLUniformData("String_Node_Str",1f));
  this.discardNaN=this.addUniformData(new GLUniformData("String_Node_Str",0));
  this.dataTexUnit=this.addUniformData(new GLUniformData("String_Node_Str",targetTexUnit));
  this.colorTexUnit=this.addUniformData(new GLUniformData("String_Node_Str",colorTexUnit));
  this.AXIS_RECT=this.addUniformData(GLUniformData.creatEmptyVector("String_Node_Str",4));
  this.colorAxis=colorAxis;
  this.colorAxis.addAxisListener(this);
}

Fixed version (ground truth):
protected void initialize(Axis1D colorAxis,int targetTexUnit,int colorTexUnit){
  this.addShaders();
  this.dataMin=this.addUniformData(new GLUniformData("String_Node_Str",getMin(colorAxis)));
  this.dataMax=this.addUniformData(new GLUniformData("String_Node_Str",getMax(colorAxis)));
  this.alpha=this.addUniformData(new GLUniformData("String_Node_Str",1f));
  this.discardNaN=this.addUniformData(new GLUniformData("String_Node_Str",0));
  this.dataTexUnit=this.addUniformData(new GLUniformData("String_Node_Str",targetTexUnit));
  this.colorTexUnit=this.addUniformData(new GLUniformData("String_Node_Str",colorTexUnit));
  this.AXIS_RECT=this.addUniformData(GLUniformData.creatEmptyVector("String_Node_Str",4));
  this.AXIS_RECT.setData(FloatBuffer.wrap(new float[]{0,1,0,1}));
  this.colorAxis=colorAxis;
  this.colorAxis.addAxisListener(this);
}
Program: 11361
Project: 11361
Buggy source:
@Override public void begin(GlimpseContext context){
  GL3 gl=context.getGL().getGL3();
  this.useProgram(context.getGL(),true);
  if (this.handles == null) {
    this.handles=new ProgramHandles(gl,getShaderProgram().id());
  }
  gl.glEnableVertexAttribArray(this.handles.inXy);
  gl.glEnableVertexAttribArray(this.handles.inS);
}

Fixed version (ground truth):
@Override public void begin(GlimpseContext context,float xMin,float xMax,float yMin,float yMax){
  setOrtho(context,xMin,xMax,yMin,yMax);
  GL3 gl=context.getGL().getGL3();
  this.useProgram(context.getGL(),true);
  if (this.handles == null) {
    this.handles=new ProgramHandles(gl,getShaderProgram().id());
  }
  gl.glEnableVertexAttribArray(this.handles.inXy);
  gl.glEnableVertexAttribArray(this.handles.inS);
}
Program: 11362
Project: 11362
Buggy source:
@Override public void setOrtho(GlimpseContext context,float xMin,float xMax,float yMin,float yMax){
  this.AXIS_RECT.setData(FloatBuffer.wrap(new float[]{xMin,xMax,yMin,yMax}));
}

Fixed version (ground truth):
public void setOrtho(GlimpseContext context,float xMin,float xMax,float yMin,float yMax){
  this.AXIS_RECT.setData(FloatBuffer.wrap(new float[]{xMin,xMax,yMin,yMax}));
}
Program: 11363
Project: 11363
Buggy source:
@Override public void begin(GlimpseContext context){
  GL3 gl=context.getGL().getGL3();
  this.useProgram(context.getGL(),true);
  if (this.handles == null) {
    this.handles=new ProgramHandles(gl,getShaderProgram().id());
  }
  gl.glEnableVertexAttribArray(this.handles.inXy);
  gl.glEnableVertexAttribArray(this.handles.inS);
}

Fixed version (ground truth):
public void begin(GlimpseContext context){
  GL3 gl=context.getGL().getGL3();
  this.useProgram(context.getGL(),true);
  if (this.handles == null) {
    this.handles=new ProgramHandles(gl,getShaderProgram().id());
  }
  gl.glEnableVertexAttribArray(this.handles.inXy);
  gl.glEnableVertexAttribArray(this.handles.inS);
}
Program: 11364
Project: 11364
Buggy source:
@Override public void setOrtho(GlimpseContext context,float xMin,float xMax,float yMin,float yMax){
  GL3 gl=context.getGL().getGL3();
  gl.glUniform4f(this.handles.AXIS_RECT,xMin,xMax,yMin,yMax);
}

Fixed version (ground truth):
public void setOrtho(GlimpseContext context,float xMin,float xMax,float yMin,float yMax){
  GL3 gl=context.getGL().getGL3();
  gl.glUniform4f(this.handles.AXIS_RECT,xMin,xMax,yMin,yMax);
}
Program: 11365
Project: 11365
Buggy source:
@Override public void begin(GlimpseContext context){
  GL3 gl=context.getGL().getGL3();
  if (this.handles == null) {
    this.handles=new ProgramHandles(gl);
  }
  gl.glUseProgram(this.handles.program);
  gl.glEnableVertexAttribArray(this.handles.inXy);
  gl.glEnableVertexAttribArray(this.handles.inS);
}

Fixed version (ground truth):
public void begin(GlimpseContext context){
  GL3 gl=context.getGL().getGL3();
  if (this.handles == null) {
    this.handles=new ProgramHandles(gl);
  }
  gl.glUseProgram(this.handles.program);
  gl.glEnableVertexAttribArray(this.handles.inXy);
  gl.glEnableVertexAttribArray(this.handles.inS);
}
Program: 11366
Project: 11366
Buggy source:
@Override public void setOrtho(GlimpseContext context,float xMin,float xMax,float yMin,float yMax){
  GL3 gl=context.getGL().getGL3();
  gl.glUniform4f(this.handles.AXIS_RECT,xMin,xMax,yMin,yMax);
}

Fixed version (ground truth):
public void setOrtho(GlimpseContext context,float xMin,float xMax,float yMin,float yMax){
  GL3 gl=context.getGL().getGL3();
  gl.glUniform4f(this.handles.AXIS_RECT,xMin,xMax,yMin,yMax);
}
Program: 11367
Project: 11367
Buggy source:
@Override public void begin(GlimpseContext context){
  GL3 gl=context.getGL().getGL3();
  if (this.handles == null) {
    this.handles=new ProgramHandles(gl);
    gl.glUniform4f(this.handles.RGBA,1,1,1,1);
  }
  gl.glUseProgram(this.handles.program);
  gl.glEnableVertexAttribArray(this.handles.inXy);
  gl.glEnableVertexAttribArray(this.handles.inS);
}

Fixed version (ground truth):
@Override public void begin(GlimpseContext context,float xMin,float xMax,float yMin,float yMax){
  this.begin(context);
  this.setOrtho(context,xMin,xMax,yMin,yMax);
}
Program: 11368
Project: 11368
Buggy source:
@Override public void draw(GlimpseContext context,DrawableTextureProgram program,int texUnit,Collection<TextureUnit<Texture>> multiTextureList){
  boolean ready=prepare(context,texUnit);
  if (!ready) {
    logger.log(WARNING,"String_Node_Str");
    return;
  }
  for (  TextureUnit<Texture> texture : multiTextureList) {
    ready=texture.prepare(context);
    if (!ready) {
      logger.log(WARNING,"String_Node_Str");
      return;
    }
  }
  Axis2D axis=GlimpsePainterBase.getAxis2D(context);
  GL3 gl=GlimpsePainterBase.getGL3(context);
  program.setOrtho(context,(float)axis.getMinX(),(float)axis.getMaxX(),(float)axis.getMinY(),(float)axis.getMaxY());
  program.begin(context);
  try {
    for (int i=0; i < numTextures; i++) {
      for (      TextureUnit<Texture> multiTexture : multiTextureList) {
        Texture texture=multiTexture.getTexture();
        int[] handles=texture.getHandles();
        int multiTextureUnit=multiTexture.getTextureUnit();
        int type=getGLTextureDim(texture.getNumDimension());
        gl.glActiveTexture(getGLTextureUnit(multiTextureUnit));
        gl.glBindTexture(type,texture.getHandles()[i >= handles.length ? 0 : i]);
      }
      int type=getTextureType();
      gl.glActiveTexture(getGLTextureUnit(texUnit));
      gl.glBindTexture(type,textureHandles[i]);
      int vertexCount=VERTICES_PER_QUAD * texQuadCounts[i];
      program.draw(context,GL.GL_TRIANGLES,vertexCoordHandles[i],texCoordHandles[i],0,vertexCount);
    }
  }
  finally {
    program.end(context);
  }
}

Fixed version (ground truth):
@Override public void draw(GlimpseContext context,DrawableTextureProgram program,int texUnit,Collection<TextureUnit<Texture>> multiTextureList){
  boolean ready=prepare(context,texUnit);
  if (!ready) {
    logger.log(WARNING,"String_Node_Str");
    return;
  }
  for (  TextureUnit<Texture> texture : multiTextureList) {
    ready=texture.prepare(context);
    if (!ready) {
      logger.log(WARNING,"String_Node_Str");
      return;
    }
  }
  Axis2D axis=GlimpsePainterBase.getAxis2D(context);
  GL3 gl=GlimpsePainterBase.getGL3(context);
  program.begin(context,(float)axis.getMinX(),(float)axis.getMaxX(),(float)axis.getMinY(),(float)axis.getMaxY());
  try {
    for (int i=0; i < numTextures; i++) {
      for (      TextureUnit<Texture> multiTexture : multiTextureList) {
        Texture texture=multiTexture.getTexture();
        int[] handles=texture.getHandles();
        int multiTextureUnit=multiTexture.getTextureUnit();
        int type=getGLTextureDim(texture.getNumDimension());
        gl.glActiveTexture(getGLTextureUnit(multiTextureUnit));
        gl.glBindTexture(type,texture.getHandles()[i >= handles.length ? 0 : i]);
      }
      int type=getTextureType();
      gl.glActiveTexture(getGLTextureUnit(texUnit));
      gl.glBindTexture(type,textureHandles[i]);
      int vertexCount=VERTICES_PER_QUAD * texQuadCounts[i];
      program.draw(context,GL.GL_TRIANGLES,vertexCoordHandles[i],texCoordHandles[i],0,vertexCount);
    }
  }
  finally {
    program.end(context);
  }
}
Program: 11370
Project: 11370
Buggy source:
@Override public void doPaintTo(GlimpseContext context){
  Axis2D axis=getAxis2D(context);
  GL2 gl=context.getGL().getGL2();
  if (vertexCount == 0)   return;
  if (!constantSize && (sizeTexture == null))   return;
  if (!constantColor && (colorTexture == null))   return;
  if (!constantSize) {
    sizeTexture.prepare(gl,1);
  }
  if (!constantColor) {
    colorTexture.prepare(gl,0);
  }
  program.setProjectionMatrix(axis);
  GLUtils.enableStandardBlending(gl);
  program.useProgram(gl,true);
  try {
    drawArrays(gl);
  }
  finally {
    program.useProgram(gl,false);
    GLUtils.disableBlending(gl);
    gl.glActiveTexture(GL.GL_TEXTURE0);
  }
}

Fixed version (ground truth):
@Override public void doPaintTo(GlimpseContext context){
  Axis2D axis=getAxis2D(context);
  GL2 gl=context.getGL().getGL2();
  if (vertexCount == 0)   return;
  if (!constantSize && (sizeTexture == null))   return;
  if (!constantColor && (colorTexture == null))   return;
  if (!constantSize) {
    sizeTexture.prepare(context,1);
  }
  if (!constantColor) {
    colorTexture.prepare(context,0);
  }
  program.setProjectionMatrix(axis);
  GLUtils.enableStandardBlending(gl);
  program.useProgram(gl,true);
  try {
    drawArrays(gl);
  }
  finally {
    program.useProgram(gl,false);
    GLUtils.disableBlending(gl);
    gl.glActiveTexture(GL.GL_TEXTURE0);
  }
}
Program: 11371
Project: 11371
Buggy source:
public void useSizeAttribData(FloatBuffer attributeBuffer){
  lock.lock();
  try {
    this.program.setSizeData(attributeBuffer);
    this.setVariablePointColor0();
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
@Override public void useSizeAttribData(FloatBuffer attributeBuffer){
  painterLock.lock();
  try {
    this.program.setSizeData(attributeBuffer);
    this.setVariablePointColor0();
  }
  finally {
    painterLock.unlock();
  }
}
Program: 11372
Project: 11372
Buggy source:
/** 
 * Sets the selected range of times which will be displayed by this painter. Times should generally be provided via   {@code Epoch#fromTimeStamp(TimeStamp)}.
 */
public void displayTimeRange(double startTime,double endTime){
  lock.lock();
  try {
    this.startTime=(float)startTime;
    this.endTime=(float)endTime;
    updateSelectedTime();
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
/** 
 * Sets the selected range of times which will be displayed by this painter. Times should generally be provided via   {@code Epoch#fromTimeStamp(TimeStamp)}.
 */
public void displayTimeRange(double startTime,double endTime){
  painterLock.lock();
  try {
    this.startTime=(float)startTime;
    this.endTime=(float)endTime;
    updateSelectedTime();
  }
  finally {
    painterLock.unlock();
  }
}
Program: 11373
Project: 11373
Buggy source:
/** 
 * Assigns a time value to each point painted by the time painter. Points must be added in increasing time order for time selection to function.
 */
public void useTimeAttribData(FloatBuffer attributeBuffer){
  lock.lock();
  try {
    this.timeAttributeBuffer=attributeBuffer;
    this.updateSelectedTime();
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
/** 
 * Assigns a time value to each point painted by the time painter. Points must be added in increasing time order for time selection to function.
 */
public void useTimeAttribData(FloatBuffer attributeBuffer){
  painterLock.lock();
  try {
    this.timeAttributeBuffer=attributeBuffer;
    this.updateSelectedTime();
  }
  finally {
    painterLock.unlock();
  }
}
Program: 11374
Project: 11374
Buggy source:
public void useVertexPositionData(FloatBuffer positionBuffer){
  lock.lock();
  try {
    super.useVertexPositionData(positionBuffer);
    updateSelectedTime();
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
@Override public void useVertexPositionData(FloatBuffer positionBuffer){
  painterLock.lock();
  try {
    super.useVertexPositionData(positionBuffer);
    updateSelectedTime();
  }
  finally {
    painterLock.unlock();
  }
}
Program: 11375
Project: 11375
Buggy source:
public void useColorAttribData(FloatBuffer attributeBuffer){
  lock.lock();
  try {
    this.program.setColorData(attributeBuffer);
    this.setVariablePointColor0();
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
@Override public void useColorAttribData(FloatBuffer attributeBuffer){
  painterLock.lock();
  try {
    this.program.setColorData(attributeBuffer);
    this.setVariablePointColor0();
  }
  finally {
    painterLock.unlock();
  }
}
Program: 11376
Project: 11376
Buggy source:
public ColorXAxisPainter(AxisLabelHandler ticks){
  super(ticks);
  this.pathOutline=new LinePath();
  this.xyBuffer=new GLStreamingBufferBuilder();
  this.sBuffer=new GLStreamingBufferBuilder();
  this.style=new LineStyle();
  this.style.stippleEnable=false;
  this.style.thickness_PX=1.0f;
  this.style.feather_PX=0.0f;
  this.style.rgba=GlimpseColor.getBlack();
  setTickSize(this.colorBarSize + 0);
}

Fixed version (ground truth):
public ColorXAxisPainter(AxisLabelHandler ticks){
  super(ticks);
  this.pathOutline=new LinePath();
  this.xyBuffer=new GLStreamingBufferBuilder();
  this.sBuffer=new GLStreamingBufferBuilder();
  this.style=new LineStyle();
  this.style.joinType=LineJoinType.JOIN_MITER;
  this.style.stippleEnable=false;
  this.style.thickness_PX=1.0f;
  this.style.feather_PX=0.0f;
  this.style.rgba=GlimpseColor.getBlack();
  setTickSize(this.colorBarSize + 0);
}
Program: 11377
Project: 11377
Buggy source:
protected void paintColorScale(GlimpseContext context){
  if (colorTexture != null) {
    GlimpseBounds bounds=getBounds(context);
    GL3 gl=context.getGL().getGL3();
    int height=bounds.getHeight();
    int width=bounds.getWidth();
    float y1=getColorBarMinY(height);
    float y2=getColorBarMaxY(height);
    pathOutline.clear();
    pathOutline.addRectangle(0.5f,y1,width,y2);
    xyBuffer.clear();
    xyBuffer.addQuad2f(0.5f,y1,width,y2);
    sBuffer.clear();
    sBuffer.addQuad1f(0,0,1,1);
    GLUtils.enableStandardBlending(gl);
    try {
      progTex.begin(gl);
      try {
        progTex.setPixelOrtho(gl,bounds);
        progTex.draw(gl,colorTexture,xyBuffer,sBuffer);
      }
  finally {
        progTex.end(gl);
      }
      progOutline.begin(gl);
      try {
        progOutline.setPixelOrtho(gl,bounds);
        progOutline.setViewport(gl,bounds);
        progOutline.draw(gl,style,pathOutline);
      }
  finally {
        progOutline.end(gl);
      }
    }
  finally {
      GLUtils.disableBlending(gl);
    }
  }
}

Fixed version (ground truth):
protected void paintColorScale(GlimpseContext context){
  if (colorTexture != null) {
    GlimpseBounds bounds=getBounds(context);
    GL3 gl=context.getGL().getGL3();
    int height=bounds.getHeight();
    int width=bounds.getWidth();
    float y1=getColorBarMinY(height);
    float y2=getColorBarMaxY(height);
    float inset_PX=0.5f * style.thickness_PX;
    pathOutline.clear();
    pathOutline.addRectangle(inset_PX,y1,width - inset_PX,y2);
    xyBuffer.clear();
    xyBuffer.addQuad2f(inset_PX,y1,width - inset_PX,y2);
    sBuffer.clear();
    sBuffer.addQuad1f(0,0,1,1);
    GLUtils.enableStandardBlending(gl);
    try {
      progTex.begin(gl);
      try {
        progTex.setPixelOrtho(gl,bounds);
        progTex.draw(gl,colorTexture,xyBuffer,sBuffer);
      }
  finally {
        progTex.end(gl);
      }
      progOutline.begin(gl);
      try {
        progOutline.setPixelOrtho(gl,bounds);
        progOutline.setViewport(gl,bounds);
        progOutline.draw(gl,style,pathOutline);
      }
  finally {
        progOutline.end(gl);
      }
    }
  finally {
      GLUtils.disableBlending(gl);
    }
  }
}
Program: 11378
Project: 11378
Buggy source:
public ColorYAxisPainter(AxisLabelHandler ticks){
  super(ticks);
  this.pathOutline=new LinePath();
  this.xyBuffer=new GLStreamingBufferBuilder();
  this.sBuffer=new GLStreamingBufferBuilder();
  this.style=new LineStyle();
  this.style.stippleEnable=false;
  this.style.thickness_PX=1.0f;
  this.style.feather_PX=0.0f;
  this.style.rgba=GlimpseColor.getBlack();
  setTickSize(this.colorBarSize + 0);
}

Fixed version (ground truth):
public ColorYAxisPainter(AxisLabelHandler ticks){
  super(ticks);
  this.pathOutline=new LinePath();
  this.xyBuffer=new GLStreamingBufferBuilder();
  this.sBuffer=new GLStreamingBufferBuilder();
  this.style=new LineStyle();
  this.style.joinType=LineJoinType.JOIN_MITER;
  this.style.stippleEnable=false;
  this.style.thickness_PX=1.0f;
  this.style.feather_PX=0.0f;
  this.style.rgba=GlimpseColor.getBlack();
  setTickSize(this.colorBarSize + 0);
}
Program: 11379
Project: 11379
Buggy source:
protected void paintColorScale(GlimpseContext context){
  if (colorTexture != null) {
    GlimpseBounds bounds=getBounds(context);
    GL3 gl=context.getGL().getGL3();
    int height=bounds.getHeight();
    int width=bounds.getWidth();
    float x1=getColorBarMinX(width);
    float x2=getColorBarMaxX(width);
    pathOutline.clear();
    pathOutline.addRectangle(x1,0.5f,x2,height);
    xyBuffer.clear();
    xyBuffer.addQuad2f(x1,0.5f,x2,height);
    sBuffer.clear();
    sBuffer.addQuad1f(0,1,0,1);
    GLUtils.enableStandardBlending(gl);
    try {
      progTex.begin(gl);
      try {
        progTex.setPixelOrtho(gl,bounds);
        progTex.draw(gl,colorTexture,xyBuffer,sBuffer);
      }
  finally {
        progTex.end(gl);
      }
      progOutline.begin(gl);
      try {
        progOutline.setPixelOrtho(gl,bounds);
        progOutline.setViewport(gl,bounds);
        progOutline.draw(gl,style,pathOutline);
      }
  finally {
        progOutline.end(gl);
      }
    }
  finally {
      GLUtils.disableBlending(gl);
    }
  }
}

Fixed version (ground truth):
protected void paintColorScale(GlimpseContext context){
  if (colorTexture != null) {
    GlimpseBounds bounds=getBounds(context);
    GL3 gl=context.getGL().getGL3();
    int height=bounds.getHeight();
    int width=bounds.getWidth();
    float x1=getColorBarMinX(width);
    float x2=getColorBarMaxX(width);
    float inset_PX=0.5f * style.thickness_PX;
    pathOutline.clear();
    pathOutline.addRectangle(x1,inset_PX,x2,height - inset_PX);
    xyBuffer.clear();
    xyBuffer.addQuad2f(x1,inset_PX,x2,height - inset_PX);
    sBuffer.clear();
    sBuffer.addQuad1f(0,1,0,1);
    GLUtils.enableStandardBlending(gl);
    try {
      progTex.begin(gl);
      try {
        progTex.setPixelOrtho(gl,bounds);
        progTex.draw(gl,colorTexture,xyBuffer,sBuffer);
      }
  finally {
        progTex.end(gl);
      }
      progOutline.begin(gl);
      try {
        progOutline.setPixelOrtho(gl,bounds);
        progOutline.setViewport(gl,bounds);
        progOutline.draw(gl,style,pathOutline);
      }
  finally {
        progOutline.end(gl);
      }
    }
  finally {
      GLUtils.disableBlending(gl);
    }
  }
}
Program: 11380
Project: 11380
Buggy source:
@Override protected void paintColorScale(GlimpseContext context){
  Axis1D axis=getAxis1D(context);
  if (colorTexture != null && axis instanceof TaggedAxis1D) {
    TaggedAxis1D taggedAxis=(TaggedAxis1D)axis;
    GlimpseBounds bounds=getBounds(context);
    GL3 gl=context.getGL().getGL3();
    int height=bounds.getHeight();
    int width=bounds.getWidth();
    int count=updateCoordinateBuffers(gl,taggedAxis,width,height);
    float y1=getColorBarMinY(height);
    float y2=getColorBarMaxY(height);
    pathOutline.clear();
    pathOutline.addRectangle(0.5f,y1,width,y2);
    GLUtils.enableStandardBlending(gl);
    try {
      if (count > 0) {
        progTex.begin(gl);
        try {
          progTex.setPixelOrtho(gl,bounds);
          progTex.draw(gl,GL_TRIANGLES,colorTexture,vertexCoords,textureCoords,0,count);
        }
  finally {
          progTex.end(gl);
        }
      }
      progOutline.begin(gl);
      try {
        progOutline.setPixelOrtho(gl,bounds);
        progOutline.setViewport(gl,bounds);
        progOutline.draw(gl,style,pathOutline);
      }
  finally {
        progOutline.end(gl);
      }
    }
  finally {
      gl.glDisable(GL.GL_BLEND);
    }
  }
}

Fixed version (ground truth):
@Override protected void paintColorScale(GlimpseContext context){
  Axis1D axis=getAxis1D(context);
  if (colorTexture != null && axis instanceof TaggedAxis1D) {
    TaggedAxis1D taggedAxis=(TaggedAxis1D)axis;
    GlimpseBounds bounds=getBounds(context);
    GL3 gl=context.getGL().getGL3();
    int height=bounds.getHeight();
    int width=bounds.getWidth();
    int count=updateCoordinateBuffers(gl,taggedAxis,width,height);
    float y1=getColorBarMinY(height);
    float y2=getColorBarMaxY(height);
    float inset_PX=0.5f * style.thickness_PX;
    pathOutline.clear();
    pathOutline.addRectangle(inset_PX,y1,width - inset_PX,y2);
    GLUtils.enableStandardBlending(gl);
    try {
      if (count > 0) {
        progTex.begin(gl);
        try {
          progTex.setPixelOrtho(gl,bounds);
          progTex.draw(gl,GL_TRIANGLES,colorTexture,vertexCoords,textureCoords,0,count);
        }
  finally {
          progTex.end(gl);
        }
      }
      progOutline.begin(gl);
      try {
        progOutline.setPixelOrtho(gl,bounds);
        progOutline.setViewport(gl,bounds);
        progOutline.draw(gl,style,pathOutline);
      }
  finally {
        progOutline.end(gl);
      }
    }
  finally {
      gl.glDisable(GL.GL_BLEND);
    }
  }
}
Program: 11381
Project: 11381
Buggy source:
@Override protected void paintColorScale(GlimpseContext context){
  Axis1D axis=getAxis1D(context);
  if (colorTexture != null && axis instanceof TaggedAxis1D) {
    TaggedAxis1D taggedAxis=(TaggedAxis1D)axis;
    GlimpseBounds bounds=getBounds(context);
    GL3 gl=context.getGL().getGL3();
    int height=bounds.getHeight();
    int width=bounds.getWidth();
    int count=updateCoordinateBuffers(gl,taggedAxis,width,height);
    float x1=getColorBarMinX(width);
    float x2=getColorBarMaxX(width);
    pathOutline.clear();
    pathOutline.addRectangle(x1,0.5f,x2,height);
    GLUtils.enableStandardBlending(gl);
    try {
      if (count > 0) {
        progTex.begin(gl);
        try {
          progTex.setPixelOrtho(gl,bounds);
          progTex.draw(gl,GL_TRIANGLES,colorTexture,vertexCoords,textureCoords,0,count);
        }
  finally {
          progTex.end(gl);
        }
      }
      progOutline.begin(gl);
      try {
        progOutline.setPixelOrtho(gl,bounds);
        progOutline.setViewport(gl,bounds);
        progOutline.draw(gl,style,pathOutline);
      }
  finally {
        progOutline.end(gl);
      }
    }
  finally {
      gl.glDisable(GL.GL_BLEND);
    }
  }
}

Fixed version (ground truth):
@Override protected void paintColorScale(GlimpseContext context){
  Axis1D axis=getAxis1D(context);
  if (colorTexture != null && axis instanceof TaggedAxis1D) {
    TaggedAxis1D taggedAxis=(TaggedAxis1D)axis;
    GlimpseBounds bounds=getBounds(context);
    GL3 gl=context.getGL().getGL3();
    int height=bounds.getHeight();
    int width=bounds.getWidth();
    int count=updateCoordinateBuffers(gl,taggedAxis,width,height);
    float x1=getColorBarMinX(width);
    float x2=getColorBarMaxX(width);
    float inset_PX=0.5f * style.thickness_PX;
    pathOutline.clear();
    pathOutline.addRectangle(x1,inset_PX,x2,height - inset_PX);
    GLUtils.enableStandardBlending(gl);
    try {
      if (count > 0) {
        progTex.begin(gl);
        try {
          progTex.setPixelOrtho(gl,bounds);
          progTex.draw(gl,GL_TRIANGLES,colorTexture,vertexCoords,textureCoords,0,count);
        }
  finally {
          progTex.end(gl);
        }
      }
      progOutline.begin(gl);
      try {
        progOutline.setPixelOrtho(gl,bounds);
        progOutline.setViewport(gl,bounds);
        progOutline.draw(gl,style,pathOutline);
      }
  finally {
        progOutline.end(gl);
      }
    }
  finally {
      gl.glDisable(GL.GL_BLEND);
    }
  }
}
Program: 11382
Project: 11382
Buggy source:
public BorderPainter(){
  this.prog=new LineProgram();
  this.style=new LineStyle();
  this.style.feather_PX=0;
  this.style.stippleEnable=false;
  this.style.thickness_PX=1.0f;
  this.style.stipplePattern=(short)0x00FF;
  this.style.stippleScale=1;
  this.style.rgba=new float[]{0.5f,0.5f,0.5f,1.0f};
  this.path=new LinePath();
}

Fixed version (ground truth):
public BorderPainter(){
  this.prog=new LineProgram();
  this.style=new LineStyle();
  this.style.joinType=LineJoinType.JOIN_MITER;
  this.style.feather_PX=0;
  this.style.stippleEnable=false;
  this.style.thickness_PX=1.0f;
  this.style.stipplePattern=(short)0x00FF;
  this.style.stippleScale=1;
  this.style.rgba=new float[]{0.5f,0.5f,0.5f,1.0f};
  this.path=new LinePath();
}
Program: 11383
Project: 11383
Buggy source:
@Override protected void doPaintTo(GlimpseContext context){
  GL3 gl=context.getGL().getGL3();
  GlimpseBounds bounds=getBounds(context);
  int x=bounds.getX();
  int y=bounds.getY();
  int width=bounds.getWidth();
  int height=bounds.getHeight();
  GLUtils.enableStandardBlending(gl);
  prog.begin(gl);
  try {
    prog.setPixelOrtho(gl,bounds);
    prog.setViewport(gl,bounds);
    path.clear();
    if (drawBottom) {
      path.moveTo(x,y);
      path.lineTo(x + width,y);
    }
    if (drawRight) {
      path.moveTo(x + width,y);
      path.lineTo(x + width,y + height);
    }
    if (drawTop) {
      path.moveTo(x + width,y + height);
      path.lineTo(x,y + height);
    }
    if (drawLeft) {
      path.moveTo(x,y + height);
      path.lineTo(x,y);
    }
    prog.draw(gl,style,path);
  }
  finally {
    prog.end(gl);
    GLUtils.disableBlending(gl);
  }
}

Fixed version (ground truth):
@Override protected void doPaintTo(GlimpseContext context){
  GL3 gl=context.getGL().getGL3();
  GlimpseBounds bounds=getBounds(context);
  float inset_PX=0.5f * style.thickness_PX;
  float x=inset_PX;
  float y=inset_PX;
  float width=bounds.getWidth() - 2 * inset_PX;
  float height=bounds.getHeight() - 2 * inset_PX;
  GLUtils.enableStandardBlending(gl);
  prog.begin(gl);
  try {
    prog.setPixelOrtho(gl,bounds);
    prog.setViewport(gl,bounds);
    path.clear();
    if (drawBottom) {
      path.moveTo(x,y);
      path.lineTo(x + width,y);
    }
    if (drawRight) {
      path.moveTo(x + width,y);
      path.lineTo(x + width,y + height);
    }
    if (drawTop) {
      path.moveTo(x + width,y + height);
      path.lineTo(x,y + height);
    }
    if (drawLeft) {
      path.moveTo(x,y + height);
      path.lineTo(x,y);
    }
    prog.draw(gl,style,path);
  }
  finally {
    prog.end(gl);
    GLUtils.disableBlending(gl);
  }
}
Program: 11384
Project: 11384
Buggy source:
@Override public GlimpseLayout getLayout(){
  EmptyPlot2D plot=new EmptyPlot2D();
  plot.addPainter(new FpsPainter());
  return plot;
}

Fixed version (ground truth):
@Override public GlimpseLayout getLayout(){
  EmptyPlot2D plot=new EmptyPlot2D();
  plot.getAxis().set(0,500,0,500);
  plot.addPainter(new FillPainter());
  return plot;
}
Program: 11385
Project: 11385
Buggy source:
protected void paintColorScale(GlimpseContext context){
  if (colorTexture != null) {
    GlimpseBounds bounds=getBounds(context);
    GL3 gl=context.getGL().getGL3();
    int height=bounds.getHeight();
    int width=bounds.getWidth();
    float y1=getColorBarMinY(height);
    float y2=getColorBarMaxY(height);
    pathOutline.clear();
    pathOutline.lineTo(0.5f,y2);
    pathOutline.lineTo(0.5f,y1);
    pathOutline.lineTo(width,y1);
    pathOutline.lineTo(width,y2);
    pathOutline.lineTo(0.5f,y2);
    xyBuffer.clear();
    xyBuffer.addQuad2f(0.5f,y1,width,y2);
    sBuffer.clear();
    sBuffer.addQuad1f(0,0,1,1);
    GLUtils.enableStandardBlending(gl);
    try {
      progTex.begin(gl);
      try {
        progTex.setPixelOrtho(gl,bounds);
        progTex.draw(gl,colorTexture,xyBuffer,sBuffer);
      }
  finally {
        progTex.end(gl);
      }
      progOutline.begin(gl);
      try {
        progOutline.setPixelOrtho(gl,bounds);
        progOutline.setViewport(gl,bounds);
        progOutline.draw(gl,style,pathOutline);
      }
  finally {
        progOutline.end(gl);
      }
    }
  finally {
      gl.glDisable(GL.GL_BLEND);
    }
  }
}

Fixed version (ground truth):
protected void paintColorScale(GlimpseContext context){
  if (colorTexture != null) {
    GlimpseBounds bounds=getBounds(context);
    GL3 gl=context.getGL().getGL3();
    int height=bounds.getHeight();
    int width=bounds.getWidth();
    float y1=getColorBarMinY(height);
    float y2=getColorBarMaxY(height);
    pathOutline.clear();
    pathOutline.addRectangle(0.5f,y1,width,y2);
    xyBuffer.clear();
    xyBuffer.addQuad2f(0.5f,y1,width,y2);
    sBuffer.clear();
    sBuffer.addQuad1f(0,0,1,1);
    GLUtils.enableStandardBlending(gl);
    try {
      progTex.begin(gl);
      try {
        progTex.setPixelOrtho(gl,bounds);
        progTex.draw(gl,colorTexture,xyBuffer,sBuffer);
      }
  finally {
        progTex.end(gl);
      }
      progOutline.begin(gl);
      try {
        progOutline.setPixelOrtho(gl,bounds);
        progOutline.setViewport(gl,bounds);
        progOutline.draw(gl,style,pathOutline);
      }
  finally {
        progOutline.end(gl);
      }
    }
  finally {
      gl.glDisable(GL.GL_BLEND);
    }
  }
}
Program: 11386
Project: 11386
Buggy source:
protected void paintColorScale(GlimpseContext context){
  if (colorTexture != null) {
    GlimpseBounds bounds=getBounds(context);
    GL3 gl=context.getGL().getGL3();
    int height=bounds.getHeight();
    int width=bounds.getWidth();
    float x1=getColorBarMinX(width);
    float x2=getColorBarMaxX(width);
    pathOutline.clear();
    pathOutline.lineTo(x2,0.5f);
    pathOutline.lineTo(x1,0.5f);
    pathOutline.lineTo(x1,height);
    pathOutline.lineTo(x2,height);
    pathOutline.lineTo(x2,0.5f);
    xyBuffer.clear();
    xyBuffer.addQuad2f(x1,0.5f,x2,height);
    sBuffer.clear();
    sBuffer.addQuad1f(0,1,0,1);
    GLUtils.enableStandardBlending(gl);
    try {
      progTex.begin(gl);
      try {
        progTex.setPixelOrtho(gl,bounds);
        progTex.draw(gl,colorTexture,xyBuffer,sBuffer);
      }
  finally {
        progTex.end(gl);
      }
      progOutline.begin(gl);
      try {
        progOutline.setPixelOrtho(gl,bounds);
        progOutline.setViewport(gl,bounds);
        progOutline.draw(gl,style,pathOutline);
      }
  finally {
        progOutline.end(gl);
      }
    }
  finally {
      gl.glDisable(GL.GL_BLEND);
    }
  }
}

Fixed version (ground truth):
protected void paintColorScale(GlimpseContext context){
  if (colorTexture != null) {
    GlimpseBounds bounds=getBounds(context);
    GL3 gl=context.getGL().getGL3();
    int height=bounds.getHeight();
    int width=bounds.getWidth();
    float x1=getColorBarMinX(width);
    float x2=getColorBarMaxX(width);
    pathOutline.clear();
    pathOutline.addRectangle(x1,0.5f,x2,height);
    xyBuffer.clear();
    xyBuffer.addQuad2f(x1,0.5f,x2,height);
    sBuffer.clear();
    sBuffer.addQuad1f(0,1,0,1);
    GLUtils.enableStandardBlending(gl);
    try {
      progTex.begin(gl);
      try {
        progTex.setPixelOrtho(gl,bounds);
        progTex.draw(gl,colorTexture,xyBuffer,sBuffer);
      }
  finally {
        progTex.end(gl);
      }
      progOutline.begin(gl);
      try {
        progOutline.setPixelOrtho(gl,bounds);
        progOutline.setViewport(gl,bounds);
        progOutline.draw(gl,style,pathOutline);
      }
  finally {
        progOutline.end(gl);
      }
    }
  finally {
      gl.glDisable(GL.GL_BLEND);
    }
  }
}
Program: 11387
Project: 11387
Buggy source:
@Override protected void paintColorScale(GlimpseContext context){
  Axis1D axis=getAxis1D(context);
  if (colorTexture != null && axis instanceof TaggedAxis1D) {
    TaggedAxis1D taggedAxis=(TaggedAxis1D)axis;
    GlimpseBounds bounds=getBounds(context);
    GL3 gl=context.getGL().getGL3();
    int height=bounds.getHeight();
    int width=bounds.getWidth();
    int count=updateCoordinateBuffers(gl,taggedAxis,width,height);
    float y1=getColorBarMinY(height);
    float y2=getColorBarMaxY(height);
    pathOutline.clear();
    pathOutline.lineTo(0.5f,y2);
    pathOutline.lineTo(0.5f,y1);
    pathOutline.lineTo(width,y1);
    pathOutline.lineTo(width,y2);
    pathOutline.lineTo(0.5f,y2);
    GLUtils.enableStandardBlending(gl);
    try {
      if (count > 0) {
        progTex.begin(gl);
        try {
          progTex.setPixelOrtho(gl,bounds);
          progTex.draw(gl,GL_TRIANGLES,colorTexture,vertexCoords,textureCoords,0,count);
        }
  finally {
          progTex.end(gl);
        }
      }
      progOutline.begin(gl);
      try {
        progOutline.setPixelOrtho(gl,bounds);
        progOutline.setViewport(gl,bounds);
        progOutline.draw(gl,style,pathOutline);
      }
  finally {
        progOutline.end(gl);
      }
    }
  finally {
      gl.glDisable(GL.GL_BLEND);
    }
  }
}

Fixed version (ground truth):
@Override protected void paintColorScale(GlimpseContext context){
  Axis1D axis=getAxis1D(context);
  if (colorTexture != null && axis instanceof TaggedAxis1D) {
    TaggedAxis1D taggedAxis=(TaggedAxis1D)axis;
    GlimpseBounds bounds=getBounds(context);
    GL3 gl=context.getGL().getGL3();
    int height=bounds.getHeight();
    int width=bounds.getWidth();
    int count=updateCoordinateBuffers(gl,taggedAxis,width,height);
    float y1=getColorBarMinY(height);
    float y2=getColorBarMaxY(height);
    pathOutline.clear();
    pathOutline.addRectangle(0.5f,y1,width,y2);
    GLUtils.enableStandardBlending(gl);
    try {
      if (count > 0) {
        progTex.begin(gl);
        try {
          progTex.setPixelOrtho(gl,bounds);
          progTex.draw(gl,GL_TRIANGLES,colorTexture,vertexCoords,textureCoords,0,count);
        }
  finally {
          progTex.end(gl);
        }
      }
      progOutline.begin(gl);
      try {
        progOutline.setPixelOrtho(gl,bounds);
        progOutline.setViewport(gl,bounds);
        progOutline.draw(gl,style,pathOutline);
      }
  finally {
        progOutline.end(gl);
      }
    }
  finally {
      gl.glDisable(GL.GL_BLEND);
    }
  }
}
Program: 11388
Project: 11388
Buggy source:
@Override protected void paintColorScale(GlimpseContext context){
  Axis1D axis=getAxis1D(context);
  if (colorTexture != null && axis instanceof TaggedAxis1D) {
    TaggedAxis1D taggedAxis=(TaggedAxis1D)axis;
    GlimpseBounds bounds=getBounds(context);
    GL3 gl=context.getGL().getGL3();
    int height=bounds.getHeight();
    int width=bounds.getWidth();
    int count=updateCoordinateBuffers(gl,taggedAxis,width,height);
    float x1=getColorBarMinX(width);
    float x2=getColorBarMaxX(width);
    pathOutline.clear();
    pathOutline.lineTo(x2,0.5f);
    pathOutline.lineTo(x1,0.5f);
    pathOutline.lineTo(x1,height);
    pathOutline.lineTo(x2,height);
    pathOutline.lineTo(x2,0.5f);
    GLUtils.enableStandardBlending(gl);
    try {
      if (count > 0) {
        progTex.begin(gl);
        try {
          progTex.setPixelOrtho(gl,bounds);
          progTex.draw(gl,GL_TRIANGLES,colorTexture,vertexCoords,textureCoords,0,count);
        }
  finally {
          progTex.end(gl);
        }
      }
      progOutline.begin(gl);
      try {
        progOutline.setPixelOrtho(gl,bounds);
        progOutline.setViewport(gl,bounds);
        progOutline.draw(gl,style,pathOutline);
      }
  finally {
        progOutline.end(gl);
      }
    }
  finally {
      gl.glDisable(GL.GL_BLEND);
    }
  }
}

Fixed version (ground truth):
@Override protected void paintColorScale(GlimpseContext context){
  Axis1D axis=getAxis1D(context);
  if (colorTexture != null && axis instanceof TaggedAxis1D) {
    TaggedAxis1D taggedAxis=(TaggedAxis1D)axis;
    GlimpseBounds bounds=getBounds(context);
    GL3 gl=context.getGL().getGL3();
    int height=bounds.getHeight();
    int width=bounds.getWidth();
    int count=updateCoordinateBuffers(gl,taggedAxis,width,height);
    float x1=getColorBarMinX(width);
    float x2=getColorBarMaxX(width);
    pathOutline.clear();
    pathOutline.addRectangle(x1,0.5f,x2,height);
    GLUtils.enableStandardBlending(gl);
    try {
      if (count > 0) {
        progTex.begin(gl);
        try {
          progTex.setPixelOrtho(gl,bounds);
          progTex.draw(gl,GL_TRIANGLES,colorTexture,vertexCoords,textureCoords,0,count);
        }
  finally {
          progTex.end(gl);
        }
      }
      progOutline.begin(gl);
      try {
        progOutline.setPixelOrtho(gl,bounds);
        progOutline.setViewport(gl,bounds);
        progOutline.draw(gl,style,pathOutline);
      }
  finally {
        progOutline.end(gl);
      }
    }
  finally {
      gl.glDisable(GL.GL_BLEND);
    }
  }
}
Program: 11389
Project: 11389
Buggy source:
@Override public GlimpseLayout getLayout(){
}

Fixed version (ground truth):
@Override public GlimpseLayout getLayout(){
  EmptyPlot2D plot=new EmptyPlot2D();
  GlimpseAxisLayoutY layoutY=new GlimpseAxisLayoutY();
  TaggedPartialColorYAxisPainter painter=new TaggedPartialColorYAxisPainter(new GridAxisLabelHandler());
  TaggedAxis1D axis=new TaggedAxis1D();
  axis.addTag("String_Node_Str",0.0).setAttribute(Tag.TEX_COORD_ATTR,0.0f);
  axis.addTag("String_Node_Str",1.0).setAttribute(Tag.TEX_COORD_ATTR,0.9f);
  axis.addTag("String_Node_Str",2.0).setAttribute(Tag.TEX_COORD_ATTR,1.0f).setAttribute(Tag.TAG_COLOR_ATTR,GlimpseColor.getRed());
  layoutY.setAxis(axis);
  ColorTexture1D texture=new ColorTexture1D(1024);
  texture.setColorGradient(ColorGradients.prism);
  painter.setColorScale(texture);
  layoutY.addGlimpseMouseAllListener(new TaggedAxisMouseListener1D());
  layoutY.addPainter(painter);
  plot.addLayout(layoutY);
  plot.addPainter(new FillPainter());
  return plot;
}
Program: 11390
Project: 11390
Buggy source:
protected void paintColorScale(GlimpseContext context){
  if (colorTexture != null) {
    GlimpseBounds bounds=getBounds(context);
    GL3 gl=context.getGL().getGL3();
    int height=bounds.getHeight();
    int width=bounds.getWidth();
    float y1=getColorBarMinY(height);
    float y2=getColorBarMaxY(height);
    pathOutline.clear();
    pathOutline.addRectangle(0.5f,y1,width,y2);
    xyBuffer.clear();
    xyBuffer.addQuad2f(0.5f,y1,width,y2);
    sBuffer.clear();
    sBuffer.addQuad1f(0,0,1,1);
    GLUtils.enableStandardBlending(gl);
    try {
      progTex.begin(gl);
      try {
        progTex.setPixelOrtho(gl,bounds);
        progTex.draw(gl,colorTexture,xyBuffer,sBuffer);
      }
  finally {
        progTex.end(gl);
      }
      progOutline.begin(gl);
      try {
        progOutline.setPixelOrtho(gl,bounds);
        progOutline.setViewport(gl,bounds);
        progOutline.draw(gl,style,pathOutline);
      }
  finally {
        progOutline.end(gl);
      }
    }
  finally {
      gl.glDisable(GL.GL_BLEND);
    }
  }
}

Fixed version (ground truth):
protected void paintColorScale(GlimpseContext context){
  if (colorTexture != null) {
    GlimpseBounds bounds=getBounds(context);
    GL3 gl=context.getGL().getGL3();
    int height=bounds.getHeight();
    int width=bounds.getWidth();
    float y1=getColorBarMinY(height);
    float y2=getColorBarMaxY(height);
    pathOutline.clear();
    pathOutline.addRectangle(0.5f,y1,width,y2);
    xyBuffer.clear();
    xyBuffer.addQuad2f(0.5f,y1,width,y2);
    sBuffer.clear();
    sBuffer.addQuad1f(0,0,1,1);
    GLUtils.enableStandardBlending(gl);
    try {
      progTex.begin(gl);
      try {
        progTex.setPixelOrtho(gl,bounds);
        progTex.draw(gl,colorTexture,xyBuffer,sBuffer);
      }
  finally {
        progTex.end(gl);
      }
      progOutline.begin(gl);
      try {
        progOutline.setPixelOrtho(gl,bounds);
        progOutline.setViewport(gl,bounds);
        progOutline.draw(gl,style,pathOutline);
      }
  finally {
        progOutline.end(gl);
      }
    }
  finally {
      GLUtils.disableBlending(gl);
    }
  }
}