Code Monkey home page Code Monkey logo

improving-source-code-readability-theory-and-practice's Introduction

Replication package for 'Improving Source Code Readability Theory and Practice'

Our data:

  • change-distiller.csv

    • contains ChangeDistiller data
  • ref-miner.csv

    • contains RefactoringMiner data
  • source-file-samples/*

    • contains all before/after code samples (For downloading this content see download-samples.py)
  • after-checkstyle.csv

    • checkstyle warnings for all after files
  • before-checkstyle.csv

    • checkstyle warnings for all before files
  • oracle.csv

    • our oracle of commits, files in the commits and the commit message
  • readability-metrics.csv

    • contains readability scores calculated using Scalabrino's model, Dorn's model and Combined Model.

download-samples.py

A python script for downloading the before and after version of the files from the commits into the source-file-samples directory. It reads the metadata of the commits and files from the oracle.csv.

Dependencies

Make sure you have the required python packages installed. For this you can run the following command to install them with pip:

pip install "requests==2.*"
pip install "patch==1.*"

Usage

Create a GitHub API token with at least the right to read public repositories here. Then call the script with the token as parameter, like this:

./download-samples.py GitHub_API_Token_place_here

The download takes about 30 minutes.

Known issues

Commit not found

Some commits are not available anymore. Actual known (in March 2024):

Reason Affected rows
Repository is not available anymore. 410 to 456
Repository is not available anymore. 1850 to 1866
Repository is not available anymore. 1877 to 1880

Affected rows produce appropriated message on stderr like this:

ERROR: Commit, from row 410 in oracle.csv, not found.
Renamed files

In the oracle.csv are also files listed, which were renamed in the corresponding commit. So there are no content changes, so nothing to evaluate in matter of readability.

Affected rows produce appropriated message on stdout like this:

Row 391 of oracle.csv skipped, because the file was only renamed.

improving-source-code-readability-theory-and-practice's People

Contributors

baumicoder avatar smfakhoury 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.