Program: 20009
Project: 20009
Buggy source:
/** 
 * Asettaa TouchListenerit ja k�sittelee kosketustapahtumat.
 * @param GLSurfaceView OpenGL-pinta
 */
public final void setSurfaceListeners(GLSurfaceView _surface){
  surface=_surface;
  surface.setOnTouchListener(new OnTouchListener(){
    public boolean onTouch(    View v,    MotionEvent event){
      if (event.getAction() == MotionEvent.ACTION_DOWN) {
        xClickOffset=(int)event.getX();
        yClickOffset=screenHeight - (int)event.getY();
        if (xClickOffset > screenWidth - 100 && xClickOffset < screenWidth) {
          if (yClickOffset < yClickFirstBorder && yClickOffset > 0) {
            hud.triggerClick(Hud.BUTTON_3);
          }
 else           if (yClickOffset < yClickSecondBorder && yClickOffset > 66) {
            hud.triggerClick(Hud.BUTTON_2);
          }
 else           if (yClickOffset < yClickThirdBorder && yClickOffset > 132) {
            hud.triggerClick(Hud.BUTTON_1);
          }
        }
 else         if (xClickOffset < 64 && xClickOffset > 0) {
          if (yClickOffset < yClickFirstBorder && yClickOffset > 0) {
            hud.triggerClick(Hud.SPECIAL_2);
          }
 else           if (yClickOffset < yClickSecondBorder && yClickOffset > 66) {
            hud.triggerClick(Hud.SPECIAL_1);
          }
        }
 else {
          weaponManager.triggerShoot(convertCoords((int)event.getX(),(int)event.getY()));
        }
        return true;
      }
      if (event.getAction() == MotionEvent.ACTION_UP) {
        if (Math.abs(event.getX() - xClickOffset) < touchMarginal && Math.abs(event.getY() - yClickOffset) < touchMarginal) {
        }
        return true;
      }
      return false;
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Asettaa TouchListenerit ja k�sittelee kosketustapahtumat.
 * @param GLSurfaceView OpenGL-pinta
 */
public final void setSurfaceListeners(GLSurfaceView _surface){
  surface=_surface;
  surface.setOnTouchListener(new OnTouchListener(){
    public boolean onTouch(    View v,    MotionEvent event){
      if (event.getAction() == MotionEvent.ACTION_DOWN) {
        xClickOffset=(int)event.getX();
        yClickOffset=screenHeight - (int)event.getY();
        if (xClickOffset > screenWidth - 100 * Options.scale && xClickOffset < screenWidth) {
          if (yClickOffset < yClickFirstBorder * Options.scale && yClickOffset > 0) {
            hud.triggerClick(Hud.BUTTON_3);
          }
 else           if (yClickOffset < yClickSecondBorder * Options.scale && yClickOffset > 66 * Options.scale) {
            hud.triggerClick(Hud.BUTTON_2);
          }
 else           if (yClickOffset < yClickThirdBorder * Options.scale && yClickOffset > 132 * Options.scale) {
            hud.triggerClick(Hud.BUTTON_1);
          }
        }
 else         if (xClickOffset < 64 * Options.scale && xClickOffset > 0) {
          if (yClickOffset < yClickFirstBorder * Options.scale && yClickOffset > 0) {
            hud.triggerClick(Hud.SPECIAL_2);
          }
 else           if (yClickOffset < yClickSecondBorder * Options.scale && yClickOffset > 66 * Options.scale) {
            hud.triggerClick(Hud.SPECIAL_1);
          }
        }
 else {
          weaponManager.triggerShoot(convertCoords((int)event.getX(),(int)event.getY()));
        }
        return true;
      }
      if (event.getAction() == MotionEvent.ACTION_UP) {
        if (Math.abs(event.getX() - xClickOffset) < touchMarginal && Math.abs(event.getY() - yClickOffset) < touchMarginal) {
        }
        return true;
      }
      return false;
    }
  }
);
}