<commit_before>#include <cassert>
#include <stdexcept>
#include <iostream>
#include <sstream>

#include <unistd.h>
#include <dirent.h>

using namespace std;

#include <xmlrpc-c/base.hpp>
#include <xmlrpc-c/registry.hpp>
#include <xmlrpc-c/server_abyss.hpp>
#include "mysql/mysql.h"
#include <mysql/errmsg.h>

class ERSLogAcquisitionMethod : public xmlrpc_c::method {
public:
	ERSLogAcquisitionMethod() {
        // signature and help strings are documentation -- the client
        // can query this information with a system.methodSignature and
        // system.methodHelp RPC.
        this->_signature = "i:ii";
            // method's result and two arguments are integers
        this->_help = "ERSLogAcquisitionMethod";
    }
    void
    execute(xmlrpc_c::paramList const& paramList,
            xmlrpc_c::value *   const  retvalP) ;

	string get_file_contents(const char *filename);


};

class ERSSecretRetrivalMethod : public xmlrpc_c::method {
public:
	ERSSecretRetrivalMethod(MYSQL* localdb): sdb(localdb){
        // signature and help strings are documentation -- the client
        // can query this information with a system.methodSignature and
        // system.methodHelp RPC.
        this->_signature = "i:ii";
            // method's result and two arguments are integers
        this->_help = "ERSSecretRetrivalMethod";
    }
    void
    execute(xmlrpc_c::paramList const& paramList,
            xmlrpc_c::value *   const  retvalP) ;

private:
    MYSQL* sdb;

};

class ERSGetFileListMethod : public xmlrpc_c::method {
public:
	ERSGetFileListMethod(){

        this->_signature = "i:ii";
            // method's result and two arguments are integers
        this->_help = "ERSGetFileListMethod";
    }
    void
    execute(xmlrpc_c::paramList const& paramList,
            xmlrpc_c::value *   const  retvalP) ;

};

class ERSService
{
public:

	ERSService(){
		cout <<  "ERS Version 1.1" << endl;
<commit_msg>correct ERS version<commit_after>#include <cassert>
#include <stdexcept>
#include <iostream>
#include <sstream>

#include <unistd.h>
#include <dirent.h>

using namespace std;

#include <xmlrpc-c/base.hpp>
#include <xmlrpc-c/registry.hpp>
#include <xmlrpc-c/server_abyss.hpp>
#include "mysql/mysql.h"
#include <mysql/errmsg.h>

class ERSLogAcquisitionMethod : public xmlrpc_c::method {
public:
	ERSLogAcquisitionMethod() {
        // signature and help strings are documentation -- the client
        // can query this information with a system.methodSignature and
        // system.methodHelp RPC.
        this->_signature = "i:ii";
            // method's result and two arguments are integers
        this->_help = "ERSLogAcquisitionMethod";
    }
    void
    execute(xmlrpc_c::paramList const& paramList,
            xmlrpc_c::value *   const  retvalP) ;

	string get_file_contents(const char *filename);


};

class ERSSecretRetrivalMethod : public xmlrpc_c::method {
public:
	ERSSecretRetrivalMethod(MYSQL* localdb): sdb(localdb){
        // signature and help strings are documentation -- the client
        // can query this information with a system.methodSignature and
        // system.methodHelp RPC.
        this->_signature = "i:ii";
            // method's result and two arguments are integers
        this->_help = "ERSSecretRetrivalMethod";
    }
    void
    execute(xmlrpc_c::paramList const& paramList,
            xmlrpc_c::value *   const  retvalP) ;

private:
    MYSQL* sdb;

};

class ERSGetFileListMethod : public xmlrpc_c::method {
public:
	ERSGetFileListMethod(){

        this->_signature = "i:ii";
            // method's result and two arguments are integers
        this->_help = "ERSGetFileListMethod";
    }
    void
    execute(xmlrpc_c::paramList const& paramList,
            xmlrpc_c::value *   const  retvalP) ;

};

class ERSService
{
public:

	ERSService(){
	cout <<  "ERS Version 1.1" << endl;

{'fraction_non_alphanumeric': 0.10803825277849574, 'fraction_numerical': 0.001033858878263117, 'mean_word_length': 3.0228690228690227, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 24}, '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': '3163426', 'n_tokens_mistral': 1219, 'n_tokens_neox': 1177, 'n_words': 304}