Abstract
Analyzing the change in source code is a very crucial activity for object-oriented parallel programming software. This paper suggested an Impact analysis method with Attention BiLSTM (IABLSTM) for detecting the changes and their affected part in the object-oriented software system. Classical approaches based on control flow graph, program dependence analysis, latent dirichlet allocation, and data mining have been used for change impact analysis. A Path2Vec approach is presented in the paper, combining a deep learning technique with word embedding to analyze and identify the change. The paper considers two versions of a python program for experiment and generates the abstract syntax tree (AST). Then extract the path to produce a token sequence. Next, convert the token sequence into unique vectors by applying a word embedding layer. The BiLSTM network encodes the sequence into a vector representation. After that, compare the embedded output with the use of cosine distance metrics. We trained the neural network model with the embedded outcome. Then decode the resultant token sequence into a path of AST. Finally, convert the AST path back to code using the un-parsing technique. To strengthen the parallel programming based proposed model, we combined the attention mechanism to emphasize and detect the differences in the code. The model is detecting the change of code efficiently. The experimental results show that our proposed model's change detection accuracy increases significantly compared with other conventional models for change impact analysis. The proposed method can also be applied for impact analysis on object-oriented based parallel programming. The empirical evaluation shows that the model outperforms change detection with approximately 85% validation accuracy.
Similar content being viewed by others
References
Ahmad, S., Ghani, A.A.A., Sani, F.M.: Dependence flow graph for analysis of aspect oriented programs. Int. J. Softw. Eng. Appl. 5(6), 125 (2014)
Alon, U., Zilberstein, M., Levy, O., Yahav, E.: A general path-based representation for predicting program properties. ACM SIGPLAN Notices 53(4), 404–419 (2018)
Angerer, F., Grimmer, A., Prähofer, H., Grünbacher, P.: Change impact analysis for maintenance and evolution of variable software systems. Autom. Softw. Eng. 26(2), 417–461 (2019)
Baah, G.K., Podgurski, A., Harrold, M.J.: The probabilistic program dependence graph and its application to fault diagnosis. IEEE Trans. Softw. Eng. 36(4), 528–545 (2010)
Badri, L., Badri, M., St-Yves, D.: Supporting predictive change impact analysis: a control call graph based technique. In: Proceedings of Asia-Pacific Software Engineering Conference, p. 9. IEEE (2005)
Bohner, S.A.: Impact analysis in the software change process: a year 2000 perspective. In: icsm, vol. 96, pp. 42–51 (1996)
Büch, L., Andrzejak, A.: Learning-based recursive aggregation of abstract syntax trees for code clone detection. In: Proceedings of International Conference on Software Analysis, Evolution and Reengineering, pp. 95–104 (2019)
Dam, H.K., Pham, T., Ng, S.W., Tran, T., Grundy, J., Ghose, A., Kim, T., Kim, C.J.: A deep tree-based model for software defect prediction. arXiv preprint arXiv. 1802.00921 (2018). https://www.sri.inf.ethz.ch/py150
Eid, S., Makady, S., Ismail, M.: Detecting software performance problems using source code analysis techniques. Egypt. Inform. J. 21(4), 219–229 (2020)
Gethers, M., Kagdi, H., Dit, B., Poshyvanyk, D.: An adaptive approach to impact analysis from change requests to source code. In: Proceedings of IEEE/ACM International Conference on Automated Software Engineering, pp. 540–543 (2011)
Goknil, A., Kurtev, I., Berg, K.V.: A rule-based change impact analysis approach in software architecture for requirements changes. arXiv preprint arXiv. 1608.02757 (2016)
Hameed, Z., Garcia-Zapirain, B.: Sentiment classification using a single-layered BiLSTM model. IEEE Access. 8, 73992–74001 (2020)
Hoang, T., Kang, H.J., Lo, D., Lawall, J.: CC2Vec: distributed representations of code changes. In: Proceedings of ACM/IEEE International Conference on Software Engineering, pp. 518–529 (2020)
Kitsu, E., Omori, T., Maruyama, K.: Detecting program changes from edit history of source code. In: Proceedings of Asia-Pacific Software Engineering Conference, vol. 1, pp. 299–306. IEEE (2013)
Le, T.H., Chen, H., Babar, M.A.: Deep learning for source code modeling and generation: models, applications, and challenges. ACM Comput. Surv. (CSUR) 53(3), 1–38 (2020)
Liang, H., Yu, Y., Jiang, L., Xie, Z.: Seml: a semantic LSTM model for software defect prediction. IEEE Access 7, 83812–83824 (2019)
Meng, Y., Liu, L.: A deep learning approach for a source code detection model using self-attention. Complexity (2020)
Molderez, T., Stevens, R., De Roover, C.: Mining change histories for unknown systematic edits. In: Proceedings of International Conference on Mining Software Repositories, pp. 248–256. IEEE (2017)
Musco, V., Carette, A., Monperrus, M., Preux, P.: A learning algorithm for change impact prediction. In: Proceedings of the International Workshop on Realizing Artificial Intelligence Synergies in Software Engineering, pp. 8–14. IEEE (2016)
Rahman, M., Watanobe, Y., Nakamura, K.: A neural network based intelligent support model for program code completion. Sci. Program. (2020)
Siow, J.K., Gao, C., Fan, L., Chen, S., Liu, Y.: Core: automating review recommendation for code changes. In: Proceedings of the International Conference on Software Analysis, Evolution and Reengineering, pp. 284–295. IEEE (2020)
Thomas, S.W., Adams, B., Hassan, A.E., Blostein, D.: Validating the use of topic models for software evolution. In: Proceeding of IEEE Working Conference on Source Code Analysis and Manipulation, pp. 55–64 (2010)
Tiwang, R., Oladunni, T., Xu, W.: A deep learning model for source code generation. In: SoutheastCon, pp. 1–7. IEEE (2019)
Wang, W., Li, G., Ma, B., Xia, X., Jin, Z.: Detecting code clones with graph neural network and flow-augmented abstract syntax tree. In: Proceedings of International Conference on Software Analysis, Evolution and Reengineering, pp. 261–271. IEEE (2020)
White, M., Tufano, M., Vendome, C., Poshyvanyk, D.: Deep learning code fragments for code clone detection. In: Proceedings of the International Conference on Automated Software Engineering (ASE), pp. 87–98. IEEE (2016)
Zhang, J., Wang, X., Zhang, H., Sun, H., Wang, K., Liu, X.: A novel neural source code representation based on abstract syntax tree. In: Proceedings of IEEE/ACM International Conference on Software Engineering (ICSE), pp. 783–794 (2019)
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflicts of interest
The authors declared no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Pathik, B., Sharma, M. Source code change analysis with deep learning based programming model. Autom Softw Eng 29, 15 (2022). https://doi.org/10.1007/s10515-021-00305-x
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s10515-021-00305-x