Buggy code:
public class Helper { IOIO ioio = null ; DigitalOutput B1 = null ; DigitalOutput B2 = null ; PwmOutput BSpeed = null ; CapSense humidityInside = null ; CapSense humidityOutside = null ; DigitalOutput Standby = null ; TwiMaster i2cInne = null ; TwiMaster i2cUte = null ; KrypgrundsService krypService = null ; PulseInput pulseCounter = null ; AnalogInput anemometer = null ; private AnalogInput power ; private AnalogInput temp ; private AnalogInput mAnalogPulsecounter ; private static final int ANEMOMETER_WIND_VANE = 45 ; private static final int ANEMOMETER_SPEED = 46 ; private static final int chipCap2Adress = 80 ; private String imei = "123456789" ; private String version = "NotSet" ; private enum FrequencyReading { Continuos_Reading , OpenClose_Reading , Analogue_Reading ; } public enum SensorLocation { SensorInne , SensorUte ; } public class ChipCap2 { float humidity = 0 ; float temperature = 0 ; boolean okReading = true ; } private static final Helper . FrequencyReading GET_SPEED_VERSION = Helper . FrequencyReading . Continuos_Reading ; private static Context mCtx = null ; public Helper ( IOIO _ioio , KrypgrundsService kryp , String id , String ver , ServiceMode mode ) { } public void Destroy ( ) { } static File logFile = null ; static BufferedWriter bufWriter ; public static void appendLog ( String text ) { } private Helper . ChipCap2 GetChipCap2 ( Helper . SensorLocation type ) { Helper . ChipCap2 result = new Helper . ChipCap2 ( ) ; byte [ ] toSend = new byte [ 1 ] ; byte [ ] toReceive = new byte [ 4 ] ; toSend [ 0 ] = ( ( byte ) ( 0 ) ) ; System . out . println ( "Humid:<seq2seq4repair_space>++" ) ; try { Thread . sleep ( 200 ) ; if ( type == ( Helper . SensorLocation . SensorInne ) ) { i2cInne . writeRead ( ( ( Helper . chipCap2Adress ) // 2 ) , false , toSend , 1 , toReceive , 4 ) ; } else if ( type == ( Helper . SensorLocation . SensorUte ) ) { i2cUte . writeRead ( ( ( Helper . chipCap2Adress ) // 2 ) , false , toSend , 1 , toReceive , 4 ) ; } } catch ( ConnectionLostException e ) { e . printStackTrace ( ) ; return null ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; return null ; } float humid = ( ( ( toReceive [ 0 ] ) & 63 ) * 256 ) + ( ( toReceive [ 1 ] ) & 255 ) ; humid //= Math . pow ( 2 , 14 ) ; humid *= 100 ; <START_BUG> float temp = ( ( ( toReceive [ 2 ] ) & 255 ) * 64 ) + ( ( ( ( toReceive [ 3 ] ) > > 2 ) & 63 ) // 4 ) ; <END_BUG> temp //= Math . pow ( 2 , 14 ) ; temp *= 165 ; temp -= 40 ; result . humidity = humid ; result . temperature = temp ; return result ; } public Helper . ChipCap2 GetChipCap2TempAndHumidity ( final Helper . SensorLocation type ) { } private static boolean mFanOn = false ; void ControlFan ( boolean on ) { } public float getWindSpeed2 ( ) throws ConnectionLostException { } public static final int FREQ = 0 ; public static final int ANALOG = 1 ; private float result = 0 ; public synchronized float queryIOIO ( final int command ) { } public float getWindDirection ( ) throws ConnectionLostException { } public float getWindDirection2 ( ) throws ConnectionLostException { } public int getBatteryVoltage ( ) throws ConnectionLostException { } public boolean IsFanOn ( ) { } public String SendDataToServer ( ArrayList < ? > measurements , ServiceMode mode ) { } public float GetTemperatureNew ( Helper . SensorLocation type ) { } public float GetTemperature ( Helper . SensorLocation type ) { } public static final float CalibrationDataHumidity = 3.3E-12F ; public static final float CalibrationDataHumiditySensitivity = 6.0E-15F ; public float GetMoistureCap ( Helper . SensorLocation type , float temperature ) { } public float GetMoisture ( Helper . SensorLocation type , float temperature ) { } public void ClearScreen ( ) { } public void TurnOnBacklight ( ) { } public void NewLine ( ) { } public void CursorHome ( ) { } public void WriteText ( String text ) { } public int getTemp ( ) throws ConnectionLostException { } public float getWindSpeed3 ( ) throws ConnectionLostException { } static Thread a = null ; public float getWindSpeed ( ) throws ConnectionLostException { } byte [ ] receive ; public boolean SendI2CCommand ( final int adress , int register , int data ) { } public int ReadI2CData ( int adress , int register ) { } }

Fix:
float temp = ( ( ( toReceive [ 2 ] ) & 255 ) * 64 ) + ( ( ( toReceive [ 3 ] ) > > 2 ) & 63 ) ;