The Strengths and Behavioral Quirks of Java Bytecode Decompilers

Nicolas Harrand, César Soto-Valero, Martin Monperrus, Benoit Baudry
8/19/2019
cs.SE

Official code: ASSERT-KTH/decompilercmp (21 stars, Java, last commit 2020-06-03).

Abstract

During compilation from Java source code to bytecode, some information is irreversibly lost. In other words, compilation and decompilation of Java code is not symmetric.

Show full abstract

Consequently, the decompilation process, which aims at producing source code from bytecode, must establish some strategies to reconstruct the information that has been lost. Modern Java decompilers tend to use distinct strategies to achieve proper decompilation. In this work, we hypothesize that the diverse ways in which bytecode can be decompiled has a direct impact on the quality of the source code produced by decompilers. We study the effectiveness of eight Java decompilers with respect to three quality indicators: syntactic correctness, syntactic distortion and semantic equivalence modulo inputs. This study relies on a benchmark set of 14 real-world open-source software projects to be decompiled (2041 classes in total). Our results show that no single modern decompiler is able to correctly handle the variety of bytecode structures coming from real-world programs. Even the highest ranking decompiler in this study produces syntactically correct output for 84% of classes of our dataset and semantically equivalent code output for 78% of classes.

View on arXivView PDF

Code Implementations(1)

Dataset and tool to analyse and compare java bytecode decompilers http://arxiv.org/pdf/1908.06895

215Java, ShellJun 12, 20196 years ago
decompilerjavakthopen-science

Similar Papers

Cite this paper

@article{harrand2019strengths,
  title  = {The Strengths and Behavioral Quirks of Java Bytecode Decompilers},
  author = {Nicolas Harrand and César Soto-Valero and Martin Monperrus and Benoit Baudry},
  year   = {2019},
  eprint = {1908.06895},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1908.06895}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1908.06895.svg)](https://codeofpaper.com/paper/1908.06895)

Discussion