Code Naturalness to Assist Search Space Exploration in Search-Based Program Repair Methods
Automated Program Repair (APR) is a research field that has recently gained attention due to its advances in proposing methods to fix buggy programs without human intervention. Search-Based Program Repair methods have difficulties to traverse the search space, mainly, because it is challenging and costly to evaluate each variant. Therefore, aiming to improve each program’s variant evaluation through providing more information to the fitness function, we propose the combination of two techniques, Doc2vec and LSTM, to capture high-level differences among variants and to capture the dependence between source code statements in the fault localization region. The experiments performed with the IntroClass benchmark show that our approach captures differences between variants according to the level of changes they received, and the resulting information is useful to balance the search between the exploration and exploitation steps. Besides, the proposal might be promising to filter program variants that are adequate to the suspicious portion of the code.
KeywordsAutomated Program Repair Search space exploration Code naturalness
This study was financed in part by the Coordenação de Aperfeiçoamento de Pessoal de Nível Superior - Brasil (CAPES) - Finance Code 001 and by the Fundação de Amparo à Pesquisa de Goiás (FAPEG).
- 2.de Souza, E.F., Le Goues, C., Camilo-Junior, C.G.: A novel fitness function for automated program repair based on source code checkpoints. In: Proceedings of the Genetic and Evolutionary Computation Conference, GECCO 2018, pp. 1443–1450. ACM, New York (2018)Google Scholar
- 3.Amorim, L.A., Freitas, M.F., Dantas, A., de Souza, E.F., Camilo-Junior, C.G., Martins, W.S.: A new word embedding approach to evaluate potential fixes for automated program repair. In: Proceeding of the 2018 International Joint Conference on Neural Networks (IJCNN), pp. 1–8, July 2018Google Scholar
- 4.Roque, L., Dantas, A., Camilo-Junior, C.G.: Programming style analysis with recurrent neural network to automatic pull request approval. In: Proceedings of The 2019 International Joint Conference on Neural Networks (IJCNN). ijcnn.org (2019, to be appear)Google Scholar
- 5.Hindle, A., Barr, E.T., Su, Z., Gabel, M., Devanbu, P.: On the naturalness of software. In: Proceedings of the 34th International Conference on Software Engineering, ICSE 2012, pp. 837–847. IEEE Press, Piscataway (2012)Google Scholar
- 6.Jimenez, M., Checkam,T.T., Cordy, M., Papadakis, M., Kintis, M., Le Traon, Y., Harman, M.: Are mutants really natural?: A study on how naturalness helps mutant selection. In: Proceedings of the 12th ESEM, page 3. ACM, 2018Google Scholar
- 7.Le, Q., Mikolov, T.: Distributed representations of sentences and documents. In: Proceedings of the 31st International Conference on Machine Learning, vol. 32, ICML 2014, pp. II-1188–II-1196. JMLR.org (2014)Google Scholar