Buggy code:
public class FlightComputer implements Runnable { private static final Logger logger = Logger . getLogger ( "FlightComputer" ) ; private FlightState < ? > state ; private FlightConfiguration config ; private QuadCopter ufo ; private RemoteControl rc ; private AutoControl autoThrottle ; private AutoControl autoElevator ; private AutoControl autoAileron ; private AutoControl autoRudder ; private float [ ] hoverConf ; private float [ ] landingConf ; private float [ ] orientationConf ; private float [ ] gpsConf ; private PrintStream printer ; private int minThrottle ; private int maxThrottle ; private int minTilt ; private int maxTilt ; private float minTiltAngle ; private float maxTiltAngle ; private float minSpeed ; private float maxSpeed ; private float height ; private float zeroHeight ; private Waypoint currentLocation ; private Waypoint zeroLocation ; private float goalHeight ; private float longitudinalDisplacement ; private float zeroLongitudinalDisplacement ; private float lateralDisplacement ; private float zeroLateralDisplacement ; private float heading ; private volatile long time ; private volatile long lastTimeOrientationSignal ; private volatile long lastTimeHeightSignal ; private volatile long lastTimeGpsHeight ; private int currentThrottle ; private int currentElevator ; private int currentAileron ; private int currentRudder ; private int zeroThrottle ; private boolean isCalibrated ; private ScheduledExecutorService scheduler ; public FlightComputer ( ) { } public float getZeroLongitudinalDisplacement ( ) { } public void setZeroLongitudinalDisplacement ( float zeroLongitudinalDisplacement ) { } public float getZeroLateralDisplacement ( ) { } public void setZeroLateralDisplacement ( float zeroLateralDisplacement ) { } public void shutdown ( ) { } public synchronized void takeoff ( float height ) throws ConnectionLostException { } public synchronized void hover ( float height ) throws ConnectionLostException { } public void waypoint ( float height ) throws ConnectionLostException { Waypoint wp ; try { wp = ( ( Waypoint ) ( currentLocation . clone ( ) ) ) ; <START_BUG> wp . altitude = ( this . getGpsHeight ( ) ) + height ; <END_BUG> state . transition ( new com . barbermot . pilot . flight . state . StateEvent < Waypoint > ( Type . WAYPOINT_HOLD , wp ) ) ; } catch ( CloneNotSupportedException e ) { FlightComputer . logger . warning ( "Waypoint<seq2seq4repair_space>clone<seq2seq4repair_space>not<seq2seq4repair_space>supported." ) ; } } public synchronized void ground ( ) throws ConnectionLostException { } public synchronized void land ( ) throws ConnectionLostException { } public synchronized void emergencyDescent ( ) throws ConnectionLostException { } public synchronized void manualControl ( ) throws ConnectionLostException { } public synchronized void autoControl ( ) throws ConnectionLostException { } public synchronized void abort ( ) throws ConnectionLostException { } public synchronized void stabilize ( boolean b ) throws ConnectionLostException { } public synchronized void forward ( int speed ) { } public synchronized void sideways ( int speed ) { } public synchronized void rotate ( int angle ) { } private float map ( float value , float minIn , float maxIn , float minOut , float maxOut ) { } public void balance ( ) { } public void calibrate ( ) { } public void calibrateControls ( ) throws ConnectionLostException { } public synchronized void run ( ) { } public boolean hasHeightSignal ( ) { } public boolean hasGpsSignal ( ) { } public float [ ] getHoverConf ( ) { } public void setHoverConf ( float [ ] hoverConf ) { } public float [ ] getLandingConf ( ) { } public void setLandingConf ( float [ ] landingConf ) { } public float [ ] getOrientationConf ( ) { } public void setOrientationConf ( float [ ] orientationConf ) { } public float [ ] getGpsConf ( ) { } public void setGpsConf ( float [ ] gpsConf ) { } public void setMinThrottle ( int min ) { } public void setMaxThrottle ( int max ) { } public float getLongitudinalDisplacement ( ) { } public void setLongitudinalDisplacement ( float longitudinalDisplacement ) { } public float getLateralDisplacement ( ) { } public void setLateralDisplacement ( float lateralDisplacement ) { } public QuadCopter getUfo ( ) { } public void setUfo ( QuadCopter ufo ) { } public AutoControl getAutoThrottle ( ) { } public void setAutoThrottle ( AutoControl autoThrottle ) { } public AutoControl getAutoElevator ( ) { } public void setAutoElevator ( AutoControl autoElevator ) { } public AutoControl getAutoAileron ( ) { } public void setAutoAileron ( AutoControl autoAileron ) { } public AutoControl getAutoRudder ( ) { } public void setAutoRudder ( AutoControl autoRudder ) { } public PrintStream getPrinter ( ) { } public void setPrinter ( PrintStream printer ) { } public int getMinThrottle ( ) { } public int getMaxThrottle ( ) { } public void setMinTilt ( int minTilt ) { } public int getMinTilt ( ) { } public void setMaxTilt ( int maxTilt ) { } public int getMaxTilt ( ) { } public long getLastTimeOrientationSignal ( ) { } public void setLastTimeOrientationSignal ( long lastTimeOrientationSignal ) { } public long getLastTimeHeightSignal ( ) { } public void setLastTimeHeightSignal ( long lastTimeHeightSignal ) { } public void setExecutor ( ScheduledExecutorService scheduler ) { } public ScheduledExecutorService getExecutor ( ) { } public RemoteControl getRc ( ) { } public void setRc ( RemoteControl rc ) { } public FlightState < ? > getState ( ) { } public void setState ( FlightState < ? > state ) { } public float getHeight ( ) { } public void setHeight ( float height ) { } public float getHeading ( ) { } public void setHeading ( float heading ) { } public long getTime ( ) { } public void setTime ( long time ) { } public int getCurrentThrottle ( ) { } public void setCurrentThrottle ( int currentThrottle ) { } public int getCurrentElevator ( ) { } public void setCurrentElevator ( int currentElevator ) { } public int getCurrentAileron ( ) { } public void setCurrentAileron ( int currentAileron ) { } public int getCurrentRudder ( ) { }

Fix:
wp . altitude = ( this . getZeroGpsHeight ( ) ) + height ;