Abstract:
Code reuse serves as a critical activity in the software development world as it encourages
efficiency and reduces redundancy while resulting in improved quality software products.
Nowadays, with a regular change in technology — especially in e-commerce websites — a
developer's ability to effectively utilize old code will allow them time-to-market quicker and
possibly avoid many errors to re-use already validated code. One of the solutions to automate
this process is by using recommender systems that help developers easily find specific code
snippets or components they need to complete their task as they relate to re-using pieces of code.
This study introduces a novel Python code reuse recommendation system designed to assist
developers in the e-commerce domain. By employing Natural Language Processing (NLP)
techniques, our system uses the BERT model to assess and measure the similarity between
software requirements. Once the requirements are analyzed, the corresponding code is pre
processed and further evaluated using the CodeBERT model to determine the degree of code
similarity. Our findings demonstrate a strong correlation between similar requirements and the
development of similar software, reinforcing the potential for efficient code reuse across
projects. This system offers significant advantages for requirements engineers and developers
by facilitating the re-utilization of existing code within the same domain, thereby streamlining
the development process.