{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,3,27]],"date-time":"2025-03-27T18:29:53Z","timestamp":1743100193116,"version":"3.40.3"},"publisher-location":"Cham","reference-count":24,"publisher":"Springer International Publishing","isbn-type":[{"type":"print","value":"9783030994280"},{"type":"electronic","value":"9783030994297"}],"license":[{"start":{"date-parts":[[2022,1,1]],"date-time":"2022-01-01T00:00:00Z","timestamp":1640995200000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"},{"start":{"date-parts":[[2022,3,29]],"date-time":"2022-03-29T00:00:00Z","timestamp":1648512000000},"content-version":"vor","delay-in-days":87,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"}],"content-domain":{"domain":["link.springer.com"],"crossmark-restriction":false},"short-container-title":[],"published-print":{"date-parts":[[2022]]},"abstract":"<jats:title>Abstract<\/jats:title><jats:p>Nowadays, software development is accelerated through the reuse of code snippets found online in question-answering platforms and software repositories. In order to be efficient, this process requires forming an appropriate query and identifying the most suitable code snippet, which can sometimes be challenging and particularly time-consuming. Over the last years, several code recommendation systems have been developed to offer a solution to this problem. Nevertheless, most of them recommend API calls or sequences instead of reusable code snippets. Furthermore, they do not employ architectures advanced enough to exploit the semantics of natural language and code in order to form the optimal query from the question posed. To overcome these issues, we propose CodeTransformer, a code recommendation system that provides useful, reusable code snippets extracted from open-source GitHub repositories. By employing a neural network architecture that comprises advanced attention mechanisms, our system effectively understands and models natural language queries and code snippets in a joint vector space. Upon evaluating CodeTransformer quantitatively against a similar system and qualitatively using a dataset from Stack Overflow, we conclude that our approach can recommend useful and reusable snippets to developers.<\/jats:p>","DOI":"10.1007\/978-3-030-99429-7_13","type":"book-chapter","created":{"date-parts":[[2022,3,28]],"date-time":"2022-03-28T20:02:48Z","timestamp":1648497768000},"page":"225-244","update-policy":"https:\/\/doi.org\/10.1007\/springer_crossmark_policy","source":"Crossref","is-referenced-by-count":1,"title":["Semantic Code Search in Software Repositories using Neural Machine Translation"],"prefix":"10.1007","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-8373-5165","authenticated-orcid":false,"given":"Evangelos","family":"Papathomas","sequence":"first","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-0520-7225","authenticated-orcid":false,"given":"Themistoklis","family":"Diamantopoulos","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-0235-6046","authenticated-orcid":false,"given":"Andreas","family":"Symeonidis","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"297","published-online":{"date-parts":[[2022,3,29]]},"reference":[{"key":"13_CR1","doi-asserted-by":"crossref","unstructured":"Allamanis, M.: The Adverse Effects of Code Duplication in Machine Learning Models of Code. In: Proceedings of the 2019 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software. p. 143\u2013153. Onward! 2019, Association for Computing Machinery, New York, NY, USA (2019)","DOI":"10.1145\/3359591.3359735"},{"key":"13_CR2","unstructured":"Bernhardsson, E.: Annoy: Approximate Nearest Neighbors in C++\/Python (2018), https:\/\/pypi.org\/project\/annoy\/, Python package version 1.13.0"},{"key":"13_CR3","doi-asserted-by":"crossref","unstructured":"Bojanowski, P., Grave, E., Joulin, A., Mikolov, T.: Enriching Word Vectors with Subword Information. Transactions of the Association for Computational Linguistics 5, 135\u2013146 (2017)","DOI":"10.1162\/tacl_a_00051"},{"key":"13_CR4","doi-asserted-by":"crossref","unstructured":"Cai, L., Wang, H., Huang, Q., Xia, X., Xing, Z., Lo, D.: BIKER: A Tool for Bi-Information Source Based API Method Recommendation. In: Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. p. 1075\u20131079. ESEC\/FSE 2019, ACM, New York, NY, USA (2019)","DOI":"10.1145\/3338906.3341174"},{"key":"13_CR5","doi-asserted-by":"crossref","unstructured":"Campbell, B.A., Treude, C.: NLP2Code: Code Snippet Content Assist via Natural Language Tasks. In: Proceedings of the 2017 IEEE International Conference on Software Maintenance and Evolution. pp. 628\u2013632. ICSME 2017, IEEE Computer Society, Los Alamitos, CA, USA (2017)","DOI":"10.1109\/ICSME.2017.56"},{"key":"13_CR6","doi-asserted-by":"crossref","unstructured":"Chen, C., Peng, X., Sun, J., Xing, Z., Wang, X., Zhao, Y., Zhang, H., Zhao, W.: Generative API Usage Code Recommendation with Parameter Concretization. Science China Information Sciences 62(9), 192103 (2019)","DOI":"10.1007\/s11432-018-9821-9"},{"key":"13_CR7","doi-asserted-by":"crossref","unstructured":"Craswell, N.: Mean Reciprocal Rank, p.\u00a01703. In: Liu, Ling and \u00d6zsu, M. Tamer (eds), Encyclopedia of Database Systems, Springer, Boston, MA (2009)","DOI":"10.1007\/978-0-387-39940-9_488"},{"key":"13_CR8","doi-asserted-by":"crossref","unstructured":"Diamantopoulos, T., Oikonomou, N., Symeonidis, A.: Extracting Semantics from Question-Answering Services for Snippet Reuse. In: Proceedings of the 23rd International Conference on Fundamental Approaches to Software Engineering. pp. 119\u2013139. Dublin, Ireland (2020)","DOI":"10.1007\/978-3-030-45234-6_6"},{"key":"13_CR9","doi-asserted-by":"crossref","unstructured":"Gu, X., Zhang, H., Kim, S.: Deep Code Search. In: Proceedings of the 40th International Conference on Software Engineering. p. 933\u2013944. ICSE \u201918, Association for Computing Machinery, New York, NY, USA (2018)","DOI":"10.1145\/3180155.3180167"},{"key":"13_CR10","doi-asserted-by":"crossref","unstructured":"Gu, X., Zhang, H., Zhang, D., Kim, S.: Deep API Learning. In: Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering. pp. 631\u2013642. FSE 2016, ACM, New York, NY, USA (2016)","DOI":"10.1145\/2950290.2950334"},{"key":"13_CR11","doi-asserted-by":"crossref","unstructured":"Heidarian, A., Dinneen, M.J.: A Hybrid Geometric Approach for Measuring Similarity Level Among Documents and Document Clustering. In: Proceedings of the 2016 IEEE Second International Conference on Big Data Computing Service and Applications. pp. 142\u2013151. BigDataService 2016, IEEE Computer Society, Los Alamitos, CA, USA (2016)","DOI":"10.1109\/BigDataService.2016.14"},{"key":"13_CR12","unstructured":"Husain, H., Wu, H.H., Gazit, T., Allamanis, M., Brockschmidt, M.: CodeSearchNet Challenge: Evaluating the State of Semantic Code Search (2019)"},{"key":"13_CR13","doi-asserted-by":"crossref","unstructured":"J\u00e4rvelin, K., Kek\u00e4l\u00e4inen, J.: Cumulated Gain-Based Evaluation of IR Techniques. ACM Trans. Inf. Syst. 20(4), 422\u2014446 (2002)","DOI":"10.1145\/582415.582418"},{"key":"13_CR14","unstructured":"Kingma, D.P., Ba, J.: Adam: A Method for Stochastic Optimization. In: Proceedings of the 3rd International Conference on Learning Representations. pp. 1\u201315. ICLR 2015, San Diego, CA, USA (2015)"},{"key":"13_CR15","unstructured":"Li, X., Jiang, H., Kamei, Y., Chen, X.: Bridging Semantic Gaps between Natural Languages and APIs with Word Embedding. IEEE Transactions on Software Engineering pp. 1\u201317 (2018)"},{"key":"13_CR16","doi-asserted-by":"crossref","unstructured":"Lopes, C.V., Maj, P., Martins, P., Saini, V., Yang, D., Zitny, J., Sajnani, H., Vitek, J.: D\u00e9J\u00e0Vu: A Map of Code Duplicates on GitHub. Proc. ACM Program. Lang. 1(OOPSLA) (2017)","DOI":"10.1145\/3133908"},{"key":"13_CR17","doi-asserted-by":"crossref","unstructured":"Nguyen, A.T., Nguyen, T.N.: Graph-Based Statistical Language Model for Code. In: Proceedings of the 37th International Conference on Software Engineering - Volume 1. p. 858\u2013868. ICSE \u201915, IEEE Press (2015)","DOI":"10.1109\/ICSE.2015.336"},{"key":"13_CR18","doi-asserted-by":"crossref","unstructured":"Nguyen, P.T., Di\u00a0Rocco, J., Di\u00a0Ruscio, D., Ochoa, L., Degueule, T., Di\u00a0Penta, M.: FOCUS: A Recommender System for Mining API Function Calls and Usage Patterns. In: Proceedings of the 41st International Conference on Software Engineering. p. 1050\u20131060. ICSE \u201919, IEEE Press (2019)","DOI":"10.1109\/ICSE.2019.00109"},{"key":"13_CR19","doi-asserted-by":"crossref","unstructured":"Nguyen, T., Rigby, P.C., Nguyen, A.T., Karanfil, M., Nguyen, T.N.: T2API: Synthesizing API Code Usage Templates from English Texts with Statistical Translation. In: Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering. pp. 1013\u20131017. FSE 2016, ACM, New York, NY, USA (2016)","DOI":"10.1145\/2950290.2983931"},{"key":"13_CR20","doi-asserted-by":"crossref","unstructured":"Ponzanelli, L., Bacchelli, A., Lanza, M.: Seahawk: Stack Overflow in the IDE. In: Proceedings of the 2013 International Conference on Software Engineering. pp. 1295\u20131298. ICSE \u201913, IEEE Press, Piscataway, NJ, USA (2013)","DOI":"10.1109\/ICSE.2013.6606701"},{"key":"13_CR21","doi-asserted-by":"crossref","unstructured":"Raghothaman, M., Wei, Y., Hamadi, Y.: SWIM: Synthesizing What I Mean: Code Search and Idiomatic Snippet Synthesis. In: Proceedings of the 38th International Conference on Software Engineering. pp. 357\u2013367. ICSE \u201916, ACM, New York, NY, USA (2016)","DOI":"10.1145\/2884781.2884808"},{"key":"13_CR22","unstructured":"Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, u., Polosukhin, I.: Attention is All You Need. In: Proceedings of the 31st International Conference on Neural Information Processing Systems. p. 6000\u20136010. NIPS\u201917, Curran Associates Inc., Red Hook, NY, USA (2017)"},{"key":"13_CR23","unstructured":"Vinyals, O., Blundell, C., Lillicrap, T., Kavukcuoglu, K., Wierstra, D.: Matching Networks for One Shot Learning. In: Proceedings of the 30th International Conference on Neural Information Processing Systems. p. 3637\u20133645. NIPS\u201916, Curran Associates Inc., Red Hook, NY, USA (2016)"},{"key":"13_CR24","doi-asserted-by":"crossref","unstructured":"Xu, C., Sun, X., Li, B., Lu, X., Guo, H.: MULAPI: Improving API method recommendation with API usage location. Journal of Systems and Software 142, 195 \u2013 205 (2018)","DOI":"10.1016\/j.jss.2018.04.060"}],"container-title":["Lecture Notes in Computer Science","Fundamental Approaches to Software Engineering"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1007\/978-3-030-99429-7_13","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2022,3,28]],"date-time":"2022-03-28T20:20:06Z","timestamp":1648498806000},"score":1,"resource":{"primary":{"URL":"https:\/\/link.springer.com\/10.1007\/978-3-030-99429-7_13"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022]]},"ISBN":["9783030994280","9783030994297"],"references-count":24,"URL":"https:\/\/doi.org\/10.1007\/978-3-030-99429-7_13","relation":{},"ISSN":["0302-9743","1611-3349"],"issn-type":[{"type":"print","value":"0302-9743"},{"type":"electronic","value":"1611-3349"}],"subject":[],"published":{"date-parts":[[2022]]},"assertion":[{"value":"29 March 2022","order":1,"name":"first_online","label":"First Online","group":{"name":"ChapterHistory","label":"Chapter History"}},{"value":"FASE","order":1,"name":"conference_acronym","label":"Conference Acronym","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"International Conference on Fundamental Approaches to Software Engineering","order":2,"name":"conference_name","label":"Conference Name","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"Munich","order":3,"name":"conference_city","label":"Conference City","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"Germany","order":4,"name":"conference_country","label":"Conference Country","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"2022","order":5,"name":"conference_year","label":"Conference Year","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"4 April 2022","order":7,"name":"conference_start_date","label":"Conference Start Date","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"5 April 2022","order":8,"name":"conference_end_date","label":"Conference End Date","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"25","order":9,"name":"conference_number","label":"Conference Number","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"fase2022","order":10,"name":"conference_id","label":"Conference ID","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"https:\/\/etaps.org\/2022\/fase","order":11,"name":"conference_url","label":"Conference URL","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"Double-blind","order":1,"name":"type","label":"Type","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"EasyChair","order":2,"name":"conference_management_system","label":"Conference Management System","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"61","order":3,"name":"number_of_submissions_sent_for_review","label":"Number of Submissions Sent for Review","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"17","order":4,"name":"number_of_full_papers_accepted","label":"Number of Full Papers Accepted","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"0","order":5,"name":"number_of_short_papers_accepted","label":"Number of Short Papers Accepted","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"28% - The value is computed by the equation \"Number of Full Papers Accepted \/ Number of Submissions Sent for Review * 100\" and then rounded to a whole number.","order":6,"name":"acceptance_rate_of_full_papers","label":"Acceptance Rate of Full Papers","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"3","order":7,"name":"average_number_of_reviews_per_paper","label":"Average Number of Reviews per Paper","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"7","order":8,"name":"average_number_of_papers_per_reviewer","label":"Average Number of Papers per Reviewer","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"Yes","order":9,"name":"external_reviewers_involved","label":"External Reviewers Involved","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}}]}}