<commit_before>//  Copyright 2002-2014, University of Colorado Boulder

/**
 * When media files (images, audio) are loaded by the plugins, we also check to see that their license is compatible with
 * PhET licensing, and register each entry with a global so that a report can be produced after the build.  This
 * code was factored out in #229.
 *
 * @author <NAME> (PhET Interactive Simulations)
 */
'use strict';
(function() {

  var checkAndRegisterLicenseEntry = function( name, path, brand, mediaType, onload, getLicenseEntry, isAcceptableLicenseEntry ) {

    var licenseEntry = getLicenseEntry( path );
    if ( isAcceptableLicenseEntry( name, licenseEntry, brand ) ) {
      global.phet.chipper.licenseEntries[ mediaType ] = global.phet.chipper.licenseEntries[ mediaType ] || {};
      global.phet.chipper.licenseEntries[ mediaType ][ name ] = licenseEntry;
      onload( null );
    }
    else {
      onload.error( new Error( 'unacceptable license entry for ' + path ) );
    }
  };

  // browser require.js-compatible definition
  if ( typeof define !== 'undefined' ) {
    define( function() {
      return checkAndRegisterLicenseEntry;
    } );
  }

  // Node.js-compatible definition
  if ( typeof module !== 'undefined' ) {
    module.exports = checkAndRegisterLicenseEntry;
  }
})();<commit_msg>Moved 'use strict' into the function declaration to resolve lint issue, see #229<commit_after>//  Copyright 2002-2014, University of Colorado Boulder

/**
 * When media files (images, audio) are loaded by the plugins, we also check to see that their license is compatible with
 * PhET licensing, and register each entry with a global so that a report can be produced after the build.  This
 * code was factored out in #229.
 *
 * @author <NAME> (PhET Interactive Simulations)
 */
(function() {
  'use strict';

  var checkAndRegisterLicenseEntry = function( name, path, brand, mediaType, onload, getLicenseEntry, isAcceptableLicenseEntry ) {

    var licenseEntry = getLicenseEntry( path );
    if ( isAcceptableLicenseEntry( name, licenseEntry, brand ) ) {
      global.phet.chipper.licenseEntries[ mediaType ] = global.phet.chipper.licenseEntries[ mediaType ] || {};
      global.phet.chipper.licenseEntries[ mediaType ][ name ] = licenseEntry;
      onload( null );
    }
    else {
      onload.error( new Error( 'unacceptable license entry for ' + path ) );
    }
  };

  // browser require.js-compatible definition
  if ( typeof define !== 'undefined' ) {
    define( function() {
      return checkAndRegisterLicenseEntry;
    } );
  }

  // Node.js-compatible definition
  if ( typeof module !== 'undefined' ) {
    module.exports = checkAndRegisterLicenseEntry;
  }
})();
{'fraction_non_alphanumeric': 0.10702341137123746, 'fraction_numerical': 0.00929022668153103, 'mean_word_length': 3.58603066439523, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5904434', 'n_tokens_mistral': 778, 'n_tokens_neox': 741, 'n_words': 250}