• Title/Summary/Keyword: Code refactoring

Search Result 35, Processing Time 0.025 seconds

Analyzing Characteristics of Code Refactoring for Python Deep-Learning Applications (파이썬 딥러닝 응용의 코드 리팩토링 특성 분석)

  • Kim, Dong Kwan
    • The Journal of the Korea Contents Association
    • /
    • v.22 no.10
    • /
    • pp.754-764
    • /
    • 2022
  • Code refactoring refers to a maintenance task to change the code of a software system in order to consider new requirements, fix bugs, and restructure code. There have been various studies of refactoring subjects such as refactoring types, refactoring benefits, and CASE tools. However, Java applications rather than python ones have been benefited by refactoring-based coding practices. There are few cases of refactoring stuides on Python applications. This paper finds and analyzes single refactoring operations and composite refactoring operations for Python-based deep learning systems. In addition, we find that there is a statistically significant difference in the frequency of occurrence of single and complex refactoring operations in the two groups of deep learning applications and typical Python applications. Furthermore, we analyze keywords of commit messages to catch refactoring intentions of software developers.

A Systematic Literature Survey of Software Metrics, Code Smells and Refactoring Techniques

  • Agnihotri, Mansi;Chug, Anuradha
    • Journal of Information Processing Systems
    • /
    • v.16 no.4
    • /
    • pp.915-934
    • /
    • 2020
  • Software refactoring is a process to restructure an existing software code while keeping its external behavior the same. Currently, various refactoring techniques are being used to develop more readable and less complex codes by improving the non-functional attributes of software. Refactoring can further improve code maintainability by applying various techniques to the source code, which in turn preserves the behavior of code. Refactoring facilitates bug removal and extends the capabilities of the program. In this paper, an exhaustive review is conducted regarding bad smells present in source code, applications of specific refactoring methods to remove that bad smell and its effect on software quality. A total of 68 studies belonging to 32 journals, 31 conferences, and 5 other sources that were published between the years 2001 and 2019 were shortlisted. The studies were analyzed based on of bad smells identified, refactoring techniques used, and their effects on software metrics. We found that "long method", "feature envy", and "data class" bad smells were identified or corrected in the majority of studies. "Feature envy" smell was detected in 36.66% of the total shortlisted studies. Extract class refactoring approach was used in 38.77% of the total studies, followed by the move method and extract method techniques that were used in 34.69% and 30.61% of the total studies, respectively. The effects of refactoring on complexity and coupling metrics of software were also analyzed in the majority of studies, i.e., 29 studies each. Interestingly, the majority of selected studies (41%) used large open source datasets written in Java language instead of proprietary software. At the end, this study provides future guidelines for conducting research in the field of code refactoring.

Analysis of Energy Efficiency for Code Refactoring Techniques (코드 리팩토링 기법의 전력 효율성 분석)

  • Park, Jae-Jin;Kim, Doohwan;Hong, Jang Eui
    • KIPS Transactions on Software and Data Engineering
    • /
    • v.3 no.3
    • /
    • pp.109-118
    • /
    • 2014
  • Code refactoring focuses on enhancing the maintainability of software to extend its lifetime. However as software applications were varied and the range of its usage becomes broaden, there are some efforts to improve software qualities like performance or reliability as well as maintainability using code refactoring techniques. Recently, as low-energy software has become one of critical issues in mobile environment, developing energy efficient software through code refactoring becomes an important one. Therefore this paper has its goal to investigate whether the existing refactoring techniques can support energy efficient software generation or not. That is to say, the existing code refactoring techniques can cause the minus of energy efficiency because they did not considered the energy consumption in their refactoring process. This paper experiments and analyzes to check whether the M. Fowler's code refactoring techniques can support the energy efficient software generation or not. Our research result can give to software developer some informations about energy-efficient refactoring techniques, and can support the development of software that has high maintainability and good energy efficiency.

Automated Code Smell Detection and Refactoring using OCL (OCL을 이용한 자동화된 코드스멜 탐지와 리팩토링)

  • Kim, Tae-Woong;Kim, Tae-Gong
    • The KIPS Transactions:PartD
    • /
    • v.15D no.6
    • /
    • pp.825-840
    • /
    • 2008
  • Refactoring is a kind of software modification process that improves system qualities internally but maintains system functions externally. What should be improved on the existing source codes should take precedence over the others in such a modification process using this refactoring. Martin Fowler and Kent Beck proposed a method that identifies code smells for this purpose. Also, some studies on determining what refactoring will be applied to which targets through detecting code smells in codes were presented. However, these studies have a lot of disadvantages that show a lack of precise description for such code smells and detect limited code smells only. In addition, these studies showed other disadvantages that generate ambiguity in behavior preservation due to the fact that a description method of pre-conditions for the behavior preservation is included in a refactoring process or unformalized. Thus, our study represents a precise specification of code smells using OCL and proposes a framework that performs a refactoring process through the automatic detection of code smells using an OCL interpreter. Furthermore, we perform the automatic detection in which the code smells are be specified by using OCL to the java program and verify its applicability and effectivity through applying a refactoring process.

Extension of Code Refactoring Technique to Support Energy Efficiency and Language Conversion of Embedded Software (임베디드 소프트웨어의 에너지 효율성과 언어 변환 지원을 위한 코드 리팩토링 기법 확장)

  • Nam, Seungwoo;Hong, Jang-Eui
    • Journal of Convergence for Information Technology
    • /
    • v.8 no.2
    • /
    • pp.91-103
    • /
    • 2018
  • Refactoring is an engineering technique for securing the quality of existing legacy code, improving the internal structure without changing the functionality of the software. Along with the reuse of open source software, reuse of source code through programming language conversion is increasingly required due to technical or market requirements. In this situation, the refactoring technique including language conversion as well as energy efficiency is considered to be an important means for improving the productivity and the quality of embedded software development. This paper proposes a code refactoring technique that converts the grammar and structure of a programming language into those of a different language through comparison and mapping, in addition to the existing energy efficient refactoring technique. The use of the proposed refactoring technique can expect to improve the competitiveness of the product through rapid software development and quality improvement by coping with the environment change of the software development language and enhancing the reuse of the existing code.

Analysis of Refactoring Techniques and Tools for Source Code Quality Improvement (소스 코드 품질 향상을 위한 리팩토링 기법 및 도구 분석)

  • Kim, Doohwan;Jung, YooJin;Hong, Jang-Eui
    • Journal of Convergence Society for SMB
    • /
    • v.6 no.4
    • /
    • pp.137-150
    • /
    • 2016
  • Along with the rapid development of IT technology and business services, the effort to provide new services to the customers has been increasing, and also the improvement and enhancement of legacy systems are continuously occurring for rapid service delivery. In this situation, the quality assurance of the source code for the legacy system became a key technical elements that can quickly respond to the service needs. Refactoring is an engineering technique to ensure the quality for the legacy code, and essential for the improvement and extension of the legacy system in order to provide value-added services. This paper proposes some features of refactoring techniques through surveying and analyzing the existing refactoring techniques and tools to enhance source code quality. When service developers want to refactor the source code of the legacy system to enhance code quality, our proposed features may provide with the guidance on what to use any technique and tool in their work. This can improve the source code quality with correct refactoring and without trial and error, and will also enable rapid response to new services.

Prioritization-Based Model for Effective Adoption of Mobile Refactoring Techniques

  • Alhubaishy, Abdulaziz
    • International Journal of Computer Science & Network Security
    • /
    • v.21 no.12spc
    • /
    • pp.375-382
    • /
    • 2021
  • The paper introduces a model for evaluating and prioritizing mobile quality attributes and refactoring techniques through the examination of their effectiveness during the mobile application development process. The astonishing evolution of software and hardware has increased the demand for techniques and best practices to overcome the many challenges related to mobile devices, such as those concerning device storage, network bandwidth, and energy consumption. A number of studies have investigated the influence of refactoring, leading to the enhancement of mobile applications and the overcoming of code issues as well as hardware issues. Furthermore, rapid and continuous mobile developments make it necessary for teams to apply effective techniques to produce reliable mobile applications and reduce time to market. Thus, we investigated the influence of various refactoring techniques on mobile applications to understand their effectiveness in terms of quality attributes. First, we extracted the most important mobile refactoring techniques and a set of quality attributes from the literature. Then, mobile application developers from nine mobile application teams were recruited to evaluate and prioritize these quality attributes and refactoring techniques for their projects. A prioritization-based model is examined that integrates the lightweight multi-criteria decision making method, called the best-worst method, with the process of refactoring within mobile applications. The results prove the applicability and suitability of adopting the model for the mobile development process in order to expedite application production while using well-defined procedures to select the best refactoring techniques. Finally, a variety of quality attributes are shown to be influenced by the adoption of various refactoring techniques.

Code Refactoring Techniques Based on Energy Bad Smells for Reducing Energy Consumption (Energy Bad Smells 기반 소모전력 절감을 위한 코드 리팩토링 기법)

  • Lee, Jae-Wuk;Kim, Doohwan;Hong, Jang-Eui
    • KIPS Transactions on Software and Data Engineering
    • /
    • v.5 no.5
    • /
    • pp.209-220
    • /
    • 2016
  • While the services of mobile devices like smart phone, tablet, and smart watch have been increased and varied, the software embedded into such devices has been also increased in size and functional complexity. Therefore, increasing operation time of mobile devices for serviceability became an important issue due to the limitation of battery power. Recent studies focus on the software development having efficient behavioral patterns because the energy consumption of mobile devices is caused by software behaviors which control the hardware operations. However, it is often difficult to develop the embedded software with considering energy-efficiency and behavior optimization due to the short development cycle of the mobile services in many cases. Therefore, this paper proposes the refactoring techniques for reducing energy consumption, and enables to fulfill the energy requirements during software development and maintenance. We defined energy bad smells with the code patterns that can excessively consume the energy, and our refactoring techniques are to remove these bad smells. We performed some case studies to verify the usefulness of our refactoring techniques.

Refactoring the Code for Visualizing Protein Database Information in a 3D Viewer for Software Reusability

  • Chun, Yoo-Jin;Ham, Seong-Il;Yang, San-Duk;Rhie, Arang;Park, Hyun-Seok
    • Genomics & Informatics
    • /
    • v.6 no.1
    • /
    • pp.50-53
    • /
    • 2008
  • We have released five Java Application Programming Interface (API) packages for viewing three-dimensional structures of proteins from the Protein Data Bank. To this end, the user interface of an earlier version has been refactored in an object-oriented fashion, in which refactoring is the process of changing a software system to improve its internal structure, without altering the external behavior. Various GUI design and features have been provided conveniently thanks to the Model-View-Control (MVC) model, which is an architectural pattern used in software engineering. Availability: The source code and API specification can be downloaded from https://sourceforge.net/projects/j3dpsv/.

Bayesian Network-based Probabilistic Management of Software Metrics for Refactoring (리팩토링을 위한 소프트웨어 메트릭의 베이지안 네트워크 기반 확률적 관리)

  • Choi, Seunghee;Lee, Goo Yeon
    • Journal of KIISE
    • /
    • v.43 no.12
    • /
    • pp.1334-1341
    • /
    • 2016
  • In recent years, the importance of managing software defects in the implementation stage has emerged because of the rapid development and wide-range usage of intelligent smart devices. Even if not a few studies have been conducted on the prediction models for software defects, their outcomes have not been widely shared. This paper proposes an efficient probabilistic management model of software metrics based on the Bayesian network, to overcome limits such as binary defect prediction models. We expect the proposed model to configure the Bayesian network by taking advantage of various software metrics, which can help in identifying improvements for refactoring. Once the source code has improved through code refactoring, the measured related metric values will also change. The proposed model presents probability values reflecting the effects after defect removal, which can be achieved by improving metrics through refactoring. This model could cope with the conclusive binary predictions, and consequently secure flexibilities on decision making, using indeterminate probability values.