• 제목/요약/키워드: Source Code Metrics

검색결과 20건 처리시간 0.026초

소스코드의 보안성 메트릭 설계에 관한 연구 (A Study on the Design of Security Metrics for Source Code)

  • 서동수
    • 정보보호학회논문지
    • /
    • 제20권6호
    • /
    • pp.147-155
    • /
    • 2010
  • 소스코드의 정적분석 기술은 소스코드 자체에 내재된 취약성을 찾는데 활용되는 중요한 기술로 인식되고 있다. 본 논문은 정보시스템의 소스코드 보안성 수준을 평가하는 방법으로 정적분석 결과인 소스코드의 취약성 정보와 프로그램이 처리하는 정보의 중요도를 활용하는 평가 메트릭의 설계 및 활용을 소개한다. 소스코드 보안성 메트릭은 소스코드의 취약점 수준을 개발 과정에서 미리 파악할 수 있도록 도움을 준다는 측면에서 평가자와 개발자 모두가 활용할 수 있다. 특히 평가자는 보안 메트릭을 통해 소스코드의 성격과 요구되는 정보의 보안수준에 따라 소스코드의 보안 수준을 점검하며, 코드 검수에 활용할 수 있다.

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.

CNN 모델을 이용한 프로그램 코드 변경 예측 (Predicting Program Code Changes Using a CNN Model)

  • 김동관
    • 한국융합학회논문지
    • /
    • 제12권9호
    • /
    • pp.11-19
    • /
    • 2021
  • 소프트웨어 시스템은 생명주기동안 기능 추가, 버그 수정, 새로운 컴퓨팅 환경 수용 등의 다양한 이유로 프로그램 코드 변경이 요구된다. 이러한 코드 수정 과정에서 새로운 오류 발생을 가져올 수 있으므로 프로그램 코드 수정 과정은 새로운 시스템 개발 못지 않게 신중하게 처리되야 한다. 또한, 오픈 소스 프로그램에 대한 재사용이 일반화된 소프트웨어 개발환경에서 오픈 소스 프로그램의 코드 변경 가능성을 예측할 수 있다면, 보다 양질의 프로그램 개발 효과를 기대할 수 있을 것이다. 본 논문은 소스 코드 변경을 예측하는 Convolutional Neural Network (CNN) 기반의 딥러닝 모델을 제안한다. 소스 코드 변경을 예측하는 문제는 딥러닝의 이진 분류 문제이며 레이블된 데이터가 요구되는 지도학습을 사용한다. 코드 예측 모델의 학습 및 시험을 위해 깃허브에서 수집한 Java 소스 코드와 코드 변경 로그를 데이터로 사용한다. 수집된 Java 소스 코드에서 소프트웨어 메트릭스를 계산한 후 제안된 코드 변경 예측 모델의 입력 데이터로 사용한다. 제안된 모델의 성능 평가를 위해 정밀도, 재현율, F1점수, 정확도가 측정되었으며 각각의 평가 지표에 있이서 CNN 모델은 95%, 다층 퍼셉트 기반의 DNN 모델은 92%를 달성했다.

A Pragmatic Framework for Predicting Change Prone Files Using Machine Learning Techniques with Java-based Software

  • Loveleen Kaur;Ashutosh Mishra
    • Asia pacific journal of information systems
    • /
    • 제30권3호
    • /
    • pp.457-496
    • /
    • 2020
  • This study aims to extensively analyze the performance of various Machine Learning (ML) techniques for predicting version to version change-proneness of source code Java files. 17 object-oriented metrics have been utilized in this work for predicting change-prone files using 31 ML techniques and the framework proposed has been implemented on various consecutive releases of two Java-based software projects available as plug-ins. 10-fold and inter-release validation methods have been employed to validate the models and statistical tests provide supplementary information regarding the reliability and significance of the results. The results of experiments conducted in this article indicate that the ML techniques perform differently under the different validation settings. The results also confirm the proficiency of the selected ML techniques in lieu of developing change-proneness prediction models which could aid the software engineers in the initial stages of software development for classifying change-prone Java files of a software, in turn aiding in the trend estimation of change-proneness over future versions.

Java프로그램에 대한 품질 및 복잡도 메트릭스 평가시스템 구현 (Development of A System for Quality Assessment and Complexity Metrics of Java programs)

  • 이상범;김경환
    • 한국산학기술학회논문지
    • /
    • 제4권4호
    • /
    • pp.346-351
    • /
    • 2003
  • 소프트웨어의 규모가 커지고 복잡해지고 있음에도 불구하고 한편으로는 개발기간의 단축, 코스트 절감, 생산성, 품질 향상 등이 요구되어지고 있다. 질 좋고 효율적인 소프트웨어를 구현하기 위해 예전부터 수많은 기법과 방법들이 제안되었고 구현되었다. 대표적인 것으로 다양한 CASE도구, 프로세스 평가모델(CMM, SPICE, ISO9000), 메트릭스 등이 있다. 하지만 이러한 개발 지원 방법들은 개발자 각 개인의 생산성을 위해 지원하기보다는 주로 프로젝트 전체 관리를 위해서 사용되어지고 있는 것이 일반적이다. 따라서 이러한 기법과 방법들을 개별 프로그래머의 개발과정에 사용하는 것은 부적절하다. 본 연구에서는 객체지향적 소프트웨어 개발방법론을 적용한 개발 프로세스를 개발조직의 평가개선보다는 개발자 개인의 작업향상과 품질향상에 위한 기법을 개발하였다. 특히 개발프로세스 중 코딩 단계에서 생산되는 생산물(source code)의 품질평가를 할 수 있는 평가 시스템을 제작하였다. 구체적으로 이 평가 시스템은 Java프로그램에 대한 품질평가로서 단순히 메트릭스 값만을 보여 주는 것이 아니라, 개발자가 작성한 소스코드, 클래스(class)의 계층구조를 동시에 보여준다.

  • PDF

Design and Implementation of a Data Extraction Tool for Analyzing Software Changes

  • Lee, Yong-Hyeon;Kim, Kisub;Lee, Jaekwon;Jung, Woosung
    • 한국컴퓨터정보학회논문지
    • /
    • 제21권8호
    • /
    • pp.65-75
    • /
    • 2016
  • In this paper, we present a novel approach to help MSR researchers obtain necessary data with a tool, termed General Purpose Extractor for Source code (GPES). GPES has a single function extracts high-quality data, e.g., the version history, abstract syntax tree (AST), changed code diff, and software quality metrics. Moreover, features such as an AST of other languages or new software metrics can be extended easily given that GPES has a flexible data model and a component-based design. We conducted several case studies to evaluate the usefulness and effectiveness of our tool. Case studies show that researchers can reduce the overall cost of data analysis by transforming the data into the required formats.

정적 코드 내부 정보의 테이블 정규화를 통한 품질 메트릭 지표들의 가시화를 위한 추출 메커니즘 (Quality Visualization of Quality Metric Indicators based on Table Normalization of Static Code Building Information)

  • 박찬솔;문소영;김영철
    • 정보처리학회논문지:소프트웨어 및 데이터공학
    • /
    • 제12권5호
    • /
    • pp.199-206
    • /
    • 2023
  • 현대 소프트웨어의 규모는 커지고 있다. 이에 따라 고품질 코드를 위한 정적 분석의 중요성이 커지고 있다. 코드에 대한 정적 분석을 통해 결함과 복잡도를 식별하는 것이 필요하다. 이를 가시화하여 개발자 및 이해 관계자가 알기 쉽게 가이드도 필요하다. 기존 코드 가시화 연구들은 정적 분석의 코드 내부 정보들을 데이터베이스 테이블에 저장하여 및 품질 지표(CK Metrics, Coupling, Number of function calls, Bed smell)에 대한 계산을 질의어화 하고 추출된 정보를 가시화하는 과정을 구현하는 것에만 초점을 두었다. 이러한 연구들은 방대한 코드로부터 추출한 정보를 이용하여 코드를 분석할 때 많은 시간과 자원이 소모된다는 한계점이 있다. 또한 각 코드 내 정보 테이블들이 정규화되지 않았기 때문에 코드 내부의 정보(클래스, 함수, 속성 등)들에 대한 테이블 조인 연산 시 메모리 공간과 시간 소비가 발생할 수 있다. 이러한 문제들을 해결하기 위해, 데이터베이스 테이블의 정규화된 설계와 이를 통한 코드 내부의 품질 메트릭 지표에 대한 추출 및 가시화 메커니즘 제안한다. 이러한 메커니즘을 통해 코드 가시화 공정이 최적화되고, 개발자가 리팩토링해야 할 모듈을 가이드 할 수 있을 것으로 기대한다. 앞으로는 부분 학습도 시도할 예정이다.

Which Code Changes Should You Review First?: A Code Review Tool to Summarize and Prioritize Important Software Changes

  • Song, Myoungkyu;Kwon, Young-Woo
    • Journal of Multimedia Information System
    • /
    • 제4권4호
    • /
    • pp.255-262
    • /
    • 2017
  • In recent software development, repetitive code fragments (i.e., clones) are common due to the copy-and-paste programming practice, the framework-based development, or the reuse of same design patterns. Such similar code fragments are likely to introduce more bugs but are easily disregarded by a code reviewer or a programmer. In this paper, we present a code review tool to help code reviewers identify important code changes written by other programmers and recommend which changes need to be reviewed first. Specifically, to identify important code changes, our approach detects code clones across revisions and investigates them. Then, to help a code reviewer, our approach ranks the identified changes in accordance with several software quality metrics and statistics on those clones and changes. Furthermore, our approach allows the code reviewer to express their preferences during code review time. As a result, the code reviewer who has little knowledge of a code base can reduce his or her effort by reviewing the most significant changes that require an instant attention. To evaluate our approach, we integrated our approach with a modern IDE (e.g., Eclipse) as a plugin and then analyzed two third-party open source projects. The experimental results indicate that our approach can improve code reviewer's productivity.

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

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

소스 코드에 포함된 코딩 패턴의 특성과 출현 위치 관련성에 대한 분석 (Analysis of characteristics and location of the appearance for codding pattern in the source code)

  • 김영태;공헌택;김치수
    • 디지털융복합연구
    • /
    • 제11권7호
    • /
    • pp.165-171
    • /
    • 2013
  • 코딩 패턴이란 소스 코드에 자주 나타나는 전형적인 코드 조각이다. 소프트웨어에서 로깅이나 동기화 처리 등 모듈화가 곤란한 기능과 프로그래밍의 상용구 등이 코딩 패턴으로 추출된다. 기존에 소스 코드에 대한 패턴 마이닝을 이용한 코딩 패턴 감지 방법이 제안되었지만, 수동으로 조사 가능한 코딩 패턴의 수는 한정되어 있기 때문에 대규모 소프트웨어 등에 대한 충분한 분석은 할 수 없다. 본 논문에서는 개발자가 분석하고자 하는 코딩 패턴만을 추출하는 것을 목표로 코딩 패턴의 특성 평가 척도로 6개의 지표를 선정하여 4개의 오픈 소스에 대한 분석을 실시했다. 매트릭스 사이의 값의 관계와 실제 패턴의 특징을 분석한 결과, 패턴의 인스턴스 수, 인스턴스의 분포의 넓이, 패턴의 요소에 포함되는 반복 구조 비율 등의 지표 등을 분석해야 패턴 선택에 도움이 되는 것을 확인했다.