Program: 58705
Project: 58705
Buggy source:
/** 
 * Handles drag&drop of groups in gene dimension
 * @param gl
 */
private void handleDragDropGroupGenes(final GL gl){
  Point currentPoint=glMouseListener.getPickedPoint();
  float[] fArTargetWorldCoordinates=new float[3];
  int iTargetIdx=0;
  int iNumberSample=iNumberOfElements;
  float fOffsety;
  int currentElement;
  float fHeight=viewFrustum.getHeight() - 0.2f;
  float fHeightSample=(fHeight - 0.4f) / iNumberSample;
  fArTargetWorldCoordinates=GLCoordinateUtils.convertWindowCoordinatesToWorldCoordinates(gl,currentPoint.x,currentPoint.y);
  IGroupList groupList=contentVA.getGroupList();
  int iNrElementsInGroup=groupList.get(iGeneGroupToDrag).getNrElements();
  float currentHeight=fHeightSample * iNrElementsInGroup;
  gl.glBegin(GL.GL_QUADS);
  gl.glVertex3f(0f,fArTargetWorldCoordinates[1],0);
  gl.glVertex3f(0f,fArTargetWorldCoordinates[1] + currentHeight,0);
  gl.glVertex3f(0.1f,fArTargetWorldCoordinates[1] + currentHeight,0);
  gl.glVertex3f(0.1f,fArTargetWorldCoordinates[1],0);
  gl.glEnd();
  fOffsety=viewFrustum.getHeight() - fArTargetWorldCoordinates[1] - 0.4f;
  currentElement=(int)Math.ceil(fOffsety / fHeightSample);
  int iElemOffset=0;
  int cnt=0;
  if (groupList == null) {
    System.out.println("String_Node_Str");
    return;
  }
  for (  Group currentGroup : groupList) {
    if (currentElement < (iElemOffset + currentGroup.getNrElements())) {
      iTargetIdx=cnt;
      break;
    }
    cnt++;
    iElemOffset+=currentGroup.getNrElements();
  }
  float fPosDropMarker=fHeight - (fHeightSample * iElemOffset);
  gl.glLineWidth(6f);
  gl.glColor3f(1,0,0);
  gl.glBegin(GL.GL_LINES);
  gl.glVertex3f(0,fPosDropMarker,0);
  gl.glVertex3f(0.2f,fPosDropMarker,0);
  gl.glEnd();
  if (glMouseListener.wasMouseReleased()) {
    if (groupList.move(contentVA,iGeneGroupToDrag,iTargetIdx) == false)     System.out.println("String_Node_Str");
    bDragDropGeneGroup=false;
    bActivateDraggingGenes=false;
    bRedrawTextures=true;
    setDisplayListDirty();
  }
}

Fixed version (ground truth):
/** 
 * Handles drag&drop of groups in gene dimension
 * @param gl
 */
private void handleDragDropGroupGenes(final GL gl){
  Point currentPoint=glMouseListener.getPickedPoint();
  float[] fArTargetWorldCoordinates=new float[3];
  int iTargetIdx=0;
  int iNumberSample=iNumberOfElements;
  float fOffsety;
  int currentElement;
  float fHeight=viewFrustum.getHeight() - 0.2f;
  float fHeightSample=(fHeight - 0.4f) / iNumberSample;
  fArTargetWorldCoordinates=GLCoordinateUtils.convertWindowCoordinatesToWorldCoordinates(gl,currentPoint.x,currentPoint.y);
  IGroupList groupList=contentVA.getGroupList();
  int iNrElementsInGroup=groupList.get(iGeneGroupToDrag).getNrElements();
  float currentHeight=fHeightSample * iNrElementsInGroup;
  gl.glBegin(GL.GL_QUADS);
  gl.glVertex3f(0f,fArTargetWorldCoordinates[1],0);
  gl.glVertex3f(0f,fArTargetWorldCoordinates[1] + currentHeight,0);
  gl.glVertex3f(0.1f,fArTargetWorldCoordinates[1] + currentHeight,0);
  gl.glVertex3f(0.1f,fArTargetWorldCoordinates[1],0);
  gl.glEnd();
  fOffsety=viewFrustum.getHeight() - fArTargetWorldCoordinates[1] - 0.4f;
  currentElement=(int)Math.ceil(fOffsety / fHeightSample);
  int iElemOffset=0;
  int cnt=0;
  if (groupList == null) {
    System.out.println("String_Node_Str");
    return;
  }
  for (  Group currentGroup : groupList) {
    if (currentElement < (iElemOffset + currentGroup.getNrElements())) {
      iTargetIdx=cnt;
      if (iGeneGroupToDrag < iTargetIdx)       iElemOffset+=currentGroup.getNrElements();
      break;
    }
    cnt++;
    iElemOffset+=currentGroup.getNrElements();
  }
  float fPosDropMarker=fHeight - (fHeightSample * iElemOffset);
  gl.glLineWidth(6f);
  gl.glColor3f(1,0,0);
  gl.glBegin(GL.GL_LINES);
  gl.glVertex3f(0,fPosDropMarker,0);
  gl.glVertex3f(0.2f,fPosDropMarker,0);
  gl.glEnd();
  if (glMouseListener.wasMouseReleased()) {
    if (groupList.move(contentVA,iGeneGroupToDrag,iTargetIdx) == false)     System.out.println("String_Node_Str");
    bDragDropGeneGroup=false;
    bActivateDraggingGenes=false;
    bRedrawTextures=true;
    setDisplayListDirty();
  }
}