mlsanityData to 13 Oct 2026

Mining Idioms from Source Code

arXiv 1404.0417 ↗First posted 1 Apr 2014cs.SEcited by 19

Not on the map. Why?

Abstract (arXiv)

We present the first method for automatically mining code idioms from a corpus of previously written, idiomatic software projects. We take the view that a code idiom is a syntactic fragment that recurs across projects and has a single semantic role. Idioms may have metavariables, such as the body of a for loop. Modern IDEs commonly provide facilities for manually defining idioms and inserting them on demand, but this does not help programmers to write idiomatic code in languages or using libraries with which they are unfamiliar. We present HAGGIS, a system for mining code idioms that builds on recent advanced techniques from statistical natural language processing, namely, nonparametric Bayesian probabilistic tree substitution grammars. We apply HAGGIS to several of the most popular open source projects from GitHub. We present a wide range of evidence that the resulting idioms are semantically meaningful, demonstrating that they do indeed recur across software projects and that they occur more frequently in illustrative code examples collected from a Q&A site. Manual examination of the most common idioms indicate that they describe important program concepts, including object creation, exception handling, and resource management.

Key facts. Cited by 19 papers in the map (data through 13 Oct 2026). First posted on arXiv 1 Apr 2014.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 13 Oct)

Citing papers per year: 2021: 4; 2022: 3; 2023: 5; 2024: 2; 2025: 3; 2026: 2.

19 papers.

Sort:

By area:

  1. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 743
  2. 2024A Survey on Large Language Models for Code Generationcited by 656
  3. 2022Large Language Models Meet NL2Code: A Surveycited by 137
  4. 2023LongCoder: A Long-Range Pre-trained Language Model for Code Completioncited by 111
  5. 2022Top-Down Synthesis for Library Learningcited by 57
  6. 2022CodeFill: Multi-token Code Completion by Jointly Learning from Structure and Naming Sequencescited by 50
  7. 2023LILO: Learning Interpretable Libraries by Compressing and Documenting Codecited by 47
  8. 2024An LLM-Assisted Easy-to-Trigger Backdoor Attack on Code Completion Models: Injecting Disguised Vulnerabilities against Strong Detectioncited by 39
  9. 2023Large Language Models of Code Fail at Completing Code with Potential Bugscited by 29
  10. 2021Learning to Complete Code with Sketchescited by 23
  11. 2021Neural Program Generation Modulo Static Analysiscited by 13
  12. 2023R-U-SURE? Uncertainty-Aware Code Suggestions By Maximizing Utility Across Random User Intentscited by 10
7 more
  1. 2025Generating Planning Feedback for Open-Ended Programming Exercises with LLMscited by 4
  2. 2025Fully Autonomous Programming using Iterative Multi-Agent Debugging with Large Language Modelscited by 3
  3. 2025Bringing Structure to Naturalness: On the Naturalness of ASTscited by 1
  4. 2026Compiling Large Multi-Modal Requirement Documents into Runnable Software Systems: From an Agentic Test-Driven Perspectivecited by 1
  5. 2021Borrowing from Similar Code: A Deep Learning NLP-Based Approach for Log Statement Automationcited by 0
  6. 2023CodeScholar: Growing Idiomatic Code Examplescited by 0
  7. 2026On Device Agentic Operation Caches -- Classifier-Centric NL-to-Action Generationcited by 0