GlueTest: Testing Code Translation via Language InteroperabilityNIER Paper
Code translation from one programming language to another has been a topic of interest for academia and industry for a long time, and has recently re-emerged with the advent of Large Language Models (LLMs). While progress has been made in translating small code snippets, tackling larger projects with intricate dependencies remains a challenging task. A significant challenge in automating such translations is validating the resulting code. Translating existing tests to the target language can introduce errors, yielding potentially misleading quality assurance even when all the translated tests pass.
We propose the idea of testing the translated code using the existing, untranslated tests written in the original programming language. The key to our idea is to leverage language interoperability to run code written in two different languages together. This partial translation approach offers two main benefits: (1) the ability to leverage original tests for validating translated code, not only from the project being translated but also from the clients using this project, and (2) the continuous maintainability and testability of the project during translation.
We evaluate our approach by translating from Java to Python two popular Java libraries, Apache Commons CLI and Apache Commons CSV, with 1209 lines of code (in 22 Java files) and 860 lines of code (in 10 Java files), respectively. Our implementation uses Oracle’s GraalVM framework for language interoperability. We successfully validate the translation using the original Java tests, not just from the CLI and CSV libraries themselves but also from client projects of these libraries (30 for CLI and 6 for CSV). Our approach is the first to systematically and semi-automatically validate translations for such non-trivial libraries.
Fri 11 OctDisplayed time zone: Arizona change
10:30 - 12:00 | Session 12: Machine Learning in Software EngineeringTool Demo Track / Research Track / New Ideas and Emerging Results Track / Registered Reports Track at Abineau Chair(s): Mohammed Sayagh ETS Montreal, University of Quebec | ||
10:30 15m | Can We Do Better with What We Have Done? Unveiling the Potential of ML Pipeline in NotebooksResearch Track Paper Research Track | ||
10:45 10m | MergeRepair: Merging Task-Specific Adapters in Code LLMs for Automated Program RepairRegistered Reports Paper Registered Reports Track Meghdad Dehghan University of British Columbia, Jie JW Wu University of British Columbia (UBC), Fatemeh Hendijani Fard University of British Columbia, Ali Ouni ETS Montreal, University of Quebec Pre-print | ||
10:55 15m | On the Use of Deep Learning Models for Semantic Clone DetectionResearch Track Paper Research Track Subroto Nag Pinku University of Saskatchewan, Debajyoti Mondal , Chanchal K. Roy University of Saskatchewan, Canada | ||
11:10 10m | GlueTest: Testing Code Translation via Language InteroperabilityNIER Paper New Ideas and Emerging Results Track Muhammad Salman Abid Cornell University, Mrigank Pawagi Indian Institute of Science, Bengaluru, Sugam Adhikari Islington College, Xuyan Cheng Dickinson College, Ryed Badr University of Illinois Urbana Champaign, Md Wahiduzzaman BRAC University, Vedant Rathi Adlai E Stevenson High School, Ronghui Qi Wuhan University, Choiyin Li Po Leung Kuk Ngan Po Ling College, Lu Liu University of Washington, Rohit Sai Naidu Dublin High School, Licheng Lin Zhejiang University, Que Liu University of Shanghai for Science and Technology, Asif Zubayer Palak BRAC University, Mehzabin Haque University of Dhaka, Xinyu Chen University of Illinois Urbana Champaign, Darko Marinov University of Illinois at Urbana-Champaign, Saikat Dutta Cornell University | ||
11:20 10m | Does Co-Development with AI Assistants Lead to More Maintainable Code? A Registered ReportRegistered Reports Paper Registered Reports Track Markus Borg CodeScene, Dave Hewett Equal Experts, Donald Graham Equal Experts, Noric Couderc Lund University, Emma Söderberg Lund University, Luke Church University of Cambridge | Candela Inc, Dave Farley Continuous Delivery Pre-print | ||
11:30 15m | Leveraging Large Vision-Language Model For Better Automatic Web GUI TestingResearch Track Paper Research Track Siyi Wang , Sinan Wang Southern University of Science and Technology, Yujia Fan , Xiaolei Li , Yepang Liu Southern University of Science and Technology | ||
11:45 5m | StackRAG Agent: Improving Developer Answers with Retrieval-Augmented GenerationTool Demo Paper Tool Demo Track Davit Abrahamyan University of British Columbia, Fatemeh Hendijani Fard University of British Columbia |