<commit_before>// java.d.ts
// This file was generated by ts-java.
/// <reference path='../typings/bluebird/bluebird.d.ts' />

declare module Java {
  export type string_t = string | java.lang.String;

  export interface Array<T> extends java.lang.Object {
    // This is an opaque type for a java array T[];
    // Use Java.newArray<T>(className, [...]) to create wherever a Java method expects a T[],
    // most notably for vararg parameteters.
    __dummy: T;
  }

  {{#each this}}
  export import {{shortName}} = {{packageName}}.{{shortName}};
  {{/each}}

  {{#each this}}
  export module {{packageName}} {
    export interface {{shortName}} {{#if tsInterfaces}}extends {{tsInterfaces}}{{/if}} {
      {{#each variants}}
      // {{@key}}
      {{#each this}}
      // {{{generic_proto}}}
      {{#if isStatic}}
      // static method, see {{shortName}}.Static
      {{else}}
      {{name}}Sync({{{margs this}}}): {{tsReturns}};
      {{name}}Promise({{{margs this}}}): Promise<{{tsReturns}}>;
      {{/if}}
      {{/each}}

      {{/each}}
    }
    export module {{shortName}} {
      export interface Static {
        // TODO: add `new` signature for classes with public constructors
        // new (arg0: Type0, ...);
        {{#each variants}}
        {{#each this}}
        {{#if isStatic}}
        // {{{generic_proto}}}
        {{name}}Sync({{{margs this}}}): {{tsReturns}};
        {{name}}Promise({{{margs this}}}): Promise<{{tsReturns}}>;
        {{/if}}
        {{/each}}

        {{/each}}
      }
    }
  }

  {{/each}}
}

declare module 'java' {
  import Promise = require('bluebird');

  interface AsyncOptions {
    promiseSuffix: string;
    promisify: Function;
  }

  // *Singleton* declares methods & members exported by the node java module.
  interface Singleton {
    classpath: string[];
    asyncOptions: AsyncOptions;
    callMethodSync(instance: any, className: string, methodName: string, ...args: any[]): any;
    callStaticMethodSync(className: string, methodName: string, ...args: any[]): any;

    newArray<T>(className: string, arg: any[]): Java.Array<T>;

    {{#each this}}
    import(className: '{{packageName}}.{{shortName}}'): Java.{{packageName}}.{{shortName}}.Static;
    {{/each}}
    import(className: string): any;

    {{#each this}}
    newInstanceSync(className: '{{packageName}}.{{shortName}}', ...args: any[]): Java.{{packageName}}.{{shortName}};
    {{/each}}
    newInstanceSync(className: string, ...args: any[]): any;

    {{#each this}}
    newInstancePromise(className: '{{packageName}}.{{shortName}}', ...args: any[]): Promise<Java.{{packageName}}.{{shortName}}>;
    {{/each}}
    newInstancePromise(className: string, ...args: any[]): any;
  }

  var Java: Singleton;
  export = Java;
}<commit_msg>Reverse order of `Java` and `'java'` modules.<commit_after>// java.d.ts
// This file was generated by ts-java.
/// <reference path='../typings/bluebird/bluebird.d.ts' />

declare module 'java' {
  import Promise = require('bluebird');

  interface AsyncOptions {
    promiseSuffix: string;
    promisify: Function;
  }

  // *Singleton* declares methods & members exported by the node java module.
  interface Singleton {
    classpath: string[];
    asyncOptions: AsyncOptions;
    callMethodSync(instance: any, className: string, methodName: string, ...args: any[]): any;
    callStaticMethodSync(className: string, methodName: string, ...args: any[]): any;

    newArray<T>(className: string, arg: any[]): Java.Array<T>;

    {{#each this}}
    import(className: '{{packageName}}.{{shortName}}'): Java.{{packageName}}.{{shortName}}.Static;
    {{/each}}
    import(className: string): any;

    {{#each this}}
    newInstanceSync(className: '{{packageName}}.{{shortName}}', ...args: any[]): Java.{{packageName}}.{{shortName}};
    {{/each}}
    newInstanceSync(className: string, ...args: any[]): any;

    {{#each this}}
    newInstancePromise(className: '{{packageName}}.{{shortName}}', ...args: any[]): Promise<Java.{{packageName}}.{{shortName}}>;
    {{/each}}
    newInstancePromise(className: string, ...args: any[]): any;
  }

  var Java: Singleton;
  export = Java;
}

declare module Java {
  export type string_t = string | java.lang.String;

  export interface Array<T> extends java.lang.Object {
    // This is an opaque type for a java array T[];
    // Use Java.newArray<T>(className, [...]) to create wherever a Java method expects a T[],
    // most notably for vararg parameteters.
    __dummy: T;
  }

  {{#each this}}
  export import {{shortName}} = {{packageName}}.{{shortName}};
  {{/each}}

  {{#each this}}
  export module {{packageName}} {
    export interface {{shortName}} {{#if tsInterfaces}}extends {{tsInterfaces}}{{/if}} {
      {{#each variants}}
      // {{@key}}
      {{#each this}}
      // {{{generic_proto}}}
      {{#if isStatic}}
      // static method, see {{shortName}}.Static
      {{else}}
      {{name}}Sync({{{margs this}}}): {{tsReturns}};
      {{name}}Promise({{{margs this}}}): Promise<{{tsReturns}}>;
      {{/if}}
      {{/each}}

      {{/each}}
    }
    export module {{shortName}} {
      export interface Static {
        // TODO: add `new` signature for classes with public constructors
        // new (arg0: Type0, ...);
        {{#each variants}}
        {{#each this}}
        {{#if isStatic}}
        // {{{generic_proto}}}
        {{name}}Sync({{{margs this}}}): {{tsReturns}};
        {{name}}Promise({{{margs this}}}): Promise<{{tsReturns}}>;
        {{/if}}
        {{/each}}

        {{/each}}
      }
    }
  }

  {{/each}}
}
{'fraction_non_alphanumeric': 0.20032397408207345, 'fraction_numerical': 0.0007199424046076314, 'mean_word_length': 3.068081991215227, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '1970782', 'n_tokens_mistral': 1753, 'n_tokens_neox': 1706, 'n_words': 436}