Program: 58072
Project: 58072
Buggy source:
private void renderArch(GL2 gl){
  gl.glColor3f(1,0,0);
  gl.glColor4f(0.5f,0.5f,0.5f,1f);
  gl.glBegin(GL2.GL_POLYGON);
  gl.glVertex3f(0,0,0f);
  gl.glVertex3f(0,archBottomY,0f);
  gl.glVertex3f(archWidth,archBottomY,0f);
  gl.glVertex3f(archWidth,0,0f);
  gl.glEnd();
  ArrayList<Vec3f> inputPoints=new ArrayList<Vec3f>();
  inputPoints.add(new Vec3f(0,archBottomY,0));
  inputPoints.add(new Vec3f(0,archTopY,0));
  inputPoints.add(new Vec3f(archInnerWidth * 0.9f,archTopY,0));
  NURBSCurve curve=new NURBSCurve(inputPoints,10);
  ArrayList<Vec3f> outputPoints=curve.getCurvePoints();
  outputPoints.add(new Vec3f(archInnerWidth,archTopY,0));
  outputPoints.add(new Vec3f(archInnerWidth,archBottomY,0));
  inputPoints.clear();
  inputPoints.add(new Vec3f(archInnerWidth,archBottomY,0));
  inputPoints.add(new Vec3f(archWidth,archBottomY,0));
  inputPoints.add(new Vec3f(archWidth,archBottomY * 0.8f,0));
  curve=new NURBSCurve(inputPoints,10);
  outputPoints.addAll(curve.getCurvePoints());
  connectionRenderer.render(gl,outputPoints);
  gl.glBegin(GL2.GL_POLYGON);
  gl.glVertex3f(viewFrustum.getWidth(),0,0f);
  gl.glVertex3f(viewFrustum.getWidth(),archBottomY,0f);
  gl.glVertex3f(viewFrustum.getWidth() - archWidth,archBottomY,0f);
  gl.glVertex3f(viewFrustum.getWidth() - archWidth,0,0f);
  gl.glEnd();
  inputPoints.clear();
  inputPoints.add(new Vec3f(viewFrustum.getWidth(),archBottomY,0));
  inputPoints.add(new Vec3f(viewFrustum.getWidth(),archTopY,0));
  inputPoints.add(new Vec3f(viewFrustum.getWidth() - archInnerWidth * 0.9f,archTopY,0));
  curve=new NURBSCurve(inputPoints,10);
  outputPoints.clear();
  outputPoints.addAll(curve.getCurvePoints());
  outputPoints.add(new Vec3f(viewFrustum.getWidth() - archInnerWidth,archTopY,0));
  outputPoints.add(new Vec3f(viewFrustum.getWidth() - archInnerWidth,archBottomY,0));
  inputPoints.clear();
  inputPoints.add(new Vec3f(viewFrustum.getWidth() - archInnerWidth,archBottomY,0));
  inputPoints.add(new Vec3f(viewFrustum.getWidth() - archWidth,archBottomY,0));
  inputPoints.add(new Vec3f(viewFrustum.getWidth() - archWidth,archBottomY * 0.8f,0));
  curve=new NURBSCurve(inputPoints,10);
  outputPoints.addAll(curve.getCurvePoints());
  connectionRenderer.render(gl,outputPoints);
  gl.glBegin(GL2.GL_POLYGON);
  gl.glVertex3f(archInnerWidth,archTopY,0f);
  gl.glVertex3f(archInnerWidth,archBottomY,0f);
  gl.glVertex3f(viewFrustum.getWidth() - archInnerWidth,archBottomY,0f);
  gl.glVertex3f(viewFrustum.getWidth() - archInnerWidth,archTopY,0f);
  gl.glEnd();
}

Fixed version (ground truth):
private void renderArch(GL2 gl){
  gl.glColor3f(1,0,0);
  gl.glColor4f(0.5f,0.5f,0.5f,1f);
  gl.glBegin(GL2.GL_POLYGON);
  gl.glVertex3f(0,0,0f);
  gl.glVertex3f(0,archBottomY,0f);
  gl.glVertex3f(sideArchThickness,archBottomY,0f);
  gl.glVertex3f(sideArchThickness,0,0f);
  gl.glEnd();
  ArrayList<Vec3f> inputPoints=new ArrayList<Vec3f>();
  inputPoints.add(new Vec3f(0,archBottomY,0));
  inputPoints.add(new Vec3f(0,archTopY,0));
  inputPoints.add(new Vec3f(archInnerWidth * 0.9f,archTopY,0));
  NURBSCurve curve=new NURBSCurve(inputPoints,10);
  ArrayList<Vec3f> outputPoints=curve.getCurvePoints();
  outputPoints.add(new Vec3f(archInnerWidth,archTopY,0));
  outputPoints.add(new Vec3f(archInnerWidth,archBottomY,0));
  inputPoints.clear();
  inputPoints.add(new Vec3f(archInnerWidth,archBottomY,0));
  inputPoints.add(new Vec3f(sideArchThickness,archBottomY,0));
  inputPoints.add(new Vec3f(sideArchThickness,archBottomY * 0.8f,0));
  curve=new NURBSCurve(inputPoints,10);
  outputPoints.addAll(curve.getCurvePoints());
  connectionRenderer.render(gl,outputPoints);
  gl.glBegin(GL2.GL_POLYGON);
  gl.glVertex3f(viewFrustum.getWidth(),0,0f);
  gl.glVertex3f(viewFrustum.getWidth(),archBottomY,0f);
  gl.glVertex3f(viewFrustum.getWidth() - sideArchThickness,archBottomY,0f);
  gl.glVertex3f(viewFrustum.getWidth() - sideArchThickness,0,0f);
  gl.glEnd();
  inputPoints.clear();
  inputPoints.add(new Vec3f(viewFrustum.getWidth(),archBottomY,0));
  inputPoints.add(new Vec3f(viewFrustum.getWidth(),archTopY,0));
  inputPoints.add(new Vec3f(viewFrustum.getWidth() - archInnerWidth * 0.9f,archTopY,0));
  curve=new NURBSCurve(inputPoints,10);
  outputPoints.clear();
  outputPoints.addAll(curve.getCurvePoints());
  outputPoints.add(new Vec3f(viewFrustum.getWidth() - archInnerWidth,archTopY,0));
  outputPoints.add(new Vec3f(viewFrustum.getWidth() - archInnerWidth,archBottomY,0));
  inputPoints.clear();
  inputPoints.add(new Vec3f(viewFrustum.getWidth() - archInnerWidth,archBottomY,0));
  inputPoints.add(new Vec3f(viewFrustum.getWidth() - sideArchThickness,archBottomY,0));
  inputPoints.add(new Vec3f(viewFrustum.getWidth() - sideArchThickness,archBottomY * 0.8f,0));
  curve=new NURBSCurve(inputPoints,10);
  outputPoints.addAll(curve.getCurvePoints());
  connectionRenderer.render(gl,outputPoints);
  gl.glBegin(GL2.GL_POLYGON);
  gl.glVertex3f(archInnerWidth,archTopY,0f);
  gl.glVertex3f(archInnerWidth,archBottomY,0f);
  gl.glVertex3f(viewFrustum.getWidth() - archInnerWidth,archBottomY,0f);
  gl.glVertex3f(viewFrustum.getWidth() - archInnerWidth,archTopY,0f);
  gl.glEnd();
}