Buggy code:
public class IncomeVsExpensesActivity extends BaseFragmentActivity { private static final String LOGCAT = IncomeVsExpensesActivity . class . getSimpleName ( ) ; private static CurrencyUtils currencyUtils ; public boolean mIsDualPanel = false ; private IncomeVsExpensesActivity . IncomeVsExpensesListFragment listFragment = new IncomeVsExpensesActivity . IncomeVsExpensesListFragment ( ) ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private static class IncomeVsExpensesAdapter extends CursorAdapter { private LayoutInflater mInflater ; @ SuppressWarnings ( "deprecation" ) public IncomeVsExpensesAdapter ( Context context , Cursor c ) { } @ Override public void bindView ( View view , Context context , Cursor cursor ) { } @ Override public View newView ( Context context , Cursor cursor , ViewGroup parent ) { } } public static class IncomeVsExpensesListFragment extends ListFragment implements LoaderManager . LoaderCallbacks < Cursor > { private static final int ID_LOADER = 1 ; private static final String SORT_ASCENDING = "ASC" ; private static final String SORT_DESCENDING = "DESC" ; private static final String KEY_BUNDLE_YEAR = "IncomeVsExpensesListFragment:Years" ; private View mFooterListView ; private Map < Integer , Boolean > mCheckedItem = new HashMap < Integer , Boolean > ( ) ; private String mSort = IncomeVsExpensesActivity . IncomeVsExpensesListFragment . SORT_ASCENDING ; private View addListViewFooter ( ) { } private View addListViewHeader ( ) { } private int [ ] hashMap2IntArray ( Map < Integer , Boolean > map ) { } private int [ ] hashMap2IntArray ( Map < Integer , Boolean > map , boolean allItems ) { } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } @ Override public Loader < Cursor > onCreateLoader ( int id , Bundle args ) { } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } @ Override public void onLoaderReset ( Loader < Cursor > loader ) { } @ Override public void onLoadFinished ( Loader < Cursor > loader , Cursor data ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void showDialogSortMonth ( ) { } @ Override public void onPrepareOptionsMenu ( Menu menu ) { } @ Override public void onSaveInstanceState ( Bundle outState ) { } private void startLoader ( int [ ] years ) { } private void updateListViewFooter ( View footer , double income , double expenses ) { if ( footer == null ) { return ; } TextView txtIncome = ( ( TextView ) ( footer . findViewById ( textViewIncome ) ) ) ; TextView txtExpenses = ( ( TextView ) ( footer . findViewById ( textViewExpenses ) ) ) ; TextView txtDifference = ( ( TextView ) ( footer . findViewById ( textViewDifference ) ) ) ; txtIncome . setText ( IncomeVsExpensesActivity . currencyUtils . getCurrencyFormatted ( IncomeVsExpensesActivity . currencyUtils . getBaseCurrencyId ( ) , income ) ) ; txtIncome . setTypeface ( null , BOLD_ITALIC ) ; txtExpenses . setText ( IncomeVsExpensesActivity . currencyUtils . getCurrencyFormatted ( IncomeVsExpensesActivity . currencyUtils . getBaseCurrencyId ( ) , Math . abs ( expenses ) ) ) ; txtExpenses . setTypeface ( null , BOLD_ITALIC ) ; txtDifference . setText ( IncomeVsExpensesActivity . currencyUtils . getCurrencyFormatted ( IncomeVsExpensesActivity . currencyUtils . getBaseCurrencyId ( ) , ( income - ( Math . abs ( expenses ) ) ) ) ) ; txtDifference . setTypeface ( null , BOLD_ITALIC ) ; <START_BUG> Core core = new Core ( getActivity ( ) . getApplicationContext ( ) ) ; <END_BUG> if ( ( income - ( Math . abs ( expenses ) ) ) < 0 ) { txtDifference . setTextColor ( getResources ( ) . getColor ( core . resolveIdAttribute ( holo_red_color_theme ) ) ) ; } else { txtDifference . setTextColor ( getResources ( ) . getColor ( core . resolveIdAttribute ( holo_green_color_theme ) ) ) ; } } private void showChart ( ) { } } }

Fix:
Core core = new Core ( getActivity ( ) ) ;