Defesa de Qualificação de Doutorado de Flávio Mota Medeiros 13/05, 08hs

postado em 30 de abr de 2014 10:14 por Franklin de Souza Ramalho   [ 30 de abr de 2014 10:18 atualizado‎(s)‎ ]
Candidato: Flávio Mota Medeiros
Título do trabalho: Strategies to Investigate Preprocessor-Based Bugs and Bad Smells in C Program Families Orientador: Rohit Gheyi

Data: 13/05/2014
Horário: 08hs
Local: Auditório do CEEI

Banca examinadora: Marco Túlio Valente (UFMG), Vander Alves (Universidade de Brasília), Márcio de Medeiros Ribeiro (UFAL), Patrícia Machado (UFCG), Wilkerson Andrade (UFCG).

Resumo:  The C preprocessor (CPP) is a simple, effective, and language independent tool. It is widely used in practice to implement C program families. In this context, developers often use the CPP to handle variability, solve portability problems, and implement individual family members. However, by mixing C code with preprocessor directives, developers may introduce preprocessor-based bugs. Despite the widespread use of the CPP in practice, existing tools have limited support to detect bad smells and bugs in C program families, i.e., the majority of C tools check only one configuration of the source code at time. This way, to detect bugs and bad smells, developers need to check each configuration individually, which is time-consuming and unfeasible in some cases due to the high number of possible configurations. To minimize this problem, we define two strategies to investigate preprocessor-based bugs in C program families. Our strategies consider different types of bugs, such as syntax problems, memory leaks, resource leaks, differencing null pointers, and uninitialized variables. Further, we define a catalogue of refactorings to detect and remove bad smells in preprocessor directives, making the source code less conducive to introducing bugs. Our supporting tool named Colligens, implements our strategies and applies our refactorings automatically. To evaluate our strategies, we perform an empirical study using 40 C program family releases and more than 84,000 commits. We detect 121 preprocessor-based bugs and submit 14 patches to fix bugs that developers have not fixed yet, and they accept 71.43% of them. Regarding our catalogue of refactorings, we evaluate it by removing bad smells in 12 C program families without duplicating code as in previous studies. Our work presents findings that may be useful for C program family developers during their development tasks, contributing to minimize the chances of introducing preprocessor-based bugs and bad smells.