nus-yam/ex-repair huggingface dataset:
Program: 58051
Project: 58051
Buggy source:
private void renderBackground(GL2 gl){
  int pickingID=glVisBricks.getPickingManager().getPickingID(glVisBricks.getID(),EPickingType.DIMENSION_GROUP_SPACER,ID);
  float avoidDragHandle=0;
  if (isVertical)   avoidDragHandle=glVisBricks.getParentGLCanvas().getPixelGLConverter().getGLWidthForPixelWidth(20);
  gl.glPushName(pickingID);
  gl.glColor4f(1,1,0,0.3f);
  gl.glBegin(GL2.GL_POLYGON);
  gl.glVertex2f(0,0);
  gl.glVertex2f(x - avoidDragHandle,0);
  gl.glVertex2f(x - avoidDragHandle,y);
  gl.glVertex2f(0,y);
  gl.glEnd();
  gl.glPopName();
}

Fixed version (ground truth):
private void renderBackground(GL2 gl){
  int pickingID=glVisBricks.getPickingManager().getPickingID(glVisBricks.getID(),EPickingType.DIMENSION_GROUP_SPACER,ID);
  float avoidDragHandle=0;
  gl.glPushName(pickingID);
  gl.glColor4f(1,1,0,0.3f);
  gl.glBegin(GL2.GL_POLYGON);
  gl.glVertex2f(0,0);
  gl.glVertex2f(x - avoidDragHandle,0);
  gl.glVertex2f(x - avoidDragHandle,y);
  gl.glVertex2f(0,y);
  gl.glEnd();
  gl.glPopName();
}
Program: 58052
Project: 58052
Buggy source:
@Override public void replaceContentVA(int setID,String dataDomainType,String vaType){
  if (set.getID() == setID) {
    topCol.clear();
    topBricks.clear();
    bottomCol.clear();
    bottomBricks.clear();
    createSubBricks();
    topCol.updateSubLayout();
    bottomCol.updateSubLayout();
    visBricks.initiConnectionLinesBetweenDimensionGroups();
  }
}

Fixed version (ground truth):
@Override public void replaceContentVA(int setID,String dataDomainType,String vaType){
  if (set.getID() == setID) {
    topCol.clear();
    topBricks.clear();
    bottomCol.clear();
    bottomBricks.clear();
    createSubBricks();
    groupColumn.updateSubLayout();
    visBricks.initiConnectionLinesBetweenDimensionGroups();
  }
}
Program: 58053
Project: 58053
Buggy source:
/** 
 * Get the unscalable height part of this layout
 * @return
 */
float getUnscalableElementWidth(){
  if (pixelSizeX != Integer.MIN_VALUE)   return pixelGLConverter.getGLWidthForPixelWidth(pixelSizeX);
 else   if (!Float.isNaN(absoluteSizeX))   return absoluteSizeX;
 else   return 0;
}

Fixed version (ground truth):
/** 
 * Get the unscalable height part of this layout
 * @return
 */
float getUnscalableElementWidth(){
  if (grabX)   return 0;
 else   if (pixelSizeX != Integer.MIN_VALUE)   return pixelGLConverter.getGLWidthForPixelWidth(pixelSizeX);
 else   if (!Float.isNaN(absoluteSizeX))   return absoluteSizeX;
 else   return 0;
}
Program: 58054
Project: 58054
Buggy source:
/** 
 * Get the unscalable height part of this layout
 * @return
 */
float getUnscalableElementHeight(){
  if (pixelSizeY != Integer.MIN_VALUE)   return pixelGLConverter.getGLHeightForPixelHeight(pixelSizeY);
 else   if (!Float.isNaN(absoluteSizeY))   return absoluteSizeY;
 else   return 0;
}

Fixed version (ground truth):
/** 
 * Get the unscalable height part of this layout
 * @return
 */
float getUnscalableElementHeight(){
  if (grabY)   return 0;
 else   if (pixelSizeY != Integer.MIN_VALUE)   return pixelGLConverter.getGLHeightForPixelHeight(pixelSizeY);
 else   if (!Float.isNaN(absoluteSizeY))   return absoluteSizeY;
 else   return 0;
}
Program: 58056
Project: 58056
Buggy source:
public DimensionGroup(GLCaleydoCanvas canvas,ViewFrustum viewFrustum){
  super(canvas,viewFrustum,true);
  groupColumn=new Column("String_Node_Str");
  groupColumn.setXDynamic(true);
  bottomCol=new Column("String_Node_Str");
  bottomCol.setFrameColor(1,0,1,1);
  bottomCol.setBottomUp(false);
  bottomCol.setXDynamic(true);
  bottomCol.setIDs(uniqueID,BOTTOM_COLUMN_ID);
  bottomBricks=new ArrayList<GLBrick>(20);
  centerLayout=new Column("String_Node_Str");
  centerLayout.setFrameColor(1,1,0,1);
  centerLayout.setDebug(true);
  topCol=new Column("String_Node_Str");
  topCol.setFrameColor(1,0,1,1);
  topBricks=new ArrayList<GLBrick>(20);
  topCol.setXDynamic(true);
  topCol.setIDs(uniqueID,TOP_COLUMN_ID);
  initGroupColumn();
}

Fixed version (ground truth):
public DimensionGroup(GLCaleydoCanvas canvas,ViewFrustum viewFrustum){
  super(canvas,viewFrustum,true);
  groupColumn=new Column("String_Node_Str");
  groupColumn.setDebug(true);
  groupColumn.setXDynamic(true);
  bottomCol=new Column("String_Node_Str");
  bottomCol.setFrameColor(1,0,1,1);
  bottomCol.setBottomUp(false);
  bottomCol.setXDynamic(true);
  bottomCol.setIDs(uniqueID,BOTTOM_COLUMN_ID);
  bottomBricks=new ArrayList<GLBrick>(20);
  centerLayout=new Column("String_Node_Str");
  centerLayout.setFrameColor(1,1,0,1);
  topCol=new Column("String_Node_Str");
  topCol.setFrameColor(1,0,1,1);
  topBricks=new ArrayList<GLBrick>(20);
  topCol.setXDynamic(true);
  topCol.setIDs(uniqueID,TOP_COLUMN_ID);
  initGroupColumn();
}
Program: 58057
Project: 58057
Buggy source:
private void renderFlexibleArch(GL2 gl){
  float leftCenterBrickTop=0;
  float leftCenterBrickBottom=0;
  float rightCenterBrickTop=0;
  float rightCenterBrickBottom=0;
  float curveOffset=0.4f;
  if (leftDimGroup != null) {
    GLBrick leftCenterBrick=leftDimGroup.getCenterBrick();
    ElementLayout layout=leftCenterBrick.getWrappingLayout();
    leftCenterBrickBottom=layout.getTranslateY();
    leftCenterBrickTop=layout.getTranslateY() + layout.getSizeScaledX();
  }
 else {
    if (rightDimGroup != null) {
      leftCenterBrickBottom=rightDimGroup.getVisBricksView().getArchBottomY();
      leftCenterBrickTop=rightDimGroup.getVisBricksView().getArchTopY();
      curveOffset=0.1f;
    }
  }
  if (rightDimGroup != null) {
    GLBrick rightCenterBrick=rightDimGroup.getCenterBrick();
    ElementLayout layout=rightCenterBrick.getWrappingLayout();
    rightCenterBrickBottom=layout.getTranslateY();
    rightCenterBrickTop=layout.getTranslateY() + layout.getSizeScaledX();
  }
 else {
    if (leftDimGroup != null) {
      rightCenterBrickBottom=leftDimGroup.getVisBricksView().getArchBottomY();
      rightCenterBrickTop=leftDimGroup.getVisBricksView().getArchTopY();
      curveOffset=0.1f;
    }
  }
  if (leftCenterBrickBottom == 0 && rightCenterBrickBottom == 0)   return;
  connectionRenderer.renderSingleBand(gl,new float[]{0,leftCenterBrickTop,0},new float[]{0,leftCenterBrickBottom,0},new float[]{x,rightCenterBrickTop,0},new float[]{x,rightCenterBrickBottom,0},false,curveOffset,0,false,new float[]{0,0,0},0.5f);
}

Fixed version (ground truth):
private void renderFlexibleArch(GL2 gl){
  float leftCenterBrickTop=0;
  float leftCenterBrickBottom=0;
  float rightCenterBrickTop=0;
  float rightCenterBrickBottom=0;
  float curveOffset=0.4f;
  if (leftDimGroup != null) {
    GLBrick leftCenterBrick=leftDimGroup.getCenterBrick();
    ElementLayout layout=leftCenterBrick.getWrappingLayout();
    leftCenterBrickBottom=layout.getTranslateY();
    leftCenterBrickTop=layout.getTranslateY() + layout.getSizeScaledY();
  }
 else {
    if (rightDimGroup != null) {
      leftCenterBrickBottom=rightDimGroup.getVisBricksView().getArchBottomY();
      leftCenterBrickTop=rightDimGroup.getVisBricksView().getArchTopY();
      curveOffset=0.1f;
    }
  }
  if (rightDimGroup != null) {
    GLBrick rightCenterBrick=rightDimGroup.getCenterBrick();
    ElementLayout layout=rightCenterBrick.getWrappingLayout();
    rightCenterBrickBottom=layout.getTranslateY();
    rightCenterBrickTop=layout.getTranslateY() + layout.getSizeScaledY();
  }
 else {
    if (leftDimGroup != null) {
      rightCenterBrickBottom=leftDimGroup.getVisBricksView().getArchBottomY();
      rightCenterBrickTop=leftDimGroup.getVisBricksView().getArchTopY();
      curveOffset=0.1f;
    }
  }
  if (leftCenterBrickBottom == 0 && rightCenterBrickBottom == 0)   return;
  connectionRenderer.renderSingleBand(gl,new float[]{0,leftCenterBrickTop,0},new float[]{0,leftCenterBrickBottom,0},new float[]{x,rightCenterBrickTop,0},new float[]{x,rightCenterBrickBottom,0},false,curveOffset,0,false,new float[]{0,0,0},0.5f);
}
Program: 58058
Project: 58058
Buggy source:
@Override protected void calculateTransforms(float bottom,float left,float top,float right){
  super.calculateTransforms(bottom,left,top,right);
  float x;
  if (isLeftToRight)   x=left;
 else   x=right;
  for (  ElementLayout element : elements) {
    if (isBottomUp) {
      if (element instanceof LayoutContainer) {
        ((LayoutContainer)element).calculateTransforms(bottom,left,top,right);
      }
      element.setTranslateX(x);
      element.setTranslateY(bottom);
      bottom+=element.getSizeScaledY();
    }
 else {
      bottom=top - element.getSizeScaledY();
      if (element instanceof LayoutContainer) {
        ((LayoutContainer)element).calculateTransforms(bottom,left,top,right);
      }
      top-=element.getSizeScaledY();
      element.setTranslateX(x);
      element.setTranslateY(top);
    }
  }
}

Fixed version (ground truth):
@Override protected void calculateTransforms(float bottom,float left,float top,float right){
  super.calculateTransforms(bottom,left,top,right);
  float x;
  if (isLeftToRight)   x=left;
 else   x=right;
  for (  ElementLayout element : elements) {
    if (isBottomUp) {
      if (element instanceof LayoutContainer) {
        ((LayoutContainer)element).calculateTransforms(bottom,left,bottom + element.getSizeScaledY(),right);
      }
      element.setTranslateX(x);
      element.setTranslateY(bottom);
      bottom+=element.getSizeScaledY();
    }
 else {
      bottom=top - element.getSizeScaledY();
      if (element instanceof LayoutContainer) {
        ((LayoutContainer)element).calculateTransforms(bottom,left,top,right);
      }
      top-=element.getSizeScaledY();
      element.setTranslateX(x);
      element.setTranslateY(bottom);
    }
  }
}
Program: 58059
Project: 58059
Buggy source:
@Override void calculateScales(float totalWidth,float totalHeight){
  super.calculateScales(totalWidth,totalHeight);
  float availableWidth=getSizeScaledX();
  float availableHeight=getSizeScaledY();
  if (isXDynamic)   availableWidth=totalWidth;
  if (isYDynamic)   availableHeight=totalHeight;
  float highestElement=0;
  for (  ElementLayout element : elements) {
    float tempHeight=element.getUnscalableElementHeight();
    if (tempHeight > highestElement)     highestElement=tempHeight;
    availableWidth-=element.getUnscalableElementWidth();
  }
  availableHeight-=highestElement;
  calculateSubElementScales(availableWidth,availableHeight);
}

Fixed version (ground truth):
@Override void calculateScales(float totalWidth,float totalHeight){
  super.calculateScales(totalWidth,totalHeight);
  float availableWidth=getSizeScaledX();
  float availableHeight=getSizeScaledY();
  if (isXDynamic)   availableWidth=totalWidth;
  if (isYDynamic)   availableHeight=totalHeight;
  float highestElement=0;
  for (  ElementLayout element : elements) {
    float tempHeight=element.getUnscalableElementHeight();
    if (tempHeight > highestElement)     highestElement=tempHeight;
    availableWidth-=element.getUnscalableElementWidth();
  }
  calculateSubElementScales(availableWidth,availableHeight);
}
Program: 58060
Project: 58060
Buggy source:
/** 
 * Set a ratio size in y direction. The ration indicates how much of the containing element this element occupies. The size has to be normalized between 0 and 1, where 1 is the whole space available for the rendered elements
 * @param ratioSizeY the size of the element in relation to other elements in the same container on a scale of 0 to 1
 */
public void setRatioSizeY(float ratioSizeY){
  if (ratioSizeY > 1 || ratioSizeY < 0)   throw new IllegalArgumentException("String_Node_Str");
  this.ratioSizeY=ratioSizeY;
}

Fixed version (ground truth):
/** 
 * Set a ratio size in y direction. The ration indicates how much of the containing element this element occupies. The size has to be normalized between 0 and 1, where 1 is the whole space available for the rendered elements
 * @param ratioSizeY the size of the element in relation to other elements in the same container on a scale of 0 to 1
 */
public void setRatioSizeY(float ratioSizeY){
  if (ratioSizeY > 1 || ratioSizeY < 0)   throw new IllegalArgumentException("String_Node_Str");
  resetY();
  this.ratioSizeY=ratioSizeY;
}
Program: 58061
Project: 58061
Buggy source:
/** 
 * Set a ratio size in x direction. The ration indicates how much of the containing element this element occupies. The size has to be normalized between 0 and 1, where 1 is the whole space available for the rendered elements
 * @param ratioSizeX the size of the element in relation to other elements in the same container on a scale of 0 to 1
 */
public void setRatioSizeX(float ratioSizeX){
  if (ratioSizeX > 1 || ratioSizeX < 0)   throw new IllegalArgumentException("String_Node_Str");
  this.ratioSizeX=ratioSizeX;
}

Fixed version (ground truth):
/** 
 * Set a ratio size in x direction. The ration indicates how much of the containing element this element occupies. The size has to be normalized between 0 and 1, where 1 is the whole space available for the rendered elements
 * @param ratioSizeX the size of the element in relation to other elements in the same container on a scale of 0 to 1
 */
public void setRatioSizeX(float ratioSizeX){
  if (ratioSizeX > 1 || ratioSizeX < 0)   throw new IllegalArgumentException("String_Node_Str");
  resetX();
  this.ratioSizeX=ratioSizeX;
}
Program: 58062
Project: 58062
Buggy source:
/** 
 * Set the absolute size in GL coordinates of the element in y direction.
 * @param absoluteSizeX
 */
public void setAbsoluteSizeY(float absoluteSizeY){
  this.absoluteSizeY=absoluteSizeY;
}

Fixed version (ground truth):
/** 
 * Set the absolute size in GL coordinates of the element in y direction.
 * @param absoluteSizeX
 */
public void setAbsoluteSizeY(float absoluteSizeY){
  resetY();
  this.absoluteSizeY=absoluteSizeY;
}
Program: 58063
Project: 58063
Buggy source:
/** 
 * Set the absolute size in GL coordinates of the element in x direction.
 * @param absoluteSizeX
 */
public void setAbsoluteSizeX(float absoluteSizeX){
  this.absoluteSizeX=absoluteSizeX;
}

Fixed version (ground truth):
/** 
 * Set the absolute size in GL coordinates of the element in x direction.
 * @param absoluteSizeX
 */
public void setAbsoluteSizeX(float absoluteSizeX){
  resetX();
  this.absoluteSizeX=absoluteSizeX;
}
Program: 58064
Project: 58064
Buggy source:
/** 
 * Set the size of the element in x direction in pixels. As a consequence, the size remains static even if the window size changes. This requires the PixelGLConverte to be set (see  {@link #setPixelGLConverter(PixelGLConverter)}).
 * @param pixelSizeX
 */
public void setPixelSizeX(int pixelSizeX){
  if (pixelGLConverter == null)   throw new IllegalStateException("String_Node_Str");
  this.pixelSizeX=pixelSizeX;
}

Fixed version (ground truth):
/** 
 * Set the size of the element in x direction in pixels. As a consequence, the size remains static even if the window size changes. This requires the PixelGLConverte to be set (see  {@link #setPixelGLConverter(PixelGLConverter)}).
 * @param pixelSizeX
 */
public void setPixelSizeX(int pixelSizeX){
  if (pixelGLConverter == null)   throw new IllegalStateException("String_Node_Str");
  resetX();
  this.pixelSizeX=pixelSizeX;
}
Program: 58065
Project: 58065
Buggy source:
/** 
 * Set the size of the element in y direction in pixels. As a consequence, the size remains static even if the window size changes. This requires the PixelGLConverte to be set (see  {@link #setPixelGLConverter(PixelGLConverter)}).
 * @param pixelSizeY
 */
public void setPixelSizeY(int pixelSizeY){
  if (pixelGLConverter == null)   throw new IllegalStateException("String_Node_Str");
  this.pixelSizeY=pixelSizeY;
}

Fixed version (ground truth):
/** 
 * Set the size of the element in y direction in pixels. As a consequence, the size remains static even if the window size changes. This requires the PixelGLConverte to be set (see  {@link #setPixelGLConverter(PixelGLConverter)}).
 * @param pixelSizeY
 */
public void setPixelSizeY(int pixelSizeY){
  if (pixelGLConverter == null)   throw new IllegalStateException("String_Node_Str");
  resetY();
  this.pixelSizeY=pixelSizeY;
}
Program: 58066
Project: 58066
Buggy source:
/** 
 * Instruct the element to grab the remaining space in the x direction.
 */
public void grabX(){
  this.grabX=true;
}

Fixed version (ground truth):
/** 
 * Instruct the element to grab the remaining space in the x direction.
 */
public void grabX(){
  resetX();
  this.grabX=true;
}
Program: 58067
Project: 58067
Buggy source:
/** 
 * Instruct the element to grab the remaining space in the y direction
 */
public void grabY(){
  this.grabY=true;
}

Fixed version (ground truth):
/** 
 * Instruct the element to grab the remaining space in the y direction
 */
public void grabY(){
  resetY();
  this.grabY=true;
}
Program: 58069
Project: 58069
Buggy source:
private void initializeBricks(ArrayList<ISet> metaSets){
  dimensionGroups.clear();
  for (  ISet set : metaSets) {
    DimensionGroup dimensionGroup=(DimensionGroup)GeneralManager.get().getViewGLCanvasManager().createGLView(DimensionGroup.class,getParentGLCanvas(),new ViewFrustum(ECameraProjectionMode.ORTHOGRAPHIC,0,1,0,1,-1,1));
    dimensionGroup.setDataDomain(dataDomain);
    dimensionGroup.setSet(set);
    dimensionGroup.setRemoteRenderingGLView(this);
    dimensionGroup.setVisBricksViewID(iUniqueID);
    dimensionGroup.initialize();
    dimensionGroups.add(dimensionGroup);
    uninitializedDimensionGroups.add(dimensionGroup);
  }
  if (dimensionGroups.size() > MAX_CENTER_DIMENSION_GROUPS) {
    centerGroupStartIndex=(dimensionGroups.size() - MAX_CENTER_DIMENSION_GROUPS) / 2;
    centerGroupEndIndex=centerGroupStartIndex + MAX_CENTER_DIMENSION_GROUPS;
  }
 else {
    centerGroupStartIndex=0;
    centerGroupEndIndex=dimensionGroups.size();
  }
}

Fixed version (ground truth):
private void initializeBricks(ArrayList<ISet> metaSets){
  dimensionGroups.clear();
  for (  ISet set : metaSets) {
    DimensionGroup dimensionGroup=(DimensionGroup)GeneralManager.get().getViewGLCanvasManager().createGLView(DimensionGroup.class,getParentGLCanvas(),new ViewFrustum(ECameraProjectionMode.ORTHOGRAPHIC,0,1,0,1,-1,1));
    dimensionGroup.setDataDomain(dataDomain);
    dimensionGroup.setSet(set);
    dimensionGroup.setRemoteRenderingGLView(this);
    dimensionGroup.setVisBricksViewID(iUniqueID);
    dimensionGroup.initialize();
    dimensionGroups.add(dimensionGroup);
    uninitializedDimensionGroups.add(dimensionGroup);
  }
  if (dimensionGroups.size() > MAX_CENTER_DIMENSION_GROUPS) {
    centerGroupStartIndex=(dimensionGroups.size() - MAX_CENTER_DIMENSION_GROUPS) / 2;
    rightGroupStartIndex=centerGroupStartIndex + MAX_CENTER_DIMENSION_GROUPS;
  }
 else {
    centerGroupStartIndex=0;
    rightGroupStartIndex=dimensionGroups.size();
  }
}
Program: 58070
Project: 58070
Buggy source:
public void moveGroupDimension(DimensionGroup referenceDimGroup,DimensionGroup movedDimGroup,boolean hightlightAfter){
  int hightlightOffset=0;
  if (hightlightAfter)   hightlightOffset=+1;
  int movedDimGroupIndex=dimensionGroups.indexOf(movedDimGroup);
  int refDimGroupIndex=dimensionGroups.indexOf(referenceDimGroup);
  if (refDimGroupIndex < centerGroupStartIndex)   centerGroupStartIndex++;
 else   if (refDimGroupIndex > centerGroupStartIndex && refDimGroupIndex < centerGroupEndIndex) {
    if (movedDimGroupIndex > centerGroupEndIndex)     centerGroupEndIndex++;
 else     if (movedDimGroupIndex < centerGroupStartIndex)     centerGroupStartIndex--;
  }
 else   if (refDimGroupIndex > centerGroupEndIndex)   centerGroupEndIndex--;
  dimensionGroups.remove(movedDimGroup);
  dimensionGroups.add(dimensionGroups.indexOf(referenceDimGroup) + hightlightOffset,movedDimGroup);
  initLayoutCenter();
  initLayoutLeft();
  initLayoutRight();
}

Fixed version (ground truth):
public void moveGroupDimension(DimensionGroup referenceDimGroup,DimensionGroup movedDimGroup,boolean hightlightAfter){
  int hightlightOffset=0;
  if (hightlightAfter)   hightlightOffset=+1;
  int movedDimGroupIndex=dimensionGroups.indexOf(movedDimGroup);
  int refDimGroupIndex=dimensionGroups.indexOf(referenceDimGroup);
  if (refDimGroupIndex < centerGroupStartIndex)   centerGroupStartIndex++;
 else   if (refDimGroupIndex > centerGroupStartIndex && refDimGroupIndex < rightGroupStartIndex) {
    if (movedDimGroupIndex > rightGroupStartIndex)     rightGroupStartIndex++;
 else     if (movedDimGroupIndex < centerGroupStartIndex)     centerGroupStartIndex--;
  }
 else   if (refDimGroupIndex > rightGroupStartIndex)   rightGroupStartIndex--;
  dimensionGroups.remove(movedDimGroup);
  dimensionGroups.add(dimensionGroups.indexOf(referenceDimGroup) + hightlightOffset,movedDimGroup);
  initLayoutCenter();
  initLayoutLeft();
  initLayoutRight();
}
Program: 58074
Project: 58074
Buggy source:
@Override protected void calculateTransforms(float bottom,float left,float top,float right){
  super.calculateTransforms(bottom,left,top,right);
  float x;
  if (isLeftToRight)   x=left;
 else   x=right;
  for (  ElementLayout element : elements) {
    if (isBottomUp) {
      if (element instanceof LayoutContainer) {
        ((LayoutContainer)element).calculateTransforms(bottom,left,top,right);
      }
      element.setTranslateX(x);
      element.setTranslateY(bottom);
      bottom+=element.getSizeScaledY();
    }
 else {
      bottom=top - element.getSizeScaledY();
      if (element instanceof LayoutContainer) {
        ((LayoutContainer)element).calculateTransforms(bottom,left,top,right);
      }
      top-=element.getSizeScaledY();
      element.setTranslateX(x);
      element.setTranslateY(top);
    }
    element.setAbsoluteTranslateX(element.getTranslateX() + absoluteTranslateX);
    element.setAbsoluteTranslateY(element.getTranslateY() + absoluteTranslateY);
  }
}

Fixed version (ground truth):
@Override protected void calculateTransforms(float bottom,float left,float top,float right){
  super.calculateTransforms(bottom,left,top,right);
  float x;
  if (isLeftToRight)   x=left;
 else   x=right;
  for (  ElementLayout element : elements) {
    if (isBottomUp) {
      if (element instanceof LayoutContainer) {
        ((LayoutContainer)element).calculateTransforms(bottom,left,top,right);
      }
      element.setTranslateX(x);
      element.setTranslateY(bottom);
      bottom+=element.getSizeScaledY();
    }
 else {
      bottom=top - element.getSizeScaledY();
      if (element instanceof LayoutContainer) {
        ((LayoutContainer)element).calculateTransforms(bottom,left,top,right);
      }
      top-=element.getSizeScaledY();
      element.setTranslateX(x);
      element.setTranslateY(top);
    }
  }
}
Program: 58075
Project: 58075
Buggy source:
@Override protected void calculateTransforms(float bottom,float left,float top,float right){
  super.calculateTransforms(bottom,left,top,right);
  float y;
  if (isBottomUp)   y=bottom;
 else   y=top;
  for (  ElementLayout element : elements) {
    if (element instanceof LayoutContainer) {
      ((LayoutContainer)element).calculateTransforms(bottom,left,top,right);
    }
    if (isLeftToRight) {
      element.setTranslateX(left);
      element.setTranslateY(y);
      left+=element.getSizeScaledX();
    }
 else {
      element.setTranslateX(right);
      element.setTranslateY(y);
      right-=element.getSizeScaledX();
    }
    element.setAbsoluteTranslateX(element.getTranslateX() + absoluteTranslateX);
    element.setAbsoluteTranslateY(element.getTranslateY() + absoluteTranslateY);
  }
}

Fixed version (ground truth):
@Override protected void calculateTransforms(float bottom,float left,float top,float right){
  super.calculateTransforms(bottom,left,top,right);
  float y;
  if (isBottomUp)   y=bottom;
 else   y=top;
  for (  ElementLayout element : elements) {
    if (element instanceof LayoutContainer) {
      ((LayoutContainer)element).calculateTransforms(bottom,left,top,right);
    }
    if (isLeftToRight) {
      element.setTranslateX(left);
      element.setTranslateY(y);
      left+=element.getSizeScaledX();
    }
 else {
      element.setTranslateX(right);
      element.setTranslateY(y);
      right-=element.getSizeScaledX();
    }
  }
}
Program: 58078
Project: 58078
Buggy source:
@Override public void setStaticLayouts(){
  Row baseRow=new Row("String_Node_Str");
  baseRow.setFrameColor(0,0,1,0);
  setBaseElementLayout(baseRow);
  Column baseColumn=new Column("String_Node_Str");
  baseColumn.setFrameColor(0,1,0,0);
  ElementLayout fuelBarLayout=new ElementLayout("String_Node_Str");
  fuelBarLayout.setFrameColor(0,1,0,0);
  fuelBarLayout.setPixelGLConverter(pixelGLConverter);
  fuelBarLayout.setPixelSizeX(15);
  baseRow.appendElement(baseColumn);
  baseRow.appendElement(fuelBarLayout);
  ElementLayout dimensionBarLayout=new ElementLayout("String_Node_Str");
  dimensionBarLayout.setFrameColor(1,0,1,0);
  dimensionBarLayout.setPixelGLConverter(pixelGLConverter);
  dimensionBarLayout.setPixelSizeY(15);
  ElementLayout viewLayout=new ElementLayout("String_Node_Str");
  viewLayout.setFrameColor(1,0,0,1);
  viewLayout.setRenderer(viewRenderer);
  ElementLayout viewToolBarLayout=new ElementLayout("String_Node_Str");
  viewToolBarLayout.setFrameColor(0.5f,0.5f,0,1);
  viewToolBarLayout.setPixelGLConverter(pixelGLConverter);
  viewToolBarLayout.setPixelSizeY(15);
  viewToolBarLayout.setRenderer(new ViewToolBarRenderer(brick));
  baseColumn.appendElement(dimensionBarLayout);
  baseColumn.appendElement(viewLayout);
  baseColumn.appendElement(viewToolBarLayout);
}

Fixed version (ground truth):
@Override public void setStaticLayouts(){
  Row baseRow=new Row("String_Node_Str");
  baseRow.setFrameColor(0,0,1,0);
  setBaseElementLayout(baseRow);
  Column baseColumn=new Column("String_Node_Str");
  baseColumn.setFrameColor(0,1,0,0);
  ElementLayout fuelBarLayout=new ElementLayout("String_Node_Str");
  fuelBarLayout.setFrameColor(0,1,0,0);
  fuelBarLayout.setPixelGLConverter(pixelGLConverter);
  fuelBarLayout.setPixelSizeY(15);
  fuelBarLayout.setRenderer(new FuelBarRenderer(brick));
  baseRow.appendElement(baseColumn);
  ElementLayout dimensionBarLayout=new ElementLayout("String_Node_Str");
  dimensionBarLayout.setFrameColor(1,0,1,0);
  dimensionBarLayout.setPixelGLConverter(pixelGLConverter);
  dimensionBarLayout.setPixelSizeY(15);
  ElementLayout viewLayout=new ElementLayout("String_Node_Str");
  viewLayout.setFrameColor(1,0,0,1);
  viewLayout.setRenderer(viewRenderer);
  ElementLayout viewToolBarLayout=new ElementLayout("String_Node_Str");
  viewToolBarLayout.setFrameColor(0.5f,0.5f,0,1);
  viewToolBarLayout.setPixelGLConverter(pixelGLConverter);
  viewToolBarLayout.setPixelSizeY(15);
  viewToolBarLayout.setRenderer(new ViewToolBarRenderer(brick));
  baseColumn.appendElement(fuelBarLayout);
  baseColumn.appendElement(viewLayout);
  baseColumn.appendElement(viewToolBarLayout);
}
Program: 58079
Project: 58079
Buggy source:
private void createSubBricks(){
  ContentVirtualArray contentVA=set.getContentData(Set.CONTENT).getContentVA();
  if (contentVA.getGroupList() == null)   return;
  ContentGroupList groupList=contentVA.getGroupList();
  int count=0;
  groupList.updateGroupInfo();
  for (  Group group : groupList) {
    GLBrick subBrick=(GLBrick)GeneralManager.get().getViewGLCanvasManager().createGLView(GLBrick.class,getParentGLCanvas(),new ViewFrustum());
    subBrick.setRemoteRenderingGLView(getRemoteRenderingGLCanvas());
    subBrick.setDataDomain(dataDomain);
    subBrick.setSet(set);
    ElementLayout brickLayout=new ElementLayout("String_Node_Str");
    ViewLayoutRenderer brickRenderer=new ViewLayoutRenderer(subBrick);
    brickLayout.setRenderer(brickRenderer);
    brickLayout.setFrameColor(1,0,0,1);
    uninitializedBricks.add(subBrick);
    ContentVirtualArray subVA=new ContentVirtualArray("String_Node_Str",contentVA.getVirtualArray().subList(group.getStartIndex(),group.getEndIndex()));
    subBrick.setContentVA(subVA);
    if (count < groupList.size() / 2) {
      bottomBricks.add(subBrick);
      bottomCol.appendElement(brickLayout);
    }
 else {
      topBricks.add(subBrick);
      topCol.appendElement(brickLayout);
    }
    count++;
  }
  for (  ElementLayout layout : topCol) {
    layout.setRatioSizeY(1.0f / topCol.size());
  }
  for (  ElementLayout layout : bottomCol) {
    layout.setRatioSizeY(1.0f / bottomCol.size());
  }
}

Fixed version (ground truth):
private void createSubBricks(){
  ContentVirtualArray contentVA=set.getContentData(Set.CONTENT).getContentVA();
  if (contentVA.getGroupList() == null)   return;
  ContentGroupList groupList=contentVA.getGroupList();
  int count=0;
  groupList.updateGroupInfo();
  for (  Group group : groupList) {
    GLBrick subBrick=(GLBrick)GeneralManager.get().getViewGLCanvasManager().createGLView(GLBrick.class,getParentGLCanvas(),new ViewFrustum());
    subBrick.setRemoteRenderingGLView(getRemoteRenderingGLCanvas());
    subBrick.setDataDomain(dataDomain);
    subBrick.setSet(set);
    ElementLayout brickLayout=new ElementLayout("String_Node_Str");
    ViewLayoutRenderer brickRenderer=new ViewLayoutRenderer(subBrick);
    brickLayout.setRenderer(brickRenderer);
    brickLayout.setFrameColor(1,0,0,1);
    uninitializedBricks.add(subBrick);
    ContentVirtualArray subVA=new ContentVirtualArray("String_Node_Str",contentVA.getVirtualArray().subList(group.getStartIndex(),group.getEndIndex() + 1));
    subBrick.setContentVA(subVA);
    if (count < groupList.size() / 2) {
      bottomBricks.add(subBrick);
      bottomCol.appendElement(brickLayout);
    }
 else {
      topBricks.add(subBrick);
      topCol.appendElement(brickLayout);
    }
    count++;
  }
  for (  ElementLayout layout : topCol) {
    layout.setRatioSizeY(1.0f / topCol.size());
  }
  for (  ElementLayout layout : bottomCol) {
    layout.setRatioSizeY(1.0f / bottomCol.size());
  }
}
Program: 58080
Project: 58080
Buggy source:
@Override protected void calculateSubElementScales(float availableWidth,float availableHeight){
  float largestWidth=0;
  float totalHeight=0;
  float dynamicHeight=0;
  ElementLayout greedyElement=null;
  for (  ElementLayout element : elements) {
    if (element.grabY) {
      if (greedyElement != null)       throw new IllegalStateException("String_Node_Str" + this);
      greedyElement=element;
      continue;
    }
    element.calculateScales(availableWidth,availableHeight);
    totalHeight+=element.getSizeScaledY();
    if (!element.isHeightStatic())     dynamicHeight+=element.getSizeScaledY();
    if (largestWidth < element.getSizeScaledX())     largestWidth=element.getSizeScaledX();
  }
  if (greedyElement != null) {
    greedyElement.setAbsoluteSizeY(availableHeight - dynamicHeight);
    greedyElement.calculateScales(availableWidth,availableHeight - dynamicHeight);
  }
  if (isXDynamic)   sizeScaledX=largestWidth;
  if (isYDynamic)   sizeScaledY=totalHeight;
}

Fixed version (ground truth):
@Override protected void calculateSubElementScales(float availableWidth,float availableHeight){
  float largestWidth=0;
  float totalHeight=0;
  float dynamicHeight=0;
  ElementLayout greedyElement=null;
  for (  ElementLayout element : elements) {
    if (element.grabY) {
      if (greedyElement != null)       throw new IllegalStateException("String_Node_Str" + this);
      greedyElement=element;
      continue;
    }
    if (isXDynamic && !element.isWidthStatic() && element.ratioSizeX == 1)     throw new IllegalStateException("String_Node_Str" + this + "String_Node_Str"+ element+ "String_Node_Str");
    element.calculateScales(availableWidth,availableHeight);
    totalHeight+=element.getSizeScaledY();
    if (!element.isHeightStatic())     dynamicHeight+=element.getSizeScaledY();
    if (largestWidth < element.getSizeScaledX())     largestWidth=element.getSizeScaledX();
  }
  if (greedyElement != null) {
    greedyElement.setAbsoluteSizeY(availableHeight - dynamicHeight);
    greedyElement.calculateScales(availableWidth,availableHeight - dynamicHeight);
  }
  if (isXDynamic)   sizeScaledX=largestWidth;
  if (isYDynamic)   sizeScaledY=totalHeight;
}
Program: 58081
Project: 58081
Buggy source:
public boolean isHeightStatic(){
  if (!Float.isNaN(absoluteSizeY))   return true;
  if (pixelSizeY == Integer.MIN_VALUE)   return true;
  return false;
}

Fixed version (ground truth):
public boolean isHeightStatic(){
  if (!Float.isNaN(absoluteSizeY))   return true;
  if (pixelSizeY != Integer.MIN_VALUE)   return true;
  return false;
}
Program: 58082
Project: 58082
Buggy source:
public boolean isWidthStatic(){
  if (!Float.isNaN(absoluteSizeX))   return true;
  if (pixelSizeX == Integer.MIN_VALUE)   return true;
  return false;
}

Fixed version (ground truth):
public boolean isWidthStatic(){
  if (!Float.isNaN(absoluteSizeX))   return true;
  if (pixelSizeX != Integer.MIN_VALUE)   return true;
  return false;
}
Program: 58083
Project: 58083
Buggy source:
@Override protected void calculateSubElementScales(float availableWidth,float availableHeight){
  float dynamicWidth=0;
  float totalWidth=0;
  float largestHeight=0;
  ElementLayout greedyElement=null;
  for (  ElementLayout element : elements) {
    if (element.grabX) {
      if (greedyElement != null)       throw new IllegalStateException("String_Node_Str" + this);
      greedyElement=element;
      continue;
    }
    element.calculateScales(availableWidth,availableHeight);
    totalWidth+=element.getSizeScaledX();
    if (!element.isWidthStatic())     dynamicWidth+=element.getSizeScaledX();
    if (largestHeight < element.getSizeScaledY())     largestHeight=element.getSizeScaledY();
  }
  if (greedyElement != null) {
    greedyElement.setAbsoluteSizeX(availableWidth - dynamicWidth);
    greedyElement.calculateScales(availableWidth - dynamicWidth,availableHeight);
    dynamicWidth=availableWidth;
  }
  if (isXDynamic)   sizeScaledX=totalWidth;
  if (isYDynamic)   sizeScaledY=largestHeight;
}

Fixed version (ground truth):
@Override protected void calculateSubElementScales(float availableWidth,float availableHeight){
  float dynamicWidth=0;
  float totalWidth=0;
  float largestHeight=0;
  ElementLayout greedyElement=null;
  for (  ElementLayout element : elements) {
    if (element.grabX) {
      if (greedyElement != null)       throw new IllegalStateException("String_Node_Str" + this);
      greedyElement=element;
      continue;
    }
    if (isYDynamic && !element.isHeightStatic() && element.ratioSizeY == 1)     throw new IllegalStateException("String_Node_Str" + this + "String_Node_Str"+ element+ "String_Node_Str");
    element.calculateScales(availableWidth,availableHeight);
    totalWidth+=element.getSizeScaledX();
    if (!element.isWidthStatic())     dynamicWidth+=element.getSizeScaledX();
    if (largestHeight < element.getSizeScaledY())     largestHeight=element.getSizeScaledY();
  }
  if (greedyElement != null) {
    greedyElement.setAbsoluteSizeX(availableWidth - dynamicWidth);
    greedyElement.calculateScales(availableWidth - dynamicWidth,availableHeight);
    dynamicWidth=availableWidth;
  }
  if (isXDynamic)   sizeScaledX=totalWidth;
  if (isYDynamic)   sizeScaledY=largestHeight;
}
Program: 58084
Project: 58084
Buggy source:
void render(GL2 gl){
  gl.glTranslatef(getTransformX(),getTransformY(),0);
  if (renderDebugFrame) {
    float yPositionDebugText=0;
    float[] color;
    if (frameColor == null)     color=new float[]{0,0,0,0};
 else {
      color=frameColor;
    }
    gl.glColor4fv(color,0);
    if (this instanceof LayoutContainer) {
      gl.glLineWidth(6);
      yPositionDebugText=getSizeScaledY() / 2;
    }
 else {
      gl.glLineWidth(2);
    }
    gl.glBegin(GL.GL_LINE_LOOP);
    gl.glVertex3f(0,0,0.2f);
    gl.glVertex3f(getSizeScaledX(),0,0.2f);
    gl.glVertex3f(getSizeScaledX(),getSizeScaledY(),0.2f);
    gl.glVertex3f(0,getSizeScaledY(),0.2f);
    gl.glEnd();
    if (textRenderer == null) {
      textRenderer=new MinSizeTextRenderer();
    }
    textRenderer.setColor(color[0],color[1],color[2],color[3]);
    textRenderer.renderText(gl,layoutName,0,yPositionDebugText,0.4f);
  }
  if (backgroundRenderers != null) {
    for (    LayoutRenderer backgroundRenderer : backgroundRenderers) {
      backgroundRenderer.render(gl);
    }
  }
  renderer.render(gl);
  if (foregroundRenderers != null) {
    for (    LayoutRenderer foregroundRenderer : foregroundRenderers) {
      foregroundRenderer.render(gl);
    }
  }
  gl.glTranslatef(-getTransformX(),-getTransformY(),0);
}

Fixed version (ground truth):
void render(GL2 gl){
  gl.glTranslatef(getTransformX(),getTransformY(),0);
  if (debug) {
    float yPositionDebugText=0;
    float[] color;
    if (frameColor == null)     color=new float[]{0,0.5f,0.5f,1};
 else {
      color=frameColor;
    }
    gl.glColor4fv(color,0);
    if (this instanceof LayoutContainer) {
      gl.glLineWidth(6);
      yPositionDebugText=getSizeScaledY() / 2;
    }
 else {
      gl.glLineWidth(2);
    }
    gl.glBegin(GL.GL_LINE_LOOP);
    gl.glVertex3f(0,0,0.2f);
    gl.glVertex3f(getSizeScaledX(),0,0.2f);
    gl.glVertex3f(getSizeScaledX(),getSizeScaledY(),0.2f);
    gl.glVertex3f(0,getSizeScaledY(),0.2f);
    gl.glEnd();
    if (textRenderer == null) {
      textRenderer=new MinSizeTextRenderer();
    }
    textRenderer.setColor(color[0],color[1],color[2],color[3]);
    textRenderer.renderText(gl,layoutName,0,yPositionDebugText,0.4f);
  }
  if (backgroundRenderers != null) {
    for (    LayoutRenderer backgroundRenderer : backgroundRenderers) {
      backgroundRenderer.render(gl);
    }
  }
  renderer.render(gl);
  if (foregroundRenderers != null) {
    for (    LayoutRenderer foregroundRenderer : foregroundRenderers) {
      foregroundRenderer.render(gl);
    }
  }
  gl.glTranslatef(-getTransformX(),-getTransformY(),0);
}
Program: 58085
Project: 58085
Buggy source:
@Override public void render(GL2 gl){
  super.render(gl);
  float height=(layoutElement.getSizeScaledY() - (float)manager.getTextRenderer().getBounds("String_Node_Str").getHeight()) / 2;
  RenderingHelpers.renderText(gl,manager.getMinSizeTextRenderer(),caption,0 + BookmarkRenderStyle.SIDE_SPACING,height,GeneralRenderStyle.SMALL_FONT_SCALING_FACTOR);
}

Fixed version (ground truth):
@Override public void render(GL2 gl){
  super.render(gl);
  float height=(layoutElement.getSizeScaledY() - (float)manager.getMinSizeTextRenderer().getBounds("String_Node_Str").getHeight()) / 2;
  RenderingHelpers.renderText(gl,manager.getMinSizeTextRenderer(),caption,0 + BookmarkRenderStyle.SIDE_SPACING,height,GeneralRenderStyle.SMALL_FONT_SCALING_FACTOR);
}
Program: 58086
Project: 58086
Buggy source:
public void zoomIn(){
  Set<Integer> elements=mainTreeMapView.getSelectionManager().getElements(SelectionType.SELECTION);
  if (elements.size() == 1) {
    ClusterNode dataRoot=dataDomain.getSet().getContentData(contentVAType).getContentTree().getNodeByNumber(elements.iterator().next());
    mainTreeMapView.setRemotePickingManager(null,0);
    mainTreeMapView.clearAllSelections();
    mainTreeMapView.getSelectionManager().addToType(SelectionType.SELECTION,dataRoot.getID());
    mainTreeMapView.setDrawLabel(false);
    @SuppressWarnings("String_Node_Str") Vector<GLTreeMap> beginThumbnails=(Vector<GLTreeMap>)thumbnailTreemapViews.clone();
    mainTreeMapView.setInteractive(false);
    thumbnailTreemapViews.add(mainTreeMapView);
    GLTreeMap beginMainView=mainTreeMapView;
    setMainTreeMapView(createEmbeddedTreeMap());
    mainTreeMapView.setDrawLabel(true);
    mainTreeMapView.setRootClusterID(dataRoot.getID());
    mainTreeMapView.setZoomActive(true);
    mainTreeMapView.initData();
    animationControle.initAnimation(this,beginMainView,mainTreeMapView,beginThumbnails,thumbnailTreemapViews,AnimationControle.ZOOM_IN_ANIMATION);
    animationControle.setActive(true);
    setDisplayListDirty();
  }
}

Fixed version (ground truth):
public void zoomIn(){
  Set<Integer> elements=mainTreeMapView.getSelectionManager().getElements(SelectionType.SELECTION);
  if (elements.size() == 1) {
    ClusterNode dataRoot=dataDomain.getSet().getContentData(contentVAType).getContentTree().getNodeByNumber(elements.iterator().next());
    mainTreeMapView.setRemotePickingManager(null,0);
    mainTreeMapView.clearAllSelections();
    mainTreeMapView.getSelectionManager().addToType(SelectionType.SELECTION,dataRoot.getID());
    mainTreeMapView.setDrawLabel(false);
    @SuppressWarnings("String_Node_Str") Vector<GLTreeMap> beginThumbnails=(Vector<GLTreeMap>)thumbnailTreemapViews.clone();
    mainTreeMapView.setInteractive(false);
    thumbnailTreemapViews.add(mainTreeMapView);
    GLTreeMap beginMainView=mainTreeMapView;
    GLTreeMap treeMap=createEmbeddedTreeMap();
    setMainTreeMapView(treeMap);
    uninitializedTreeMap.add(treeMap);
    mainTreeMapView.setDrawLabel(true);
    mainTreeMapView.setRootClusterID(dataRoot.getID());
    mainTreeMapView.setZoomActive(true);
    mainTreeMapView.initData();
    animationControle.initAnimation(this,beginMainView,mainTreeMapView,beginThumbnails,thumbnailTreemapViews,AnimationControle.ZOOM_IN_ANIMATION);
    animationControle.setActive(true);
    setDisplayListDirty();
  }
}
Program: 58087
Project: 58087
Buggy source:
@Override public void displayLocal(GL2 gl){
  if (mainTreeMapView != null)   mainTreeMapView.processEvents();
  for (  GLTreeMap view : thumbnailTreemapViews)   view.processEvents();
  pickingManager.handlePicking(this,gl);
  display(gl);
  checkForHits(gl);
}

Fixed version (ground truth):
@Override public void displayLocal(GL2 gl){
  while (!uninitializedTreeMap.isEmpty()) {
    uninitializedTreeMap.poll().initRemote(gl,this,glMouseListener);
  }
  if (mainTreeMapView != null)   mainTreeMapView.processEvents();
  for (  GLTreeMap view : thumbnailTreemapViews)   view.processEvents();
  pickingManager.handlePicking(this,gl);
  display(gl);
  checkForHits(gl);
}
Program: 58088
Project: 58088
Buggy source:
@Override public void init(GL2 gl){
  renderer.initCache(gl);
}

Fixed version (ground truth):
@Override public void init(GL2 gl){
  if (textRenderer == null)   textRenderer=new CaleydoTextRenderer(new Font("String_Node_Str",Font.PLAIN,24),true,true);
  renderer.initCache(gl);
}
Program: 58089
Project: 58089
Buggy source:
public void initRenderer(ViewFrustum viewFrustum,PickingManager pickingManager,int viewID,SelectionManager selectionManager,CaleydoTextRenderer textRenderer){
  this.pickingManager=pickingManager;
  this.viewFrustum=viewFrustum;
  this.viewID=viewID;
  this.selectionManager=selectionManager;
  this.textRenderer=textRenderer;
}

Fixed version (ground truth):
public void initRenderer(ViewFrustum viewFrustum,PickingManager pickingManager,int viewID,SelectionManager selectionManager,CaleydoTextRenderer textRenderer){
  if (textRenderer == null)   throw new IllegalArgumentException("String_Node_Str");
  this.pickingManager=pickingManager;
  this.viewFrustum=viewFrustum;
  this.viewID=viewID;
  this.selectionManager=selectionManager;
  this.textRenderer=textRenderer;
}
Program: 58090
Project: 58090
Buggy source:
@Override protected void calculateSubElementScales(float availableWidth,float availableHeight){
  float actualWidth=0;
  float actualHeight=0;
  float totalHeight=0;
  ElementLayout greedyElement=null;
  for (  ElementLayout element : elements) {
    if (element.grabY) {
      if (greedyElement != null)       throw new IllegalStateException("String_Node_Str" + this);
      greedyElement=element;
      continue;
    }
    element.calculateScales(availableWidth,availableHeight - actualHeight);
    totalHeight+=element.getSizeScaledY();
    if (!(!Float.isNaN(element.absoluteSizeY) || Integer.MIN_VALUE != element.pixelSizeY))     actualHeight+=element.getSizeScaledY();
    if (actualWidth < element.getSizeScaledX())     actualWidth=element.getSizeScaledX();
  }
  if (greedyElement != null) {
    greedyElement.setAbsoluteSizeY(availableHeight - actualHeight);
    greedyElement.calculateScales(availableWidth,availableHeight - actualHeight);
    actualHeight=availableHeight;
  }
  if (isXDynamic)   sizeScaledX=actualWidth;
  if (isYDynamic)   sizeScaledY=totalHeight;
}

Fixed version (ground truth):
@Override protected void calculateSubElementScales(float availableWidth,float availableHeight){
  float actualWidth=0;
  float actualHeight=0;
  float totalHeight=0;
  ElementLayout greedyElement=null;
  for (  ElementLayout element : elements) {
    if (element.grabY) {
      if (greedyElement != null)       throw new IllegalStateException("String_Node_Str" + this);
      greedyElement=element;
      continue;
    }
    element.calculateScales(availableWidth,availableHeight);
    totalHeight+=element.getSizeScaledY();
    if (!(!Float.isNaN(element.absoluteSizeY) || Integer.MIN_VALUE != element.pixelSizeY))     actualHeight+=element.getSizeScaledY();
    if (actualWidth < element.getSizeScaledX())     actualWidth=element.getSizeScaledX();
  }
  if (greedyElement != null) {
    greedyElement.setAbsoluteSizeY(availableHeight - actualHeight);
    greedyElement.calculateScales(availableWidth,availableHeight - actualHeight);
    actualHeight=availableHeight;
  }
  if (isXDynamic)   sizeScaledX=actualWidth;
  if (isYDynamic)   sizeScaledY=totalHeight;
}
Program: 58091
Project: 58091
Buggy source:
public void metaSetsUpdated(){
  ArrayList<ISet> meatSets=dataDomain.getSet().getStorageData(storageVAType).getStorageTree().getRoot().getAllMetaSetsFromSubTree();
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
public void metaSetsUpdated(){
  ArrayList<ISet> allMetaSets=dataDomain.getSet().getStorageData(storageVAType).getStorageTree().getRoot().getAllMetaSetsFromSubTree();
  ArrayList<ISet> filteredMetaSets=new ArrayList<ISet>(allMetaSets.size() / 2);
  for (  ISet metaSet : allMetaSets) {
    if (metaSet.size() > 1 && metaSet.size() != dataDomain.getSet().size())     filteredMetaSets.add(metaSet);
  }
  initializeBricks(filteredMetaSets);
  System.out.println("String_Node_Str");
}
Program: 58092
Project: 58092
Buggy source:
@Override public void init(GL2 gl){
  renderStyle=new VisBricksRenderStyle(viewFrustum);
  super.renderStyle=renderStyle;
  detailLevel=DetailLevel.HIGH;
  connectionRenderer.init(gl);
  initLayout();
}

Fixed version (ground truth):
@Override public void init(GL2 gl){
  renderStyle=new VisBricksRenderStyle(viewFrustum);
  super.renderStyle=renderStyle;
  detailLevel=DetailLevel.HIGH;
  connectionRenderer.init(gl);
}
Program: 58093
Project: 58093
Buggy source:
@Override protected void handlePickingEvents(EPickingType pickingType,EPickingMode pickingMode,int pickingID,Pick pick){
  if (detailLevel == DetailLevel.VERY_LOW) {
    return;
  }
switch (pickingType) {
case TREEMAP_ELEMENT_SELECTED:
switch (pickingMode) {
case CLICKED:
      mouseWheeleSelectionId=pickingID;
    treeSelectionManager.clearSelection(SelectionType.SELECTION);
  treeSelectionManager.addToType(SelectionType.SELECTION,mouseWheeleSelectionId);
bIsMouseWheeleUsed=true;
mouseWheeleSelectionHeight=0;
break;
case MOUSE_OVER:
treeSelectionManager.clearSelection(SelectionType.MOUSE_OVER);
treeSelectionManager.addToType(SelectionType.MOUSE_OVER,pickingID);
break;
case RIGHT_CLICKED:
break;
case DRAGGED:
break;
default :
return;
}
publishSelectionEvent();
setHighLichtingListDirty();
break;
default :
return;
}
}

Fixed version (ground truth):
@Override protected void handlePickingEvents(EPickingType pickingType,EPickingMode pickingMode,int pickingID,Pick pick){
  if (detailLevel == DetailLevel.VERY_LOW) {
    return;
  }
switch (pickingType) {
case TREEMAP_ELEMENT_SELECTED:
switch (pickingMode) {
case CLICKED:
      mouseWheeleSelectionId=pickingID;
    treeSelectionManager.clearSelection(SelectionType.SELECTION);
  treeSelectionManager.addToType(SelectionType.SELECTION,mouseWheeleSelectionId);
bIsMouseWheeleUsed=true;
mouseWheeleSelectionHeight=0;
break;
case MOUSE_OVER:
treeSelectionManager.clearSelection(SelectionType.MOUSE_OVER);
treeSelectionManager.addToType(SelectionType.MOUSE_OVER,pickingID);
break;
case RIGHT_CLICKED:
break;
case DRAGGED:
break;
default :
return;
}
publishSelectionEvent();
setHighLightingListDirty();
break;
default :
return;
}
}