CLEAR: Class Level Software Refactoring Using Evolutionary Algorithms

2015 ◽  
Vol 24 (1) ◽  
pp. 85-97 ◽  
Author(s):  
Muchou Wang ◽  
Weifeng Pan ◽  
Bo Jiang ◽  
Chenxiang Yuan

AbstractThe original design of a software system is rarely prepared for every new requirement. Software systems should be updated frequently, which is usually accompanied by the decline in software modularity and quality. Although many approaches have been proposed to improve the quality of software, a majority of them are guided by metrics defined on the local properties of software. In this article, we propose to use a global metric borrowed from the network science to detect the moving method refactoring. First, our approach uses a bipartite network to represent classes, features (i.e., methods and fields), and their dependencies. Second, a new metric is introduced to quantify the modularity of a software system as a whole. Finally, a crossover-only evolutionary algorithm that uses the metric as its fitness function is introduced to optimize the class structure of a software system and detect the methods that should be moved. Empirical results on the benchmark Java projects show that our approach can find meaningful methods that should be moved with a high stability. The advantages of our approach are illustrated in comparison with some other approaches, specifically one refactoring approach, namely search-based refactoring approach (SBRA), and two community detection algorithms, namely a graph theoretic clustering algorithm (MCODE) and a fast algorithm for community detection (FG). Our approach provides a new way to do refactoring from the perspective of software structure.

Effective software system must advance to stay pertinent, however this procedure of development can cause the product design to rot and prompt essentially diminished efficiency and even dropped projects. Remodularization tasks can be performed to fix the structure of a software system and evacuate the disintegration brought about by programming advancement. Software remodularization comprises in rearranging software entities into modules to such an extent that sets of substances having a place with similar modules are more comparable than those having a place with various modules.However, re-modularizing systems automatically is challenging in order to enhance their sustainability. In this paper, we have introduced a procedure of automatic software remodularization that helps software maintainers to enhance the software modularization quality by assessing the coupling and attachment among programming components. For precision coupling measures, the proposed technology uses structural coupling measurements. The proposed methodology utilizes tallying of class' part capacities utilized by a given class as a basic coupling measure among classes. The interaction between class files measures structural connections between software elements (classes). In this paper, probability based remodularization (PBR) approach has been proposed to remodularize the software systems. The file ordering process is done by performing probability based approach and remodularization is done based on the dependency strength or connectivity among the files. The proposed technique is experimented on seven software systems. The efficiency is measured by utilizing Turbo Modularization Quality (MQ) that promotes edge weighing module dependence graph (MDG). It very well may be presumed that when comparing performance with the subsisting techniques, for instance, Bunch – GA (Genetic Algorithm), DAGC (Development of Genetic Clustering Algorithm) and Estimation of Distribution Algorithm (EDA), the proposed methodology has greater Turbo MQ value and lesser time complexity with Bunch-GA in the software systems assessed


Author(s):  
JING DONG ◽  
YAJING ZHAO ◽  
TU PENG

The quality of a software system highly depends on its architectural design. High quality software systems typically apply expert design experience which has been captured as design patterns. As demonstrated solutions to recurring problems, design patterns help to reuse expert experience in software system design. They have been extensively applied in the industry. Mining the instances of design patterns from the source code of software systems can assist in the understanding of the systems and the process of re-engineering them. More importantly, it also helps to trace back to the original design decisions, which are typically missing in legacy systems. This paper presents a review on current techniques and tools for mining design patterns from source code or design of software systems. We classify different approaches and analyze their results in a comparative study. We also examine the disparity of the discovery results of different approaches and analyze possible reasons with some insight.


Author(s):  
Iaakov Exman ◽  
Harel Wallach

Well-designed software systems, with providers only modules, have been rigorously obtained by algebraic procedures from the software Laplacian Matrices or their respective Modularity Matrices. However, a complete view of the whole software system should display, besides provider relationships, also consumer relationships. Consumers may have two different roles in a system: either internal or external to modules. Composite modules, including both providers and internal consumers, are obtained from the joint providers and consumers Laplacian matrix, by the same spectral method which obtained providers only modules. The composite modules are integrated into a whole Software System by algebraic connectors. These algebraic connectors are a minimal Occam’s razor set of consumers external to composite modules, revealed through iterative splitting of the Laplacian matrix by Fiedler eigenvectors. The composite modules, of the respective standard Modularity Matrix for the whole software system, also obey linear independence of their constituent vectors, and display block-diagonality. The spectral method leading to composite modules and their algebraic connectors is illustrated by case studies. The essential novelty of this work resides in the minimal Occam’s razor set of algebraic connectors — another facet of Brooks’ Propriety principle leading to Conceptual Integrity of the whole Software System — within Linear Software Models, the unified algebraic theory of software modularity.


Complexity ◽  
2020 ◽  
Vol 2020 ◽  
pp. 1-25
Author(s):  
Masoud Aghdasifam ◽  
Habib Izadkhah ◽  
Ayaz Isazadeh

Software refactoring is a software maintenance action to improve the software internal quality without changing its external behavior. During the maintenance process, structural refactoring is performed by remodularizing the source code. Software clustering is a modularization technique to remodularize artifacts of source code aiming to improve readability and reusability. Due to the NP hardness of the clustering problem, evolutionary approaches such as the genetic algorithm have been used to solve this problem. In the structural refactoring literature, there exists no search-based algorithm that employs a hierarchical approach for modularization. Utilizing global and local search strategies, in this paper, a new search-based top-down hierarchical clustering approach, named TDHC, is proposed that can be used to modularize the system. The output of the algorithm is a tree in which each node is an artifact composed of all artifacts in its subtrees and is a candidate to be a software module (i.e., cluster). This tree helps a software maintainer to have better vision on source code structure to decide appropriate composition points of artifacts aiming to create modules (i.e., files, packages, and components). Experimental results on seven folders of Mozilla Firefox with different functionalities and five other software systems show that the TDHC produces modularization closer to the human expert’s decomposition (i.e., directory structure) than the other existing algorithms. The proposed algorithm is expected to help a software maintainer for better remodularization of a source code. The source codes and dataset related to this paper can be accessed at https://github.com/SoftwareMaintenanceLab.


2018 ◽  
Vol 29 (1) ◽  
pp. 1135-1150
Author(s):  
Amarjeet Prajapati ◽  
Jitender Kumar Chhabra

Abstract Poor design choices at the early stages of software development and unprincipled maintenance practices usually deteriorate software modularity and subsequently increase system complexity. In object-oriented software, improper distribution of classes among packages is a key factor, responsible for modularity degradation. Many optimization techniques to improve the software modularity have been proposed in the literature. The focus of these optimization techniques is to produce modularization solutions by optimizing different design quality criteria. Such modularization solutions are good from the different aspect of quality; however, they require huge modifications in the existing modular structure to realize the suggested solution. Thus these techniques are costly and time consuming if applied at early stages of software maintenance. This paper proposes a search-based optimization technique to improve the modularity of the software system with minimum possible variation between the existing and produced modularization solution. To this contribution, a penalized fitness function, namely, penalized modularization quality, is designed in terms of modularization quality and the Move or Join Effectiveness Measure metric. Furthermore, this fitness function is used in both single-objective genetic algorithm (SGA) and multi-objective genetic algorithm (MGA) to generate the modularization. The effectiveness of the proposed remodularization approach is evaluated over five open-source and three random generated software systems. The experimentation results show that the proposed approach is able to generate modularization solutions with improved quality along with lesser perturbation compared to their non-penalty counterpart and at the same time it performs better with the MGA compared to the SGA. The proposed approach can be very useful, especially when total remodularization is not feasible/desirable due to lack of time or high cost.


2021 ◽  
Vol 11 (10) ◽  
pp. 4497
Author(s):  
Dongming Chen ◽  
Mingshuo Nie ◽  
Jie Wang ◽  
Yun Kong ◽  
Dongqi Wang ◽  
...  

Aiming at analyzing the temporal structures in evolutionary networks, we propose a community detection algorithm based on graph representation learning. The proposed algorithm employs a Laplacian matrix to obtain the node relationship information of the directly connected edges of the network structure at the previous time slice, the deep sparse autoencoder learns to represent the network structure under the current time slice, and the K-means clustering algorithm is used to partition the low-dimensional feature matrix of the network structure under the current time slice into communities. Experiments on three real datasets show that the proposed algorithm outperformed the baselines regarding effectiveness and feasibility.


2015 ◽  
Vol 54 (05) ◽  
pp. 447-454 ◽  
Author(s):  
U. Mansmann ◽  
D. Lindoerfer

SummaryBackground: Patient registries are an important instrument in medical research. Often their structure is complex and their implementation uses composite software systems to meet the wide spectrum of challenges.Objectives: For the implementation of a registry, there is a wide range of commercial, open source, and self-developed systems available and a minimal standard for the critical appraisal of their architecture is needed.Methods: We performed a systematic review of the literature to define a catalogue of relevant criteria to construct a minimal appraisal standard.Results: The CIPROS list is developed based on 64 papers which were found by our systematic review. The list covers twelve sections and contains 72 items.Conclusions: The CIPROS list supports developers to assess requirements on existing systems and strengthens the reporting of patient registry software system descriptions. It can be a first step to create standards for patient registry software system assessments.


2021 ◽  
Vol 12 (7) ◽  
pp. 339-349
Author(s):  
A. A. Kodubets ◽  
◽  
I. L. Artemieva ◽  

This article contains a systematic literature review of requirements engineering for software systems. The literature published within last 5 years was included into the review. A research question was defined as requirements development process of large scale software system (with thousands of requirements) and an interaction problem during this process (communication, coordination and control). The problem is caused by the fact that large-scale software system requirements process is a cross-disciplinary task and it involves multiple parties — stakeholders, domain experts, and suppliers with own goals and constrains, and thus, the interaction between them seriously slows down the overall requirements development process than writing the requirements specification itself. The research papers were classified by several research directions: Natural Language Processing for Requirements Engineering (NLP4RE), Requirement Prioritization, Requirements Traceability, Quality of Software Requirements, Non-functional Requirements and Requirements Elicitation. Motivation and intensity of each direction was described. Each direction was structured and represented with the key references. A contribution of each research direction into the research question was analyzed and summarized including potential further steps. It was identified that some researchers had met a part of the described problem in different forms during their researches. At the end, other researches were described additionally in a short overview. To approach the research question further potential direction was described.


Sign in / Sign up

Export Citation Format

Share Document