<commit_before>#!/usr/local/bin/perl -w
#
# Dump a java .class file to stdout
#

#
# Copyright (c) 1999 University of Utah CSL.
#
# This file 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, or (at your option)
# any later version.
#
# Written by <NAME> <<EMAIL>>
#

use JavaClass;

# Control the verbosity of &printClass()
$JavaClass::detailedFields = 0;
$JavaClass::detailedMethods = 0;

## Parse the command line
my $classFile = shift  || &usage();

## Read/parse the class file
my $class = &JavaClass::readClass($classFile);

## Print the class filea
&JavaClass::printClass($class);

###
###
###

sub usage() {
  print STDOUT "Usage:\n";
  print STDOUT "    dumpClass.pl <ClassFile>\n\n";
  print STDOUT "    Note that '.class' will be appended if it is not specified in the file name.\n";<commit_msg>added clever fix such that it works from any directory no matter where perl is installed.<commit_after>#!/bin/sh
#
# Dump a java .class file to stdout
#
#
# Copyright (c) 1999 University of Utah CSL.
#
# This file 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, or (at your option)
# any later version.
#
# Written by <NAME> <<EMAIL>>
#

if [ -x /usr/bin/perl ]; then
	PERL=/usr/bin/perl
else
	if [ -x /usr/local/bin/perl ]; then
		PERL=/usr/local/bin/perl
	fi
fi

PERL5INC=`echo "$0" | sed 's,/[^/]*$,,'`  # very portable
$PERL -I $PERL5INC -x $0 ${1+"$@"}
exit

#!perl

use JavaClass;

# Control the verbosity of &printClass()
$JavaClass::detailedFields = 0;
$JavaClass::detailedMethods = 0;

## Parse the command line
my $classFile = shift  || &usage();

## Read/parse the class file
my $class = &JavaClass::readClass($classFile);

## Print the class filea
&JavaClass::printClass($class);

###
###
###

sub usage() {
  print STDOUT "Usage:\n";
  print STDOUT "    dumpClass.pl <ClassFile>\n\n";
  print STDOUT "    Note that '.class' will be appended if it is not specified in the file name.\n";
{'fraction_non_alphanumeric': 0.13657407407407407, 'fraction_numerical': 0.008796296296296297, 'mean_word_length': 3.97926267281106, 'pattern_counts': {'":': 0, '<': 11, '<?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': '1514889', 'n_tokens_mistral': 747, 'n_tokens_neox': 713, 'n_words': 270}