<commit_before>package com.google.devtools.moe.client.project;

import com.google.devtools.moe.client.Injector;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.annotations.SerializedName;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;

/**
 * Configuration for a scrubber.
 */
public class ScrubberConfig {

  // General options
  @SerializedName("ignore_files_re")
  private String ignoreFilesRe;

  @SerializedName("do_not_scrub_files_re")
  private String doNotScrubFilesRe;

  @SerializedName("extension_map")
  private JsonArray extensionMap;

  @SerializedName("sensitive_string_file")
  private String sensitiveStringFile;

  @SerializedName("sensitive_words")
  private List<String> sensitiveWords;

  @SerializedName("sensitive_res")
  private List<String> sensitiveRes;

  private List<JsonObject> whitelist;

  @SerializedName("scrub_sensitive_comments")
  private final boolean scrubSensitiveComments = true;

  @SerializedName("rearranging_config")
  private JsonObject rearrangingConfig;

  @SerializedName("string_replacements")
  private List<Map<String, String>> stringReplacements;

  @SerializedName("regex_replacements")
  private List<Map<String, String>> regexReplacements;

  @SerializedName("scrub_non_documentation_comments")
  private boolean scrubNonDocumentationComments;

  @SerializedName("scrub_all_comments")
  private boolean scrubAllComments;

  // User options
  @SerializedName("usernames_to_scrub")
  private final List<String> usernamesToScrub = new ArrayList<>();

  @SerializedName("usernames_to_publish")
  private final List<String> usernamesToPublish = new ArrayList<>();

  @SerializedName("usernames_file")
  private String usernamesFile;

  @SerializedName("scrub_unknown_users")
  private boolean scrubUnknownUsers;

  @SerializedName("scrub_authors")
  private final boolean scrubAuthors = true;

  // C/C++ options
  @SerializedName("c_includes_config_file")
  private String cIncludesConfigFile;

  @SerializedName("c_includes_config")
  private JsonObject cIncludesConfig;

  // Java options
  @SerializedName("empty_java_file_action")
  private String emptyJavaFileAction;

  @SerializedName("maximum_blank_lines")
  private int maximumBlankLines;
  @SerializedName("scrub_java_testsize_annotations")
  private boolean scrubJavaTestsizeAnnotations;

  @SerializedName("java_renames")
  private List<Map<String, String>> javaRenames;

  // JavaScript options
  @SerializedName("js_directory_rename")
  private Map<String, String> jsDirectoryRename;

  @SerializedName("js_directory_renames")<commit_msg>Remove "final" from scrubSensitiveComments and scrubAuthors, otherwise they   don't get picked up correctly from a moe_config.json. 	Change on 2015/07/10 by dhuo <<EMAIL>> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=97970777<commit_after>package com.google.devtools.moe.client.project;

import com.google.devtools.moe.client.Injector;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.annotations.SerializedName;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;

/**
 * Configuration for a scrubber.
 */
public class ScrubberConfig {

  // General options
  @SerializedName("ignore_files_re")
  private String ignoreFilesRe;

  @SerializedName("do_not_scrub_files_re")
  private String doNotScrubFilesRe;

  @SerializedName("extension_map")
  private JsonArray extensionMap;

  @SerializedName("sensitive_string_file")
  private String sensitiveStringFile;

  @SerializedName("sensitive_words")
  private List<String> sensitiveWords;

  @SerializedName("sensitive_res")
  private List<String> sensitiveRes;

  private List<JsonObject> whitelist;

  @SerializedName("scrub_sensitive_comments")
  private boolean scrubSensitiveComments = true;

  @SerializedName("rearranging_config")
  private JsonObject rearrangingConfig;

  @SerializedName("string_replacements")
  private List<Map<String, String>> stringReplacements;

  @SerializedName("regex_replacements")
  private List<Map<String, String>> regexReplacements;

  @SerializedName("scrub_non_documentation_comments")
  private boolean scrubNonDocumentationComments;

  @SerializedName("scrub_all_comments")
  private boolean scrubAllComments;

  // User options
  @SerializedName("usernames_to_scrub")
  private final List<String> usernamesToScrub = new ArrayList<>();

  @SerializedName("usernames_to_publish")
  private final List<String> usernamesToPublish = new ArrayList<>();

  @SerializedName("usernames_file")
  private String usernamesFile;

  @SerializedName("scrub_unknown_users")
  private boolean scrubUnknownUsers;

  @SerializedName("scrub_authors")
  private boolean scrubAuthors = true;

  // C/C++ options
  @SerializedName("c_includes_config_file")
  private String cIncludesConfigFile;

  @SerializedName("c_includes_config")
  private JsonObject cIncludesConfig;

  // Java options
  @SerializedName("empty_java_file_action")
  private String emptyJavaFileAction;

  @SerializedName("maximum_blank_lines")
  private int maximumBlankLines;
  @SerializedName("scrub_java_testsize_annotations")
  private boolean scrubJavaTestsizeAnnotations;

  @SerializedName("java_renames")
  private List<Map<String, String>> javaRenames;

  // JavaScript options
  @SerializedName("js_directory_rename")
  private Map<String, String> jsDirectoryRename;

  @SerializedName("js_directory_renames")
{'fraction_non_alphanumeric': 0.09752212389380531, 'fraction_numerical': 0.002831858407079646, 'mean_word_length': 6.464993394980185, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, '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': '3139125', 'n_tokens_mistral': 1772, 'n_tokens_neox': 1685, 'n_words': 329}