<commit_before>package org.carlspring.strongbox.storage.visitors;

import java.io.IOException;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;

/**
 * @author stodorov
 */
public class ArtifactPomVisitor
        extends SimpleFileVisitor<Path>
{

    private PathMatcher matcher;
    public ArrayList<Path> foundPaths = new ArrayList<>();

    public ArtifactPomVisitor()
    {
        matcher = FileSystems.getDefault().getPathMatcher("glob:*.pom");

    }

    @Override
    public FileVisitResult visitFile(Path file,
                                     BasicFileAttributes attr)
            throws IOException
    {

        Path name = file.getFileName();
        if (matcher.matches(name))
        {
            foundPaths.add(file);
        }

        return FileVisitResult.CONTINUE;
    }

}<commit_msg>#SB-118: Implement artifact metadata support<commit_after>package org.carlspring.strongbox.storage.visitors;

import java.io.IOException;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;

/**
 * @author stodorov
 */
public class ArtifactPomVisitor
        extends SimpleFileVisitor<Path>
{

    private PathMatcher matcher;

    public ArrayList<Path> foundPaths = new ArrayList<>();


    public ArtifactPomVisitor()
    {
        matcher = FileSystems.getDefault().getPathMatcher("glob:*.pom");
    }

    @Override
    public FileVisitResult visitFile(Path file,
                                     BasicFileAttributes attr)
            throws IOException
    {
        Path name = file.getFileName();
        if (matcher.matches(name))
        {
            foundPaths.add(file);
        }

        return FileVisitResult.CONTINUE;
    }

}
{'fraction_non_alphanumeric': 0.09779536461277558, 'fraction_numerical': 0.0016958733747880158, 'mean_word_length': 2.54, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '540425', 'n_tokens_mistral': 500, 'n_tokens_neox': 480, 'n_words': 96}