JCoffee: Using Compiler Feedback to Make Partial Code Snippets Compilable
Piyush Gupta, Nikita Mehrotra, Rahul Purandare

TL;DR
JCoffee is a tool that transforms partial Java code snippets into fully compilable code by using compiler feedback, enabling static analysis on incomplete code segments with minimal modifications.
Contribution
It introduces a novel approach that leverages compiler feedback to make partial Java code snippets compilable, facilitating static analysis on incomplete code.
Findings
Works with any well-typed code snippet
Minimal changes required to make code compilable
Enables static analysis on partial code fragments
Abstract
Static program analysis tools are often required to work with only a small part of a program's source code, either due to the unavailability of the entire program or the lack of need to analyze the complete code. This makes it challenging to use static analysis tools that require a complete and typed intermediate representation (IR). We present JCoffee, a tool that leverages compiler feedback to convert partial Java programs into their compilable counterparts by simulating the presence of missing surrounding code. It works with any well-typed code snippet (class, function, or even an unenclosed group of statements) while making minimal changes to the input code fragment. A demo of the tool is available here: https://youtu.be/O4h2g_n2Qls
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
