<commit_before><?xml version="1.0" ?>

<project name="libphonenumber-javascript" default="compile">
  <property name="closure-compiler.dir"
            value="${basedir}/vendor/closure-compiler" />
  <property name="closure-compiler.jar"
            value="${closure-compiler.dir}/build/compiler.jar" /> 
  <property name="closure-library.dir"
            value="${basedir}/vendor/closure-library" />
  <property name="closure-linter.dir"
            value="${basedir}/vendor/closure-linter" />
  <property name="python-gflags.dir"
            value="${basedir}/vendor/python-gflags" />
  <property name="libphonenumber.dir"
            value="${basedir}/vendor/libphonenumber" />

  <macrodef name="closure-compile">
    <attribute name="inputfile" />
    <attribute name="outputfile" />
    <attribute name="compilationlevel" default="ADVANCED_OPTIMIZATIONS" />
    <attribute name="outputmode" default="compiled" />
    <attribute name="outputwrapper" default="(function(){%output%})();" />
    <element name="extraflags" optional="yes" />
    <sequential>
      <exec executable="python" failonerror="true" logError="true">
        <arg value="${closure-library.dir}/closure/bin/calcdeps.py" />
        <arg line='-i "@{inputfile}"' />
        <arg line='--output_file "@{outputfile}"' />
        <arg line='-p "${closure-library.dir}"' />
        <arg line="-o @{outputmode}" />
        <arg line='-c "${closure-compiler.jar}"' />
        <arg line='-f "--output_wrapper=@{outputwrapper}"' />
        <arg line='-f "--compilation_level=@{compilationlevel}"' />
        <arg line='-f "--warning_level=VERBOSE"' />
        <arg line='-f "--jscomp_error=accessControls"' />
        <arg line='-f "--jscomp_error=ambiguousFunctionDecl"' />
        <arg line='-f "--jscomp_error=checkDebuggerStatement"' />
        <arg line='-f "--jscomp_error=checkRegExp"' />
        <arg line='-f "--jscomp_error=checkTypes"' />
        <arg line='-f "--jscomp_error=checkVars"' />
        <arg line='-f "--jscomp_error=const"' />
        <arg line='-f "--jscomp_error=constantProperty"' />
        <arg line='-f "--jscomp_error=deprecated"' />
        <arg line='-f "--jscomp_error=duplicate"' />
        <arg line='-f "--jscomp_error=duplicateMessage"' />
        <arg line='-f "--jscomp_error=es5Strict"' />
        <arg line='-f "--jscomp_error=externsValidation"' />
        <arg line='-f "--jscomp_error=fileoverviewTags"' />
        <arg line='-f "--jscomp_error=globalThis"' />
        <arg line='-f "--jscomp_error=internetExplorerChecks"' />
        <arg line='-f "--jscomp_error=invalidCasts"' />
        <arg line='-f "--jscomp_error=misplacedTypeAnnotation"' />
        <arg line='-f "--jscomp_error=missingProperties"' />
        <arg line='-f "--jscomp_error=nonStandardJsDocs"' />
        <arg line='-f "--jscomp_error=strictModuleDepCheck"' />
        <arg line='-f "--jscomp_error=suspiciousCode"' />
        <arg line='-f "--jscomp_error=typeInvalidation"' />
        <arg line='-f "--jscomp_error=undefinedNames"' />
        <arg line='-f "--jscomp_error=undefinedVars"' />
        <arg line='-f "--jscomp_error=unknownDefines"' />
        <arg line='-f "--jscomp_error=uselessCode"' />
        <arg line='-f "--jscomp_error=visibility"' />
        <extraflags />
      </exec>
    </sequential>
  </macrodef>

  <macrodef name="gjslint">
    <attribute name="inputfile" />
    <sequential>
      <exec executable="python" failonerror="false" logError="true">
        <env key="PYTHONPATH"
             value="${closure-linter.dir}:${python-gflags.dir}"/>
        <arg value="${closure-linter.dir}/closure_linter/gjslint.py" />
        <arg line='--strict' />
        <arg line='"@{inputfile}"' />
      </exec>
    </sequential>
  </macrodef>

  <condition property="os.iswindows">
    <os family="windows" />
  </condition>
  <condition property="os.isunix">
    <os family="unix" />
  </condition>
  <target name="nul" if="os.iswindows">
    <property name="null.device" value="NUL" />
  </target>
  <target name="devnull" if="os.isunix">
    <property name="null.device" value="/dev/null" />
  </target>
  <target name="setnulldevice" depends="nul,devnull" />

  <target name="clean" description="deletes all generated files">
    <delete file="dist/libphonenumber.js" />
  </target>

  <target name="compile-libphonenumber"
          description="generates libphonenumber.js">
    <closure-compile inputfile="libphonenumber.js"
                     outputfile="dist/libphonenumber.js">
      <extraflags>
        <arg line='-p "${libphonenumber.dir}/javascript/i18n/phonenumbers"' />
        <arg line='-e "${libphonenumber.dir}/javascript/i18n/phonenumbers/metadatafortesting.js"' />
        <arg line='-e "${libphonenumber.dir}/javascript/i18n/phonenumbers/metadatalite.js"' />
        <arg line='-e "${libphonenumber.dir}/javascript/i18n/phonenumbers/regioncodefortesting.js"' />
      </extraflags>
    </closure-compile>
  </target>

  <target name="compile-tests" depends="setnulldevice">
    <closure-compile inputfile="${libphonenumber.dir}/javascript/i18n/phonenumbers/asyoutypeformatter_test.js"
                     outputfile="${null.device}">
      <extraflags>
        <arg line='-p "${libphonenumber.dir}/javascript/i18n/phonenumbers"' />
        <arg line='-e "${libphonenumber.dir}/javascript/i18n/phonenumbers/metadata.js"' />
        <arg line='-e "${libphonenumber.dir}/javascript/i18n/phonenumbers/metadatalite.js"' />
      </extraflags>
    </closure-compile>
    <closure-compile inputfile="${libphonenumber.dir}/javascript/i18n/phonenumbers/phonenumberutil_test.js"
                     outputfile="${null.device}">
      <extraflags>
        <arg line='-p "${libphonenumber.dir}/javascript/i18n/phonenumbers"' />
        <arg line='-e "${libphonenumber.dir}/javascript/i18n/phonenumbers/metadata.js"' />
        <arg line='-e "${libphonenumber.dir}/javascript/i18n/phonenumbers/metadatalite.js"' />
      </extraflags>
    </closure-compile>
  </target>

  <target name="compile" depends="compile-libphonenumber,compile-tests" />

  <target name="lint" description="lints all javascript files">
    <gjslint inputfile="${libphonenumber.dir}/javascript/i18n/phonenumbers/asyoutypeformatter*.js" />
    <gjslint inputfile="${libphonenumber.dir}/javascript/i18n/phonenumbers/demo.js" />
    <gjslint inputfile="${libphonenumber.dir}/javascript/i18n/phonenumbers/phonenumberutil*.js" />
  </target>

</project>
<commit_msg>custom buildfile with abs refs<commit_after><?xml version="1.0" ?>

<project name="libphonenumber-javascript" default="compile">
  <property name="google-libphonenumber-area"
            value="/root/libphonenumber_area" />
  <property name="closure-compiler.dir"
            value="${google-libphonenumber-area}/closure-compiler" />
  <property name="closure-compiler.jar"
            value="${closure-compiler.dir}/build/compiler.jar" /> 
  <property name="closure-library.dir"
            value="${google-libphonenumber-area}/closure-library" />
  <property name="closure-linter.dir"
            value="${google-libphonenumber-area}/closure-linter" />
  <property name="python-gflags.dir"
            value="${google-libphonenumber-area}/python-gflags" />
  <property name="libphonenumber.dir"
            value="${google-libphonenumber-area}/libphonenumber" />

  <macrodef name="closure-compile">
    <attribute name="inputfile" />
    <attribute name="outputfile" />
    <attribute name="compilationlevel" default="ADVANCED_OPTIMIZATIONS" />
    <attribute name="outputmode" default="compiled" />
    <attribute name="outputwrapper" default="(function(){%output%})();" />
    <element name="extraflags" optional="yes" />
    <sequential>
      <exec executable="python" failonerror="true" logError="true">
        <arg value="${closure-library.dir}/closure/bin/calcdeps.py" />
        <arg line='-i "@{inputfile}"' />
        <arg line='--output_file "@{outputfile}"' />
        <arg line='-p "${closure-library.dir}"' />
        <arg line="-o @{outputmode}" />
        <arg line='-c "${closure-compiler.jar}"' />
        <arg line='-f "--output_wrapper=@{outputwrapper}"' />
        <arg line='-f "--compilation_level=@{compilationlevel}"' />
        <arg line='-f "--warning_level=VERBOSE"' />
        <arg line='-f "--jscomp_error=accessControls"' />
        <arg line='-f "--jscomp_error=ambiguousFunctionDecl"' />
        <arg line='-f "--jscomp_error=checkDebuggerStatement"' />
        <arg line='-f "--jscomp_error=checkRegExp"' />
        <arg line='-f "--jscomp_error=checkTypes"' />
        <arg line='-f "--jscomp_error=checkVars"' />
        <arg line='-f "--jscomp_error=const"' />
        <arg line='-f "--jscomp_error=constantProperty"' />
        <arg line='-f "--jscomp_error=deprecated"' />
        <arg line='-f "--jscomp_error=duplicate"' />
        <arg line='-f "--jscomp_error=duplicateMessage"' />
        <arg line='-f "--jscomp_error=es5Strict"' />
        <arg line='-f "--jscomp_error=externsValidation"' />
        <arg line='-f "--jscomp_error=fileoverviewTags"' />
        <arg line='-f "--jscomp_error=globalThis"' />
        <arg line='-f "--jscomp_error=internetExplorerChecks"' />
        <arg line='-f "--jscomp_error=invalidCasts"' />
        <arg line='-f "--jscomp_error=misplacedTypeAnnotation"' />
        <arg line='-f "--jscomp_error=missingProperties"' />
        <arg line='-f "--jscomp_error=nonStandardJsDocs"' />
        <arg line='-f "--jscomp_error=strictModuleDepCheck"' />
        <arg line='-f "--jscomp_error=suspiciousCode"' />
        <arg line='-f "--jscomp_error=typeInvalidation"' />
        <arg line='-f "--jscomp_error=undefinedNames"' />
        <arg line='-f "--jscomp_error=undefinedVars"' />
        <arg line='-f "--jscomp_error=unknownDefines"' />
        <arg line='-f "--jscomp_error=uselessCode"' />
        <arg line='-f "--jscomp_error=visibility"' />
        <extraflags />
      </exec>
    </sequential>
  </macrodef>

  <macrodef name="gjslint">
    <attribute name="inputfile" />
    <sequential>
      <exec executable="python" failonerror="false" logError="true">
        <env key="PYTHONPATH"
             value="${closure-linter.dir}:${python-gflags.dir}"/>
        <arg value="${closure-linter.dir}/closure_linter/gjslint.py" />
        <arg line='--strict' />
        <arg line='"@{inputfile}"' />
      </exec>
    </sequential>
  </macrodef>

  <condition property="os.iswindows">
    <os family="windows" />
  </condition>
  <condition property="os.isunix">
    <os family="unix" />
  </condition>
  <target name="nul" if="os.iswindows">
    <property name="null.device" value="NUL" />
  </target>
  <target name="devnull" if="os.isunix">
    <property name="null.device" value="/dev/null" />
  </target>
  <target name="setnulldevice" depends="nul,devnull" />

  <target name="clean" description="deletes all generated files">
    <delete file="dist/libphonenumber.js" />
  </target>

  <target name="compile-libphonenumber"
          description="generates libphonenumber.js">
    <closure-compile inputfile="libphonenumber.js"
                     outputfile="dist/libphonenumber.js">
      <extraflags>
        <arg line='-p "${libphonenumber.dir}/javascript/i18n/phonenumbers"' />
        <arg line='-e "${libphonenumber.dir}/javascript/i18n/phonenumbers/metadatafortesting.js"' />
        <arg line='-e "${libphonenumber.dir}/javascript/i18n/phonenumbers/metadatalite.js"' />
        <arg line='-e "${libphonenumber.dir}/javascript/i18n/phonenumbers/regioncodefortesting.js"' />
      </extraflags>
    </closure-compile>
  </target>

  <target name="compile-tests" depends="setnulldevice">
    <closure-compile inputfile="${libphonenumber.dir}/javascript/i18n/phonenumbers/asyoutypeformatter_test.js"
                     outputfile="${null.device}">
      <extraflags>
        <arg line='-p "${libphonenumber.dir}/javascript/i18n/phonenumbers"' />
        <arg line='-e "${libphonenumber.dir}/javascript/i18n/phonenumbers/metadata.js"' />
        <arg line='-e "${libphonenumber.dir}/javascript/i18n/phonenumbers/metadatalite.js"' />
      </extraflags>
    </closure-compile>
    <closure-compile inputfile="${libphonenumber.dir}/javascript/i18n/phonenumbers/phonenumberutil_test.js"
                     outputfile="${null.device}">
      <extraflags>
        <arg line='-p "${libphonenumber.dir}/javascript/i18n/phonenumbers"' />
        <arg line='-e "${libphonenumber.dir}/javascript/i18n/phonenumbers/metadata.js"' />
        <arg line='-e "${libphonenumber.dir}/javascript/i18n/phonenumbers/metadatalite.js"' />
      </extraflags>
    </closure-compile>
  </target>

  <target name="compile" depends="compile-libphonenumber,compile-tests" />

  <target name="lint" description="lints all javascript files">
    <gjslint inputfile="${libphonenumber.dir}/javascript/i18n/phonenumbers/asyoutypeformatter*.js" />
    <gjslint inputfile="${libphonenumber.dir}/javascript/i18n/phonenumbers/demo.js" />
    <gjslint inputfile="${libphonenumber.dir}/javascript/i18n/phonenumbers/phonenumberutil*.js" />
  </target>

</project>

{'fraction_non_alphanumeric': 0.18691731621580315, 'fraction_numerical': 0.0050435580009170105, 'mean_word_length': 3.214814814814815, 'pattern_counts': {'":': 0, '<': 240, '<?xml version=': 2, '>': 240, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6901139', 'n_tokens_mistral': 4390, 'n_tokens_neox': 4189, 'n_words': 589}