Buggy code:
public class MainActivity extends FragmentActivity { private static MainActivity ins ; private PendingIntent pendingIntent ; private PendingIntent pendingIntentTreatments ; private AlarmManager manager ; private AlarmManager managerTreatments ; private TextView sysMsg ; private TextView iobValueTextView ; private TextView cobValueTextView ; private TextView statsAge ; private TextView eventualBGValue ; private TextView snoozeBGValue ; private TextView openAPSAgeTextView ; private ExtendedGraphBuilder extendedGraphBuilder ; public static Activity activity ; private FloatingActionMenu menu1 ; MainActivity . SectionsPagerAdapter mSectionsPagerAdapter ; ViewPager mViewPager ; Fragment openAPSFragmentObject ; Fragment iobcobActiveFragmentObject ; Fragment iobcobFragmentObject ; Fragment basalvsTempBasalObject ; private LineChartView chart ; private PreviewLineChartView previewChart ; Viewport tempViewport = new Viewport ( ) ; Viewport holdViewport = new Viewport ( ) ; public float left ; public float right ; public float top ; public float bottom ; public boolean updateStuff ; public boolean updatingPreviewViewport = false ; public boolean updatingChartViewport = false ; public SharedPreferences prefs ; BroadcastReceiver _broadcastReceiver ; BroadcastReceiver newDataReceiver ; public static MainActivity getInstace ( ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void setupCharts ( ) { } public void test ( View view ) { } public void checkEula ( ) { } private class ChartViewPortListener implements ViewportChangeListener { @ Override public void onViewportChanged ( Viewport newViewport ) { } } private class ViewportListener implements ViewportChangeListener { @ Override public void onViewportChanged ( Viewport newViewport ) { } } public void setViewport ( ) { } public void displayCurrentInfo ( ) { } @ Override public void onPause ( ) { } @ Override protected void onResume ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onKeyUp ( int keyCode , KeyEvent event ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void updateOpenAPSDetails ( final JSONObject openAPSSuggest ) { } public void updateStats ( ) { } public void startLoops ( ) { } public void runOpenAPS ( View view ) { } public void apsstatusAccept ( final View view ) { } public class SectionsPagerAdapter extends FragmentPagerAdapter { public SectionsPagerAdapter ( FragmentManager fm ) { } @ Override public Fragment getItem ( int position ) { } @ Override public int getCount ( ) { } @ Override public CharSequence getPageTitle ( int position ) { } } public static class openAPSFragment extends Fragment { public openAPSFragment ( ) { } private static TextView apsstatus_deviation ; private static TextView apsstatus_reason ; private static TextView apsstatus_Action ; private static TextView apsstatus_temp ; private static Button apsstatusAcceptButton ; private static TextView apsstatus_mode ; private static TextView apsstatus_loop ; private static TempBasal Suggested_Temp_Basal = new TempBasal ( ) ; private static JSONObject currentOpenAPSSuggest ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public static TempBasal getSuggested_Temp_Basal ( ) { } public static JSONObject getcurrentOpenAPSSuggest ( ) { } public static String age ( ) { } public static void setSuggested_Temp_Basal ( JSONObject openAPSSuggest , Context c ) { } public static void update ( ) { } } public static class iobcobFragment extends Fragment { public iobcobFragment ( ) { } static LineChartView iobcobPastChart ; static ExtendedGraphBuilder extendedGraphBuilder ; static PreviewLineChartView previewChart ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public void setupChart ( ) { } public static void updateChart ( ) { } } public static class iobcobActiveFragment extends Fragment { public iobcobActiveFragment ( ) { } static ColumnChartView iobcobChart ; static ExtendedGraphBuilder extendedGraphBuilder ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public static JSONObject getIOBCOB ( Activity a ) { } public static JSONObject updateChart ( Activity a ) { JSONObject reply = new JSONObject ( ) ; List < Stats > statList = Stats . updateActiveBarChart ( a . getBaseContext ( ) ) ; try { reply . put ( "iob" , String . format ( Locale . ENGLISH , "%.2f" , 0.0 ) ) ; reply . put ( "cob" , String . format ( Locale . ENGLISH , "%.2f" , 0.0 ) ) ; } catch ( JSONException e ) { Crashlytics . logException ( e ) ; e . printStackTrace ( ) ; } <START_BUG> if ( ( ( MainActivity . iobcobActiveFragment . iobcobChart ) != null ) || ( statList != null ) ) { <END_BUG> if ( ( statList . size ( ) ) > 0 ) { MainActivity . iobcobActiveFragment . iobcobChart . setColumnChartData ( MainActivity . iobcobActiveFragment . extendedGraphBuilder . iobcobFutureChart ( statList ) ) ; try { reply . put ( "iob" , String . format ( Locale . ENGLISH , "%.2f" , statList . get ( 0 ) . iob ) ) ; reply . put ( "cob" , String . format ( Locale . ENGLISH , "%.2f" , statList . get ( 0 ) . cob ) ) ; } catch ( JSONException e ) { Crashlytics . logException ( e ) ; e . printStackTrace ( ) ; } } } return reply ; } } public static class basalvsTempBasalFragment extends Fragment { public basalvsTempBasalFragment ( ) { } static LineChartView basalvsTempBasalChart ; static ExtendedGraphBuilder extendedGraphBuilder ; static PreviewLineChartView previewChart ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public void setupChart ( ) { } public static void updateChart ( ) { } } }

Fix:
if ( ( ( MainActivity . iobcobActiveFragment . iobcobChart ) != null ) && ( statList != null ) ) {