paper-with-me

홈 › Papers

Recovering Variable Names for Minified Code with Usage Contexts

2019-06-08 · Hieu Tran, Ngoc Tran, Son Nguyen, Hoan Nguyen, Tien Nguyen

In modern Web technology, JavaScript (JS) code plays an important role. To avoid the exposure of original source code, the variable names in JS code deployed in the wild are often replaced by short, meaningless names, thus making the code extremely difficult to manually understand and analysis. This paper presents 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. We use three types of contexts to match a variable in given minified code against the corpus including the context of properties and roles of the variable, the context of that variable and relations with other variables under recovery, and the context of the task of the function to which the variable contributes. We performed several empirical experiments to evaluate JSNeat on the dataset of more than 322K JS files with 1M functions, and 3.5M variables with 176K unique variable names. We found that JSNeat achieves a high accuracy of 69.1%, which is the relative improvements of 66.1% and 43% over two state-of-the-art approaches JSNice and JSNaughty, respectively. The time to recover for a file or for a variable with JSNeat is twice as fast as with JSNice and 4x as fast as with JNaughty, respectively.

📄 PDF Abstract BibTeX arXiv:1906.03488

Code (0)

등록된 구현이 없습니다.

Tasks

Information RetrievalRetrieval

Similar Papers 제목 키워드 기반

Context2Name: A Deep Learning-Based Approach to Infer Natural Variable Names from Usage Contexts

2018-08-31 · Rohan Bavishi, Michael Pradel, Koushik Sen

Most of the JavaScript code deployed in the wild has been minified, a process in which identifier names are replaced with short, arbitrary and meaningless names. Minified code occupies less space, but also makes the code…

Pop Quiz! Do Pre-trained Code Models Possess Knowledge of Correct API Names?

2023-09-14 · Terry Yue Zhuo, Xiaoning Du, Zhenchang Xing, Jiamou Sun 외

Recent breakthroughs in pre-trained code models, such as CodeBERT and Codex, have shown their superior performance in various downstream tasks. The correctness and unambiguity of API usage among these code models are cru…

Code GenerationKnowledge Probing

Variables are a Curse in Software Vulnerability Prediction

2024-06-18 · Jinghua Groppe, Sven Groppe, Ralf Möller

Deep learning-based approaches for software vulnerability prediction currently mainly rely on the original text of software code as the feature of nodes in the graph of code and thus could learn a representation that is …

Deep LearningPrediction

VarCLR: Variable Semantic Representation Pre-training via Contrastive Learning

2021-12-05 · Qibin Chen, Jeremy Lacomis, Edward J. Schwartz, Graham Neubig 외

Variable names are critical for conveying intended program behavior. Machine learning-based program analysis methods use variable name representations for a wide range of tasks, such as suggesting new variable names and …

Contrastive LearningLearning Semantic RepresentationsSpelling Correction

Embedding Java Classes with code2vec: Improvements from Variable Obfuscation

2020-04-06 · Rhys Compton, Eibe Frank, Panos Patros, Abigail Koay

Automatic source code analysis in key areas of software engineering, such as code security, can benefit from Machine Learning (ML). However, many standard ML approaches require a numeric representation of data and cannot…

Code ClassificationMethod name prediction