<commit_before>/*
 * Copyright 2008 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.template.soy;

import com.google.common.io.Files;
import com.google.template.soy.msgs.SoyMsgBundleHandler;
import com.google.template.soy.msgs.SoyMsgBundleHandler.OutputFileOptions;
import com.google.template.soy.msgs.SoyMsgPlugin;
import com.google.template.soy.xliffmsgplugin.XliffMsgPlugin;
import java.io.File;
import java.io.IOException;
import org.kohsuke.args4j.Option;

/**
 * Executable for extracting messages from a set of Soy files into an output messages file.
 *
 * <p>The command-line arguments should contain command-line flags and the list of paths to the Soy
 * files.
 *
 */
public final class SoyMsgExtractor extends AbstractSoyCompiler {

  @Option(
    name = "--allowExternalCalls",
    usage =
        "Whether to allow external calls. New projects should set this to false, and"
            + " existing projects should remove existing external calls and then set this"
            + " to false. It will save you a lot of headaches. Currently defaults to true"
            + " for backward compatibility."
  )
  private boolean allowExternalCalls = true;

  @Option(
    name = "--outputFile",
    required = true,
    usage =
        "The path to the output file to write. If a file already"
            + " exists at this location, it will be overwritten. The file extension must"
            + " match the output format requested."
  )
  private File outputFile;

  @Option(<commit_msg>Flip the default of allowExternalCalls for message extraction<commit_after>/*
 * Copyright 2008 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.template.soy;

import com.google.common.io.Files;
import com.google.template.soy.msgs.SoyMsgBundleHandler;
import com.google.template.soy.msgs.SoyMsgBundleHandler.OutputFileOptions;
import com.google.template.soy.msgs.SoyMsgPlugin;
import com.google.template.soy.xliffmsgplugin.XliffMsgPlugin;
import java.io.File;
import java.io.IOException;
import org.kohsuke.args4j.Option;

/**
 * Executable for extracting messages from a set of Soy files into an output messages file.
 *
 * <p>The command-line arguments should contain command-line flags and the list of paths to the Soy
 * files.
 *
 */
public final class SoyMsgExtractor extends AbstractSoyCompiler {

  @Option(
      name = "--allowExternalCalls",
      usage =
          "Whether to allow external calls. New projects should set this to false, and"
              + " existing projects should remove existing external calls and then set this"
              + " to false. It will save you a lot of headaches. Currently defaults to true"
              + " for backward compatibility.")
  private boolean allowExternalCalls = false;

  @Option(
    name = "--outputFile",
    required = true,
    usage =
        "The path to the output file to write. If a file already"
            + " exists at this location, it will be overwritten. The file extension must"
            + " match the output format requested."
  )
  private File outputFile;

  @Option(
{'fraction_non_alphanumeric': 0.07766521948866377, 'fraction_numerical': 0.004341534008683068, 'mean_word_length': 3.315296566077003, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7316171', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1097, 'n_words': 458}