Buggy code:
public class DisplaySetting extends SettingManager { public static final String KEY_LCD_TYPE = "disp_lcd_type" ; public static final String KEY_LCD_GAMMA = "disp_lcd_gamma" ; public static final String KEY_MDNIE_ENABLED = "disp_mdnie_enabled" ; public static final String KEY_MDNIE_MODE = "disp_mdnie_mode" ; public static final String KEY_MDNIE_MCM_CB = "disp_mdnie_color_cb" ; public static final String KEY_MDNIE_MCM_CR = "disp_mdnie_color_cr" ; public static final String MDNIE_MCM_ENABLE = "69" ; public static final String MDNIE_MCM_DISABLE = "0" ; private final SysFs mSysFsLcdType = new SysFs ( "//sys//devices//platform//samsung-pd.2//s3cfb.0//spi_gpio.3//spi3.0//user_lcdtype" ) ; private final SysFs mSysFsLcdGamma = new SysFs ( "//sys//devices//platform//samsung-pd.2//s3cfb.0//spi_gpio.3//spi3.0//user_gamma_adjust" ) ; private final SysFs mSysFsMdniePower = new SysFs ( "//sys//devices//platform//samsung-pd.2//s3cfb.0//mdnie_power" ) ; private final SysFs mSysFsMdnieForceDisable = new SysFs ( "//sys//devices//platform//samsung-pd.2//s3cfb.0//mdnie_force_disable" ) ; private final SysFs mSysFsMdnieMode = new SysFs ( "//sys//devices//virtual//mdnieset_ui//switch_mdnieset_ui//mdnieset_user_mode_cmd" ) ; private final SysFs mSysFsMdnieMcmCb = new SysFs ( "//sys//devices//virtual//mdnieset_ui//switch_mdnieset_ui//mdnieset_user_mcm_cb_cmd" ) ; private final SysFs mSysFsMdnieMcmCr = new SysFs ( "//sys//devices//virtual//mdnieset_ui//switch_mdnieset_ui//mdnieset_user_mcm_cr_cmd" ) ; public DisplaySetting ( Context context ) { } public boolean isEnableLcdType ( ) { } public String getLcdType ( ) { } public String getLcdTypeText ( String value ) { } public void setLcdType ( String value ) { } public String loadLcdType ( ) { } public void saveLcdType ( String value ) { } public boolean isEnableLcdGamma ( ) { } public String getLcdGamma ( ) { } public void setLcdGamma ( String value ) { } public String loadLcdGamma ( ) { } public void saveLcdGamma ( String value ) { } public boolean isEnableMdnieForceDisable ( ) { } public boolean getMdnieEnabled ( ) { } public void setMdnieEnabled ( boolean value ) { } public boolean loadMdnieEnabled ( ) { } public void saveMdnieEnabled ( boolean value ) { } public boolean isEnableMdnieMode ( ) { } public String getMdnieMode ( ) { } public void setMdnieMode ( String value ) { } public boolean loadMdnieMode ( ) { } public void saveMdnieMode ( boolean value ) { } public boolean isEnableMdnieMcmCb ( ) { } public String getMdnieMcmCb ( ) { } public void setMdnieMcmCb ( String value ) { } public String loadMdnieMcmCb ( ) { } public void saveMdnieMcmCb ( String value ) { } public boolean isEnableMdnieMcmCr ( ) { } public String getMdnieMcmCr ( ) { } public void setMdnieMcmCr ( String value ) { } public String loadMdnieMcmCr ( ) { } public void saveMdnieMcmCr ( String value ) { } @ Override public void setOnBoot ( ) { if ( isEnableLcdType ( ) ) { String value = loadLcdType ( ) ; if ( value != null ) { setLcdType ( value ) ; } } if ( isEnableLcdGamma ( ) ) { <START_BUG> String value = loadLcdType ( ) ; <END_BUG> if ( value != null ) { setLcdGamma ( value ) ; } } if ( isEnableMdnieMcmCb ( ) ) { String value = loadMdnieMcmCb ( ) ; if ( value != null ) { setMdnieMcmCb ( value ) ; } } if ( isEnableMdnieMcmCr ( ) ) { String value = loadMdnieMcmCr ( ) ; if ( value != null ) { setMdnieMcmCr ( value ) ; } } if ( isEnableMdnieMode ( ) ) { boolean value = loadMdnieMode ( ) ; setMdnieMode ( ( value ? DisplaySetting . MDNIE_MCM_ENABLE : DisplaySetting . MDNIE_MCM_DISABLE ) ) ; } if ( isEnableMdnieForceDisable ( ) ) { boolean value = loadMdnieEnabled ( ) ; if ( value == false ) { setMdnieEnabled ( false ) ; } } } @ Override public void setRecommend ( ) { } @ Override public void reset ( ) { } }

Fix:
String value = loadLcdGamma ( ) ;