<commit_before>/*************************************************************************** 
** 
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 
** All rights reserved. 
** Contact: Nokia Corporation (<EMAIL>) 
** 
** This file is part of Testability Driver Qt Agent
** 
** If you have questions regarding the use of this file, please contact 
** Nokia at <EMAIL> . 
** 
** This library is free software; you can redistribute it and/or 
** modify it under the terms of the GNU Lesser General Public 
** License version 2.1 as published by the Free Software Foundation 
** and appearing in the file LICENSE.LGPL included in the packaging 
** of this file. 
** 
****************************************************************************/ 
 

#include "tasmessages.h"
#include "tassocket.h"
#include "taslogger.h"

TasMessage::TasMessage()
{
    mCompressed = false;
}

TasMessage::TasMessage(quint8 flag, bool compressed, const QByteArray& data, qint32 messageId)
{
    mCompressed = false;
    mMessageId = messageId;
    setFlag(flag);
    setData(data, compressed);
}

TasMessage::~TasMessage()
{
    mData.clear();
}


void TasMessage::setFlag(quint8 flag)
{
    mFlag = flag;
}

void TasMessage::setIsCompressed(bool compressed)
{
    mCompressed = compressed;
}

QByteArray& TasMessage::data()
{
    return mData;<commit_msg>Now construcors initialize all members (especially mIsError was missing).<commit_after>/*************************************************************************** 
** 
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 
** All rights reserved. 
** Contact: Nokia Corporation (<EMAIL>) 
** 
** This file is part of Testability Driver Qt Agent
** 
** If you have questions regarding the use of this file, please contact 
** Nokia at <EMAIL> . 
** 
** This library is free software; you can redistribute it and/or 
** modify it under the terms of the GNU Lesser General Public 
** License version 2.1 as published by the Free Software Foundation 
** and appearing in the file LICENSE.LGPL included in the packaging 
** of this file. 
** 
****************************************************************************/ 
 

#include "tasmessages.h"
#include "tassocket.h"
#include "taslogger.h"

TasMessage::TasMessage() :
    mFlag(0)
  , mCompressed(false)
  , mMessageId(0)
  , mIsError(false)
{
}

TasMessage::TasMessage(quint8 flag, bool compressed, const QByteArray& data, qint32 messageId) :
    mFlag(0)
  , mCompressed(false)
  , mMessageId(messageId)
  , mIsError(false)
{
    setFlag(flag);
    setData(data, compressed);
}

TasMessage::~TasMessage()
{
    mData.clear();
}


void TasMessage::setFlag(quint8 flag)
{
    mFlag = flag;
}

void TasMessage::setIsCompressed(bool compressed)
{
    mCompressed = compressed;
}

QByteArray& TasMessage::data()
{
    return mData;
{'fraction_non_alphanumeric': 0.20751404494382023, 'fraction_numerical': 0.008075842696629214, 'mean_word_length': 4.732394366197183, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6252016', 'n_tokens_mistral': 895, 'n_tokens_neox': 829, 'n_words': 259}