Giter Site home page Giter Site logo

mast-group / clams Goto Github PK

View Code? Open in Web Editor NEW
8.0 9.0 1.0 73.21 MB

CLAMS API Summarizer

Home Page: https://mast-group.github.io/clams/

License: Apache License 2.0

Python 92.36% Java 7.64%
api-usage-mining mining-software-repositories documentation code-reuse code-summarization

clams's Introduction

CLAMS: Clustering for API Mining of Snippets

CLAMS is an approach for mining API source code snippets that lies between snippet and sequence mining methods, which ensures lower complexity and thus could apply more readily to other languages.

This is an implementation of the API miner from our paper:

@inbook{katirtzis2018clams,
  title={Summarizing Software API Usage Examples using Clustering Techniques},
  author={Nikolaos Katirtzis and Themistoklis Diamantopoulos and Charles Sutton},
  year={2018},
  booktitle={Proceedings of the 21st International Conference on Fundamental Approaches to Software Engineering}
}

Structure of the project

main.py: This is the main function of the project.

/apisummariser: Contains all the implementation files. The project is augmented with docstrings. Running pydoc -p <PORT> will reveal the documentation.

/data: Contains the dataset+examples and results for clams and other systems being used for the evaluation.

/libs: Contains any third-party libraries used in the implementation (excluding any Python libraries).

/results: The results of the system will be stored here.

requirements.txt: These are the dependencies on third-party Python libraries.

Installation Instructions

Cd to the project's directory:

cd clams

Install Java 8:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

Install/Configure Anaconda 2:

wget https://repo.continuum.io/archive/Anaconda2-4.2.0-Linux-x86_64.sh
bash Anaconda2-4.2.0-Linux-x86_64.sh -b -p ~/anaconda
rm Anaconda2-4.2.0-Linux-x86_64.sh

//replace <username with your username before running the following command>
echo 'export PATH="/home/<username>/anaconda/bin:$PATH' >> ~/.bashrc 
source .bashrc
conda update conda
conda config --add channels conda-forge

Install Artistic Style formatter:

mkdir libs/astyle
sudo apt-get install astyle
ln -s /usr/bin/astyle ./libs/astyle/astyle

Install srcML (remove -64 for 32 bit OS):

mkdir libs/srcml
wget http://131.123.42.38/lmcrs/beta/srcML-Ubuntu14.04-64.deb
sudo dpkg -i srcML-Ubuntu14.04-64.deb
rm srcML-Ubuntu14.04-64.deb
ln -s /usr/bin/srcml ./libs/srcml/srcml

Install python dependencies using conda and requirements.txt:

conda install --file requirements.txt

How to run the application

You can run the application using the following command:

python main.py

The results will be stored in the results directory.

License

This code is released under the Apache 2.0 license. Other licenses are available on request.

clams's People

Contributors

nikos912000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

pombredanne

clams's Issues

Issue when running python main.py

Dear authors,
I followed the Installation Instructions, when i run python main.py with dataset='twitter4j' and package_name='twitter4j', it worked perfectly. But when i changed to other dataset and package_name, for 'camel', it still worked but get less mined files (56) than your result (152), with drools, mined files is 0, and with 'webobjects' i got issue in below image.
image

Do you know what cause these 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.