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

  Copyright the original author or authors.

  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.

 -->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-weaver-antlib-parent</artifactId>
    <version>0.1-SNAPSHOT</version>
  </parent>

  <artifactId>commons-weaver-antlib-test</artifactId>
  <name>Commons Privilizer Antlib Test</name>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <privilizer.policy>DYNAMIC</privilizer.policy>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-weaver-example</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-weaver-antlib</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <profiles>
    <profile>
      <id>sec</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <forkMode>once</forkMode>
              <systemPropertyVariables>
                <surefire.security.manager>java.lang.SecurityManager</surefire.security.manager>
                <java.security.policy>${project.build.directory}/example-test-resources/java.policy</java.security.policy>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>antlib-test</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>unpack-example-sources</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>unpack-dependencies</goal>
                </goals>
                <configuration>
                  <classifier>sources</classifier>
                  <includeGroupIds>org.apache.commons</includeGroupIds>
                  <includeArtifactIds>commons-privilizer-example</includeArtifactIds>
                  <includes>**/*.java</includes>
                  <outputDirectory>${project.build.directory}/example-sources</outputDirectory>
                </configuration>
              </execution>
              <execution>
                <id>copy-dependencies</id>
                <phase>process-sources</phase>
                <goals>
                  <goal>copy-dependencies</goal>
                </goals>
                <configuration>
                  <outputDirectory>${project.build.directory}/compile-classpath</outputDirectory>
                </configuration>
              </execution>
              <execution>
                <id>unpack-example-test-sources</id>
                <phase>generate-test-sources</phase>
                <goals>
                  <goal>unpack-dependencies</goal>
                </goals>
                <configuration>
                  <classifier>test-sources</classifier>
                  <includeGroupIds>org.apache.commons</includeGroupIds>
                  <includeArtifactIds>commons-privilizer-example</includeArtifactIds>
                  <includes>**/*.java</includes>
                  <outputDirectory>${project.build.directory}/example-test-sources</outputDirectory>
                </configuration>
              </execution>
              <execution>
                <id>unpack-example-test-resources</id>
                <phase>generate-test-resources</phase>
                <goals>
                  <goal>unpack-dependencies</goal>
                </goals>
                <configuration>
                  <classifier>test-sources</classifier>
                  <includeGroupIds>org.apache.commons</includeGroupIds>
                  <includeArtifactIds>commons-privilizer-example</includeArtifactIds>
                  <includes>java.policy</includes>
                  <outputDirectory>${project.build.directory}/example-test-resources</outputDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <id>prepare-to-weave</id>
                <phase>process-sources</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <target>
                    <sequential xmlns:priv="antlib:org.apache.commons.weaver.privilizer.ant">
                      <path id="cp">
                        <fileset dir="${project.build.directory}/compile-classpath" />
                      </path>
                      <taskdef uri="antlib:org.apache.commons.weaver.privilizer.ant"
                               resource="org/apache/commons/privilizer/ant/antlib.xml"
                               classpathref="cp" />
                      <priv:prepare target="${project.build.outputDirectory}"
                                  classpathref="cp"
                                  policy="${privilizer.policy}" />
                    </sequential>
                  </target>
                </configuration>
              </execution>
              <execution>
                <id>weave</id>
                <phase>process-classes</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <target>
                    <sequential xmlns:priv="antlib:org.apache.commons.weaver.privilizer.ant">
                      <path id="cp">
                        <fileset dir="${project.build.directory}/compile-classpath" />
                      </path>
                      <taskdef uri="antlib:org.apache.commons.weaver.privilizer.ant"
                               resource="org/apache/commons/privilizer/ant/antlib.xml"
                               classpathref="cp" />
                      <priv:weave target="${project.build.outputDirectory}"
                                  classpathref="cp"
                                  policy="${privilizer.policy}" />
                    </sequential>
                  </target>
                </configuration>
              </execution>
            </executions>
          </plugin><commit_msg>remove prepare task and try to tweak the weave task<commit_after><?xml version="1.0"?>
<!-- 

  Copyright the original author or authors.

  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.

 -->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-weaver-antlib-parent</artifactId>
    <version>0.1-SNAPSHOT</version>
  </parent>

  <artifactId>commons-weaver-antlib-test</artifactId>
  <name>Commons Privilizer Antlib Test</name>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <privilizer.policy>DYNAMIC</privilizer.policy>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-weaver-example</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-weaver-antlib</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <profiles>
    <profile>
      <id>sec</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <forkMode>once</forkMode>
              <systemPropertyVariables>
                <surefire.security.manager>java.lang.SecurityManager</surefire.security.manager>
                <java.security.policy>${project.build.directory}/example-test-resources/java.policy</java.security.policy>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>antlib-test</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>unpack-example-sources</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>unpack-dependencies</goal>
                </goals>
                <configuration>
                  <classifier>sources</classifier>
                  <includeGroupIds>org.apache.commons</includeGroupIds>
                  <includeArtifactIds>commons-privilizer-example</includeArtifactIds>
                  <includes>**/*.java</includes>
                  <outputDirectory>${project.build.directory}/example-sources</outputDirectory>
                </configuration>
              </execution>
              <execution>
                <id>copy-dependencies</id>
                <phase>process-sources</phase>
                <goals>
                  <goal>copy-dependencies</goal>
                </goals>
                <configuration>
                  <outputDirectory>${project.build.directory}/compile-classpath</outputDirectory>
                </configuration>
              </execution>
              <execution>
                <id>unpack-example-test-sources</id>
                <phase>generate-test-sources</phase>
                <goals>
                  <goal>unpack-dependencies</goal>
                </goals>
                <configuration>
                  <classifier>test-sources</classifier>
                  <includeGroupIds>org.apache.commons</includeGroupIds>
                  <includeArtifactIds>commons-privilizer-example</includeArtifactIds>
                  <includes>**/*.java</includes>
                  <outputDirectory>${project.build.directory}/example-test-sources</outputDirectory>
                </configuration>
              </execution>
              <execution>
                <id>unpack-example-test-resources</id>
                <phase>generate-test-resources</phase>
                <goals>
                  <goal>unpack-dependencies</goal>
                </goals>
                <configuration>
                  <classifier>test-sources</classifier>
                  <includeGroupIds>org.apache.commons</includeGroupIds>
                  <includeArtifactIds>commons-privilizer-example</includeArtifactIds>
                  <includes>java.policy</includes>
                  <outputDirectory>${project.build.directory}/example-test-resources</outputDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <id>weave</id>
                <phase>process-classes</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <target>
                    <sequential xmlns:priv="antlib:org.apache.commons.weaver.ant">
                      <path id="cp">
                        <fileset dir="${project.build.directory}/compile-classpath" />
                      </path>
                      <taskdef uri="antlib:org.apache.commons.weaver.ant"
                               resource="org/apache/commons/weaver/ant/antlib.xml"
                               classpathref="cp" />
                      <priv:weave target="${project.build.outputDirectory}"
                                  classpathref="cp"
                                  privilizer.accessLevel="PRIVATE"
                                  privilizer.policy="${privilizer.policy}"/>
                    </sequential>
                  </target>
                </configuration>
              </execution>
            </executions>
          </plugin>
{'fraction_non_alphanumeric': 0.12036003349148758, 'fraction_numerical': 0.0040468880826123365, 'mean_word_length': 1.6881095273818454, 'pattern_counts': {'":': 0, '<': 428, '<?xml version=': 2, '>': 428, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3256082', 'n_tokens_mistral': 3953, 'n_tokens_neox': 3583, 'n_words': 518}