Program: 162577
Project: 162577
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  addPreferencesFromResource(R.xml.preferences);
  sharedPref=PreferenceManager.getDefaultSharedPreferences(getActivity());
  skin=sharedPref.getString("String_Node_Str","String_Node_Str");
  fabSkin=sharedPref.getString("String_Node_Str","String_Node_Str");
  final int th1=Integer.parseInt(sharedPref.getString("String_Node_Str","String_Node_Str"));
  theme=th1 == 2 ? PreferenceUtils.hourOfDay() : th1;
  findPreference("String_Node_Str").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      final String[] sort=getResources().getStringArray(R.array.columns);
      MaterialDialog.Builder a=new MaterialDialog.Builder(getActivity());
      if (theme == 1)       a.theme(Theme.DARK);
      a.title(R.string.gridcolumnno);
      int current=Integer.parseInt(sharedPref.getString("String_Node_Str","String_Node_Str"));
      if (current != 0)       current=current - 2;
 else       current=1;
      a.items(sort).itemsCallbackSingleChoice(current,new MaterialDialog.ListCallbackSingleChoice(){
        @Override public boolean onSelection(        MaterialDialog dialog,        View view,        int which,        CharSequence text){
          sharedPref.edit().putString("String_Node_Str","String_Node_Str" + sort[which]).commit();
          dialog.dismiss();
          return true;
        }
      }
);
      a.build().show();
      return true;
    }
  }
);
  findPreference("String_Node_Str").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      String[] sort=getResources().getStringArray(R.array.hidemode);
      MaterialDialog.Builder a=new MaterialDialog.Builder(getActivity());
      if (theme == 1)       a.theme(Theme.DARK);
      a.title(getString(R.string.hide_mode_title));
      int current=sharedPref.getInt("String_Node_Str",0);
      a.items(sort).itemsCallbackSingleChoice(current,new MaterialDialog.ListCallbackSingleChoice(){
        @Override public boolean onSelection(        MaterialDialog dialog,        View view,        int which,        CharSequence text){
          sharedPref.edit().putInt("String_Node_Str",which).commit();
          dialog.dismiss();
          restartPC(getActivity());
          return true;
        }
      }
);
      a.build().show();
      return true;
    }
  }
);
  if (Build.VERSION.SDK_INT >= 21)   findPreference("String_Node_Str").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      restartPC(getActivity());
      return false;
    }
  }
);
  findPreference("String_Node_Str").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      String[] sort=getResources().getStringArray(R.array.directorysortmode);
      MaterialDialog.Builder a=new MaterialDialog.Builder(getActivity());
      if (theme == 1)       a.theme(Theme.DARK);
      a.title(R.string.directorysort);
      int current=Integer.parseInt(sharedPref.getString("String_Node_Str","String_Node_Str"));
      a.items(sort).itemsCallbackSingleChoice(current,new MaterialDialog.ListCallbackSingleChoice(){
        @Override public boolean onSelection(        MaterialDialog dialog,        View view,        int which,        CharSequence text){
          sharedPref.edit().putString("String_Node_Str","String_Node_Str" + which).commit();
          dialog.dismiss();
          return true;
        }
      }
);
      a.build().show();
      return true;
    }
  }
);
  findPreference("String_Node_Str").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      String[] sort=getResources().getStringArray(R.array.theme);
      int current=Integer.parseInt(sharedPref.getString("String_Node_Str","String_Node_Str"));
      MaterialDialog.Builder a=new MaterialDialog.Builder(getActivity());
      if (theme == 1)       a.theme(Theme.DARK);
      a.items(sort).itemsCallbackSingleChoice(current,new MaterialDialog.ListCallbackSingleChoice(){
        @Override public boolean onSelection(        MaterialDialog dialog,        View view,        int which,        CharSequence text){
          sharedPref.edit().putString("String_Node_Str","String_Node_Str" + which).commit();
          dialog.dismiss();
          restartPC(getActivity());
          return true;
        }
      }
);
      a.title(R.string.theme);
      a.build().show();
      return true;
    }
  }
);
  findPreference("String_Node_Str").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      String[] sort=getResources().getStringArray(R.array.sortby);
      int current=Integer.parseInt(sharedPref.getString("String_Node_Str","String_Node_Str"));
      MaterialDialog.Builder a=new MaterialDialog.Builder(getActivity());
      if (theme == 1)       a.theme(Theme.DARK);
      a.items(sort).itemsCallbackSingleChoice(current,new MaterialDialog.ListCallbackSingleChoice(){
        @Override public boolean onSelection(        MaterialDialog dialog,        View view,        int which,        CharSequence text){
          sharedPref.edit().putString("String_Node_Str","String_Node_Str" + which).commit();
          dialog.dismiss();
          return true;
        }
      }
);
      a.title(R.string.sortby);
      a.build().show();
      return true;
    }
  }
);
  findPreference("String_Node_Str").setOnPreferenceClickListener(this);
  findPreference("String_Node_Str").setOnPreferenceClickListener(this);
  findPreference("String_Node_Str").setOnPreferenceClickListener(this);
  final SwitchPreference checkBoxPreference=(SwitchPreference)findPreference("String_Node_Str");
  boolean check=sharedPref.getBoolean("String_Node_Str",false);
  checkBoxPreference.setChecked(check);
  checkBoxPreference.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener(){
    @Override public boolean onPreferenceChange(    Preference preference,    Object o){
      if (!checkBoxPreference.isChecked()) {
        sharedPref.edit().putBoolean("String_Node_Str",true).apply();
        checkBoxPreference.setChecked(true);
      }
 else {
        sharedPref.edit().putBoolean("String_Node_Str",false).apply();
        checkBoxPreference.setChecked(false);
      }
      Toast.makeText(getActivity(),R.string.setRandom,Toast.LENGTH_LONG).show();
      return false;
    }
  }
);
  final SwitchPreference rootmode=(SwitchPreference)findPreference("String_Node_Str");
  rootmode.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      boolean b=sharedPref.getBoolean("String_Node_Str",false);
      if (b) {
        if (RootTools.isAccessGiven()) {
          rootmode.setChecked(true);
        }
 else {
          rootmode.setChecked(false);
          Toast.makeText(getActivity(),getResources().getString(R.string.rootfailure),Toast.LENGTH_LONG).show();
        }
      }
 else {
        rootmode.setChecked(false);
      }
      return false;
    }
  }
);
  Preference preference4=(Preference)findPreference("String_Node_Str");
  preference4.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      MaterialDialog.Builder a=new MaterialDialog.Builder(getActivity());
      skin=sharedPref.getString("String_Node_Str","String_Node_Str");
      if (theme == 1)       a.theme(Theme.DARK);
      a.positiveText(R.string.close);
      a.positiveColor(Color.parseColor(fabSkin));
      LayoutInflater layoutInflater=(LayoutInflater)getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View view=layoutInflater.inflate(R.layout.authors,null);
      a.customView(view,true);
      a.title(R.string.authors);
      a.callback(new MaterialDialog.ButtonCallback(){
        @Override public void onPositive(        MaterialDialog materialDialog){
          materialDialog.cancel();
        }
        @Override public void onNegative(        MaterialDialog materialDialog){
        }
      }
);
      a.build().show();
      final Intent intent=new Intent(Intent.ACTION_VIEW);
      TextView googlePlus1=(TextView)view.findViewById(R.id.googlePlus1);
      googlePlus1.setTextColor(Color.parseColor(skin));
      TextView googlePlus2=(TextView)view.findViewById(R.id.googlePlus2);
      googlePlus2.setTextColor(Color.parseColor(skin));
      TextView git1=(TextView)view.findViewById(R.id.git1);
      git1.setTextColor(Color.parseColor(skin));
      TextView git2=(TextView)view.findViewById(R.id.git2);
      git2.setTextColor(Color.parseColor(skin));
      googlePlus1.setOnClickListener(new View.OnClickListener(){
        @Override public void onClick(        View view){
          intent.setData(Uri.parse("String_Node_Str"));
          startActivity(intent);
        }
      }
);
      googlePlus2.setOnClickListener(new View.OnClickListener(){
        @Override public void onClick(        View view){
          intent.setData(Uri.parse("String_Node_Str"));
          startActivity(intent);
        }
      }
);
      git1.setOnClickListener(new View.OnClickListener(){
        @Override public void onClick(        View view){
          intent.setData(Uri.parse("String_Node_Str"));
          startActivity(intent);
        }
      }
);
      git2.setOnClickListener(new View.OnClickListener(){
        @Override public void onClick(        View view){
          intent.setData(Uri.parse("String_Node_Str"));
          startActivity(intent);
        }
      }
);
      TextView textView=(TextView)view.findViewById(R.id.icon_credits);
      textView.setMovementMethod(LinkMovementMethod.getInstance());
      textView.setLinksClickable(true);
      textView.setText(Html.fromHtml(getActivity().getString(R.string.icon_credits)));
      return false;
    }
  }
);
  Preference preference1=(Preference)findPreference("String_Node_Str");
  preference1.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      MaterialDialog.Builder a=new MaterialDialog.Builder(getActivity());
      if (theme == 1)       a.theme(Theme.DARK);
      a.title(R.string.changelog);
      a.content(Html.fromHtml(getActivity().getString(R.string.changelog_version_5) + getActivity().getString(R.string.changelog_change_5) + getActivity().getString(R.string.changelog_version_4)+ getActivity().getString(R.string.changelog_change_4)+ getActivity().getString(R.string.changelog_version_3)+ getActivity().getString(R.string.changelog_change_3)+ getActivity().getString(R.string.changelog_version_2)+ getActivity().getString(R.string.changelog_change_2)+ getActivity().getString(R.string.changelog_version_1)+ getActivity().getString(R.string.changelog_change_1)));
      a.negativeText(R.string.close);
      a.negativeColor(Color.parseColor(skin));
      a.positiveText(R.string.fullChangelog);
      a.positiveColor(Color.parseColor(fabSkin));
      a.callback(new MaterialDialog.ButtonCallback(){
        @Override public void onPositive(        MaterialDialog materialDialog){
          Intent intent=new Intent(Intent.ACTION_VIEW,Uri.parse("String_Node_Str"));
          startActivity(intent);
        }
        @Override public void onNegative(        MaterialDialog materialDialog){
          materialDialog.cancel();
        }
      }
).build().show();
      return false;
    }
  }
);
  Preference preference2=(Preference)findPreference("String_Node_Str");
  final Dialog dialog=new Dialog(getActivity(),android.R.style.Theme_Holo_Light_DialogWhenLarge_NoActionBar);
  LayoutInflater inflater=(LayoutInflater)getActivity().getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
  final View dialog_view=inflater.inflate(R.layout.open_source_licenses,null);
  dialog.setContentView(dialog_view);
  preference2.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference arg0){
      WebView wv=(WebView)dialog_view.findViewById(R.id.webView1);
      PreferenceUtils preferenceUtils=new PreferenceUtils();
      wv.loadData(PreferenceUtils.LICENCE_TERMS,"String_Node_Str",null);
      dialog.show();
      return false;
    }
  }
);
  Preference preference3=(Preference)findPreference("String_Node_Str");
  preference3.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      Intent intent=new Intent(Intent.ACTION_VIEW);
      intent.setType("String_Node_Str");
      intent.setData(Uri.parse("String_Node_Str"));
      intent.setClassName("String_Node_Str","String_Node_Str");
      intent.putExtra(Intent.EXTRA_SUBJECT,"String_Node_Str");
      startActivity(intent);
      return false;
    }
  }
);
  Preference preference5=(Preference)findPreference("String_Node_Str");
  preference5.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      Intent intent1=new Intent(Intent.ACTION_VIEW);
      intent1.setData(Uri.parse("String_Node_Str"));
      startActivity(intent1);
      return false;
    }
  }
);
  Preference preference6=findPreference("String_Node_Str");
  preference6.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      Uri uri=Uri.parse("String_Node_Str");
      Intent intent=new Intent();
      intent.setData(uri);
      startActivity(intent);
      return false;
    }
  }
);
  Preference studio=findPreference("String_Node_Str");
  studio.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      COUNT++;
      if (COUNT >= 5) {
        if (toast != null)         toast.cancel();
        toast=Toast.makeText(getActivity(),"String_Node_Str" + COUNT,Toast.LENGTH_SHORT);
        toast.show();
        sharedPref.edit().putInt("String_Node_Str",Integer.parseInt(Integer.toString(COUNT) + "String_Node_Str")).apply();
      }
 else {
        sharedPref.edit().putInt("String_Node_Str",0).apply();
      }
      return false;
    }
  }
);
  SwitchPreference preference7=(SwitchPreference)findPreference("String_Node_Str");
  if (BuildConfig.IS_VERSION_FDROID)   preference7.setEnabled(false);
  SwitchPreference preference8=(SwitchPreference)findPreference("String_Node_Str");
  if (Build.VERSION.SDK_INT >= 21)   preference8.setEnabled(true);
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  addPreferencesFromResource(R.xml.preferences);
  sharedPref=PreferenceManager.getDefaultSharedPreferences(getActivity());
  skin=sharedPref.getString("String_Node_Str","String_Node_Str");
  fabSkin=sharedPref.getString("String_Node_Str","String_Node_Str");
  final int th1=Integer.parseInt(sharedPref.getString("String_Node_Str","String_Node_Str"));
  theme=th1 == 2 ? PreferenceUtils.hourOfDay() : th1;
  findPreference("String_Node_Str").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      final String[] sort=getResources().getStringArray(R.array.columns);
      MaterialDialog.Builder a=new MaterialDialog.Builder(getActivity());
      if (theme == 1)       a.theme(Theme.DARK);
      a.title(R.string.gridcolumnno);
      int current=Integer.parseInt(sharedPref.getString("String_Node_Str","String_Node_Str"));
      if (current != 0)       current=current - 2;
 else       current=1;
      a.items(sort).itemsCallbackSingleChoice(current,new MaterialDialog.ListCallbackSingleChoice(){
        @Override public boolean onSelection(        MaterialDialog dialog,        View view,        int which,        CharSequence text){
          sharedPref.edit().putString("String_Node_Str","String_Node_Str" + sort[which]).commit();
          dialog.dismiss();
          return true;
        }
      }
);
      a.build().show();
      return true;
    }
  }
);
  findPreference("String_Node_Str").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      String[] sort=getResources().getStringArray(R.array.hidemode);
      MaterialDialog.Builder a=new MaterialDialog.Builder(getActivity());
      if (theme == 1)       a.theme(Theme.DARK);
      a.title(getString(R.string.hide_mode_title));
      int current=sharedPref.getInt("String_Node_Str",0);
      a.items(sort).itemsCallbackSingleChoice(current,new MaterialDialog.ListCallbackSingleChoice(){
        @Override public boolean onSelection(        MaterialDialog dialog,        View view,        int which,        CharSequence text){
          sharedPref.edit().putInt("String_Node_Str",which).commit();
          dialog.dismiss();
          restartPC(getActivity());
          return true;
        }
      }
);
      a.build().show();
      return true;
    }
  }
);
  if (Build.VERSION.SDK_INT >= 21)   findPreference("String_Node_Str").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      restartPC(getActivity());
      return false;
    }
  }
);
  findPreference("String_Node_Str").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      String[] sort=getResources().getStringArray(R.array.directorysortmode);
      MaterialDialog.Builder a=new MaterialDialog.Builder(getActivity());
      if (theme == 1)       a.theme(Theme.DARK);
      a.title(R.string.directorysort);
      int current=Integer.parseInt(sharedPref.getString("String_Node_Str","String_Node_Str"));
      a.items(sort).itemsCallbackSingleChoice(current,new MaterialDialog.ListCallbackSingleChoice(){
        @Override public boolean onSelection(        MaterialDialog dialog,        View view,        int which,        CharSequence text){
          sharedPref.edit().putString("String_Node_Str","String_Node_Str" + which).commit();
          dialog.dismiss();
          return true;
        }
      }
);
      a.build().show();
      return true;
    }
  }
);
  findPreference("String_Node_Str").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      String[] sort=getResources().getStringArray(R.array.theme);
      int current=Integer.parseInt(sharedPref.getString("String_Node_Str","String_Node_Str"));
      MaterialDialog.Builder a=new MaterialDialog.Builder(getActivity());
      if (theme == 1)       a.theme(Theme.DARK);
      a.items(sort).itemsCallbackSingleChoice(current,new MaterialDialog.ListCallbackSingleChoice(){
        @Override public boolean onSelection(        MaterialDialog dialog,        View view,        int which,        CharSequence text){
          sharedPref.edit().putString("String_Node_Str","String_Node_Str" + which).commit();
          dialog.dismiss();
          restartPC(getActivity());
          return true;
        }
      }
);
      a.title(R.string.theme);
      a.build().show();
      return true;
    }
  }
);
  findPreference("String_Node_Str").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      String[] sort=getResources().getStringArray(R.array.sortby);
      int current=Integer.parseInt(sharedPref.getString("String_Node_Str","String_Node_Str"));
      MaterialDialog.Builder a=new MaterialDialog.Builder(getActivity());
      if (theme == 1)       a.theme(Theme.DARK);
      a.items(sort).itemsCallbackSingleChoice(current,new MaterialDialog.ListCallbackSingleChoice(){
        @Override public boolean onSelection(        MaterialDialog dialog,        View view,        int which,        CharSequence text){
          sharedPref.edit().putString("String_Node_Str","String_Node_Str" + which).commit();
          dialog.dismiss();
          return true;
        }
      }
);
      a.title(R.string.sortby);
      a.build().show();
      return true;
    }
  }
);
  findPreference("String_Node_Str").setOnPreferenceClickListener(this);
  findPreference("String_Node_Str").setOnPreferenceClickListener(this);
  findPreference("String_Node_Str").setOnPreferenceClickListener(this);
  final SwitchPreference checkBoxPreference=(SwitchPreference)findPreference("String_Node_Str");
  boolean check=sharedPref.getBoolean("String_Node_Str",false);
  checkBoxPreference.setChecked(check);
  checkBoxPreference.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener(){
    @Override public boolean onPreferenceChange(    Preference preference,    Object o){
      if (!checkBoxPreference.isChecked()) {
        sharedPref.edit().putBoolean("String_Node_Str",true).apply();
        checkBoxPreference.setChecked(true);
      }
 else {
        sharedPref.edit().putBoolean("String_Node_Str",false).apply();
        checkBoxPreference.setChecked(false);
      }
      Toast.makeText(getActivity(),R.string.setRandom,Toast.LENGTH_LONG).show();
      return false;
    }
  }
);
  final SwitchPreference rootmode=(SwitchPreference)findPreference("String_Node_Str");
  rootmode.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      boolean b=sharedPref.getBoolean("String_Node_Str",false);
      if (b) {
        if (RootTools.isAccessGiven()) {
          rootmode.setChecked(true);
        }
 else {
          rootmode.setChecked(false);
          Toast.makeText(getActivity(),getResources().getString(R.string.rootfailure),Toast.LENGTH_LONG).show();
        }
      }
 else {
        rootmode.setChecked(false);
      }
      return false;
    }
  }
);
  Preference preference4=(Preference)findPreference("String_Node_Str");
  preference4.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      MaterialDialog.Builder a=new MaterialDialog.Builder(getActivity());
      skin=sharedPref.getString("String_Node_Str","String_Node_Str");
      if (theme == 1)       a.theme(Theme.DARK);
      a.positiveText(R.string.close);
      a.positiveColor(Color.parseColor(fabSkin));
      LayoutInflater layoutInflater=(LayoutInflater)getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View view=layoutInflater.inflate(R.layout.authors,null);
      a.customView(view,true);
      a.title(R.string.authors);
      a.callback(new MaterialDialog.ButtonCallback(){
        @Override public void onPositive(        MaterialDialog materialDialog){
          materialDialog.cancel();
        }
        @Override public void onNegative(        MaterialDialog materialDialog){
        }
      }
);
      a.build().show();
      final Intent intent=new Intent(Intent.ACTION_VIEW);
      TextView googlePlus1=(TextView)view.findViewById(R.id.googlePlus1);
      googlePlus1.setTextColor(Color.parseColor(skin));
      TextView googlePlus2=(TextView)view.findViewById(R.id.googlePlus2);
      googlePlus2.setTextColor(Color.parseColor(skin));
      TextView git1=(TextView)view.findViewById(R.id.git1);
      git1.setTextColor(Color.parseColor(skin));
      TextView git2=(TextView)view.findViewById(R.id.git2);
      git2.setTextColor(Color.parseColor(skin));
      googlePlus1.setOnClickListener(new View.OnClickListener(){
        @Override public void onClick(        View view){
          intent.setData(Uri.parse("String_Node_Str"));
          startActivity(intent);
        }
      }
);
      googlePlus2.setOnClickListener(new View.OnClickListener(){
        @Override public void onClick(        View view){
          intent.setData(Uri.parse("String_Node_Str"));
          startActivity(intent);
        }
      }
);
      git1.setOnClickListener(new View.OnClickListener(){
        @Override public void onClick(        View view){
          intent.setData(Uri.parse("String_Node_Str"));
          startActivity(intent);
        }
      }
);
      git2.setOnClickListener(new View.OnClickListener(){
        @Override public void onClick(        View view){
          intent.setData(Uri.parse("String_Node_Str"));
          startActivity(intent);
        }
      }
);
      TextView textView=(TextView)view.findViewById(R.id.icon_credits);
      textView.setMovementMethod(LinkMovementMethod.getInstance());
      textView.setLinksClickable(true);
      textView.setText(Html.fromHtml(getActivity().getString(R.string.icon_credits)));
      return false;
    }
  }
);
  Preference preference1=(Preference)findPreference("String_Node_Str");
  preference1.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      MaterialDialog.Builder a=new MaterialDialog.Builder(getActivity());
      if (theme == 1)       a.theme(Theme.DARK);
      a.title(R.string.changelog);
      a.content(Html.fromHtml(getActivity().getString(R.string.changelog_version_5) + getActivity().getString(R.string.changelog_change_5) + getActivity().getString(R.string.changelog_version_4)+ getActivity().getString(R.string.changelog_change_4)+ getActivity().getString(R.string.changelog_version_3)+ getActivity().getString(R.string.changelog_change_3)+ getActivity().getString(R.string.changelog_version_2)+ getActivity().getString(R.string.changelog_change_2)+ getActivity().getString(R.string.changelog_version_1)+ getActivity().getString(R.string.changelog_change_1)));
      a.negativeText(R.string.close);
      a.negativeColor(Color.parseColor(fabSkin));
      a.positiveText(R.string.fullChangelog);
      a.positiveColor(Color.parseColor(fabSkin));
      a.callback(new MaterialDialog.ButtonCallback(){
        @Override public void onPositive(        MaterialDialog materialDialog){
          Intent intent=new Intent(Intent.ACTION_VIEW,Uri.parse("String_Node_Str"));
          startActivity(intent);
        }
        @Override public void onNegative(        MaterialDialog materialDialog){
          materialDialog.cancel();
        }
      }
).build().show();
      return false;
    }
  }
);
  Preference preference2=(Preference)findPreference("String_Node_Str");
  final Dialog dialog=new Dialog(getActivity(),android.R.style.Theme_Holo_Light_DialogWhenLarge_NoActionBar);
  LayoutInflater inflater=(LayoutInflater)getActivity().getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
  final View dialog_view=inflater.inflate(R.layout.open_source_licenses,null);
  dialog.setContentView(dialog_view);
  preference2.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference arg0){
      WebView wv=(WebView)dialog_view.findViewById(R.id.webView1);
      PreferenceUtils preferenceUtils=new PreferenceUtils();
      wv.loadData(PreferenceUtils.LICENCE_TERMS,"String_Node_Str",null);
      dialog.show();
      return false;
    }
  }
);
  Preference preference3=(Preference)findPreference("String_Node_Str");
  preference3.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      Intent intent=new Intent(Intent.ACTION_VIEW);
      intent.setType("String_Node_Str");
      intent.setData(Uri.parse("String_Node_Str"));
      intent.setClassName("String_Node_Str","String_Node_Str");
      intent.putExtra(Intent.EXTRA_SUBJECT,"String_Node_Str");
      startActivity(intent);
      return false;
    }
  }
);
  Preference preference5=(Preference)findPreference("String_Node_Str");
  preference5.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      Intent intent1=new Intent(Intent.ACTION_VIEW);
      intent1.setData(Uri.parse("String_Node_Str"));
      startActivity(intent1);
      return false;
    }
  }
);
  Preference preference6=findPreference("String_Node_Str");
  preference6.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      Uri uri=Uri.parse("String_Node_Str");
      Intent intent=new Intent();
      intent.setData(uri);
      startActivity(intent);
      return false;
    }
  }
);
  Preference studio=findPreference("String_Node_Str");
  studio.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      COUNT++;
      if (COUNT >= 5) {
        if (toast != null)         toast.cancel();
        toast=Toast.makeText(getActivity(),"String_Node_Str" + COUNT,Toast.LENGTH_SHORT);
        toast.show();
        sharedPref.edit().putInt("String_Node_Str",Integer.parseInt(Integer.toString(COUNT) + "String_Node_Str")).apply();
      }
 else {
        sharedPref.edit().putInt("String_Node_Str",0).apply();
      }
      return false;
    }
  }
);
  SwitchPreference preference7=(SwitchPreference)findPreference("String_Node_Str");
  if (BuildConfig.IS_VERSION_FDROID)   preference7.setEnabled(false);
  SwitchPreference preference8=(SwitchPreference)findPreference("String_Node_Str");
  if (Build.VERSION.SDK_INT >= 21)   preference8.setEnabled(true);
}