PhD Seminar • Software Engineering • Constraint-based Type Inference for Incomplete Java Code SnippetsExport this event to calendar

Monday, November 21, 2022 — 12:30 PM to 1:30 PM EST

Please note: This PhD seminar will take place in DC 2585 and online.

Yiwen Dong, PhD candidate
David R. Cheriton School of Computer Science

Supervisor: Professor Chengnian Sun

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.

This talk focuses on SnR, a precise, efficient, constraint-based technique to automatically infer the exact types used in code snippets and the libraries containing the inferred types, to compile and therefore reuse the code snippets. SnR builds a knowledge base of APIs, i.e., various facts about the available APIs, from a corpus of Java libraries. Given a code snippet with missing import statements, SnR automatically extracts typing constraints from the snippet, solves the constraints against the knowledge base, and returns a set of APIs that satisfies the constraints to be imported into the snippet.

We found SnR to significantly outperform other state-of-the-art solutions. On a benchmark of 267 code snippets from Stack Overflow, SnR correctly infers 91% of the import statements, which makes 73.8% of the snippets compilable.


To join this PhD seminar on Zoom, please go to https://uwaterloo.zoom.us/j/92467426702?pwd=NkZPL3FuVGFYcFM1L3FiQlVpTzdEQT09. You can also attend in person in DC 2585. 

Location 
DC - William G. Davis Computer Research Centre
Hybrid: DC 2585 | Online PhD seminar
200 University Avenue West

Waterloo, ON N2L 3G1
Canada
Event tags 

S M T W T F S
26
27
28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
  1. 2024 (118)
    1. May (4)
    2. April (37)
    3. March (27)
    4. February (25)
    5. January (25)
  2. 2023 (296)
    1. December (20)
    2. November (28)
    3. October (15)
    4. September (25)
    5. August (30)
    6. July (30)
    7. June (22)
    8. May (23)
    9. April (32)
    10. March (31)
    11. February (18)
    12. January (22)
  3. 2022 (245)
  4. 2021 (210)
  5. 2020 (217)
  6. 2019 (255)
  7. 2018 (217)
  8. 2017 (36)
  9. 2016 (21)
  10. 2015 (36)
  11. 2014 (33)
  12. 2013 (23)
  13. 2012 (4)
  14. 2011 (1)
  15. 2010 (1)
  16. 2009 (1)
  17. 2008 (1)