<commit_before>#if (!macro || !haxe3)
#if (nme || openfl)

import ::APP_MAIN_PACKAGE::::APP_MAIN_CLASS::;
import flash.display.DisplayObject;
import openfl.Assets;
import flash.events.Event;

class ApplicationMain {

	static var mPreloader:::PRELOADER_NAME::;

	public static function main() {
		
		::if (APP_INIT != null)::::APP_INIT::::end::
		
		var call_real = true;
		
		//nme.Lib.setPackage("::APP_COMPANY::", "::APP_FILE::", "::APP_PACKAGE::", "::APP_VERSION::");
		
		::if (PRELOADER_NAME!="")::
		var loaded:Int = flash.Lib.current.loaderInfo.bytesLoaded;
		var total:Int = flash.Lib.current.loaderInfo.bytesTotal;
		
		flash.Lib.current.stage.align = flash.display.StageAlign.TOP_LEFT;
		flash.Lib.current.stage.scaleMode = flash.display.StageScaleMode.NO_SCALE;
		
		if (loaded < total || true) /* Always wait for event */ {
			call_real = false;
			mPreloader = new ::PRELOADER_NAME::();
			flash.Lib.current.addChild(mPreloader);
			mPreloader.onInit();
			mPreloader.onUpdate(loaded,total);
			flash.Lib.current.addEventListener(flash.events.Event.ENTER_FRAME, onEnter);
		}
		::end::
		
		#if !fdb
		haxe.Log.trace = flashTrace;
		#end
		
		if (call_real)
			begin();
	}

	#if !fdb
	private static function flashTrace( v : Dynamic, ?pos : haxe.PosInfos ) {
		var className = pos.className.substr(pos.className.lastIndexOf('.') + 1);
		var message = className+"::"+pos.methodName+":"+pos.lineNumber+": " + v;
		
		if (flash.external.ExternalInterface.available)
			flash.external.ExternalInterface.call("console.log", message);
		else untyped flash.Boot.__trace(v, pos);
    }
	#end

	private static function begin() {
		var hasMain = false;
		
		for (methodName in Type.getClassFields(::APP_MAIN::))
		{
			if (methodName == "main")
			{
				hasMain = true;
				break;
			}
		}
		
		if (hasMain)<commit_msg>I don't know why we are changing the behavior of trace?<commit_after>#if (!macro || !haxe3)
#if (nme || openfl)

import ::APP_MAIN_PACKAGE::::APP_MAIN_CLASS::;
import flash.display.DisplayObject;
import openfl.Assets;
import flash.events.Event;

class ApplicationMain {

	static var mPreloader:::PRELOADER_NAME::;

	public static function main() {
		
		::if (APP_INIT != null)::::APP_INIT::::end::
		
		var call_real = true;
		
		//nme.Lib.setPackage("::APP_COMPANY::", "::APP_FILE::", "::APP_PACKAGE::", "::APP_VERSION::");
		
		::if (PRELOADER_NAME!="")::
		var loaded:Int = flash.Lib.current.loaderInfo.bytesLoaded;
		var total:Int = flash.Lib.current.loaderInfo.bytesTotal;
		
		flash.Lib.current.stage.align = flash.display.StageAlign.TOP_LEFT;
		flash.Lib.current.stage.scaleMode = flash.display.StageScaleMode.NO_SCALE;
		
		if (loaded < total || true) /* Always wait for event */ {
			call_real = false;
			mPreloader = new ::PRELOADER_NAME::();
			flash.Lib.current.addChild(mPreloader);
			mPreloader.onInit();
			mPreloader.onUpdate(loaded,total);
			flash.Lib.current.addEventListener(flash.events.Event.ENTER_FRAME, onEnter);
		}
		::end::
		
		if (call_real)
			begin();
	}

	private static function begin() {
		var hasMain = false;
		
		for (methodName in Type.getClassFields(::APP_MAIN::))
		{
			if (methodName == "main")
			{
				hasMain = true;
				break;
			}
		}
		
		if (hasMain)
{'fraction_non_alphanumeric': 0.1607198262488365, 'fraction_numerical': 0.000930809804529941, 'mean_word_length': 4.085173501577287, 'pattern_counts': {'":': 11, '<': 5, '<?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': '5512490', 'n_tokens_mistral': 1277, 'n_tokens_neox': 1117, 'n_words': 213}