Review of ways to apply machine learning methods in software engineering

. This article reviews the integration of machine learning (ML) techniques into Software Engineering (SE) across various phases of the software development life cycle (SDLC). The purpose is to investigate the applications of ML in SE, analyze its methodologies, present findings, and draw conclusions regarding its impact. The study categorized ML applications in SE and assessed the performance of various ML algorithms. Authors identified ML applications in SDLC phases, including requirements analysis, design, implementation, testing, and maintenance. ML algorithms, such as supervised and unsupervised learning, are employed for tasks like software requirement identification, design pattern recognition, code generation, and automated testing. In summary, we find that ML-based techniques are experiencing a substantial surge in adoption within the field of software engineering. Nevertheless, it is evident that substantial endeavors are needed to establish thorough comparisons and synergies among these approaches, perform meaningful evaluations grounded in detailed real-world implementations that are applicable to industrial software development. Therefore, our key takeaway is the necessity for a shift in focus towards reproducible research, prioritizing this over isolated novel concepts. Failure to do so may result in the limited practical implementation of these promising applications.


Introduction
In contemporary landscape, the spreading of discussions and scholarly discourse surrounding machine learning (ML), data mining, big data analytics, and artificial intelligence (AI) is readily evident.These domains have become integral components of scientific dialogue, reflecting their substantial influence on modern society.The intensifying interest in these fields has been further accentuated by the emergence of ChatGPT in November 2022, representing a watershed moment in AI development.This development highlights the escalating importance of these technologies and their ongoing transformative impact on various aspects of society, particularly in the realms of technology and information processing.
Machine learning deals with the issue of how to build programs that improve their performance through experience.Machine learning algorithms have proven to be of great practical value in a variety of application domains.Machine learning has been successfully applied in many areas of software engineering, ranging from features extraction to testing to bug fixing.If software developers had a better grasp of machine learning approaches, their assumptions, and guarantees, they might adopt and select the best techniques for their intended applications.To meet the needs of changing approaches to software development, future software engineering (SE) techniques and tools will need to be much more automated, lightweight, adaptable, and scalable to keep pace with increased developer productivity.The growing dependency on applications incorporating machine learning (ML) components necessitates the establishment of advanced engineering methodologies to guarantee their development with robustness and future-proof capabilities.This escalating reliance underscores the critical need for the application of mature and well-structured engineering techniques.
Furthermore, software is an indispensable component of the majority of systems and is integrated into the daily lives of society.With the advancement of technologies such as open systems and highly automated or networked devices, software systems are becoming very complex [1].Additionally, several people from different areas of expertise are usually required to be involved in a software project, which also increases its complexity.Since software is developed by humans, it is usual that people make mistakes; thus, in every commercial piece of software, some errors always occur [2], and as the level of complexity increases, these errors become more significant [3].Automating the SDLC process using machine learning can help solve these problems.We have analyzed several successful examples of the effective use of machine learning techniques in software development.

The research question and methodology
The primary objective of this research study is to investigate the utilization of machine learning (ML) methodologies within the software development life cycle (SDLC) and assess their overall performance.By undertaking this comprehensive examination, our aim is to shed light on the current landscape of ML applications in software engineering and to pinpoint areas where enhancements are essential to optimize the efficacy of these methods.To attain this goal, we have formulated a set of research questions that serve as guiding pillars throughout this inquiry: Research Question 1 (RQ1): What categories of software applications have been identified or documented within the present phase of software development?
Research Question 2 (RQ2): Which specific ML algorithms have been employed during this phase of software development?
Research Question 3 (RQ3): What is the performance evaluation of ML-based techniques, and how do they compare with their non-ML-based counterparts in terms of effectiveness and efficiency?
Structuring the literature review involved breaking down the overall task into several smaller steps so as to enable us to explore the literature for systematically extract relevant information.Firstly, key search strings were utilized: 'Machine learning for software engineering', 'Machine learning + software engineering', 'Machine learning for SDLC', 'Machine learning + (and | for | +) + software requirement', 'Machine learning + (and | for | +) + software design', 'Machine learning + (and | for | +) + software testing', 'Machine learning + (and | for | +) + software construction' and 'Machine learning + (and | for | +) + software maintenance' so as to identify a baseline set of research papers.Google, Google Scholar, and digital libraries of publications from ACM and IEEE were used to find these publications.
Following the completion of the initial phase of the literature review, the shortlists for each search term were further evaluated.The relevance of publications was examined by reading each abstract and conclusion.Each publication was sorted according to the number of citations it had and the year it was published.The next step of the process involved reading

Background and related works
The interaction between software engineering (SE) and machine learning (ML) has been studied by researchers for a long time [1][2][3].The first Symposium on Software Engineering for Machine Learning Applications (SEMLA) at Polytechnique Montréal was organized on 12 and 13 June 2018, with the support of Polytechnique Montréal's Department of Computer Engineering and Software Engineering, the Institute for Data Valorization (IVADO), SAP, and Red Hat.Around 160 participants from 160 different countries attended the event, including students, professors, and professionals from the business sector.
On the contrary, some studies highlight the gap between the SE (Software Engineering) and ML (Machine Learning) communities, attributing it, in part, to their differing focuses.The ML community primarily concerns itself with algorithms and their performance, whereas the SE community is dedicated to developing and deploying software-intensive systems [4].
However, there are areas of synergy when these two communities collaborate."SE for ML" involves SE experts taking on responsibilities related to engineering ML systems, encompassing tasks like designing, creating, and maintaining software systems that support ML.Researchers in this field strive to identify distinctions between ML system design and conventional software, aiming to develop new strategies and tools to bridge these disparities.
Conversely, "ML for SE" entails the adaptation of AI technologies to address various SE tasks, including software fault prediction, code smell detection, reusability metrics prediction, and cost estimation.Researchers leverage ML models derived from SE data, such as source code, requirement specifications, and test cases, to enhance software engineering's efficiency and effectiveness.
Machine learning (ML) is a branch of research that offers computers the capacity to learn without being explicitly programmed.It was first described by Arthur Samuel in 1959.
The term "software engineering," coined by David Parnas in 1972, is officially defined by the IEEE as the "application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software," essentially applying engineering principles to software creation.This discipline revolves around employing structured methodologies to execute the necessary procedures for analyzing, designing, implementing, and maintaining information systems.Effective planning and preparation are vital in software projects to ensure timely delivery and the production of high-quality software.
Central to software development is the Software Development Life Cycle (SDLC), which constitutes the complete process of constructing any software product.SDLC encompasses a variety of methodologies, including Agile, Waterfall, DevOps, V-Model, Iterative, Dynamic System Development Model, Extreme Programming, Feature Driven Development, Joint Application Development, Spiral, Rapid Application Development, and Lean practices.
The SDLC typically comprises several phases: requirements analysis, design, implementation, testing, and maintenance.These stages collectively govern the journey of software development, ensuring its successful execution and continued functionality [5].
At the present time, software engineering has transitioned from traditional waterfall models to agile software development.A waterfall model is a sequential process where the success of each stage depends on the success of the previous stages.All requirements are thought to be clearly established at project inception and essentially stable after that.Agile processes are iterative software development techniques that offer adaptability and flexibility in response to changing conditions while producing high-quality software.It emphasizes informal, adaptable project management that will improve communication and transparency.
This paper focuses on machine learning for software engineering by systematically reviewing the machine learning literature for software development tasks.

Machine Learning in Software Engineering
As previously noted, the Software Development Life Cycle (SDLC) encompasses five distinct phases [5].In this section, we will delve into the research inquiries associated with each of these SDLC phases.

ML for requirement engineering
Throughout the software development process, requirement engineering (RE) is essential.Prioritization and requirement identification are the key stages of the RE process [6].
RQ2: While numerous machine learning algorithms and techniques are accessible for text processing, they can generally be categorized into two primary groups: supervised learning algorithms (SL) and unsupervised learning algorithms (USL).Additionally, there exists a hybrid category known as semi-supervised learning (SSL), bridging the gap between supervised and unsupervised approaches.
The results of this investigation highlighted two predominant categories of machine learning algorithms within the reviewed primary research.These algorithms primarily belong to two classes: supervised learning (SL) and unsupervised learning (USL).Notably, some primary studies employed thematic analysis or qualitative coding methods.Furthermore, the selected studies illustrated that USL algorithms, particularly Latent Dirichlet Allocation (LDA), emerged as the favored type of machine learning algorithm.Support Vector Machine (SVM) ranked as the second-most prevalent ML algorithm category.It was intriguing to note that a subset of the chosen primary studies eschewed algorithmic approaches, opting instead for thematic or qualitative coding techniques to discern and categorize various software requirements.
The process can be distilled into three primary phases: text preprocessing to eliminate irrelevant content, the application of various ML algorithms during the learning stage, and the subsequent analysis and evaluation of the methodology used by these algorithms.
The chosen research articles revealed a total of six alternative Natural Language Processing (NLP) preprocessing methods.The following is a quick explanation of the many preprocessing methods found.
Text preprocessing involves several key steps, including the removal of stop words, which are auxiliary verbs like "be," "do," and "have," as well as articles such as "the," "a," and "an" [19].Tokenization, another essential technique, breaks down text into individual words [20].Additionally, case unification standardizes text to lowercase or uppercase, while stemming reduces words to their base form, such as "goes," "gone," and "going" becoming "go" [19].Punctuation removal eliminates various punctuations like commas, semicolons, question marks, and exclamation marks.Notably, some studies lack reporting on the majority of these preprocessing steps.In many cases, machine learning-based techniques are considered 'black boxes,' with limited insight into their inner workings.
Regarding performance evaluation, not all selected studies conducted thorough assessments.While LDA and SVM were applied in various research articles, it's noteworthy that their performance outcomes exhibited significant variations.For instance, the LDA algorithm demonstrated strong performance in one study [16], but its effectiveness was less impressive in another [17].

Software design
In the software development life cycle, it is the most inventive phase.This phase's objective is to arrange or plan the required definition.It is the planning and issue-solving process for a software solution.It involves software designers and developers specifying the strategy for a fix.This phase results in a software design document (SDD).
Software design is a highly complex and challenging activity.Nevertheless, using software design patterns makes this phase more organized.A software design pattern can be defined as a presupposed structure of classes organized and interacting in a particular manner to solve a recurring design problem.
RQ1: The studies show that ML is able to be used to avoid some problems in this phase, for instance, detection of the bad smells earlier [5], meaning detecting symptoms that the system's design or programming may be flawed [21].As well, ML-based techniques are able to be used in design pattern recognition (adapter, strategy) [22].Furthermore, some studies experimented with five design patterns (Singleton, Adapter, Composite, Decorator, and Factory Method) [23].
Some types of SDLC, for instance, Agile, divide the architecture of a system into components.Consequently, the selection of software components is part of the design phase.Some studies suggest a novel approach to machine learning [24], which can assist in the selection of reusable software components.
The suggested machine learning approach to selecting reusable components combines the Decision Tree and Neural Network modules to determine the more accurate and suitable object of the software design pattern, which may help with efficient package reuse [24].
RQ3: The authors mentioned that the selected algorithms perform differently in terms of processing speed and classification accuracy [5], and they inform that Naive Bayes, Logistic regression, IB1, IBk, Random Forest have better performance than the VFI and J48 [5].For instance, the authors in [22] inform us that the learning precision of the formulated approach is 67-95% Generally, the ML-based techniques performed well in this phase.Nonetheless, the results are not compared with other traditional techniques (non-ML-based techniques).It's considerable to observe that although the researchers made an effort to provide impartial results, there may still be some degree of subjectivity, as long as all results are related to the construction of the training set, which is based on a manual design pattern labeling task.

Software construction
This phase involves turning the software design document into code using a programming language.It results in program code; thus, it is the logical one.
RQ1: The studies show that ML models are used for code generation [25,26], documentation generation [27,28], and code modification [29][30][31].The popular models for converting ideas into code are ChatGPT, Codex, and Alphacode.ChatGPT and Codex are models by OpenAI.It interacts in a conversational way.As it is widely known, ChatGPT answers follow-up questions, challenges incorrect assumptions, and rejects improper E3S Web of Conferences 449, 07018 (2023) https://doi.org/10.1051/e3sconf/202344907018PDSED 2023 demands.In addition, it is able to generate code [32].Moreover, Codex is a general-purpose programming model, as it can be applied to any programming task [33].
Additionally, Alphacode is general-purpose programming, it can be applied to programming problems that require for deeper reasoning [34].
RQ2: The selected studies show that a wide range of ML techniques are able to be applied to various code generation tasks.The popular model types used by selected studies include recurrent neural networks [25][26][27][28] and convolutional neural networks [30].ChatGPT is trained using supervision and reinforcement learning (RL).In the supervised learning, human trainers would provide conversations in which they played both sides, the user, and the chat bot side.Then, in the case of reinforcement learning, those people would be given the modelwritten responses to help them compose their response [32].This dataset was combined with the Instruct GPT [35] dataset, which was converted to a question-answer format.
As well as Codex based on GPT-3, a neural network trained on text [35], this model has been trained on 179 gigabytes of Python code from software repositories hosted on GitHub projects.At the same time, Alphacode has been trained on 715.1 gigabytes of code on GitHub, in addition to Codeforces problems.
RQ3: In general, the outcomes were not assessed, considering more traditional techniques.Transformer models outperformed RNN models when the two were compared in an evaluative study [36].Nonetheless, ML models perform imperfectly when evaluated on highly complex, unseen problems [32].

Software testing
Testing is defined as "an activity in which a system is executed under specified conditions, the results are observed or recorded, and an evaluation is made of some aspect of the system" (ISO/IEC 24765, 2006) [37].
In the software product development process, software testing is demanded.Any software product must first pass through several different steps before it can be implemented.Testing allows us to identify issues early.Additionally, participating in testing activities gives developers the ability to study the criteria for critical quality aspects, pose queries, and find solutions in advance.
Automation of software testing has been accepted as a realistic technique to get around the complexity and expense of most testing tasks.To find flaws in software systems, testing entails delving into their behavior.Applying machine learning (ML) to different software testing operations has drawn increasing interest [3].
RQ2: Q-learning was used as a model-free RL algorithm in a smart test framework [39].Furthermore, Model-Inference-Driven testing (MINTest) is used for software test automation [41].It describes itself as a framework for unit and integration testing on its website [42].
RQ3: The studies show that efficient automated software testing is a challenging activity in software development [39][40][41].The resulting test suites greatly improved in terms of defect detection [43].

Software maintenance
According to the IEEE Standard, IEEE STD 1219-15193 [44], software maintenance is: "the modification of a software product after its delivery (to the customer), to correct errors, to improve its performance or other attributes, or to adapt the product to a modified environment".
Understanding software maintenance helps practitioners in the industry deal with many of the problems they currently experience, by reducing uncertainty, improving costeffectiveness, dependability, and other factors [45].This is the final stage of the SDLC.The software being produced is distributed to end users during this stage of the SDLC, who are then in charge of maintaining and utilizing it in accordance with best practices.
RQ1: The most dominant application of using ML in this phase is bug detection [46,47].
In addition, maintenance software has several forms, for instance refactoring, which includes switching out components or algorithms for more elegant ones, updating data naming standards, and improving the readability or understandability of the code [47].There are a few studies that discuss building a refactoring model, for instance, An AI-data-based approach to early quality evaluation and enhancement of object-oriented software products was proposed in the paper "A machine learning approach to software model refactoring" [48].
RQ2: Our study shows that a wide range of ML techniques have been applied in this phase.However, the CNN-based deep learning model is proposed for recognizing duplicate or similar bug reports [46].Besides, three supervised machine learning algorithms are considered to build the model and predict the occurrence of the software bugs based on historical data by deploying the classifiers logistic regression, Nave Bayes, and decision tree [47].
A deep neural network that learns to detect the existence of functional decomposition in UML models of object-oriented software is used to implement model refactoring [48].The study's proposed method [47] uses data science techniques to obtain an understanding of multidimensional software design aspects and then applies the knowledge acquired to generalize nuanced interactions between architectural elements [49][50].
RQ3: The selected studies don't have very clear and effective evaluation methods.However, some studies show that some algorithms were able to generate 100% accuracy with train and test datasets [47].On the other hand, the authors mentioned that the selected algorithm is empirically evaluated and shows high accuracy [48].Furthermore, as with any ML model, the studies ensure that the results depend on the data.For instance, the proposed system in one of the studies provides a high accuracy rate for the same domain datasets and a low accuracy rate for different domain datasets [46].In addition, the subjective nature of software affects the evaluation process [48].

Conclusion
Many authors have put significant effort into applying ML for SE.They were paying attention to give objective evaluations.However, it is able to contain some degree of subjectivity.Besides, it was quite significant to observe that this research study shows that a wide range of ML techniques can be applied to various phases of SDLC.One of the main conclusions is that applying machine learning algorithms correctly throughout the software development process is a very challenging task.Finally, we conclude that this study calls for the efficient cooperation venture between the ML and SE researchers to handle the open challenges.