Skip to main content

Deep Learning-Based Code Auto-Completion for Distributed Applications

  • Conference paper
  • First Online:
Distributed Computing and Artificial Intelligence, 19th International Conference (DCAI 2022)

Abstract

Distributed computing has been gaining a continually increasing interest over the past years in research and industrial communities. One of the significant objectives of distributed computing is to provide the infrastructure for performing tasks on independent systems. Utilizing this approach in software development can reduce costs. Consequently, there has been an increasing interest in distributed applications. However, distributed applications need to meet main features, such as scalability, availability, and compatibility. In this context, service-based systems provide an architecture that can support mentioned features. Nevertheless, current services use various technologies and languages, which bring complexity to development. This work aims to facilitate web service development by introducing a deep Learning-based code auto-complete model. This model is used in the toolkit called SmartCLIDE, which provides features to accelerate development using Artificial Intelligence and cloud deployment. The contribution of this work can fall into two steps: First, the top web APIs from a benchmark web service data-set has been identified. Afterward, a data optimization approach has been proposed to systematically augment and improve available web service codes. Second, the service code auto-completion model has been trained, which takes advantage of text generation trends and deep learning methods. The experimental results on web service codes demonstrate that the proposed approach outperforms another general-purpose code-completion model.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 169.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Jinlong, E., Cui, Y., Wang, P., Li, Z., Zhang, C.: Cocloud: enabling efficient cross-cloud file collaboration based on inefficient web apis. IEEE Trans. Parallel Distrib. Syst. 29(1), 56–69 (2017)

    Google Scholar 

  2. Tan, W., Fan, Y., Ghoneim, A., Hossain, M.A., Dustdar, S.: From the service-oriented architecture to the web api economy. IEEE Internet Comput. 20(4), 64–68 (2016)

    Article  Google Scholar 

  3. Bertrand, S., Favier, P.-A., André, J.-M.: Pragmatic software maintainability management using a multi-agent system working in collaboration with the development team. In: International Symposium on Distributed Computing and Artificial Intelligence, pp 201–204. Springer (2020)

    Google Scholar 

  4. Dehghanpour, K., Wang, Z., Wang, J., Yuan, Y., Fankun, B.: A survey on state estimation techniques and challenges in smart distribution systems. IEEE Trans. Smart Grid 10(2), 2312–2322 (2018)

    Article  Google Scholar 

  5. Syriani, E., Luhunu, L., Sahraoui, H.: Systematic mapping study of template-based code generation. Comput. Lang. Syst. Struct. 52, 43–62 (2018)

    Google Scholar 

  6. Iotti, E., Petrosino, G., Monica, S., Bergenti, F.: Two agent-oriented programming approaches checked against a coordination problem. In: International Symposium on Distributed Computing and Artificial Intelligence, pp. 60–70. Springer (2020)

    Google Scholar 

  7. Jalal, S., Yadav, D.K., Negi, C.S.: Web service discovery with incorporation of web services clustering. Int. J. Comput. Appl. 1–12 (2019)

    Google Scholar 

  8. Tang, B., Yan, M., Zhang, N., Ling, X., Zhang, X., Ren, H.: Co-attentive representation learning for web services classification. Expert Syst. Appl. 180, 115070 (2021)

    Article  Google Scholar 

  9. Yang, Y., Qamar, N., Liu, P., Grolinger, K., Wang, W., Li, Z., Liao, Z.: Servenet: a deep neural network for web services classification. In: 2020 IEEE International Conference on Web Services (ICWS), pp 168–175. IEEE (2020)

    Google Scholar 

  10. Gupta, S., Meena, J., Gupta, O.P., et al.: Neural network based epileptic eeg detection and classification (2020)

    Google Scholar 

  11. Casado-Vara, R., González-Briones, A., Prieto, J., Corchado, J.M.: Smart contract for monitoring and control of logistics activities: pharmaceutical utilities case study. In: The 13th International Conference on Soft Computing Models in Industrial and Environmental Applications, pp. 509–517. Springer (2018)

    Google Scholar 

  12. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., Polosukhin, I.: Attention is all you need. Advances in Neural Information Processing Systems, 30 (2017)

    Google Scholar 

  13. Izadi, M., Gismondi, R., Gousios, G.: Codefill: multi-token code completion by jointly learning from structure and naming sequences (2022). arXiv:2202.06689

  14. Allamanis, M., Barr, E.T., Devanbu, P., Sutton, C.: A survey of machine learning for big code and naturalness. ACM Comput. Surv. (CSUR) 51(4), 1–37 (2018)

    Google Scholar 

  15. Adam, K., Netz, L., Varga, S., Michael, J., Rumpe, B., Heuser, P., Letmathe, P.: Model-based generation of enterprise information systems. In: EMISA Forum, vol. 38, no. 1. De Gruyter (2018)

    Google Scholar 

  16. García, Ó., Alonso, R.S., Prieto, J., Corchado, J.M.: Energy efficiency in public buildings through context-aware social computing. Sensors 17(4), 826 (2017)

    Article  Google Scholar 

  17. Lu, S., Guo, D., Ren, S., Huang, J., Svyatkovskiy, A., Blanco, A., Clement, C., Drain, D., Jiang, D., Tang, D., et al.: Codexglue: a machine learning benchmark dataset for code understanding and generation (2021). arXiv:2102.04664

  18. Pinto, R., Conceição, L., Marreiros, G.: Algorithms for context-awareness route generation. In: International Symposium on Ambient Intelligence, pp 93–105. Springer (2020)

    Google Scholar 

  19. Casado-Vara, R., Novais, P., Gil, A.B., Prieto, J., Corchado, J.M.: Distributed continuous-time fault estimation control for multiple devices in iot networks. IEEE Access 7, 11972–11984 (2019)

    Article  Google Scholar 

  20. Costa, A.C.R., et al.: Elements for the agent-based modeling of slavery systems (2020)

    Google Scholar 

  21. Vergara, D., Extremera, J., Rubio, M.P., Dávila, L.P.: The proliferation of virtual laboratories in educational fields. ADCAIJ: Adv. Distrib. Comput. Artif. Intell. J. 9(1), 85 (2020)

    Article  Google Scholar 

  22. Basarslan, M.S., Kayaalp, F., et al.: Sentiment analysis with machine learning methods on social media (2020)

    Google Scholar 

  23. Casado-Vara, R., Martin-del Rey, A., Affes, S., Prieto, J., Corchado, J.M.: Iot network slicing on virtual layers of homogeneous data for improved algorithm operation in smart buildings. Future Gener. Comput. Syst. 102, 965–977 (2020)

    Google Scholar 

  24. Sharma, B.P., Purwar, R.K., et al.: Ensemble boosted tree based mammogram image classification using texture features and extracted smart features of deep neural network (2022)

    Google Scholar 

  25. Shoeibi, N., Karimi, F., Corchado, J.M.: Artificial intelligence as a way of overcoming visual disorders: damages related to visual cortex, optic nerves and eyes. In: International Symposium on Distributed Computing and Artificial Intelligence, pp. 183–187. Springer (2019)

    Google Scholar 

  26. TabNine, Autocompletion with deep learning. https://www.kite.com/ (2019). Accessed 2020

  27. Kite, AI powered code completions. https://www.kite.com/ (2019). Accessed 2020

  28. Oliveira, P.F., Novais, P., Matos, P.: A multi-agent system to manage users and spaces in a adaptive environment system. In: International Conference on Practical Applications of Agents and Multi-Agent Systems, pp. 330–333. Springer (2019)

    Google Scholar 

  29. Radford, A., Jeffrey, W., Child, R., Luan, D., Amodei, D., Sutskever, I., et al.: Language models are unsupervised multitask learners. OpenAI blog 1(8), 9 (2019)

    Google Scholar 

  30. Chen, X., Liu, C., Song, D.: Tree-to-tree neural networks for program translation. Advances in Neural Information Processing Systems, 31 (2018)

    Google Scholar 

  31. Meyrer, G.T., Araújo, D.A., Rigo, S.J.: Code autocomplete using transformers. In: Brazilian Conference on Intelligent Systems, pp. 211–222. Springer (2021)

    Google Scholar 

  32. Allamanis, M., Sutton, C.: Mining source code repositories at massive scale using language modeling. In: 2013 10th Working Conference on Mining Software Repositories (MSR), pp. 207–216. IEEE (2013)

    Google Scholar 

  33. Raychev, V., Bielik, P., Vechev, M.: Probabilistic model for code with decision trees. ACM SIGPLAN Notices 51(10), 731–747 (2016)

    Article  Google Scholar 

  34. Alvarez-Coello, D., Wilms, D., Bekan, A., Gómez, J.M.: Towards a data-centric architecture in the automotive industry. Procedia Comput. Sci. 181, 658–663 (2021)

    Article  Google Scholar 

  35. Programmableweb, Dataset. [16] https://www.programmableweb.com/api/ (2014). Accessed 2020

  36. Liu, M., Tu, Z., Zhu, Y., Xu, X., Wang, Z., Sheng, Q.Z.: Data correction and evolution analysis of the programmableweb service ecosystem. J. Syst. Softw. 182, 111066 (2021)

    Google Scholar 

  37. Conceição, L., Carneiro, J., Marreiros, G., Novais, P.: Applying machine learning classifiers in argumentation context. In: International Symposium on Distributed Computing and Artificial Intelligence, pp. 314–320. Springer (2020)

    Google Scholar 

  38. Kudo, T., Richardson, J.: Sentencepiece: a simple and language independent subword tokenizer and detokenizer for neural text processing (2018). arXiv:1808.06226

  39. Yang, Z., Dai, Z., Yang, Y., Carbonell, J., Salakhutdinov, R.R., Le, Q.V.: Xlnet: generalized autoregressive pretraining for language understanding. Advances in Neural Information Processing Systems, 32 (2019)

    Google Scholar 

  40. López-Sánchez, D., Arrieta, A.G., Corchado, J.M.: Deep neural networks and transfer learning applied to multimedia web mining. In: International Symposium on Distributed Computing and Artificial Intelligence, pp. 124–131. Springer (2017)

    Google Scholar 

  41. Iikura, R., Okada, M., Mori, N.: Improving bert with focal loss for paragraph segmentation of novels. In: International Symposium on Distributed Computing and Artificial Intelligence, pp. 21–30. Springer (2020)

    Google Scholar 

  42. Canito, A., Mota, D., Marreiros, G., Corchado, J.M., Martins, C.: Contextual adaptative interfaces for industry 4.0. In: International Symposium on Distributed Computing and Artificial Intelligence, pp. 149–157. Springer (2020)

    Google Scholar 

  43. Floridi, L., Chiriatti, M.: Gpt-3: its nature, scope, limits, and consequences. Minds Mach. 30(4), 681–694 (2020)

    Article  Google Scholar 

  44. Mishra, V.P.: Texture analysis using wavelet transform. ADCAIJ: Adv. Distr. Comput. Artif. Intell. J. 10(1), 5–13 (2021)

    Google Scholar 

  45. Fukuyama, K., Matsui, K., Omatsu, S., Rivas, A., Corchado, J.M.: Feature extraction and classification of odor using attention based neural network. In: International symposium on distributed computing and artificial intelligence, pp 142–149. Springer (2019)

    Google Scholar 

  46. Pimpalkar, A.P., Raj, R.J.R.: Influence of pre-processing strategies on the performance of ml classifiers exploiting tf-idf and bow features. ADCAIJ: Adv. Distr. Comput. Artif. Intell. J. 9(2), 49 (2020)

    Google Scholar 

Download references

Acknowledgments

This research has been supported by the European Union’s Horizon 2020 research and innovation programme under grant agreement No 871177—This work has been supported by the Institute for Business Competitiveness of Castilla y León, and the European Regional Development Fund under grant CCTT3/20/SA/0002 (AIR-SCity project).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Zakieh Alizadehsani .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Alizadehsani, Z., Pinto-Santos, F., Alonso-Moro, D., Macías, D.B., González-Briones, A. (2023). Deep Learning-Based Code Auto-Completion for Distributed Applications. In: Omatu, S., Mehmood, R., Sitek, P., Cicerone, S., Rodríguez, S. (eds) Distributed Computing and Artificial Intelligence, 19th International Conference. DCAI 2022. Lecture Notes in Networks and Systems, vol 583. Springer, Cham. https://doi.org/10.1007/978-3-031-20859-1_14

Download citation

Publish with us

Policies and ethics