nus-yam/ex-repair huggingface dataset:
Program: 56742
Project: 56742
Buggy source:
@Override protected void renderContent(GL2 gl){
  final PixelGLConverter pixelGLConverter=view.getPixelGLConverter();
  float w=pixelGLConverter.getPixelWidthForGLWidth(x);
  float h=pixelGLConverter.getPixelHeightForGLHeight(y);
  gl.glPushMatrix();
  gl.glTranslatef(0,y,0);
  gl.glScalef(x / w,-y / h,1);
  float hh=view.getParentGLCanvas().getDIPHeight();
  this.location=pixelGLConverter.getCurrentPixelPos(gl);
  this.location.setY(hh - this.location.y());
  if (dirty) {
    root.setBounds(0,0,w,h);
    dirty=false;
  }
  final boolean isPickingRun=GLGraphics.isPickingPass(gl);
  int deltaTimeMs=0;
  if (!isPickingRun) {
    deltaTimeMs=local.getDeltaTimeMs();
  }
  GLGraphics g=new GLGraphics(gl,local,true,deltaTimeMs);
  g.checkError("String_Node_Str");
  if (isPickingRun) {
    root.renderPick(g);
  }
 else {
    root.layout(deltaTimeMs);
    root.render(g);
  }
  g.checkError("String_Node_Str");
  gl.glPopMatrix();
}

Fixed version (ground truth):
@Override protected void renderContent(GL2 gl){
  final PixelGLConverter pixelGLConverter=view.getPixelGLConverter();
  float w=pixelGLConverter.getPixelWidthForGLWidth(x);
  float h=pixelGLConverter.getPixelHeightForGLHeight(y);
  gl.glPushMatrix();
  gl.glTranslatef(0,y,0);
  gl.glScalef(x / w,-y / h,1);
  float hh=view.getParentGLCanvas().getDIPHeight();
  this.location=pixelGLConverter.getCurrentPixelPos(gl);
  this.location.setY(hh - this.location.y());
  if (dirty) {
    root.setBounds(0,0,w,h);
    root.relayout();
    dirty=false;
  }
  final boolean isPickingRun=GLGraphics.isPickingPass(gl);
  int deltaTimeMs=0;
  if (!isPickingRun) {
    deltaTimeMs=local.getDeltaTimeMs();
  }
  GLGraphics g=new GLGraphics(gl,local,true,deltaTimeMs);
  g.checkError("String_Node_Str");
  if (isPickingRun) {
    root.renderPick(g);
  }
 else {
    root.layout(deltaTimeMs);
    root.render(g);
  }
  g.checkError("String_Node_Str");
  gl.glPopMatrix();
}
Program: 56743
Project: 56743
Buggy source:
private boolean addPortalHighlightRenderer(PathwayVertexRep vertexRep,PathwayMultiFormInfo info){
  PathwayGraph pathway=PathwayManager.get().getPathwayByTitle(vertexRep.getName(),EPathwayDatabaseType.KEGG);
  boolean wasHighlighted=false;
  if (pathway != null) {
    PathwayMultiFormInfo windowInfo=getPathwayMultiFormInfo(pathway);
    if (windowInfo != null) {
      PortalHighlightRenderer renderer=new PortalHighlightRenderer(getPortalLocation(vertexRep,info).getFirst(),(GLPathwayWindow)windowInfo.window);
      augmentation.add(renderer);
      wasHighlighted=true;
    }
  }
  return wasHighlighted;
}

Fixed version (ground truth):
private boolean addPortalHighlightRenderer(PathwayVertexRep vertexRep,PathwayMultiFormInfo info){
  PathwayGraph pathway=PathwayManager.get().getPathwayByTitle(vertexRep.getName(),EPathwayDatabaseType.KEGG);
  boolean wasHighlighted=false;
  if (pathway != null) {
    PathwayMultiFormInfo windowInfo=getPathwayMultiFormInfo(pathway);
    if (windowInfo != null) {
      PortalHighlightRenderer renderer=new PortalHighlightRenderer(info,getPortalLocation(vertexRep,info).getFirst(),(GLPathwayWindow)windowInfo.window);
      augmentation.add(renderer);
      wasHighlighted=true;
    }
  }
  return wasHighlighted;
}
Program: 56744
Project: 56744
Buggy source:
private void highlightPathwayNodePortals(PathwayMultiFormInfo info){
  if (info.getCurrentEmbeddingID() == EEmbeddingID.PATHWAY_LEVEL1) {
    for (    PathwayVertexRep vertexRep : info.pathway.vertexSet()) {
      if (vertexRep.getType() == EPathwayVertexType.map) {
        PathwayGraph pathway=PathwayManager.get().getPathwayByTitle(vertexRep.getName(),EPathwayDatabaseType.KEGG);
        PathwayMultiFormInfo target=getPathwayMultiFormInfo(pathway);
        if (target != null) {
          PortalHighlightRenderer renderer=new PortalHighlightRenderer(getPortalLocation(vertexRep,info).getFirst(),(GLPathwayWindow)target.window);
          augmentation.add(renderer);
        }
      }
    }
  }
}

Fixed version (ground truth):
private void highlightPathwayNodePortals(PathwayMultiFormInfo info){
  if (info.getCurrentEmbeddingID() == EEmbeddingID.PATHWAY_LEVEL1) {
    for (    PathwayVertexRep vertexRep : info.pathway.vertexSet()) {
      if (vertexRep.getType() == EPathwayVertexType.map) {
        PathwayGraph pathway=PathwayManager.get().getPathwayByTitle(vertexRep.getName(),EPathwayDatabaseType.KEGG);
        PathwayMultiFormInfo target=getPathwayMultiFormInfo(pathway);
        if (target != null) {
          PortalHighlightRenderer renderer=new PortalHighlightRenderer(info,getPortalLocation(vertexRep,info).getFirst(),(GLPathwayWindow)target.window);
          augmentation.add(renderer);
        }
      }
    }
  }
}
Program: 56745
Project: 56745
Buggy source:
@Override public float getMinHeight(){
  return info.multiFormRenderer.getMinHeightPixels() + 20;
}

Fixed version (ground truth):
@Override public float getMinHeight(){
  PathwayMultiFormInfo pInfo=(PathwayMultiFormInfo)info;
  return pInfo.getCurrentPathwayRepresentation().getMinHeight() + 20;
}
Program: 56746
Project: 56746
Buggy source:
@Override protected void renderImpl(GLGraphics g,float w,float h){
  g.incZ(0.5f);
  g.color(PortalRenderStyle.CONTEXT_PORTAL_COLOR).lineWidth(2).drawRoundedRect(location.x() + 1,location.y() + 1,location.width() + 1,location.height() + 1,location.height() / 5.0f);
  g.lineWidth(1);
  g.incZ(-0.5f);
}

Fixed version (ground truth):
@Override protected void renderImpl(GLGraphics g,float w,float h){
  if (info.window.isZoomed())   return;
  g.incZ(0.5f);
  g.color(PortalRenderStyle.CONTEXT_PORTAL_COLOR).lineWidth(2).drawRoundedRect(location.x() + 1,location.y() + 1,location.width() + 1,location.height() + 1,location.height() / 5.0f);
  g.lineWidth(1);
  g.incZ(-0.5f);
}
Program: 56747
Project: 56747
Buggy source:
@Override protected void renderPickImpl(GLGraphics g,float w,float h){
  g.incZ(0.5f);
  g.fillRect(location.x() + 1,location.y() + 1,location.width() + 1,location.height() + 1);
  g.lineWidth(1);
  g.incZ(-0.5f);
}

Fixed version (ground truth):
@Override protected void renderPickImpl(GLGraphics g,float w,float h){
  if (info.window.isZoomed())   return;
  g.incZ(0.5f);
  g.fillRect(location.x() + 1,location.y() + 1,location.width() + 1,location.height() + 1);
  g.lineWidth(1);
  g.incZ(-0.5f);
}
Program: 56748
Project: 56748
Buggy source:
/** 
 */
public PortalHighlightRenderer(Rect location,GLPathwayWindow window){
  this.location=location;
  this.window=window;
}

Fixed version (ground truth):
/** 
 */
public PortalHighlightRenderer(PathwayMultiFormInfo info,Rect location,GLPathwayWindow window){
  this.location=location;
  this.window=window;
  this.info=info;
}
Program: 56749
Project: 56749
Buggy source:
@Override public float getMinWidth(){
  if (minWidth < 0)   return minWidth;
  if (pathway == null)   return 120;
  return pathway.getWidth() * 0.8f;
}

Fixed version (ground truth):
@Override public float getMinWidth(){
  if (minWidth > 0)   return minWidth;
  if (pathway == null)   return 120;
  return pathway.getWidth() * 0.8f;
}
Program: 56750
Project: 56750
Buggy source:
@Override public float getMinHeight(){
  if (minHeight < 0)   return minHeight;
  if (pathway == null)   return 120;
  return pathway.getHeight() * 0.8f;
}

Fixed version (ground truth):
@Override public float getMinHeight(){
  if (minHeight > 0)   return minHeight;
  if (pathway == null)   return 120;
  return pathway.getHeight() * 0.8f;
}
Program: 56751
Project: 56751
Buggy source:
/** 
 * finds a parent in the hierarchy that is of the specific instance
 * @param satisfies
 * @return
 */
protected final <T>T findParent(Class<T> isInstanceOf){
  IGLElementParent act=parent;
  while (act != null && !(isInstanceOf.isInstance(act))) {
    act=parent.getParent();
  }
  return isInstanceOf.cast(act);
}

Fixed version (ground truth):
/** 
 * finds a parent in the hierarchy that is of the specific instance
 * @param satisfies
 * @return
 */
protected final <T>T findParent(Class<T> isInstanceOf){
  IGLElementParent act=parent;
  while (act != null && !(isInstanceOf.isInstance(act))) {
    act=act.getParent();
  }
  return isInstanceOf.cast(act);
}
Program: 56752
Project: 56752
Buggy source:
/** 
 * Returns the 3-component color for the given table cell. This works independent of the data type. FIXME: inhomogeneous numerical is not implemented
 * @param dimensionID
 * @param recordID
 * @return
 */
public float[] getColor(Integer dimensionID,Integer recordID){
  if (isDataHomogeneous()) {
    return getColorMapper().getColor(getNormalizedValue(dimensionID,recordID));
  }
 else {
    if (EDataClass.CATEGORICAL.equals(getDataClass(dimensionID,recordID))) {
      CategoricalClassDescription<?> specific=(CategoricalClassDescription<?>)getDataClassSpecificDescription(dimensionID,recordID);
      Object category=getRaw(dimensionID,recordID);
      return specific.getCategoryProperty(category).getColor().getRGBA();
    }
 else {
      throw new IllegalStateException("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * Returns the 3-component color for the given table cell. This works independent of the data type. FIXME: inhomogeneous numerical is not implemented
 * @param dimensionID
 * @param recordID
 * @return
 */
public float[] getColor(Integer dimensionID,Integer recordID){
  if (isDataHomogeneous()) {
    return getColorMapper().getColor(getNormalizedValue(dimensionID,recordID));
  }
 else {
    if (EDataClass.CATEGORICAL.equals(getDataClass(dimensionID,recordID))) {
      CategoricalClassDescription<?> specific=(CategoricalClassDescription<?>)getDataClassSpecificDescription(dimensionID,recordID);
      Object category=getRaw(dimensionID,recordID);
      if (category == null)       return Color.NOT_A_NUMBER_COLOR.getRGBA();
      CategoryProperty<?> p=specific.getCategoryProperty(category);
      if (p == null)       return Color.NOT_A_NUMBER_COLOR.getRGBA();
      return specific.getCategoryProperty(category).getColor().getRGBA();
    }
 else {
      Float v=getNormalizedValue(dimensionID,recordID);
      if (v == null || v.isNaN())       return Color.NOT_A_NUMBER_COLOR.getRGBA();
      return new Color(v.floatValue()).getRGBA();
    }
  }
}
Program: 56753
Project: 56753
Buggy source:
@Override public boolean doLayout(List<? extends IGLLayoutElement> children,float w,float h,IGLLayoutElement parent,int deltaTimeMs){
  for (  IGLLayoutElement child : children) {
    child.setBounds(defaultValue(child.getSetX(),0),defaultValue(child.getSetY(),0),defaultValue(child.getSetWidth(),w),defaultValue(child.getSetHeight(),h));
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean doLayout(List<? extends IGLLayoutElement> children,float w,float h,IGLLayoutElement parent,int deltaTimeMs){
  for (  IGLLayoutElement child : children) {
    child.setBounds(defaultValue2(child.getSetX(),0),defaultValue2(child.getSetY(),0),defaultValue(child.getSetWidth(),w),defaultValue(child.getSetHeight(),h));
  }
  return false;
}
Program: 56754
Project: 56754
Buggy source:
public GLPathwayView(IGLCanvas glCanvas){
  super(glCanvas,VIEW_TYPE,VIEW_NAME);
  pathwayElement=new PathwayElement(eventSpace);
  pathwayElement.setPathwayRepresentation(new PathwayTextureRepresentation(PathwayManager.get().getPathwayByTitle("String_Node_Str",EPathwayDatabaseType.KEGG)));
  PathwayDataMappingHandler pathwayMappingHandler=new PathwayDataMappingHandler();
  pathwayMappingHandler.setEventSpace(eventSpace);
  AverageColorMappingAugmentation colorMappingAugmentation=new AverageColorMappingAugmentation(pathwayElement.getPathwayRepresentation(),pathwayElement.getMappingHandler());
  pathwayElement.addBackgroundAugmentation(colorMappingAugmentation);
  pathwayElement.addBackgroundAugmentation(new MultiMappingIndicatorAugmentation(pathwayElement.getPathwayRepresentation()));
  pathwayElement.addForegroundAugmentation(new BubbleSetPathAugmentation(pathwayElement.getPathwayRepresentation()));
  pathwayElement.addForegroundAugmentation(new StdDevBarAugmentation(pathwayElement.getPathwayRepresentation(),pathwayElement.getMappingHandler()));
  pathwayElement.addForegroundAugmentation(new HighVarianceIndicatorAugmentation(pathwayElement.getPathwayRepresentation(),pathwayElement.getMappingHandler()));
  pathwayElement.addForegroundAugmentation(new StdDevBarConsideringVertexHighlightAugmentation(pathwayElement));
}

Fixed version (ground truth):
public GLPathwayView(IGLCanvas glCanvas){
  super(glCanvas,VIEW_TYPE,VIEW_NAME);
  pathwayElement=new PathwayElement(eventSpace);
  pathwayElement.setPathwayRepresentation(new PathwayTextureRepresentation(PathwayManager.get().getPathwayByTitle("String_Node_Str",EPathwayDatabaseType.KEGG)));
  PathwayDataMappingHandler pathwayMappingHandler=new PathwayDataMappingHandler();
  pathwayMappingHandler.setEventSpace(eventSpace);
  AverageColorMappingAugmentation colorMappingAugmentation=new AverageColorMappingAugmentation(pathwayElement.getPathwayRepresentation(),pathwayElement.getMappingHandler());
  pathwayElement.addBackgroundAugmentation(colorMappingAugmentation);
  pathwayElement.addBackgroundAugmentation(new MultiMappingIndicatorAugmentation(pathwayElement.getPathwayRepresentation()));
  pathwayElement.addForegroundAugmentation(new BubbleSetPathAugmentation(pathwayElement.getPathwayRepresentation(),canvas));
  pathwayElement.addForegroundAugmentation(new StdDevBarAugmentation(pathwayElement.getPathwayRepresentation(),pathwayElement.getMappingHandler()));
  pathwayElement.addForegroundAugmentation(new HighVarianceIndicatorAugmentation(pathwayElement.getPathwayRepresentation(),pathwayElement.getMappingHandler()));
  pathwayElement.addForegroundAugmentation(new StdDevBarConsideringVertexHighlightAugmentation(pathwayElement));
}
Program: 56755
Project: 56755
Buggy source:
public BubbleSetPathAugmentation(IPathwayRepresentation pathwayRepresentation){
  this.pathwayRepresentation=pathwayRepresentation;
  this.pathHandler=new PathwayPathHandler(pathwayRepresentation);
  pathHandler.addPathUpdateListener(this);
  setOutline=new BubbleSet(100,20,3,10.0,7.0,0.5,2.5,15.0,8);
  ((BubbleSet)setOutline).useVirtualEdges(false);
  shaper=new BSplineShapeGenerator(setOutline);
  bubblesetCanvas=new CanvasComponent(shaper);
  bubblesetCanvas.setDefaultView();
}

Fixed version (ground truth):
public BubbleSetPathAugmentation(IPathwayRepresentation pathwayRepresentation,IGLCanvas canvas){
  this.pathwayRepresentation=pathwayRepresentation;
  this.pathHandler=new PathwayPathHandler(pathwayRepresentation,canvas);
  pathHandler.addPathUpdateListener(this);
  setOutline=new BubbleSet(100,20,3,10.0,7.0,0.5,2.5,15.0,8);
  ((BubbleSet)setOutline).useVirtualEdges(false);
  shaper=new BSplineShapeGenerator(setOutline);
  bubblesetCanvas=new CanvasComponent(shaper);
  bubblesetCanvas.setDefaultView();
}
Program: 56756
Project: 56756
Buggy source:
public PathwayPathHandler(IPathwayRepresentation pathwayRepresentation){
  this.pathwayRepresentation=pathwayRepresentation;
  pathwayRepresentation.addVertexRepSelectionListener(this);
}

Fixed version (ground truth):
public PathwayPathHandler(IPathwayRepresentation pathwayRepresentation,IGLCanvas canvas){
  this.pathwayRepresentation=pathwayRepresentation;
  this.canvas=canvas;
  pathwayRepresentation.addVertexRepSelectionListener(this);
  keyListener=GLThreadListenerWrapper.wrap(new IGLKeyListener(){
    @Override public void keyReleased(    IKeyEvent e){
      isControlDown=e.isControlDown();
      isShiftDown=e.isShiftDown();
      isAltDown=e.isAltDown();
    }
    @Override public void keyPressed(    IKeyEvent e){
      isControlDown=e.isControlDown();
      isShiftDown=e.isShiftDown();
      isAltDown=e.isAltDown();
    }
  }
);
  canvas.addKeyListener(keyListener);
}
Program: 56757
Project: 56757
Buggy source:
protected void addToPath(PathSegment segment){
  if (selectedPath.isEmpty()) {
    selectedPath.add(segment);
  }
 else {
    PathSegment lastSegment=selectedPath.get(selectedPath.size() - 1);
    if (lastSegment.getPathway() == pathwayRepresentation.getPathway()) {
      PathwayVertexRep lastVertex=lastSegment.get(lastSegment.size() - 1);
      if (lastVertex == segment.get(0)) {
        lastSegment.remove(lastSegment.size() - 1);
        lastSegment.addAll(segment);
      }
    }
 else {
      selectedPath.add(segment);
    }
  }
  notifyListeners();
}

Fixed version (ground truth):
protected void addToPath(PathSegment segment){
  if (segment == null || segment.isEmpty())   return;
  if (selectedPath.isEmpty()) {
    selectedPath.add(segment);
  }
 else {
    PathSegment lastSegment=selectedPath.get(selectedPath.size() - 1);
    if (lastSegment.getPathway() == pathwayRepresentation.getPathway()) {
      int index=lastSegment.lastIndexOf(segment.get(0));
      if (index >= 0) {
        int numElementsToRemove=lastSegment.size() - index;
        for (int i=1; i <= numElementsToRemove; i++) {
          lastSegment.remove(lastSegment.size() - 1);
        }
        lastSegment.addAll(segment);
      }
 else {
        selectedPath.add(segment);
      }
    }
 else {
      selectedPath.add(segment);
    }
  }
  StringBuilder b=new StringBuilder("String_Node_Str");
  for (  PathSegment s : selectedPath) {
    b.append("String_Node_Str");
    for (    PathwayVertexRep v : s) {
      b.append(v.getShortName() + "String_Node_Str");
    }
    b.append("String_Node_Str");
  }
  b.append("String_Node_Str");
  System.out.println(b);
  notifyListeners();
}
Program: 56758
Project: 56758
Buggy source:
protected void selectPath(PathwayVertexRep from,PathwayVertexRep to){
  if (from == to) {
    addToPath(new PathSegment(Arrays.asList(from)));
  }
 else {
    KShortestPaths<PathwayVertexRep,DefaultEdge> pathAlgo=new KShortestPaths<PathwayVertexRep,DefaultEdge>(pathwayRepresentation.getPathway(),from,MAX_ALTERNATIVE_PATHS);
    List<GraphPath<PathwayVertexRep,DefaultEdge>> paths=pathAlgo.getPaths(to);
    if (paths != null && !paths.isEmpty()) {
      addToPath(new PathSegment(paths.get(0)));
    }
  }
}

Fixed version (ground truth):
protected void selectPath(PathwayVertexRep from,PathwayVertexRep to){
  List<PathSegment> paths=calcPaths(from,to);
  if (!paths.isEmpty()) {
    addToPath(paths.get(0));
  }
}
Program: 56759
Project: 56759
Buggy source:
@Override public void onSelect(PathwayVertexRep vertexRep,Pick pick){
  if (!isPathSelectionMode || (vertexRep.getType() != EPathwayVertexType.gene && vertexRep.getType() != EPathwayVertexType.compound && vertexRep.getType() != EPathwayVertexType.group))   return;
switch (pick.getPickingMode()) {
case MOUSE_OVER:
    if (startVertexRep != null) {
      selectPath(startVertexRep,vertexRep);
    }
  break;
case CLICKED:
if (startVertexRep == null) {
  startVertexRep=vertexRep;
  selectedPath.clear();
  selectPath(startVertexRep,vertexRep);
}
 else {
  selectPath(startVertexRep,vertexRep);
  startVertexRep=null;
}
break;
default :
break;
}
}

Fixed version (ground truth):
@Override public void onSelect(PathwayVertexRep vertexRep,Pick pick){
  if (!isPathSelectionMode || (vertexRep.getType() != EPathwayVertexType.gene && vertexRep.getType() != EPathwayVertexType.compound && vertexRep.getType() != EPathwayVertexType.group))   return;
  vertexRep=getSelectableVertexRepForPath(vertexRep);
switch (pick.getPickingMode()) {
case MOUSE_OVER:
    if (startVertexRep != null) {
      selectPath(startVertexRep,vertexRep);
    }
 else     if (isShiftDown && !selectedPath.isEmpty()) {
      PathwayVertexRep v=selectedPath.getLast().getLast();
      List<PathSegment> paths=calcPaths(v,vertexRep);
      if (!paths.isEmpty() && v != vertexRep) {
        startVertexRep=v;
        addToPath(paths.get(0));
      }
    }
  break;
case CLICKED:
boolean isVertexEquivalentToLastVertexInPath=isVertexEquivalentToLastVertexOfPath(vertexRep);
if (isVertexEquivalentToLastVertexInPath && selectedPath.getLast().size() == 1) {
selectedPath.remove(selectedPath.size() - 1);
}
if (isShiftDown) {
handleShiftClick(vertexRep);
}
 else {
handleClick(vertexRep,isVertexEquivalentToLastVertexInPath);
}
break;
default :
break;
}
}
Program: 56760
Project: 56760
Buggy source:
@Override public void init(GLAutoDrawable drawable){
  super.init(drawable);
  IDBrowserElement r=(IDBrowserElement)getRoot();
  this.tableKeyListener=GLThreadListenerWrapper.wrap(new RankTableKeyListener(r.getTable()));
  this.canvas.addKeyListener(tableKeyListener);
  RankTableUIMouseKeyListener tableUIListener=new RankTableUIMouseKeyListener(r.getBody());
  this.tableKeyListener2=GLThreadListenerWrapper.wrap((IGLKeyListener)tableUIListener);
  this.tableMouseListener=GLThreadListenerWrapper.wrap((IGLMouseListener)tableUIListener);
  this.canvas.addKeyListener(eventListeners.register(this.tableKeyListener2));
  this.canvas.addMouseListener(eventListeners.register(this.tableMouseListener));
}

Fixed version (ground truth):
@Override public void init(GLAutoDrawable drawable){
  super.init(drawable);
  IDBrowserElement r=(IDBrowserElement)getRoot();
  this.tableKeyListener=GLThreadListenerWrapper.wrap(new RankTableKeyListener(r.getTable(),r.getBody()));
  this.canvas.addKeyListener(eventListeners.register(tableKeyListener));
}
Program: 56761
Project: 56761
Buggy source:
@Override public void dispose(GLAutoDrawable drawable){
  canvas.removeKeyListener(tableKeyListener);
  canvas.removeKeyListener(tableKeyListener2);
  canvas.removeMouseListener(tableMouseListener);
  super.dispose(drawable);
}

Fixed version (ground truth):
@Override public void dispose(GLAutoDrawable drawable){
  canvas.removeKeyListener(tableKeyListener);
  super.dispose(drawable);
}
Program: 56762
Project: 56762
Buggy source:
/** 
 * @param in
 * @param l
 * @return
 * @throws IOException
 */
private static String readChars(ObjectInputStream in,int l) throws IOException {
  char[] r=new char[l];
  for (int i=0; i < l; ++l)   r[i]=in.readChar();
  return new String(r);
}

Fixed version (ground truth):
/** 
 * @param in
 * @param l
 * @return
 * @throws IOException
 */
private static String readChars(ObjectInputStream in,int l) throws IOException {
  char[] r=new char[l];
  for (int i=0; i < l; ++i)   r[i]=in.readChar();
  return new String(r);
}
Program: 56763
Project: 56763
Buggy source:
@Override public void drop(DropTargetEvent event){
  event.detail=acceptDetail;
  IDnDItem item=toItem(event);
  if (validateDropTarget(event,item)) {
    if (event.detail == DND.DROP_DEFAULT)     event.detail=fromType(activeDropTarget.defaultSWTDnDType(item));
    EventPublisher.trigger(new DropItemEvent(readOnly(item),activeDropTarget,true).to(MouseLayer.this));
    activeDropTarget=null;
  }
}

Fixed version (ground truth):
@Override public void drop(DropTargetEvent event){
  event.detail=acceptDetail;
  IDnDItem item=toItem(event);
  if (validateDropTarget(event,item)) {
    if (event.detail == DND.DROP_DEFAULT)     event.detail=fromType(activeDropTarget.defaultSWTDnDType(item));
    EventPublisher.trigger(new DropItemEvent(readOnly(item),activeDropTarget,true).to(MouseLayer.this));
    activeDropTarget=null;
  }
  if (active != null && active.source == null)   active=null;
}
Program: 56764
Project: 56764
Buggy source:
@ListenTo private void onDropEnterLeaveItemEvent(DropEnterLeaveItemEvent event){
  IDnDItem item=event.getItem();
  if (event.isEntering()) {
    if (!showhideInfo(item.getInfo(),EVisibility.VISIBLE)) {
      addInfo(item instanceof DNDItem ? ((DNDItem)item).source : null,item);
    }
  }
 else {
    removeInfo(item.getInfo());
  }
}

Fixed version (ground truth):
@ListenTo(sendToMe=true) private void onDropEnterLeaveItemEvent(DropEnterLeaveItemEvent event){
  IDnDItem item=event.getItem();
  if (event.isEntering()) {
    if (!showhideInfo(item.getInfo(),EVisibility.VISIBLE)) {
      addInfo(item instanceof DNDItem ? ((DNDItem)item).source : null,item);
    }
  }
 else {
    removeInfo(item.getInfo());
  }
}
Program: 56765
Project: 56765
Buggy source:
@Override public <T>T getLayoutDataAs(Class<T> clazz,Supplier<T> default_){
  if (clazz.isAssignableFrom(Vec2f.class))   return clazz.cast(getMinSize());
  if (clazz.isInstance(getTablePerspective()))   return clazz.cast(getTablePerspective());
  if (clazz.isInstance(getDataDomain()))   return clazz.cast(getDataDomain());
  return super.getLayoutDataAs(clazz,default_);
}

Fixed version (ground truth):
@Override public <T>T getLayoutDataAs(Class<T> clazz,Supplier<? extends T> default_){
  if (clazz.isAssignableFrom(Vec2f.class))   return clazz.cast(getMinSize());
  if (clazz.isInstance(getTablePerspective()))   return clazz.cast(getTablePerspective());
  if (clazz.isInstance(getDataDomain()))   return clazz.cast(getDataDomain());
  return super.getLayoutDataAs(clazz,default_);
}
Program: 56767
Project: 56767
Buggy source:
protected void updateScrollBars(float w,float h){
  vScrollBarSize=(h / renderer.getMinHeightPixels()) * h;
  if (vScrollBarSize < h) {
    if (vScrollBarPosition < 0) {
      vScrollBarPosition=0;
    }
    if (vScrollBarPosition + vScrollBarSize > h) {
      vScrollBarPosition=h - vScrollBarSize;
    }
  }
  hScrollBarSize=(w / renderer.getMinWidthPixels()) * w;
  if (hScrollBarSize < w) {
    if (hScrollBarPosition < 0) {
      hScrollBarPosition=0;
    }
    if (hScrollBarPosition + hScrollBarSize > w) {
      hScrollBarPosition=w - hScrollBarSize;
    }
  }
}

Fixed version (ground truth):
protected void updateScrollBars(float w,float h){
  vScrollBarSize=(h / renderer.getMinHeightPixels()) * h;
  if (vScrollBarSize < h) {
    if (vScrollBarPosition < 0) {
      vScrollBarPosition=0;
    }
    if (vScrollBarPosition + vScrollBarSize > h) {
      vScrollBarPosition=h - vScrollBarSize;
    }
  }
 else {
    vScrollBarPosition=0;
  }
  hScrollBarSize=(w / renderer.getMinWidthPixels()) * w;
  if (hScrollBarSize < w) {
    if (hScrollBarPosition < 0) {
      hScrollBarPosition=0;
    }
    if (hScrollBarPosition + hScrollBarSize > w) {
      hScrollBarPosition=w - hScrollBarSize;
    }
  }
 else {
    hScrollBarPosition=0;
  }
}
Program: 56770
Project: 56770
Buggy source:
@Override protected ADataDomainQuery createFor(IDataDomain dd){
  return new InhomogenousDataDomainQuery((ATableBasedDataDomain)dd,Sets.immutableEnumSet(EDataClass.NATURAL_NUMBER,EDataClass.REAL_NUMBER));
}

Fixed version (ground truth):
protected ADataDomainQuery createFor(IDataDomain dd){
  return new InhomogenousDataDomainQuery((ATableBasedDataDomain)dd,Sets.immutableEnumSet(EDataClass.NATURAL_NUMBER,EDataClass.REAL_NUMBER));
}
Program: 56771
Project: 56771
Buggy source:
@Override public boolean filterBoundView(IDataDomain dataDomain){
  return true;
}

Fixed version (ground truth):
@Override public boolean filterBoundView(ADataDomainQuery query){
  return true;
}
Program: 56774
Project: 56774
Buggy source:
private void selectNextPath(boolean inc){
  if (this.allPathsList.size() < 1)   return;
  List<GraphPath<PathwayVertexRep,DefaultEdge>> paths=this.allPathsList.get(this.allPathsList.size() - 1).getFirst();
  if (paths.size() > 1) {
    if (inc)     selectedPathID++;
 else     selectedPathID--;
    if (selectedPathID < 0)     selectedPathID=0;
    if (selectedPathID > paths.size() - 1)     selectedPathID=paths.size() - 1;
    if (allPaths.size() > 0) {
      selectedPath=paths.get(selectedPathID);
      if (selectedPath.getEdgeList().size() > 0 && !isShiftKeyDown) {
        PathwayVertexRep startPrevVertex=selectedPath.getStartVertex();
        PathwayVertexRep endPrevVertex=selectedPath.getEndVertex();
        List<DefaultEdge> edgePrevList=selectedPath.getEdgeList();
        previousSelectedPath=new GraphPathImpl<PathwayVertexRep,DefaultEdge>(pathway,startPrevVertex,endPrevVertex,edgePrevList,0);
      }
    }
  }
 else {
    selectedPathID=0;
  }
  this.allPathsList.get(this.allPathsList.size() - 1).setSecond(selectedPathID);
  isBubbleTextureDirty=true;
  setDisplayListDirty();
  triggerPathUpdate();
}

Fixed version (ground truth):
private void selectNextPath(boolean inc){
  if (this.allPathsList.size() < 1)   return;
  List<GraphPath<PathwayVertexRep,DefaultEdge>> paths=this.allPathsList.get(this.allPathsList.size() - 1).getFirst();
  if (paths.size() > 1) {
    if (inc)     selectedPathID++;
 else     selectedPathID--;
    if (selectedPathID < 0)     selectedPathID=paths.size() - 1;
    if (selectedPathID > paths.size() - 1)     selectedPathID=0;
    if (allPaths.size() > 0) {
      selectedPath=paths.get(selectedPathID);
      if (selectedPath.getEdgeList().size() > 0 && !isShiftKeyDown) {
        PathwayVertexRep startPrevVertex=selectedPath.getStartVertex();
        PathwayVertexRep endPrevVertex=selectedPath.getEndVertex();
        List<DefaultEdge> edgePrevList=selectedPath.getEdgeList();
        previousSelectedPath=new GraphPathImpl<PathwayVertexRep,DefaultEdge>(pathway,startPrevVertex,endPrevVertex,edgePrevList,0);
      }
    }
  }
 else {
    selectedPathID=0;
  }
  this.allPathsList.get(this.allPathsList.size() - 1).setSecond(selectedPathID);
  isBubbleTextureDirty=true;
  setDisplayListDirty();
  triggerPathUpdate();
}
Program: 56775
Project: 56775
Buggy source:
@Override public boolean performFinish(){
  ChooseProjectTypePage page=getChosenProjectTypePage();
  Pair<String,IStartupAddon> addon=page.getSelectedAddon();
  if (page.isPageComplete() && addon.getSecond().validate()) {
    MyPreferences.setLastChosenProjectMode(addon.getFirst());
    MyPreferences.flush();
    setResult(addon.getSecond().create());
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  ChooseProjectTypePage page=getChosenProjectTypePage();
  Pair<String,IStartupAddon> addon=page.getSelectedAddon();
  if (page.isPageComplete()) {
    MyPreferences.setLastChosenProjectMode(addon.getFirst());
    MyPreferences.flush();
    setResult(addon.getSecond().create());
    return true;
  }
  return false;
}
Program: 56776
Project: 56776
Buggy source:
@Override public void createControl(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new GridLayout(1,false));
  this.tabFolder=new TabFolder(composite,SWT.BORDER);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  gridData.widthHint=WIDTH;
  tabFolder.setLayoutData(gridData);
  String previous=MyPreferences.getLastChosenProjectMode();
  for (  Map.Entry<String,IStartupAddon> addon : addons.entrySet()) {
    Composite tabContent=addon.getValue().create(tabFolder,this);
    if (tabContent == null)     continue;
    tabContent.pack();
    TabItem item=new TabItem(tabFolder,SWT.NONE);
    item.setText(addon.getKey());
    item.setControl(tabContent);
    item.setData(Pair.make(addon.getKey(),addon.getValue()));
    if (Objects.equals(previous,addon.getKey()))     tabFolder.setSelection(item);
  }
  tabFolder.pack();
  this.setControl(composite);
  composite.pack();
}

Fixed version (ground truth):
@Override public void createControl(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new GridLayout(1,false));
  this.tabFolder=new TabFolder(composite,SWT.BORDER);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  gridData.widthHint=WIDTH;
  tabFolder.setLayoutData(gridData);
  tabFolder.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      setPageComplete(true);
      updateButtons();
    }
  }
);
  String previous=MyPreferences.getLastChosenProjectMode();
  for (  Map.Entry<String,IStartupAddon> addon : addons.entrySet()) {
    Composite tabContent=addon.getValue().create(tabFolder,this,this);
    if (tabContent == null)     continue;
    tabContent.pack();
    TabItem item=new TabItem(tabFolder,SWT.NONE);
    item.setText(addon.getKey());
    item.setControl(tabContent);
    item.setData(Pair.make(addon.getKey(),addon.getValue()));
    if (Objects.equals(previous,addon.getKey()))     tabFolder.setSelection(item);
  }
  tabFolder.pack();
  this.setControl(composite);
  composite.pack();
}
Program: 56777
Project: 56777
Buggy source:
private Button createSample(String url,String name,String description,Composite g,SelectionListener l,boolean first){
  try {
    URL u=new URL(url);
    Button button=new Button(g,SWT.RADIO);
    button.setText(name);
    FontUtil.makeBold(button);
    button.setData(u);
    button.addSelectionListener(l);
    GridData gd=new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
    gd.verticalIndent=first ? 0 : 20;
    button.setLayoutData(gd);
    if (url.equals(MyPreferences.getLastChosenSampleProject())) {
      button.setSelection(true);
      selectedChoice=u;
    }
    Link desc=new Link(g,SWT.WRAP);
    desc.setText(description);
    desc.addSelectionListener(BrowserUtils.LINK_LISTENER);
    gd=new GridData(GridData.FILL_HORIZONTAL);
    desc.setLayoutData(gd);
    return button;
  }
 catch (  MalformedURLException e) {
    System.err.println("String_Node_Str" + url);
    return null;
  }
}

Fixed version (ground truth):
private Button createSample(String url,String name,String description,Composite g,SelectionListener l,boolean first,Listener listener){
  try {
    URL u=new URL(url);
    Button button=new Button(g,SWT.RADIO);
    button.setText(name);
    FontUtil.makeBold(button);
    button.setData(u);
    button.addSelectionListener(l);
    button.addListener(SWT.Selection,listener);
    GridData gd=new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
    gd.verticalIndent=first ? 0 : 20;
    button.setLayoutData(gd);
    if (url.equals(MyPreferences.getLastChosenSampleProject())) {
      button.setSelection(true);
      selectedChoice=u;
    }
    Link desc=new Link(g,SWT.WRAP);
    desc.setText(description);
    desc.addSelectionListener(BrowserUtils.LINK_LISTENER);
    gd=new GridData(GridData.FILL_HORIZONTAL);
    desc.setLayoutData(gd);
    return button;
  }
 catch (  MalformedURLException e) {
    System.err.println("String_Node_Str" + url);
    return null;
  }
}
Program: 56778
Project: 56778
Buggy source:
private TreeViewer createSelectionTree(final SashForm form,final WizardPage page){
  final TreeViewer v=new TreeViewer(form,SWT.VIRTUAL | SWT.BORDER);
  v.setLabelProvider(new LabelProvider());
  v.setContentProvider(new MyContentProvider(v));
  v.setUseHashlookup(true);
  v.addSelectionChangedListener(new ISelectionChangedListener(){
    @Override public void selectionChanged(    SelectionChangedEvent event){
      IStructuredSelection s=(IStructuredSelection)event.getSelection();
      Object f=s.getFirstElement();
      if (f instanceof TumorProject) {
        selectedChoice=((TumorProject)f).getProject();
        page.setPageComplete(true);
      }
 else {
        selectedChoice=null;
        page.setPageComplete(false);
      }
      if (f instanceof TumorProject) {
        updateDetailInfo((TumorProject)f);
        form.setMaximizedControl(null);
      }
 else       if (f instanceof RunOverview) {
        updateDetailInfo((RunOverview)f);
        clearDetailInfo();
        form.setMaximizedControl(v.getControl());
      }
 else {
        clearDetailInfo();
        form.setMaximizedControl(v.getControl());
      }
    }
  }
);
  return v;
}

Fixed version (ground truth):
private TreeViewer createSelectionTree(final SashForm form,final WizardPage page,final Listener listener){
  final TreeViewer v=new TreeViewer(form,SWT.VIRTUAL | SWT.BORDER);
  v.setLabelProvider(new LabelProvider());
  v.setContentProvider(new MyContentProvider(v));
  v.setUseHashlookup(true);
  v.addSelectionChangedListener(new ISelectionChangedListener(){
    @Override public void selectionChanged(    SelectionChangedEvent event){
      IStructuredSelection s=(IStructuredSelection)event.getSelection();
      Object f=s.getFirstElement();
      if (f instanceof TumorProject) {
        selectedChoice=((TumorProject)f).getProject();
        page.setPageComplete(true);
      }
 else {
        selectedChoice=null;
        page.setPageComplete(false);
      }
      if (f instanceof TumorProject) {
        updateDetailInfo((TumorProject)f);
        form.setMaximizedControl(null);
      }
 else       if (f instanceof RunOverview) {
        updateDetailInfo((RunOverview)f);
        clearDetailInfo();
        form.setMaximizedControl(v.getControl());
      }
 else {
        clearDetailInfo();
        form.setMaximizedControl(v.getControl());
      }
      listener.handleEvent(null);
    }
  }
);
  return v;
}
Program: 56779
Project: 56779
Buggy source:
@Override public void selectionChanged(SelectionChangedEvent event){
  IStructuredSelection s=(IStructuredSelection)event.getSelection();
  Object f=s.getFirstElement();
  if (f instanceof TumorProject) {
    selectedChoice=((TumorProject)f).getProject();
    page.setPageComplete(true);
  }
 else {
    selectedChoice=null;
    page.setPageComplete(false);
  }
  if (f instanceof TumorProject) {
    updateDetailInfo((TumorProject)f);
    form.setMaximizedControl(null);
  }
 else   if (f instanceof RunOverview) {
    updateDetailInfo((RunOverview)f);
    clearDetailInfo();
    form.setMaximizedControl(v.getControl());
  }
 else {
    clearDetailInfo();
    form.setMaximizedControl(v.getControl());
  }
}

Fixed version (ground truth):
@Override public void selectionChanged(SelectionChangedEvent event){
  IStructuredSelection s=(IStructuredSelection)event.getSelection();
  Object f=s.getFirstElement();
  if (f instanceof TumorProject) {
    selectedChoice=((TumorProject)f).getProject();
    page.setPageComplete(true);
  }
 else {
    selectedChoice=null;
    page.setPageComplete(false);
  }
  if (f instanceof TumorProject) {
    updateDetailInfo((TumorProject)f);
    form.setMaximizedControl(null);
  }
 else   if (f instanceof RunOverview) {
    updateDetailInfo((RunOverview)f);
    clearDetailInfo();
    form.setMaximizedControl(v.getControl());
  }
 else {
    clearDetailInfo();
    form.setMaximizedControl(v.getControl());
  }
  listener.handleEvent(null);
}
Program: 56780
Project: 56780
Buggy source:
@Override public void onRowClick(RankTableModel table,PickingMode pickingMode,AScoreRow row,boolean isSelected){
}

Fixed version (ground truth):
@Override public void onRowClick(RankTableModel table,PickingMode pickingMode,AScoreRow row,boolean isSelected,IGLElementContext context){
}
Program: 56782
Project: 56782
Buggy source:
@Override public void update(){
  dataDomains=representedView.getDataDomains();
  recalculateNodeSize();
}

Fixed version (ground truth):
@Override public void update(){
  dataDomains=new HashSet<>(representedView.getDataDomains());
  recalculateNodeSize();
}
Program: 56783
Project: 56783
Buggy source:
@Override protected Point2D getPosition(){
  return node.getBottomObjectAnchorPoints(this).getFirst();
}

Fixed version (ground truth):
@Override protected Point2D getPosition(){
  return node.getBottomObjectAnchorPoints(tablePerspective != null ? tablePerspective : this).getFirst();
}
Program: 56785
Project: 56785
Buggy source:
@Override protected void okPressed(){
  TableUtils.export(dataChooserComposite.getDataDomain(),sFileName,dataChooserComposite.getRecordPerspective(),dataChooserComposite.getDimensionPerspective(),null,null,false);
  super.okPressed();
}

Fixed version (ground truth):
@Override protected void okPressed(){
  TableUtils.export(dataChooserComposite.getDataDomain(),sFileName,dataChooserComposite.getRecordPerspective(),dataChooserComposite.getDimensionPerspective(),null,null,false,false);
  super.okPressed();
}
Program: 56786
Project: 56786
Buggy source:
@Override public void run(){
  FileDialog fileDialog=new FileDialog(new Shell(),SWT.SAVE);
  fileDialog.setText("String_Node_Str");
  String[] filterExt={"String_Node_Str","String_Node_Str","String_Node_Str"};
  fileDialog.setFilterExtensions(filterExt);
  fileDialog.setFileName("String_Node_Str" + new SimpleDateFormat("String_Node_Str").format(new Date()) + "String_Node_Str");
  String fileName=fileDialog.open();
  if (fileName != null) {
    if (exportIdentifiersOnly) {
      Perspective dimensionPerspective=new Perspective();
      dimensionPerspective.setVirtualArray(new VirtualArray(dataDomain.getDimensionIDType()));
      TableUtils.export(dataDomain,fileName,tablePerspective.getRecordPerspective(),dimensionPerspective,null,null,false);
    }
 else {
      TableUtils.export(dataDomain,fileName,tablePerspective.getRecordPerspective(),tablePerspective.getDimensionPerspective(),null,null,false);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  FileDialog fileDialog=new FileDialog(new Shell(),SWT.SAVE);
  fileDialog.setText("String_Node_Str");
  String[] filterExt={"String_Node_Str","String_Node_Str","String_Node_Str"};
  fileDialog.setFilterExtensions(filterExt);
  fileDialog.setFileName("String_Node_Str" + new SimpleDateFormat("String_Node_Str").format(new Date()) + "String_Node_Str");
  String fileName=fileDialog.open();
  if (fileName != null) {
    if (exportIdentifiersOnly) {
      Perspective dimensionPerspective=new Perspective();
      dimensionPerspective.setVirtualArray(new VirtualArray(dataDomain.getDimensionIDType()));
      TableUtils.export(dataDomain,fileName,tablePerspective.getRecordPerspective(),dimensionPerspective,null,null,isHeaderBrick,false);
    }
 else {
      TableUtils.export(dataDomain,fileName,tablePerspective.getRecordPerspective(),tablePerspective.getDimensionPerspective(),null,null,isHeaderBrick,false);
    }
  }
}
Program: 56787
Project: 56787
Buggy source:
public void exportData(final boolean exportIdentifiersOnly){
  Display.getDefault().asyncExec(new Runnable(){
    @Override public void run(){
      FileDialog fileDialog=new FileDialog(new Shell(),SWT.SAVE);
      fileDialog.setText("String_Node_Str");
      String[] filterExt={"String_Node_Str","String_Node_Str","String_Node_Str"};
      fileDialog.setFilterExtensions(filterExt);
      fileDialog.setFileName("String_Node_Str" + new SimpleDateFormat("String_Node_Str").format(new Date()) + "String_Node_Str");
      String fileName=fileDialog.open();
      if (fileName != null) {
        if (exportIdentifiersOnly) {
          Perspective dimensionPerspective=new Perspective();
          dimensionPerspective.setVirtualArray(new VirtualArray(dataDomain.getDimensionIDType()));
          TableUtils.export(dataDomain,fileName,tablePerspective.getRecordPerspective(),dimensionPerspective,null,null,false);
        }
 else {
          TableUtils.export(dataDomain,fileName,tablePerspective.getRecordPerspective(),tablePerspective.getDimensionPerspective(),null,null,false);
        }
      }
    }
  }
);
}

Fixed version (ground truth):
public void exportData(final boolean exportIdentifiersOnly){
  Display.getDefault().asyncExec(new Runnable(){
    @Override public void run(){
      FileDialog fileDialog=new FileDialog(new Shell(),SWT.SAVE);
      fileDialog.setText("String_Node_Str");
      String[] filterExt={"String_Node_Str","String_Node_Str","String_Node_Str"};
      fileDialog.setFilterExtensions(filterExt);
      fileDialog.setFileName("String_Node_Str" + new SimpleDateFormat("String_Node_Str").format(new Date()) + "String_Node_Str");
      String fileName=fileDialog.open();
      if (fileName != null) {
        if (exportIdentifiersOnly) {
          Perspective dimensionPerspective=new Perspective();
          dimensionPerspective.setVirtualArray(new VirtualArray(dataDomain.getDimensionIDType()));
          TableUtils.export(dataDomain,fileName,tablePerspective.getRecordPerspective(),dimensionPerspective,null,null,isHeaderBrick,false);
        }
 else {
          TableUtils.export(dataDomain,fileName,tablePerspective.getRecordPerspective(),tablePerspective.getDimensionPerspective(),null,null,isHeaderBrick,false);
        }
      }
    }
  }
);
}
Program: 56788
Project: 56788
Buggy source:
@Override public void nodesCreated(){
  for (  ALinearizableNode node : renderer.pathNodes) {
    node.addPickingListener(new PathSelectionPickingListener(node));
  }
}

Fixed version (ground truth):
@Override public void nodesCreated(){
  for (  ALinearizableNode node : renderer.pathNodes) {
    node.addPickingListener(new PathSelectionPickingListener(node));
    if (selectedPathStartNode != null && node.getVertexReps().containsAll(selectedPathStartNode.getVertexReps())) {
      selectedPathStartNode=node;
    }
  }
}
Program: 56789
Project: 56789
Buggy source:
@Override public boolean isPathChangePermitted(List<List<PathwayVertexRep>> newPath){
  if (renderer != contextualPathsRenderer.getSelectedPathRenderer())   return true;
  if (PathUtil.isPathShown(newPath,selectedPathSegments,renderer.pathway))   return true;
  return false;
}

Fixed version (ground truth):
@Override public boolean isPathChangePermitted(List<List<PathwayVertexRep>> newPath){
  Set<PathwayVertexRep> commonVertices=PathUtil.getCommonVertices(selectedPathSegments,renderer.pathSegments);
  if (commonVertices.isEmpty())   return true;
  List<PathwayVertexRep> newPathFlat=PathUtil.flattenSegments(newPath);
  if (newPathFlat.containsAll(commonVertices))   return true;
  return false;
}
Program: 56791
Project: 56791
Buggy source:
/** 
 * Calculates the average value of the selected samples (taken from   {@link #selectedSamplesVA}) selectedSamplesVA. FIXME: doesn't consider multi-mappings atm.
 * @param vertexRep
 * @return
 */
private Average getExpressionAverage(TablePerspective tablePerspective,PathwayVertexRep vertexRep){
  if (selectedSamplesVA != null && selectedSamplesVA.size() == 0)   return null;
  List<Integer> mappedDavidIds=pathwayItemManager.getDavidIDsByPathwayVertexRep(vertexRep);
  final IDType david=IDType.getIDType(EGeneIDTypes.DAVID.name());
  Average average=null;
  if (selectedSamplesVA == null) {
    average=tablePerspective.getContainerStatistics().getAverage(david,mappedDavidIds);
  }
 else {
    average=TablePerspectiveStatistics.calculateAverage(selectedSamplesVA,tablePerspective.getDataDomain(),david,mappedDavidIds);
  }
  return average;
}

Fixed version (ground truth):
/** 
 * Calculates the average value of the selected samples (taken from   {@link #selectedSamplesVA}) selectedSamplesVA. FIXME: doesn't consider multi-mappings atm.
 * @param vertexRep
 * @return
 */
private Average getExpressionAverage(TablePerspective tablePerspective,PathwayVertexRep vertexRep){
  if (selectedSamplesVA != null && selectedSamplesVA.size() == 0)   return null;
  List<Integer> mappedDavidIds=pathwayItemManager.getDavidIDsByPathwayVertexRep(vertexRep);
  final IDType david=IDType.getIDType(EGeneIDTypes.DAVID.name());
  Average average=null;
  if (selectedSamplesVA == null) {
    average=tablePerspective.getContainerStatistics().getAverage(david,mappedDavidIds);
  }
 else {
    average=TablePerspectiveStatistics.calculateAverage(selectedSamplesVA,tablePerspective.getDataDomain(),david,mappedDavidIds);
    if (Double.isNaN(average.getArithmeticMean()))     return null;
  }
  return average;
}
Program: 56793
Project: 56793
Buggy source:
private void loadExternalScores(ScoreParseSpecification spec,Collection<ATableBasedDataDomain> dataDomains){
  IDType targetIDType=null;
  for (  ATableBasedDataDomain dataDomain : dataDomains) {
    if (dataDomain.getLabel().contains("String_Node_Str")) {
      targetIDType=dataDomain.getDimensionIDType();
      break;
    }
  }
  if (targetIDType == null) {
    System.err.println("String_Node_Str");
    return;
  }
  ExternalIDTypeScoreParser parser=new ExternalIDTypeScoreParser(spec,targetIDType);
  Collection<ISerializeableScore> scores=parser.call();
  final Scores s=Scores.get();
  for (  ISerializeableScore score : scores) {
    s.addPersistentScoreIfAbsent(score);
  }
}

Fixed version (ground truth):
private void loadExternalScores(ScoreParseSpecification spec,Collection<ATableBasedDataDomain> dataDomains){
  ATableBasedDataDomain target=null;
  for (  ATableBasedDataDomain dataDomain : dataDomains) {
    if (dataDomain.getLabel().contains("String_Node_Str")) {
      target=dataDomain;
      break;
    }
  }
  if (target == null) {
    System.err.println("String_Node_Str");
    return;
  }
  ExternalIDTypeScoreParser parser=new ExternalIDTypeScoreParser(spec,target.getDimensionIDType(),target);
  Collection<ISerializeableScore> scores=parser.call();
  final Scores s=Scores.get();
  for (  ISerializeableScore score : scores) {
    s.addPersistentScoreIfAbsent(score);
  }
}