## 4 Intelligent Source Code Completion Assistants
### Intelligent vs. Traditional Source Code Completion Assistants  
Traditional source code completion assistants usually list all the attributes or methods that are available at a certain point of the source code, usually after \".\" is pressed. The developer can then select an appropriate method from an alphabetically ordered list. The process is often slower than writing the method's name manually [2; 21]. As a result, the authors identified a need for more intelligent assistants that would not arrange suggestions on an alphabetical basis but rather in a relevance-based order. Artificial intelligence methods have been employed to supplement the source code, proving to be very promising in source code modelling [1; 7]. The main functionalities of traditional assistants that were reported in primary studies are summarised in Table 1.  
Unlike traditional source code completion assistants, intelligent assistants consider the context from both the current program and various other projects to recognise common patterns. By discerning these patterns, they can gauge the developer's intent. This determination often hinges on variable names or method sequences, leading to contextually relevant suggestions. Instead of offering all possible suggestions like traditional assistants, intelligent ones provide those aligned with recognised patterns, streamlining the developer's task. While the current state-of-the-art does not alleviate developers entirely, it can automate the writing of frequently used and proven code sections. This automation lets developers concentrate on more complex, creative challenges [26]. The effectiveness of this approach is contingent on vast datasets that the intelligent assistant learns from. Without the plethora of open-source projects on repositories like GitHub, AI-based code completion would not be feasible. In Table 2, we outline the functionalities that intelligent assistants offer beyond the traditional ones. We identified six in total, with _contextual program continuation_ being mentioned the most frequently. The primary function of intelligent assistants is their ability to determine which elements come after the current one based on the existing source code [25]. The intelligent assistants try to relieve developers from thinking about the names of methods, variables, and other source code elements without requiring developers to write a single letter. When developers are under constant pressure to deliver high-quality source code in the shortest possible time, using tools that allow the generation of program continuation suggestions is essential. The tools can save a lot of work [34], speed up development [7], and, as a result, increase the productivity of developers [29; 30]. Assistants based on artificial intelligence differ from traditional ones in that, when they generate suggestions for program continuation, they use the information available not only at the time of compilation but also from common patterns found in various freely accessible repositories [21]. Thus, in addition to the already defined source code elements, they can propose those not yet present in the local context (eng. zero-day source code tokens) [1; 22]. An essential feature of intelligent assistants is that they generate suggestions and rank them by relevance. The \begin{table}
\begin{tabular}{c c} \hline \hline
**Functionalities** & **Sources** \\ \hline Completing the current word (names of methods, variables, attributes,...) & [21; 22; 30] \\ Generating context-sensitive program continuation suggestions & [2; 4; 9; 22; 26; 28; 23; 24; 25; 26; 27; 28; 29; 32; 33; 34; 35] \\ Displaying information about the methods and attributes of the current object (explore API) & [2; 21; 24] \\ Generating new variable or method name suggestions & [1] \\ Generating natural language based on source code continuation suggestions (considers method and & [7] \\ variable names and comments) & [7] \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The main functionalities of intelligent source code completion assistants.