Program: 142158
Project: 142158
Buggy source:
@Override public boolean onCreateOptionsMenu(Menu menu){
  super.onCreateOptionsMenu(menu);
  menu.add(0,MENU_SORT,MENU_SORT,Localization.get("String_Node_Str")).setIcon(android.R.drawable.ic_menu_sort_alphabetically);
  if (mMappingEnabled) {
    menu.add(0,MENU_MAP,MENU_MAP,Localization.get("String_Node_Str")).setIcon(android.R.drawable.ic_menu_mapmode);
  }
  Action action=shortSelect.getCustomAction();
  if (action != null) {
    ViewUtil.addDisplayToMenu(this,menu,MENU_ACTION,action.getDisplay().evaluate());
  }
  tryToAddActionSearchBar(this,menu,new ActionBarInstantiator(){
    @TargetApi(Build.VERSION_CODES.HONEYCOMB) @Override public void onActionBarFound(    MenuItem searchItem,    SearchView searchView){
      EntitySelectActivity.this.searchItem=searchItem;
      EntitySelectActivity.this.searchView=searchView;
      if (lastQueryString != null && lastQueryString.length() > 0) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
          searchItem.expandActionView();
        }
        searchView.setQuery(lastQueryString,false);
        if (BuildConfig.DEBUG) {
          Log.v(TAG,"String_Node_Str" + lastQueryString + "String_Node_Str");
        }
        if (adapter != null) {
          adapter.applyFilter(lastQueryString == null ? "String_Node_Str" : lastQueryString);
        }
      }
      EntitySelectActivity.this.searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener(){
        @Override public boolean onQueryTextSubmit(        String query){
          return true;
        }
        @Override public boolean onQueryTextChange(        String newText){
          lastQueryString=newText;
          if (adapter != null) {
            adapter.applyFilter(newText);
          }
          return false;
        }
      }
);
    }
  }
);
  return true;
}

Fixed version (ground truth):
@Override public boolean onCreateOptionsMenu(Menu menu){
  super.onCreateOptionsMenu(menu);
  menu.add(0,MENU_SORT,MENU_SORT,Localization.get("String_Node_Str")).setIcon(android.R.drawable.ic_menu_sort_alphabetically);
  if (mMappingEnabled) {
    menu.add(0,MENU_MAP,MENU_MAP,Localization.get("String_Node_Str")).setIcon(android.R.drawable.ic_menu_mapmode);
  }
  Action action=shortSelect.getCustomAction();
  if (action != null) {
    ViewUtil.addDisplayToMenu(this,menu,MENU_ACTION,action.getDisplay().evaluate());
  }
  tryToAddActionSearchBar(this,menu,new ActionBarInstantiator(){
    @TargetApi(Build.VERSION_CODES.HONEYCOMB) @Override public void onActionBarFound(    MenuItem searchItem,    SearchView searchView){
      EntitySelectActivity.this.searchItem=searchItem;
      EntitySelectActivity.this.searchView=searchView;
      if (lastQueryString != null && lastQueryString.length() > 0) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
          searchItem.expandActionView();
        }
        searchView.setQuery(lastQueryString,false);
        if (BuildConfig.DEBUG) {
          Log.v(TAG,"String_Node_Str" + lastQueryString + "String_Node_Str");
        }
        if (adapter != null) {
          adapter.applyFilter(lastQueryString == null ? "String_Node_Str" : lastQueryString);
        }
      }
      EntitySelectActivity.this.searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener(){
        @Override public boolean onQueryTextSubmit(        String query){
          return true;
        }
        @Override public boolean onQueryTextChange(        String newText){
          lastQueryString=newText;
          filterString=newText;
          if (adapter != null) {
            adapter.applyFilter(newText);
          }
          return false;
        }
      }
);
    }
  }
);
  return true;
}