• Title/Summary/Keyword: Code refactoring

검색결과 35건 처리시간 0.028초

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

  • 김동관
    • 한국콘텐츠학회논문지
    • /
    • 제22권10호
    • /
    • pp.754-764
    • /
    • 2022
  • 코드 리팩토링은 소프트웨어 시스템의 코드를 변경함으로써 새로운 요구사항 반영, 버그 수정, 코드 구조화 등을 달성하기 위한 유지보수 활동이다. 리팩토링 유형, 리팩토링 효과, 지원 도구 등에 관한 다양한 연구가 진행 중이다. 하지만, 많은 연구들이 자바 응용들을 대상으로 하고 있으며 파이썬 응용에 관한 리팩토링 연구는 사례가 많지 않다. 본 논문은 파이썬으로 개발된 딥러닝 시스템을 대상으로 단일 리팩토링과 복합 리팩토링을 식별하고 특성을 분석하였다. 또한, 딥러닝 응용과 일반 파이썬 응용 두 그룹에서 단일 및 복합 리팩토링 연산의 발생 빈도에 있어 통계학적 유의미한 차이가 있음을 확인하였다. 또한, 커밋 메시지의 키워드를 분석하여 소프트웨어 개발자들의 리팩토링 의도가 커밋 메시지에 반영되었는지를 분석하였다.

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

  • Agnihotri, Mansi;Chug, Anuradha
    • Journal of Information Processing Systems
    • /
    • 제16권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)

  • 박재진;김두환;홍장의
    • 정보처리학회논문지:소프트웨어 및 데이터공학
    • /
    • 제3권3호
    • /
    • pp.109-118
    • /
    • 2014
  • 코드 리팩토링은 소프트웨어의 수명을 연장하기 위한 목적을 가지고, 유지보수성을 증진하는데 초점이 있다. 그러나 최근 소프트웨어의 유용성이 높아지고 활용 범위가 방대해지면서, 성능 및 신뢰성 등의 다양한 품질 속성을 코드 리팩토링을 통해 향상시키고자 하는 노력이 있었다. 최근 스마트 폰과 같은 모바일 기기에서 저전력 소프트웨어의 중요성이 강조됨에 따라, 전력 효율성을 보장하는 코드 리팩토링 기법들도 필요하게 되었다. 본 연구에서는 코드 리팩토링이 소모 전력의 절감 효과를 가져 올 수 있는지를 확인하고자 하였다. 즉 기존에 제시되었던 코드 리팩토링 기법들이 소모 전력에 대한 충분한 고려가 이루어지지 못했기 때문에 코드의 유지보수성은 향상시키지만, 전력 효율성이 감소하는 결과를 초래할 수 있다는 것이다. 따라서 본 연구에서는 M. Fowler가 개발한 코드 리팩토링 기법들을 대상으로 전력 효율성을 분석한다. 제시된 연구 결과를 통해 개발자들은 어떠한 리팩토링 기법이 전력 효율성을 제공하는지 판단할 수 있으며, 이를 통해 유지보수성이 높은 전력 효율적인 소프트웨어를 개발할 수 있을 것이다.

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

  • 김태웅;김태공
    • 정보처리학회논문지D
    • /
    • 제15D권6호
    • /
    • pp.825-840
    • /
    • 2008
  • 리팩토링은 내부적으로는 시스템의 품질을 개선하고, 외부적으로는 시스템의 기능을 유지하는 일종의 소프트웨어를 변경하는 과정이다. 이러한 리팩토링을 적용하여 기존 소스코드를 개선하기 위해서는 개선할 사항이 무엇인지를 아는 것이 우선이다. 이를 위해 Martin Fowler와 Kent Beck은 코드속의 나쁜 냄새(코드스멜)를 식별할 수 있는 방법을 제시 하였다. 또한 코드스멜을 탐지하고 어디에 어떤 리팩토링을 적용할 것인가를 결정하는 문제와 관련된 몇몇 연구가 발표되었다. 그러나 이러한 연구들은 코드스멜에 대한 명확한 표현이 부족하거나 한정된 코드스멜만을 탐지하는 단점이 있다. 그리고 리팩토링을 적용할 경우 행위보존을 위한 선행조건들의 표현방법이 리팩토링 절차에 포함되어 있거나 정형화되지 않아 행위보존의 모호함이 발생되는 단점을 가지고 있다. 이에 본 논문에서는 OCL을 이용하여 코드스멜의 정보를 정확히 명세화하고, OCL 번역기를 통해 코드스멜을 자동으로 탐지하여 리팩토링하는 프레임워크를 제안한다. 또한 적용사례를 통하여 자바소스코드속의 코드스멜을 OCL로 명세화하여 자동탐지하고, 리팩토링을 적용해 봄으로써 활용성과 효용성을 검증해본다.

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

  • 남승우;홍장의
    • 융합정보논문지
    • /
    • 제8권2호
    • /
    • pp.91-103
    • /
    • 2018
  • 리팩토링은 기존 레거시 코드에 대한 품질을 확보하기 위한 공학적 기술로서, 프로그램의 기능은 변하지 않으면서 내부 구조를 개선하는 작업이다. 다양한 오픈 소스 소프트웨어가 재사용되면서, 기술적 이유 또는 시장 요구로 인하여 프로그래밍 언어 변환을 통한 소스 코드 재사용이 점진적으로 요구되고 있다. 이러한 상황에서 에너지 효율성을 고려하는 언어 변환 리팩토링 기법은 임베디드 소프트웨어 개발의 생산성은 물론 품질 향상을 위한 중요한 수단으로 여겨지고 있다. 본 논문에서는 기존에 제시된 에너지 절감형 리팩토링 기법에 추가하여 프로그래밍 언어의 문법 및 구조의 비교와 매핑을 통해 다른 언어로 변환하는 코드 리팩토링 기법을 제시하였다. 제안하는 리팩토링 기법의 활용은 소프트웨어 개발 언어의 환경변화에 대처하고, 기존 코드의 재사용을 높임으로써 신속한 소프트웨어 개발 및 품질 향상을 통한 제품의 경쟁력 향상을 기대할 수 있다.

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

  • 김두환;정유진;홍장의
    • 중소기업융합학회논문지
    • /
    • 제6권4호
    • /
    • pp.137-150
    • /
    • 2016
  • IT 기술 및 비즈니스의 급속한 발전에 따라 새로운 서비스를 고객에게 제공하기 위한 노력이 증가하고 있으며, 신속한 서비스 제공을 위해 기존의 레거시 시스템에 대한 개선 및 확장이 빈번히 발생하고 있다. 이로 인하여 기존 레거시 시스템에 대한 소스 코드의 품질 확보는 서비스 요구에 신속히 대응할 수 있는 핵심적인 기술 요소가 되었다. 리팩토링은 기존 레거시 코드에 대한 품질을 확보하기 위한 공학적 기술로서, 부가가치를 제공하는 레거시 시스템의 개선 및 확장에 필수적이다. 본 논문에서는 레거시 시스템의 소스 코드 품질 향상을 위한 기존의 리팩토링 기법과 지원 도구에 대한 조사 분석을 통해 리팩토링 기법과 도구에 대한 특성을 제안한다. 제안하는 특성을 기반으로 서비스 개발자가 레거시 시스템의 소스 코드 품질 향상을 위하여 리팩토링을 수행하고자 하는 경우, 어떠한 기법과 도구를 활용할 것인가에 대한 가이드라인을 제공받을 수 있다. 이를 통해 보다 정확하고 시행착오 없는 레거시 시스템의 소스 코드 품질을 향상시킬 수 있으며, 새로운 서비스에 대한 신속한 대응도 가능하게 될 것이다.

Prioritization-Based Model for Effective Adoption of Mobile Refactoring Techniques

  • Alhubaishy, Abdulaziz
    • International Journal of Computer Science & Network Security
    • /
    • 제21권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.

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

  • 이제욱;김두환;홍장의
    • 정보처리학회논문지:소프트웨어 및 데이터공학
    • /
    • 제5권5호
    • /
    • pp.209-220
    • /
    • 2016
  • 최근 스마트폰, 태블릿과 같은 기기의 사용량이 증가하면서, 이에 탑재되는 소프트웨어는 더욱 복잡해지고 규모가 커지고 있다. 배터리의 전력으로 구동되는 모바일 기기들은 전력 공급의 한계로 인해 운용시간을 증가시키는 것이 중요한 이슈이다. 최근에는 소프트웨어 동작이 하드웨어 구동을 통해 전력 소모를 일으킨다는 점에서, 효율적인 동작 패턴을 갖는 소프트웨어 개발에 대한 연구들이 진행되고 있다. 그러나 모바일 기기에 탑재되는 소프트웨어는 그 개발 주기가 짧은 경우가 많아 최적화와 전력 소모량을 반영하기 어려운 경우가 많다. 따라서 본 연구에서는 소모전력 절감을 위한 코드 리팩토링 기법을 제안하여, 소프트웨어 개발 및 유지보수에서 보다 용이하게 저전력 요구사항을 충족시키고자 한다. 이를 위해 전력 소모량을 감소시킬 수 있는 코드 패턴에 대하여 Energy Bad Smell을 식별하고, 이를 제거하기 위한 새로운 코드 리팩토링 기법을 제안하며, 실험을 통해 그 효용성을 검증하였다.

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
    • /
    • 제6권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)

  • 최승희;이구연
    • 정보과학회 논문지
    • /
    • 제43권12호
    • /
    • pp.1334-1341
    • /
    • 2016
  • 최근 지능형 스마트 디바이스의 눈부신 발전과 사용으로 개발 단계의 소프트웨어 결함 관리의 중요성이 부각되고 있다. 효과적 결함 관리를 위해 소프트웨어 메트릭을 토대로 많은 결함 예측 모델 연구가 수행되고 있지만, 결함 예측 모델 연구 성과가 널리 확산되지는 못하고 있다. 본 논문에서는 결함 존재 유무에 관한 이진적 결함 예측 모델의 제약을 극복할 수 있도록, 베이지안 네트워크 기반 확률적 소프트웨어 메트릭 관리 방법을 제안한다. 제안 모델은 소프트웨어 메트릭을 활용하여 베이지안 네트워크를 구성하고, 이를 토대로 베이지안 추론을 수행하여 리팩토링을 위한 개선점을 식별할 수 있는 모델이다. 코드 리팩토링을 통해 소스 코드가 개선되면 관련 메트릭 측정값 또한 변하게 된다. 제안 모델은 리팩토링을 통한 메트릭의 개선으로 얻을 수 있는 결함 제거 효과를 확률 값으로 제시해준다. 따라서 이진 값 형태의 확정성을 극복할 수 있으며, 불확정적인 확률 값으로 의사결정의 유연성을 확보할 수 있을 것이다.