<commit_before><?xml version="1.0" encoding="utf-8" ?>

<!--
#
# build.xml
#
# Copyright (C) 2009-12 by RStudio, Inc.
#
# This program is licensed to you under the terms of version 3 of the
# GNU Affero General Public License. This program is distributed WITHOUT
# ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
# AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
#
-->

<project name="client" default="build" basedir=".">

   <taskdef name="jscomp"
            classname="com.google.javascript.jscomp.ant.CompileTask"
            classpath="./tools/compiler/compiler.jar"/>
   <!-- Configure path to GWT SDK -->
   <property name="gwt.sdk" value="lib/gwt/2.7.0"/>

   <property name="gwt.extra.args" value=""/>
   <property name="gwt.main.module" value="org.rstudio.studio.RStudio"/>
   <property name="ace.bin" value="src/org/rstudio/studio/client/workbench/views/source/editors/text/ace"/>

   <path id="project.class.path">
      <pathelement location="bin"/>
      <fileset dir="${gwt.sdk}" includes="*.jar"/>
      <fileset dir="lib/gin/1.5" includes="*.jar"/>
   </path>

   <path id="test.class.path">
      <pathelement location="bin"/>
      <fileset dir="lib/selenium/2.37.0" includes="*.jar"/>
      <fileset dir="lib/selenium/2.37.0/libs" includes="*.jar"/>
   </path>

   <fileset id="acesupport.sources.fileset" dir="acesupport">
      <include name="**/*.js"/>
      <exclude name="extern.js"/>
   </fileset>

   <path id="acesupport.sources">
      <fileset refid="acesupport.sources.fileset"/>
   </path>

   <target name="ext">
      <jscomp compilationLevel="simple" warning="default"
              debug="false" output="${ace.bin}/acesupport.js">
              
          <externs dir="acesupport">
             <file name="extern.js"/>
          </externs>

          <path refid="acesupport.sources"/>

      </jscomp>
   </target>

   <target name="acesupport" description="Compile (debugging) Ace support">
      <concat destfile="${ace.bin}/acesupport.js">
         <fileset refid="acesupport.sources.fileset"/>
      </concat>
      <echo>Concatenated acesupport files to 'acesupport.js'</echo>
   </target>

   <target name="javac" description="Compile java source">
      <mkdir dir="bin"/>
      <!-- Compile com.google stuff separately from org.rstudio stuff since
         theirs have lots of deprecation warnings we can't do anything about -->
      <javac srcdir="src" includes="com/google/**" encoding="utf-8"
             destdir="bin"
             source="1.5" target="1.5" nowarn="true" deprecation="false"
             debug="true" debuglevel="lines,vars,source"
             includeantruntime="false">
         <classpath refid="project.class.path"/>
         <compilerarg value="-Xlint:-deprecation"/>
      </javac>
      <javac srcdir="src" includes="org/rstudio/**" encoding="utf-8"
             destdir="bin"
             source="1.5" target="1.5" nowarn="true" deprecation="true"
             debug="true" debuglevel="lines,vars,source"
             includeantruntime="false"
             fork="true">
         <classpath refid="project.class.path"/>
         <compilerarg value="-Xlint"/>
         <compilerarg value="-J-Xms256m"/>
         <compilerarg value="-J-Xmx512m"/>
      </javac>
      <copy todir="bin">
         <fileset dir="src" excludes="**/*.java"/>
      </copy>
   </target>

   <target name="gwtc" depends="ext,javac" description="GWT compile to JavaScript">
      <java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
         <classpath>
            <pathelement location="src"/>
            <path refid="project.class.path"/>
         </classpath>
         <!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
         <jvmarg value="-Xmx1536M"/>
         <arg value="-war"/>
         <arg value="www"/>
         <arg value="-localWorkers"/>
         <arg value="2"/>
         <arg value="-XdisableClassMetadata"/>
         <arg value="-XdisableCastChecking"/>
         <arg line="-strict"/>
         <arg line="-gen gen"/>
         <!--<arg line="-style PRETTY"/>-->
         <arg line="-extra extras"/>
         <arg line="${gwt.extra.args}"/>
         <!-- Additional arguments like -logLevel DEBUG -->
         <arg value="${gwt.main.module}"/>
      </java>
   </target>

   <target name="soyc" description="Generate and show SOYC report">
      <antcall target="gwtc">
         <param name="gwt.main.module" value="org.rstudio.studio.RStudioDraft"/>
         <param name="gwt.extra.args" value="${gwt.extra.args} -compileReport"/>
      </antcall><commit_msg>use gwt pretty style for daily build<commit_after><?xml version="1.0" encoding="utf-8" ?>

<!--
#
# build.xml
#
# Copyright (C) 2009-12 by RStudio, Inc.
#
# This program is licensed to you under the terms of version 3 of the
# GNU Affero General Public License. This program is distributed WITHOUT
# ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
# AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
#
-->

<project name="client" default="build" basedir=".">

   <taskdef name="jscomp"
            classname="com.google.javascript.jscomp.ant.CompileTask"
            classpath="./tools/compiler/compiler.jar"/>
   <!-- Configure path to GWT SDK -->
   <property name="gwt.sdk" value="lib/gwt/2.7.0"/>

   <property name="gwt.extra.args" value=""/>
   <property name="gwt.main.module" value="org.rstudio.studio.RStudio"/>
   <property name="ace.bin" value="src/org/rstudio/studio/client/workbench/views/source/editors/text/ace"/>

   <path id="project.class.path">
      <pathelement location="bin"/>
      <fileset dir="${gwt.sdk}" includes="*.jar"/>
      <fileset dir="lib/gin/1.5" includes="*.jar"/>
   </path>

   <path id="test.class.path">
      <pathelement location="bin"/>
      <fileset dir="lib/selenium/2.37.0" includes="*.jar"/>
      <fileset dir="lib/selenium/2.37.0/libs" includes="*.jar"/>
   </path>

   <fileset id="acesupport.sources.fileset" dir="acesupport">
      <include name="**/*.js"/>
      <exclude name="extern.js"/>
   </fileset>

   <path id="acesupport.sources">
      <fileset refid="acesupport.sources.fileset"/>
   </path>

   <target name="ext">
      <jscomp compilationLevel="simple" warning="default"
              debug="false" output="${ace.bin}/acesupport.js">
              
          <externs dir="acesupport">
             <file name="extern.js"/>
          </externs>

          <path refid="acesupport.sources"/>

      </jscomp>
   </target>

   <target name="acesupport" description="Compile (debugging) Ace support">
      <concat destfile="${ace.bin}/acesupport.js">
         <fileset refid="acesupport.sources.fileset"/>
      </concat>
      <echo>Concatenated acesupport files to 'acesupport.js'</echo>
   </target>

   <target name="javac" description="Compile java source">
      <mkdir dir="bin"/>
      <!-- Compile com.google stuff separately from org.rstudio stuff since
         theirs have lots of deprecation warnings we can't do anything about -->
      <javac srcdir="src" includes="com/google/**" encoding="utf-8"
             destdir="bin"
             source="1.5" target="1.5" nowarn="true" deprecation="false"
             debug="true" debuglevel="lines,vars,source"
             includeantruntime="false">
         <classpath refid="project.class.path"/>
         <compilerarg value="-Xlint:-deprecation"/>
      </javac>
      <javac srcdir="src" includes="org/rstudio/**" encoding="utf-8"
             destdir="bin"
             source="1.5" target="1.5" nowarn="true" deprecation="true"
             debug="true" debuglevel="lines,vars,source"
             includeantruntime="false"
             fork="true">
         <classpath refid="project.class.path"/>
         <compilerarg value="-Xlint"/>
         <compilerarg value="-J-Xms256m"/>
         <compilerarg value="-J-Xmx512m"/>
      </javac>
      <copy todir="bin">
         <fileset dir="src" excludes="**/*.java"/>
      </copy>
   </target>

   <target name="gwtc" depends="ext,javac" description="GWT compile to JavaScript">
      <java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
         <classpath>
            <pathelement location="src"/>
            <path refid="project.class.path"/>
         </classpath>
         <!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
         <jvmarg value="-Xmx1536M"/>
         <arg value="-war"/>
         <arg value="www"/>
         <arg value="-localWorkers"/>
         <arg value="2"/>
         <arg value="-XdisableClassMetadata"/>
         <arg value="-XdisableCastChecking"/>
         <arg line="-strict"/>
         <arg line="-gen gen"/>
         <arg line="-style PRETTY"/>
         <arg line="-extra extras"/>
         <arg line="${gwt.extra.args}"/>
         <!-- Additional arguments like -logLevel DEBUG -->
         <arg value="${gwt.main.module}"/>
      </java>
   </target>

   <target name="soyc" description="Generate and show SOYC report">
      <antcall target="gwtc">
         <param name="gwt.main.module" value="org.rstudio.studio.RStudioDraft"/>
         <param name="gwt.extra.args" value="${gwt.extra.args} -compileReport"/>
      </antcall>
{'fraction_non_alphanumeric': 0.17081736909323117, 'fraction_numerical': 0.010217113665389528, 'mean_word_length': 2.6493203883495147, 'pattern_counts': {'":': 0, '<': 176, '<?xml version=': 2, '>': 176, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, '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': '1022453', 'n_tokens_mistral': 2965, 'n_tokens_neox': 2878, 'n_words': 613}