CoChat

Learning to mine aligned code and natural language pairs from stack overflow

Open access
Yin, Pengcheng, Deng, Bowen, Chen, Edgar, Vasilescu, Bogdan, Neubig, Graham · 2018 · Proceedings of the 15th International Conference on Mining Software Repositories

The DOI matches its Crossref record; 53 of the 53 references it cites were found in a registry or an index.

Abstract

For tasks like code synthesis from natural language, code retrieval, and code summarization, data-driven models have shown great promise. However, creating these models require parallel data between natural language (NL) and code with fine-grained alignments. Stack Overflow (SO) is a promising source to create such a data set: the questions are diverse and most of them have corresponding answers with high quality code snippets. However, existing heuristic methods (e.g., pairing the title of a post with the code in the accepted answer) are limited both in their coverage and the correctness of the NL-code pairs obtained. In this paper, we propose a novel method to mine high-quality aligned data from SO using two sets of features: hand-crafted features considering the structure of the extracted snippets, and correspondence features obtained by training a probabilistic model to capture the correlation between NL and code using neural networks. These features are fed into a classifier that determines the quality of mined NL-code pairs. Experiments using Python and Java as test beds show that the proposed method greatly expands coverage and accuracy over existing mining methods, even when using only a small number of labeled examples. Further, we find that reasonable results are achieved even when training the classifier on one language and testing on another, showing promise for scaling NL-code mining to a wide variety of programming languages beyond those for which we are able to annotate data.

Overview

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.1145/3196398.3196408

Cites

53 of 53 references verified0 citation errors · 0 not checkable

Statistics

Verification

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Citations

Cites

Research works printed but not linked: 7

  1. 10.5555/2819009.2819143 · doi:10.5555/2819009.2819143
  2. Gal Yarin, 2016, Annual Conference on Neural Information Processing Systems (NIPS). 1019--1027
  3. Diederik, 2014, Kingma and Jimmy Ba
  4. Lin Xi Victoria, 2018, International Conference on Language Resources and Evaluation (LREC)
  5. Luong Thang, Conference on Empirical Methods in Natural Language Processing (EMNLP). ACL, 1412--1421
  6. 10.5555/2627435.2670313 · doi:10.5555/2627435.2670313
  7. 10.5555/2666719.2666728 · doi:10.5555/2666719.2666728

Cited by

See all 229

Metadata

Authors
Yin, P., Deng, B., Chen, E., Vasilescu, B., & Neubig, G.
Affiliations
Carnegie Mellon University (US)
Venue
Proceedings of the 15th International Conference on Mining Software Repositories
Publisher
ACM
Published
2018-05-28
Pages
476-486
OpenAlex
W2964315653
Cited by
218
References
51
Citations by year
2026: 17 · 2025: 20 · 2024: 32 · 2023: 33 · 2022: 28 · 2021: 35 · 2020: 37 · 2019: 14 · 2018: 2
FWCI
17.27
Type
conference paper
Language
en
Open access
Locations
  • International Conference on Mining Software Repositories (MSR) (publishedVersion)
  • arXiv (Cornell University) (submittedVersion, other-oa)
  • arXiv (Cornell University)
Topics
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
  • Physical Sciences › Computer Science › Computer Science Applications › Teaching and Learning Programming
Keywords
Stack Overflow, code mining, code search, code summarization, program synthesis, stochastic modeling, handcrafted features, cross-lingual generalization, programming languages

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.