Back to search

Rice University

Mining Natural APIs from Large Code Corpora using a Mixture of Hidden Markov Models

Abstract

dc:description.abstract

A Natural API is a collection of API methods that tend to be used following certain discernible statistical patterns in real-world code. In this thesis, I present a method for learning an interpretable statistical model for such natural APIs. My model is trained on sequences of API calls produced from large software repositories through program analysis. Once trained, the model is able to recognize complex temporal dependences between methods, including methods that technically belong to different APIs, and can be used as a proxy for formal correctness specifications. Our experiments train the model on sequences of method calls generated from over 150 million lines of Android code. We evaluate the learned model by measuring accuracy in learnt specifications from the corpus, completing code with missing API calls, and searching for code that uses APIs in a way that matches a query. Our encouraging results indicate that statistical models of API calls learned from large code corpora can have broad value in software engineering.

Degree

thesis:*
Name thesis:degree_name
Master of Science
Level thesis:degree_level
Masters
Discipline thesis:degree_discipline
Engineering
Department thesis:degree_department
Computer Science
Grantor
Rice University
Year dc:date.issued
2017

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Mukherjee, Rohan
Advisor dc:contributor.advisor
  • Jermaine, Christopher

Subjects

dc:subject × 6

Rights

dc:rights
Statement dc:rights
  • Copyright is held by the author, unless otherwise indicated. Permission to reuse, publish, or reproduce the work beyond the bounds of fair use or other exemptions to copyright law must be obtained from the copyright holder.
Language dc:language.iso
eng

Identifiers

dc:identifier.*
Dc Identifier Citation
Mukherjee, Rohan. "Mining Natural APIs from Large Code Corpora using a Mixture of Hidden Markov Models." (2017) Master’s Thesis, Rice University. <a href="https://hdl.handle.net/1911/105464">https://hdl.handle.net/1911/105464</a>.

Chain of custody

source
Harvested from
Rice University
Base URL
repository.rice.edu/server/oai/request
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
citation

Mukherjee, Rohan. Mining Natural APIs from Large Code Corpora using a Mixture of Hidden Markov Models. Masters thesis, Rice University, 2017. https://hdl.handle.net/1911/105464