<commit_before>function addProjectWidget(id, projectName, projectVersion, projectIcon, projectDir) {
    console.log("addProjectWidget");
    
    var widgetId = "projectWidget_" + id.toString();
    var iconId = "icon_" + id.toString();
    var projectStatusId = "project-status_" + id.toString();
    
    var widgetDOM = "";
    widgetDOM += "<div style='display: table; border-bottom: 1px solid black; width: 100%; height: 130px;' id='" + widgetId + "'>";
    
    widgetDOM += "<div style='display: table-row;'>";
    widgetDOM += "<div style='float:left; display: table-cell;'><img width='128' height='128' src='" + projectIcon + "'></div>";
    widgetDOM += "<div style='float:left; display: table-cell; height: 100%;'>";
    widgetDOM += projectName + "<br>";
    widgetDOM += projectVersion + "<br></div>";
    
    widgetDOM += "<div class='status-field' style='float: right;'>";
    widgetDOM += "<input type='checkbox' disabled='true' id='" + projectStatusId + "' />";
    widgetDOM += "<label for='project-status' id='project-status-label'>&nbsp;</label>";
    widgetDOM += "</div>";
    
    //widgetDOM += "<div style='float:right; display: table-cell; width: 60px; height: 60px; border: 1px solid red;'><span id='" + iconId + "' class='icomatic'>arrowright</span></div>";
    widgetDOM += "</div>";  // row 1
    
    widgetDOM += "<div style='display: table-row;'>";
    widgetDOM += "<div style='width:350px; overflow:hidden; white-space: nowrap;'>" + projectDir + "</div>"; 
    widgetDOM += "</div>";  // row 2
    
    widgetDOM += "</div>";  // table
    
    global.jQuery("#drop_zone").append(widgetDOM);
    
    global.jQuery("#" + widgetId).on("click", function() {
        var temp = global.jQuery("#" + widgetId).attr("id").split("_");
        var id = temp[1];
        <commit_msg>[#49] code clean up & add inline comments<commit_after>function addProjectWidget(id, projectName, projectVersion, projectIcon, projectDir) {
    console.log("addProjectWidget");
    
    var widgetId = "projectWidget_" + id.toString();
    var iconId = "icon_" + id.toString();
    var projectStatusId = "project-status_" + id.toString();
    
    var widgetDOM = "";
    widgetDOM += "<div style='display: table; border-bottom: 1px solid black; width: 100%; height: 130px;' id='" + widgetId + "'>";
    
    widgetDOM += "<div style='display: table-row;'>";
    
    // display the project icon
    widgetDOM += "<div style='float:left; display: table-cell;'><img width='128' height='128' src='" + projectIcon + "'></div>";
    
    // display project info
    widgetDOM += "<div style='float:left; display: table-cell; height: 100%;'>";
    widgetDOM += projectName + "<br>";
    widgetDOM += projectVersion + "<br></div>";
    
    // checkbox indicator used for indicating active project
    widgetDOM += "<div class='status-field' style='float: right;'>";
    widgetDOM += "<input type='checkbox' disabled='true' id='" + projectStatusId + "' />";
    widgetDOM += "<label for='project-status' id='project-status-label'>&nbsp;</label>";
    widgetDOM += "</div>";

    widgetDOM += "</div>";  // row 1
    
    // display project directory
    widgetDOM += "<div style='display: table-row;'>";
    widgetDOM += "<div style='width:350px; overflow:hidden; white-space: nowrap;'>" + projectDir + "</div>"; 
    widgetDOM += "</div>";  // row 2
    
    widgetDOM += "</div>";  // table
    
    global.jQuery("#drop_zone").append(widgetDOM);
    
    global.jQuery("#" + widgetId).on("click", function() {
        var temp = global.jQuery("#" + widgetId).attr("id").split("_");
        var id = temp[1];
        
{'fraction_non_alphanumeric': 0.2000551876379691, 'fraction_numerical': 0.014072847682119206, 'mean_word_length': 3.53125, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, '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': '1649002', 'n_tokens_mistral': 1135, 'n_tokens_neox': 1082, 'n_words': 265}