Buggy code:
public final class MobilityServices { private static MobilityServices instance ; private IUserMobilityQueries userMobilityQueries ; private MobilityServices ( IUserMobilityQueries iUserMobilityQueries ) { } public static MobilityServices instance ( ) { } public void createMobilityPoint ( final String username , final String client , final List < MobilityPoint > mobilityPoints ) throws ServiceException { } public void classifyData ( final List < MobilityPoint > mobilityPoints ) throws ServiceException { if ( mobilityPoints == null ) { return ; } MobilityClassifier classifier = new MobilityClassifier ( ) ; String previousSensorData = null ; String previousWifiMode = null ; for ( MobilityPoint mobilityPoint : mobilityPoints ) { if ( mobilityPoint . getMode ( ) . equals ( ERROR ) ) { continue ; } if ( SENSOR_DATA . equals ( mobilityPoint . getSubType ( ) ) ) { SensorData currSensorData = mobilityPoint . getSensorData ( ) ; WifiData wifiData = currSensorData . getWifiData ( ) ; String wifiDataString ; if ( wifiData == null ) { wifiDataString = null ; } else { try { wifiDataString = wifiData . toJson ( false ) . toString ( ) ; } catch ( JSONException e ) { throw new ServiceException ( e ) ; } } Classification classification ; try { classification = classifier . classify ( mobilityPoint . getSamples ( ) , currSensorData . getSpeed ( ) , wifiDataString , previousSensorData , previousWifiMode ) ; } catch ( DomainException e ) { throw new ServiceException ( e ) ; } previousSensorData = wifiDataString ; previousWifiMode = classification . getWifiMode ( ) ; if ( classification . hasFeatures ( ) ) { try { <START_BUG> mobilityPoint . setClassifierData ( classification . getFft ( ) , classification . getVariance ( ) , classification . getVariance ( ) , classification . getAverage ( ) , Mode . valueOf ( classification . getMode ( ) . toUpperCase ( ) ) ) ; <END_BUG> } catch ( DomainException e ) { throw new ServiceException ( "There<seq2seq4repair_space>was<seq2seq4repair_space>a<seq2seq4repair_space>problem<seq2seq4repair_space>reading<seq2seq4repair_space>the<seq2seq4repair_space>classification's<seq2seq4repair_space>information." , e ) ; } } else { try { mobilityPoint . setClassifierModeOnly ( Mode . valueOf ( classification . getMode ( ) . toUpperCase ( ) ) ) ; } catch ( DomainException e ) { throw new ServiceException ( "There<seq2seq4repair_space>was<seq2seq4repair_space>a<seq2seq4repair_space>problem<seq2seq4repair_space>reading<seq2seq4repair_space>the<seq2seq4repair_space>classification's<seq2seq4repair_space>mode." , e ) ; } } } } } public List < MobilityPoint > retrieveMobilityData ( final String username , final Date startDate , final Date endDate , final MobilityPoint . PrivacyState privacyState , final LocationStatus locationStatus , final org . ohmage . domain . MobilityPoint . Mode mode ) throws ServiceException { } public Collection < Date > getDates ( final Date startDate , final Date endDate , final String username ) throws ServiceException { } }

Fix:
mobilityPoint . setClassifierData ( classification . getFft ( ) , classification . getVariance ( ) , classification . getN95Variance ( ) , classification . getAverage ( ) , Mode . valueOf ( classification . getMode ( ) . toUpperCase ( ) ) ) ;