<commit_before>/*
  Jar Jar Links - A utility to repackage and embed Java libraries
  Copyright (C) 2004  Tonic Systems, Inc.

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; see the file COPYING.  if not, write to
  the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  Boston, MA 02111-1307 USA
*/

package com.tonicsystems.jarjar;

import java.util.*;
import java.util.zip.*;
import java.io.*;
import java.util.jar.*;

class ClassPathIterator implements Iterator
{
    private LinkedList parts = new LinkedList();

    private static final FileFilter FILTER = new FileFilter() {
        public boolean accept(File pathname) {
            return pathname.isDirectory() || isClassFile(getName(pathname));
        }
    };

    private File parent;
    private Enumeration entries;
    private Map sources = new HashMap();
    private ZipFile zip;
    private Object next;

    public ClassPathIterator(String classPath) {
        this(new File(System.getProperty("user.dir")), classPath);
    }
    
    public ClassPathIterator(File parent, String classPath) {
        this.parent = parent;
        StringTokenizer st = new StringTokenizer(classPath, ":");
        while (st.hasMoreTokens()) {
            parts.add(st.nextElement());
        }
        advance();
    }

    public boolean hasNext() {
        return next != null;
    }

    public void close() throws IOException {
        if (sources != null) {
            for (Iterator it = sources.values().iterator(); it.hasNext();) {
                Object obj = it.next();<commit_msg>change ClassPathIterator to use system line.separator<commit_after>/*
  Jar Jar Links - A utility to repackage and embed Java libraries
  Copyright (C) 2004  Tonic Systems, Inc.

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; see the file COPYING.  if not, write to
  the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  Boston, MA 02111-1307 USA
*/

package com.tonicsystems.jarjar;

import java.util.*;
import java.util.zip.*;
import java.io.*;
import java.util.jar.*;

class ClassPathIterator implements Iterator
{
    private LinkedList parts = new LinkedList();

    private static final FileFilter FILTER = new FileFilter() {
        public boolean accept(File pathname) {
            return pathname.isDirectory() || isClassFile(getName(pathname));
        }
    };

    private File parent;
    private Enumeration entries;
    private Map sources = new HashMap();
    private ZipFile zip;
    private Object next;

    public ClassPathIterator(String classPath) {
        this(new File(System.getProperty("user.dir")), classPath);
    }
    
    public ClassPathIterator(File parent, String classPath) {
        this.parent = parent;
        StringTokenizer st = new StringTokenizer(classPath, System.getProperty("path.separator"));
        while (st.hasMoreTokens()) {
            parts.add(st.nextElement());
        }
        advance();
    }

    public boolean hasNext() {
        return next != null;
    }

    public void close() throws IOException {
        if (sources != null) {
            for (Iterator it = sources.values().iterator(); it.hasNext();) {
                Object obj = it.next();
{'fraction_non_alphanumeric': 0.08116349988271171, 'fraction_numerical': 0.008913910391742904, 'mean_word_length': 2.9962511715089035, 'pattern_counts': {'":': 1, '<': 3, '<?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': '4554187', 'n_tokens_mistral': 1140, 'n_tokens_neox': 1086, 'n_words': 461}