nus-yam/ex-repair huggingface dataset:
Program: 57355
Project: 57355
Buggy source:
@Override public void display(GLAutoDrawable drawable){
  GL2 gl=drawable.getGL().getGL2();
  gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
  gl.glLoadIdentity();
  gl.glTranslatef(0.375f,0.375f,0);
  final GLGraphics g=tracingGL ? new GLGraphicsTracing(gl,text,textures,loader,true) : new GLGraphics(gl,text,textures,loader,true);
  float paddedWidth=getWidth() - padding.left - padding.right;
  float paddedHeight=getHeight() - padding.top - padding.bottom;
  g.move(padding.left,padding.right);
  if (dirty) {
    root.setBounds(0,0,paddedWidth,paddedHeight);
    root.layout();
    dirty=false;
  }
  Runnable toRender=new Runnable(){
    @Override public void run(){
      root.renderPick(g);
    }
  }
;
  Point mousePos=pickingManager.getCurrentMousePos();
  if (mousePos != null) {
    root.getMouseLayer().setBounds(mousePos.x - padding.left,mousePos.y - padding.top,getWidth() - mousePos.x,getHeight() - mousePos.y);
    root.getMouseLayer().relayout();
  }
  pickingManager.doPicking(g.gl,toRender);
  if (renderPick)   root.renderPick(g);
 else   root.render(g);
  g.move(-padding.left,-padding.right);
  g.destroy();
  drawable.swapBuffers();
}

Fixed version (ground truth):
@Override public void display(GLAutoDrawable drawable){
  eventListeners.processEvents();
  GL2 gl=drawable.getGL().getGL2();
  gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
  gl.glLoadIdentity();
  gl.glTranslatef(0.375f,0.375f,0);
  final GLGraphics g=tracingGL ? new GLGraphicsTracing(gl,text,textures,loader,true) : new GLGraphics(gl,text,textures,loader,true);
  float paddedWidth=getWidth() - padding.left - padding.right;
  float paddedHeight=getHeight() - padding.top - padding.bottom;
  g.move(padding.left,padding.right);
  if (dirty) {
    root.setBounds(0,0,paddedWidth,paddedHeight);
    root.layout();
    dirty=false;
  }
  Runnable toRender=new Runnable(){
    @Override public void run(){
      root.renderPick(g);
    }
  }
;
  Point mousePos=pickingManager.getCurrentMousePos();
  if (mousePos != null) {
    root.getMouseLayer().setBounds(mousePos.x - padding.left,mousePos.y - padding.top,getWidth() - mousePos.x,getHeight() - mousePos.y);
    root.getMouseLayer().relayout();
  }
  pickingManager.doPicking(g.gl,toRender);
  if (renderPick)   root.renderPick(g);
 else   root.render(g);
  g.move(-padding.left,-padding.right);
  g.destroy();
  drawable.swapBuffers();
}
Program: 57356
Project: 57356
Buggy source:
@ListenTo(restrictExclusiveToEventSpace=true) public void onPathSelection(PathwayPathSelectionEvent event){
  pathSegments=event.getPathSegments();
  augmentation.clearRenderers();
  PathwayVertexRep start=null;
  PathwayVertexRep end=null;
  List<Pair<MultiFormRenderer,GLElement>> rendererList=multiFormRenderers.get(EEmbeddingID.PATHWAY_MULTIFORM.id());
  for (  PathwayPath path : pathSegments) {
    if (start == null) {
      start=path.getPath().getEndVertex();
    }
 else {
      end=path.getPath().getStartVertex();
      PathwayVertexRep referenceVertexRep=start;
      Rectangle2D referenceRectangle=null;
      for (      Pair<MultiFormRenderer,GLElement> rendererPair : rendererList) {
        MultiFormRenderer renderer=rendererPair.getFirst();
        IPathwayRepresentation pathwayRepresentation=getActivePathwayRepresentation(renderer);
        if (pathwayRepresentation != null && pathwayRepresentation.getPathway() == referenceVertexRep.getPathway()) {
          referenceRectangle=getAbsoluteVertexLocation(pathwayRepresentation,referenceVertexRep,rendererPair.getSecond());
          break;
        }
      }
      if (referenceRectangle == null)       return;
      for (      Pair<MultiFormRenderer,GLElement> rendererPair : rendererList) {
        MultiFormRenderer renderer=rendererPair.getFirst();
        IPathwayRepresentation pathwayRepresentation=getActivePathwayRepresentation(renderer);
        if (pathwayRepresentation != null) {
          Rectangle2D rect=getAbsoluteVertexLocation(pathwayRepresentation,end,rendererPair.getSecond());
          if (rect != null) {
            augmentation.addRenderer(new SubGraphAugmentation.ConnectionRenderer(referenceRectangle,rect));
          }
        }
      }
      start=path.getPath().getEndVertex();
      end=null;
    }
  }
}

Fixed version (ground truth):
@ListenTo(restrictExclusiveToEventSpace=true) public void onPathSelection(PathwayPathSelectionEvent event){
  pathSegments=event.getPathSegments();
  updatePathLinks();
}
Program: 57357
Project: 57357
Buggy source:
@Override public boolean hasNext(){
  if (methods == null && clazz == null)   return false;
  if (methods == null || !methods.hasNext()) {
    if (scanWhile != null && !scanWhile.apply(clazz))     return false;
    methods=Arrays.asList(clazz.getDeclaredMethods()).iterator();
    clazz=clazz.getSuperclass();
  }
  return methods.hasNext();
}

Fixed version (ground truth):
@Override public boolean hasNext(){
  if (methods == null && clazz == null)   return false;
  if (methods == null || !methods.hasNext()) {
    if (clazz == null || (scanWhile != null && !scanWhile.apply(clazz)))     return false;
    methods=Arrays.asList(clazz.getDeclaredMethods()).iterator();
    clazz=clazz.getSuperclass();
  }
  return methods.hasNext();
}
Program: 57358
Project: 57358
Buggy source:
/** 
 * trigger to layout this element
 */
protected void layout(){
  dirtyLayout=false;
  cache.invalidate(context.getDisplayListPool());
  pickCache.invalidate(context.getDisplayListPool());
}

Fixed version (ground truth):
/** 
 * trigger to layout this element
 */
protected void layout(){
  dirtyLayout=false;
  if (context != null) {
    cache.invalidate(context.getDisplayListPool());
    pickCache.invalidate(context.getDisplayListPool());
  }
}
Program: 57359
Project: 57359
Buggy source:
/** 
 * triggers that me and my parents get repaint the picking representation
 */
public void repaintPick(){
  pickCache.invalidate(context.getDisplayListPool());
  if (parent != null)   parent.repaintPick();
}

Fixed version (ground truth):
/** 
 * triggers that me and my parents get repaint the picking representation
 */
public void repaintPick(){
  if (context != null)   pickCache.invalidate(context.getDisplayListPool());
  if (parent != null)   parent.repaintPick();
}
Program: 57360
Project: 57360
Buggy source:
/** 
 * triggers that me and my parents get repainted
 */
public void repaint(){
  cache.invalidate(context.getDisplayListPool());
  if (parent != null)   parent.repaint();
}

Fixed version (ground truth):
/** 
 * triggers that me and my parents get repainted
 */
public void repaint(){
  if (context != null)   cache.invalidate(context.getDisplayListPool());
  if (parent != null)   parent.repaint();
}
Program: 57361
Project: 57361
Buggy source:
public GLTourGuideView(IGLCanvas glCanvas){
  super(glCanvas,VIEW_TYPE,VIEW_NAME);
  this.table=new RankTableModel(new RankTableConfigBase());
  this.table.addPropertyChangeListener(RankTableModel.PROP_SELECTED_ROW,new PropertyChangeListener(){
    @Override public void propertyChange(    PropertyChangeEvent evt){
      onSelectRow((PerspectiveRow)evt.getOldValue(),(PerspectiveRow)evt.getNewValue());
    }
  }
);
  this.table.addColumn(new RankRankColumnModel());
  this.table.addColumn(new PerspectiveRankColumnModel(stratomex));
  this.stacked=new StackedRankColumnModel();
  this.table.addColumn(stacked);
  this.table.addColumn(new SizeRankColumnModel());
  dataDomainQueries=new DataDomainQueries(table);
}

Fixed version (ground truth):
public GLTourGuideView(IGLCanvas glCanvas){
  super(glCanvas,VIEW_TYPE,VIEW_NAME);
  this.table=new RankTableModel(new RankTableConfigBase());
  this.table.addPropertyChangeListener(RankTableModel.PROP_SELECTED_ROW,new PropertyChangeListener(){
    @Override public void propertyChange(    PropertyChangeEvent evt){
      onSelectRow((PerspectiveRow)evt.getOldValue(),(PerspectiveRow)evt.getNewValue());
    }
  }
);
  this.table.addPropertyChangeListener(RankTableModel.PROP_REGISTER,new PropertyChangeListener(){
    @Override public void propertyChange(    PropertyChangeEvent evt){
      if (evt.getOldValue() != null)       eventListeners.unregister(evt.getOldValue());
      if (evt.getNewValue() != null)       eventListeners.register(evt.getNewValue());
    }
  }
);
  this.table.addColumn(new RankRankColumnModel());
  this.table.addColumn(new PerspectiveRankColumnModel(stratomex));
  this.stacked=new StackedRankColumnModel();
  this.table.addColumn(stacked);
  this.table.addColumn(new SizeRankColumnModel());
  dataDomainQueries=new DataDomainQueries(table);
}
Program: 57362
Project: 57362
Buggy source:
@Override public void propertyChange(PropertyChangeEvent evt){
  onSelectRow((PerspectiveRow)evt.getOldValue(),(PerspectiveRow)evt.getNewValue());
}

Fixed version (ground truth):
@Override public void propertyChange(PropertyChangeEvent evt){
  if (evt.getOldValue() != null)   eventListeners.unregister(evt.getOldValue());
  if (evt.getNewValue() != null)   eventListeners.register(evt.getNewValue());
}
Program: 57363
Project: 57363
Buggy source:
@Override public void render(GLGraphics g,float w,float h,GLElement parent){
  if (h < 5)   return;
  float hi=Math.min(h,18);
  PerspectiveRow r=parent.getLayoutDataAs(PerspectiveRow.class,null);
  g.drawText(r.getLabel(),1,1 + (h - hi) * 0.5f,w - 2,hi - 2);
}

Fixed version (ground truth):
@Override public void render(GLGraphics g,float w,float h,GLElement parent){
  float hint=Math.min(h - 2,12);
  if (hint <= 0)   return;
  PerspectiveRow r=parent.getLayoutDataAs(PerspectiveRow.class,null);
  g.color(r.getDataDomain().getColor()).fillRect(1,(h - hint) * 0.5f,hint,hint);
  if (h < 5)   return;
  float x=hint + 2;
  float hi=Math.min(h,18);
  g.drawText(r.getLabel(),x,1 + (h - hi) * 0.5f,w - 2,hi - 2);
}
Program: 57364
Project: 57364
Buggy source:
public boolean destroy(ARankColumnModel col){
  removeFromPool(col);
  takeDown(col);
  return true;
}

Fixed version (ground truth):
public boolean destroy(ARankColumnModel col){
  removeFromPool(col);
  takeDown(col);
  propertySupport.firePropertyChange(PROP_REGISTER,col,null);
  return true;
}
Program: 57365
Project: 57365
Buggy source:
private void setup(ARankColumnModel col){
  col.init(this);
  if (col instanceof StackedRankColumnModel)   col.addPropertyChangeListener(ARankColumnModel.PROP_WEIGHT,resort);
  col.addPropertyChangeListener(IMappedColumnMixin.PROP_MAPPING,refilter);
  col.addPropertyChangeListener(IFilterColumnMixin.PROP_FILTER,refilter);
  if (col instanceof ACompositeRankColumnModel) {
    for (    ARankColumnModel child : ((ACompositeRankColumnModel)col))     setup(child);
  }
}

Fixed version (ground truth):
private void setup(ARankColumnModel col){
  col.init(this);
  if (col instanceof StackedRankColumnModel)   col.addPropertyChangeListener(ARankColumnModel.PROP_WEIGHT,resort);
  col.addPropertyChangeListener(IMappedColumnMixin.PROP_MAPPING,refilter);
  col.addPropertyChangeListener(IFilterColumnMixin.PROP_FILTER,refilter);
  if (col instanceof ACompositeRankColumnModel) {
    for (    ARankColumnModel child : ((ACompositeRankColumnModel)col))     setup(child);
  }
  propertySupport.firePropertyChange(PROP_REGISTER,null,col);
}
Program: 57366
Project: 57366
Buggy source:
@Override protected void updateMask(BitSet todo,List<IRow> data,BitSet mask){
  String regex=Pattern.quote(filter).replace("String_Node_Str","String_Node_Str");
  for (int i=todo.nextSetBit(0); i >= 0; i=todo.nextSetBit(i + 1)) {
    String v=this.data.apply(data.get(i));
    mask.set(i,Pattern.matches(regex,v));
  }
}

Fixed version (ground truth):
@Override protected void updateMask(BitSet todo,List<IRow> data,BitSet mask){
  String regex="String_Node_Str" + filter.replace("String_Node_Str","String_Node_Str") + "String_Node_Str";
  for (int i=todo.nextSetBit(0); i >= 0; i=todo.nextSetBit(i + 1)) {
    String v=this.data.apply(data.get(i));
    mask.set(i,Pattern.matches(regex,v));
  }
}
Program: 57367
Project: 57367
Buggy source:
@Override public void activeRendererChanged(MultiFormRenderer multiFormRenderer,int rendererID,int previousRendererID){
  updatePathLinks();
}

Fixed version (ground truth):
@Override public void activeRendererChanged(MultiFormRenderer multiFormRenderer,int rendererID,int previousRendererID){
  isLayoutDirty=true;
}
Program: 57368
Project: 57368
Buggy source:
@ListenTo(restrictExclusiveToEventSpace=true) protected void onPathwayPathChanged(PathwayPathSelectionEvent event){
  List<PathwayPath> segments=event.getPathSegments();
  List<List<PathwayVertexRep>> pathSegments=new ArrayList<>(segments.size());
  for (  PathwayPath path : segments) {
    pathSegments.add(path.getNodes());
  }
  PathwayPath path=segments.get(segments.size() - 1);
  if (path != null && path.getPath() != null) {
    if (path.getNodes().size() > 0) {
      PathwayVertexRep vertexRep=path.getNodes().get(path.getNodes().size() - 1);
      Set<PathwayVertexRep> equivalentVertexReps=PathwayManager.get().getEquivalentVertexReps(vertexRep);
      PathwayVertexRep eqVertexRep=null;
      PathwayVertexRep nextVertexRep=null;
      for (      PathwayVertexRep vr : equivalentVertexReps) {
        eqVertexRep=vr;
        PathwayGraph pw=eqVertexRep.getPathway();
        if (pw.getType() == EPathwayDatabaseType.KEGG) {
          Set<DefaultEdge> edges=pw.edgesOf(eqVertexRep);
          for (          DefaultEdge edge : edges) {
            if (pw.getEdgeSource(edge) == eqVertexRep) {
              nextVertexRep=pw.getEdgeTarget(edge);
              break;
            }
          }
          if (nextVertexRep != null)           break;
        }
      }
      if (eqVertexRep != null) {
        if (nextVertexRep != null) {
          List<PathwayVertexRep> nextSegment=new ArrayList<>(2);
          nextSegment.add(eqVertexRep);
          nextSegment.add(nextVertexRep);
          pathSegments.add(nextSegment);
        }
      }
    }
    setPath(pathSegments);
  }
 else {
    setPath(new ArrayList<List<PathwayVertexRep>>());
  }
}

Fixed version (ground truth):
@ListenTo(restrictExclusiveToEventSpace=true) protected void onPathwayPathChanged(PathwayPathSelectionEvent event){
  List<PathwayPath> segments=event.getPathSegments();
  List<List<PathwayVertexRep>> pathSegments=new ArrayList<>(segments.size());
  for (  PathwayPath path : segments) {
    pathSegments.add(path.getNodes());
  }
  setPath(pathSegments);
}
Program: 57369
Project: 57369
Buggy source:
private void triggerPathUpdate(){
  if (selectedPath == null)   return;
  PathwayPathSelectionEvent pathEvent=new PathwayPathSelectionEvent();
  List<PathwayPath> pathSegments=new ArrayList<>(1);
  pathSegments.add(new PathwayPath(selectedPath));
  pathEvent.setPathSegments(pathSegments);
  pathEvent.setSender(this);
  pathEvent.setEventSpace(pathwayPathEventSpace);
  eventPublisher.triggerEvent(pathEvent);
}

Fixed version (ground truth):
private void triggerPathUpdate(){
  List<PathwayPath> pathSegments=new ArrayList<>(1);
  PathwayPathSelectionEvent pathEvent=new PathwayPathSelectionEvent();
  if (selectedPath != null) {
    pathSegments.add(new PathwayPath(selectedPath));
  }
  pathEvent.setPathSegments(pathSegments);
  pathEvent.setSender(this);
  pathEvent.setEventSpace(pathwayPathEventSpace);
  eventPublisher.triggerEvent(pathEvent);
}
Program: 57370
Project: 57370
Buggy source:
@Override public void display(GL2 gl){
  gl.glPushMatrix();
  gl.glTranslatef(0,viewFrustum.getTop(),0);
  gl.glScalef(1,-1,1);
  if (dirtyLayout) {
    root.setBounds(0,0,viewFrustum.getRight(),viewFrustum.getTop());
    root.layout();
    dirtyLayout=false;
  }
  GLGraphics g=new GLGraphics(gl,this.getTextRenderer(),this.getTextureManager(),locator,true);
  g.checkError("String_Node_Str");
  if (isPickingRun(gl))   root.renderPick(g);
 else   root.render(g);
  g.checkError("String_Node_Str");
  g.destroy();
  checkForHits(gl);
  processEvents();
  gl.glPopMatrix();
}

Fixed version (ground truth):
@Override public void display(GL2 gl){
  gl.glPushMatrix();
  gl.glTranslatef(0,viewFrustum.getTop(),0);
  gl.glScalef(1,-1,1);
  if (isLayoutDirty) {
    root.setBounds(0,0,viewFrustum.getRight(),viewFrustum.getTop());
    root.layout();
    isLayoutDirty=false;
  }
  GLGraphics g=new GLGraphics(gl,this.getTextRenderer(),this.getTextureManager(),locator,true);
  g.checkError("String_Node_Str");
  if (isPickingRun(gl))   root.renderPick(g);
 else   root.render(g);
  g.checkError("String_Node_Str");
  g.destroy();
  checkForHits(gl);
  processEvents();
  gl.glPopMatrix();
}
Program: 57371
Project: 57371
Buggy source:
@Override public void relayout(){
  dirtyLayout=true;
}

Fixed version (ground truth):
@Override public void relayout(){
  isLayoutDirty=true;
}
Program: 57372
Project: 57372
Buggy source:
@Override protected void renderPickImpl(GLGraphics g,float w,float h){
  super.renderPickImpl(g,w,h);
  if (w <= 20)   return;
  g.incZ();
  float from=selectionMin;
  if (from > 0) {
    g.pushName(cursorMinPickingID);
    if (cursorMinHovered)     g.fillRect(from * w - 8,0,16,h);
 else     g.fillRect(from * w,0,1,h);
    g.popName();
  }
  float to=selectionMax;
  if (to < 1) {
    g.pushName(cursorMaxPickingID);
    if (cursorMaxHovered)     g.fillRect(to * w - 8,0,16,h);
 else     g.fillRect(to * w,0,1,h);
    g.popName();
  }
  g.decZ();
}

Fixed version (ground truth):
@Override protected void renderPickImpl(GLGraphics g,float w,float h){
  super.renderPickImpl(g,w,h);
  if (w <= 20)   return;
  g.incZ().incZ();
  float from=selectionMin;
  if (from > 0) {
    g.pushName(cursorMinPickingID);
    if (cursorMinHovered)     g.fillRect(from * w - 8,0,16,h);
 else     g.fillRect(from * w,0,1,h);
    g.popName();
  }
  float to=selectionMax;
  if (to < 1) {
    g.pushName(cursorMaxPickingID);
    if (cursorMaxHovered)     g.fillRect(to * w - 8,0,16,h);
 else     g.fillRect(to * w,0,1,h);
    g.popName();
  }
  g.decZ().decZ();
}
Program: 57373
Project: 57373
Buggy source:
private void checkOrderChanges(int index,ARankColumnModel col){
  if (col instanceof IFilterColumnMixin && ((IFilterColumnMixin)col).isFiltered()) {
    filter();
    return;
  }
}

Fixed version (ground truth):
private void checkOrderChanges(int index,ARankColumnModel col){
  if (col instanceof IFilterColumnMixin && ((IFilterColumnMixin)col).isFiltered()) {
    dirtyFilter=true;
    fireInvalid();
    return;
  }
}
Program: 57374
Project: 57374
Buggy source:
public IRow get(int index){
  checkOrder();
  return data.get(order[index]);
}

Fixed version (ground truth):
public IRow get(int index){
  if (index < 0)   return null;
  checkOrder();
  return data.get(order[index]);
}
Program: 57375
Project: 57375
Buggy source:
@Override public void propertyChange(PropertyChangeEvent evt){
  dirtyFilter=true;
}

Fixed version (ground truth):
@Override public void propertyChange(PropertyChangeEvent evt){
  dirtyFilter=true;
  fireInvalid();
}
Program: 57376
Project: 57376
Buggy source:
public StackedRankColumnModel(){
  super(Color.DARK_GRAY,new Color(0.90f,.90f,.90f));
  setWeight(0);
}

Fixed version (ground truth):
public StackedRankColumnModel(){
  super(Color.GRAY,new Color(0.90f,.90f,.90f));
  setWeight(0);
}
Program: 57377
Project: 57377
Buggy source:
@Override protected void takeDown(){
  this.table.removePropertyChangeListener(RankTableModel.PROP_SELECTED_ROW,layoutOnChange);
  this.table.removePropertyChangeListener(RankTableModel.PROP_ORDER,layoutOnChange);
  this.table.removePropertyChangeListener(RankTableModel.PROP_DATA,updateData);
  this.table.removePropertyChangeListener(RankTableModel.PROP_COLUMNS,columnsChanged);
  for (  GLElement col : this) {
    ARankColumnModel model=col.getLayoutDataAs(ARankColumnModel.class,null);
    model.removePropertyChangeListener(ARankColumnModel.PROP_WEIGHT,layoutOnChange);
    model.addPropertyChangeListener(ACompositeRankColumnModel.PROP_CHILDREN,columnsChanged);
  }
  for (  int pickingID : this.pickingIDs)   context.unregisterPickingListener(pickingID);
  this.pickingIDs=null;
  super.takeDown();
}

Fixed version (ground truth):
@Override protected void takeDown(){
  this.table.removePropertyChangeListener(RankTableModel.PROP_SELECTED_ROW,layoutOnChange);
  this.table.removePropertyChangeListener(RankTableModel.PROP_ORDER,layoutOnChange);
  this.table.removePropertyChangeListener(RankTableModel.PROP_INVALID,layoutOnChange);
  this.table.removePropertyChangeListener(RankTableModel.PROP_DATA,updateData);
  this.table.removePropertyChangeListener(RankTableModel.PROP_COLUMNS,columnsChanged);
  for (  GLElement col : this) {
    ARankColumnModel model=col.getLayoutDataAs(ARankColumnModel.class,null);
    model.removePropertyChangeListener(ARankColumnModel.PROP_WEIGHT,layoutOnChange);
    model.addPropertyChangeListener(ACompositeRankColumnModel.PROP_CHILDREN,columnsChanged);
  }
  for (  int pickingID : this.pickingIDs)   context.unregisterPickingListener(pickingID);
  this.pickingIDs=null;
  super.takeDown();
}
Program: 57378
Project: 57378
Buggy source:
public TableBodyUI(RankTableModel table,IRowHeightLayout rowLayout){
  this.table=table;
  this.rowLayout=rowLayout;
  this.table.addPropertyChangeListener(RankTableModel.PROP_SELECTED_ROW,layoutOnChange);
  this.table.addPropertyChangeListener(RankTableModel.PROP_ORDER,layoutOnChange);
  this.table.addPropertyChangeListener(RankTableModel.PROP_DATA,updateData);
  this.table.addPropertyChangeListener(RankTableModel.PROP_COLUMNS,columnsChanged);
  for (  ARankColumnModel col : table.getColumns()) {
    if (col instanceof StackedRankColumnModel) {
      StackedRankColumnModel s=(StackedRankColumnModel)col;
      TableStackedColumnUI ui=new TableStackedColumnUI(s);
      ui.setData(table.getData());
      init(col);
      this.add(ui);
    }
 else {
      this.add(wrap(col));
    }
  }
  setLayout(this);
}

Fixed version (ground truth):
public TableBodyUI(RankTableModel table,IRowHeightLayout rowLayout){
  this.table=table;
  this.rowLayout=rowLayout;
  this.table.addPropertyChangeListener(RankTableModel.PROP_SELECTED_ROW,layoutOnChange);
  this.table.addPropertyChangeListener(RankTableModel.PROP_ORDER,layoutOnChange);
  this.table.addPropertyChangeListener(RankTableModel.PROP_INVALID,layoutOnChange);
  this.table.addPropertyChangeListener(RankTableModel.PROP_DATA,updateData);
  this.table.addPropertyChangeListener(RankTableModel.PROP_COLUMNS,columnsChanged);
  for (  ARankColumnModel col : table.getColumns()) {
    if (col instanceof StackedRankColumnModel) {
      StackedRankColumnModel s=(StackedRankColumnModel)col;
      TableStackedColumnUI ui=new TableStackedColumnUI(s);
      ui.setData(table.getData());
      init(col);
      this.add(ui);
    }
 else {
      this.add(wrap(col));
    }
  }
  setLayout(this);
}
Program: 57379
Project: 57379
Buggy source:
private void init(){
  hashPathwayTitleToPathway=new HashMap<String,PathwayGraph>();
  hashPathwayDatabase=new HashMap<EPathwayDatabaseType,PathwayDatabase>();
  hashPathwayToVisibilityState=new HashMap<PathwayGraph,Boolean>();
  xmlParserManager=new PathwayParserManager();
  KgmlSaxHandler kgmlParser=new KgmlSaxHandler();
  xmlParserManager.registerAndInitSaxHandler(kgmlParser);
}

Fixed version (ground truth):
private void init(){
  mapPathwayDBToPathways=new HashMap<>();
  hashPathwayDatabase=new HashMap<EPathwayDatabaseType,PathwayDatabase>();
  hashPathwayToVisibilityState=new HashMap<PathwayGraph,Boolean>();
  xmlParserManager=new PathwayParserManager();
  KgmlSaxHandler kgmlParser=new KgmlSaxHandler();
  xmlParserManager.registerAndInitSaxHandler(kgmlParser);
}
Program: 57380
Project: 57380
Buggy source:
public PathwayGraph createPathway(final EPathwayDatabaseType type,final String sName,final String sTitle,final String sImageLink,final String sExternalLink){
  PathwayGraph pathway=new PathwayGraph(type,sName,sTitle,sImageLink,sExternalLink);
  registerItem(pathway);
  hashPathwayTitleToPathway.put(sTitle,pathway);
  hashPathwayToVisibilityState.put(pathway,false);
  currentPathwayGraph=pathway;
  return pathway;
}

Fixed version (ground truth):
public PathwayGraph createPathway(final EPathwayDatabaseType type,final String sName,final String sTitle,final String sImageLink,final String sExternalLink){
  PathwayGraph pathway=new PathwayGraph(type,sName,sTitle,sImageLink,sExternalLink);
  registerItem(pathway);
  Map<String,PathwayGraph> mapTitleToPathway=mapPathwayDBToPathways.get(type);
  if (mapTitleToPathway == null) {
    mapTitleToPathway=new HashMap<>();
    mapPathwayDBToPathways.put(type,mapTitleToPathway);
  }
  mapTitleToPathway.put(sTitle,pathway);
  hashPathwayToVisibilityState.put(pathway,false);
  currentPathwayGraph=pathway;
  return pathway;
}
Program: 57381
Project: 57381
Buggy source:
public PathwayGraph getPathwayByTitle(final String pathwayTitle,EPathwayDatabaseType pathwayDatabaseType){
  waitUntilPathwayLoadingIsFinished();
  Iterator<String> iterPathwayName=hashPathwayTitleToPathway.keySet().iterator();
  Pattern pattern=Pattern.compile(pathwayTitle,Pattern.CASE_INSENSITIVE);
  Matcher regexMatcher;
  String tempPathwayTitle;
  while (iterPathwayName.hasNext()) {
    tempPathwayTitle=iterPathwayName.next();
    regexMatcher=pattern.matcher(tempPathwayTitle);
    if (regexMatcher.find()) {
      PathwayGraph pathway=hashPathwayTitleToPathway.get(tempPathwayTitle);
      if (getItem(pathway.getID()).getType() != pathwayDatabaseType) {
        continue;
      }
      return pathway;
    }
  }
  return null;
}

Fixed version (ground truth):
public PathwayGraph getPathwayByTitle(final String pathwayTitle,EPathwayDatabaseType pathwayDatabaseType){
  waitUntilPathwayLoadingIsFinished();
  Map<String,PathwayGraph> mapTitleToPathway=mapPathwayDBToPathways.get(pathwayDatabaseType);
  if (mapTitleToPathway == null)   return null;
  Iterator<String> iterPathwayName=mapTitleToPathway.keySet().iterator();
  Pattern pattern=Pattern.compile(pathwayTitle,Pattern.CASE_INSENSITIVE);
  Matcher regexMatcher;
  String tempPathwayTitle;
  while (iterPathwayName.hasNext()) {
    tempPathwayTitle=iterPathwayName.next();
    regexMatcher=pattern.matcher(tempPathwayTitle);
    if (regexMatcher.find() && tempPathwayTitle.length() == pathwayTitle.length()) {
      PathwayGraph pathway=mapTitleToPathway.get(tempPathwayTitle);
      return pathway;
    }
  }
  return null;
}
Program: 57382
Project: 57382
Buggy source:
@Override protected GLElement createRoot(){
  return baseContainer;
}

Fixed version (ground truth):
@Override protected GLElement createRoot(){
  return root;
}
Program: 57383
Project: 57383
Buggy source:
@Override public void registerEventListeners(){
  super.registerEventListeners();
  eventListeners.register(AddTablePerspectivesEvent.class,new AddTablePerspectivesListener().setHandler(this));
}

Fixed version (ground truth):
@Override public void registerEventListeners(){
  super.registerEventListeners();
  eventListeners.register(AddTablePerspectivesEvent.class,new AddTablePerspectivesListener().setHandler(this));
  eventListeners.register(pathEventSpaceHandler,pathEventSpace);
}
Program: 57385
Project: 57385
Buggy source:
/** 
 * Constructor.
 * @param glCanvas
 * @param viewLabel
 * @param viewFrustum
 */
public GLSubGraph(IGLCanvas glCanvas,Composite parentComposite,ViewFrustum viewFrustum){
  super(glCanvas,parentComposite,viewFrustum,VIEW_TYPE,VIEW_NAME);
  pathEventSpace=GeneralManager.get().getEventPublisher().createUniqueEventSpace();
  baseContainer=new GLElementContainer(GLLayouts.flowHorizontal(10));
  pathwayColumn=new GLElementContainer(GLLayouts.flowVertical(10));
  baseContainer.add(pathwayColumn,0.4f);
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param glCanvas
 * @param viewLabel
 * @param viewFrustum
 */
public GLSubGraph(IGLCanvas glCanvas,Composite parentComposite,ViewFrustum viewFrustum){
  super(glCanvas,parentComposite,viewFrustum,VIEW_TYPE,VIEW_NAME);
  pathEventSpace=GeneralManager.get().getEventPublisher().createUniqueEventSpace();
  baseContainer.add(pathwayColumn,0.4f);
  root.add(baseContainer);
  root.add(augmentation);
}
Program: 57386
Project: 57386
Buggy source:
@Override public void init(GL2 gl){
  displayListIndex=gl.glGenLists(1);
  layoutDisplayListIndex=gl.glGenLists(1);
  textRenderer=new CaleydoTextRenderer(24);
  detailLevel=EDetailLevel.HIGH;
  pathRenderer.setTextRenderer(textRenderer);
  pathRenderer.setPixelGLConverter(pixelGLConverter);
  pathRenderer.init();
  layoutManager=new LayoutManager(viewFrustum,pixelGLConverter);
  layoutManager.setUseDisplayLists(true);
  ElementLayout pathElementLayout=new ElementLayout();
  pathElementLayout.setPixelSizeX(pathRenderer.getMinWidthPixels());
  pathElementLayout.setRenderer(pathRenderer);
  layoutManager.setBaseElementLayout(pathElementLayout);
  layoutManager.updateLayout();
}

Fixed version (ground truth):
@Override public void init(GL2 gl){
  displayListIndex=gl.glGenLists(1);
  layoutDisplayListIndex=gl.glGenLists(1);
  textRenderer=new CaleydoTextRenderer(24);
  detailLevel=EDetailLevel.HIGH;
  pathRenderer.setTextRenderer(textRenderer);
  pathRenderer.setPixelGLConverter(pixelGLConverter);
  pathRenderer.init();
  mappedDataRenderer.init();
  layoutManager=new LayoutManager(viewFrustum,pixelGLConverter);
  layoutManager.setUseDisplayLists(true);
  ElementLayout pathElementLayout=new ElementLayout();
  pathElementLayout.setPixelSizeX(pathRenderer.getMinWidthPixels());
  pathElementLayout.setRenderer(pathRenderer);
  layoutManager.setBaseElementLayout(pathElementLayout);
  layoutManager.updateLayout();
}
Program: 57387
Project: 57387
Buggy source:
@Override public AGLView createRemoteView(AGLView remoteRenderingView,List<TablePerspective> tablePerspectives,String embeddingEventSpace){
  GLEnRoutePathway enRoute=(GLEnRoutePathway)GeneralManager.get().getViewManager().createGLView(GLEnRoutePathway.class,remoteRenderingView.getParentGLCanvas(),remoteRenderingView.getParentComposite(),new ViewFrustum(CameraProjectionMode.ORTHOGRAPHIC,0,1,0,1,-1,1));
  enRoute.setRemoteRenderingGLView((IGLRemoteRenderingView)remoteRenderingView);
  enRoute.addTablePerspectives(tablePerspectives);
  enRoute.setPathwayPathEventSpace(embeddingEventSpace);
  enRoute.initialize();
  return enRoute;
}

Fixed version (ground truth):
@Override public AGLView createRemoteView(AGLView remoteRenderingView,List<TablePerspective> tablePerspectives,String embeddingEventSpace){
  GLEnRoutePathway enRoute=(GLEnRoutePathway)GeneralManager.get().getViewManager().createGLView(GLEnRoutePathway.class,remoteRenderingView.getParentGLCanvas(),remoteRenderingView.getParentComposite(),new ViewFrustum(CameraProjectionMode.ORTHOGRAPHIC,0,1,0,1,-1,1));
  enRoute.setRemoteRenderingGLView((IGLRemoteRenderingView)remoteRenderingView);
  enRoute.addTablePerspectives(tablePerspectives);
  enRoute.setPathwayPathEventSpace(embeddingEventSpace);
  enRoute.initialize();
  enRoute.getPathRenderer().setSizeConfig(PathSizeConfiguration.ENROUTE_COMPACT);
  return enRoute;
}
Program: 57388
Project: 57388
Buggy source:
/** 
 * Constructor with parent view as parameter.
 */
public MappedDataRenderer(GLEnRoutePathway parentView){
  this.parentView=parentView;
  viewFrustum=new ViewFrustum();
  baseLayoutManger=new LayoutManager(viewFrustum,parentView.getPixelGLConverter());
  highlightLayoutManger=new LayoutManager(viewFrustum,parentView.getPixelGLConverter());
  geneSelectionManager=parentView.getGeneSelectionManager();
  List<GeneticDataDomain> dataDomains=DataDomainManager.get().getDataDomainsByType(GeneticDataDomain.class);
  if (dataDomains.size() != 0) {
    sampleIDType=dataDomains.get(0).getSampleIDType().getIDCategory().getPrimaryMappingType();
    sampleSelectionManager=parentView.getSampleSelectionManager();
    sampleGroupSelectionManager=new EventBasedSelectionManager(parentView,dataDomains.get(0).getSampleGroupIDType());
    SelectionTypeEvent selectionTypeEvent=new SelectionTypeEvent(abstractGroupType);
    GeneralManager.get().getEventPublisher().triggerEvent(selectionTypeEvent);
  }
 else {
    throw new IllegalStateException("String_Node_Str");
  }
  registerPickingListeners();
}

Fixed version (ground truth):
/** 
 * Constructor with parent view as parameter.
 */
public MappedDataRenderer(GLEnRoutePathway parentView){
  this.parentView=parentView;
  geneSelectionManager=parentView.getGeneSelectionManager();
  List<GeneticDataDomain> dataDomains=DataDomainManager.get().getDataDomainsByType(GeneticDataDomain.class);
  if (dataDomains.size() != 0) {
    sampleIDType=dataDomains.get(0).getSampleIDType().getIDCategory().getPrimaryMappingType();
    sampleSelectionManager=parentView.getSampleSelectionManager();
    sampleGroupSelectionManager=new EventBasedSelectionManager(parentView,dataDomains.get(0).getSampleGroupIDType());
    SelectionTypeEvent selectionTypeEvent=new SelectionTypeEvent(abstractGroupType);
    GeneralManager.get().getEventPublisher().triggerEvent(selectionTypeEvent);
  }
 else {
    throw new IllegalStateException("String_Node_Str");
  }
  registerPickingListeners();
}
Program: 57389
Project: 57389
Buggy source:
/** 
 * @param sizeConfig setter, see  {@link sizeConfig}
 */
public void setSizeConfig(PathSizeConfiguration sizeConfig){
  this.sizeConfig=sizeConfig;
}

Fixed version (ground truth):
/** 
 * @param sizeConfig setter, see  {@link sizeConfig}
 */
public void setSizeConfig(PathSizeConfiguration sizeConfig){
  this.sizeConfig=sizeConfig;
  if (pathSegments != null && !pathSegments.isEmpty())   updateLayout();
}
Program: 57390
Project: 57390
Buggy source:
public EnRoutePathRenderer(AGLView view,List<TablePerspective> tablePerspectives){
  super(view,tablePerspectives);
  setSizeConfig(new PathSizeConfiguration.Builder(PathSizeConfiguration.ENROUTE_COMPACT).branchSummaryNodeWidth(50).branchAreaWidth(65).pathAreaWidth(80).minNodeSpacing(25).branchNodeToPathNodeVerticalSpacing(10).branchSummaryNodeBranchAreaSpacing(4).build());
}

Fixed version (ground truth):
public EnRoutePathRenderer(AGLView view,List<TablePerspective> tablePerspectives){
  super(view,tablePerspectives);
  setSizeConfig(PathSizeConfiguration.ENROUTE_DEFAULT);
}
Program: 57391
Project: 57391
Buggy source:
@Override public ALayoutRenderer createRemoteView(AGLView remoteRenderingView,List<TablePerspective> tablePerspectives,String embeddingEventSpace){
  APathwayPathRenderer renderer=new VerticalPathRenderer(remoteRenderingView,tablePerspectives);
  renderer.setPathwayPathEventSpace(embeddingEventSpace);
  renderer.init();
  return renderer;
}

Fixed version (ground truth):
@Override public ALayoutRenderer createRemoteView(AGLView remoteRenderingView,List<TablePerspective> tablePerspectives,String embeddingEventSpace){
  APathwayPathRenderer renderer=new VerticalPathRenderer(remoteRenderingView,tablePerspectives);
  renderer.setPathwayPathEventSpace(embeddingEventSpace);
  renderer.setSizeConfig(PathSizeConfiguration.COMPACT);
  renderer.init();
  return renderer;
}
Program: 57392
Project: 57392
Buggy source:
@Override public ALayoutRenderer createRemoteView(AGLView remoteRenderingView,List<TablePerspective> tablePerspectives,String embeddingEventSpace){
  APathwayPathRenderer renderer=new VerticalPathRenderer(remoteRenderingView,tablePerspectives);
  renderer.setPathwayPathEventSpace(embeddingEventSpace);
  if (tablePerspectives.size() > 0) {
    TablePerspective tablePerspective=tablePerspectives.get(0);
    if (!(tablePerspective instanceof PathwayTablePerspective)) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    renderer.setPathway(((PathwayTablePerspective)tablePerspective).getPathway());
  }
  renderer.init();
  return renderer;
}

Fixed version (ground truth):
@Override public ALayoutRenderer createRemoteView(AGLView remoteRenderingView,List<TablePerspective> tablePerspectives,String embeddingEventSpace){
  APathwayPathRenderer renderer=new VerticalPathRenderer(remoteRenderingView,tablePerspectives);
  renderer.setPathwayPathEventSpace(embeddingEventSpace);
  if (tablePerspectives.size() > 0) {
    TablePerspective tablePerspective=tablePerspectives.get(0);
    if (!(tablePerspective instanceof PathwayTablePerspective)) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    renderer.setPathway(((PathwayTablePerspective)tablePerspective).getPathway());
  }
  renderer.setSizeConfig(PathSizeConfiguration.COMPACT);
  renderer.init();
  return renderer;
}
Program: 57393
Project: 57393
Buggy source:
@Override public Vec2f getAbsoluteLocation(){
  return new Vec2f(viewFrustum.getLeft(),viewFrustum.getTop());
}

Fixed version (ground truth):
@Override public Vec2f getAbsoluteLocation(){
  return new Vec2f(viewFrustum.getLeft(),viewFrustum.getBottom());
}
Program: 57394
Project: 57394
Buggy source:
public PathwayGraph getPathway(){
  return pathway;
}

Fixed version (ground truth):
@Override public PathwayGraph getPathway(){
  return pathway;
}
Program: 57395
Project: 57395
Buggy source:
FirehoseProvider(String tumor,Date analysisRun,Date dataRun,Settings settings){
  this.tumor=tumor;
  this.tumorSample=guessTumorSample(tumor,analysisRun);
  this.analysisRun=analysisRun;
  this.dataRun=dataRun;
  this.settings=settings;
  String tmpDir=settings.getTemporaryDirectory();
  this.tmpAnalysisDir=createTempDirectory(tmpDir,analysisRun,tumor);
  this.tmpDataDir=createTempDirectory(tmpDir,dataRun,tumor);
}

Fixed version (ground truth):
FirehoseProvider(String tumor,Date analysisRun,Date dataRun,Settings settings){
  this.tumor=tumor;
  this.relevantDate=Calendar.getInstance();
  this.relevantDate.setTime(analysisRun);
  this.tumorSample=guessTumorSample(tumor,this.relevantDate);
  this.analysisRun=analysisRun;
  this.dataRun=dataRun;
  this.settings=settings;
  String tmpDir=settings.getTemporaryDirectory();
  this.tmpAnalysisDir=createTempDirectory(tmpDir,analysisRun,tumor);
  this.tmpDataDir=createTempDirectory(tmpDir,dataRun,tumor);
}
Program: 57396
Project: 57396
Buggy source:
public Pair<File,Integer> findMutationFile(){
  int startColumn=8;
  File mutationFile=extractAnalysisRunFile(getFileName("String_Node_Str"),"String_Node_Str",LEVEL);
  if (mutationFile == null)   mutationFile=extractAnalysisRunFile(getFileName("String_Node_Str"),"String_Node_Str",LEVEL);
  if (mutationFile == null) {
    File maf=extractAnalysisRunFile(tumor + "String_Node_Str","String_Node_Str",LEVEL);
    if (maf != null) {
      mutationFile=parseMAF(maf);
      startColumn=1;
    }
  }
  return Pair.make(mutationFile,startColumn);
}

Fixed version (ground truth):
public Pair<File,Integer> findMutationFile(){
  int startColumn=8;
  File mutationFile=null;
  if (relevantDate.get(Calendar.YEAR) < 2013) {
    mutationFile=extractAnalysisRunFile(getFileName("String_Node_Str"),"String_Node_Str",LEVEL);
    if (mutationFile == null)     mutationFile=extractAnalysisRunFile(getFileName("String_Node_Str"),"String_Node_Str",LEVEL);
  }
  if (mutationFile == null) {
    File maf=extractAnalysisRunFile(tumor + "String_Node_Str","String_Node_Str",LEVEL);
    if (maf != null) {
      mutationFile=parseMAF(maf);
      startColumn=1;
    }
  }
  return Pair.make(mutationFile,startColumn);
}
Program: 57397
Project: 57397
Buggy source:
/** 
 * logic determining the tumor sample based on the analysis run
 * @param tumor
 * @param date
 * @return
 */
private static String guessTumorSample(String tumor,Date date){
  Calendar cal=Calendar.getInstance();
  cal.setTime(date);
  if (cal.get(Calendar.YEAR) >= 2013)   return tumor + "String_Node_Str";
  return tumor;
}

Fixed version (ground truth):
/** 
 * logic determining the tumor sample based on the analysis run
 * @param tumor
 * @param date
 * @return
 */
private static String guessTumorSample(String tumor,Calendar cal){
  if (cal.get(Calendar.YEAR) >= 2013)   return tumor + "String_Node_Str";
  return tumor;
}
Program: 57398
Project: 57398
Buggy source:
@Override protected String compute(){
  System.out.println("String_Node_Str" + tumorType + "String_Node_Str"+ analysisRun);
  String runSpecificOutputPath=settings.getDataDirectory(Settings.format(analysisRun));
  FirehoseProvider firehoseProvider=settings.createFirehoseProvider(tumorType,analysisRun,dataRun);
  ProjectDescription project=new TCGAXMLGenerator(firehoseProvider,settings).invoke();
  if (project.getDataSetDescriptionCollection().isEmpty())   return null;
  if (settings.isDownloadOnly())   return null;
  System.out.println("String_Node_Str" + tumorType + "String_Node_Str"+ analysisRun);
  String projectOutputPath=runSpecificOutputPath + analysisRun + "String_Node_Str"+ tumorType+ "String_Node_Str";
  Collection<ATableBasedDataDomain> dataDomains=new XMLToProjectBuilder().buildProject(project,projectOutputPath);
  project=null;
  String projectRemoteOutputURL=settings.getTcgaServerURL() + analysisRun + "String_Node_Str"+ analysisRun+ "String_Node_Str"+ tumorType+ "String_Node_Str";
  StringBuilder report=new StringBuilder();
  String jnlpFileName=analysisRun + "String_Node_Str" + tumorType+ "String_Node_Str";
  String firehoseReportURL=firehoseProvider.getReportURL();
  generateTumorReportLine(report,dataDomains,tumorType,analysisRun,jnlpFileName,projectRemoteOutputURL,firehoseReportURL);
  generateJNLP(new File(settings.getJNLPOutputDirectory(),jnlpFileName),projectRemoteOutputURL);
  cleanUp(dataDomains);
  return report.toString();
}

Fixed version (ground truth):
@Override protected String compute(){
  System.out.println("String_Node_Str" + tumorType + "String_Node_Str"+ analysisRun);
  String run=Settings.format(analysisRun);
  String runSpecificOutputPath=settings.getDataDirectory(run);
  FirehoseProvider firehoseProvider=settings.createFirehoseProvider(tumorType,analysisRun,dataRun);
  ProjectDescription project=new TCGAXMLGenerator(firehoseProvider,settings).invoke();
  if (project.getDataSetDescriptionCollection().isEmpty())   return null;
  if (settings.isDownloadOnly())   return null;
  System.out.println("String_Node_Str" + tumorType + "String_Node_Str"+ analysisRun);
  String projectOutputPath=runSpecificOutputPath + run + "String_Node_Str"+ tumorType+ "String_Node_Str";
  Collection<ATableBasedDataDomain> dataDomains=new XMLToProjectBuilder().buildProject(project,projectOutputPath);
  project=null;
  String projectRemoteOutputURL=settings.getTcgaServerURL() + run + "String_Node_Str"+ run+ "String_Node_Str"+ tumorType+ "String_Node_Str";
  StringBuilder report=new StringBuilder();
  String jnlpFileName=run + "String_Node_Str" + tumorType+ "String_Node_Str";
  String firehoseReportURL=firehoseProvider.getReportURL();
  generateTumorReportLine(report,dataDomains,tumorType,analysisRun,jnlpFileName,projectRemoteOutputURL,firehoseReportURL);
  generateJNLP(new File(settings.getJNLPOutputDirectory(),jnlpFileName),projectRemoteOutputURL);
  cleanUp(dataDomains);
  return report.toString();
}
Program: 57399
Project: 57399
Buggy source:
/** 
 * returns an id of a free display list index
 * @param g
 * @return
 */
public int checkOut(GLGraphics g){
  if (displayListIndices.isEmpty())   createDisplayListIndices(g);
  if (displayListIndices.isEmpty()) {
    return -1;
  }
  int i=displayListIndices.pop();
  return i;
}

Fixed version (ground truth):
/** 
 * returns an id of a free display list index
 * @param g
 * @return
 */
public int checkOut(GLGraphics g){
  if (isRecording())   return -1;
  if (displayListIndices.isEmpty())   createDisplayListIndices(g);
  if (displayListIndices.isEmpty()) {
    return -1;
  }
  int i=displayListIndices.pop();
  return i;
}
Program: 57400
Project: 57400
Buggy source:
@Override protected void takeDown(){
  IGLView view=(IGLView)context;
  GL2 gl=view.getParentGLCanvas().asGLAutoDrawAble().getGL().getGL2();
  this.layout.destroy(gl);
  super.takeDown();
}

Fixed version (ground truth):
@Override protected void takeDown(){
}
Program: 57401
Project: 57401
Buggy source:
public final void clear(){
  for (Iterator<GLElement> it=this.iterator(); it.hasNext(); ) {
    GLElement e=it.next();
    takeDown(e);
    it.remove();
  }
  relayout();
}

Fixed version (ground truth):
public final void clear(){
  for (Iterator<GLElement> it=children.iterator(); it.hasNext(); ) {
    GLElement e=it.next();
    takeDown(e);
    it.remove();
  }
  relayout();
}
Program: 57402
Project: 57402
Buggy source:
@Override public ALayoutRenderer createRemoteView(AGLView remoteRenderingView,List<TablePerspective> tablePerspectives,String embeddingEventSpace){
  APathwayPathRenderer renderer=new VerticalPathRenderer(remoteRenderingView,tablePerspectives);
  renderer.init();
  return renderer;
}

Fixed version (ground truth):
@Override public ALayoutRenderer createRemoteView(AGLView remoteRenderingView,List<TablePerspective> tablePerspectives,String embeddingEventSpace){
  APathwayPathRenderer renderer=new VerticalPathRenderer(remoteRenderingView,tablePerspectives);
  renderer.setPathwayPathEventSpace(embeddingEventSpace);
  renderer.init();
  return renderer;
}
Program: 57405
Project: 57405
Buggy source:
@Override public void apply(ALinearizableNode node){
  this.node=node;
  destroy();
  init();
  attributeRenderers.clear();
  Column baseColumn=new Column("String_Node_Str");
  Row baseRow=new Row("String_Node_Str");
  ColorRenderer colorRenderer=new ColorRenderer(new float[]{1,1,1,1});
  colorRenderer.setView(view);
  colorRenderer.setBorderColor(new float[]{0,0,0,1});
  colorRenderer.addPickingID(EPickingType.LINEARIZABLE_NODE.name(),node.getNodeId());
  baseColumn.addBackgroundRenderer(colorRenderer);
  ElementLayout labelLayout=new ElementLayout("String_Node_Str");
  LabelRenderer labelRenderer=new LabelRenderer(view,node);
  labelRenderer.setAlignment(LabelRenderer.LabelAlignment.CENTER);
  labelLayout.setRenderer(labelRenderer);
  labelLayout.setPixelSizeY(16);
  ElementLayout horizontalSpacing=new ElementLayout();
  horizontalSpacing.setPixelSizeX(2);
  baseRow.append(labelLayout);
  ElementLayout verticalSpacing=new ElementLayout();
  verticalSpacing.setPixelSizeY(2);
  baseColumn.append(verticalSpacing);
  baseColumn.append(baseRow);
  baseColumn.append(verticalSpacing);
  layoutManager.setBaseElementLayout(baseColumn);
  for (  ALinearizableNode childNode : ((ComplexNode)node).getNodes()) {
    enRoutePathRenderer.setPreviewMode(childNode);
  }
}

Fixed version (ground truth):
@Override public void apply(ALinearizableNode node){
  this.node=node;
  destroy();
  init();
  attributeRenderers.clear();
  Column baseColumn=new Column("String_Node_Str");
  Row baseRow=new Row("String_Node_Str");
  ColorRenderer colorRenderer=new ColorRenderer(new float[]{1,1,1,1});
  colorRenderer.setView(view);
  colorRenderer.setBorderColor(new float[]{0,0,0,1});
  colorRenderer.setDrawBorder(true);
  colorRenderer.addPickingID(EPickingType.LINEARIZABLE_NODE.name(),node.getNodeId());
  baseColumn.addBackgroundRenderer(colorRenderer);
  ElementLayout labelLayout=new ElementLayout("String_Node_Str");
  LabelRenderer labelRenderer=new LabelRenderer(view,node);
  labelRenderer.setAlignment(LabelRenderer.LabelAlignment.CENTER);
  labelLayout.setRenderer(labelRenderer);
  labelLayout.setPixelSizeY(16);
  ElementLayout horizontalSpacing=new ElementLayout();
  horizontalSpacing.setPixelSizeX(2);
  baseRow.append(labelLayout);
  ElementLayout verticalSpacing=new ElementLayout();
  verticalSpacing.setPixelSizeY(2);
  baseColumn.append(verticalSpacing);
  baseColumn.append(baseRow);
  baseColumn.append(verticalSpacing);
  layoutManager.setBaseElementLayout(baseColumn);
  for (  ALinearizableNode childNode : ((ComplexNode)node).getNodes()) {
    enRoutePathRenderer.setPreviewMode(childNode);
  }
}