Giter VIP home page Giter VIP logo

deepfl's Introduction

DeepFL

DeepFL is a deep-learning-based fault localization technique. It implements two multi-layer perceptron variants and two recurrent neural networks variants by Tensorflow. The benchmark subject is from Defects4j, which is an open source repository, providing some buggy versions and corresponding fixed versions of different projects. Features of the dataset include different dimensions, e.g., spectrum-based, mutation-based, complexity-based (code metrics) and textual-similarity-based information.

Requirements

  • Python 2/3 with Pandas and Numpy
  • Tensorflow

DataSet

The dataset can be downloaded from an online Cloud Drive. There are six .gz files, each of them represents one setting in our paper as follows:

DeepFL.tar.gz: Dataset with all of four dimensions features above.

CrossDeepFL.tar.gz: Dataset with all of four dimensions features in the cross-project scenario.

DeepFL-Spectrum.tar.gz: Dataset with three dimensions features, i.e.,mutation-based, complexity-based and textual-similarity-based information.

DeepFL-Mutation.tar.gz: Dataset with three dimensions features, i.e.,spectrum-based, complexity-based and textual-similarity-based information.

DeepFL-Metrics.tar.gz: Dataset with three dimensions features, i.e.,spectrum-based, mutation-based and textual-similarity-based information.

DeepFL-Textual.tar.gz: Dataset with three dimensions features, i.e.,spectrum-based, mutation-based and complexity-based information.

Please uncompress .gz files and put them into a user-created folder which can be passed as a parameter for the following command.

Running DeepFL

The command to run DeepFL for each version is as follows:

$ cd DeepFL
$python main.py /absolute/path/to/ParentDirofDataset /absolute/path/to/Result $subject $version $model $tech $loss $epoch $dump_step

Each parameter can be explained as follows:

  1. /absolute/path/to/ParentDirofDataset: The absolute path of the parent directory including all datasets, for example, if the dataset is DeepFL, its directory can be /home/DeepLearningData/DeepFL ("/home/DeepLearningData/" is created by users, and "DeepFL" is put into it)
  2. /absolute/path/to/Result: The directory of the results.
  3. $subject: The subject name, which can be Time, Chart, Lang, Math, Mockito or Closure.
  4. $version: The version number of the subject. Note that, the maximum numbers of subjects above are 27, 26, 65, 106, 38, 133, respectively.
  5. $model: The implemented model name, which can be mlp, mlp2, rnn, birnn, representing multi-layer perceptron with one hidden layer, multi-layer perceptron with two hidden layers, recurrent neural network and Bidirectional recurrent neural network respectively.
  6. $tech: The different dimensions of features, corresponding to the name of dataset, can be DeepFL, DeepFL-Metrics, DeepFL-Mutation, DeepFL-Spectrum, DeepFL-Textual, CrossDeepFL.
  7. $loss: The name of loss function, which can be softmax, epairwise, epairwiseSoftmax.
  8. $epoch: The number of training epochs.
  9. $dupm_step: The interval number of epoch in which the result will be stored into the result file. For example, if $dump_step = 10, the results in epochs 10, 20, 30... will be written into the files.

Results statistics

After running all subject versions, run the following command to calculate the five measurements Top-1, Top-3, Top-5, MFR, MAR:

python rank_parser.py /absolute/path/to/ParentDirofDataset /absolute/path/to/Result $tech $model $loss $epoch

Please note that due to the randomly initialized parameters, the results may be slightly different from our paper.

deepfl's People

Contributors

archive10 avatar deeplearningfl avatar

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.