Migrating Java to Kotlin requires preserving behavior and interfaces within a working repository. Existing callers, build configurations, and tests constrain translation. Java/Kotlin interoperability also allows partial and incomplete migrations to keep passing tests. A migration is incomplete if it does not replace every requested Java file with its Kotlin counterpart. We present J2KMigBench, a benchmark drawn from real migration pull requests. Each task combines the original Java, a specification grounded in the source and pull request, and an offline build environment with the developer's Kotlin withheld from the agent. From 383 candidate pull requests, environment and task checks yield 31 evaluable tasks across six repositories and 167 target files. We evaluate Gemini 3.8 Flash and GPT-6.1 Terra using OpenHands under identical task budgets. Resolution requires compilation, preservation of stable baseline tests, and conversion of every requested file. Gemini resolves 25 tasks (80.6%) and Terra 26 (83.9%), at mean model costs of USD 1.25 and USD 0.15. Six patches compile and preserve the tests while converting at most one target file. Gemini converts more files overall and is closer to the developer's Kotlin on shared targets, with mean token edit similarity of 0.57 against Terra's 0.53. Analysis of selected Kotlin constructs reveals different null-handling and accessor choices without establishing a ranking of idiomaticity. The benchmark exposes incomplete conversions and caller incompatibilities that build success or reference similarity alone would miss.


翻译:暂无翻译

0
下载
关闭预览

相关内容

Kotlin 是一种运行于 Java 虚拟机上的静态类型编程语言。
【新书】《Java版ChatGPT》,243页pdf
专知会员服务
48+阅读 · 2024年3月2日
【Manning新书】现代Java实战,592页pdf
专知会员服务
101+阅读 · 2020年5月22日
【新书】Java企业微服务,Enterprise Java Microservices,272页pdf
【Github】GPT2-Chinese:中文的GPT2训练代码
AINLP
52+阅读 · 2019年8月23日
自己动手撸一个分布式IM(即时通讯) 系统
51CTO博客
16+阅读 · 2019年3月20日
R工程化—Rest API 之plumber包
R语言中文社区
11+阅读 · 2018年12月25日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
论文浅尝 | Open world Knowledge Graph Completion
开放知识图谱
19+阅读 · 2018年1月30日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
VIP会员
最新内容
《评估人机编队性能的标准指标》
专知会员服务
11+阅读 · 11月30日
《美陆军装甲排的自动化任务分配模型》59页
专知会员服务
10+阅读 · 11月30日
乌克兰海陆空无人力量
专知会员服务
6+阅读 · 11月30日
超越技术:美战争部的AI变革管理
专知会员服务
10+阅读 · 11月27日
北约400亿美元反无人机能力投资建设
专知会员服务
8+阅读 · 11月25日
反小型无人机系统方案评估(27页)
专知会员服务
17+阅读 · 11月25日
相关资讯
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员