Program: 143155
Project: 143155
Buggy source:
@Override public void display(GL gl,GLU glu,VizModel vizModel){
  if (!selected && vizModel.isHideNonSelectedEdges()) {
    return;
  }
  NodeData nodeFrom=edge.getSource();
  NodeData nodeTo=edge.getTarget();
  float weight=edge.getEdge().getWeight();
  float arrowWidth=ARROW_WIDTH * weight * 2f;
  float arrowHeight=ARROW_HEIGHT * weight * 2f;
  float x2=nodeTo.x();
  float y2=nodeTo.y();
  float x1=nodeFrom.x();
  float y1=nodeFrom.y();
  Vec2f edgeVector=new Vec2f(x2 - x1,y2 - y1);
  edgeVector.normalize();
  double angle=Math.atan2(y2 - y1,x2 - x1);
  float collisionDistance=((ModelImpl)nodeTo.getModel()).getCollisionDistance(angle);
  float targetX=x2 - edgeVector.x() * collisionDistance;
  float targetY=y2 - edgeVector.y() * collisionDistance;
  float baseX=targetX - edgeVector.x() * arrowHeight * 2f;
  float baseY=targetY - edgeVector.y() * arrowHeight * 2f;
  float sideVectorX=y1 - y2;
  float sideVectorY=x2 - x1;
  float norm=(float)Math.sqrt(sideVectorX * sideVectorX + sideVectorY * sideVectorY);
  sideVectorX/=norm;
  sideVectorY/=norm;
  if (!selected) {
    float r;
    float g;
    float b;
    float a;
    if (vizModel.isEdgeHasUniColor()) {
      float[] uni=vizModel.getEdgeUniColor();
      r=uni[0];
      g=uni[1];
      b=uni[2];
      a=uni[3];
    }
 else {
      r=edge.r();
      if (r == -1f) {
        NodeData source=edge.getSource();
        r=source.r();
        g=source.g();
        b=source.b();
        a=edge.alpha();
      }
 else {
        g=edge.g();
        b=edge.b();
        a=edge.alpha();
      }
    }
    if (vizModel.getConfig().isLightenNonSelected()) {
      float lightColorFactor=vizModel.getConfig().getLightenNonSelectedFactor();
      a=a - (a - 0.1f) * lightColorFactor;
      gl.glColor4f(r,g,b,a);
    }
 else {
      gl.glColor4f(r,g,b,a);
    }
  }
 else {
    float r=0f;
    float g=0f;
    float b=0f;
    if (vizModel.isEdgeSelectionColor()) {
      ModelImpl m1=(ModelImpl)nodeFrom.getModel();
      ModelImpl m2=(ModelImpl)nodeTo.getModel();
      if (m1.isSelected() && m2.isSelected()) {
        float[] both=vizModel.getEdgeBothSelectionColor();
        r=both[0];
        g=both[1];
        b=both[2];
      }
 else       if (m1.isSelected()) {
        float[] out=vizModel.getEdgeOutSelectionColor();
        r=out[0];
        g=out[1];
        b=out[2];
      }
 else       if (m2.isSelected()) {
        float[] in=vizModel.getEdgeInSelectionColor();
        r=in[0];
        g=in[1];
        b=in[2];
      }
    }
 else {
      r=edge.r();
      if (r == -1f) {
        NodeData source=edge.getSource();
        r=0.498f * source.r();
        g=0.498f * source.g();
        b=0.498f * source.b();
      }
 else {
        g=0.498f * edge.g();
        b=0.498f * edge.b();
        r*=0.498f;
      }
    }
    gl.glColor4f(r,g,b,1f);
  }
  gl.glVertex2d(baseX + sideVectorX * arrowWidth,baseY + sideVectorY * arrowWidth);
  gl.glVertex2d(baseX - sideVectorX * arrowWidth,baseY - sideVectorY * arrowWidth);
  gl.glVertex2d(targetX,targetY);
}

Fixed version (ground truth):
@Override public void display(GL gl,GLU glu,VizModel vizModel){
  if (!selected && vizModel.isHideNonSelectedEdges()) {
    return;
  }
  NodeData nodeFrom=edge.getSource();
  NodeData nodeTo=edge.getTarget();
  float weight=edge.getEdge().getWeight();
  float arrowWidth=ARROW_WIDTH * weight * 2f;
  float arrowHeight=ARROW_HEIGHT * weight * 2f;
  float x2=nodeTo.x();
  float y2=nodeTo.y();
  float x1=nodeFrom.x();
  float y1=nodeFrom.y();
  Vec2f edgeVector=new Vec2f(x2 - x1,y2 - y1);
  edgeVector.normalize();
  double angle=Math.atan2(y2 - y1,x2 - x1);
  if (nodeTo.getModel() == null) {
    Logger.getLogger(Arrow2dModel.class.getName()).log(Level.INFO,"String_Node_Str" + this + "String_Node_Str"+ edge.getModel());
  }
  float collisionDistance=((ModelImpl)nodeTo.getModel()).getCollisionDistance(angle);
  float targetX=x2 - edgeVector.x() * collisionDistance;
  float targetY=y2 - edgeVector.y() * collisionDistance;
  float baseX=targetX - edgeVector.x() * arrowHeight * 2f;
  float baseY=targetY - edgeVector.y() * arrowHeight * 2f;
  float sideVectorX=y1 - y2;
  float sideVectorY=x2 - x1;
  float norm=(float)Math.sqrt(sideVectorX * sideVectorX + sideVectorY * sideVectorY);
  sideVectorX/=norm;
  sideVectorY/=norm;
  if (!selected) {
    float r;
    float g;
    float b;
    float a;
    if (vizModel.isEdgeHasUniColor()) {
      float[] uni=vizModel.getEdgeUniColor();
      r=uni[0];
      g=uni[1];
      b=uni[2];
      a=uni[3];
    }
 else {
      r=edge.r();
      if (r == -1f) {
        NodeData source=edge.getSource();
        r=source.r();
        g=source.g();
        b=source.b();
        a=edge.alpha();
      }
 else {
        g=edge.g();
        b=edge.b();
        a=edge.alpha();
      }
    }
    if (vizModel.getConfig().isLightenNonSelected()) {
      float lightColorFactor=vizModel.getConfig().getLightenNonSelectedFactor();
      a=a - (a - 0.1f) * lightColorFactor;
      gl.glColor4f(r,g,b,a);
    }
 else {
      gl.glColor4f(r,g,b,a);
    }
  }
 else {
    float r=0f;
    float g=0f;
    float b=0f;
    if (vizModel.isEdgeSelectionColor()) {
      ModelImpl m1=(ModelImpl)nodeFrom.getModel();
      ModelImpl m2=(ModelImpl)nodeTo.getModel();
      if (m1.isSelected() && m2.isSelected()) {
        float[] both=vizModel.getEdgeBothSelectionColor();
        r=both[0];
        g=both[1];
        b=both[2];
      }
 else       if (m1.isSelected()) {
        float[] out=vizModel.getEdgeOutSelectionColor();
        r=out[0];
        g=out[1];
        b=out[2];
      }
 else       if (m2.isSelected()) {
        float[] in=vizModel.getEdgeInSelectionColor();
        r=in[0];
        g=in[1];
        b=in[2];
      }
    }
 else {
      r=edge.r();
      if (r == -1f) {
        NodeData source=edge.getSource();
        r=0.498f * source.r();
        g=0.498f * source.g();
        b=0.498f * source.b();
      }
 else {
        g=0.498f * edge.g();
        b=0.498f * edge.b();
        r*=0.498f;
      }
    }
    gl.glColor4f(r,g,b,1f);
  }
  gl.glVertex2d(baseX + sideVectorX * arrowWidth,baseY + sideVectorY * arrowWidth);
  gl.glVertex2d(baseX - sideVectorX * arrowWidth,baseY - sideVectorY * arrowWidth);
  gl.glVertex2d(targetX,targetY);
}