<commit_before>#include <QCoreApplication>
#include <QtCore/QCommandLineParser>
#include <QtCore/QCommandLineOption>
#include "w3cserver.h"
#include <QSettings>
#include <QPointer>
#include <QFileInfo>
#include <QFile>

#include <OpenDSHandler/opendshandler.h>


int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    //initiating QSettings
    QCoreApplication::setApplicationName("W3CServer");
    QCoreApplication::setOrganizationName("MelcoGOT");
    QSettings::setDefaultFormat(QSettings::IniFormat);
    QPointer<QSettings> settings = new QSettings();
    std::auto_ptr<QFileInfo> checkFile(new QFileInfo(settings->fileName()));

    //check if settings file exists on local filesystem otherwise copy
    //the default settings file from resources
    if(!checkFile->isFile())
    {
        //could we copy?
        if (QFile::copy(":/W3CServer.ini",settings->fileName()))
        {
            //waits for settings file to become available and loads content
            while(!checkFile->isFile());<commit_msg>Changed from auto_ptr to QSharedPointer<commit_after>#include <QCoreApplication>
#include <QtCore/QCommandLineParser>
#include <QtCore/QCommandLineOption>
#include "w3cserver.h"
#include <QSettings>
#include <QPointer>
#include <QFileInfo>
#include <QFile>

#include <OpenDSHandler/opendshandler.h>


int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    //initiating QSettings
    QCoreApplication::setApplicationName("W3CServer");
    QCoreApplication::setOrganizationName("MelcoGOT");
    QSettings::setDefaultFormat(QSettings::IniFormat);
    QPointer<QSettings> settings = new QSettings();
    QSharedPointer<QFileInfo> checkFile(new QFileInfo(settings->fileName()));

    //check if settings file exists on local filesystem otherwise copy
    //the default settings file from resources
    if(!checkFile->isFile())
    {
        //could we copy?
        if (QFile::copy(":/W3CServer.ini",settings->fileName()))
        {
            //waits for settings file to become available and loads content
            while(!checkFile->isFile());
{'fraction_non_alphanumeric': 0.12268188302425106, 'fraction_numerical': 0.0028530670470756064, 'mean_word_length': 4.408740359897172, 'pattern_counts': {'":': 2, '<': 23, '<?xml version=': 0, '>': 31, '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': '4114015', 'n_tokens_mistral': 627, 'n_tokens_neox': 624, 'n_words': 145}