Program: 25680
Project: 25680
Buggy source:
private void optionApply(){
  boolean some=false;
  final List<String> listRestriction=PrivacyManager.getRestrictions();
  for (  String restrictionName : listRestriction)   if (PrivacyManager.getSettingBool(null,ActivityApp.this,0,String.format("String_Node_Str",restrictionName),true,false))   if (PrivacyManager.getRestricted(null,ActivityApp.this,mAppInfo.getUid(),restrictionName,null,false,false)) {
    some=true;
    break;
  }
  final boolean restricted=!some;
  AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(ActivityApp.this);
  alertDialogBuilder.setTitle(getString(restricted ? R.string.menu_apply : R.string.menu_clear_all));
  alertDialogBuilder.setMessage(getString(R.string.msg_sure));
  alertDialogBuilder.setIcon(Util.getThemed(this,R.attr.icon_launcher));
  alertDialogBuilder.setPositiveButton(getString(android.R.string.ok),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      boolean restart=false;
      for (      String restrictionName : listRestriction)       if (PrivacyManager.getSettingBool(null,ActivityApp.this,0,String.format("String_Node_Str",restrictionName),true,false))       restart=restart || PrivacyManager.setRestricted(null,ActivityApp.this,mAppInfo.getUid(),restrictionName,null,restricted);
      if (mPrivacyListAdapter != null)       mPrivacyListAdapter.notifyDataSetChanged();
      if (restart)       Toast.makeText(ActivityApp.this,getString(R.string.msg_restart),Toast.LENGTH_SHORT).show();
    }
  }
);
  alertDialogBuilder.setNegativeButton(getString(android.R.string.cancel),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
    }
  }
);
  AlertDialog alertDialog=alertDialogBuilder.create();
  alertDialog.show();
}

Fixed version (ground truth):
private void optionApply(){
  boolean some=false;
  final List<String> listRestriction=PrivacyManager.getRestrictions();
  for (  String restrictionName : listRestriction)   if (PrivacyManager.getSettingBool(null,ActivityApp.this,0,String.format("String_Node_Str",restrictionName),true,false))   if (PrivacyManager.getRestricted(null,ActivityApp.this,mAppInfo.getUid(),restrictionName,null,false,false)) {
    some=true;
    break;
  }
  final boolean restricted=!some;
  AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(ActivityApp.this);
  alertDialogBuilder.setTitle(getString(restricted ? R.string.menu_apply : R.string.menu_clear_all));
  alertDialogBuilder.setMessage(getString(R.string.msg_sure));
  alertDialogBuilder.setIcon(Util.getThemed(this,R.attr.icon_launcher));
  alertDialogBuilder.setPositiveButton(getString(android.R.string.ok),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      boolean restart=false;
      for (      String restrictionName : listRestriction)       if (PrivacyManager.getSettingBool(null,ActivityApp.this,0,String.format("String_Node_Str",restrictionName),true,false))       restart=PrivacyManager.setRestricted(null,ActivityApp.this,mAppInfo.getUid(),restrictionName,null,restricted) || restart;
      if (mPrivacyListAdapter != null)       mPrivacyListAdapter.notifyDataSetChanged();
      if (restart)       Toast.makeText(ActivityApp.this,getString(R.string.msg_restart),Toast.LENGTH_SHORT).show();
    }
  }
);
  alertDialogBuilder.setNegativeButton(getString(android.R.string.cancel),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
    }
  }
);
  AlertDialog alertDialog=alertDialogBuilder.create();
  alertDialog.show();
}