<commit_before>package com.mysema.stat.scovo;

import com.mysema.commons.lang.Assert;

public final class XMLID {

    public static class CharRange {
        private char start;
        private char end;
        public CharRange(char ch) {
            this(ch, ch);
        }
        public CharRange(char start, char end) {
            Assert.assertThat(start <= end, "invalid range", null, null);
            this.start = start;
            this.end = end;
        }
        public boolean contains(char ch) {
            return start <= ch && ch <= end;
        }
    }
    
    public static class CharRanges {
        private CharRanges[] nestedRanges;
        private CharRange[] ranges;
        public CharRanges(CharRanges... nestedRanges) {
            this(nestedRanges, (CharRange[]) null);
        }
        public CharRanges(CharRange... ranges) {
            this((CharRanges[]) null, ranges);
        }
        public CharRanges(CharRanges nestedRange, CharRange... ranges) {
            this(new CharRanges[] {nestedRange}, ranges);
        }
        public CharRanges(CharRanges[] nestedRanges, CharRange... ranges) {
            this.nestedRanges = nestedRanges;
            this.ranges = ranges;
        }
        public boolean contains(char ch) {
            if (nestedRanges != null) {
                for (CharRanges ranges : nestedRanges) {
                    if (ranges.contains(ch)) {
                        return true;
                    }
                }
            }
            if (ranges != null) {
                for (CharRange range : ranges) {
                    if (range.contains(ch)) {
                        return true;
                    }
                }
            }
            return false;
        }
    }
    
    public static CharRange range(char ch) {
        return new CharRange(ch);
    }<commit_msg>renamed loop variable to avoid name clash<commit_after>package com.mysema.stat.scovo;

import com.mysema.commons.lang.Assert;

public final class XMLID {

    public static class CharRange {
        private char start;
        private char end;
        public CharRange(char ch) {
            this(ch, ch);
        }
        public CharRange(char start, char end) {
            Assert.assertThat(start <= end, "invalid range", null, null);
            this.start = start;
            this.end = end;
        }
        public boolean contains(char ch) {
            return start <= ch && ch <= end;
        }
    }
    
    public static class CharRanges {
        private CharRanges[] nestedRanges;
        private CharRange[] ranges;
        public CharRanges(CharRanges... nestedRanges) {
            this(nestedRanges, (CharRange[]) null);
        }
        public CharRanges(CharRange... ranges) {
            this((CharRanges[]) null, ranges);
        }
        public CharRanges(CharRanges nestedRange, CharRange... ranges) {
            this(new CharRanges[] {nestedRange}, ranges);
        }
        public CharRanges(CharRanges[] nestedRanges, CharRange... ranges) {
            this.nestedRanges = nestedRanges;
            this.ranges = ranges;
        }
        public boolean contains(char ch) {
            if (nestedRanges != null) {
                for (CharRanges r : nestedRanges) {
                    if (r.contains(ch)) {
                        return true;
                    }
                }
            }
            if (ranges != null) {
                for (CharRange range : ranges) {
                    if (range.contains(ch)) {
                        return true;
                    }
                }
            }
            return false;
        }
    }
    
    public static CharRange range(char ch) {
        return new CharRange(ch);
    }
{'fraction_non_alphanumeric': 0.09488272921108742, 'fraction_numerical': 0.0, 'mean_word_length': 1.4197292069632494, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, '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': '5135767', 'n_tokens_mistral': 988, 'n_tokens_neox': 963, 'n_words': 252}