nus-yam/ex-repair huggingface dataset:
Program: 11391
Project: 11391
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 {
      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 {
      GLUtils.disableBlending(gl);
    }
  }
}
Program: 11393
Project: 11393
Buggy source:
public TaggedColorYAxisPainter(AxisLabelHandler ticks){
  super(ticks);
  this.tickBufferSize=10;
  this.tagXyVbo=new GLStreamingBuffer(GL_ARRAY_BUFFER,GL_DYNAMIC_DRAW,2);
  this.setTagColor0(GlimpseColor.fromColorRgba(0.0f,0.0f,0.0f,0.2f));
  this.tagStyle=new LineStyle();
  this.tagStyle.stippleEnable=false;
  this.tagStyle.feather_PX=0.0f;
}

Fixed version (ground truth):
public TaggedColorYAxisPainter(AxisLabelHandler ticks){
  super(ticks);
  this.tickBufferSize=10;
  this.tagXyVbo=new GLStreamingBuffer(GL_ARRAY_BUFFER,GL_DYNAMIC_DRAW,2);
  this.setTagColor0(GlimpseColor.fromColorRgba(0.0f,0.0f,0.0f,0.2f));
  this.tagStyle=new LineStyle();
  this.tagStyle.stippleEnable=false;
  this.tagStyle.feather_PX=0.9f;
}
Program: 11395
Project: 11395
Buggy source:
@Override public StackedTimePlot2D getLayout(){
  StackedTimePlot2D plot=createPlot();
  plot.getDefaultTimeline().setTimeZone(TimeZone.getDefault());
  Epoch epoch=plot.getEpoch();
  TimeStamp selectionMaxTime=epoch.getTimeStamp();
  TimeStamp selectionMinTime=selectionMaxTime.subtract(Time.fromHours(3));
  TimeStamp axisMaxTime=selectionMaxTime.add(Time.fromHours(1));
  TimeStamp axisMinTime=selectionMaxTime.subtract(Time.fromHours(20));
  plot.setTimeSelection(selectionMinTime,selectionMaxTime);
  plot.setTimeAxisBounds(axisMinTime,axisMaxTime);
  plot.setPlotSpacing(2);
  plot.setBorderSize(4);
  TimePlotInfo plot1=plot.createTimePlot("String_Node_Str");
  TimePlotInfo plot2=plot.createTimePlot("String_Node_Str");
  plot1.setLabelText("String_Node_Str");
  plot2.setLabelText("String_Node_Str");
  plot.setLabelSize(30);
  plot.setShowLabels(true);
  plot1.getLabelPainter().setHorizontalLabels(false);
  plot2.getLabelPainter().setHorizontalLabels(false);
  setChartData(plot1,epoch,axisMinTime,axisMaxTime);
  setChartData(plot2,epoch,axisMinTime,axisMaxTime);
  addMouseListener(epoch,plot1);
  addMouseListener(epoch,plot2);
  return plot;
}

Fixed version (ground truth):
@Override public StackedTimePlot2D getLayout(){
  StackedTimePlot2D plot=createPlot();
  plot.getDefaultTimeline().setTimeZone(TimeZone.getDefault());
  Epoch epoch=plot.getEpoch();
  TimeStamp selectionMinTime=epoch.getTimeStamp();
  TimeStamp selectionMaxTime=selectionMinTime.add(Time.fromHours(3));
  TimeStamp axisMinTime=selectionMinTime;
  TimeStamp axisMaxTime=selectionMaxTime.add(Time.fromHours(20));
  plot.setTimeSelection(selectionMinTime,selectionMaxTime);
  plot.setTimeAxisBounds(axisMinTime,axisMaxTime);
  plot.setPlotSpacing(2);
  plot.setBorderSize(4);
  TimePlotInfo plot1=plot.createTimePlot("String_Node_Str");
  TimePlotInfo plot2=plot.createTimePlot("String_Node_Str");
  plot1.setLabelText("String_Node_Str");
  plot2.setLabelText("String_Node_Str");
  plot.setLabelSize(30);
  plot.setShowLabels(true);
  plot1.getLabelPainter().setHorizontalLabels(false);
  plot2.getLabelPainter().setHorizontalLabels(false);
  setChartData(plot1,epoch,axisMinTime,axisMaxTime);
  setChartData(plot2,epoch,axisMinTime,axisMaxTime);
  addMouseListener(epoch,plot1);
  addMouseListener(epoch,plot2);
  return plot;
}
Program: 11396
Project: 11396
Buggy source:
@Override public StackedTimePlot2D getLayout(){
  StackedTimePlot2D plot=super.getLayout();
  final RelativeTimeAxisLabelHandler handler=new RelativeTimeAxisLabelHandler(plot.getEpoch().getTimeStamp().subtract(Time.fromDays(20)));
  plot.setTimeAxisLabelHandler(handler);
  new Thread(){
    @Override public void run(){
      while (true) {
        handler.setReferenceTime(handler.getReferenceTime().add(Time.fromSeconds(10)));
        try {
          Thread.sleep(10);
        }
 catch (        InterruptedException e) {
          e.printStackTrace();
        }
      }
    }
  }
.start();
  plot.setPlotSpacing(20);
  for (  TimePlotInfo info : plot.getAllTimePlots()) {
    info.getLabelPainter().setHorizontalLabels(true);
  }
  return plot;
}

Fixed version (ground truth):
@Override public StackedTimePlot2D getLayout(){
  StackedTimePlot2D plot=super.getLayout();
  final RelativeTimeAxisLabelHandler handler=new RelativeTimeAxisLabelHandler(plot.getEpoch().getTimeStamp().add(-Time.fromHours(100)));
  plot.setTimeAxisLabelHandler(handler);
  plot.setPlotSpacing(20);
  for (  TimePlotInfo info : plot.getAllTimePlots()) {
    info.getLabelPainter().setHorizontalLabels(true);
  }
  return plot;
}
Program: 11400
Project: 11400
Buggy source:
public RelativeTimeAxisLabelHandler(TimeStamp referenceTime){
  this.referenceTime=referenceTime;
  this.epoch=new Epoch(this.referenceTime);
}

Fixed version (ground truth):
public RelativeTimeAxisLabelHandler(TimeStamp referenceTime,boolean isFuturePositive){
  this.isFuturePositive=isFuturePositive;
  this.referenceTime=referenceTime;
  this.epoch=new Epoch(this.referenceTime);
}
Program: 11401
Project: 11401
Buggy source:
public void paintTo(GlimpseContext context,GlimpseBounds bounds,Axis2D axis){
  prog.setViewport(bounds);
  prog.setPixelOrtho(bounds);
  float xLeft_PX=(float)(0.5 * lineThickness_PX);
  float xRight_PX=(float)(bounds.getWidth() - 0.5 * lineThickness_PX);
  float yBottom_PX=(float)(0.5 * lineThickness_PX);
  float yTop_PX=(float)(bounds.getHeight() - 0.5 * lineThickness_PX);
  prog.vertices.seal(false);
  prog.vertices.clear();
  prog.vertices.addVertex(xLeft_PX,yBottom_PX);
  prog.vertices.addVertex(xRight_PX,yBottom_PX);
  prog.vertices.addVertex(xRight_PX,yTop_PX);
  prog.vertices.addVertex(xLeft_PX,yTop_PX);
  prog.vertices.addVertex(xLeft_PX,yBottom_PX);
  prog.vertices.seal(true);
  GL gl=context.getGL();
  prog.useProgram(gl,true);
  gl.glDrawArrays(GL_LINES,0,8);
  prog.useProgram(gl,false);
}

Fixed version (ground truth):
public void paintTo(GlimpseContext context,GlimpseBounds bounds,Axis2D axis){
  prog.setViewport(bounds);
  prog.setPixelOrtho(bounds);
  float xLeft_PX=(float)(0.5 * lineThickness_PX);
  float xRight_PX=(float)(bounds.getWidth() - 0.5 * lineThickness_PX);
  float yBottom_PX=(float)(0.5 * lineThickness_PX);
  float yTop_PX=(float)(bounds.getHeight() - 0.5 * lineThickness_PX);
  prog.vertices.seal(false);
  prog.vertices.clear();
  prog.vertices.addVertex(xLeft_PX,yBottom_PX);
  prog.vertices.addVertex(xRight_PX,yBottom_PX);
  prog.vertices.addVertex(xRight_PX,yTop_PX);
  prog.vertices.addVertex(xLeft_PX,yTop_PX);
  prog.vertices.addVertex(xLeft_PX,yBottom_PX);
  prog.vertices.seal(true);
  GL gl=context.getGL();
  gl.glBlendFuncSeparate(GL.GL_SRC_ALPHA,GL.GL_ONE_MINUS_SRC_ALPHA,GL.GL_ONE,GL.GL_ONE_MINUS_SRC_ALPHA);
  gl.glEnable(GL.GL_BLEND);
  prog.useProgram(gl,true);
  gl.glDrawArrays(GL_LINES,0,8);
  prog.useProgram(gl,false);
}
Program: 11403
Project: 11403
Buggy source:
protected boolean load(GL2ES2 gl,Collection<ShaderCode> codes){
  if (this.loaded)   return true;
  this.state=new ShaderState();
  this.state.setVerbose(true);
  this.program=new ShaderProgram();
  for (  ShaderCode code : codes) {
    boolean success=this.program.add(gl,code,System.err);
    GLErrorUtils.logGLError(logger,gl,"String_Node_Str" + code);
    GLErrorUtils.logGLShaderInfoLog(logger,gl,this.program.program(),"String_Node_Str");
    if (!success) {
      return false;
    }
  }
  this.state.attachShaderProgram(gl,this.program,true);
  GLErrorUtils.logGLError(logger,gl,"String_Node_Str");
  GLErrorUtils.logGLShaderInfoLog(logger,gl,this.program.program(),"String_Node_Str");
  for (  GLArrayData array : arrays) {
    this.state.ownAttribute(array,true);
    GLErrorUtils.logGLError(logger,gl,"String_Node_Str" + array.getName());
  }
  for (  GLUniformData uniform : uniforms) {
    this.state.ownUniform(uniform);
    GLErrorUtils.logGLError(logger,gl,"String_Node_Str" + uniform.getName());
  }
  this.loaded=true;
  return true;
}

Fixed version (ground truth):
protected boolean load(GL2ES2 gl,Collection<ShaderCode> codes){
  if (this.loaded)   return true;
  this.state=new ShaderState();
  this.state.setVerbose(true);
  this.program=new ShaderProgram();
  for (  ShaderCode code : codes) {
    boolean success=this.program.add(gl,code,System.err);
    GLErrorUtils.logGLError(logger,gl,"String_Node_Str" + code);
    GLErrorUtils.logGLShaderInfoLog(logger,gl,code.shader().get(0),"String_Node_Str");
    if (!success) {
      return false;
    }
  }
  this.state.attachShaderProgram(gl,this.program,true);
  GLErrorUtils.logGLError(logger,gl,"String_Node_Str");
  GLErrorUtils.logGLProgramInfoLog(logger,gl,this.program.program(),"String_Node_Str");
  for (  GLArrayData array : arrays) {
    this.state.ownAttribute(array,true);
    GLErrorUtils.logGLError(logger,gl,"String_Node_Str" + array.getName());
  }
  for (  GLUniformData uniform : uniforms) {
    this.state.ownUniform(uniform);
    GLErrorUtils.logGLError(logger,gl,"String_Node_Str" + uniform.getName());
  }
  this.loaded=true;
  return true;
}
Program: 11404
Project: 11404
Buggy source:
public static String getGLShaderInfoLog(GL2ES2 gl,int programObject){
  IntBuffer intValue=IntBuffer.allocate(1);
  gl.glGetShaderiv(programObject,GL_INFO_LOG_LENGTH,intValue);
  int lengthWithNull=intValue.get();
  if (lengthWithNull <= 1) {
    lengthWithNull=1000;
  }
  ByteBuffer infoLog=ByteBuffer.allocate(lengthWithNull);
  intValue.flip();
  gl.glGetShaderInfoLog(programObject,lengthWithNull,intValue,infoLog);
  int actualLength=intValue.get();
  byte[] infoBytes=new byte[actualLength];
  infoLog.get(infoBytes);
  return new String(infoBytes);
}

Fixed version (ground truth):
public static String getGLShaderInfoLog(GL2ES2 gl,int shaderObject){
  IntBuffer intValue=IntBuffer.allocate(1);
  gl.glGetShaderiv(shaderObject,GL_INFO_LOG_LENGTH,intValue);
  int lengthWithNull=intValue.get();
  if (lengthWithNull <= 1) {
    lengthWithNull=1000;
  }
  ByteBuffer infoLog=ByteBuffer.allocate(lengthWithNull);
  intValue.flip();
  gl.glGetShaderInfoLog(shaderObject,lengthWithNull,intValue,infoLog);
  int actualLength=intValue.get();
  byte[] infoBytes=new byte[actualLength];
  infoLog.get(infoBytes);
  return new String(infoBytes);
}
Program: 11405
Project: 11405
Buggy source:
public static void logGLShaderInfoLog(Logger logger,GL2ES2 gl,int programObject,String prefix){
  String log=getGLShaderInfoLog(gl,programObject);
  if (log != null && !log.isEmpty()) {
    logWarning(logger,"String_Node_Str",prefix,log);
  }
}

Fixed version (ground truth):
public static void logGLShaderInfoLog(Logger logger,GL2ES2 gl,int shaderObject,String prefix){
  String log=getGLShaderInfoLog(gl,shaderObject);
  if (log != null && !log.isEmpty()) {
    logWarning(logger,"String_Node_Str",prefix,log);
  }
}
Program: 11408
Project: 11408
Buggy source:
@Override public void mouseMoved(GlimpseMouseEvent e){
  if (!enabled)   return;
  if (e.isButtonDown(MouseButton.Button1) && dragEvent != null) {
    TimeStamp time=info.getTime(e);
    if (dragType == Location.Center) {
      double diff=time.durationAfter(anchorTime);
      dragEvent.setTimes(eventStart.add(diff),eventEnd.add(diff));
    }
 else     if (dragType == Location.End && eventStart.isBefore(time)) {
      dragEvent.setTimes(eventStart,time);
    }
 else     if (dragType == Location.Start && eventEnd.isAfter(time)) {
      dragEvent.setTimes(time,eventEnd);
    }
    e.setHandled(true);
  }
}

Fixed version (ground truth):
@Override public void mouseMoved(GlimpseMouseEvent e){
  if (!enabled)   return;
  if (e.isButtonDown(MouseButton.Button1) && dragEvent != null) {
    TimeStamp time=info.getTime(e);
    if (dragType == Location.Center) {
      double diff=time.durationAfter(anchorTime);
      dragEvent.setTimes(eventStart.add(diff),eventEnd.add(diff),false);
    }
 else     if (dragType == Location.End && eventStart.isBefore(time)) {
      dragEvent.setTimes(eventStart,time,false);
    }
 else     if (dragType == Location.Start && eventEnd.isAfter(time)) {
      dragEvent.setTimes(time,eventEnd,false);
    }
    e.setHandled(true);
  }
}
Program: 11409
Project: 11409
Buggy source:
@Override public boolean bind(DrawContext dc){
  GL gl=dc.getGL();
  gl.glBindTexture(GL2.GL_TEXTURE_2D,textureHandle);
  return true;
}

Fixed version (ground truth):
@Override public boolean bind(DrawContext dc){
  GL gl=dc.getGL();
  gl.glBindTexture(GL2.GL_TEXTURE_2D,textureHandle);
  gl.glTexParameterf(GL2.GL_TEXTURE_2D,GL2.GL_TEXTURE_MAG_FILTER,GL2.GL_LINEAR);
  gl.glTexParameterf(GL2.GL_TEXTURE_2D,GL2.GL_TEXTURE_MIN_FILTER,GL2.GL_LINEAR);
  gl.glTexParameterf(GL2.GL_TEXTURE_2D,GL2.GL_TEXTURE_WRAP_S,GL2.GL_CLAMP_TO_EDGE);
  gl.glTexParameterf(GL2.GL_TEXTURE_2D,GL2.GL_TEXTURE_WRAP_T,GL2.GL_CLAMP_TO_EDGE);
  gl.glBlendFuncSeparate(GL2.GL_SRC_ALPHA,GL2.GL_ONE_MINUS_SRC_ALPHA,GL2.GL_ONE,GL2.GL_ONE_MINUS_SRC_ALPHA);
  gl.glEnable(GL2.GL_BLEND);
  return true;
}
Program: 11410
Project: 11410
Buggy source:
public static void main(String[] args) throws Exception {
  try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  }
 catch (  UnsupportedLookAndFeelException e) {
  }
  SlippyTileExample slippy=new SlippyTileExample();
  Example example=Example.showWithSwing(slippy);
  example.getFrame().setJMenuBar(slippy.mapToolBar);
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  }
 catch (  UnsupportedLookAndFeelException e) {
  }
  SlippyTileExample slippy=new SlippyTileExample();
  Example example=Example.showWithSwing(slippy);
  SwingUtilities.invokeLater(() -> {
    example.getFrame().setJMenuBar(slippy.mapToolBar);
    example.getFrame().validate();
  }
);
}
Program: 11414
Project: 11414
Buggy source:
private static boolean intersect(final double[] outerBounds,final double[] bounds){
  return contains(outerBounds,bounds[0],bounds[2]) || contains(outerBounds,bounds[0],bounds[3]) || contains(outerBounds,bounds[1],bounds[2])|| contains(outerBounds,bounds[1],bounds[3]);
}

Fixed version (ground truth):
private static boolean intersect(final double[] outerBounds,final double[] bounds){
  return contains(outerBounds,bounds[0],bounds[2]) || contains(outerBounds,bounds[0],bounds[3]) || contains(outerBounds,bounds[1],bounds[2])|| contains(outerBounds,bounds[1],bounds[3])|| contains(bounds,outerBounds[0],outerBounds[2])|| contains(bounds,outerBounds[0],outerBounds[3])|| contains(bounds,outerBounds[1],outerBounds[2])|| contains(bounds,outerBounds[1],outerBounds[3]);
}
Program: 11415
Project: 11415
Buggy source:
@Override public void selectView(View view){
  if (view == selectedView)   return;
  if (selectedView != null) {
    ViewEntry viewEntry=viewMap.get(selectedView.viewId);
    viewEntry.tab.setSelected(false);
    cardPanel.setVisible(false);
  }
  if (view != null) {
    ViewEntry viewEntry=viewMap.get(view.viewId);
    viewEntry.tab.setSelected(true);
    cardLayout.show(cardPanel,view.viewId);
    cardPanel.setVisible(true);
  }
  selectedView=view;
  topBar.doLayout();
  topBar.repaint();
  for (  TileListener listener : listeners) {
    listener.selectedView(view);
  }
}

Fixed version (ground truth):
@Override public void selectView(View view){
  if (view == selectedView)   return;
  if (selectedView != null && viewMap.containsKey(selectedView.viewId)) {
    ViewEntry viewEntry=viewMap.get(selectedView.viewId);
    viewEntry.tab.setSelected(false);
    cardPanel.setVisible(false);
  }
  if (view != null) {
    ViewEntry viewEntry=viewMap.get(view.viewId);
    viewEntry.tab.setSelected(true);
    cardLayout.show(cardPanel,view.viewId);
    cardPanel.setVisible(true);
  }
  selectedView=view;
  topBar.doLayout();
  topBar.repaint();
  for (  TileListener listener : listeners) {
    listener.selectedView(view);
  }
}
Program: 11416
Project: 11416
Buggy source:
@Override public GlimpseContext getGlimpseContext(){
  GlimpseContext glimpseContext=new GlimpseContextImpl(getGLContext());
  glimpseContext.getTargetStack().push(this,effectiveGlimpseBounds);
  return glimpseContext;
}

Fixed version (ground truth):
@Override public GlimpseContext getGlimpseContext(){
  GlimpseContext glimpseContext=new GlimpseContextImpl(getGLContext(),getSurfaceScale());
  glimpseContext.getTargetStack().push(this,effectiveGlimpseBounds);
  return glimpseContext;
}
Program: 11418
Project: 11418
Buggy source:
@Override public StackedTimePlot2D getLayout(){
  StackedTimePlot2D plot=createPlot();
  plot.getDefaultTimeline().setTimeZone(TimeZone.getDefault());
  Epoch epoch=plot.getEpoch();
  TimeStamp selectionMaxTime=epoch.getTimeStamp();
  TimeStamp selectionMinTime=selectionMaxTime.subtract(Time.fromHours(3));
  TimeStamp axisMaxTime=selectionMaxTime.add(Time.fromHours(1));
  TimeStamp axisMinTime=selectionMaxTime.subtract(Time.fromHours(20));
  plot.setTimeSelection(selectionMinTime,selectionMaxTime);
  plot.setTimeAxisBounds(axisMinTime,axisMaxTime);
  plot.setPlotSpacing(2);
  plot.setBorderSize(4);
  TimePlotInfo plot1=plot.createTimePlot("String_Node_Str");
  TimePlotInfo plot2=plot.createTimePlot("String_Node_Str");
  plot1.setLabelText("String_Node_Str");
  plot2.setLabelText("String_Node_Str");
  plot.setLabelSize(30);
  plot.showLabels(true);
  plot1.getLabelPainter().setHorizontalLabels(false);
  plot2.getLabelPainter().setHorizontalLabels(false);
  setChartData(plot1,epoch,axisMinTime,axisMaxTime);
  setChartData(plot2,epoch,axisMinTime,axisMaxTime);
  addMouseListener(epoch,plot1);
  addMouseListener(epoch,plot2);
  return plot;
}

Fixed version (ground truth):
@Override public StackedTimePlot2D getLayout(){
  StackedTimePlot2D plot=createPlot();
  plot.getDefaultTimeline().setTimeZone(TimeZone.getDefault());
  Epoch epoch=plot.getEpoch();
  TimeStamp selectionMaxTime=epoch.getTimeStamp();
  TimeStamp selectionMinTime=selectionMaxTime.subtract(Time.fromHours(3));
  TimeStamp axisMaxTime=selectionMaxTime.add(Time.fromHours(1));
  TimeStamp axisMinTime=selectionMaxTime.subtract(Time.fromHours(20));
  plot.setTimeSelection(selectionMinTime,selectionMaxTime);
  plot.setTimeAxisBounds(axisMinTime,axisMaxTime);
  plot.setPlotSpacing(2);
  plot.setBorderSize(4);
  TimePlotInfo plot1=plot.createTimePlot("String_Node_Str");
  TimePlotInfo plot2=plot.createTimePlot("String_Node_Str");
  plot1.setLabelText("String_Node_Str");
  plot2.setLabelText("String_Node_Str");
  plot.setLabelSize(30);
  plot.setShowLabels(true);
  plot1.getLabelPainter().setHorizontalLabels(false);
  plot2.getLabelPainter().setHorizontalLabels(false);
  setChartData(plot1,epoch,axisMinTime,axisMaxTime);
  setChartData(plot2,epoch,axisMinTime,axisMaxTime);
  addMouseListener(epoch,plot1);
  addMouseListener(epoch,plot2);
  return plot;
}
Program: 11420
Project: 11420
Buggy source:
protected int getOverlayLayoutOffsetX2(){
  return 0;
}

Fixed version (ground truth):
public int getOverlayLayoutOffsetX2(){
  return 0;
}
Program: 11421
Project: 11421
Buggy source:
protected int getOverlayLayoutOffsetY(){
  return 0;
}

Fixed version (ground truth):
public int getOverlayLayoutOffsetY(){
  return 0;
}
Program: 11422
Project: 11422
Buggy source:
protected int getOverlayLayoutOffsetX(){
  return 0;
}

Fixed version (ground truth):
public int getOverlayLayoutOffsetX(){
  return 0;
}
Program: 11423
Project: 11423
Buggy source:
protected int getOverlayLayoutOffsetY2(){
  return 0;
}

Fixed version (ground truth):
public int getOverlayLayoutOffsetY2(){
  return 0;
}
Program: 11424
Project: 11424
Buggy source:
@Override protected void setRowColumnConstraints(){
  int tempIndentSize=getIndentSize();
  if (indentSubplots) {
    int maxLevel=setIndentLevel0();
    setRowColumnConstraints(maxLevel,tempIndentSize);
  }
 else {
    resetIndentLevel0(0);
    setRowColumnConstraints(0,tempIndentSize);
  }
}

Fixed version (ground truth):
@Override protected void setRowColumnConstraints(){
  int tempIndentSize=getIndentSize();
  if (this.indentSubplots) {
    this.maxLevel=setIndentLevel0() + 1;
    setRowColumnConstraints(maxLevel,tempIndentSize);
  }
 else {
    this.maxLevel=1;
    resetIndentLevel0(0);
    setRowColumnConstraints(0,tempIndentSize);
  }
}
Program: 11425
Project: 11425
Buggy source:
@Override protected int getOverlayLayoutOffsetX(){
  return orient == VERTICAL ? getLabelSize() : 0;
}

Fixed version (ground truth):
@Override public int getOverlayLayoutOffsetX(){
  return orient == VERTICAL ? getLabelSize() : 0;
}
Program: 11426
Project: 11426
Buggy source:
@Override protected int getOverlayLayoutOffsetY2(){
  return orient == VERTICAL ? 0 : getLabelSize();
}

Fixed version (ground truth):
@Override public int getOverlayLayoutOffsetY2(){
  return orient == VERTICAL ? 0 : getLabelSize();
}
Program: 11427
Project: 11427
Buggy source:
public void showLabels(boolean show){
  this.showLabelLayout=show;
  this.validateLayout();
}

Fixed version (ground truth):
/** 
 * Method name changed to be more consistent with other setters.
 * @deprecated {@link #setShowLabels(boolean)}
 */
public void showLabels(boolean show){
  this.setShowLabels(show);
}
Program: 11428
Project: 11428
Buggy source:
@Override protected void paintTo(GlimpseContext context,GlimpseBounds bounds){
  this.textDelegate.paintTo(context);
  int width=bounds.getWidth();
  int height=bounds.getHeight();
  GL2 gl=context.getGL().getGL2();
  gl.glMatrixMode(GL_PROJECTION);
  gl.glLoadIdentity();
  gl.glOrtho(0,bounds.getWidth(),0,bounds.getHeight(),-1,1);
  gl.glMatrixMode(GL_MODELVIEW);
  gl.glLoadIdentity();
  if (showDivider) {
    Rectangle2D textBounds=this.textDelegate.getTextBounds();
    float startY=(float)height / 2.0f;
    float startX=(float)(padding + this.textDelegate.getHorizontalPadding() + textBounds.getWidth()+ (textBounds.getMinX()) - 1);
    gl.glLineWidth(1.0f);
    GlimpseColor.glColor(gl,lineColor);
    gl.glBegin(GL2.GL_LINES);
    try {
      gl.glVertex2f(startX,startY);
      gl.glVertex2f(width,startY);
    }
  finally {
      gl.glEnd();
    }
  }
  if (showArrow) {
    float halfSize=buttonSize / 2.0f;
    float centerX=halfSize + padding;
    float centerY=height / 2.0f;
    gl.glBegin(GL2.GL_POLYGON);
    try {
      if (isExpanded) {
        gl.glVertex2f(centerX - halfSize,centerY + halfSize);
        gl.glVertex2f(centerX + halfSize,centerY + halfSize);
        gl.glVertex2f(centerX,centerY - halfSize);
      }
 else {
        gl.glVertex2f(centerX - halfSize,centerY - halfSize);
        gl.glVertex2f(centerX - halfSize,centerY + halfSize);
        gl.glVertex2f(centerX + halfSize,centerY);
      }
    }
  finally {
      gl.glEnd();
    }
  }
}

Fixed version (ground truth):
@Override protected void paintTo(GlimpseContext context,GlimpseBounds bounds){
  this.textDelegate.paintTo(context);
  int width=bounds.getWidth();
  int height=bounds.getHeight();
  GL2 gl=context.getGL().getGL2();
  gl.glMatrixMode(GL_PROJECTION);
  gl.glLoadIdentity();
  gl.glOrtho(0,bounds.getWidth(),0,bounds.getHeight(),-1,1);
  gl.glMatrixMode(GL_MODELVIEW);
  gl.glLoadIdentity();
  if (showDivider) {
    Rectangle2D textBounds=this.textDelegate.getTextBounds();
    float startY=(float)height / 2.0f;
    float startX=(float)(padding + this.textDelegate.getHorizontalPadding() + textBounds.getWidth()+ (textBounds.getMinX()) - 1);
    gl.glLineWidth(1.0f);
    GlimpseColor.glColor(gl,lineColor);
    gl.glBegin(GL2.GL_LINES);
    try {
      gl.glVertex2f(startX,startY);
      gl.glVertex2f(width,startY);
    }
  finally {
      gl.glEnd();
    }
  }
  if (showArrow) {
    gl.glLineWidth(1.0f);
    GlimpseColor.glColor(gl,lineColor);
    float halfSize=buttonSize / 2.0f;
    float centerX=halfSize + padding;
    float centerY=height / 2.0f;
    gl.glBegin(GL2.GL_POLYGON);
    try {
      if (isExpanded) {
        gl.glVertex2f(centerX - halfSize,centerY + halfSize);
        gl.glVertex2f(centerX + halfSize,centerY + halfSize);
        gl.glVertex2f(centerX,centerY - halfSize);
      }
 else {
        gl.glVertex2f(centerX - halfSize,centerY - halfSize);
        gl.glVertex2f(centerX - halfSize,centerY + halfSize);
        gl.glVertex2f(centerX + halfSize,centerY);
      }
    }
  finally {
      gl.glEnd();
    }
  }
}
Program: 11429
Project: 11429
Buggy source:
@Override public void updateLayout(int index){
  super.updateLayout(index);
  StackedTimePlot2D parent=getStackedTimePlot();
  int labelSize=parent.isShowLabels() ? parent.getLabelSize() : 0;
  if (parent.isTimeAxisHorizontal()) {
    plotLayout.setLayoutData("String_Node_Str");
    labelLayout.setLayoutData(String.format("String_Node_Str",labelSize));
    labelLayout.setVisible(parent.isShowLabels());
  }
 else {
    plotLayout.setLayoutData("String_Node_Str");
    labelLayout.setLayoutData(String.format("String_Node_Str",labelSize));
    labelLayout.setVisible(parent.isShowLabels());
  }
}

Fixed version (ground truth):
@Override public void updateLayout(int index){
  super.updateLayout(index);
  StackedTimePlot2D parent=getStackedTimePlot();
  int labelSize;
  if (parent instanceof CollapsibleTimePlot2D) {
    CollapsibleTimePlot2D collapsible=((CollapsibleTimePlot2D)parent);
    labelSize=(collapsible.getMaxLevel() - getIndentLevel()) * collapsible.getIndentSize();
  }
 else {
    labelSize=parent.isShowLabels() ? parent.getLabelSize() : 0;
  }
  if (parent.isTimeAxisHorizontal()) {
    plotLayout.setLayoutData("String_Node_Str");
    labelLayout.setLayoutData(String.format("String_Node_Str",labelSize));
    labelLayout.setVisible(parent.isShowLabels());
  }
 else {
    plotLayout.setLayoutData("String_Node_Str");
    labelLayout.setLayoutData(String.format("String_Node_Str",labelSize));
    labelLayout.setVisible(parent.isShowLabels());
  }
}
Program: 11430
Project: 11430
Buggy source:
@Override public void updateLayout(int index){
  super.updateLayout(index);
  if (timeLayout == null)   return;
  if (plot.isTimeAxisHorizontal()) {
    timeLayout.setLayoutData(String.format("String_Node_Str",plot.getLabelSize()));
  }
 else {
    timeLayout.setLayoutData(String.format("String_Node_Str",plot.getLabelSize()));
  }
}

Fixed version (ground truth):
@Override public void updateLayout(int index){
  super.updateLayout(index);
  if (timeLayout == null)   return;
  if (plot.isTimeAxisHorizontal()) {
    timeLayout.setLayoutData(String.format("String_Node_Str",plot.getOverlayLayoutOffsetX()));
  }
 else {
    timeLayout.setLayoutData(String.format("String_Node_Str",plot.getOverlayLayoutOffsetY2()));
  }
}
Program: 11431
Project: 11431
Buggy source:
public Collection<Axis1D> getAxis(TargetStackMatcher matcher){
  return this.cache.getMatching(matcher);
}

Fixed version (ground truth):
public synchronized Collection<Axis1D> getAxis(TargetStackMatcher matcher){
  return this.cache.getMatching(matcher);
}
Program: 11432
Project: 11432
Buggy source:
public void clearCache(){
  this.cache.clear();
  for (  GlimpseTarget target : getTargetChildren()) {
    if (target instanceof GlimpseAxisLayout1D) {
      GlimpseAxisLayout1D layout=(GlimpseAxisLayout1D)target;
      if (!layout.isAxisSet()) {
        layout.clearCache();
      }
    }
  }
}

Fixed version (ground truth):
public synchronized void clearCache(){
  for (  Axis1D axis : this.cache.getValues()) {
    axis.setParent(null);
  }
  this.cache.clear();
  for (  GlimpseTarget target : getTargetChildren()) {
    if (target instanceof GlimpseAxisLayout1D) {
      GlimpseAxisLayout1D layout=(GlimpseAxisLayout1D)target;
      if (!layout.isAxisSet()) {
        layout.clearCache();
      }
    }
  }
}
Program: 11433
Project: 11433
Buggy source:
public void setAxis(GlimpseContext context,Axis1D axis){
  cache.setValue(context,axis);
}

Fixed version (ground truth):
public synchronized void setAxis(GlimpseContext context,Axis1D axis){
  this.cache.setValue(context,axis);
}
Program: 11434
Project: 11434
Buggy source:
public Collection<Axis2D> getAxis(TargetStackMatcher matcher){
  return this.cache.getMatching(matcher);
}

Fixed version (ground truth):
public synchronized Collection<Axis2D> getAxis(TargetStackMatcher matcher){
  return this.cache.getMatching(matcher);
}
Program: 11435
Project: 11435
Buggy source:
public void clearCache(){
  this.cache.clear();
  for (  GlimpseTarget target : getTargetChildren()) {
    if (target instanceof GlimpseAxisLayout1D) {
      GlimpseAxisLayout1D layout=(GlimpseAxisLayout1D)target;
      if (!layout.isAxisSet()) {
        layout.clearCache();
      }
    }
 else     if (target instanceof GlimpseAxisLayout2D) {
      GlimpseAxisLayout2D layout=(GlimpseAxisLayout2D)target;
      if (!layout.isAxisSet()) {
        layout.clearCache();
      }
    }
  }
}

Fixed version (ground truth):
public synchronized void clearCache(){
  for (  Axis2D axis : this.cache.getValues()) {
    axis.setParent(null);
  }
  this.cache.clear();
  for (  GlimpseTarget target : getTargetChildren()) {
    if (target instanceof GlimpseAxisLayout1D) {
      GlimpseAxisLayout1D layout=(GlimpseAxisLayout1D)target;
      if (!layout.isAxisSet()) {
        layout.clearCache();
      }
    }
 else     if (target instanceof GlimpseAxisLayout2D) {
      GlimpseAxisLayout2D layout=(GlimpseAxisLayout2D)target;
      if (!layout.isAxisSet()) {
        layout.clearCache();
      }
    }
  }
}
Program: 11436
Project: 11436
Buggy source:
public void setAxis(GlimpseContext context,Axis2D axis){
  cache.setValue(context,axis);
}

Fixed version (ground truth):
public synchronized void setAxis(GlimpseContext context,Axis2D axis){
  this.cache.setValue(context,axis);
}
Program: 11437
Project: 11437
Buggy source:
protected Collection<PlotInfo> getTopPlots(){
  List<PlotInfo> plots=Lists.newArrayList();
  for (  PlotInfo plot : plot.getAllPlots()) {
    if (plot.getParent() == null) {
      plots.add(plot);
    }
  }
  return plots;
}

Fixed version (ground truth):
protected Collection<PlotInfo> getTopPlots(){
  List<PlotInfo> plots=Lists.newArrayList();
  for (  PlotInfo plot : this.plot.getAllPlots()) {
    if (plot.getParent() == null) {
      plots.add(plot);
    }
  }
  return plots;
}
Program: 11440
Project: 11440
Buggy source:
static FloatTexture2D setupTexture(){
  int n=200;
  double[] min=new double[]{-1,-1};
  double[] max=new double[]{1,1};
  FloatTexture2D data=new FloatTexture2D(min,max,n,n,false);
  return data;
}

Fixed version (ground truth):
static FloatTextureProjected2D setupTexture(){
  int n=200;
  FloatTextureProjected2D data=new FloatTextureProjected2D(n,n,false);
  data.setProjection(new FlatProjection(-1,1,-1,1));
  return data;
}
Program: 11441
Project: 11441
Buggy source:
@Override public void mutate(FloatBuffer data,double[] min,double[] max,int[] dim){
  data.clear();
  for (int i=0; i < dim[0]; i++)   for (int j=0; j < dim[1]; j++) {
    double x0=2 * PI * i / dim[0];
    double x1=2 * PI * j / dim[1];
    data.put((float)(1000 * (abs(sin(x0 + w * fr)) * (sin(x0 - w * fr) * sin(8 * x0 + w * fr) * cos(-8 * x1 - w * fr) + abs(sin(24 * x1)) / 3))));
  }
  fr++;
}

Fixed version (ground truth):
@Override public void mutate(FloatBuffer data,int dataSizeX,int dataSizeY){
  data.clear();
  for (int i=0; i < dataSizeX; i++)   for (int j=0; j < dataSizeY; j++) {
    double x0=2 * PI * i / dataSizeX;
    double x1=2 * PI * j / dataSizeY;
    data.put((float)(1000 * (abs(sin(x0 + w * fr)) * (sin(x0 - w * fr) * sin(8 * x0 + w * fr) * cos(-8 * x1 - w * fr) + abs(sin(24 * x1)) / 3))));
  }
  fr++;
}
Program: 11443
Project: 11443
Buggy source:
static MutatorFloat2D setupMutator(FloatTexture2D data){
  MutatorFloat2D editor=new MutatorFloat2D(){
    double w=2 * PI / 60;
    int fr=0;
    @Override public void mutate(    FloatBuffer data,    double[] min,    double[] max,    int[] dim){
      data.clear();
      for (int i=0; i < dim[0]; i++)       for (int j=0; j < dim[1]; j++) {
        double x0=2 * PI * i / dim[0];
        double x1=2 * PI * j / dim[1];
        data.put((float)(1000 * (abs(sin(x0 + w * fr)) * (sin(x0 - w * fr) * sin(8 * x0 + w * fr) * cos(-8 * x1 - w * fr) + abs(sin(24 * x1)) / 3))));
      }
      fr++;
    }
  }
;
  return editor;
}

Fixed version (ground truth):
static MutatorFloat2D setupMutator(FloatTextureProjected2D data){
  MutatorFloat2D editor=new MutatorFloat2D(){
    double w=2 * PI / 60;
    int fr=0;
    @Override public void mutate(    FloatBuffer data,    int dataSizeX,    int dataSizeY){
      data.clear();
      for (int i=0; i < dataSizeX; i++)       for (int j=0; j < dataSizeY; j++) {
        double x0=2 * PI * i / dataSizeX;
        double x1=2 * PI * j / dataSizeY;
        data.put((float)(1000 * (abs(sin(x0 + w * fr)) * (sin(x0 - w * fr) * sin(8 * x0 + w * fr) * cos(-8 * x1 - w * fr) + abs(sin(24 * x1)) / 3))));
      }
      fr++;
    }
  }
;
  return editor;
}
Program: 11444
Project: 11444
Buggy source:
@Override public void run(){
  FloatTexture2D data=setupTexture();
  MutatorFloat2D mutator=setupMutator(data);
  painter.addDrawableTexture(data,dataTextureUnit);
  while (true) {
    data.mutate(mutator);
    try {
      Thread.sleep(40);
    }
 catch (    InterruptedException e) {
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  FloatTextureProjected2D data=setupTexture();
  MutatorFloat2D mutator=setupMutator(data);
  painter.addDrawableTexture(data,dataTextureUnit);
  while (true) {
    data.mutate(mutator);
    try {
      Thread.sleep(40);
    }
 catch (    InterruptedException e) {
    }
  }
}
Program: 11445
Project: 11445
Buggy source:
@Override public GlimpseLayout getLayout() throws Exception {
  HeatMapExample example=new HeatMapExample(){
    @Override protected ColorAxisPlot2D newPlot(){
      return new ColorAxisPlot2D(){
        @Override protected GridAxisLabelHandler createLabelHandlerX(){
          return new WrappedLabelHandler();
        }
        @Override protected GridAxisLabelHandler createLabelHandlerY(){
          return new WrappedLabelHandler();
        }
        @Override protected Axis1D createAxisX(){
          return new WrappedAxis1D(0,1000);
        }
        @Override protected Axis1D createAxisY(){
          return new WrappedAxis1D(0,1000);
        }
      }
;
    }
  }
;
  ColorAxisPlot2D plot=example.getLayout();
  plot.getAxis().getAxisX().setMaxSpan(4000);
  plot.getAxis().getAxisY().setMaxSpan(4000);
  HeatMapPainter heatMapPainter=example.getPainter();
  plot.removePainter(heatMapPainter);
  WrappedPainter wrappedPainter=new WrappedPainter();
  wrappedPainter.addPainter(heatMapPainter);
  wrappedPainter.addPainter(new GlimpseDataPainter2D(){
    public void paintTo(    GL2 gl,    GlimpseBounds bounds,    Axis2D axis){
      gl.glColor4fv(GlimpseColor.getWhite(),0);
      gl.glPointSize(20f);
      gl.glBegin(GL.GL_POINTS);
      for (int x=0; x < 5; x++) {
        for (int y=0; y < 5; y++) {
          gl.glVertex2f(200 * (x + 0.5f),200 * (y + 0.5f));
        }
      }
      gl.glEnd();
    }
  }
);
  plot.addPainter(wrappedPainter);
  return plot;
}

Fixed version (ground truth):
@Override public GlimpseLayout getLayout() throws Exception {
  HeatMapExample example=new HeatMapExample(){
    @Override protected ColorAxisPlot2D newPlot(){
      return new ColorAxisPlot2D(){
        @Override protected GridAxisLabelHandler createLabelHandlerX(){
          return new WrappedLabelHandler();
        }
        @Override protected GridAxisLabelHandler createLabelHandlerY(){
          return new WrappedLabelHandler();
        }
        @Override protected Axis1D createAxisX(){
          return new WrappedAxis1D(0,1000);
        }
        @Override protected Axis1D createAxisY(){
          return new WrappedAxis1D(0,1000);
        }
      }
;
    }
  }
;
  ColorAxisPlot2D plot=example.getLayout();
  plot.getAxis().getAxisX().setMaxSpan(3000);
  plot.getAxis().getAxisY().setMaxSpan(3000);
  HeatMapPainter heatMapPainter=example.getPainter();
  plot.removePainter(heatMapPainter);
  WrappedPainter wrappedPainter=new WrappedPainter();
  wrappedPainter.addPainter(heatMapPainter);
  wrappedPainter.addPainter(new GlimpseDataPainter2D(){
    public void paintTo(    GL2 gl,    GlimpseBounds bounds,    Axis2D axis){
      gl.glColor4fv(GlimpseColor.getWhite(),0);
      gl.glPointSize(20f);
      gl.glBegin(GL.GL_POINTS);
      for (int x=0; x < 5; x++) {
        for (int y=0; y < 5; y++) {
          gl.glVertex2f(200 * (x + 0.5f),200 * (y + 0.5f));
        }
      }
      gl.glEnd();
    }
  }
);
  plot.addPainter(wrappedPainter);
  return plot;
}
Program: 11447
Project: 11447
Buggy source:
public static void setupScreenCapture(Example example){
  GlimpseCanvas canvas=example.getCanvas();
  ColorAxisPlot2D plot=(ColorAxisPlot2D)example.getLayout();
  plot.setTitleFont(FontUtils.getDefaultBold(18));
  plot.setTitle("String_Node_Str");
  final FBOGlimpseCanvas offscreenCanvas=new FBOGlimpseCanvas(canvas.getGLContext(),1000,1000);
  offscreenCanvas.addLayout(example.getLayout());
  GlimpseTargetStack stack=newTargetStack(offscreenCanvas);
  AxisFactory2D factory=new FixedAxisFactory2D(0,1000,0,1000);
  plot.setAxisFactory(new ConditionalAxisFactory2D(stack,factory));
  plot.addGlimpseMouseListener(new GlimpseMouseAdapter(){
    @Override public void mousePressed(    GlimpseMouseEvent event){
      if (event.isButtonDown(MouseButton.Button2)) {
        try {
          BufferedImage image=offscreenCanvas.toBufferedImage();
          ImageIO.write(image,"String_Node_Str",new File("String_Node_Str"));
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
    }
  }
);
}

Fixed version (ground truth):
public static void setupScreenCapture(Example example){
  GlimpseCanvas canvas=example.getCanvas();
  ColorAxisPlot2D plot=(ColorAxisPlot2D)example.getLayout();
  plot.setTitleFont(FontUtils.getDefaultBold(18));
  plot.setTitle("String_Node_Str");
  final FBOGlimpseCanvas offscreenCanvas=new FBOGlimpseCanvas(canvas.getGLContext(),1000,1000);
  offscreenCanvas.addLayout(example.getLayout());
  GlimpseTargetStack stack=newTargetStack(offscreenCanvas);
  AxisFactory2D factory=new FixedAxisFactory2D(0,1000,0,1000);
  plot.setAxisFactory(new ConditionalEndsWithAxisFactory2D(stack,factory));
  plot.addGlimpseMouseListener(new GlimpseMouseAdapter(){
    @Override public void mousePressed(    GlimpseMouseEvent event){
      if (event.isButtonDown(MouseButton.Button2)) {
        try {
          BufferedImage image=offscreenCanvas.toBufferedImage();
          ImageIO.write(image,"String_Node_Str",new File("String_Node_Str"));
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
    }
  }
);
}
Program: 11448
Project: 11448
Buggy source:
protected void setBounds(TimePlotInfo chart){
  Axis1D axis=chart.getLayout().getAxis().getAxisY();
  axis.setMin(-20.0);
  axis.setMax(20.0);
}

Fixed version (ground truth):
protected void setBounds(TimePlotInfo chart){
  Axis1D axis=chart.getBaseLayout().getAxis().getAxisY();
  axis.setMin(-20.0);
  axis.setMax(20.0);
}
Program: 11449
Project: 11449
Buggy source:
protected void axisUpdated0(Axis1D axis){
  this.updateMode=axis.getUpdateMode();
  this.lockMin=axis.isLockMin();
  this.lockMax=axis.isLockMax();
  this.lockMinValue=axis.getLockMin();
  this.lockMaxValue=axis.getLockMax();
  this.absoluteMin=axis.getAbsoluteMin();
  this.absoluteMax=axis.getAbsoluteMax();
  this.selectionCenterValue=axis.getSelectionCenter();
  this.selectionSizeValue=axis.getSelectionSize();
  this.selectionLocked=axis.isSelectionLocked();
  if (!this.isInitialized()) {
    this.minValue=axis.getMin();
    this.maxValue=axis.getMax();
    this.pixelsPerValue=axis.getPixelsPerValue();
  }
 else   if (this.updateMode == UpdateMode.MinScale) {
    this.minValue=axis.getMin();
    this.pixelsPerValue=axis.getPixelsPerValue();
    this.recalculateMaxValue0();
    this.applyConstraints();
  }
 else   if (this.updateMode == UpdateMode.CenterScale) {
    this.pixelsPerValue=axis.getPixelsPerValue();
    double centerValue=(axis.getMax() - axis.getMin()) / 2.0 + axis.getMin();
    this.recalculateMinMaxValue0(centerValue);
    this.applyConstraints();
  }
 else   if (this.updateMode == UpdateMode.MinMax) {
    this.minValue=axis.getMin();
    this.maxValue=axis.getMax();
    this.recalculatePixelsPerValue0();
    this.applyConstraints();
  }
 else   if (this.updateMode == UpdateMode.FixedPixel) {
  }
}

Fixed version (ground truth):
protected void axisUpdated0(Axis1D axis){
  this.updateMode=axis.getUpdateMode();
  this.minDiff=axis.getMinSpan();
  this.maxDiff=axis.getMaxSpan();
  this.constrainMinDiff=axis.isMinSpanConstrained();
  this.constrainMaxDiff=axis.isMaxSpanConstrained();
  this.lockMin=axis.isLockMin();
  this.lockMax=axis.isLockMax();
  this.lockMinValue=axis.getLockMin();
  this.lockMaxValue=axis.getLockMax();
  this.absoluteMin=axis.getAbsoluteMin();
  this.absoluteMax=axis.getAbsoluteMax();
  this.selectionCenterValue=axis.getSelectionCenter();
  this.selectionSizeValue=axis.getSelectionSize();
  this.selectionLocked=axis.isSelectionLocked();
  if (!this.isInitialized()) {
    this.minValue=axis.getMin();
    this.maxValue=axis.getMax();
    this.pixelsPerValue=axis.getPixelsPerValue();
  }
 else   if (this.updateMode == UpdateMode.MinScale) {
    this.minValue=axis.getMin();
    this.pixelsPerValue=axis.getPixelsPerValue();
    this.recalculateMaxValue0();
    this.applyConstraints();
  }
 else   if (this.updateMode == UpdateMode.CenterScale) {
    this.pixelsPerValue=axis.getPixelsPerValue();
    double centerValue=(axis.getMax() - axis.getMin()) / 2.0 + axis.getMin();
    this.recalculateMinMaxValue0(centerValue);
    this.applyConstraints();
  }
 else   if (this.updateMode == UpdateMode.MinMax) {
    this.minValue=axis.getMin();
    this.maxValue=axis.getMax();
    this.recalculatePixelsPerValue0();
    this.applyConstraints();
  }
 else   if (this.updateMode == UpdateMode.FixedPixel) {
  }
}
Program: 11450
Project: 11450
Buggy source:
protected void updateAspectRatio(Axis1D updated,double aspectRatio){
  if (!isInitialized())   return;
  double oldPixelsPerValue=getPixelsPerValue();
  double newPixelsPerValue=updated.getPixelsPerValue() * aspectRatio;
  this.minValue=recenterMinValue0(getSizePixels() / 2d,oldPixelsPerValue,newPixelsPerValue);
  this.pixelsPerValue=newPixelsPerValue;
  this.recalculateMaxValue0();
  this.applyConstraints();
}

Fixed version (ground truth):
protected void updateAspectRatio(Axis1D updated,double aspectRatio){
  double oldPixelsPerValue=getPixelsPerValue();
  double newPixelsPerValue=updated.getPixelsPerValue() * aspectRatio;
  this.minValue=recenterMinValue0(getSizePixels() / 2d,oldPixelsPerValue,newPixelsPerValue);
  this.pixelsPerValue=newPixelsPerValue;
  this.recalculateMaxValue0();
  this.applyConstraints();
}
Program: 11451
Project: 11451
Buggy source:
public void setParent(Axis1D newParent,boolean duplicateChild){
  if (this.parentAxis != null && newParent == null) {
    this.parentAxis.removeChildAxis(this);
  }
  this.parentAxis=newParent;
  if (this.parentAxis != null) {
    this.parentAxis.addChildAxis(this);
    if (!duplicateChild) {
      this.parentAxis.updateLinkedAxes();
    }
  }
  if (duplicateChild) {
    updateLinkedAxes();
  }
}

Fixed version (ground truth):
public void setParent(Axis1D newParent,boolean duplicateChild){
  if (this.parentAxis != null) {
    this.parentAxis.removeChildAxis(this);
  }
  this.parentAxis=newParent;
  if (this.parentAxis != null) {
    this.parentAxis.addChildAxis(this);
    if (!duplicateChild) {
      this.parentAxis.updateLinkedAxes();
    }
  }
  if (duplicateChild) {
    updateLinkedAxes();
  }
}
Program: 11452
Project: 11452
Buggy source:
/** 
 * Should be called once axisSizePixels has been properly set (usually once the underlying canvas associated with this Axis1D has been drawn).
 */
public void setInitialized(){
  if (!this.initialized && this.axisSizePixels > 0) {
    this.initialized=true;
    this.requestAxisUpdateUp();
  }
}

Fixed version (ground truth):
/** 
 * Should be called once axisSizePixels has been properly set (usually once the underlying canvas associated with this Axis1D has been drawn).
 */
public void setInitialized(){
  if (!this.initialized && this.axisSizePixels > 0) {
    this.initialized=true;
    this.broadcastAxisUpdateUp();
  }
}
Program: 11453
Project: 11453
Buggy source:
protected void initialize(Axis1D parent){
  this.children=new CopyOnWriteArrayList<Axis1D>();
  this.listeners=new CopyOnWriteArrayList<AxisListener1D>();
  this.setDefaults();
  this.setParent(parent);
}

Fixed version (ground truth):
protected void initialize(Axis1D parent){
  this.children=new CopyOnWriteArraySet<Axis1D>();
  this.listeners=new CopyOnWriteArraySet<AxisListener1D>();
  this.setDefaults();
  this.setParent(parent);
}
Program: 11454
Project: 11454
Buggy source:
@Override public String[] getTickLabels(Axis1D axis,double[] tickPositions){
  String[] tickLabels=new String[tickPositions.length];
  for (int i=0; i < tickPositions.length; i++) {
    double value=tickPositions[i];
    if (zoomedIn) {
      value-=baseValue;
      value/=pow(10,orderDelta);
    }
 else {
      value/=pow(10,orderAxis);
    }
    String s=format("String_Node_Str",value);
    if (tickPositions[i] < 0) {
      s=s.substring(0,6);
    }
 else {
      s=s.substring(0,5);
    }
    tickLabels[i]=s;
  }
  return tickLabels;
}

Fixed version (ground truth):
@Override public String[] getTickLabels(Axis1D axis,double[] tickPositions){
  String[] tickLabels=new String[tickPositions.length];
  for (int i=0; i < tickPositions.length; i++) {
    double value=tickPositions[i];
    if (zoomedIn) {
      value-=baseValue;
      value/=pow(10,orderDelta);
    }
 else {
      value/=pow(10,orderAxis);
    }
    String s=format("String_Node_Str",value);
    if (value < 0) {
      s=s.substring(0,6);
    }
 else {
      s=s.substring(0,5);
    }
    tickLabels[i]=s;
  }
  return tickLabels;
}
Program: 11455
Project: 11455
Buggy source:
@Override public Axis1D getCommonAxis(){
  return parent.getCommonAxis(layout.getAxis());
}

Fixed version (ground truth):
@Override public Axis1D getCommonAxis(){
  return parent.getCommonAxis(this.layout.getAxis());
}
Program: 11456
Project: 11456
Buggy source:
@Override public Axis1D getOrthogonalAxis(){
  return parent.getOrthogonalAxis(layout.getAxis());
}

Fixed version (ground truth):
@Override public Axis1D getOrthogonalAxis(){
  return parent.getOrthogonalAxis(this.layout.getAxis());
}
Program: 11457
Project: 11457
Buggy source:
protected Axis1D getCommonAxis(Axis2D axis){
  return orient == HORIZONTAL ? axis.getAxisY() : axis.getAxisX();
}

Fixed version (ground truth):
public Axis1D getCommonAxis(Axis2D axis){
  return orient == HORIZONTAL ? axis.getAxisY() : axis.getAxisX();
}