<commit_before>/*!
 * Annotations Support for Patterns - v0.3
 *
 * Copyright (c) 2013-2014 <NAME>, http://dmolsen.com
 * Licensed under the MIT license
 *
 */

var annotationsPattern = {
	
	commentsOverlayActive:  false,
	commentsOverlay:        false,
	commentsEmbeddedActive: false,
	commentsEmbedded:       false,
	commentsGathered:       { "commentOverlay": "on", "count": 0, "comments": { } },
	
	/**
	* record which annotations are related to this pattern so they can be sent to the viewer when called
	*/
	gatherComments: function() {
		
		// make sure this only added when we're on a pattern specific view
		if (document.getElementById("sg-patterns") === null) {
			
			var count = 0;
			
			for (comment in comments.comments) {
				var item = comments.comments[comment];
				var els  = document.querySelectorAll(item.el);
				if (els.length > 0) {
					
					count++;
					item.displaynumber = count;
					
					for (var i = 0; i < els.length; ++i) {
						els[i].onclick = (function(item) {
							return function(e) {
								e.preventDefault();
								e.stopPropagation();
								var obj = {};
								
								// if an element was clicked on while the overlay was already on swap it
								obj = { "displaynumber": item.displaynumber, "el": item.el, "title": item.title, "comment": item.comment };
								
								var targetOrigin = (window.location.protocol == "file:") ? "*" : window.location.protocol+"//"+window.location.host;
								parent.postMessage(obj,targetOrigin);
								
							}
						})(item);

					}
				}
				
				
			}
						
		} else {<commit_msg>fixing a spacing issue<commit_after>/*!
 * Annotations Support for Patterns - v0.3
 *
 * Copyright (c) 2013-2014 <NAME>, http://dmolsen.com
 * Licensed under the MIT license
 *
 */

var annotationsPattern = {
	
	commentsOverlayActive:  false,
	commentsOverlay:        false,
	commentsEmbeddedActive: false,
	commentsEmbedded:       false,
	commentsGathered:       { "commentOverlay": "on", "count": 0, "comments": { } },
	
	/**
	* record which annotations are related to this pattern so they can be sent to the viewer when called
	*/
	gatherComments: function() {
		
		// make sure this only added when we're on a pattern specific view
		if (document.getElementById("sg-patterns") === null) {
			
			var count = 0;
			
			for (comment in comments.comments) {
				var item = comments.comments[comment];
				var els  = document.querySelectorAll(item.el);
				if (els.length > 0) {
					
					count++;
					item.displaynumber = count;
					
					for (var i = 0; i < els.length; ++i) {
						els[i].onclick = (function(item) {
							return function(e) {
								e.preventDefault();
								e.stopPropagation();
								var obj = {};
								
								// if an element was clicked on while the overlay was already on swap it
								obj = { "displaynumber": item.displaynumber, "el": item.el, "title": item.title, "comment": item.comment };
								
								var targetOrigin = (window.location.protocol == "file:") ? "*" : window.location.protocol+"//"+window.location.host;
								parent.postMessage(obj,targetOrigin);
								
							}
						})(item);
						
					}
				}
				
				
			}
						
		} else {
{'fraction_non_alphanumeric': 0.12982126058325494, 'fraction_numerical': 0.008780181875195987, 'mean_word_length': 2.4154175588865097, 'pattern_counts': {'":': 14, '<': 7, '<?xml version=': 0, '>': 7, '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': '3006853', 'n_tokens_mistral': 1296, 'n_tokens_neox': 923, 'n_words': 267}