Skip to main content
Erschienen in:
Buchtitelbild

2021 | OriginalPaper | Buchkapitel

RepairNet: Contextual Sequence-to-Sequence Network for Automated Program Repair

verfasst von : Kumar Abhinav, Vijaya Sharvani, Alpana Dubey, Meenakshi D’Souza, Nitish Bhardwaj, Sakshi Jain, Veenu Arora

Erschienen in: Artificial Intelligence in Education

Verlag: Springer International Publishing

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

Compile-time errors can wreak havoc for programmers – seasoned and novice. Often developers spend a lot of time debugging them. An automated system to repair such errors can be a useful aid to the developers for their productivity. In this work, we propose a deep generative model, RepairNet, that automatically repairs programs that fail at compile time. RepairNet is based on sequence-to-sequence modeling and uses both code and error messages to repair the program. We evaluated the effectiveness of our system on 6,971 erroneous submissions for 93 programming tasks. RepairNet outperforms the existing state-of-the-art technique, MACER, with 17% relative improvement of repair accuracy. Our approach can fix 66.4% of the erroneous submissions completely and 14.2% partially.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Literatur
1.
Zurück zum Zitat Bhatia, S., Kohli, P., Singh, R.: Neuro-symbolic program corrector for introductory programming assignments. In: 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE), pp. 60–70. IEEE (2018) Bhatia, S., Kohli, P., Singh, R.: Neuro-symbolic program corrector for introductory programming assignments. In: 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE), pp. 60–70. IEEE (2018)
2.
Zurück zum Zitat Gupta, R., Pal, S., Kanade, A., Shevade, S.: DeepFix: fixing common C language errors by deep learning. In: Thirty-First AAAI Conference on Artificial Intelligence (2017) Gupta, R., Pal, S., Kanade, A., Shevade, S.: DeepFix: fixing common C language errors by deep learning. In: Thirty-First AAAI Conference on Artificial Intelligence (2017)
3.
Zurück zum Zitat Li, J., Galley, M., Brockett, C., Spithourakis, G.P., Gao, J., Dolan, B.: A persona-based neural conversation model. arXiv preprint arXiv:1603.06155 (2016) Li, J., Galley, M., Brockett, C., Spithourakis, G.P., Gao, J., Dolan, B.: A persona-based neural conversation model. arXiv preprint arXiv:​1603.​06155 (2016)
4.
Zurück zum Zitat Goues, C.L., Pradel, M., Roychoudhury, A.: Automated program repair. Commun. ACM 62(12), 56–65 (2019)CrossRef Goues, C.L., Pradel, M., Roychoudhury, A.: Automated program repair. Commun. ACM 62(12), 56–65 (2019)CrossRef
5.
Zurück zum Zitat Liu, K., Koyuncu, A., Kim, D., Bissyandé, T.F.: TBar: revisiting template-based automated program repair. In: Proceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 31–42 (2019) Liu, K., Koyuncu, A., Kim, D., Bissyandé, T.F.: TBar: revisiting template-based automated program repair. In: Proceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 31–42 (2019)
6.
Zurück zum Zitat Chen, Z., Kommrusch, S.J., Tufano, M., Pouchet, L.N., Poshyvanyk, D., Monperrus, M.: Sequencer: sequence-to-sequence learning for end-to-end program repair. IEEE Trans. Softw. Eng. (2019) Chen, Z., Kommrusch, S.J., Tufano, M., Pouchet, L.N., Poshyvanyk, D., Monperrus, M.: Sequencer: sequence-to-sequence learning for end-to-end program repair. IEEE Trans. Softw. Eng. (2019)
7.
Zurück zum Zitat Vasic, M., Kanade, A., Maniatis, P., Bieber, D., Singh, R.: Neural program repair by jointly learning to localize and repair. arXiv preprint arXiv:1904.01720 (2019) Vasic, M., Kanade, A., Maniatis, P., Bieber, D., Singh, R.: Neural program repair by jointly learning to localize and repair. arXiv preprint arXiv:​1904.​01720 (2019)
8.
Zurück zum Zitat Yang, G., Min, K., Lee, B.: Applying deep learning algorithm to automatic bug localization and repair. In: Proceedings of the 35th Annual ACM Symposium on Applied Computing, pp. 1634–1641 (2020) Yang, G., Min, K., Lee, B.: Applying deep learning algorithm to automatic bug localization and repair. In: Proceedings of the 35th Annual ACM Symposium on Applied Computing, pp. 1634–1641 (2020)
9.
Zurück zum Zitat Chhatbar, D., Ahmed, U.Z., Kar, P.: MACER: a modular framework for accelerated compilation error repair. arXiv preprint arXiv:2005.14015 (2020) Chhatbar, D., Ahmed, U.Z., Kar, P.: MACER: a modular framework for accelerated compilation error repair. arXiv preprint arXiv:​2005.​14015 (2020)
10.
Zurück zum Zitat Mesbah, A., Rice, A., Johnston, E., Glorioso, N., Aftandilian, E.: DeepDelta: learning to repair compilation errors. In: Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, pp. 925–936 (2019) Mesbah, A., Rice, A., Johnston, E., Glorioso, N., Aftandilian, E.: DeepDelta: learning to repair compilation errors. In: Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, pp. 925–936 (2019)
11.
Zurück zum Zitat Koyuncu, A., et al.: iFixR: bug report driven program repair. In: Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, pp. 314–325 (2019) Koyuncu, A., et al.: iFixR: bug report driven program repair. In: Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, pp. 314–325 (2019)
12.
13.
Zurück zum Zitat Gupta, R., Kanade, A., Shevade, S.: Deep reinforcement learning for syntactic error repair in student programs. In: Proceedings of the AAAI Conference on Artificial Intelligence, vol. 33, pp. 930–937 (2019) Gupta, R., Kanade, A., Shevade, S.: Deep reinforcement learning for syntactic error repair in student programs. In: Proceedings of the AAAI Conference on Artificial Intelligence, vol. 33, pp. 930–937 (2019)
14.
Zurück zum Zitat Hajipour, H., Bhattacharya, A., Fritz, M.: SampleFix: learning to correct programs by sampling diverse fixes. arXiv preprint arXiv:1906.10502 (2019) Hajipour, H., Bhattacharya, A., Fritz, M.: SampleFix: learning to correct programs by sampling diverse fixes. arXiv preprint arXiv:​1906.​10502 (2019)
15.
Zurück zum Zitat Gupta, R., Kanade, A., Shevade, S.: Deep learning for bug-localization in student programs. arXiv preprint arXiv:1905.12454 (2019) Gupta, R., Kanade, A., Shevade, S.: Deep learning for bug-localization in student programs. arXiv preprint arXiv:​1905.​12454 (2019)
16.
Zurück zum Zitat Endres, M., Sakkas, G., Cosman, B., Jhala, R., Weimer, W.: InFix: automatically repairing novice program inputs. In: 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 399–410. IEEE (2019) Endres, M., Sakkas, G., Cosman, B., Jhala, R., Weimer, W.: InFix: automatically repairing novice program inputs. In: 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 399–410. IEEE (2019)
17.
Zurück zum Zitat Ahmed, U.Z., Kumar, P., Karkare, A., Kar, P., Gulwani, S.: Compilation error repair: for the student programs, from the student programs. In: Proceedings of the 40th International Conference on Software Engineering: Software Engineering Education and Training, pp. 78–87 (2018) Ahmed, U.Z., Kumar, P., Karkare, A., Kar, P., Gulwani, S.: Compilation error repair: for the student programs, from the student programs. In: Proceedings of the 40th International Conference on Software Engineering: Software Engineering Education and Training, pp. 78–87 (2018)
18.
Zurück zum Zitat Lee, J., Song, D., So, S., Oh, H.: Automatic diagnosis and correction of logical errors for functional programming assignments. In: Proceedings of the ACM on Programming Languages, vol. 2, no. OOPSLA, pp. 1–30 (2018) Lee, J., Song, D., So, S., Oh, H.: Automatic diagnosis and correction of logical errors for functional programming assignments. In: Proceedings of the ACM on Programming Languages, vol. 2, no. OOPSLA, pp. 1–30 (2018)
19.
Zurück zum Zitat Das, R., Ahmed, U.Z., Karkare, A., Gulwani, S.: Prutor: a system for tutoring CS1 and collecting student programs for analysis. arXiv preprint arXiv:1608.03828 (2016) Das, R., Ahmed, U.Z., Karkare, A., Gulwani, S.: Prutor: a system for tutoring CS1 and collecting student programs for analysis. arXiv preprint arXiv:​1608.​03828 (2016)
20.
Zurück zum Zitat Bader, J., Scott, A., Pradel, M., Chandra, S.: Getafix: learning to fix bugs automatically. In: Proceedings of the ACM on Programming Languages, vol. 3, no. OOPSLA, pp. 1–27 (2019) Bader, J., Scott, A., Pradel, M., Chandra, S.: Getafix: learning to fix bugs automatically. In: Proceedings of the ACM on Programming Languages, vol. 3, no. OOPSLA, pp. 1–27 (2019)
21.
Zurück zum Zitat Pu, Y., Narasimhan, K., Solar-Lezama, A., Barzilay, R.: \({\text{sk}\_\text{ p }}\): a neural program corrector for MOOCs. In: Companion Proceedings of the 2016 ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for Humanity, pp. 39–40 (2016) Pu, Y., Narasimhan, K., Solar-Lezama, A., Barzilay, R.: \({\text{sk}\_\text{ p }}\): a neural program corrector for MOOCs. In: Companion Proceedings of the 2016 ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for Humanity, pp. 39–40 (2016)
22.
Zurück zum Zitat McCauley, R., et al.: Debugging: a review of the literature from an educational perspective. Comput. Sci. Educ. 18(2), 67–92 (2008)CrossRef McCauley, R., et al.: Debugging: a review of the literature from an educational perspective. Comput. Sci. Educ. 18(2), 67–92 (2008)CrossRef
23.
Zurück zum Zitat Seo, H., Sadowski, C., Elbaum, S., Aftandilian, E., Bowdidge, R.: Programmers’ build errors: a case study (at Google). In: Proceedings of the 36th International Conference on Software Engineering, pp. 724–734 (2014) Seo, H., Sadowski, C., Elbaum, S., Aftandilian, E., Bowdidge, R.: Programmers’ build errors: a case study (at Google). In: Proceedings of the 36th International Conference on Software Engineering, pp. 724–734 (2014)
24.
Zurück zum Zitat Monperrus, M.: Automatic software repair: a bibliography. ACM Comput. Surv. (CSUR) 51(1), 1–24 (2018)CrossRef Monperrus, M.: Automatic software repair: a bibliography. ACM Comput. Surv. (CSUR) 51(1), 1–24 (2018)CrossRef
25.
Zurück zum Zitat Schuster, M., Paliwal, K.K.: Bidirectional recurrent neural networks. IEEE Trans. Sig. Process. 45(11), 2673–2681 (1997)CrossRef Schuster, M., Paliwal, K.K.: Bidirectional recurrent neural networks. IEEE Trans. Sig. Process. 45(11), 2673–2681 (1997)CrossRef
26.
Zurück zum Zitat Graves, A., Jaitly, N., Mohamed, A.R.: Hybrid speech recognition with deep bidirectional LSTM. In: 2013 IEEE Workshop on Automatic Speech Recognition and Understanding, pp. 273–278. IEEE (2013) Graves, A., Jaitly, N., Mohamed, A.R.: Hybrid speech recognition with deep bidirectional LSTM. In: 2013 IEEE Workshop on Automatic Speech Recognition and Understanding, pp. 273–278. IEEE (2013)
27.
Zurück zum Zitat Sundermeyer, M., Alkhouli, T., Wuebker, J., Ney, H.: Translation modeling with bidirectional recurrent neural networks. In: Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 14–25 (2014) Sundermeyer, M., Alkhouli, T., Wuebker, J., Ney, H.: Translation modeling with bidirectional recurrent neural networks. In: Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 14–25 (2014)
28.
Zurück zum Zitat Bahdanau, D., Cho, K., Bengio, Y.: Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473 (2014) Bahdanau, D., Cho, K., Bengio, Y.: Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:​1409.​0473 (2014)
29.
Zurück zum Zitat Cho, K., et al.: Learning phrase representations using RNN encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078 (2014) Cho, K., et al.: Learning phrase representations using RNN encoder-decoder for statistical machine translation. arXiv preprint arXiv:​1406.​1078 (2014)
30.
Zurück zum Zitat Sutskever, I., Vinyals, O., Le, Q.V.: Sequence to sequence learning with neural networks. In: Advances in Neural Information Processing Systems, pp. 3104–3112 (2014) Sutskever, I., Vinyals, O., Le, Q.V.: Sequence to sequence learning with neural networks. In: Advances in Neural Information Processing Systems, pp. 3104–3112 (2014)
31.
Zurück zum Zitat Vinyals, O., Kaiser, Ł., Koo, T., Petrov, S., Sutskever, I., Hinton, G.: Grammar as a foreign language. In: Advances in Neural Information Processing Systems, pp. 2773–2781 (2015) Vinyals, O., Kaiser, Ł., Koo, T., Petrov, S., Sutskever, I., Hinton, G.: Grammar as a foreign language. In: Advances in Neural Information Processing Systems, pp. 2773–2781 (2015)
32.
Zurück zum Zitat Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I., Salakhutdinov, R.: Dropout: a simple way to prevent neural networks from overfitting. J. Mach. Learn. Res. 15(1), 1929–1958 (2014)MathSciNetMATH Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I., Salakhutdinov, R.: Dropout: a simple way to prevent neural networks from overfitting. J. Mach. Learn. Res. 15(1), 1929–1958 (2014)MathSciNetMATH
34.
Zurück zum Zitat Denny, P., Luxton-Reilly, A., Tempero, E.: All syntax errors are not equal. In: Proceedings of the 17th ACM Annual Conference on Innovation and Technology in Computer Science Education, pp. 75–80 (2012) Denny, P., Luxton-Reilly, A., Tempero, E.: All syntax errors are not equal. In: Proceedings of the 17th ACM Annual Conference on Innovation and Technology in Computer Science Education, pp. 75–80 (2012)
35.
Zurück zum Zitat Robins, A.V.: Novice programmers and introductory programming. In: Cambridge Handbooks in Psychology. The Cambridge Handbook of Computing Education Research, pp. 327–376 (2019) Robins, A.V.: Novice programmers and introductory programming. In: Cambridge Handbooks in Psychology. The Cambridge Handbook of Computing Education Research, pp. 327–376 (2019)
36.
Zurück zum Zitat Ottosson, S., Zaslavskyi, V.: Visualize what to be coded before programming. In: 2019 IEEE International Conference on Advanced Trends in Information Theory (ATIT), pp. 355–358. IEEE (2019) Ottosson, S., Zaslavskyi, V.: Visualize what to be coded before programming. In: 2019 IEEE International Conference on Advanced Trends in Information Theory (ATIT), pp. 355–358. IEEE (2019)
40.
Zurück zum Zitat Le Goues, C., Nguyen, T., Forrest, S., Weimer, W.: GenProg: a generic method for automatic software repair. IEEE Trans. Softw. Eng. 38(1), 54–72 (2011)CrossRef Le Goues, C., Nguyen, T., Forrest, S., Weimer, W.: GenProg: a generic method for automatic software repair. IEEE Trans. Softw. Eng. 38(1), 54–72 (2011)CrossRef
Metadaten
Titel
RepairNet: Contextual Sequence-to-Sequence Network for Automated Program Repair
verfasst von
Kumar Abhinav
Vijaya Sharvani
Alpana Dubey
Meenakshi D’Souza
Nitish Bhardwaj
Sakshi Jain
Veenu Arora
Copyright-Jahr
2021
DOI
https://doi.org/10.1007/978-3-030-78292-4_1

Premium Partner