Program: 58317
Project: 58317
Buggy source:
public void drawLine(PoincareNode node1,PoincareNode node2,int numberOfDetails,int mode){
  if (numberOfDetails != 0) {
    float[] startPoint=new float[2];
    startPoint=this.projectPoint(node1.getZoomedPosition(),false);
    float[] endPoint=new float[2];
    endPoint=projectPoint(node2.getZoomedPosition(),false);
    float length=this.distancePoints(startPoint,endPoint);
    gl.glLineWidth((float)lineWidth);
    gl.glBegin(GL.GL_LINE_STRIP);
    gl.glColor3i(0,0,0);
    gl.glVertex3d(node1.getZoomedPosition()[0] * displayScaleFactorX + (canvasWidth / 2),node1.getZoomedPosition()[1] * displayScaleFactorY + canvasHeight / 2,0);
    float[] eV=new float[2];
    eV[0]=endPoint[0] - startPoint[0];
    eV[1]=endPoint[1] - startPoint[1];
    eV=getEV(eV);
    float[] actPosition=new float[2];
    actPosition=startPoint.clone();
    float[] actProjectedPosition=new float[2];
    for (int i=0; i < numberOfDetails; i++) {
      actPosition[0]=actPosition[0] + eV[0] * (length / (float)numberOfDetails);
      actPosition[1]=actPosition[1] + eV[1] * (length / (float)numberOfDetails);
      actProjectedPosition=this.projectPoint(actPosition,true);
      gl.glLineWidth((float)lineWidth);
      gl.glBegin(GL.GL_LINE_STRIP);
      gl.glColor3i(0,0,0);
      gl.glVertex3d(actProjectedPosition[0] * displayScaleFactorX + (canvasWidth / 2),actProjectedPosition[1] * displayScaleFactorY + canvasHeight / 2,0);
    }
    gl.glVertex3d(node2.getZoomedPosition()[0] * displayScaleFactorX + (canvasWidth / 2),node2.getZoomedPosition()[1] * displayScaleFactorY + canvasHeight / 2,0);
    gl.glEnd();
  }
 else {
    gl.glLineWidth((float)lineWidth);
    gl.glBegin(GL.GL_LINE_STRIP);
    gl.glColor3i(0,0,0);
    gl.glVertex3d(node1.getZoomedPosition()[0] * displayScaleFactorX + (canvasWidth / 2),node1.getZoomedPosition()[1] * displayScaleFactorY + canvasHeight / 2,0);
    gl.glVertex3d(node2.getZoomedPosition()[0] * displayScaleFactorX + (canvasWidth / 2),node2.getZoomedPosition()[1] * displayScaleFactorY + canvasHeight / 2,0);
    gl.glEnd();
  }
}

Fixed version (ground truth):
public void drawLine(PoincareNode node1,PoincareNode node2,int numberOfDetails,int mode){
  if (numberOfDetails != 0) {
    float[] startPoint=new float[2];
    startPoint=this.projectPoint(node1.getZoomedPosition(),false);
    float[] endPoint=new float[2];
    endPoint=projectPoint(node2.getZoomedPosition(),false);
    float length=this.distancePoints(startPoint,endPoint);
    gl.glLineWidth((float)lineWidth);
    gl.glBegin(GL.GL_LINE_STRIP);
    gl.glColor3i(0,0,0);
    gl.glVertex3d(node1.getZoomedPosition()[0] * displayScaleFactorX + (canvasWidth / 2),node1.getZoomedPosition()[1] * displayScaleFactorY + canvasHeight / 2,-2);
    float[] eV=new float[2];
    eV[0]=endPoint[0] - startPoint[0];
    eV[1]=endPoint[1] - startPoint[1];
    eV=getEV(eV);
    float[] actPosition=new float[2];
    actPosition=startPoint.clone();
    float[] actProjectedPosition=new float[2];
    for (int i=0; i < numberOfDetails; i++) {
      actPosition[0]=actPosition[0] + eV[0] * (length / (float)numberOfDetails);
      actPosition[1]=actPosition[1] + eV[1] * (length / (float)numberOfDetails);
      actProjectedPosition=this.projectPoint(actPosition,true);
      gl.glLineWidth((float)lineWidth);
      gl.glBegin(GL.GL_LINE_STRIP);
      gl.glColor3i(0,0,0);
      gl.glVertex3d(actProjectedPosition[0] * displayScaleFactorX + (canvasWidth / 2),actProjectedPosition[1] * displayScaleFactorY + canvasHeight / 2,-2);
    }
    gl.glVertex3d(node2.getZoomedPosition()[0] * displayScaleFactorX + (canvasWidth / 2),node2.getZoomedPosition()[1] * displayScaleFactorY + canvasHeight / 2,-2);
    gl.glEnd();
  }
 else {
    gl.glLineWidth((float)lineWidth);
    gl.glBegin(GL.GL_LINE_STRIP);
    gl.glColor3i(0,0,0);
    gl.glVertex3d(node1.getZoomedPosition()[0] * displayScaleFactorX + (canvasWidth / 2),node1.getZoomedPosition()[1] * displayScaleFactorY + canvasHeight / 2,0);
    gl.glVertex3d(node2.getZoomedPosition()[0] * displayScaleFactorX + (canvasWidth / 2),node2.getZoomedPosition()[1] * displayScaleFactorY + canvasHeight / 2,0);
    gl.glEnd();
  }
}