<commit_before>/*********************************************************************
 *
 * Copyright (C) 2007,  <NAME>
 *
 * Filename:      javaclass.hh
 * Author:        <NAME> <<EMAIL>>
 * Description:   Java class def
 *
 * $Id:$
 *
 ********************************************************************/
#ifndef __JAVACLASS_HH__
#define __JAVACLASS_HH__

#include <javamethod.hh>
#include <instruction.hh>

class JavaClass : public CodeBlock
{
public:
  JavaClass(const char *name, JavaMethod **methods, int first, int last);

  virtual JavaMethod *getMethodByAddress(uint32_t addr, int *idx);

  virtual JavaMethod *getMethodByAddress(uint32_t addr);

  int getNumberOfMethods()
  {
    return this->n_methods;
  }

  JavaMethod *getMethodByIndex(int idx)
  {
    if (idx < 0 || idx > this->n_methods)
      return NULL;

    return this->methods[idx];
  }

  virtual bool pass1();

  virtual bool pass2();

  const char *getName();

  const char *getFileName()
  {
    return this->filename;
  }

protected:
  int n_methods;
  JavaMethod **methods;
  const char *name;
  char *filename;
};

class CallTableClass : public JavaClass
{
public:
  CallTableClass(const char *name, JavaMethod **methods, int first, int last);

  virtual bool pass1();

  virtual bool pass2();

  virtual JavaMethod *getMethodByAddress(uint32_t addr);

  virtual JavaMethod *getMethodByAddress(uint32_t addr, int *idx);
};

#endif /* !__JAVACLASS_HH__ */
<commit_msg>Added counter for the multi-fn-methods<commit_after>/*********************************************************************
 *
 * Copyright (C) 2007,  <NAME>
 *
 * Filename:      javaclass.hh
 * Author:        <NAME> <<EMAIL>>
 * Description:   Java class def
 *
 * $Id:$
 *
 ********************************************************************/
#ifndef __JAVACLASS_HH__
#define __JAVACLASS_HH__

#include <javamethod.hh>
#include <instruction.hh>

class JavaClass : public CodeBlock
{
public:
  JavaClass(const char *name, JavaMethod **methods, int first, int last);

  virtual JavaMethod *getMethodByAddress(uint32_t addr, int *idx);

  virtual JavaMethod *getMethodByAddress(uint32_t addr);

  int getNumberOfMethods()
  {
    return this->n_methods;
  }

  JavaMethod *getMethodByIndex(int idx)
  {
    if (idx < 0 || idx > this->n_methods)
      return NULL;

    return this->methods[idx];
  }

  virtual bool pass1();

  virtual bool pass2();

  const char *getName();

  const char *getFileName()
  {
    return this->filename;
  }

protected:
  int n_methods;
  int n_multiFunctionMethods; /* Will be placed last in the vector */
  JavaMethod **methods;
  const char *name;
  char *filename;
};

class CallTableClass : public JavaClass
{
public:
  CallTableClass(const char *name, JavaMethod **methods, int first, int last);

  virtual bool pass1();

  virtual bool pass2();

  virtual JavaMethod *getMethodByAddress(uint32_t addr);

  virtual JavaMethod *getMethodByAddress(uint32_t addr, int *idx);
};

#endif /* !__JAVACLASS_HH__ */

{'fraction_non_alphanumeric': 0.197460741730705, 'fraction_numerical': 0.011359839625793518, 'mean_word_length': 4.327402135231317, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 25, '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': '3623315', 'n_tokens_mistral': 975, 'n_tokens_neox': 910, 'n_words': 251}