Program: 91102
Project: 91102
Buggy source:
/** 
 * Show an optional message/ <p> The user can check a "never show this again" check box and the message will never get displayed again.
 * @param context           The context
 * @param messageResourceId The resource ID of the message to show
 * @param onOkay            This runnable gets executed either if the user clicks Okay or if he choose to never-see-this-message-again
 */
public static boolean showOptionalMessage(final Context context,int messageResourceId,final Runnable onOkay){
  String message=context.getString(messageResourceId);
  final String optionalMessageId=Integer.toString(message.hashCode());
  SharedPreferences settings=context.getSharedPreferences("String_Node_Str",Activity.MODE_PRIVATE);
  boolean ignore=settings.getBoolean(optionalMessageId,false);
  if (ignore) {
    if (onOkay != null) {
      onOkay.run();
    }
    return false;
  }
  LayoutInflater inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  final View layout=inflater.inflate(R.layout.optional_message_dialog,null);
  AlertDialog.Builder builder=new AlertDialog.Builder(context).setView(layout);
  final AlertDialog dialog=builder.create();
  TextView tvMessage=((TextView)layout.findViewById(R.id.tvMessage));
  tvMessage.setText(message);
  CheckBox cb=(CheckBox)layout.findViewById(R.id.checkbox);
  cb.setOnCheckedChangeListener(new OnCheckedChangeListener(){
    @Override public void onCheckedChanged(    CompoundButton buttonView,    boolean isChecked){
      context.getSharedPreferences("String_Node_Str",Activity.MODE_PRIVATE).edit().putBoolean(optionalMessageId,isChecked).apply();
    }
  }
);
  layout.findViewById(R.id.btOk).setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      if (onOkay != null) {
        onOkay.run();
      }
      dialog.dismiss();
    }
  }
);
  dialog.show();
  return true;
}

Fixed version (ground truth):
/** 
 * Show an optional message/ <p> The user can check a "never show this again" check box and the message will never get displayed again.
 * @param context           The context
 * @param messageResourceId The resource ID of the message to show
 * @param onOkay            This runnable gets executed either if the user clicks Okay or if he choose to never-see-this-message-again
 */
public static boolean showOptionalMessage(final Context context,int messageResourceId,final Runnable onOkay){
  String message=context.getString(messageResourceId);
  final String optionalMessageId=Integer.toString(message.hashCode());
  SharedPreferences settings=context.getSharedPreferences("String_Node_Str",Activity.MODE_PRIVATE);
  boolean ignore=settings.getBoolean(optionalMessageId,false);
  if (ignore) {
    if (onOkay != null) {
      onOkay.run();
    }
    return false;
  }
  LayoutInflater inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  final View layout=inflater.inflate(R.layout.optional_message_dialog,null);
  AlertDialog.Builder builder=new AlertDialog.Builder(context).setView(layout);
  final AlertDialog dialog=builder.create();
  TextView tvMessage=layout.findViewById(R.id.tvMessage);
  tvMessage.setText(message);
  CheckBox cb=layout.findViewById(R.id.checkbox);
  cb.setOnCheckedChangeListener(new OnCheckedChangeListener(){
    @Override public void onCheckedChanged(    CompoundButton buttonView,    boolean isChecked){
      context.getSharedPreferences("String_Node_Str",Activity.MODE_PRIVATE).edit().putBoolean(optionalMessageId,isChecked).apply();
    }
  }
);
  layout.findViewById(R.id.btOk).setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      if (onOkay != null) {
        onOkay.run();
      }
      dialog.dismiss();
    }
  }
);
  dialog.show();
  return true;
}