Git Product home page Git Product logo

toufiqueparag / recoverjsname-jsneat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from trunghieu-tran/recoverjsname-jsneat

0.0 0.0 0.0 108.52 MB

An information-retrieval-based approach to recover the variable names in minified JS code by searching for them in a large corpus of open-source

Home Page: https://mrstarrynight.github.io/JSNeat/

JavaScript 3.10% Shell 0.85% Batchfile 0.08% Java 89.25% Python 6.71%

recoverjsname-jsneat's Introduction

Recovering Variable Names for Minified Code with Usage Contexts - JSNeat

JSNeat - an information retrieval (IR)- based approach to recover the variable names in minified JS code. JSNEAT follows a data-driven approach to recover names by searching for them in a large corpus of open-source JS code.

Website

Official website : https://mrstarrynight.github.io/JSNeat/

Publication

This project is published on The International Conference on Software Engineering 2019 (ICSE 2019)

Slide

The presentation of the project in ICSE'2019 could be download here

Why do we create JSNeat?

In modern Web development, program understanding plays an equally important role. Web technologies and programming languages require the exposure of source code to Web browsers in the client side to be executed there. To avoid such exposure, the source code such as JavaScript (JS) files are often obfuscated in which the variable names are minified, i.e., the variable names are replaced with short, opaque, and meaningless names. The intention has two folds. First, it makes the JS files smaller and thus are quickly loaded to improve performance. Second, minification diminishes code readability for the readers, while maintaining the program semantics. Due to those reasons, there is a natural need to automatically recover the minified code with meaningful variable names. That's why JSNeat was born.

Techniques

The names of the variables in a particular function not only depend on the task in which the variable is used to implement (called task- specific context), but their names are also affected by their own properties and roles in the code (called single-variable usage context) and on the names of the other variables in the same function (called multiple-variable usage context):

  • Single-variable usage context (SVC)
  • Multiple-variable usage context (MVC)
  • Task-specific context (TSC)

Empirical Result

In this experiment, we evaluate JSNEAT’s accuracy and compare it with the state-of-the-art approaches JSNice and JSNaughty.

Accuracy Comparison

alt text

Overlapping among Results from Three Tools

alt text

All experiments were run on a Linux computer server with twenty Intel Xeon 2.2GHz processors, 256GB RAM.

alt text

Corpus

We collected a corpus of 12,000 open-source JavaScript projects from GitHub with highest ratings. Download links: Corpus

Contributors

recoverjsname-jsneat's People

Contributors

trunghieu-tran avatar miketran238 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.