<commit_before>
'use strict';

var faker = require('faker');
var express = require('express');
var object2xml = require('object-to-xml');

var PORT = process.env.PORT || 8080;
var response = { code: faker.random.number(), message: faker.lorem.sentence()  };

var app = express();
app.get('/404', function (req, res) {
  res.status(404);
  return res.json(response);
});

app.post('/401', function (req, res) {
  res.status(401);
  return res.json(response);
});

app.get('/json', function (req, res) {
  return res.json(response);
});

app.get('/xml', function (req, res) {
  res.set('Content-type', 'application/json');
  return res.send(object2xml({<commit_msg>fix xml response type<commit_after>
'use strict';

var faker = require('faker');
var express = require('express');
var object2xml = require('object-to-xml');

var PORT = process.env.PORT || 8080;
var response = { code: faker.random.number(), message: faker.lorem.sentence()  };

var app = express();
app.get('/404', function (req, res) {
  res.status(404);
  return res.json(response);
});

app.post('/401', function (req, res) {
  res.status(401);
  return res.json(response);
});

app.get('/json', function (req, res) {
  return res.json(response);
});

app.get('/xml', function (req, res) {
  res.set('Content-type', 'application/xml');
  return res.send(object2xml({
{'fraction_non_alphanumeric': 0.20255063765941486, 'fraction_numerical': 0.02700675168792198, 'mean_word_length': 4.75, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '6220658', 'n_tokens_mistral': 482, 'n_tokens_neox': 457, 'n_words': 108}