Publications

How Do Software Developers Use ChatGPT? An Exploratory Study on GitHub Pull Requests

Published in 2024 IEEE/ACM 21st International Conference on Mining Software Repositories (MSR), 2024

Nowadays, Large Language Models (LLMs) play a pivotal role in software engineering. Developers can use LLMs to address software development-related tasks such as documentation, code refactoring, debugging, and testing. ChatGPT, released by OpenAI, has become the most prominent LLM. In particular, ChatGPT is a cutting-edge tool for providing recommendations and solutions for developers in their pull requests (PRs). However, little is known about the characteristics of PRs that incorporate ChatGPT compared to those without it and what developers usually use it for. To this end, we quantitatively analyzed 243 PRs that listed at least one ChatGPT prompt against a representative sample of 384 PRs without any ChatGPT prompts. Our findings show that developers use ChatGPT in larger, time-consuming pull requests that are five times slower to be closed than PRs that do not use ChatGPT. Furthermore, we perform a qualitative analysis to build a taxonomy of the topics developers primarily address in their prompts. Our analysis results in a taxonomy comprising 8 topics and 32 sub-topics. Our findings highlight that ChatGPT is often used in review-intensive pull requests. Moreover, our taxonomy enriches our understanding of the developer’s current applications of ChatGPT.

Recommended citation: Chouchen, M., Bessghaier, N., Begoug, M., Ouni, A., AlOmar, E. A., & Mkaouer, M. W. (2024, April). How Do So ware Developers Use ChatGPT? An Exploratory Study on GitHub Pull Requests. In 2024 IEEE/ACM 21st International Conference on Mining Software Repositories (MSR) (pp. 212-216). IEEE. https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=10555786

On the prevalence, co-occurrence, and impact of infrastructure-as-code smells

Published in 2024 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER), 2024

In modern software systems, Infrastructure-as-Code (IaC) tools play a pivotal role in automating the management of various infrastructure resources such as networks, databases, and services. This automation is done through code-based specification files, commonly known as IaC files. Similarly to other code files, IaC files can suffer from violations of established implementation and design standards, i.e., IaC smells. Although prior research has studied various aspects of traditional smells in non-IaC artifacts, there is little knowledge of how IaC smells are prevalent, co-occurring, and impacting the change and defect proneness of IaC code. To fill this gap, we conduct an empirical study encompassing 82 Puppet-based open-source projects. Our investigation focused on 12 types of IaC smells in both implementation and design levels. Our findings reveal that IaC smells do not manifest uniformly, as IaC smells that are particularly associated with modularity issues, exhibit high prevalence rates across projects. Additionally, we found that 74% of IaC files are smelly and over 52% of the smelly IaC files have at least two co-occurring IaC smells. Furthermore, our findings highlight that, on average, smelly IaC files are modified nearly 3.8 times, in terms of number of commits, more frequently than non-smelly IaC files. Furthermore, smelly IaC files are found to be 3.1 times more prone to larger code changes, in terms of code churn, than non-smelly IaC files. Additionally, we found that smelly IaC files are 3.3 times more prone to the introduction of defects that are likely to persist in 1.65 more commits before being fixed than non-smelly IaC files. These findings advocate developers to be more aware of IaC smells in their projects and consider their correction

Recommended citation: Bessghaier, N., Begoug, M., Mebarki, C., Ouni, A., Sayagh, M., & Mkaouer, M. W. (2024, March). On the prevalence, co-occurrence, and impact of infrastructure-as-code smells. In 2024 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER) (pp. 23-34). IEEE. https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=10589858

What Constitutes the Deployment and Run-time Configuration System? An Empirical Study on OpenStack Projects

Published in ACM Transactions on Software Engineering and Methodology, 2023

Modern software systems are designed to be deployed in different configured environments (e.g., permissions, virtual resources, network connections), and adapted at run-time to different situations (e.g., memory limits, enabling/disabling features, database credentials). Such a configuration during the deployment and run-time of a software system is implemented via a set of configuration files, which together constitute what we refer to as a “configuration system”. Recent research efforts investigated the evolution and maintenance of configuration files. However, they merely focused on a limited part of the configuration system (e.g., specific infrastructure configuration files or Dockerfiles), and their results do not generalize to the whole configuration system. To cope with such a limitation, we aim by this paper to better capture and understand what files constitute a configuration system. To do so, we leverage an open Card Sort technique to qualitatively study 1,756 configuration files from OpenStack, a large and widely studied open-source software ecosystem. Our investigation reveals the existence of nine types of configuration files, which cover the creation of the infrastructure on top of which OpenStack will be deployed, along with other types of configuration files used to customize OpenStack after its deployment. These configuration files are interconnected while being used at different deployment stages….

Recommended citation: Bessghaier, N., Sayagh, M., Ouni, A., & Mkaouer, M. W. (2023). What Constitutes the Deployment and Run-time Configuration System? An Empirical Study on OpenStack Projects. ACM Transactions on Software Engineering and Methodology. http://NarjesBessghaier.github.io/files/OpenStackConfig.pdf

What Do Infrastructure-as-Code Practitioners Discuss: An empirical Study on Stack Overflow

Published in ESEM, 2023

Background. Infrastructure-as-Code (IaC) is an emerging practice to manage cloud infrastructure resources for software systems. Modern software development has evolved to embrace IaC as a best practice for consistently provisioning and managing infrastructure using various tools such as Terraform and Ansible. However, recent studies highlighted that developers still encounter various challenges with IaC tools. Aims. We aim in this paper to understand the different challenges that developers encounter with IaC and analyze the trend of seeking assistance on Q&A platforms in the context of IaC. To this end, we conduct a large-scale empirical study investigating developers’ discussions in Stack Overflow. Method. We first collect IaC-relevant tags on Stack Overflow, constituting a dataset that comprises 52,692 questions and 64,078 answers. Then, we group questions into specific topics using the Latent Dirichlet Allocation (LDA) method, which we optimize using a Genetic Algorithm (GA) for parameter’s fine-tuning. Finally, to gain better insights, we analyze the identified topics based on different criteria such as popularity and difficulty. Results. Our findings reveal an average yearly increase of 150% in terms of IaC-related questions and 135% in terms of users between 2011 and 2022. Furthermore, we observe that IaC questions revolve around seven main topics: server configuration, policy configuration, networking, deployment pipelines, variable management, templating, and file management. Notably, we found that server configuration and file management are the most popular topics, i.e., the most discussed among IaC developers, while the deployment pipelines and templating topics are the most difficult. Conclusions. Our results shed light on IaC challenges that are often encountered by developers on popular Q&A platforms. These findings reveal important implications for practitioners seeking better support for IaC tools in real-world settings and for researchers to better understand the IaC community needs and further investigate IaC in different aspects.

Recommended citation: Begoug, M., Bessghaier, N., Ouni, A., AlOmar, E. A., & Mkaouer, M. W. (2023, October). What do infrastructure-as-code practitioners discuss: An empirical study on stack overflow. In 2023 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM) (pp. 1-12). IEEE. https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=10304847

On the Impact of Aesthetic Defects on the Maintainability of Mobile Graphical User Interfaces: An Empirical Study

Published in Information Systems Frontiers, 2022

As the development of Android mobile applications continues to grow and to follow up its high increase in demand and market share, there is a need for automating the evaluation of Graphical Mobile User Interfaces (GMUI) to detect any associated defects as they are perceived to lead to bad overall usability. Although, there is growth in research targeting the assessment of mobile user interfaces, there is a lack of studies assessing their impact on quality. The goal of this work is to analyze the impact of defects on the maintainability of user interfaces by studying the connection between the existence of defects and the change-proneness of user interfaces. We empirically study the impact of 8 aesthetics defects in 56 releases of 5 Android applications and examine the diffuseness of GMUI defects throughout mobile apps evolution. Then, we investigate whether infected classes are changed more frequently, and have a larger change-size than other non-infected classes in terms of Change Frequency (CF) and Change-Size (CS). Moreover, we studied the survivability and co-occurrences of GMUI defects in order to prioritize their corrections. Our empirical validation confirms that the infected user interfaces are more prone to undergo many changes than other user interfaces, and there are some severe aesthetic defects still exists even after makingmany improvements in the code that may need more maintenance efforts.

Recommended citation: Soui, M., Chouchane, M., Bessghaier, N., Mkaouer, M. W., & Kessentini, M. (2021). On the impact of aesthetic defects on the maintainability of mobile graphical user interfaces: An empirical study. Information Systems Frontiers, 1-18. http://NarjesBessghaier.github.io/files/On_the_Impact_of_Aesthetic_Defects_on_the_Maintain.pdf

A longitudinal exploratory study on code smells in server side web applications

Published in Software Quality Journal, 2021

Modern web applications have become one of the largest parts of the current software market over years, bringing cross-platform compatibility and data integration advantages that encouraged businesses to shift toward their adoption. Like any software application, code smells can be manifested as violations of implementation and design standards which could impact the maintainability, comprehensibility and performance of web applications. While there have been extensive studies on traditional code smells recently, little knowledge is available on code smells in web-based applications (web apps). As web applications are split into their client and server sides, we present in this study a first step in exploring the code smells diffuseness and effect on the server side of web applications. To this end, we conduct an exploratory study on a total of 430 releases from 10 long-lived open-source web-based applications on 12 common code smell types. We aim to better understand and gain insights into the diffuseness of code smells, their co-occurrences and effects on the change- and fault-proneness in server side code. Our study delivers several important findings. First, code smells are not equally diffused in web apps server side, among which smells related to complex, and large code components display high diffuseness and frequency rates. Second, the co-occurrence phenomenon is highly common, but the association degree between code smell pairs is weak. Code smells related to large size and high complexity exhibit a higher degree of co-occurrences. Third, smelly files are more likely to change than smell-free files, whereas not all smell types are likely to cause equal change sizes in the code base. Fourth, smelly files are more vulnerable to faults than smell-free files, and 86% of smelly files are more likely to manifest more faults than other files. Hence, developers should be aware of the existence of code smells in their web applications and consider detecting and refactoring them from their code bases, using appropriate tools.

Recommended citation: Bessghaier, N., Ouni, A., & Mkaouer, M. W. (2021). A longitudinal exploratory study on code smells in server side web applications. Software Quality Journal, 29, 901-941. http://NarjesBessghaier.github.io/files/Bessghaier2021-CodeSmells.pdf

Towards the Automatic Restructuring of Structural Aesthetic Design of Android User Interfaces

Published in Computer Standards & Interfaces, 2021

End-user engagement heavily relies on the aesthetic design of the application’s user interfaces. Designers are keen to create user interfaces that are usable and appealing. However, fundamental design issues , such as inconsistent padding and margins, cluttered user interfaces, and a high variation of element sizes, are too frequent in a UI design.. Prior studies provided ready-to-implement user interface alternatives. However, the aesthetic quality of these alternative designs is not guaranteed, and it limits the creativity of designers. Therefore, we present in this study an automated approach for restructuring a user interface structural design based on its data model. Our framework checks the violation of 13 generic structural design standards provided by Google Material Design. Then, the framework provides a set of recommendations for each violated guideline based on the specifications of the evaluated MUI. As a proof of concept, we used the tool ADDET to evaluate the quality of the original and restructured versions of 511 user interfaces in terms of the number of aesthetic defects and aesthetic properties. The results revealed a significant positive difference with a mean of 0.59 for the benefit of restructured user interfaces with an improved set of 7 quality metrics. We have also found that our approach could improve to an extent the accessibility of some designs by providing bigger element sizes.

Recommended citation: Bessghaier, N., Soui, M., & Ghaibi, N. (2022). Towards the automatic restructuring of structural aesthetic design of Android user interfaces. Computer Standards & Interfaces, 81, 103598. http://NarjesBessghaier.github.io/files/MUIRestructuring.pdf

On the Diffusion and Impact of Code Smells in Web Applications

Published in book: Services Computing – SCC 2020, 17th International Conference, 2020

Web applications (web apps) have become one of the largest parts of the current software market over years. Modern web apps offer several business benefits over other traditional and standalone applications. Mainly, cross-platform compatibility and data integration are some of the critical features that encouraged businesses to shift towards the adoption of Web apps. Web apps are evolving rapidly to acquire new features, correct errors or adapt to new environment changes especially with the volatile context of the web development. These ongoing amends often affect software quality due to poor coding and bad design practices, known as code smells or anti-patterns. The presence of code smells in a software project is widely considered as form of technical debt and makes the software harder to understand, maintain and evolve, besides leading to failures and unforeseen costs. Therefore, it is critical for web apps to monitor the existence and spread of such anti-patterns. In this paper, we specifically target web apps built with PHP being the most used server-side programming language. We conduct the first empirical study to investigate the diffuseness of code smells in Web apps and their relationship with the change proneness of affected code. We detect 12 types of common code smells across a total of 223 releases of 5 popular and long-lived open-source web apps. The key findings of our study include: 1) complex and large classes and methods are frequently committed in PHP files, 2) smelly files are more prone to change than non-smelly files, and 3) Too Many Methods and High Coupling are the most associated smells with files change-proneness.

Recommended citation: Bessghaier, N., Ouni, A., & Mkaouer, M. W. (2020). On the diffusion and impact of code smells in web applications. In Services Computing–SCC 2020: 17th International Conference, Held as Part of the Services Conference Federation, SCF 2020, Honolulu, HI, USA, September 18–20, 2020, Proceedings 17 (pp. 67-84). Springer International Publishing. http://NarjesBessghaier.github.io/files/2.OntheDiffusionandImpactofCodeSmellsinWebApplications.pdf

On the Detection of Structural Aesthetic Defects of Android Mobile User Interfaces with a Metrics-based Tool

Published in The ACM Transactions on Interactive Intelligent Systems, 2020

Smartphone users are striving for easy-to-learn and use mobile apps user interfaces. Accomplishing these qualities demands an iterative evaluation of the Mobile User Interface (MUI). Several studies stress the value of providing a MUI with a pleasing look and feel to engaging end-users. The MUI, therefore, needs to be free from all kinds of structural aesthetic defects. Such defects are indicators of poor design decisions interfering with the consistency of a MUI and making it more difficult to use. To this end, we are proposing a tool (Aesthetic Defects DEtection Tool (ADDET)) to determine the structural aesthetic dimension of MUIs. Automating this process is useful to designers in evaluating the quality of their designs. Our approach is composed of two modules. (1) Metrics assessment is based on the static analysis of a tree-structured layout of the MUI. We used 15 geometric metrics (also known as structural or aesthetic metrics) to check various structural properties before a defect is triggered. (2) Defects detection: The manual combination of metrics and defects are time-consuming and user-dependent when determining a detection rule. Thus, we perceive the process of identification of defects as an optimization problem. We aim to automatically combine the metrics related to a particular defect and optimize the accuracy of the rules created by assigning a weight, representing the metric importance in detecting a defect. We conducted a quantitative and qualitative analysis to evaluate the accuracy of the proposed tool in computing metrics and detecting defects. The findings affirm the tool’s reliability when assessing a MUI’s structural design problems with 71% accuracy.

Recommended citation: Bessghaier, N., Soui, M., Kolski, C., & Chouchane, M. (2021). On the detection of structural aesthetic defects of android mobile user interfaces with a metrics-based tool. ACM Transactions on Interactive Intelligent Systems (TiiS), 11(1), 1-27. http://NarjesBessghaier.github.io/files/TiiS_2020.pdf

Towards Usability Evaluation of Hybrid Mobile User Interfaces

Published in AICCSA, 2017

Hybrid mobile applications are in an ongoing debate about their usability comparing with native mobile applications. Despite the cross-platform compatibility offered by hybrid apps, many developers tend to go native. This choice is due to some issues in hybrid apps like performance, usability, and security. As web technologies improvements take hold, many developers and technology executives find HTML5 usable for building mobile apps. In this context, we choose to work on assessing the usability of Hybrid User Interfaces (HUI). This study shows the results of an experiment conducted over four hybrid apps to identify their usability defects. A predefined list of 13 structural usability defects selected from literature has been used. Our aim is to create a usability defects base of examples of hybrid applications.

Recommended citation: Bessghaier, N., & Souii, M. (2017, October). Towards usability evaluation of hybrid mobile user interfaces. In 2017 IEEE/ACS 14th International Conference on Computer Systems and Applications (AICCSA) (pp. 895-900). IEEE. http://NarjesBessghaier.github.io/files/AICCSA-2017.pdf