Program: 80568
Project: 80568
Buggy source:
@Override public void onActivityCreated(Bundle savedInstanceState){
  super.onActivityCreated(savedInstanceState);
  final int prefLayout=getArguments().getInt("String_Node_Str");
  setHasOptionsMenu(true);
  addPreferencesFromResource(prefLayout);
  final SharedPreferences prefs2=prefs.prefsGet();
  SharedPreferences.Editor editor=prefs.editorGet();
  try {
    divider_preference=(CheckBoxPreference)findPreference(DIVIDER_PREFERENCE);
    divider_preference.setChecked(prefs2.getBoolean(DIVIDER_PREFERENCE,DIVIDER_DEFAULT));
    divider_preference.setOnPreferenceChangeListener(changeListener);
    colorize_preference=(CheckBoxPreference)findPreference(COLORIZE_PREFERENCE);
    colorize_preference.setChecked(prefs2.getBoolean(COLORIZE_PREFERENCE,COLORIZE_DEFAULT));
    colorize_preference.setOnPreferenceChangeListener(changeListener);
    icon_color_preference=(ColorPickerPreference)findPreference(ICON_COLOR_PREFERENCE);
    int intColor=prefs2.getInt(ICON_COLOR_PREFERENCE,ICON_COLOR_DEFAULT);
    String hexColor=String.format("String_Node_Str",(intColor));
    icon_color_preference.setSummary(hexColor);
    icon_color_preference.setOnPreferenceChangeListener(changeListener);
    appnos_preference=(UpdatingListPreference)findPreference(APPSNO_PREFERENCE);
    appnos_preference.setValue(prefs2.getString(APPSNO_PREFERENCE,Integer.toString(APPSNO_DEFAULT)));
    appnos_preference.setOnPreferenceChangeListener(changeListener);
    statusbar_icon_preference=(UpdatingListPreference)findPreference(STATUSBAR_ICON_PREFERENCE);
    statusbar_icon_preference.setValue(prefs2.getString(STATUSBAR_ICON_PREFERENCE,STATUSBAR_ICON_DEFAULT));
    statusbar_icon_preference.setOnPreferenceChangeListener(changeListener);
    icon_size_preference=(UpdatingListPreference)findPreference(Settings.ICON_SIZE_PREFERENCE);
    icon_size_preference.setValue(prefs2.getString(Settings.ICON_SIZE_PREFERENCE,Integer.toString(Settings.ICON_SIZE_DEFAULT)));
    icon_size_preference.setOnPreferenceChangeListener(changeListener);
    icon_pack_preference=findPreference(Settings.ICON_PACK_PREFERENCE);
    icon_pack_preference.setSummary(getApplicationName(prefs2.getString(ICON_PACK_PREFERENCE,null)));
    iconPackUpdate=new IconPackUpdate(prefs2,icon_pack_preference);
    icon_pack_preference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
      @Override public boolean onPreferenceClick(      Preference preference){
        IconPackHelper.pickIconPack(mContext);
        return false;
      }
    }
);
    second_row_preference=(CheckBoxPreference)findPreference(Settings.SECOND_ROW_PREFERENCE);
    Boolean secondRow=prefs2.getBoolean(SECOND_ROW_PREFERENCE,SECOND_ROW_DEFAULT);
    second_row_preference.setChecked(secondRow);
    setAppsnoSummary(secondRow,appnos_preference);
    second_row_preference.setOnPreferenceChangeListener(changeListener);
  }
 catch (  NullPointerException e) {
  }
  try {
    toggle_preference=(SwitchPreference)findPreference(TOGGLE_PREFERENCE);
    toggle_preference.setChecked(prefs2.getBoolean(TOGGLE_PREFERENCE,TOGGLE_DEFAULT));
    toggle_preference.setOnPreferenceChangeListener(changeListener);
    boot_preference=(SwitchPreference)findPreference(BOOT_PREFERENCE);
    boot_preference.setChecked(prefs2.getBoolean(BOOT_PREFERENCE,BOOT_DEFAULT));
    boot_preference.setOnPreferenceChangeListener(changeListener);
    weighted_recents_preference=(CheckBoxPreference)findPreference(WEIGHTED_RECENTS_PREFERENCE);
    weighted_recents_preference.setChecked(prefs2.getBoolean(WEIGHTED_RECENTS_PREFERENCE,WEIGHTED_RECENTS_DEFAULT));
    weighted_recents_preference.setOnPreferenceChangeListener(changeListener);
    weight_priority_preference=(UpdatingListPreference)findPreference(WEIGHT_PRIORITY_PREFERENCE);
    weight_priority_preference.setValue(prefs2.getString(WEIGHT_PRIORITY_PREFERENCE,Integer.toString(WEIGHT_PRIORITY_DEFAULT)));
    weight_priority_preference.setOnPreferenceChangeListener(changeListener);
    priority_preference=(UpdatingListPreference)findPreference(PRIORITY_PREFERENCE);
    priority_preference.setValue(prefs2.getString(PRIORITY_PREFERENCE,Integer.toString(PRIORITY_DEFAULT)));
    priority_preference.setOnPreferenceChangeListener(changeListener);
  }
 catch (  NullPointerException e) {
  }
}

Fixed version (ground truth):
@Override public void onActivityCreated(Bundle savedInstanceState){
  super.onActivityCreated(savedInstanceState);
  final int prefLayout=getArguments().getInt("String_Node_Str");
  setHasOptionsMenu(true);
  addPreferencesFromResource(prefLayout);
  final SharedPreferences prefs2=prefs.prefsGet();
  SharedPreferences.Editor editor=prefs.editorGet();
  try {
    divider_preference=(CheckBoxPreference)findPreference(DIVIDER_PREFERENCE);
    divider_preference.setChecked(prefs2.getBoolean(DIVIDER_PREFERENCE,DIVIDER_DEFAULT));
    divider_preference.setOnPreferenceChangeListener(changeListener);
    row_divider_preference=(CheckBoxPreference)findPreference(ROW_DIVIDER_PREFERENCE);
    row_divider_preference.setChecked(prefs2.getBoolean(ROW_DIVIDER_PREFERENCE,ROW_DIVIDER_DEFAULT));
    row_divider_preference.setOnPreferenceChangeListener(changeListener);
    colorize_preference=(CheckBoxPreference)findPreference(COLORIZE_PREFERENCE);
    colorize_preference.setChecked(prefs2.getBoolean(COLORIZE_PREFERENCE,COLORIZE_DEFAULT));
    colorize_preference.setOnPreferenceChangeListener(changeListener);
    icon_color_preference=(ColorPickerPreference)findPreference(ICON_COLOR_PREFERENCE);
    int intColor=prefs2.getInt(ICON_COLOR_PREFERENCE,ICON_COLOR_DEFAULT);
    String hexColor=String.format("String_Node_Str",(intColor));
    icon_color_preference.setSummary(hexColor);
    icon_color_preference.setOnPreferenceChangeListener(changeListener);
    appnos_preference=(UpdatingListPreference)findPreference(APPSNO_PREFERENCE);
    appnos_preference.setValue(prefs2.getString(APPSNO_PREFERENCE,Integer.toString(APPSNO_DEFAULT)));
    appnos_preference.setOnPreferenceChangeListener(changeListener);
    statusbar_icon_preference=(UpdatingListPreference)findPreference(STATUSBAR_ICON_PREFERENCE);
    statusbar_icon_preference.setValue(prefs2.getString(STATUSBAR_ICON_PREFERENCE,STATUSBAR_ICON_DEFAULT));
    statusbar_icon_preference.setOnPreferenceChangeListener(changeListener);
    icon_size_preference=(UpdatingListPreference)findPreference(Settings.ICON_SIZE_PREFERENCE);
    icon_size_preference.setValue(prefs2.getString(Settings.ICON_SIZE_PREFERENCE,Integer.toString(Settings.ICON_SIZE_DEFAULT)));
    icon_size_preference.setOnPreferenceChangeListener(changeListener);
    icon_pack_preference=findPreference(Settings.ICON_PACK_PREFERENCE);
    icon_pack_preference.setSummary(getApplicationName(prefs2.getString(ICON_PACK_PREFERENCE,null)));
    iconPackUpdate=new IconPackUpdate(prefs2,icon_pack_preference);
    icon_pack_preference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
      @Override public boolean onPreferenceClick(      Preference preference){
        IconPackHelper.pickIconPack(mContext);
        return false;
      }
    }
);
    second_row_preference=(CheckBoxPreference)findPreference(Settings.SECOND_ROW_PREFERENCE);
    Boolean secondRow=prefs2.getBoolean(SECOND_ROW_PREFERENCE,SECOND_ROW_DEFAULT);
    second_row_preference.setChecked(secondRow);
    setAppsnoSummary(secondRow,appnos_preference);
    second_row_preference.setOnPreferenceChangeListener(changeListener);
  }
 catch (  NullPointerException e) {
  }
  try {
    toggle_preference=(SwitchPreference)findPreference(TOGGLE_PREFERENCE);
    toggle_preference.setChecked(prefs2.getBoolean(TOGGLE_PREFERENCE,TOGGLE_DEFAULT));
    toggle_preference.setOnPreferenceChangeListener(changeListener);
    boot_preference=(SwitchPreference)findPreference(BOOT_PREFERENCE);
    boot_preference.setChecked(prefs2.getBoolean(BOOT_PREFERENCE,BOOT_DEFAULT));
    boot_preference.setOnPreferenceChangeListener(changeListener);
    weighted_recents_preference=(CheckBoxPreference)findPreference(WEIGHTED_RECENTS_PREFERENCE);
    weighted_recents_preference.setChecked(prefs2.getBoolean(WEIGHTED_RECENTS_PREFERENCE,WEIGHTED_RECENTS_DEFAULT));
    weighted_recents_preference.setOnPreferenceChangeListener(changeListener);
    weight_priority_preference=(UpdatingListPreference)findPreference(WEIGHT_PRIORITY_PREFERENCE);
    weight_priority_preference.setValue(prefs2.getString(WEIGHT_PRIORITY_PREFERENCE,Integer.toString(WEIGHT_PRIORITY_DEFAULT)));
    weight_priority_preference.setOnPreferenceChangeListener(changeListener);
    priority_preference=(UpdatingListPreference)findPreference(PRIORITY_PREFERENCE);
    priority_preference.setValue(prefs2.getString(PRIORITY_PREFERENCE,Integer.toString(PRIORITY_DEFAULT)));
    priority_preference.setOnPreferenceChangeListener(changeListener);
  }
 catch (  NullPointerException e) {
  }
}