<commit_before>package de.saumya.mojo.gem;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.FileLock;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.metadata.ArtifactRepositoryMetadata;
import org.apache.maven.artifact.repository.metadata.RepositoryMetadata;
import org.apache.maven.artifact.resolver.AbstractArtifactResolutionException;
import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
import org.apache.maven.artifact.versioning.VersionRange;
import org.apache.maven.model.Dependency;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.ProjectBuildingException;
import org.apache.maven.project.artifact.InvalidDependencyVersionException;
import org.codehaus.plexus.util.FileUtils;

import de.saumya.mojo.jruby.AbstractJRubyMojo;

/**
 */
public abstract class AbstractGemMojo extends AbstractJRubyMojo {

    /**
     * @param expression
     *            ="${settings.offline}"
     */
    private boolean                  offline;

    /**
     * @parameter default-value="${plugin.artifacts}"
     */
    private java.util.List<Artifact> pluginArtifacts;

    public class UpdateCheckManager {

        public static final String  LAST_UPDATE_TAG = ".lastUpdated";

        private static final String TOUCHFILE_NAME  = "resolver-status.properties";

        public void touch(final Artifact artifact,
                final ArtifactRepository repository) {
            final File file = artifact.getFile();

            final File touchfile = getTouchfile(artifact);

            if (file.exists()) {
                touchfile.delete();
            }
            else {
                writeLastUpdated(touchfile, getRepositoryKey(repository));
            }
        }

        public void touch(final RepositoryMetadata metadata,
                final ArtifactRepository repository, final File file) {<commit_msg>fixed wrong annotation name to make offline working<commit_after>package de.saumya.mojo.gem;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.FileLock;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.metadata.ArtifactRepositoryMetadata;
import org.apache.maven.artifact.repository.metadata.RepositoryMetadata;
import org.apache.maven.artifact.resolver.AbstractArtifactResolutionException;
import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
import org.apache.maven.artifact.versioning.VersionRange;
import org.apache.maven.model.Dependency;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.ProjectBuildingException;
import org.apache.maven.project.artifact.InvalidDependencyVersionException;
import org.codehaus.plexus.util.FileUtils;

import de.saumya.mojo.jruby.AbstractJRubyMojo;

/**
 */
public abstract class AbstractGemMojo extends AbstractJRubyMojo {

    /**
     * @parameter expression ="${settings.offline}"
     */
    private boolean                  offline;

    /**
     * @parameter default-value="${plugin.artifacts}"
     */
    private java.util.List<Artifact> pluginArtifacts;

    public class UpdateCheckManager {

        public static final String  LAST_UPDATE_TAG = ".lastUpdated";

        private static final String TOUCHFILE_NAME  = "resolver-status.properties";

        public void touch(final Artifact artifact,
                final ArtifactRepository repository) {
            final File file = artifact.getFile();

            final File touchfile = getTouchfile(artifact);

            if (file.exists()) {
                touchfile.delete();
            }
            else {
                writeLastUpdated(touchfile, getRepositoryKey(repository));
            }
        }

        public void touch(final RepositoryMetadata metadata,
                final ArtifactRepository repository, final File file) {
{'fraction_non_alphanumeric': 0.09192570128885519, 'fraction_numerical': 0.0, 'mean_word_length': 3.8457300275482096, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '17568', 'n_tokens_mistral': 1484, 'n_tokens_neox': 1381, 'n_words': 269}