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
29
30
31
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
1
2
3
4
  1. 2023 (32)
    1. March (1)
    2. February (9)
    3. January (22)
  2. 2022 (245)
    1. December (20)
    2. November (28)
    3. October (15)
    4. September (12)
    5. August (29)
    6. July (23)
    7. June (17)
    8. May (20)
    9. April (24)
    10. March (22)
    11. February (16)
    12. January (19)
  3. 2021 (210)
  4. 2020 (217)
  5. 2019 (255)
  6. 2018 (217)
  7. 2017 (36)
  8. 2016 (21)
  9. 2015 (36)
  10. 2014 (33)
  11. 2013 (23)
  12. 2012 (4)
  13. 2011 (1)
  14. 2010 (1)
  15. 2009 (1)
  16. 2008 (1)