Program: 104954
Project: 104954
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  MainApplication app=(MainApplication)getActivity().getApplicationContext();
  Bus bus=app.getBus();
  bus.register(this);
  addPreferencesFromResource(R.xml.prefs);
  CheckBoxPreference autoLoadContentPreference=(CheckBoxPreference)findPreference(Settings.PREFERENCE_AUTO_LOAD_CONTENT);
  autoLoadContentPreference.setChecked(Settings.get().autoLoadContent());
  Preference incognitoButton=findPreference("String_Node_Str");
  if (incognitoButton != null) {
    incognitoButton.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener(){
      @Override public boolean onPreferenceChange(      Preference preference,      Object newValue){
        MainApplication app=(MainApplication)getActivity().getApplication();
        Bus bus=app.getBus();
        bus.post(new IncognitoModeChangedEvent((Boolean)newValue));
        return true;
      }
    }
);
  }
  Preference loadUrlButton=findPreference("String_Node_Str");
  if (loadUrlButton != null) {
    loadUrlButton.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
      @Override public boolean onPreferenceClick(      Preference preference){
        MainApplication.openLink(getActivity(),"String_Node_Str",true);
        return true;
      }
    }
);
  }
  final Preference leftConsumeBubblePreference=findPreference(Settings.PREFERENCE_LEFT_CONSUME_BUBBLE);
  leftConsumeBubblePreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      AlertDialog alertDialog=ActionItem.getConfigureBubbleAlert(getActivity(),new ActionItem.OnActionItemSelectedListener(){
        @Override public void onSelected(        ActionItem actionItem){
          Settings.get().setConsumeBubble(Config.BubbleAction.ConsumeLeft,actionItem.mType,actionItem.getLabel(),actionItem.mPackageName,actionItem.mActivityClassName);
          leftConsumeBubblePreference.setSummary(Settings.get().getConsumeBubbleLabel(Config.BubbleAction.ConsumeLeft));
        }
      }
);
      alertDialog.show();
      return true;
    }
  }
);
  leftConsumeBubblePreference.setSummary(Settings.get().getConsumeBubbleLabel(Config.BubbleAction.ConsumeLeft));
  final Preference rightConsumeBubblePreference=findPreference(Settings.PREFERENCE_RIGHT_CONSUME_BUBBLE);
  rightConsumeBubblePreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      AlertDialog alertDialog=ActionItem.getConfigureBubbleAlert(getActivity(),new ActionItem.OnActionItemSelectedListener(){
        @Override public void onSelected(        ActionItem actionItem){
          Settings.get().setConsumeBubble(Config.BubbleAction.ConsumeRight,actionItem.mType,actionItem.getLabel(),actionItem.mPackageName,actionItem.mActivityClassName);
          rightConsumeBubblePreference.setSummary(Settings.get().getConsumeBubbleLabel(Config.BubbleAction.ConsumeRight));
        }
      }
);
      alertDialog.show();
      return true;
    }
  }
);
  rightConsumeBubblePreference.setSummary(Settings.get().getConsumeBubbleLabel(Config.BubbleAction.ConsumeRight));
  Preference defaultBrowserPreference=findPreference(Settings.PREFERENCE_DEFAULT_BROWSER);
  defaultBrowserPreference.setTitle(Settings.get().getDefaultBrowserLabel());
  Drawable defaultBrowserIcon=Settings.get().getDefaultBrowserIcon(getActivity());
  if (defaultBrowserIcon != null) {
    defaultBrowserPreference.setIcon(defaultBrowserIcon);
  }
  defaultBrowserPreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    final Preference preference){
      AlertDialog alertDialog=ActionItem.getDefaultBrowserAlert(getActivity(),new ActionItem.OnActionItemSelectedListener(){
        @Override public void onSelected(        ActionItem actionItem){
          Settings.get().setDefaultBrowser(actionItem.getLabel(),actionItem.mPackageName);
          preference.setTitle(Settings.get().getDefaultBrowserLabel());
          Drawable defaultBrowserIcon=Settings.get().getDefaultBrowserIcon(getActivity());
          if (defaultBrowserIcon != null) {
            preference.setIcon(defaultBrowserIcon);
          }
        }
      }
);
      alertDialog.show();
      return true;
    }
  }
);
  configureDefaultAppsList();
  SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(getActivity());
  if (prefs.getBoolean("String_Node_Str",true)) {
    MainApplication.openLink(getActivity(),"String_Node_Str",false);
  }
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  MainApplication app=(MainApplication)getActivity().getApplicationContext();
  Bus bus=app.getBus();
  bus.register(this);
  addPreferencesFromResource(R.xml.prefs);
  CheckBoxPreference autoLoadContentPreference=(CheckBoxPreference)findPreference(Settings.PREFERENCE_AUTO_LOAD_CONTENT);
  autoLoadContentPreference.setChecked(Settings.get().autoLoadContent());
  Preference incognitoButton=findPreference("String_Node_Str");
  if (incognitoButton != null) {
    incognitoButton.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener(){
      @Override public boolean onPreferenceChange(      Preference preference,      Object newValue){
        MainApplication app=(MainApplication)getActivity().getApplication();
        Bus bus=app.getBus();
        bus.post(new IncognitoModeChangedEvent((Boolean)newValue));
        return true;
      }
    }
);
  }
  final Preference leftConsumeBubblePreference=findPreference(Settings.PREFERENCE_LEFT_CONSUME_BUBBLE);
  leftConsumeBubblePreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      AlertDialog alertDialog=ActionItem.getConfigureBubbleAlert(getActivity(),new ActionItem.OnActionItemSelectedListener(){
        @Override public void onSelected(        ActionItem actionItem){
          Settings.get().setConsumeBubble(Config.BubbleAction.ConsumeLeft,actionItem.mType,actionItem.getLabel(),actionItem.mPackageName,actionItem.mActivityClassName);
          leftConsumeBubblePreference.setSummary(Settings.get().getConsumeBubbleLabel(Config.BubbleAction.ConsumeLeft));
        }
      }
);
      alertDialog.show();
      return true;
    }
  }
);
  leftConsumeBubblePreference.setSummary(Settings.get().getConsumeBubbleLabel(Config.BubbleAction.ConsumeLeft));
  final Preference rightConsumeBubblePreference=findPreference(Settings.PREFERENCE_RIGHT_CONSUME_BUBBLE);
  rightConsumeBubblePreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      AlertDialog alertDialog=ActionItem.getConfigureBubbleAlert(getActivity(),new ActionItem.OnActionItemSelectedListener(){
        @Override public void onSelected(        ActionItem actionItem){
          Settings.get().setConsumeBubble(Config.BubbleAction.ConsumeRight,actionItem.mType,actionItem.getLabel(),actionItem.mPackageName,actionItem.mActivityClassName);
          rightConsumeBubblePreference.setSummary(Settings.get().getConsumeBubbleLabel(Config.BubbleAction.ConsumeRight));
        }
      }
);
      alertDialog.show();
      return true;
    }
  }
);
  rightConsumeBubblePreference.setSummary(Settings.get().getConsumeBubbleLabel(Config.BubbleAction.ConsumeRight));
  Preference defaultBrowserPreference=findPreference(Settings.PREFERENCE_DEFAULT_BROWSER);
  defaultBrowserPreference.setTitle(Settings.get().getDefaultBrowserLabel());
  Drawable defaultBrowserIcon=Settings.get().getDefaultBrowserIcon(getActivity());
  if (defaultBrowserIcon != null) {
    defaultBrowserPreference.setIcon(defaultBrowserIcon);
  }
  defaultBrowserPreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    final Preference preference){
      AlertDialog alertDialog=ActionItem.getDefaultBrowserAlert(getActivity(),new ActionItem.OnActionItemSelectedListener(){
        @Override public void onSelected(        ActionItem actionItem){
          Settings.get().setDefaultBrowser(actionItem.getLabel(),actionItem.mPackageName);
          preference.setTitle(Settings.get().getDefaultBrowserLabel());
          Drawable defaultBrowserIcon=Settings.get().getDefaultBrowserIcon(getActivity());
          if (defaultBrowserIcon != null) {
            preference.setIcon(defaultBrowserIcon);
          }
        }
      }
);
      alertDialog.show();
      return true;
    }
  }
);
  configureDefaultAppsList();
}