173 research outputs found

    Scheduling Refactoring Opportunities Using Computational Search

    Full text link
    Maintaining a high-level code quality can be extremely expensive since time and monetary pressures force programmers to neglect improving the quality of their source code. Refactoring is an extremely important solution to reduce and manage the growing complexity of software systems. Developers often need to make trade-offs between code quality, available resources and delivering a product on time, and such management support is beyond the scope and capability of existing refactoring engines. The problem of finding the optimal sequence in which the refactoring opportunities, such as bad smells, should be ordered is rarely studied. Due to the large number of possible scheduling solutions to explore, software engineers cannot manually find an optimal sequence of refactoring opportunities that may reduce the effort and time required to efficiently improve the quality of software systems. In this paper, we use bi-level multi-objective optimization to the refactoring opportunities management problem. The upper level generates a population of solutions where each solution is defined as an ordered list of code smells to fix which maximize the benefits in terms of quality improvements and minimize the cost in terms of number of refactorings to apply. The lower level finds the best sequence of refactorings that fixes the maximum number of code smells with a minimum number of refactorings for each solution (code smells sequence) in the upper level. The statistical analysis of our experiments over 30 runs on 6 open source systems and 1 industrial project shows a significant reduction in effort and better improvements of quality when compared to state-of-art bad smells prioritization techniques. The manual evaluation performed by software engineers also confirms the relevance of our refactoring opportunities scheduling solutions.Master of ScienceComputer Science, College of Engineering and Computer ScienceUniversity of Michigan-Dearbornhttp://deepblue.lib.umich.edu/bitstream/2027.42/136063/1/Scheduling Refactoring Opportunities Using Computational Search.pd

    A Mono- and Multi-objective Approach for Recommending Software Refactoring

    Get PDF
    Les systĂšmes logiciels sont devenus de plus en plus rĂ©pondus et importants dans notre sociĂ©tĂ©. Ainsi, il y a un besoin constant de logiciels de haute qualitĂ©. Pour amĂ©liorer la qualitĂ© de logiciels, l’une des techniques les plus utilisĂ©es est le refactoring qui sert Ă  amĂ©liorer la structure d'un programme tout en prĂ©servant son comportement externe. Le refactoring promet, s'il est appliquĂ© convenablement, Ă  amĂ©liorer la comprĂ©hensibilitĂ©, la maintenabilitĂ© et l'extensibilitĂ© du logiciel tout en amĂ©liorant la productivitĂ© des programmeurs. En gĂ©nĂ©ral, le refactoring pourra s’appliquer au niveau de spĂ©cification, conception ou code. Cette thĂšse porte sur l'automatisation de processus de recommandation de refactoring, au niveau code, s’appliquant en deux Ă©tapes principales: 1) la dĂ©tection des fragments de code qui devraient ĂȘtre amĂ©liorĂ©s (e.g., les dĂ©fauts de conception), et 2) l'identification des solutions de refactoring Ă  appliquer. Pour la premiĂšre Ă©tape, nous traduisons des rĂ©gularitĂ©s qui peuvent ĂȘtre trouvĂ©s dans des exemples de dĂ©fauts de conception. Nous utilisons un algorithme gĂ©nĂ©tique pour gĂ©nĂ©rer automatiquement des rĂšgles de dĂ©tection Ă  partir des exemples de dĂ©fauts. Pour la deuxiĂšme Ă©tape, nous introduisons une approche se basant sur une recherche heuristique. Le processus consiste Ă  trouver la sĂ©quence optimale d'opĂ©rations de refactoring permettant d'amĂ©liorer la qualitĂ© du logiciel en minimisant le nombre de dĂ©fauts tout en priorisant les instances les plus critiques. De plus, nous explorons d'autres objectifs Ă  optimiser: le nombre de changements requis pour appliquer la solution de refactoring, la prĂ©servation de la sĂ©mantique, et la consistance avec l’historique de changements. Ainsi, rĂ©duire le nombre de changements permets de garder autant que possible avec la conception initiale. La prĂ©servation de la sĂ©mantique assure que le programme restructurĂ© est sĂ©mantiquement cohĂ©rent. De plus, nous utilisons l'historique de changement pour suggĂ©rer de nouveaux refactorings dans des contextes similaires. En outre, nous introduisons une approche multi-objective pour amĂ©liorer les attributs de qualitĂ© du logiciel (la flexibilitĂ©, la maintenabilitĂ©, etc.), fixer les « mauvaises » pratiques de conception (dĂ©fauts de conception), tout en introduisant les « bonnes » pratiques de conception (patrons de conception).Software systems have become prevalent and important in our society. There is a constant need for high-quality software. Hence, to improve software quality, one of the most-used techniques is the refactoring which improves design structure while preserving the external behavior. Refactoring has promised, if applied well, to improve software readability, maintainability and extendibility while increasing the speed at which programmers can write and maintain their code. In general, refactoring can be performed in various levels such as the requirement, design, or code level. In this thesis, we mainly focus on the source code level where automated refactoring recommendation can be performed through two main steps: 1) detection of code fragments that need to be improved/fixed (e.g., code-smells), and 2) identification of refactoring solutions to achieve this goal. For the code-smells identification step, we translate regularities that can be found in such code-smell examples into detection rules. To this end, we use genetic programming to automatically generate detection rules from examples of code-smells. For the refactoring identification step, a search-based approach is used. The process aims at finding the optimal sequence of refactoring operations that improve software quality by minimizing the number of detected code-smells while prioritizing the most critical ones. In addition, we explore other objectives to optimize using a multi-objective approach: the code changes needed to apply refactorings, semantics preservation, and the consistency with development change history. Hence, reducing code changes allows us to keep as much as possible the initial design. On the other hand, semantics preservation insures that the refactored program is semantically coherent, and that it models correctly the domain-semantics. Indeed, we use knowledge from historical code change to suggest new refactorings in similar contexts. Furthermore, we introduce a novel multi-objective approach to improve software quality attributes (i.e., flexibility, maintainability, etc.), fix “bad” design practices (i.e., code-smells) while promoting “good” design practices (i.e., design patterns)

    A Survey of Search-Based Refactoring for Software Maintenance

    Get PDF
    Abstract This survey reviews published materials related to the specific area of Search-Based Software Engineering that concerns software maintenance and, in particular, refactoring. The survey aims to give a comprehensive review of the use of search-based refactoring to maintain software. Fifty different papers have been selected from online databases to analyze and review the use of search-based refactoring in software engineering. The current state of the research is analyzed and patterns in the studies are investigated in order to assess gaps in the area and suggest opportunities for future research. The papers reviewed are tabulated in order to aid researchers in quickly referencing studies. The literature addresses different methods using search-based refactoring for software maintenance, as well as studies that investigate the optimization process and discuss components of the search. There are studies that analyze different software metrics, experiment with multi-objective techniques and propose refactoring tools for use. Analysis of the literature has indicated some opportunities for future research in the area. More experimentation of the techniques in an industrial environment and feedback from software developers is needed to support the approaches. Also, recent work with multi-objective techniques has shown that there are exciting possibilities for future research using these techniques with refactoring. This survey is beneficial as an introduction for any researchers aiming to work in the area of Search-Based Software Engineering with respect to software maintenance and will allow them to gain an understanding of the current landscape of the research and the insights gathered

    On the Distribution of Test Smells in Open Source Android Applications: An Exploratory Study

    Get PDF
    The impact of bad programming practices, such as code smells, in production code has been the focus of numerous studies in software engineering. Like production code, unit tests are also affected by bad programming practices which can have a negative impact on the quality and maintenance of a software system. While several studies addressed code and test smells in desktop applications, there is little knowledge of test smells in the context of mobile applications. In this study, we extend the existing catalog of test smells by identifying and defining new smells and survey over 40 developers who confirm that our proposed smells are bad programming practices in test suites. Additionally, we perform an empirical study on the occurrences and distribution of the proposed smells on 656 open-source Android apps. Our findings show a widespread occurrence of test smells in apps. We also show that apps tend to exhibit test smells early in their lifetime with different degrees of co-occurrences on different smell types. This empirical study demonstrates that test smells can be used as an indicator for necessary preventive software maintenance for test suites

    Refactorings Recommendation via Commit Message Analysis

    Full text link
    Peer Reviewedhttps://deepblue.lib.umich.edu/bitstream/2027.42/155331/1/Commit_Messages_Analysis_for_Refactoring__Copy_ (16).pd

    A Systematic Literature Review on Software Refactoring

    Full text link
    Due to the growing complexity of software systems, there has been a dramatic increase in research and industry demand on refactoring. Refactoring research nowadays addresses challenges beyond code transformation to include, but not limited to, scheduling the opportune time to carry refactoring, recommending specific refactoring activities, detecting refactoring opportunities and testing the correctness of applied refactoring. Very few studies focused on the challenges that practitioners face when refactoring software systems and what should be the current refactoring research focus from the developers’perspective and based on the current literature. Without such knowledge, tool builders invest in the wrong direction, and researchers miss many opportunities for improving the practice of refactoring. In this thesis, we collected papers from several publication sources and analyzed them to identify what do developers ask about refactoring and the relevant topics in the field We found that developers and researchers are asking about design patterns, design and user interface refactoring, web services, parallel programming, and mobile apps. We also identified what popular refactoring challenges are the most difficult and the current important topics and questions related to refactoring. Moreover, we discovered gaps between existing research on refactoring and the challenges developers face.Master of ScienceSoftware Engineering, College of Engineering & Computer ScienceUniversity of Michigan-Dearbornhttps://deepblue.lib.umich.edu/bitstream/2027.42/154827/1/Jallal Elhazzat Final Thesis.pdfDescription of Jallal Elhazzat Final Thesis.pdf : Thesi

    Interactive Software Refactoring Bot

    Full text link
    Peer Reviewedhttps://deepblue.lib.umich.edu/bitstream/2027.42/153326/1/ASE2019_RefactoringBot__Copy_deepblue.pd
    • 

    corecore