<commit_before>$(function(){
//Called in articleDetails.js when DOM is loaded
function onload(){
	 function getFiveProducts() {
		$.ajax({
			url: "/getProducts", 
			type: "GET",
			dataType:"json",
			success: function(data) {
				$.each(data, function(i, article){
					var divArticle = $("<div/>", {class:"article large-4"});
					divArticle.append($("<p/>", {class:"article_name"}).append(article.name));
					divArticle.append($("<img/>", {class:"article_url"}).attr("src", /*article.url*/"http://placekitten.com/200/300"));
					// var imgArticle = '<img src="' + /*article.url*/'http://placekitten.com/200/300' + '" class="article_url"/>';
					divArticle.appendTo($(document.body));
					//au clic sur un article changement de style
					divArticle.on("click", function() {
						$(".article.activity").removeClass("activity");
						$(this).addClass("activity");
					});
				});
			}
		});
	}
	getFiveProducts();

});<commit_msg>cleaning method in application.js<commit_after>$(function(){
//Called in articleDetails.js when DOM is loaded
function onload(){
	 function getFiveProducts() {
		$.ajax({
			url: "/getProducts", 
			type: "GET",
			dataType:"json",
			success: function(data) {
				$.each(data, function(i, article){
					var divArticle = $("<div/>", {class:"article large-4"});
					divArticle.append($("<p/>", {class:"article_name"}).append(article.name));
					divArticle.append($("<img/>", {class:"article_url"}).attr("src", article.url));
					// var imgArticle = '<img src="' + /*article.url*/'http://placekitten.com/200/300' + '" class="article_url"/>';
					divArticle.appendTo($(document.body));
					//au clic sur un article changement de style
					divArticle.on("click", function() {
						$(".article.activity").removeClass("activity");
						$(this).addClass("activity");
					});
				});
			}
		});
	}
	getFiveProducts();

});
{'fraction_non_alphanumeric': 0.22049356223175964, 'fraction_numerical': 0.01072961373390558, 'mean_word_length': 3.806701030927835, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3389018', 'n_tokens_mistral': 737, 'n_tokens_neox': 576, 'n_words': 109}