Program: 57148
Project: 57148
Buggy source:
protected void renderStubLeftSide(GL2 gl,Rectangle2D loc,Rectangle2D locTarget,boolean isWindow,PathwayMultiFormInfo info,PathwayMultiFormInfo infoTarget,boolean start){
  if (this.isAngleTooSmall) {
    renderLeftOffsetStub(gl,loc,locTarget,isWindow,info,infoTarget,start);
    return;
  }
  xS=(float)locTarget.getX() + (float)locTarget.getWidth();
  yS=(float)locTarget.getY() + (float)locTarget.getHeight() / 2.0f;
  yE=(float)loc.getY() + (float)loc.getHeight() / 2.0f;
  float red=bandColor[0];
  float green=bandColor[1];
  float blue=bandColor[2];
  boolean renderStub=true;
  if (isWindow && !this.drawLink) {
    Pair<PathwayMultiFormInfo,PathwayMultiFormInfo> windowPair=new Pair<PathwayMultiFormInfo,PathwayMultiFormInfo>(info,infoTarget);
    Pair<PathwayMultiFormInfo,PathwayMultiFormInfo> windowPairRev=new Pair<PathwayMultiFormInfo,PathwayMultiFormInfo>(infoTarget,info);
    if (this.view.containsWindowsStub(windowPair))     renderStub=false;
    float windowCenterX=(infoTarget.window.getAbsoluteLocation().get(0) + (infoTarget.window.getSize().get(0) / 2.0f));
    float windowCenterY=(infoTarget.window.getAbsoluteLocation().get(1) + (infoTarget.window.getSize().get(1) / 2.0f));
    Vec2f dirToWindowCenter=null;
    dirToWindowCenter=new Vec2f(windowCenterX - xE,windowCenterY - yE);
    dirToWindowCenter.normalize();
    Vec2f normalVecCenterVec=rotateVec2(dirToWindowCenter,(float)Math.PI / 2f);
    float glBandWidthOffsetX_CenterVec=normalVecCenterVec.get(0) * bandWidth / 2.0f;
    float glBandWidthOffsetY_CenterVec=normalVecCenterVec.get(1) * bandWidth / 2.0f;
    stubConnectionPoint4_X=xE + (dirToWindowCenter.get(0) * (stubLength)) - glBandWidthOffsetX_CenterVec;
    stubConnectionPoint4_Y=yE + (dirToWindowCenter.get(1) * (stubLength)) - glBandWidthOffsetY_CenterVec;
    stubConnectionPoint3_X=xE + (dirToWindowCenter.get(0) * (stubLength)) + glBandWidthOffsetX_CenterVec;
    stubConnectionPoint3_Y=yE + (dirToWindowCenter.get(1) * (stubLength)) + glBandWidthOffsetY_CenterVec;
  }
 else {
    Vec2f dirNorm=new Vec2f(xE - xS,yE - yS);
    dirNorm.normalize();
    Vec2f normalVec=rotateVec2(dirNorm,(float)Math.PI / 2f);
    float glBandWidthOffsetX=normalVec.get(0) * bandWidth / 2.0f;
    float glBandWidthOffsetY=normalVec.get(1) * bandWidth / 2.0f;
    stubConnectionPoint3_X=xE - (dirNorm.get(0) * (stubLength)) - glBandWidthOffsetX;
    stubConnectionPoint3_Y=yE - (dirNorm.get(1) * (stubLength)) - glBandWidthOffsetY;
    stubConnectionPoint4_X=xE - (dirNorm.get(0) * (stubLength)) + glBandWidthOffsetX;
    stubConnectionPoint4_Y=yE - (dirNorm.get(1) * (stubLength)) + glBandWidthOffsetY;
  }
  float stubConnectorWidth=(((float)loc1.getHeight() * 2.0f < (float)loc2.getHeight()) ? (float)loc1.getHeight() : (float)loc2.getHeight());
  float p10X=xE;
  float p10Y=yE - stubConnectorWidth / 2.0f;
  float p11X=xE;
  float p11Y=yE + stubConnectorWidth / 2.0f;
  if (fadeToOpacity < linkOpacity && !renderStub)   return;
  gl.glBegin(GL2.GL_LINES);
  gl.glColor4f(red,green,blue,this.outlineOpacity);
  gl.glVertex3f(p10X,p10Y,z);
  gl.glColor4f(red,green,blue,fadeToOpacity);
  gl.glVertex3f(stubConnectionPoint3_X,stubConnectionPoint3_Y,z);
  gl.glColor4f(red,green,blue,this.outlineOpacity);
  gl.glVertex3f(p11X,p11Y,z);
  gl.glColor4f(red,green,blue,fadeToOpacity);
  gl.glVertex3f(stubConnectionPoint4_X,stubConnectionPoint4_Y,z);
  gl.glEnd();
  gl.glBegin(GL2.GL_QUADS);
  gl.glColor4f(red,green,blue,linkOpacity);
  gl.glVertex3f(p10X,p10Y,z);
  gl.glVertex3f(p11X,p11Y,z);
  gl.glColor4f(red,green,blue,fadeToOpacity);
  gl.glVertex3f(stubConnectionPoint4_X,stubConnectionPoint4_Y,z);
  gl.glVertex3f(stubConnectionPoint3_X,stubConnectionPoint3_Y,z);
  gl.glEnd();
}

Fixed version (ground truth):
protected void renderStubLeftSide(GL2 gl,Rectangle2D loc,Rectangle2D locTarget,boolean isWindow,PathwayMultiFormInfo info,PathwayMultiFormInfo infoTarget,boolean start){
  if (this.isAngleTooSmall) {
    renderLeftOffsetStub(gl,loc,locTarget,isWindow,info,infoTarget,start);
    return;
  }
  xS=(float)locTarget.getX() + (float)locTarget.getWidth();
  yS=(float)locTarget.getY() + (float)locTarget.getHeight() / 2.0f;
  xE=(float)loc.getX();
  ;
  yE=(float)loc.getY() + (float)loc.getHeight() / 2.0f;
  float red=bandColor[0];
  float green=bandColor[1];
  float blue=bandColor[2];
  boolean renderStub=true;
  if (isWindow && !this.drawLink) {
    Pair<PathwayMultiFormInfo,PathwayMultiFormInfo> windowPair=new Pair<PathwayMultiFormInfo,PathwayMultiFormInfo>(info,infoTarget);
    Pair<PathwayMultiFormInfo,PathwayMultiFormInfo> windowPairRev=new Pair<PathwayMultiFormInfo,PathwayMultiFormInfo>(infoTarget,info);
    if (this.view.containsWindowsStub(windowPair))     renderStub=false;
    float windowCenterX=(infoTarget.window.getAbsoluteLocation().get(0) + (infoTarget.window.getSize().get(0) / 2.0f));
    float windowCenterY=(infoTarget.window.getAbsoluteLocation().get(1) + (infoTarget.window.getSize().get(1) / 2.0f));
    Vec2f dirToWindowCenter=null;
    dirToWindowCenter=new Vec2f(windowCenterX - xE,windowCenterY - yE);
    dirToWindowCenter.normalize();
    Vec2f normalVecCenterVec=rotateVec2(dirToWindowCenter,(float)Math.PI / 2f);
    float glBandWidthOffsetX_CenterVec=normalVecCenterVec.get(0) * bandWidth / 2.0f;
    float glBandWidthOffsetY_CenterVec=normalVecCenterVec.get(1) * bandWidth / 2.0f;
    stubConnectionPoint4_X=xE + (dirToWindowCenter.get(0) * (stubLength)) - glBandWidthOffsetX_CenterVec;
    stubConnectionPoint4_Y=yE + (dirToWindowCenter.get(1) * (stubLength)) - glBandWidthOffsetY_CenterVec;
    stubConnectionPoint3_X=xE + (dirToWindowCenter.get(0) * (stubLength)) + glBandWidthOffsetX_CenterVec;
    stubConnectionPoint3_Y=yE + (dirToWindowCenter.get(1) * (stubLength)) + glBandWidthOffsetY_CenterVec;
  }
 else {
    Vec2f dirNorm=new Vec2f(xE - xS,yE - yS);
    dirNorm.normalize();
    Vec2f normalVec=rotateVec2(dirNorm,(float)Math.PI / 2f);
    float glBandWidthOffsetX=normalVec.get(0) * bandWidth / 2.0f;
    float glBandWidthOffsetY=normalVec.get(1) * bandWidth / 2.0f;
    stubConnectionPoint3_X=xE - (dirNorm.get(0) * (stubLength)) - glBandWidthOffsetX;
    stubConnectionPoint3_Y=yE - (dirNorm.get(1) * (stubLength)) - glBandWidthOffsetY;
    stubConnectionPoint4_X=xE - (dirNorm.get(0) * (stubLength)) + glBandWidthOffsetX;
    stubConnectionPoint4_Y=yE - (dirNorm.get(1) * (stubLength)) + glBandWidthOffsetY;
  }
  float stubConnectorWidth=(float)loc.getHeight();
  float p10X=xE;
  float p10Y=yE - stubConnectorWidth / 2.0f;
  float p11X=xE;
  float p11Y=yE + stubConnectorWidth / 2.0f;
  if (fadeToOpacity < linkOpacity && !renderStub)   return;
  gl.glBegin(GL2.GL_LINES);
  gl.glColor4f(red,green,blue,this.outlineOpacity);
  gl.glVertex3f(p10X,p10Y,z);
  gl.glColor4f(red,green,blue,fadeToOpacity);
  gl.glVertex3f(stubConnectionPoint3_X,stubConnectionPoint3_Y,z);
  gl.glColor4f(red,green,blue,this.outlineOpacity);
  gl.glVertex3f(p11X,p11Y,z);
  gl.glColor4f(red,green,blue,fadeToOpacity);
  gl.glVertex3f(stubConnectionPoint4_X,stubConnectionPoint4_Y,z);
  gl.glEnd();
  gl.glBegin(GL2.GL_QUADS);
  gl.glColor4f(red,green,blue,linkOpacity);
  gl.glVertex3f(p10X,p10Y,z);
  gl.glVertex3f(p11X,p11Y,z);
  gl.glColor4f(red,green,blue,fadeToOpacity);
  gl.glVertex3f(stubConnectionPoint4_X,stubConnectionPoint4_Y,z);
  gl.glVertex3f(stubConnectionPoint3_X,stubConnectionPoint3_Y,z);
  gl.glEnd();
}