Giter Site home page Giter Site logo

ffl's Introduction

FFL

Dataset Downloads

Extract the 2 dataset into data_codeflaws and data_nbl respectively

Environment:

The following dependencies are required to train or run the model:

  • pytorch (1.6.0+)
  • fasttext (0.9.2)
  • dgl (1.6.0)
  • networkx (2.5.1)

Optional (for visualization):

  • pygraphviz and graphviz

Java: version 1.11+

Extract jars.zip into folder jars

Training:

# Codeflaws node-level
python3 -m codeflaws.train_nx_a_nc_cfl
# NBL node-level
python3 -m nbl.train_nx_a_nc

# Codeflaws statement-level
python3 -m codeflaws.train_nx_astdiff_nocontent_gumtree
# Prutor statement-level
python3 -m nbl.train_nx_astdiff_nocontent_gumtree

Evaluation

The training script already contain evaluation, by disabling train() procedure, the script will script directly to evaluation. Copy the pretrained model into train_dirs in the configured utils/utils.py for evaluate.

Pretrained model:

Others

Please note that while this is not required in our original settings, codebert pretrain file can be placed in preprocess folder for each AST content to be used instead of just nodetype.

ffl's People

Contributors

ffl2022 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.