Program: 162566
Project: 162566
Buggy source:
@Override public void onSelection(MaterialDialog materialDialog,View view,int i,CharSequence s){
switch (i) {
case 0:
    Intent i1=app.getActivity().getPackageManager().getLaunchIntentForPackage(a.get(position).getPermissions());
  if (i1 != null)   app.startActivity(i1);
 else   Toast.makeText(app.getActivity(),utils.getString(getActivity(),R.string.not_allowed),Toast.LENGTH_LONG).show();
break;
case 1:
Toast.makeText(getActivity(),utils.getString(getActivity(),R.string.copyingapk) + Environment.getExternalStorageDirectory().getPath() + "String_Node_Str",Toast.LENGTH_LONG).show();
File f=new File(a.get(position).getDesc());
ArrayList<String> ab=new ArrayList<String>();
File dst=new File(Environment.getExternalStorageDirectory().getPath() + "String_Node_Str");
if (!dst.exists() || !dst.isDirectory()) dst.mkdirs();
Intent intent=new Intent(getActivity(),CopyService.class);
if (Build.VERSION.SDK_INT >= 21) {
ab.add(f.getParent());
}
 else {
ab.add(f.getPath());
}
intent.putExtra("String_Node_Str",ab);
intent.putExtra("String_Node_Str",dst.getPath());
getActivity().startService(intent);
break;
case 2:
ArrayList<Integer> arrayList1=new ArrayList<Integer>();
arrayList1.add(position);
final File f1=new File(a.get(position).getDesc());
ApplicationInfo info1=null;
for (ApplicationInfo info : c) {
if (info.packageName.equals(a.get(position).getPermissions())) info1=info;
}
if ((info1.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
if (Sp.getBoolean("String_Node_Str",false)) {
MaterialDialog.Builder builder1=new MaterialDialog.Builder(getActivity());
if (theme1 == 1) builder1.theme(Theme.DARK);
builder1.content(utils.getString(getActivity(),R.string.unin_system_apk)).title(utils.getString(getActivity(),R.string.warning)).negativeText(utils.getString(getActivity(),R.string.no)).positiveText(utils.getString(getActivity(),R.string.yes)).negativeColor(Color.parseColor(fabSkin)).positiveColor(Color.parseColor(fabSkin)).callback(new MaterialDialog.ButtonCallback(){
@Override public void onNegative(MaterialDialog materialDialog){
materialDialog.cancel();
}
@Override public void onPositive(MaterialDialog materialDialog){
ArrayList<File> files=new ArrayList<File>();
if (Build.VERSION.SDK_INT >= 21) {
String parent=f1.getParent();
if (!parent.equals("String_Node_Str") && !parent.equals("String_Node_Str")) files.add(new File(f1.getParent()));
 else files.add(f1);
}
 else {
files.add(f1);
}
new DeleteTask(getActivity().getContentResolver(),getActivity()).execute(files);
}
}
).build().show();
}
 else {
Toast.makeText(getActivity(),utils.getString(getActivity(),R.string.enablerootmde),Toast.LENGTH_SHORT).show();
}
}
 else {
unin(c.get(position).packageName);
}
break;
case 3:
startActivity(new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS,Uri.parse("String_Node_Str" + a.get(position).getPermissions())));
break;
case 4:
Intent intent1=new Intent(Intent.ACTION_VIEW);
intent1.setData(Uri.parse("String_Node_Str" + a.get(position).getPermissions()));
startActivity(intent1);
break;
case 5:
ArrayList<File> arrayList2=new ArrayList<File>();
arrayList2.add(new File(a.get(position).getDesc()));
utils.shareFiles(arrayList2,getActivity());
}
}

Fixed version (ground truth):
@Override public void onSelection(MaterialDialog materialDialog,View view,int i,CharSequence s){
switch (i) {
case 0:
    Intent i1=app.getActivity().getPackageManager().getLaunchIntentForPackage(a.get(position).getPermissions());
  if (i1 != null)   app.startActivity(i1);
 else   Toast.makeText(app.getActivity(),utils.getString(getActivity(),R.string.not_allowed),Toast.LENGTH_LONG).show();
break;
case 1:
Toast.makeText(getActivity(),utils.getString(getActivity(),R.string.copyingapk) + Environment.getExternalStorageDirectory().getPath() + "String_Node_Str",Toast.LENGTH_LONG).show();
File f=new File(a.get(position).getDesc());
ArrayList<String> ab=new ArrayList<String>();
File dst=new File(Environment.getExternalStorageDirectory().getPath() + "String_Node_Str");
if (!dst.exists() || !dst.isDirectory()) dst.mkdirs();
Intent intent=new Intent(getActivity(),CopyService.class);
if (Build.VERSION.SDK_INT >= 21) {
ab.add(f.getParent());
}
 else {
ab.add(f.getPath());
}
intent.putExtra("String_Node_Str",ab);
intent.putExtra("String_Node_Str",dst.getPath());
getActivity().startService(intent);
break;
case 2:
final File f1=new File(a.get(position).getDesc());
ApplicationInfo info1=null;
for (ApplicationInfo info : c) {
if (info.publicSourceDir.equals(a.get(position).getDesc())) info1=info;
}
if ((info1.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
if (Sp.getBoolean("String_Node_Str",false)) {
MaterialDialog.Builder builder1=new MaterialDialog.Builder(getActivity());
if (theme1 == 1) builder1.theme(Theme.DARK);
builder1.content(utils.getString(getActivity(),R.string.unin_system_apk)).title(utils.getString(getActivity(),R.string.warning)).negativeText(utils.getString(getActivity(),R.string.no)).positiveText(utils.getString(getActivity(),R.string.yes)).negativeColor(Color.parseColor(fabSkin)).positiveColor(Color.parseColor(fabSkin)).callback(new MaterialDialog.ButtonCallback(){
@Override public void onNegative(MaterialDialog materialDialog){
materialDialog.cancel();
}
@Override public void onPositive(MaterialDialog materialDialog){
ArrayList<File> files=new ArrayList<File>();
if (Build.VERSION.SDK_INT >= 21) {
String parent=f1.getParent();
if (!parent.equals("String_Node_Str") && !parent.equals("String_Node_Str")) files.add(new File(f1.getParent()));
 else files.add(f1);
}
 else {
files.add(f1);
}
new DeleteTask(getActivity().getContentResolver(),getActivity()).execute(files);
}
}
).build().show();
}
 else {
Toast.makeText(getActivity(),utils.getString(getActivity(),R.string.enablerootmde),Toast.LENGTH_SHORT).show();
}
}
 else {
unin(a.get(position).getPermissions());
}
break;
case 3:
startActivity(new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS,Uri.parse("String_Node_Str" + a.get(position).getPermissions())));
break;
case 4:
Intent intent1=new Intent(Intent.ACTION_VIEW);
intent1.setData(Uri.parse("String_Node_Str" + a.get(position).getPermissions()));
startActivity(intent1);
break;
case 5:
ArrayList<File> arrayList2=new ArrayList<File>();
arrayList2.add(new File(a.get(position).getDesc()));
utils.shareFiles(arrayList2,getActivity());
}
}