Identifying Algorithm Names in Code Comments

Published in arXiv, 2019

Recommended citation: Klainongsuang, J., Nugroho, Y.S., Hata, H., Manaskasemsak, B., Rungsawang, A., Leelaprute, P., & Matsumoto, K. (2019). Identifying Algorithm Names in Code Comments. arXiv preprint arXiv:1907.04557. https://arxiv.org/abs/1907.04557

For recent machine-learning-based tasks like API sequence generation, comment generation, and document generation, large amount of data is needed. When software developers implement algorithms in code, we find that they often mention algorithm names in code comments. Code annotated with such algorithm names can be valuable data sources. In this paper, we propose an automatic method of algorithm name identification. The key idea is extracting important N-gram words containing the word `algorithm' in the last. We also consider part of speech patterns to derive rules for appropriate algorithm name identification. The result of our rule evaluation produced high precision and recall values (more than 0.70). We apply our rules to extract algorithm names in a large amount of comments from active FLOSS projects written in seven programming languages, C, C++, Java, JavaScript, Python, PHP, and Ruby, and report commonly mentioned algorithm names in code comments.Ê

Download paper here

Recommended citation: Klainongsuang, J., Nugroho, Y.S., Hata, H., Manaskasemsak, B., Rungsawang, A., Leelaprute, P., & Matsumoto, K. (2019). Identifying Algorithm Names in Code Comments. arXiv preprint arXiv:1907.04557.