<commit_before>package com.diamondq.common.utils.misc.errors;

import com.diamondq.common.utils.misc.internationalization.I18N;
import com.diamondq.common.utils.misc.internationalization.MessagesEnum;

import java.util.Arrays;
import java.util.Locale;

import org.checkerframework.checker.nullness.qual.Nullable;

public class ExtendedIllegalArgumentException extends IllegalArgumentException {

  private static final long          serialVersionUID = 4687502775610417335L;

  protected final MessagesEnum       mCode;

  protected final @Nullable Object[] mParams;

  public ExtendedIllegalArgumentException(MessagesEnum pCode, @Nullable Object @Nullable... pParams) {
    super();
    mCode = pCode;
    if (pParams == null)
      mParams = new String[0];
    else
      mParams = Arrays.copyOf(pParams, pParams.length);
  }

  public ExtendedIllegalArgumentException(Throwable pCause, MessagesEnum pCode, @Nullable Object @Nullable... pParams) {
    super(null, pCause);
    mCode = pCode;
    if (pParams == null)
      mParams = new String[0];
    else
      mParams = Arrays.copyOf(pParams, pParams.length);
  }

  public MessagesEnum getCode() {
    return mCode;
  }

  /**
   * @see java.lang.Throwable#getMessage()
   */
  @Override
  public String getMessage() {<commit_msg>Added access to the params<commit_after>package com.diamondq.common.utils.misc.errors;

import com.diamondq.common.utils.misc.internationalization.I18N;
import com.diamondq.common.utils.misc.internationalization.MessagesEnum;

import java.util.Arrays;
import java.util.Locale;

import org.checkerframework.checker.nullness.qual.Nullable;

public class ExtendedIllegalArgumentException extends IllegalArgumentException {

  private static final long          serialVersionUID = 4687502775610417335L;

  protected final MessagesEnum       mCode;

  protected final @Nullable Object[] mParams;

  public ExtendedIllegalArgumentException(MessagesEnum pCode, @Nullable Object @Nullable... pParams) {
    super();
    mCode = pCode;
    if (pParams == null)
      mParams = new String[0];
    else
      mParams = Arrays.copyOf(pParams, pParams.length);
  }

  public ExtendedIllegalArgumentException(Throwable pCause, MessagesEnum pCode, @Nullable Object @Nullable... pParams) {
    super(null, pCause);
    mCode = pCode;
    if (pParams == null)
      mParams = new String[0];
    else
      mParams = Arrays.copyOf(pParams, pParams.length);
  }

  public MessagesEnum getCode() {
    return mCode;
  }

  public @Nullable Object[] getParams() {
	return mParams;
  }
  
  /**
   * @see java.lang.Throwable#getMessage()
   */
  @Override
  public String getMessage() {
{'fraction_non_alphanumeric': 0.09815024537561344, 'fraction_numerical': 0.01736504341260853, 'mean_word_length': 3.8802946593001844, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3322498', 'n_tokens_mistral': 851, 'n_tokens_neox': 774, 'n_words': 182}