<commit_before>"use strict";

var through = require('through');
var gutil = require('gulp-util');
var File = gutil.File;

function emitwebXML(stream, opts) {
    // TODO - replace w/ real template
    var mm = (opts.mimeMapping || []).map(function (mm) {
        return '<mime-mapping>' +
        '<extension>' + mm.extension + '</extension>' +
        '<mime-type>' + mm.type + '</mime-type>' +
        '</mime-mapping>';
    });

    var xml = '<web-app version="' + opts.version + '"' +
    ' xmlns="http://java.sun.com/xml/ns/javaee"' +
    ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +
    ' xsi:schemaLocation="' + opts.schemaLocation + '"' +
    '>\n' +
    '<display-name>' + opts.displayName + '</display-name>\n' +
    '<welcome-file-list>' +
    '<welcome-file>' + opts.welcome + '</welcome-file>' +
    '</welcome-file-list>\n' +
    mm.join('\n');

<commit_msg>Added default values for version and schemaLocation.<commit_after>"use strict";

var through = require('through');
var gutil = require('gulp-util');
var File = gutil.File;

function emitwebXML(stream, opts) {
    // TODO - replace w/ real template
    var mm = (opts.mimeMapping || []).map(function (mm) {
        return '<mime-mapping>' +
        '<extension>' + mm.extension + '</extension>' +
        '<mime-type>' + mm.type + '</mime-type>' +
        '</mime-mapping>';
    });

    var xml = '<web-app version="' + (opts.version || '3.0') + '"' +
    ' xmlns="http://java.sun.com/xml/ns/javaee"' +
    ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +
    ' xsi:schemaLocation="' + (opts.schemaLocation || 'http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd') + '"' +
    '>\n' +
    '<display-name>' + opts.displayName + '</display-name>\n' +
    '<welcome-file-list>' +
    '<welcome-file>' + opts.welcome + '</welcome-file>' +
    '</welcome-file-list>\n' +
    mm.join('\n');


{'fraction_non_alphanumeric': 0.22715404699738903, 'fraction_numerical': 0.007310704960835509, 'mean_word_length': 2.8707070707070708, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 10}, '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': '3029482', 'n_tokens_mistral': 688, 'n_tokens_neox': 671, 'n_words': 113}