<commit_before># This is the main file that defines the native methods of the various Java
# core libraries that provide the interface between the Doppio JVM and the
# browser
#
# Classes not defined in this file are located in the src/natives/classes
# directory, with a filename that reflects their class and package name
#
# As part of the build process, a file src/natives.coffee is generated by
# concatenating the following files:
#
# 1) src/natives/main.coffee
# 2) Every CoffeeScript file in the src/natives/classes directory
# 3) src/natives/outro.coffee

"use strict"

# pull in external modules
_ = require '../vendor/_.js'
gLong = require '../vendor/gLong.js'
util = require './util'
runtime = require './runtime'
{thread_name,JavaObject,JavaArray} = require './java_object'
exceptions = require './exceptions'
logging = require './logging'
{log,debug,error,trace} = logging
path = node?.path ? require 'path'
fs = node?.fs ? require 'fs'
{ReferenceClassData,PrimitiveClassData,ArrayClassData} = require './ClassData'

# things assigned to root will be available outside this module
root = exports ? this.natives = {}

get_property = (rs, jvm_key, _default = null) ->
  key = jvm_key.<KEY>()
  # jvm is already defined in release mode
  jvm = jvm ? require('./jvm')
  val = jvm.system_properties[key]
  if key is 'java.class.path'  # special case
    # the last path is actually the bootclasspath (vendor/classes/)
    return rs.init_string val[0...val.length-1].join ':'
  if val? then rs.init_string(val, true) else _default

# convenience function. idea taken from coffeescript's grammar
o = (fn_name, fn) -> fn_name: fn_name, fn: fn

trapped_methods =
  java:<commit_msg>one more underscore<commit_after># This is the main file that defines the native methods of the various Java
# core libraries that provide the interface between the Doppio JVM and the
# browser
#
# Classes not defined in this file are located in the src/natives/classes
# directory, with a filename that reflects their class and package name
#
# As part of the build process, a file src/natives.coffee is generated by
# concatenating the following files:
#
# 1) src/natives/main.coffee
# 2) Every CoffeeScript file in the src/natives/classes directory
# 3) src/natives/outro.coffee

"use strict"

# pull in external modules
_ = require '../vendor/underscore/underscore.js'
gLong = require '../vendor/gLong.js'
util = require './util'
runtime = require './runtime'
{thread_name,JavaObject,JavaArray} = require './java_object'
exceptions = require './exceptions'
logging = require './logging'
{log,debug,error,trace} = logging
path = node?.path ? require 'path'
fs = node?.fs ? require 'fs'
{ReferenceClassData,PrimitiveClassData,ArrayClassData} = require './ClassData'

# things assigned to root will be available outside this module
root = exports ? this.natives = {}

get_property = (rs, jvm_key, _default = null) ->
  key = <KEY>
  # jvm is already defined in release mode
  jvm = jvm ? require('./jvm')
  val = jvm.system_properties[key]
  if key is 'java.class.path'  # special case
    # the last path is actually the bootclasspath (vendor/classes/)
    return rs.init_string val[0...val.length-1].join ':'
  if val? then rs.init_string(val, true) else _default

# convenience function. idea taken from coffeescript's grammar
o = (fn_name, fn) -> fn_name: fn_name, fn: fn

trapped_methods =
  java:
{'fraction_non_alphanumeric': 0.1079646017699115, 'fraction_numerical': 0.0029498525073746312, 'mean_word_length': 4.273716951788492, 'pattern_counts': {'":': 0, '<': 5, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4085634', 'n_tokens_mistral': 1035, 'n_tokens_neox': 1018, 'n_words': 379}