Giter Site home page Giter Site logo

msintaha / bugclassificationwithgnn Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 192.2 MB

A graph based bug classifier using the dgl library and DeepBugs dataset

Python 96.64% Jupyter Notebook 3.36%
homogenous-graphs graphs classifier dgl ml4code bug-detection

bugclassificationwithgnn's Introduction

Bug Patterns' Graphs

https://drive.google.com/file/d/1h8JQwkDN2E7QrHH-YgVYscMF1T2xa54E/view?usp=sharing

Installation instructions

  • Create a virtualenv using pyenv of python 3.7.1
> pip install virtualenv
> virtualenv venv
> source venv/bin/activate
  • Run pip3 install -r requirements.txt to install packages inside the virtualenv
  • Unzip ALL the tar.gz files

How to run

There are 3 args that you need to set. The --bug_type, --use_deepbugs_embeddings and --dataset_size in order to run the classifiers. The arg choices are listed in the respective classifier files. To run with full dataset, replace --dataset_size=mini with --dataset_size=full

GAT Classifier on Homogenous graphs for each bug pattern

  • python3 gat_classifier.py --bug_type=incorrect_binary_operand --use_deepbugs_embeddings=True --dataset_size=mini
  • python3 gat_classifier.py --bug_type=incorrect_binary_operator --use_deepbugs_embeddings=True --dataset_size=mini
  • python3 gat_classifier.py --bug_type=swapped_args --use_deepbugs_embeddings=True --dataset_size=mini

GCN Classifier on Homogenous graphs for each bug pattern

  • python3 gcn_classifier.py --bug_type=incorrect_binary_operand --use_deepbugs_embeddings=True --dataset_size=mini
  • python3 gcn_classifier.py --bug_type=incorrect_binary_operator --use_deepbugs_embeddings=True --dataset_size=mini
  • python3 gcn_classifier.py --bug_type=swapped_args --use_deepbugs_embeddings=True --dataset_size=mini

RGCN Classifier on Heterogenous graphs

In heterographs, the classifier has to be run separately for each bug pattern.

  • For incorrect binary operand related bugs: python3 rgcn_classifier_heterographs.py --bug_type=incorrect_binary_operand --use_deepbugs_embeddings=True --dataset_size=mini
  • For incorrect binary operator related bugs: python3 rgcn_classifier_heterographs.py --bug_type=incorrect_binary_operator --use_deepbugs_embeddings=True --dataset_size=mini
  • For swapped args bug: python3 rgcn_classifier_heterographs.py --bug_type=swapped_args --use_deepbugs_embeddings=True --dataset_size=mini

bugclassificationwithgnn's People

Contributors

makhshari avatar msintaha avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

makhshari

bugclassificationwithgnn's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.