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

<project name="yanel-continuous-integration" default="continuous-integration" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
  <description>Yanel Build for Continuous Integration</description>

  <property file="local.continuous-integration.properties"/>
  <property file="continuous-integration.properties"/>

  <target name="continuous-integration">
    <echo>Cleaning Yanel</echo>
    <antcall target="clean"/>
    <echo>Deploying Yanel</echo>
    <antcall target="deploy"/>
  </target>

  <target name="start-tomcat" description="starts tomcat">
    <condition property="isWindows">
      <os family="windows"/>
    </condition>
    <condition property="isUnix">
      <os family="unix"/>
    </condition>
    <antcall target="startup-tomcat-windows"/>
    <antcall target="startup-tomcat-unix"/>
    <waitfor maxwait="60" maxwaitunit="second" checkevery="4000">
      <and>
        <socket server="${tomcat.ip}" port="${tomcat.port}"/>
      </and>
    </waitfor>
    <available file="${document.root}/cruise_is_building.html" property="cruise_is_building_html_available"/>
    <antcall target="delete-building-hint"/>
  </target>
  
  <target name="startup-tomcat-windows" if="isWindows">
     <condition property="isTomcat1HomeSet">
       <isset property="tomcat1.home.dir"/>
     </condition>
    <antcall target="startup-tomcat-windows-node1"/>
     <condition property="isTomcat2HomeSet">
       <isset property="tomcat2.home.dir"/>
     </condition>
    <antcall target="startup-tomcat-windows-node2"/>
  </target>

  <target name="startup-tomcat-unix" if="isUnix">
     <condition property="isTomcat1HomeSet">
       <isset property="tomcat1.home.dir"/>
     </condition>
    <antcall target="startup-tomcat-unix-node1"/>
     <condition property="isTomcat2HomeSet">
       <isset property="tomcat2.home.dir"/>
     </condition>
    <antcall target="startup-tomcat-unix-node2"/>
  </target>


  <target name="startup-tomcat-windows-node1" if="isTomcat1HomeSet">
    <echo>Startup Tomcat Cluster Node 1: ${tomcat1.home.dir}/bin/startup.bat</echo>
    <exec dir="${tomcat1.home.dir}/bin" resolveexecutable="true" executable="startup.bat" spawn="false"/>
  </target>
  <target name="startup-tomcat-unix-node1" if="isTomcat1HomeSet">
    <echo>Starting Tomcat (${tomcat1.home.dir}/bin/startup.sh) ...</echo>
    <exec dir="${tomcat1.home.dir}/bin" resolveexecutable="true" executable="startup.sh" spawn="false"/>
  </target>
  <target name="startup-tomcat-windows-node2" if="isTomcat2HomeSet">
    <exec dir="${tomcat2.home.dir}/bin" resolveexecutable="true" executable="startup.bat" spawn="false"/>
  </target>
  <target name="startup-tomcat-unix-node2" if="isTomcat2HomeSet">
    <echo>Starting Tomcat (${tomcat2.home.dir}/bin/startup.sh) ...</echo>
    <exec dir="${tomcat2.home.dir}/bin" resolveexecutable="true" executable="startup.sh" spawn="false"/>
  </target>
  
  <target name="stop-tomcat" description="stops tomcat">
    <available file="${document.root}/cruise_is_building.html.orig" property="cruise_is_building_html_orig_available"/>
    <antcall target="copy-building-hint"/>
    <condition property="isWindows">
      <os family="windows"/>
    </condition>
    <condition property="isUnix">
      <os family="unix"/>
    </condition>
    <antcall target="shutdown-tomcat-windows"/>
    <antcall target="shutdown-tomcat-unix"/>
  </target>
  
  <target name="shutdown-tomcat-windows" if="isWindows">
     <echo>Windows ...</echo>
     <condition property="isTomcat1HomeSet">
       <isset property="tomcat1.home.dir"/>
     </condition>
    <antcall target="shutdown-tomcat-windows-node1"/>
     <condition property="isTomcat2HomeSet">
       <isset property="tomcat2.home.dir"/>
     </condition>
    <antcall target="shutdown-tomcat-windows-node2"/>
  </target>

  <target name="shutdown-tomcat-unix" if="isUnix">
     <echo>Unix ...</echo>
     <condition property="isTomcat1HomeSet">
       <isset property="tomcat1.home.dir"/>
     </condition>
     <antcall target="shutdown-tomcat-unix-node1"/>
     <condition property="isTomcat2HomeSet">
       <isset property="tomcat2.home.dir"/>
     </condition>
     <antcall target="shutdown-tomcat-unix-node2"/>
  </target>


  <target name="shutdown-tomcat-windows-node1"  if="isTomcat1HomeSet">
    <exec dir="${tomcat1.home.dir}/bin" resolveexecutable="true" executable="shutdown.bat" spawn="false"/>
  </target>
  <target name="shutdown-tomcat-unix-node1"  if="isTomcat1HomeSet">
    <echo>Shutdown Tomcat (${tomcat1.home.dir}/bin/shutdown.sh) ...</echo>
    <exec dir="${tomcat1.home.dir}/bin" resolveexecutable="true" executable="shutdown.sh" spawn="false"/>
  </target>
  <target name="shutdown-tomcat-windows-node2"  if="isTomcat2HomeSet">
    <exec dir="${tomcat2.home.dir}/bin" resolveexecutable="true" executable="shutdown.bat" spawn="false"/>
  </target>
  <target name="shutdown-tomcat-unix-node2"  if="isTomcat2HomeSet">
    <echo>Shutdown Tomcat (${tomcat2.home.dir}/bin/shutdown.sh) ...</echo>
    <exec dir="${tomcat2.home.dir}/bin" resolveexecutable="true" executable="shutdown.sh" spawn="false"/>
  </target>

  <target name="copy-building-hint" if="cruise_is_building_html_orig_available" description="copy a message to the httpd saying yanel is stoped and building">
    <copy file="${document.root}/cruise_is_building.html.orig" tofile="${document.root}/cruise_is_building.html"/>
  </target>

  <target name="delete-building-hint" if="cruise_is_building_html_available" description="removes the message from the httpd saying yanel is stoped and building">
    <delete file="${document.root}/cruise_is_building.html"/>
  </target>
</project>
<commit_msg>permissions fixed<commit_after><?xml version="1.0"?>

<project name="yanel-continuous-integration" default="continuous-integration" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
  <description>Yanel Build for Continuous Integration</description>

  <property file="local.continuous-integration.properties"/>
  <property file="continuous-integration.properties"/>

  <target name="continuous-integration">
    <echo>Cleaning Yanel</echo>
    <antcall target="clean"/>
    <echo>Deploying Yanel</echo>
    <antcall target="deploy"/>
  </target>

  <target name="start-tomcat" description="starts tomcat">
    <condition property="isWindows">
      <os family="windows"/>
    </condition>
    <condition property="isUnix">
      <os family="unix"/>
    </condition>
    <antcall target="startup-tomcat-windows"/>
    <antcall target="startup-tomcat-unix"/>
    <waitfor maxwait="60" maxwaitunit="second" checkevery="4000">
      <and>
        <socket server="${tomcat.ip}" port="${tomcat.port}"/>
      </and>
    </waitfor>
    <available file="${document.root}/cruise_is_building.html" property="cruise_is_building_html_available"/>
    <antcall target="delete-building-hint"/>
  </target>
  
  <target name="startup-tomcat-windows" if="isWindows">
     <condition property="isTomcat1HomeSet">
       <isset property="tomcat1.home.dir"/>
     </condition>
    <antcall target="startup-tomcat-windows-node1"/>
     <condition property="isTomcat2HomeSet">
       <isset property="tomcat2.home.dir"/>
     </condition>
    <antcall target="startup-tomcat-windows-node2"/>
  </target>

  <target name="startup-tomcat-unix" if="isUnix">
     <condition property="isTomcat1HomeSet">
       <isset property="tomcat1.home.dir"/>
     </condition>
    <antcall target="startup-tomcat-unix-node1"/>
     <condition property="isTomcat2HomeSet">
       <isset property="tomcat2.home.dir"/>
     </condition>
    <antcall target="startup-tomcat-unix-node2"/>
  </target>


  <target name="startup-tomcat-windows-node1" if="isTomcat1HomeSet">
    <echo>Startup Tomcat Cluster Node 1: ${tomcat1.home.dir}/bin/startup.bat</echo>
    <exec dir="${tomcat1.home.dir}/bin" resolveexecutable="true" executable="startup.bat" spawn="false"/>
  </target>
  <target name="startup-tomcat-unix-node1" if="isTomcat1HomeSet">
    <echo>Starting Tomcat (${tomcat1.home.dir}/bin/startup.sh) ...</echo>
    <chmod dir="${tomcat1.home.dir}/bin" perm="755" includes="*"/>
    <exec dir="${tomcat1.home.dir}/bin" resolveexecutable="true" executable="startup.sh" spawn="false"/>
  </target>
  <target name="startup-tomcat-windows-node2" if="isTomcat2HomeSet">
    <exec dir="${tomcat2.home.dir}/bin" resolveexecutable="true" executable="startup.bat" spawn="false"/>
  </target>
  <target name="startup-tomcat-unix-node2" if="isTomcat2HomeSet">
    <echo>Starting Tomcat (${tomcat2.home.dir}/bin/startup.sh) ...</echo>
    <chmod dir="${tomcat2.home.dir}/bin" perm="755" includes="*"/>
    <exec dir="${tomcat2.home.dir}/bin" resolveexecutable="true" executable="startup.sh" spawn="false"/>
  </target>
  
  <target name="stop-tomcat" description="stops tomcat">
    <available file="${document.root}/cruise_is_building.html.orig" property="cruise_is_building_html_orig_available"/>
    <antcall target="copy-building-hint"/>
    <condition property="isWindows">
      <os family="windows"/>
    </condition>
    <condition property="isUnix">
      <os family="unix"/>
    </condition>
    <antcall target="shutdown-tomcat-windows"/>
    <antcall target="shutdown-tomcat-unix"/>
  </target>
  
  <target name="shutdown-tomcat-windows" if="isWindows">
     <echo>Windows ...</echo>
     <condition property="isTomcat1HomeSet">
       <isset property="tomcat1.home.dir"/>
     </condition>
    <antcall target="shutdown-tomcat-windows-node1"/>
     <condition property="isTomcat2HomeSet">
       <isset property="tomcat2.home.dir"/>
     </condition>
    <antcall target="shutdown-tomcat-windows-node2"/>
  </target>

  <target name="shutdown-tomcat-unix" if="isUnix">
     <echo>Unix ...</echo>
     <condition property="isTomcat1HomeSet">
       <isset property="tomcat1.home.dir"/>
     </condition>
     <antcall target="shutdown-tomcat-unix-node1"/>
     <condition property="isTomcat2HomeSet">
       <isset property="tomcat2.home.dir"/>
     </condition>
     <antcall target="shutdown-tomcat-unix-node2"/>
  </target>


  <target name="shutdown-tomcat-windows-node1"  if="isTomcat1HomeSet">
    <exec dir="${tomcat1.home.dir}/bin" resolveexecutable="true" executable="shutdown.bat" spawn="false"/>
  </target>
  <target name="shutdown-tomcat-unix-node1"  if="isTomcat1HomeSet">
    <echo>Shutdown Tomcat (${tomcat1.home.dir}/bin/shutdown.sh) ...</echo>
    <chmod dir="${tomcat1.home.dir}/bin" perm="755" includes="*"/>
    <exec dir="${tomcat1.home.dir}/bin" resolveexecutable="true" executable="shutdown.sh" spawn="false"/>
  </target>
  <target name="shutdown-tomcat-windows-node2"  if="isTomcat2HomeSet">
    <exec dir="${tomcat2.home.dir}/bin" resolveexecutable="true" executable="shutdown.bat" spawn="false"/>
  </target>
  <target name="shutdown-tomcat-unix-node2"  if="isTomcat2HomeSet">
    <echo>Shutdown Tomcat (${tomcat2.home.dir}/bin/shutdown.sh) ...</echo>
    <chmod dir="${tomcat2.home.dir}/bin" perm="755" includes="*"/>
    <exec dir="${tomcat2.home.dir}/bin" resolveexecutable="true" executable="shutdown.sh" spawn="false"/>
  </target>

  <target name="copy-building-hint" if="cruise_is_building_html_orig_available" description="copy a message to the httpd saying yanel is stoped and building">
    <copy file="${document.root}/cruise_is_building.html.orig" tofile="${document.root}/cruise_is_building.html"/>
  </target>

  <target name="delete-building-hint" if="cruise_is_building_html_available" description="removes the message from the httpd saying yanel is stoped and building">
    <delete file="${document.root}/cruise_is_building.html"/>
  </target>
</project>

{'fraction_non_alphanumeric': 0.17623864220812618, 'fraction_numerical': 0.012000685753471628, 'mean_word_length': 4.446778711484594, 'pattern_counts': {'":': 0, '<': 263, '<?xml version=': 2, '>': 263, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4921985', 'n_tokens_mistral': 3939, 'n_tokens_neox': 3830, 'n_words': 601}