<commit_before>package com.zemiak.nasphotos.files;

import java.nio.file.Paths;
import java.util.Arrays;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

public class PictureControlTest {
    private final static String PHOTO_PATH = "/Volumes/media/Pictures/";

    @Test
    public void isNotImage() throws Exception {
        Arrays.asList(new String[]{
            "/Volumes/media/Pictures/YYMM Svadba/website/Fotografie_files/P4010496.jpg",
            "/Volumes/media/Pictures/2016-inbox/01/Miro iPhone/IMG_2302.JPG",
            "/Volumes/media/Pictures/Maruska - Janka Foto/2012-04/P1030310.JPG",
            "/Volumes/media/Pictures/_YYMM Svadba/website/Fotografie_files/P4010496.jpg",
            "/Volumes/media/Pictures/YYMM Svadba/_website/Fotografie_files/P4010496.jpg",
            "/Volumes/media/Pictures/YYMM Svadba/website/_Fotografie_files/P4010496.jpg",
            "/Volumes/media/Pictures/YYMM Svadba/website/Fotografie_files/_P4010496.jpg",
            "/Volumes/media/Pictures/.YYMM Svadba/website/Fotografie_files/P4010496.jpg",
            "/Volumes/media/Pictures/YYMM Svadba/.website/Fotografie_files/P4010496.jpg",
            "/Volumes/media/Pictures/YYMM Svadba/website/.Fotografie_files/P4010496.jpg",
            "/Volumes/media/Pictures/YYMM Svadba/website/Fotografie_files/.P4010496.jpg",
        }).stream().forEach(picFileName -> {
            assertFalse(picFileName, PictureControl.isImage(Paths.get(picFileName), PHOTO_PATH));
        });
    }

//    @Test
    public void isImage() throws Exception {
        Arrays.asList(new String[]{
            "/Volumes/media/Pictures/2014/1201 Deti/photo.Png",
            "/Volumes/media/Pictures/2089/1202 Vianoce/IMG_2302.JPG",
            "/Volumes/media/Pictures/2012/1203 Maruska/IMG_0126.JPG"
        }).stream().forEach(picFileName -> {
            assertTrue(picFileName, PictureControl.isImage(Paths.get(picFileName), PHOTO_PATH));
        });
    }

    @Test
    public void isNotHidden() throws Exception {
        Arrays.asList(new String[]{
            "/Volumes/media/Pictures/YYMM Svadba/website/Fotografie_files/P4010496.jpg",
            "/Volumes/media/Pictures/2016-inbox/01/Miro iPhone/IMG_2302.JPG",
            "/Volumes/media/Pictures/Maruska - Janka Foto/2012-04/P1030310.JPG",
            "/Volumes/media/Pictures/2014/01 Deti/photo.Png",
            "/Volumes/media/Pictures/2089/12 Vianoce/IMG_2302.JPG"
        }).stream().forEach(picFileName -> {
            assertFalse(picFileName, PictureControl.isHidden(Paths.get(picFileName)));
        });
    }

    @Test
    public void isHidden() throws Exception {
        Arrays.asList(new String[]{
            "/Volumes/media/Pictures/_YYMM Svadba/website/Fotografie_files/P4010496.jpg",
            "/Volumes/media/Pictures/YYMM Svadba/_website/Fotografie_files/P4010496.jpg",
            "/Volumes/media/Pictures/YYMM Svadba/website/_Fotografie_files/P4010496.jpg",
            "/Volumes/media/Pictures/YYMM Svadba/website/Fotografie_files/_P4010496.jpg",
            "/Volumes/media/Pictures/.YYMM Svadba/website/Fotografie_files/P4010496.jpg",
            "/Volumes/media/Pictures/YYMM Svadba/.website/Fotografie_files/P4010496.jpg",
            "/Volumes/media/Pictures/YYMM Svadba/website/.Fotografie_files/P4010496.jpg",
            "/Volumes/media/Pictures/YYMM Svadba/website/Fotografie_files/.P4010496.jpg"
        }).stream().forEach(picFileName -> {
            assertTrue(picFileName, PictureControl.isHidden(Paths.get(picFileName)));
        });
    }
}<commit_msg>PHOTO_PATH used as a prefix in tests<commit_after>package com.zemiak.nasphotos.files;

import java.nio.file.Paths;
import java.util.Arrays;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

public class PictureControlTest {
    private final static String PHOTO_PATH = "/Volumes/media/Pictures/";

    @Test
    public void isNotImage() throws Exception {
        Arrays.asList(new String[]{
            PHOTO_PATH + "YYMM Svadba/website/Fotografie_files/P4010496.jpg",
            PHOTO_PATH + "2016-inbox/01/Miro iPhone/IMG_2302.JPG",
            PHOTO_PATH + "Maruska - Janka Foto/2012-04/P1030310.JPG",
            PHOTO_PATH + "_YYMM Svadba/website/Fotografie_files/P4010496.jpg",
            PHOTO_PATH + "YYMM Svadba/_website/Fotografie_files/P4010496.jpg",
            PHOTO_PATH + "YYMM Svadba/website/_Fotografie_files/P4010496.jpg",
            PHOTO_PATH + "YYMM Svadba/website/Fotografie_files/_P4010496.jpg",
            PHOTO_PATH + ".YYMM Svadba/website/Fotografie_files/P4010496.jpg",
            PHOTO_PATH + "YYMM Svadba/.website/Fotografie_files/P4010496.jpg",
            PHOTO_PATH + "YYMM Svadba/website/.Fotografie_files/P4010496.jpg",
            PHOTO_PATH + "YYMM Svadba/website/Fotografie_files/.P4010496.jpg",
        }).stream().forEach(picFileName -> {
            assertFalse(picFileName, PictureControl.isImage(Paths.get(picFileName), PHOTO_PATH));
        });
    }

//    @Test
    public void isImage() throws Exception {
        Arrays.asList(new String[]{
            PHOTO_PATH + "2014/1201 Deti/photo.Png",
            PHOTO_PATH + "2089/1202 Vianoce/IMG_2302.JPG",
            PHOTO_PATH + "2012/1203 Maruska/IMG_0126.JPG"
        }).stream().forEach(picFileName -> {
            assertTrue(picFileName, PictureControl.isImage(Paths.get(picFileName), PHOTO_PATH));
        });
    }

    @Test
    public void isNotHidden() throws Exception {
        Arrays.asList(new String[]{
            PHOTO_PATH + "YYMM Svadba/website/Fotografie_files/P4010496.jpg",
            PHOTO_PATH + "2016-inbox/01/Miro iPhone/IMG_2302.JPG",
            PHOTO_PATH + "Maruska - Janka Foto/2012-04/P1030310.JPG",
            PHOTO_PATH + "2014/01 Deti/photo.Png",
            PHOTO_PATH + "2089/12 Vianoce/IMG_2302.JPG"
        }).stream().forEach(picFileName -> {
            assertFalse(picFileName, PictureControl.isHidden(Paths.get(picFileName)));
        });
    }

    @Test
    public void isHidden() throws Exception {
        Arrays.asList(new String[]{
            PHOTO_PATH + "_YYMM Svadba/website/Fotografie_files/P4010496.jpg",
            PHOTO_PATH + "YYMM Svadba/_website/Fotografie_files/P4010496.jpg",
            PHOTO_PATH + "YYMM Svadba/website/_Fotografie_files/P4010496.jpg",
            PHOTO_PATH + "YYMM Svadba/website/Fotografie_files/_P4010496.jpg",
            PHOTO_PATH + ".YYMM Svadba/website/Fotografie_files/P4010496.jpg",
            PHOTO_PATH + "YYMM Svadba/.website/Fotografie_files/P4010496.jpg",
            PHOTO_PATH + "YYMM Svadba/website/.Fotografie_files/P4010496.jpg",
            PHOTO_PATH + "YYMM Svadba/website/Fotografie_files/.P4010496.jpg"
        }).stream().forEach(picFileName -> {
            assertTrue(picFileName, PictureControl.isHidden(Paths.get(picFileName)));
        });
    }
}
{'fraction_non_alphanumeric': 0.12456697459584296, 'fraction_numerical': 0.06351039260969978, 'mean_word_length': 2.7637153720803913, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '6647094', 'n_tokens_mistral': 2684, 'n_tokens_neox': 2401, 'n_words': 283}