kirancodes.me
To Proof Maintenance & Beyond!

SnR: Constraint-Based Type Inference for Incomplete Java Code Snippets

Yiwen Dong, Tianxiao Gu, Yongqiang Tian, Chengnian Sun

Abstract

Code snippets are prevalent on websites such as Stack Overflow and are effective in demonstrating API usages concisely. However they are usually difficult to be used directly because most code snippets not only are syntactically incomplete but also lack dependency information, and thus do not compile. For example, Java snippets usually do not have import statements or required library names; only 6.88% of Java snippets on Stack Overflow include import statements necessary for compilation.

BibTeX
@inproceedings{Dong-al:ICSE22,
  author    = {Yiwen Dong and
               Tianxiao Gu and
               Yongqiang Tian and
               Chengnian Sun},
  title     = {{SnR:} {Constraint-Based} Type Inference for Incomplete Java Code Snippets},
  booktitle = {ICSE},
  pages     = {1982--1993},
  publisher = {{ACM}},
  year      = {2022},
}

Related papers