KR102015545B1 - System for analysing the effect of source code modification - Google Patents

System for analysing the effect of source code modification Download PDF

Info

Publication number
KR102015545B1
KR102015545B1 KR1020170053750A KR20170053750A KR102015545B1 KR 102015545 B1 KR102015545 B1 KR 102015545B1 KR 1020170053750 A KR1020170053750 A KR 1020170053750A KR 20170053750 A KR20170053750 A KR 20170053750A KR 102015545 B1 KR102015545 B1 KR 102015545B1
Authority
KR
South Korea
Prior art keywords
source code
analysis
statement
file
source
Prior art date
Application number
KR1020170053750A
Other languages
Korean (ko)
Other versions
KR20180119962A (en
Inventor
채희철
안희동
Original Assignee
주식회사 평화이즈
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 평화이즈 filed Critical 주식회사 평화이즈
Priority to KR1020170053750A priority Critical patent/KR102015545B1/en
Publication of KR20180119962A publication Critical patent/KR20180119962A/en
Application granted granted Critical
Publication of KR102015545B1 publication Critical patent/KR102015545B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Stored Programmes (AREA)

Abstract

본 발명은 소스 코드 변경이 미치는 영향도를 분석하기 위한 시스템에 관한 것으로서, 소프트웨어에서 소스 코드와 데이터베이스의 테이블 및 컬럼에 관한 상호관계를 분석함으로써 소스 코드 변경이 어플리케이션에 미치는 영향도를 도출함으로써, 분석 환경을 간소화하고 분석 시간을 단축하며 분석 시스템의 리소스를 절약할 수 있다.The present invention relates to a system for analyzing the impact of source code changes, and by analyzing the correlation between the source code and the tables and columns of the database in the software by deriving the impact of the source code changes on the application, Simplify the environment, reduce analysis time, and save resources in your analysis system.

Description

소스 코드 변경이 미치는 영향도를 분석하기 위한 시스템{SYSTEM FOR ANALYSING THE EFFECT OF SOURCE CODE MODIFICATION}System for analyzing the impact of source code changes {SYSTEM FOR ANALYSING THE EFFECT OF SOURCE CODE MODIFICATION}

본 발명은 소스 코드 변경 영향도 분석 시스템에 관한 것으로, 더욱 상세하게는 엔터프라이즈 어플리케이션에서 대부분 사용하는 데이터베이스와 소스 코드와의 상관 관계를 분석함으로써 소스 코드 변경이 어플리케이션에 미치는 영향도를 도출하기 위한 소스 코드 변경 영향도 분석 시스템에 관한 것이다.The present invention relates to a source code change impact analysis system, and more particularly source code for deriving the impact of the source code change on the application by analyzing the correlation between the source code and the database used in most enterprise applications Change impact analysis system.

소프트웨어는 그 개발 과정에서 그리고 개발 후 관리 과정에서 빈번한 수정이 발생한다. 소프트웨어를 개발하고 나서 소스 코드를 수정하는 변경 관리를 수행하기 위해서는 기존에 운영 중인 시스템에 어떤 영향을 주는지에 대한 검증 절차를 반드시 거쳐야 한다.Software often undergoes frequent modifications during its development and post-development management. After software development, change management that modifies the source code must be validated for how it affects existing systems.

현재 이러한 영향도 분석은 시스템 운영 경험에 의존적이고, 개발자가 소스 코드에 대한 텍스트 검색을 수행함으로써 소스 코드를 분석하는 방법을 사용을 한다. 하지만, 이러한 방식의 영향도 분석 방법은 다양한 매트릭스 형태의 분석이 불가능하고, 소스 변경이 일어날 때마다 반복적으로 진행을 하기에는 그 업무 부담이 과중하다는 문제점이 있다.Currently, this impact analysis depends on the experience of operating the system, and the developer uses a method of analyzing the source code by performing a text search on the source code. However, this method of impact analysis has a problem that it is impossible to analyze in the form of various matrices, and the work burden is too heavy to proceed repeatedly whenever a source change occurs.

이에, 본 발명은 소프트웨어에서 소스 코드와 데이터베이스의 테이블 및 컬럼에 관한 상호관계를 분석하는 시스템 및 방법에 관한 것이다.Accordingly, the present invention relates to a system and method for analyzing correlations between tables and columns of source code and databases in software.

대한민국 공개특허공보 제10-2017-0015178호(공개일자 2017.02.08)Republic of Korea Patent Publication No. 10-2017-0015178 (published date 2017.02.08) 대한민국 등록특허공보 제10-1507469호(공고일자 2015.04.03)Republic of Korea Patent Publication No. 10-1507469 (Notice date 2015.04.03)

따라서, 본 발명은 상기한 종래 기술의 문제점을 해결하기 위해 이루어진 것으로서, 본 발명의 목적은 소프트웨어에서 소스 코드와 데이터베이스의 테이블 및 컬럼에 관한 상호관계를 분석함으로써 소스 코드 변경이 어플리케이션에 미치는 영향도를 도출하기 위한 소스 코드 변경 영향도 분석 시스템을 제공하는 데 있다.Accordingly, the present invention has been made to solve the above-described problems of the prior art, and an object of the present invention is to analyze the correlation between source code and tables and columns of a database in software, thereby analyzing the influence of source code changes on an application. To provide a source code change impact analysis system to derive.

상기와 같은 목적을 달성하기 위한 본 발명의 소스 코드 변경 영향도 분석 시스템은, 소프트웨어에서 소스 코드와 데이터베이스의 테이블 및 컬럼에 관한 상호관계를 분석함으로써 소스 코드 변경이 어플리케이션에 미치는 영향도를 도출한다.The source code change impact analysis system of the present invention for achieving the above object derives the influence of the source code change on the application by analyzing the correlation of the source code and the tables and columns of the database in software.

바람직하게는, 상기 소스 코드 변경 영향도 분석 시스템은, 컴포넌트 간의 관계를 분석하는 컴포넌트 관계 분석부, 메소드 및 statement 호출 구문 간의 관계를 분석하는 메소드 분석부 및 sql문이 들어있는 xml파일 내 statement 태그 및 sql문 내 테이블 및 컬럼 간의 관계를 분석하는 쿼리 분석부를 포함한다.Preferably, the source code change impact analysis system, the statement tag in the xml file containing the component relationship analysis unit for analyzing the relationship between components, the method analysis unit for analyzing the relationship between the method and statement call syntax and the sql statement and Includes a query analyzer that analyzes the relationship between tables and columns in an sql statement.

더 바람직하게는, 상기 컴포넌트 관계 분석부는: 미리 설정된 분석 파일명의 문자열 정규 표현식 패턴을 통해 소스 디렉토리 내 대상 파일을 찾는 단계; 상기 대상 파일의 소스 코드를 파싱하는 단계 및 상기 파싱하는 단계에서 파싱한 참조 컴포넌트 정보를 서비스명, 자식 서비스명 및 클래스 경로로 구조적인 컬렉션화하는 단계를 수행하도록 구성된다.More preferably, the component relationship analysis unit may include: finding a target file in a source directory through a string regular expression pattern of a preset analysis file name; Parsing the source code of the target file and structurally collecting the reference component information parsed in the parsing into a service name, a child service name, and a class path.

더 바람직하게는, 상기 메소드 분석부는: 미리 설정된 분석 자바 파일명의 문자열 정규 표현식 패턴을 통해 소스 디렉토리 내 대상 파일을 찾는 단계; 미리 설정된 분석 자바 메소드의 문자열 정규 표현식 패턴을 통해 상기 대상 파일 내 대상 메소드를 찾는 단계; 상기 대상 메소드의 자바 소스 코드를 파싱하는 단계 및 상기 파싱하는 단계에서 파싱한 상기 자바 소스 코드를 메소드 정보, statement문 및 클래스 경로로 구조적인 컬렉션화하는 단계를 수행하도록 구성된다.More preferably, the method analyzer comprises: finding a target file in a source directory through a string regular expression pattern of a preset analysis Java file name; Finding a target method in the target file through a string regular expression pattern of a preset analysis Java method; Parsing Java source code of the target method and structurally collecting the Java source code parsed in the parsing step into method information, statement statement, and class path.

더 바람직하게는, 상기 쿼리 분석부는: 미리 설정된 분석 sql 파일명의 문자열 정규 표현식 패턴을 통해 소스 디렉토리 내 대상 파일을 찾는 단계; 상기 sql문이 들어 있는 XML 파일 및 상기 sql문을 파싱하는 단계; 및 상기 파싱하는 단계에서 파싱한 상기 XML 파일 및 상기 sql문을 statement명, 테이블명 및 컬럼명으로 구조적인 컬렉션화하는 단계를 수행하도록 구성된다.More preferably, the query analyzing unit comprises: finding a target file in a source directory through a string regular expression pattern of a preset analysis sql file name; Parsing the sql statement and an XML file containing the sql statement; And structurally collecting the XML file and the sql statement parsed in the parsing step into a statement name, a table name, and a column name.

보다 더 바람직하게는, 상기 소스 코드 변경 영향도 분석 시스템은 소스 파일들 중 상기 소스 코드가 운영 서버에 반영되는 시점에 변경된 소스 파일만을 선별하여 영향도를 도출한다.Even more preferably, the source code change impact analysis system derives the influence by selecting only the source file changed at the time when the source code is reflected in the operation server among the source files.

보다 더 바람직하게는, 상기 소스 코드 변경 영향도 분석 시스템은 분석한 결과를 사용자에게 제시하는 디스플레이를 더 포함한다.Even more preferably, the source code change impact analysis system further includes a display for presenting the analyzed result to the user.

상술한 바와 같이, 본 발명에 의한 소스 코드 변경 영향도 분석 시스템은 다음과 같은 효과를 제공한다.As described above, the source code change impact analysis system according to the present invention provides the following effects.

본 발명은 순수하게 프로그램 소스만을 가지고 분석을 수행하게 되고, 이는 분석 환경의 간소함을 제공한다. 또한, 최초 분석 이후에 업데이트되는 소스만을 선별 분석하므로, 분석 시간의 단축과 분석 시스템의 리소스 절약 효과가 있다.The present invention performs analysis with purely program sources, which provides simplicity of the analysis environment. In addition, since only the source that is updated after the initial analysis is analyzed, the analysis time can be shortened and the analysis system can save resources.

도 1은 본 발명의 일 실시 예에 따른 소스 코드 변경 영향도 분석 시스템의 동작 환경을 설명하기 위한 도면이다.
도 2는 본 발명의 일 실시 예에 따른 소스 코드 변경 영향도 분석 시스템의 동작을 개략적으로 나타내기 위한 도면이다.
도 3 내지 도 5는 본 발명의 일 실시 예에 따른 소스 코드 변경 영향도 분석 시스템의 각 구성의 세부 동작을 설명하기 위한 도면이다.
1 is a view for explaining the operating environment of the source code change impact analysis system according to an embodiment of the present invention.
2 is a diagram schematically illustrating an operation of a source code change impact analysis system according to an exemplary embodiment of the present invention.
3 to 5 are views for explaining the detailed operation of each configuration of the source code change impact analysis system according to an embodiment of the present invention.

본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 실시예들은 본 발명의 개시가 완전하도록 하고, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다. 명세서 전체에 걸쳐 동일 참조 부호는 동일 구성요소를 지칭한다.Advantages and features of the present invention and methods for achieving them will be apparent with reference to the embodiments described below in detail with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, but may be embodied in various different forms, and only the embodiments are provided to make the disclosure of the present invention complete, and those of ordinary skill in the art to which the present invention belongs. It is provided to fully convey the scope of the invention to those skilled in the art, and the present invention is defined only by the scope of the claims. Like reference numerals refer to like elements throughout.

이하 본 발명의 소스 코드 변경 영향도 분석 시스템에 대하여 첨부된 도면을 참조하여 상세히 설명하기로 한다.Hereinafter, the source code change impact analysis system of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 일 실시 예에 따른 소스 코드 변경 영향도 분석 시스템의 동작 환경을 설명하기 위한 도면이고, 도 2는 본 발명의 일 실시 예에 따른 소스 코드 변경 영향도 분석 시스템의 동작을 개략적으로 나타내기 위한 도면이다.1 is a view for explaining the operating environment of the source code change impact analysis system according to an embodiment of the present invention, Figure 2 is a schematic view of the operation of the source code change impact analysis system according to an embodiment of the present invention It is a figure for showing.

도 1 및 도 2에 도시된 바와 같이, 본 발명의 일 실시 예에 따른 소스 코드 변경 영향도 분석 시스템은 컴포넌트 간의 관계를 분석하는 컴포넌트 관계 분석부(110), 메소드 및 statement 호출 구문 간의 관계를 분석하는 메소드 분석부(120) 및 sql문이 들어있는 xml파일 내 statement 태그 및 sql문 내 테이블 및 컬럼 간의 관계를 분석하는 쿼리 분석부(130)를 포함하여 구성된다.As shown in Figure 1 and 2, the source code change impact analysis system according to an embodiment of the present invention analyzes the relationship between the component relationship analysis unit 110 for analyzing the relationship between components, method and statement call syntax It includes a method analysis unit 120 and a query analysis unit 130 for analyzing the relationship between the statement tag in the xml file containing the sql statement and the tables and columns in the sql statement.

여기서 본 발명의 일 실시예에 따른 소스 코드 변경 영향도 분석 시스템(30)은 ITSM(20, IT Service Management)과 AP 서버(40)의 사이에서 데이터의 송수신이 가능하도록 연결되고, 상기 ITSM(20)을 통해 개발자(10)가 등록한 소스 파일 배포 목록을 전달받아 소스 코드 변경이 시스템에 미치는 영향도를 분석함으로써 변경된 소스 파일에 대한 검증을 수행한 후 AP 서버(40)로 전송하는 배포 서버 장치로서 구현될 수 있다.Here, the source code change impact analysis system 30 according to an embodiment of the present invention is connected to enable transmission and reception of data between the IT service management (ITSM) 20 and the AP server 40, the ITSM 20 As a distribution server device that receives the distribution list of source files registered by the developer 10 and analyzes the influence of the source code change on the system, the verification of the changed source file is performed and then transmitted to the AP server 40. Can be implemented.

또한, 본 발명의 일 실시예에 따른 소스 코드 변경 영향도 분석 시스템(30)은 프로그램 소스 파일에 접근할 수 있는 컴퓨터에서 실행될 수 있고, 분석한 결과를 사용자에게 다양한 방법으로 보여주는 디스플레이를 지원하는 브라우저를 탑재한 하나 이상의 외부 사용자 단말과의 사이에서 데이터의 송수신이 가능하도록 연결될 수도 있다.In addition, the source code change impact analysis system 30 according to an embodiment of the present invention can be executed in a computer that can access a program source file, a browser that supports a display showing the analysis results to the user in various ways It may be connected to enable the transmission and reception of data between one or more external user terminal equipped with.

계속해서 도 2를 참조하여 본 발명의 소스 코드 변경 영향도 분석 시스템(30)의 동작을 살펴보면, 본 발명의 소스 코드 변경 영향도 분석 시스템은 먼저 ITSM(20)을 통해 전달된 소스 파일 배포 목록의 소스 파일들 중 소스 코드가 운영 서버에 반영되는 시점에 변경된 소스 파일을 선별하여 동작을 시작한다(S31). 그 다음 선별된 소스 파일을 읽어 필요에 따라 각각의 컴포넌트 관계 분석부(110), 메소드 분석부(120) 및 쿼리 분석부(130)의 실행 여부를 판단한다(S32). 그리고 판단 결과에 따라 컴포넌트 관계 분석부(A), 메소드 분석부(B) 및/또는 쿼리 분석부(C)의 분석을 수행한다. 마지막으로 분석이 완료되면 검증된 소스 파일을 AP 서버(40)로 전송하며 동작이 종료된다(S33).2, the operation of the source code change impact analysis system 30 of the present invention will be described with reference to FIG. Among the source files, the changed source file is selected at the point when the source code is reflected by the operation server and the operation is started (S31). Then, the selected source file is read to determine whether to execute the respective component relationship analysis unit 110, the method analysis unit 120, and the query analysis unit 130 as necessary (S32). The component relation analysis unit A, the method analysis unit B, and / or the query analysis unit C are analyzed according to the determination result. Finally, when the analysis is completed, the verified source file is transmitted to the AP server 40 and the operation ends (S33).

다음으로 도 3 내지 도 5를 참조하여 본 발명의 소스 코드 변경 영향도 분석 시스템의 각 구성의 세부 동작을 살펴본다.Next, the detailed operation of each component of the source code change impact analysis system of the present invention will be described with reference to FIGS. 3 to 5.

도 3 내지 도 5는 본 발명의 일 실시 예에 따른 소스 코드 변경 영향도 분석 시스템의 각 구성의 세부 동작을 설명하기 위한 도면이다.3 to 5 are views for explaining the detailed operation of each configuration of the source code change impact analysis system according to an embodiment of the present invention.

컴포넌트 관계 분석부(110)는 프로그램 소스 내의 컴포넌트 설정 xml 파일에서 참조 컴포넌트 정보인 reference 정보를 파싱하여 데이터베이스(140)에 저장할 수 있다.The component relationship analyzer 110 may parse reference information, which is reference component information, from a component configuration xml file in a program source and store the reference information in the database 140.

도 3에 도시된 바와 같이, 컴포넌트 관계 분석부(110)는 패턴 기반 분석 방식을 이용하여 미리 설정된 분석 파일명의 문자열 정규 표현식 패턴(예를 들어, sz_.*.xml 등)을 통해 소스 디렉토리 내 대상 파일을 찾는다(S111). 이때, 컴포넌트 관계 분석부(110)는 이러한 패턴 기반 분석 방식 대신 기타 다른 분석 방식을 사용하거나 기타 다른 분석 방식을 동시에 사용할 수도 있다.As shown in FIG. 3, the component relationship analysis unit 110 uses a pattern-based analysis method to target objects in a source directory through a string regular expression pattern (for example, sz _. *. Xml, etc.) set in advance. Find the file (S111). In this case, the component relationship analysis unit 110 may use other analysis methods or other analysis methods simultaneously instead of the pattern-based analysis method.

다음으로, 컴포넌트 관계 분석부(110)는 대상 파일의 소스 코드를 파싱한다(S112). 이때, 대상 파일의 소스 코드의 예시는 아래와 같다:Next, the component relationship analysis unit 110 parses the source code of the target file (S112). Here is an example of the source code for the target file:

Figure 112017040975614-pat00001
Figure 112017040975614-pat00001

그리고, 컴포넌트 관계 분석부(110)는 파싱한 참조 컴포넌트 정보인 reference 정보를 이를테면 서비스명, 자식 서비스명, 클래스 경로 등으로 구조적인 컬렉션화한다(S113). 이때, 상기한 소스 코드에서 파싱한 정보의 구조적인 컬렉션 결과의 예시는 아래와 같다:The component relationship analyzer 110 structurally collects reference information, which is parsed reference component information, such as a service name, a child service name, a class path, and the like (S113). Here is an example of the result of a structured collection of information parsed from the source code above:

Figure 112017040975614-pat00002
Figure 112017040975614-pat00002

계속해서 컴포넌트 관계 분석부(110)는 상기한 단계 S111 내지 S113을 통해 획득된 정보가 데이터베이스(140)에 존재하는지 여부를 판단하고(S114), 판단 결과 존재한다면(S114의 예) 기존 데이터를 획득된 정보로 업데이트하며(S115), 존재하지 않는다면(S114의 아니오) 획득된 정보를 데이터베이스(140)에 삽입한다(S116).Subsequently, the component relationship analysis unit 110 determines whether the information obtained through the above-described steps S111 to S113 exists in the database 140 (S114), and if the determination result exists (YES in S114), acquires existing data. The information is updated (S115), and if not present (NO in S114), the obtained information is inserted into the database 140 (S116).

메소드 분석부(120)는 프로그램 소스에서 기능을 정의하는 메소드 영역의 메소드명 및 sql 호출을 위해 구성된 statement문과의 관계를 분석하고, 분석된 메소드명 및 statement문을 데이터베이스(140)에 저장할 수 있다.The method analysis unit 120 may analyze a relationship between a method name of a method area defining a function in a program source and a statement statement configured for sql invocation, and store the analyzed method name and statement statement in the database 140.

도 4에 도시된 바와 같이, 메소드 분석부(120)는 패턴 기반 분석 방식을 이용하여 미리 설정된 분석 자바 파일명의 문자열 정규 표현식 패턴(예를 들어, .*Impl.java 등)을 통해 소스 디렉토리 내 대상 파일을 찾는다(S121). 이때, 메소드 분석부(120)는 이러한 패턴 기반 분석 방식 대신 기타 다른 분석 방식을 사용하거나 기타 다른 분석 방식을 동시에 사용할 수도 있다.As shown in FIG. 4, the method analyzing unit 120 uses a pattern-based analysis method to target objects in a source directory through a string regular expression pattern (for example,. * Impl.java, etc.) of a preset analysis Java file name. Search for a file (S121). In this case, the method analysis unit 120 may use other analysis methods or other analysis methods at the same time instead of the pattern-based analysis method.

다음으로, 메소드 분석부(120)는 패턴 기반 분석 방식을 이용하여 미리 설정된 분석 자바 메소드의 문자열 정규 표현식 패턴(예를 들어, .*executeQuery 등)을 통해 소스 파일 내 대상 메소드를 찾는다(S122). 이때, 메소드 분석부는 상기한 S121에 대해서와 같이 이러한 패턴 기반 분석 방식 대신 기타 다른 분석 방식을 사용하거나 기타 다른 분석 방식을 동시에 사용할 수도 있다.Next, the method analyzer 120 finds a target method in the source file through a string regular expression pattern (for example,. * ExecuteQuery, etc.) of a preset analysis Java method using a pattern-based analysis method (S122). In this case, the method analyzer may use other analysis methods or other analysis methods simultaneously instead of the pattern-based analysis method as in S121 described above.

그리고, 메소드 분석부(120)는 대상 메소드의 자바 소스 코드를 파싱한다(S123). 이때, 대상 메소드의 소스 코드의 예시는 아래와 같다:The method analyzer 120 parses Java source code of the target method (S123). Here is an example of the source code of the target method:

Figure 112017040975614-pat00003
Figure 112017040975614-pat00003

그 후, 메소드 분석부(120)는 파싱한 자바 소스 코드를 메소드 정보, statement문, 클래스 경로 등으로 구조적인 컬렉션화한다(S124). 이때, 상기한 소스 코드에서 파싱한 정보의 구조적인 컬렉션 결과의 예시는 아래와 같다:Thereafter, the method analyzer 120 structurally collects the parsed Java source code into method information, statement statements, class paths, and the like (S124). Here is an example of the result of a structured collection of information parsed from the source code above:

Figure 112017040975614-pat00004
Figure 112017040975614-pat00004

계속해서 메소드 분석부(120)는 상기한 단계 S121 내지 S124를 통해 리턴된 메소드 정보가 데이터베이스(140)에 존재하는지 여부를 판단하고(S125), 판단 결과 존재하지 않는다면(S125의 아니오) 리턴된 메소드 정보를 데이터베이스(140)에 삽입하며(S126), 존재한다면(S125의 예) 데이터베이스(140)에서 해당 정보를 삭제한 후 데이터베이스(140)에 삽입한다(S127).Subsequently, the method analyzing unit 120 determines whether the method information returned through the above-described steps S121 to S124 exists in the database 140 (S125), and if the determination result does not exist (NO in S125), the returned method. Information is inserted into the database 140 (S126), and if present (Yes of S125), the information is deleted from the database 140 and then inserted into the database 140 (S127).

쿼리 분석부(130)는 sql문이 들어있는 xml 파일 내의 statement명 및 sql문내의 테이블 및 컬럼과의 관계를 분석하고, 분석된 statement명, 테이블 및 컬럼을 데이터베이스(140)에 저장할 수 있다.The query analysis unit 130 may analyze the relationship between the statement name in the xml file containing the sql statement and the table and column in the sql statement, and store the analyzed statement name, table and column in the database 140.

도 5에 도시된 바와 같이, 쿼리 분석부(130)는 패턴 기반 분석 방식을 이용하여 미리 설정된 분석 sql 파일명의 문자열 정규 표현식 패턴(예를 들어, .*_sql.xml 등)을 통해 소스 디렉토리 내 대상 파일을 찾는다(S131). 이때, 쿼리 분석부(130)는 이러한 패턴 기반 분석 방식 대신 기타 다른 분석 방식을 사용하거나 기타 다른 분석 방식을 동시에 사용할 수도 있다.As shown in FIG. 5, the query analyzing unit 130 uses a pattern-based analysis method to target objects in a source directory through a string regular expression pattern (for example,. * _ Sql.xml, etc.) of a predetermined analysis sql file name. Search for a file (S131). In this case, the query analyzer 130 may use other analysis methods or other analysis methods at the same time instead of the pattern-based analysis method.

다음으로, 쿼리 분석부(130)는 프로그램 소스 내 sql문이 들어 있는 XML 파일을 파싱하여 statement명과 sql문을 분리한다(S132). 그리고, 쿼리 분석부(130)는 sql문을 파싱하여 관련된 테이블명과 컬럼명을 분리한다(S133). 이때, 대상 파일의 소스 코드의 예시는 아래와 같다:Next, the query analysis unit 130 parses the XML file containing the sql statement in the program source to separate the statement name and the sql statement (S132). Then, the query analyzing unit 130 parses the sql statement and separates the related table name and column name (S133). Here is an example of the source code for the target file:

Figure 112017040975614-pat00005
Figure 112017040975614-pat00005

그 후, 쿼리 분석부(130)는 파싱한 XML 파일 및 sql 문을 statement명, 테이블명, 컬럼명 등으로 구조적인 컬렉션화한다(S134). 이때, 상기한 소스 코드에서 파싱한 정보의 구조적인 컬렉션 결과의 예시는 아래와 같다:Thereafter, the query analyzing unit 130 structurally collects the parsed XML file and the sql statement into statement names, table names, column names, and the like (S134). Here is an example of the result of a structured collection of information parsed from the source code above:

Figure 112017040975614-pat00006
Figure 112017040975614-pat00006

계속해서 쿼리 분석부(130)는 상기한 단계 S131 내지 S134를 통해 리턴된 쿼리 정보가 데이터베이스(140)에 존재하는지 여부를 판단하고(S135), 판단 결과 존재하지 않는다면(S135의 아니오) 리턴된 쿼리 정보를 데이터베이스(140)에 삽입하며(S136), 존재한다면(S135의 예) 데이터베이스(140)에서 해당 정보를 삭제한 후 데이터베이스(140)에 삽입한다(S137).Subsequently, the query analyzing unit 130 determines whether the query information returned through the above-described steps S131 to S134 exists in the database 140 (S135), and if it is not present (NO in S135), the returned query. The information is inserted into the database 140 (S136), and if present (Yes of S135), the information is deleted from the database 140 and then inserted into the database 140 (S137).

상기한 각각의 컴포넌트 관계 분석부(110), 메소드 분석부(120) 및 쿼리 분석부(130)의 아래와 같은 분석 결과를 통해 사용자는 AutoInfoMgt 서비스는 AutoInfoDAO와 참조 관계를 가지므로 AutoInfoDAO 서비스에 해당되는 소스 파일을 변경하면 AutoInfoMgt 서비스에 영향을 미칠 수 있다는 것, 그리고 AutoInfoMgt 서비스 내의 getScmInfo 메소드에서는 getScmInfo명을 가진 sql문을 실행하므로 sz.zsamscn 테이블의 scmcd 컬럼을 수정하면 AuthInfoMgt 서비스에 영향을 미칠 수 있다는 것을 알 수 있을 것이다.Through the analysis results of each of the component relationship analysis unit 110, the method analysis unit 120, and the query analysis unit 130 described above, the user has a reference relationship with the AutoInfoDAO, and thus the source corresponding to the AutoInfoDAO service. Note that changing the file can affect the AutoInfoMgt service, and that the getScmInfo method in the AutoInfoMgt service executes an sql statement with the name getScmInfo, so modifying the scmcd column of the sz.zsamscn table might affect the AuthInfoMgt service. Could be.

이상에서 몇 가지 실시예를 들어 본 발명을 더욱 상세하게 설명하였으나, 본 발명은 반드시 이러한 실시예로 국한되는 것은 아니고 본 발명의 기술사상을 벗어나지 않는 범위 내에서 다양하게 변형실시될 수 있다.Although the present invention has been described in more detail with reference to some embodiments, the present invention is not necessarily limited to these embodiments, and various modifications can be made without departing from the spirit of the present invention.

10 : 개발자
20 : ITSM
30 : 소스 코드 변경 영향도 분석 시스템
40 : AP 서버
110 : 컴포넌트 관계 분석부
120 : 메소드 분석부
130 : 쿼리 분석부
10: Developer
20: ITSM
30: source code change impact analysis system
40: AP server
110: component relationship analysis unit
120: method analysis unit
130: query analysis unit

Claims (7)

소프트웨어에서 소스 코드와 데이터베이스의 테이블 및 컬럼에 관한 상호관계를 분석함으로써 소스 코드 변경이 어플리케이션에 미치는 영향도를 도출하는 소스 코드 변경 영향도 분석 시스템으로서,
컴포넌트 간의 관계를 분석하는 컴포넌트 관계 분석부,
메소드 및 statement 호출 구문 간의 관계를 분석하는 메소드 분석부 및
sql문이 들어있는 xml파일 내 statement 태그 및 sql문 내 테이블 및 컬럼 간의 관계를 분석하는 쿼리 분석부를 포함하며,
상기 컴포넌트 관계 분석부는:
미리 설정된 분석 파일명의 문자열 정규 표현식 패턴을 통해 소스 디렉토리 내 대상 파일을 찾는 단계;
상기 대상 파일의 소스 코드를 파싱하는 단계 및
상기 파싱하는 단계에서 파싱한 참조 컴포넌트 정보를 서비스명, 자식 서비스명 및 클래스 경로로 구조적인 컬렉션화하는 단계를 수행하도록 구성된, 소스 코드 변경 영향도 분석 시스템.
A source code change impact analysis system that derives the impact of source code changes on an application by analyzing the correlation between source code and tables and columns in a database.
A component relationship analysis unit analyzing a relationship between components,
A method analyzer for analyzing the relationship between method and statement call syntax; and
It includes a query analysis unit that analyzes the relationship between the statement tag in the xml file containing the sql statement and the tables and columns in the sql statement.
The component relationship analysis unit:
Finding a target file in a source directory through a string regular expression pattern of a preset analysis file name;
Parsing source code of the target file; and
And constructing a structured collection of the reference component information parsed in the parsing into a service name, a child service name, and a class path.
삭제delete 삭제delete 청구항 1에서,
상기 메소드 분석부는:
미리 설정된 분석 자바 파일명의 문자열 정규 표현식 패턴을 통해 소스 디렉토리 내 대상 파일을 찾는 단계;
미리 설정된 분석 자바 메소드의 문자열 정규 표현식 패턴을 통해 상기 대상 파일 내 대상 메소드를 찾는 단계;
상기 대상 메소드의 자바 소스 코드를 파싱하는 단계 및
상기 파싱하는 단계에서 파싱한 상기 자바 소스 코드를 메소드 정보, statement문 및 클래스 경로로 구조적인 컬렉션화하는 단계를 수행하도록 구성된, 소스 코드 변경 영향도 분석 시스템.
In claim 1,
The method analysis section:
Finding a target file in a source directory through a string regular expression pattern of a preset analysis Java file name;
Finding a target method in the target file through a string regular expression pattern of a preset analysis Java method;
Parsing Java source code of the target method; and
And structurally collecting the Java source code parsed in the parsing step into method information, a statement statement, and a class path.
청구항 1에서,
상기 쿼리 분석부는:
미리 설정된 분석 sql 파일명의 문자열 정규 표현식 패턴을 통해 소스 디렉토리 내 대상 파일을 찾는 단계;
상기 sql문이 들어 있는 XML 파일 및 상기 sql문을 파싱하는 단계 및
상기 파싱하는 단계에서 파싱한 상기 XML 파일 및 상기 sql문을 statement명, 테이블명 및 컬럼명으로 구조적인 컬렉션화하는 단계를 수행하도록 구성된, 소스 코드 변경 영향도 분석 시스템.
In claim 1,
The query analysis unit:
Finding a target file in a source directory through a string regular expression pattern of a preset analysis sql file name;
Parsing the sql statement and an XML file containing the sql statement; and
And structurally collecting the XML file and the sql statement parsed in the parsing step into a statement name, a table name, and a column name.
청구항 1, 4 및 5 중 어느 한 항에서,
소스 파일들 중 상기 소스 코드가 운영 서버에 반영되는 시점에 변경된 소스 파일만을 선별하여 영향도를 도출하는, 소스 코드 변경 영향도 분석 시스템.
The method according to any one of claims 1, 4 and 5,
Source code change impact analysis system for deriving the impact by selecting only the source file changed when the source code is reflected in the operating server of the source files.
청구항 1, 4 및 5 중 어느 한 항에서,
분석한 결과를 사용자에게 제시하는 디스플레이를 더 포함하는, 소스 코드 변경 영향도 분석 시스템.
The method according to any one of claims 1, 4 and 5,
The source code change impact analysis system, further comprising a display for presenting the analysis results to the user.
KR1020170053750A 2017-04-26 2017-04-26 System for analysing the effect of source code modification KR102015545B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020170053750A KR102015545B1 (en) 2017-04-26 2017-04-26 System for analysing the effect of source code modification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020170053750A KR102015545B1 (en) 2017-04-26 2017-04-26 System for analysing the effect of source code modification

Publications (2)

Publication Number Publication Date
KR20180119962A KR20180119962A (en) 2018-11-05
KR102015545B1 true KR102015545B1 (en) 2019-08-28

Family

ID=64329182

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170053750A KR102015545B1 (en) 2017-04-26 2017-04-26 System for analysing the effect of source code modification

Country Status (1)

Country Link
KR (1) KR102015545B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117707547B (en) * 2024-02-05 2024-05-28 云筑信息科技(成都)有限公司 Method for analyzing quotation relation among java items

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015109059A (en) * 2013-12-06 2015-06-11 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Method for detecting influence caused by changing source code of application capable of extracting document object model tree and cascading style sheet, computer for detecting influence, and computer program therefor
KR101563494B1 (en) * 2015-05-28 2015-10-27 소프트포럼 주식회사 Real-time source code security weaknesses detection apparatus and method according to the file changes

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100670209B1 (en) * 2004-12-23 2007-01-16 한국전자통신연구원 Device of analyzing web application source code based on parameter status tracing and method thereof
KR101507469B1 (en) 2015-01-06 2015-04-03 (주)싸이버텍 Method for providing source code analysis service
KR20170015178A (en) 2015-07-31 2017-02-08 주식회사 이븐스타 Security system and method for web server

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015109059A (en) * 2013-12-06 2015-06-11 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Method for detecting influence caused by changing source code of application capable of extracting document object model tree and cascading style sheet, computer for detecting influence, and computer program therefor
KR101563494B1 (en) * 2015-05-28 2015-10-27 소프트포럼 주식회사 Real-time source code security weaknesses detection apparatus and method according to the file changes

Also Published As

Publication number Publication date
KR20180119962A (en) 2018-11-05

Similar Documents

Publication Publication Date Title
US7610264B2 (en) Method and system for providing a learning optimizer for federated database systems
US8375362B1 (en) Wizard for web service search adapter
US8296605B2 (en) Systems and methods for correcting software errors
US8516309B1 (en) Method of debugging a software system
US8219581B2 (en) Method and system for analyzing ordered data using pattern matching in a relational database
CN108228229B (en) Method and system for managing Maven dependence
US20190243622A1 (en) Variable analysis using code context
KR20150111134A (en) Code recommendation and share system and method
WO2015167466A1 (en) Query plan post optimization analysis and reoptimization
US10474675B2 (en) Explain tool for optimizing SPARQL queries
US8904352B2 (en) Systems and methods for processing source code during debugging operations
CN104679500B (en) Method and device for realizing automatic generation of entity class
US8489631B2 (en) Distributing a query
US9706005B2 (en) Providing automatable units for infrastructure support
CN111026670A (en) Test case generation method, test case generation device, and storage medium
CN115033894A (en) Software component supply chain safety detection method and device based on knowledge graph
CN113901083A (en) Heterogeneous data source operation resource analysis positioning method and equipment based on multiple analyzers
US11693859B2 (en) Systems and methods for data retrieval from a database indexed by an external search engine
KR102015545B1 (en) System for analysing the effect of source code modification
US10223086B2 (en) Systems and methods for code parsing and lineage detection
CN107341110B (en) Tool for modifying and affecting range of software test positioning patch and implementation method
US11907238B2 (en) Metadata-based software artifact search
Kauhanen et al. Regression test selection tool for python in continuous integration process
CN113821496B (en) Database migration method, system, device and computer readable storage medium
CN110580170A (en) software performance risk identification method and device

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant