{"title":"Spatial Locality Based Identifier Name Recommendation","authors":"Setegn Asnakew Kasegn, S. Abebe","doi":"10.1109/ict4da53266.2021.9672214","DOIUrl":null,"url":null,"abstract":"Identifier names are used to represent concepts in the source code. Concise and consistent identifier names are crucial to program comprehension. Identifier names reduce the effort to understand the software, support software maintenance and improve source code quality. Despite these benefits, many software systems are known to have meaningless and inconsistent identifier names. One of the reasons that lead to inconsistent identifier names is lack of knowledge of identifier names already used to represent concepts in the software. To address this problem, this study proposes a new approach to automatically suggest part of identifier name. The approach aims to use spatial locality to identify and suggest next terms given identifier name prefix. Spatial locality, in this context, refers to the use of terms in close proximity of documents related to the software system. The performance of our proposed approach is evaluated using six open source software systems. The evaluation result shows that the spatial locality based approach suggests part of identifier names correctly with an average precision of 83.2% and average mean reciprocal rank (MRR) of 25.5%. Of the top four correct suggestions, more than half are ranked in the first and second place.","PeriodicalId":371663,"journal":{"name":"2021 International Conference on Information and Communication Technology for Development for Africa (ICT4DA)","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2021-11-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2021 International Conference on Information and Communication Technology for Development for Africa (ICT4DA)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ict4da53266.2021.9672214","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2
Abstract
Identifier names are used to represent concepts in the source code. Concise and consistent identifier names are crucial to program comprehension. Identifier names reduce the effort to understand the software, support software maintenance and improve source code quality. Despite these benefits, many software systems are known to have meaningless and inconsistent identifier names. One of the reasons that lead to inconsistent identifier names is lack of knowledge of identifier names already used to represent concepts in the software. To address this problem, this study proposes a new approach to automatically suggest part of identifier name. The approach aims to use spatial locality to identify and suggest next terms given identifier name prefix. Spatial locality, in this context, refers to the use of terms in close proximity of documents related to the software system. The performance of our proposed approach is evaluated using six open source software systems. The evaluation result shows that the spatial locality based approach suggests part of identifier names correctly with an average precision of 83.2% and average mean reciprocal rank (MRR) of 25.5%. Of the top four correct suggestions, more than half are ranked in the first and second place.