Buggy code:
public class SearchResult extends Activity implements View . OnClickListener , RefreshListView . OnLoadListener , RefreshListView . OnRefreshListener , Observer { private RefreshListView refreshLv ; private LazyAdapter adapter ; private GeneralSearch search ; private ConditionCategoryLoader categoryLoader ; private Context ctx ; private Intent intent ; private ArrayList < HashMap < String , String > > paramList ; private LinearLayout priceAsc ; private LinearLayout priceDesc ; private LinearLayout timeAsc ; private LinearLayout timeDesc ; private Spinner categorySel ; private TextView searchBut ; private EditText searchContainer ; private String currentBut = "priceAsc" ; private String ApiKey ; private String UserID ; private static final int DARK_COLOR = - 1449187 ; private static final int BRIGHT_COLOR = - 131287 ; private String keyword ; private String category ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( item_display_frame ) ; intent = getIntent ( ) ; priceAsc = ( ( LinearLayout ) ( findViewById ( price_asc_touch ) ) ) ; priceAsc . setOnClickListener ( this ) ; priceDesc = ( ( LinearLayout ) ( findViewById ( price_desc_touch ) ) ) ; priceDesc . setOnClickListener ( this ) ; timeAsc = ( ( LinearLayout ) ( findViewById ( time_asc_touch ) ) ) ; timeAsc . setOnClickListener ( this ) ; timeDesc = ( ( LinearLayout ) ( findViewById ( time_desc_touch ) ) ) ; timeDesc . setOnClickListener ( this ) ; categorySel = ( ( Spinner ) ( findViewById ( search_category_again ) ) ) ; searchBut = ( ( TextView ) ( findViewById ( search_button_again ) ) ) ; searchBut . setOnClickListener ( this ) ; searchContainer = ( ( EditText ) ( findViewById ( search_again_container ) ) ) ; keyword = intent . getStringExtra ( "keywords" ) ; category = intent . getStringExtra ( "category" ) ; UserID = intent . getStringExtra ( "user_ID" ) ; if ( category . equals ( "All" ) ) category = "" ; ApiKey = intent . getStringExtra ( "api" ) ; refreshLv = ( ( RefreshListView ) ( findViewById ( search_result_frame_list ) ) ) ; refreshLv . setOnRefreshListener ( this ) ; refreshLv . setOnLoadListener ( this ) ; isRefreshing = true ; search = new GeneralSearch ( "0" , category , keyword , "" , "" , "" ) ; search . addObserver ( this ) ; search . loadList ( ) ; ctx = getApplicationContext ( ) ; refreshLv . setOnItemClickListener ( new AdapterView . OnItemClickListener ( ) { @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { if ( ( position > ( paramList . size ( ) ) ) || ( position <= 0 ) ) return ; Intent intent = new Intent ( ctx , ViewItem . class ) ; intent . putExtra ( KEY_IMAGE , paramList . get ( ( position - 1 ) ) . get ( KEY_IMAGE ) ) ; intent . putExtra ( KEY_ID , paramList . get ( ( position - 1 ) ) . get ( KEY_ID ) ) ; intent . putExtra ( "user_ID" , UserID ) ; intent . putExtra ( "API_key" , ApiKey ) ; startActivity ( intent ) ; } } ) ; <START_BUG> categoryLoader = new ConditionCategoryLoader ( null , categorySel , this ) ; <END_BUG> categoryLoader . addObserver ( this ) ; categoryLoader . loadConditionCategory ( ) ; searchContainer . setText ( keyword ) ; } @ Override public void update ( Observable observable , Object data ) { } @ Override public void onClick ( View v ) { } private void onTabClick ( LinearLayout l ) { } private void initLoadData ( ) { } private ArrayList < HashMap < String , String > > dataToDisplay = new ArrayList < > ( ) ; private int lastLoad = 0 ; private boolean isToEnd = false ; private boolean prepareDataForDisplay ( boolean isRefresh ) { } private void refreshLoadData ( ) { } private void augmentLoadData ( ) { } boolean isRefreshing = false ; @ Override public void onRefresh ( ) { } @ Override public void onLoad ( ) { } }

Fix:
categoryLoader = new ConditionCategoryLoader ( null , categorySel , this , false ) ;