Skip to main content

MineCPP - A tool to mine a GitHub repository and obtain a dataset containing a list of bug-fix pairs and related information.

Project description

MineCPP

MineCPP also known as Minecraft++ is an extension of Minecraft

Table of Contents

Introduction

MineCPP - A tool to mine a GitHub repository and obtain a dataset containing a list of bug-fix pairs and related information. The tool, with the argument -U [GitHub URL], mines the repository and provides the output project_name.csv. The schema of project_name.csv contains 17 columns and each row in it represents a potential bug-fix pair.

Getting Started

MineCPP is a python based tool. Make sure python is installed before following the Installation guide.

Installation

MineCPP can be installed with a simple pip command.

# Installation command
pip install minecpp

All the dependencies are taken care by the installation.

Usage

MineCPP comes with three optional arguments:

optional arguments:
  -h, --help  show this help message and exit  
  --version   show version number and exit  
  -u U        Provide the GitHub repo link to anlyse the repository

A GitHub URL of the repository is enough to perform analysis on the repo. Command to run it on repository is:

minecpp -u https://github.com/SET-IITGN/Minecraft

Tool's Output

The output of the tool is a project_name.csv file. The schema of the file is:

  • 'Before Bug fix': Represents the code snippet containing a bug.
  • 'After Bug fix': Represents the code snippet after the bug is fixed.
  • 'Location': Represents the line numbers. The 'after' field represents the line number where the bug is fixed, and 'before' represents the line number where the bug was found.
  • 'Bug type': Represents the type of bug obtained from LLM using the git diff between the fixed commit and the buggy commit.
  • 'Commit Message': Represents the author's description of the commit.
  • 'File Path': Represents the path of the file in which the change is present or the bug is fixed.
  • 'Test File': Denotes whether the test file is present for the bug. Here, 1 represents that the test file is present, and 0 represents that the test file is absent.
  • 'Coding Effort': Represents the effort an author makes before a bug occurs (obtained from the AST of the source code).
  • 'Constructs': Represents the type of constructs in which the bug occurred.
  • 'Lizard Features Buggy': Denotes the cyclomatic complexity of the buggy file.
  • 'Lizard Features Fixed': Denotes the cyclomatic complexity of the bug-fix file.
  • 'BLEU', 'crystalBLEU_score', 'bert_score': Represent three different algorithms that estimate the similarity between buggy and fixed code. The similarity score lies in the range 0 to 1, where 1 indicates similarity, and 0 indicates dissimilarity.

Tool's GUI

The tool also provides a GUI to explore and analyse the dataset. It provides two features

  • Dataset Visualization: This feature is used to view the dataset and it is interactive.
  • Quantitative Analysis: This feature is used to show the quantative analysis of Coding Effort vs Bug-Fix pairs and Similarity Score vs Bug-Fix pairs.

Configuration

Python 3.8 or above
Needs C++ 14

Examples

home dataset plots exit

Contributing

Conrtibutions are accepted. The contributions will be accepted only if they are suitable for the tool.

License

Apache License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

minecpp-0.2.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

minecpp-0.2-py3-none-any.whl (2.4 MB view details)

Uploaded Python 3

File details

Details for the file minecpp-0.2.tar.gz.

File metadata

  • Download URL: minecpp-0.2.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for minecpp-0.2.tar.gz
Algorithm Hash digest
SHA256 eaaf7f0a03518d57e5de80af3b475eb3a7059f422f15d547fc8b10a701153ed0
MD5 b548b225f2c4d174e0407f52999f24e1
BLAKE2b-256 4c191277fc2d82efddfffd3c8cfc9f1d7ffe6820e7bbd33c89de7d0e21a5cf07

See more details on using hashes here.

File details

Details for the file minecpp-0.2-py3-none-any.whl.

File metadata

  • Download URL: minecpp-0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for minecpp-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3c35f6a923381f2bbe388edca44ef57987b9e32e69e1e194f0fe0d3c39782c7c
MD5 ed3b0fc4d3cfcbbc24063bc00fa98afb
BLAKE2b-256 bfadd971c23518b9de353d36bdffe519489f443b66e8fdd287e84b93b6b5f52c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page