KR101780233B1 - Apparatus and method for deteting code cloning of software - Google Patents
Apparatus and method for deteting code cloning of software Download PDFInfo
- Publication number
- KR101780233B1 KR101780233B1 KR1020160050845A KR20160050845A KR101780233B1 KR 101780233 B1 KR101780233 B1 KR 101780233B1 KR 1020160050845 A KR1020160050845 A KR 1020160050845A KR 20160050845 A KR20160050845 A KR 20160050845A KR 101780233 B1 KR101780233 B1 KR 101780233B1
- Authority
- KR
- South Korea
- Prior art keywords
- code
- software
- function
- key
- code clone
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims description 31
- 238000010367 cloning Methods 0.000 title description 16
- 230000006870 function Effects 0.000 claims abstract description 162
- 238000010606 normalization Methods 0.000 claims abstract description 19
- 239000000284 extract Substances 0.000 claims abstract description 12
- 238000001514 detection method Methods 0.000 claims description 25
- 230000014509 gene expression Effects 0.000 claims description 10
- 238000010586 diagram Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 239000011800 void material Substances 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/75—Structural analysis for program understanding
- G06F8/751—Code clone detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/28—Error detection; Error correction; Monitoring by checking the correct order of processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3604—Analysis of software for verifying properties of programs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3604—Analysis of software for verifying properties of programs
- G06F11/3608—Analysis of software for verifying properties of programs using formal methods, e.g. model checking, abstract interpretation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/36—Software reuse
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Computer Hardware Design (AREA)
- Stored Programmes (AREA)
Abstract
본 발명은 소프트웨어에서 코드 클론을 탐지하는 프로그램이 저장된 메모리 및 프로그램을 실행하는 프로세서를 포함한다. 이때, 프로세서는 소프트웨어에 대응하는 소스 코드로부터 복수의 함수를 추출하여 정규화 및 추상화를 수행하며, 정규화 및 추상화된 복수의 함수를 취약 코드 클론 집합과 비교하여, 소프트웨어에 대한 코드 클론 여부를 판단하되, 취약 코드 클론 집합은 복수의 타 소프트웨어에 포함된 함수로부터 추출된 후 정규화 및 추상화되어 저장된 복수의 취약 코드를 포함한다.The present invention includes a processor for executing a program and a memory storing a program for detecting a code clone in software. At this time, the processor extracts a plurality of functions from the source code corresponding to the software, performs normalization and abstraction, compares a plurality of normalized and abstracted functions with a set of weak code clones, determines whether or not the software is cloned, A code clone set includes a plurality of fragile codes that are extracted from a function included in a plurality of other software and normalized and abstracted and stored.
Description
본 발명은 소프트웨어의 코드 클론 탐지 장치 및 방법에 관한 것이다.The present invention relates to an apparatus and a method for detecting a code clone of software.
최근 오픈 소스 소프트웨어(open source software; OSS) 프로그램이 증가함에 따라, 개발자가 소프트웨어 개발 시 필요한 기능을 일일이 구현하지 않고, 잘 알려진 오픈 소스 소프트웨어에 구현되어 있는 코드의 일부 또는 전부를 복제하거나 재사용하는 코드 클로닝(code cloning)도 증가하고 있다. 이러한 코드 클로닝은 개발 시간 및 비용을 단축시킬 수 있다는 장점이 존재한다. 그러므로 최근 많은 개발자가 소프트웨어 개발 시 알려진 오픈 소스 소프트웨어의 코드 클로닝 사용하고 있다.As the number of open source software (OSS) programs has increased in recent years, it has become increasingly difficult for developers to implement some of the functions required for software development and to copy or reuse some or all of the code implemented in well- Cloning is also increasing. Such code cloning has the advantage of shortening development time and cost. Therefore, many developers are using code cloning of open source software known at the time of software development.
그러나 코드 클로닝은 라이선스(license) 정책을 따르지 않은 코드 복제로 인한 오픈 소스 라이선스 위배 문제가 발생할 수 있다. 또한, 원본 소프트웨어에 버그 또는 보안 취약점이 존재하는 경우, 코드 클로닝은 버그 또는 보안 취약점 역시 복제될 수 있다. 그러므로 코드 클로닝된 소프트웨어에는 원본 소프트웨어의 버그 또는 보안 취약점이 동일하게 존재할 수 있다.However, code cloning can cause open source licensing violations due to code duplication that does not comply with the license policy. In addition, if there is a bug or security vulnerability in the original software, code cloning can also replicate bugs or vulnerabilities. Therefore, code-cloned software may have the same software bug or security vulnerability.
종래의 코드 클로닝 탐지 방법은 원본 소스 코드 및 코드 클론 의심 소스 코드의 전부 또는 일부분에 포함된 소스 코드를 비교하거나, 구문 분석(parsing)에 기초하여 추출된 주요 구문 또는 토큰(token)을 비교하여 코드 클로닝을 감지할 수 있다. 그러나 이러한 종래의 방법은 문자열 비교를 수행하므로, 많은 컴퓨팅 자원을 사용하며, 코드 클론을 탐지하는데 시간이 오래 걸릴 수 있다.A conventional code cloning detection method is a method of comparing source code included in all or a part of the original source code and a suspected source code of a code clone or by comparing extracted key syntax or token based on parsing, Cloning can be detected. However, this conventional method performs string comparison, so it uses a lot of computing resources, and it may take a long time to detect a code clone.
이와 관련되어, 한국 공개특허공보 제10-2014-0001951호(발명의 명칭: " 코드 클론 검출을 이용하는 지능형 코드 디퍼런싱을 수행하는 방법 및 시스템")는 대형의 복잡한 소스 코드 변경을 식별하고, 코드 디퍼런싱 툴을 이용하여, 변경을 추적하는 기술을 개시하고 있다.In this regard, Korean Patent Laid-Open Publication No. 10-2014-0001951 (entitled " Method and System for Performing Intelligent Code Differencing Using Code Clone Detection ") identifies large and complex source code changes, Discloses a technique for tracking changes using a code differencing tool.
본 발명은 전술한 종래 기술의 문제점을 해결하기 위한 것으로서, 딕셔너리 자료 구조에 기초하여, 코드 클론을 탐지하는 검색 범위를 줄여 빠르고 효율적으로 소프트웨어의 코드 클론을 탐지할 수 있는 코드 클론 탐지 장치 및 방법을 제공한다.SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems of the prior art, and it is an object of the present invention to provide a code clone detecting apparatus and method capable of detecting a code clone of software quickly and efficiently by reducing a search range for detecting a code clone based on a dictionary data structure to provide.
다만, 본 실시예가 이루고자 하는 기술적 과제는 상기된 바와 같은 기술적 과제로 한정되지 않으며, 또 다른 기술적 과제들이 존재할 수 있다.It should be understood, however, that the technical scope of the present invention is not limited to the above-described technical problems, and other technical problems may exist.
상술한 기술적 과제를 달성하기 위한 기술적 수단으로서, 본 발명의 제 1 측면에 따른 소프트웨어의 코드 클론 탐지 장치는 소프트웨어에서 코드 클론을 탐지하는 프로그램이 저장된 메모리 및 프로그램을 실행하는 프로세서를 포함한다. 이때, 프로세서는 소프트웨어에 대응하는 소스 코드로부터 복수의 함수를 추출하여 정규화 및 추상화를 수행하며, 정규화 및 추상화된 복수의 함수를 취약 코드 클론 집합과 비교하여, 소프트웨어에 대한 코드 클론 여부를 판단하되, 취약 코드 클론 집합은 복수의 타 소프트웨어에 포함된 함수로부터 추출된 후 정규화 및 추상화되어 저장된 복수의 취약 코드를 포함한다.As a technical means for achieving the above technical object, a code clone detecting apparatus of software according to the first aspect of the present invention includes a processor for executing a program and a memory storing a program for detecting a code clone in software. At this time, the processor extracts a plurality of functions from the source code corresponding to software, performs normalization and abstraction, compares a plurality of normalized and abstracted functions with a set of weak code clones, determines whether or not the software is cloned, A code clone set includes a plurality of fragile codes that are extracted from a function included in a plurality of other software and normalized and abstracted and stored.
또한, 본 발명의 제 2 측면에 따른 코드 클론 탐지 장치에서의 소프트웨어의 코드 클론 탐지 방법은 소프트웨어에 대응하는 소스 코드로부터 복수의 함수를 추출하는 단계; 추출된 복수의 함수에 대한 정규화 및 추상화를 수행하는 단계; 및 정규화 및 추상화된 복수의 함수를 취약 코드 클론 집합과 비교하여, 소프트웨어에 대한 코드 클론 여부를 판단하는 단계를 포함한다. 이때, 취약 코드 클론 집합은 복수의 타 소프트웨어에 포함된 함수로부터 추출된 후 정규화 및 추상화되어 저장된 복수의 취약 코드를 포함한다.According to a second aspect of the present invention, there is provided a method of detecting a code clone of software in a code clone detecting apparatus, comprising: extracting a plurality of functions from a source code corresponding to software; Performing normalization and abstraction on a plurality of extracted functions; And comparing the plurality of normalized and abstracted functions with a set of weak code clones to determine whether the code is cloned for the software. At this time, the vulnerable code clone aggregate includes a plurality of fragile codes that are extracted from functions included in a plurality of other software programs and normalized and abstracted and stored.
본 발명은 소프트웨어에 포함된 소스 코드에 대한 정규화 및 추상화를 수행하므로, 소스 코드에 포함된 함수 및 변수의 이름과 자료형 등을 수정한 경우에도 코드 클론을 탐지할 수 있다.The present invention performs normalization and abstraction on source code included in software, so that code clones can be detected even when the names and data types of functions and variables included in the source code are modified.
또한, 본 발명은 딕셔너리 자료구조에 기초하여, 취약 코드 클론 집합 및 해당 소프트웨어에 대한 정수형의 키를 먼저 비교하고, 키 검색을 통하여 축소된 검색 범위에 포함된 해시 값의 비교를 수행하여, 최종적으로 코드 클론을 탐지하므로 시간 복잡도가 작아질 수 있다. 즉, 본 발명은 상수 시간 내에 코드 클론을 탐지할 수 있으므로, 대용량의 오픈 소스 소프트웨어의 코드 클론을 빠르고 효율적으로 탐지할 수 있다.In addition, the present invention first compares a set of a weak code clone and an integer type key for the corresponding software based on a dictionary data structure, compares the hash values included in the reduced search range through a key search, Since the code clone is detected, the time complexity can be reduced. That is, since the present invention can detect a code clone within a constant time, a code clone of a large-capacity open source software can be detected quickly and efficiently.
도 1은 본 발명의 일 실시예에 따른 소프트웨어의 코드 클론 탐지 장치의 블록도이다.
도 2는 본 발명의 일 실시예에 따른 소프트웨어의 소스 코드에 대한 예시도이다.
도 3은 본 발명의 일 실시예에 따른 코드 클론 탐지 과정의 예시도이다.
도 4는 본 발명의 일 실시예에 따른 함수의 추상화의 예시도이다.
도 5는 본 발명의 일 실시예에 따른 코드 클론 탐지 장치의 소프트웨어의 코드 클론 탐지 방법에 대한 순서도이다. 1 is a block diagram of a code clone detection apparatus for software according to an embodiment of the present invention.
2 is an illustration of source code of software in accordance with an embodiment of the present invention.
FIG. 3 is a diagram illustrating a code clone detection process according to an embodiment of the present invention. Referring to FIG.
4 is an illustration of an abstraction of a function according to an embodiment of the present invention.
5 is a flowchart of a method of detecting a code clone of software of a code clone detecting apparatus according to an embodiment of the present invention.
아래에서는 첨부한 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings, which will be readily apparent to those skilled in the art. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. In order to clearly illustrate the present invention, parts not related to the description are omitted, and similar parts are denoted by like reference characters throughout the specification.
명세서 전체에서, 어떤 부분이 다른 부분과 "연결"되어 있다고 할 때, 이는 "직접적으로 연결"되어 있는 경우뿐 아니라, 그 중간에 다른 소자를 사이에 두고 "전기적으로 연결"되어 있는 경우도 포함한다. 또한, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.Throughout the specification, when a part is referred to as being "connected" to another part, it includes not only "directly connected" but also "electrically connected" with another part in between . Also, when a part is referred to as "including " an element, it does not exclude other elements unless specifically stated otherwise.
코드 클로닝은 다른 소프트웨어의 소스 코드의 일부 또는 전부를 복제하는 것을 의미한다. 코드 클로닝은 크게 4가지 유형으로 구분할 수 있다.Code cloning means copying some or all of the source code of other software. There are four types of code cloning.
코드 클로닝의 첫 번째 유형은 소스 코드를 수정 없이 그대로 복제하는 것이다. 이때, 원본 소스 코드 및 코드 클론(code clone) 된 소스 코드는 정확히 일치하게 된다.The first type of code cloning is to replicate the source code without modification. At this time, the original source code and the source code of the code clone are exactly matched.
코드 클로닝의 두 번째 유형은 소스 코드 내의 일부 변수(variable) 및 함수(function) 등의 이름 또는 자료형(type)을 수정하는 것이다. 그러므로 원본 소스 코드 및 코드 클론된 소스 코드는 자료형, 식별자(identifier), 주석(comment) 및 화이트스페이스(white space)를 제외한 다른 구문이 일치하게 된다.The second type of code cloning is to modify the names or types of some variables and functions in the source code. Therefore, the original source code and the code cloned source code are matched with other syntaxes except data type, identifier, comment, and white space.
코드 클로닝의 세 번째 유형은 소스 코드의 일부 변수 또는 함수의 이름을 수정하고, 구조를 보정하는 것이다. 이때, 구조의 보정은 소스 코드의 일부를 삽입 또는 삭제하거나 일부 문장을 재배열하는 것일 수 있다. 그러므로 원본 소스 코드 및 코드 클론된 소스 코드는 일부가 만이 일치할 수 있다.The third type of code cloning involves modifying the names of some variables or functions in the source code, and correcting the structure. At this time, the correction of the structure may include inserting or deleting a part of the source code, or rearranging some sentences. Therefore, only a portion of the original source code and the source code of the code can be matched.
또한, 코드 클로닝의 네 번째 유형은 의미적 복제(sematic clone)이다. 이때, 원본 소스 코드 및 코드 클론된 소스 코드는 서로 구문이 상이하다. 그러나 원본 소스 코드 및 코드 클론된 소스 코드는 기능적으로 동일하므로 같은 일을 수행할 수 있다.The fourth type of code cloning is also a semantic clone. At this time, the original source code and the code cloned source code are different from each other in syntax. However, the original source code and the code cloned source code are functionally identical, so the same thing can be done.
소스 코드의 일부분의 구조를 보정하거나, 소스 코드를 의미적으로 복제하는 세 번째 유형 및 네 번째 유형을 수행하기 위해서는 원본 소스 코드에 대한 충분한 분석 및 추가한 구문에 대한 검증 및 디버깅 시간이 소요되게 된다. 그러므로 세 번째 유형 및 네 번째 유형을 수행하기 위해서는 많은 시간이 소요되며, 높은 수준의 프로그래밍 기술이 필요하다.Compensating the structure of a part of the source code or performing the third and fourth types of semantically duplicating the source code requires sufficient analysis of the original source code and verification and debugging of the added syntax . Therefore, it takes a lot of time to perform the third type and the fourth type, and a high level of programming skill is required.
즉, 일반적으로 코드 클로닝은 소스 코드의 개발에 소요되는 시간 및 노력을 절약하기 위하여 수행되므로, 첫 번째 유형 또는 두 번째 유형에 해당한다. 그러므로 본 발명의 일 실시예에 따른 소프트웨어의 코드 클론 탐지 장치(100)는 첫 번째 유형 및 두 번째 유형의 코드 클론을 대상으로 한다. 즉, 코드 클론 탐지 장치(100)는 코드 클로닝을 수행하는 사용자가 소스 코드에 포함된 특정 함수를 그대로 복제하거나, 특정 함수에 포함된 함수 이름, 변수의 자료형 및 변수의 이름을 변경하여 복제하는 코드 클론을 탐지할 수 있다.In other words, code cloning is usually done to save time and effort in developing source code, so it corresponds to the first type or the second type. Therefore, the code
이하에서는 C 언어 및 C++ 언어 계열의 프로그래밍 언어를 이용하여 개발된 소프트웨어를 예를 들어 본 발명의 일 실시예에 따른 코드 클론 탐지 장치(100) 및 코드 클론 탐지 장치(100)의 코드 클론 탐지 방법을 설명한다. 그러나 프로그래밍 언어는 이에 한정된 것이 아니며, C 언어 및 C++ 언어 계열의 프로그래밍 언어 외의 JAVA, C#, Python 및 BASIC 등과 같은 다양한 프로그래밍 언어를 포함할 수 있다.Hereinafter, software developed using a programming language of the C language and C ++ language series may be referred to as a code
다음은 도 1 내지 도 4를 참조하여, 본 발명의 일 실시예에 따른 소프트웨어의 코드 클론 탐지 장치(100)를 설명한다.Next, a code
도 1은 본 발명의 일 실시예에 따른 소프트웨어의 코드 클론 탐지 장치(100)의 블록도이다. 1 is a block diagram of a code
코드 클론 탐지 장치(100)는 소프트웨어에 포함된 소스 코드로부터 오픈 소스 소프트웨어에 대한 코드 클론을 감지한다.The code
일반적으로 소프트웨어는 하나 이상의 파일(file)을 포함할 수 있다. 파일은 함수(function), 변수(variable) 및 상수(constant)등을 포함할 수 있다.In general, the software may include one or more files. A file may contain functions, variables and constants, and so on.
함수는 실제로 일(task)을 수행하는 명령어, 상수 및 변수를 포함할 수 있다. 이때, 함수는 소프트웨어가 개발되는 프로그래밍 환경에 따라, 모듈(module), 메소드(method) 및 프로시저(procedure) 등이 될 수 있으나, 이에 한정된 것은 아니다.A function may actually contain instructions, constants, and variables that perform a task. At this time, the function may be a module, a method, a procedure, and the like according to a programming environment in which the software is developed, but is not limited thereto.
예를 들어, C 언어 또는 C++언어에서 함수는 헤더(header) 및 메인(main)으로 구분된다. 이때, 헤더는 반환되는 값의 자료형, 함수 이름 및 해당 함수로 입력되는 복수의 인자(parameter)의 자료형을 포함한다. 또한, 메인은 함수가 하는 구체적인 일이 명시된 하나 이상의 라인(line)을 포함한다. 복수의 라인을 포함하는 경우, 메인은 중괄호('{', '}')을 포함하며, 중괄호('{', '}') 내에 복수의 라인을 포함할 수 있다.For example, functions in C or C ++ languages are separated into a header and a main. At this time, the header includes a data type of a value to be returned, a function name, and a data type of a plurality of parameters input to the function. In addition, the main includes one or more lines in which the specific work done by the function is specified. In the case of including a plurality of lines, the main includes braces ('{', '}') and may include a plurality of lines in curly braces ('{', '}').
또한, C 언어 또는 C++ 언어에서 하나의 라인은 세미 클론(';')으로 구분될 수 있다. 즉, 개행 문자('\n')의 출현 여부와 상관없이, 세미클론(';')이 나타날 때까지 포함된 문자는 하나의 라인이 될 수 있다.Also, in C or C ++ languages, one line can be separated by a semi-clone (';'). That is, regardless of the occurrence of the newline character ('\ n'), the included character can be a single line until a semiclon (';') appears.
코드 클론 탐지 장치(100)는 소프트웨어의 소스 코드에 포함된 복수의 함수에 기초하여, 코드 클론을 탐지할 수 있다. 이때, 코드 클론 탐지 장치(100)는 메모리(110), 데이터베이스(120) 및 프로세서(130)를 포함할 수 있다. 도 1의 코드 클론 탐지 장치(100)는 본 발명의 하나의 구현 예에 불가하다. 그러므로 코드 클론 탐지 장치(100)는 도 1에 도시된 구성요소를 기초로 여러 가지로 변형이 가능하다.The code
메모리(110)는 소프트웨어에서 코드 클론을 탐지하는 프로그램이 저장된다. 이때, 메모리(110)는 전원이 공급되지 않아도 저장된 정보를 계속 유지하는 비휘발성 저장장치 및 저장된 정보를 유지하기 위하여 전력이 필요한 휘발성 저장장치를 통칭하는 것이다.The
데이터베이스(120)는 코드 클론을 감지하기 위한 취약 코드 클론 집합을 저장할 수 있다. 이때, 데이터베이스(120)는 코드 클론 탐지 장치(100)와 연결되었거나, 코드 클론 탐지 장치(100)에 탑재된 것일 수 있으나, 이에 한정된 것은 아니다.The
프로세서(130)는 소프트웨어의 소스 코드에 포함된 복수의 함수와 데이터베이스(120)에 저장된 취약 코드 클론 집합에 저장된 함수와의 비교를 통하여, 소프트웨어의 코드 클론 여부를 판단할 수 있다. 이때, 취약 코드 클론 집합은 기 수집된 복수의 타 소프트웨어에 포함된 함수로부터 추출된 소스 코드를 포함할 수 있다. 또한, 취약 코드 클론 집합은 취약 코드를 포함하는 소프트웨어로부터 추출된 소스 코드를 포함하거나, 라이선스 규약 위배 여부를 판단할 미리 정의된 오픈 소스 소프트웨어로부터 추출된 소스 코드를 포함할 수 있으나, 이에 한정된 것은 아니다.The
도 2는 본 발명의 일 실시예에 따른 소프트웨어의 소스 코드에 대한 예시도이다.2 is an illustration of source code of software in accordance with an embodiment of the present invention.
도 2를 참조하면, 소프트웨어의 소스 코드는 제 1 함수(200) 및 제 2 함수(210)를 포함할 수 있다. 이때, 소스 코드에 포함된 복수의 함수는 각각의 반환되는 값의 자료형, 함수 이름 및 해당 함수로 입력되는 복수의 인자의 자료형을 포함하는 헤더(201, 211) 및 해당 함수가 실제 수행하는 일을 정의한 바디(202, 212)를 포함할 수 있다.Referring to FIG. 2, the source code of the software may include a
예를 들어, 제 1 함수(200)는 헤더(201)로 "func1 (bar)" 를 포함한다. 그리고 제 1 함수(200)는 바디(202)로 헤더 아래의 중괄호('{', '}')을 내의 4개의 라인 "foo = bar;", "foo ++;", "bar = fun2(foo);" 및 "return bar;"를 포함할 수 있다.For example, the
또한, 제 2 함수(210)는 헤더(211)로 "func2 (param)"를 포함한다. 그리고 제 2 함수(210)는 바디(212)로 헤더 아래의 중괄호('{', '}')을 내의 2개의 라인 "if(param) {while (param) { param -- ;}}" 및 "return 0;"를 포함할 수 있다.Also, the
도 3은 본 발명의 일 실시예에 따른 코드 클론 탐지 과정의 예시도이다.FIG. 3 is a diagram illustrating a code clone detection process according to an embodiment of the present invention. Referring to FIG.
프로세서(130)는 소스 코드로부터 복수의 함수를 검색하여 추출한다(S300). 그리고 프로세서(130)는 추출된 복수의 함수에 대한 정규화 및 추상화를 수행할 수 있다(S300, S310). 이때, 프로세서(130)는 정규식(regular expression; regex)을 이용할 수 있다.The
정규식은 특정한 규칙에 기초하여, 문자열의 집합을 표현하는데 사용하는 형식 언어이다. 정규식은 문자열 내의 특정 문자를 추출하거나, 제거하기 위하여 사용될 수 있다. 또한, 정규식은 문자열 내에서 변수 이름 및 변수의 자료형을 추출하거나, 추상화하기 위하여 사용할 수 있다. 예를 들어, 프로세서(130)는 "(\**\w+[:]*\w+)"을 이용하여, 함수 내의 함수 명을 추출할 수 있다.A regular expression is a formal language used to represent a set of strings, based on certain rules. Regular expressions can be used to extract or remove specific characters within a string. Regular expressions can also be used to extract or abstract variable names and variable types within a string. For example, the
구체적으로 함수는 프로그래밍 언어에 따라, 미리 정해진 포맷(format)이 존재한다. 예를 들어, 앞에서 설명한 바와 같이, C 언어 및 C++언어에서 함수는 헤더 및 메인이 존재한다. C 언어 및 C++ 언어에서 함수의 헤더는 함수가 반환하는 값의 자료형, 함수 이름과 소괄호('(', ')')로 둘러싸인 0개 이상의 인자를 포함할 수 있다. 이때, 함수가 반환하는 값이 없는 경우, 함수가 반환하는 값의 자료형은 생략되거나, void로 표현될 수 있다.Specifically, the function exists in a predetermined format according to the programming language. For example, as described above, functions in the C and C ++ languages have a header and a main. In C and C ++ languages, the header of a function can contain zero or more arguments enclosed in parentheses ('(', ')'), the function name and the data type of the value returned by the function. At this time, if the function does not return a value, the data type of the value returned by the function may be omitted or represented as void.
또한, C 언어 및 C++ 언어에서 함수의 바디는 헤더 다음에 위치할 수 있다. 예를 들어, 헤더 다음에 중괄호('{')가 있는 경우, 함수의 바디는 해당 중괄호가 끝날 때('}')까지가 포함된 하나 이상의 라인이 될 수 있다. 또한, 헤더 다음에 중괄호가 없는 경우, 함수의 바디는 헤더 다음의 한 개의 라인이 될 수 있다.Also, in C and C ++ languages, the body of a function can be positioned after the header. For example, if there is a brace ('{') after the header, the body of the function can be one or more lines up to the end of the brace ('}'). Also, if there is no brace after the header, the body of the function can be one line after the header.
그러므로 프로세서(130)는 코드 클론을 탐지하는 프로그래밍 언어에 대응하여, 미리 정의된 함수 추출을 위한 정규식에 기초하여, 함수를 추출할 수 있다. Therefore, the
도 2를 참조하면, 프로세서(130)는 미리 정해진 정규식에 기초하여, 제 1 함수(200)인 "func1"함수에서 함수의 헤더(201)로 "func1 (bar)"를 추출하며, 함수의 바디(202)로 함수 헤더(201) 바로 아래의 '{' 및 '}'로 둘러싸인 부분을 추출할 수 있다. 또한, 프로세서(130)는 제 2 함수(210)인 "func2"함수에서 함수의 헤더(211)로 "func2 (param)"을 추출하며, 함수의 바디(212)로 함수 헤더(211) 바로 아래의 '{' 및 '}'로 둘러 쌓인 부분을 추출할 수 있다.2, the
그리고 프로세서(130)는 추출된 복수의 함수에 대한 정규화 및 추상화를 수행할 수 있다. 도 3을 참조하면, 프로세서(130)는 복수의 함수에 대한 정규화를 수행한 이후, 추상화를 수행하는 것으로 도시되어 있다. 그러나 도 3은 본 발명의 하나의 구현 예에 불가하다. 그러므로 정규화 및 추상화의 순서는 구현 예에 따라, 다양하게 변경이 가능하다. 즉, 프로세서(130)는 도 3과 같이, 복수의 함수에 대한 정규화를 수행한 이후, 추상화를 수행할 수 있다. 또한, 프로세서(130)는 복수의 함수에 대한 추상화를 수행한 이후, 정규화를 수행할 수 있다. The
이때, 정규화는 함수로부터 헤더 및 바디를 추출하고, 추출된 바디에 포함된 코드 클론에 필요 없는 부분을 제거하는 것일 수 있다. 구체적으로 앞에서 설명한 바와 같이, 프로세서(130)는 미리 정해진 포맷에 기초하여 함수로부터 헤더 및 메인이 분리되면, 메인에 포함된 복수의 라인에 대하여, 코드 클론 분석에 필요 없는 부분을 제거할 수 있다. 이때, 코드 클론 분석에 필요 없는 부분은 화이트스페이스(whitespace) 문자 및 주석(comment) 등이 될 수 있다. At this time, the normalization may be to extract the header and the body from the function, and to remove the unnecessary portion of the code clone contained in the extracted body. Specifically, as described above, if the header and the main are separated from the function based on a predetermined format, the
프로세서(130)는 앞에서 설명한 정규식을 이용하여, 함수로부터 헤더 및 메인을 분리하고, 화이트스페이스 문자 또는 주석을 제거할 수 있다. 이때, 화이트스페이스 문자는 공백(space), 탭(tab) 문자 및 개행(new line) 문자를 포함할 수 있다.The
프로세서(130)는 정규화된 함수에 대한 추상화를 수행할 수 있다. The
이때, 추상화는 함수 내의 변수 이름 및 변수 자료형을 일반화(generalization)하여, 변수 이름 및 변수 자료형을 변경한 경우에도 코드 클론을 탐지하기 위하여 수행될 수 있다. 실제로, 소스 코드를 클로닝하는 사용자가 변수의 이름 또는 변수의 자료형을 수정하거나, 변수의 자료형에 한정자(qualifier)를 추가하는 방식으로 변수의 자료형을 보정하는 것은 소스 코드의 다른 부분을 수정하는 것에 비해 매우 쉽다. 그러므로 이러한 경우는 매우 자주 발생할 수 있다.At this time, the abstraction can be performed to generalize a variable name and a variable data type in a function, and to detect a code clone even when a variable name and a variable type are changed. Indeed, correcting the data type of a variable by modifying the name of the variable or the data type of the variable, or adding a qualifier to the data type of the variable, is more efficient than modifying other parts of the source code It is very easy. Therefore, this can happen very often.
이와 같이, 프로세서(130)는 두 개의 함수에 포함된 변수의 이름 또는 변수의 자료형이 상이하더라도 실제 일을 수행하는 소스 코드가 동일한 경우, 두 함수를 코드 클론으로 판단할 수 있다. 이를 위하여, 프로세서(130)는 변수 이름 및 변수의 자료형을 추상화하여, 변수 이름 및 변수의 자료형을 수정하는 코드 클론을 용이하게 탐지할 수 있다. 이때, 프로세서(130)는 앞에서 설명한 정규식을 활용하여, 함수의 추상화를 수행할 수 있다. 함수의 추상화는 도 4를 참조하여, 상세하게 설명한다. In this manner, the
도 4는 본 발명의 일 실시예에 따른 함수의 추상화의 예시도이다. 4 is an illustration of an abstraction of a function according to an embodiment of the present invention.
도 4의 (a)는 함수의 추상화를 수행하기 이전의 원본 함수이다. 해당 함수의 헤더는 실수형 자료형(float) 배열(array)인 "arr"과 정수형 자료형(int)인 "len"을 인자로 포함한다. 그러므로 프로세서(130)는 함수의 헤더에 포함된 인자의 변수 이름을 미리 정해진 식별자로 수정하는 추상화를 수행할 수 있다. 예를 들어, 프로세서(130)는 도 4의 (b)와 같이, 함수의 인자에 포함된 변수의 이름을 함수의 인자에 포함된 변수에 대응하여 미리 정해진 식별자인 "FPARAM"으로 추상화할 수 있다.Figure 4 (a) shows the original function before performing the function abstraction. The header of the function contains "arr", a real array of floats, and "len", an integer type (int). Thus, the
함수의 인자에 대한 추상화를 수행한 이후, 프로세서(130)는 함수의 바디에 포함된 변수의 자료형에 대하여 추상화를 수행할 수 있다. 먼저, 프로세서(130)는 변수의 자료형에 한정자를 삭제할 수 있다. 이때, 한정자는 short, long, signed, unsigned, static, extern, volatile, auto 및 resister 중 하나 이상이 될 수 있으나, 이에 한정된 것은 아니다. 그리고 프로세서(130)는 int 및 char, 등과 같은 정수형 자료형, float 및 double 등과 같은 실수형 자료형, bool 등 과 같은 논리 자료형, 및 void 자료형 등의 자료형을 자료형에 대응하는 미리 정해진 식별자로 변경할 수 있다.After performing an abstraction on the arguments of the function, the
예를 들어, 프로세서(130)는 도 4의 (c)와 같이, 함수의 바디에 포함된 변수의 자료형의 한정자인 "static"을 제거하고, "float" 자료형인 "sum" 변수 및 "int" 자료형인 "i" 변수의 자료형을 자료형에 대응하는 미리 정해진 식별자인 "DTYPE"으로 추상화 할 수 있다.For example, the
마지막으로 프로세서(130)는 함수의 바디에 포함된 변수의 이름을 바디에 포함된 변수에 이름에 대응하는 미리 정해진 식별자에 기초하여 추상화할 수 있다. 예를 들어, 도 4의 (d)와 같이, 프로세서(130)는 함수의 바디에 포함된 변수의 이름을 바디에 포함된 변수에 이름에 대응하는 미리 정해진 식별자인 "LVAR"로 추상화할 수 있다.Finally, the
원본 함수인 도 4의 (a)와 추상화를 완료한 도 4의 (d)를 참조하면, 두 함수는 함수의 인자 이름 및 함수 내의 변수의 자료형과 이름이 상이하다. 그러나 두 함수는 실수형 배열 및 정수형 값을 인자로 입력 받고, 실수형 배열에 대한 평균을 산출하여 화면에 출력하는 동일한 일을 수행하게 된다.Referring to FIG. 4 (a), which is an original function, and FIG. 4 (d), in which an abstract is completed, the two functions differ in the argument name of the function and the data type and the name of the variable in the function. However, both functions accept the real array type and integer type as arguments and perform the same task of calculating the average of the real type array and outputting it to the screen.
소프트웨어에 포함된 복수의 함수에 대한 정규화 및 추상화를 수행한 이후, 프로세서(130)는 정규화 및 추상화된 함수와 취약 코드 클론 집합을 비교하기 위하여, 딕셔너리(dictionary) 자료구조를 이용하여 표현할 수 있다(S320).After performing normalization and abstraction on a plurality of functions included in the software, the
딕셔너리 자료구조는 키와 키와 대응되는 하나 이상의 값을 포함할 수 있다. 이때, 하나 이상의 값은 배열 또는 집합(set) 형태로 포함될 수 있다. 또한, 딕셔너리 자료구조는 해시마크 딕셔너리(hashmark dictionary)일 수 있다. The dictionary data structure may contain one or more values corresponding to keys and keys. At this time, one or more values may be included in the form of an array or a set. Also, the dictionary data structure may be a hashmark dictionary.
구체적으로 프로세서(130)는 소프트웨어에 포함된 복수의 함수 각각에 대하여, 추상화된 함수 바디의 길이를 키(key)로 추상화된 함수에 대응하는 해시 값(hash value)을 값(value)으로 설정하고, 딕셔너리 자료구조에 추가할 수 있다. 이때, 프로세서(130)는 함수의 바디로부터 추출된 문자열 및 미리 정의된 해시 함수(hash function)에 기초하여, 키에 대응하는 해시 값을 추출할 수 있다.Specifically, the
예를 들어, 해시 함수는 다음 세 가지 조건을 만족하도록 정해질 수 있다.For example, a hash function can be defined to satisfy the following three conditions.
조건 1: 해시 함수를 통하여 산출되는 해시 값의 충돌(collision)을 최소화함.Condition 1: Minimize the collision of the hash values calculated through the hash function.
조건 2: 최소의 딕셔너리를 생성하기 위하여, 해시 값이 적은 수의 비트를 포함하도록 해시 함수를 설정함. Condition 2: To create a minimal dictionary, set the hash function to include a small number of bits in the hash value.
조건 3: 해시 값을 생성하는데 소요되는 시간의 복잡도가 O(n)이 되도록 해시 함수를 설정함.Condition 3: Set the hash function so that the complexity of the time required to generate the hash value is O (n).
프로세서(130)는 조건 1에 따라, [수학식 1]과 같이, 충돌 확률 P collision 를 산출할 수 있다. 이때, 충돌 확률 P cillision 는 충돌하지 않은 확률 P uncollision 과 상호 배타적(mutually exclusive)이다.The
이때, 샘플 스페이스(sample space) S에서 i번째 샘플(sample)이 앞서 산출된 해시 값과 충돌이 일어나지 않을 이벤트를 A i 라고 할 때, 1부터 i번째 샘플까지 충돌이 발생하지 않을 확률은 [수학식 2]와 같다.In this case, the probability that the collision does not occur from 1 to the ith sample when the i- th sample in the sample space S is not collided with the previously calculated hash value is A i [math Equation 2].
프로세서(130)는 [수학식 2]에 기초하여, N개의 해시 함수를 통하여, 산출 가능한 값 및 k 개의 메시지에 대한 충돌이 발생하지 않을 확률을 [수학식 3]과 같이 산출할 수 있다. 이때, N 및 k 는 자연수이며, N >> k >> 1이 될 수 있다. The
또한, 테일러 급수(Taylor series)에 기초하여, x가 0에 수렴할 때, 이므로, [수학식 3]은 [수학식 4]와 같이 표현할 수 있다.Also, based on the Taylor series, when x converges to zero, (3) can be expressed by the following equation (4). &Quot; (4) "
프로세서(130)는 [수학식 1] 및 [수학식 4]에 기초하여, 충돌이 발생할 확률 P collision 를 [수학식 5]와 같이, 산출할 수 있다. 또한, 프로세서(130)는 [수학식 5] 및 테일러 급수에 기초하여, [수학식 6]을 산출할 수 있다. The
예를 들어, [수학식 6]를 참조하면, 128bit의 해시 함수를 사용할 경우 해시 값은 237번 중 한번 충돌될 수 있다. 즉, 충돌 확률은 2.776e-15%가 될 수 있다. 즉, 해시 함수는 조건 1에 따라, 충돌 확률을 최소화하도록 128bit의 해시 함수를 사용할 수 있다.For example, referring to Equation (6), if a 128-bit hash function is used, the hash value may collide once every 2 37 times. That is, the probability of collision can be 2.776e- 15 %. That is, according to condition 1, the hash function can use a 128-bit hash function to minimize the collision probability.
또한, 프로세스는 알려진 해시 함수에 기초하여, 키에 대응하는 해시 값을 산출할 수 있다. 이때, 해시 함수는 MD4(message digest 4), MD5(message digest 5), CityHash, MurmurHash 및 SpookyHash 등과 같이 알려진 해시 함수이거나, 소프트웨어 코드 클론을 탐지하기 위하여 개발된 사용자 정의 해시 함수일 수 있으나 이에 한정된 것은 아니다.In addition, the process may calculate a hash value corresponding to the key based on a known hash function. In this case, the hash function may be a known hash function such as MD4 (message digest 4), MD5 (message digest 5), CityHash, MurmurHash and SpookyHash, or may be a user defined hash function developed for detecting a software code clone .
예를 들어, 프로세서(130)는 조건 1 내지 3에 기초하여, 알려진 해시 함수 중 시간 복잡도가 작으며, 128 bit 해시 함수인 MD5를 이용할 수 있다. 다시 도 2를 참조하면, 프로세서(130)는 제 1 함수(200)에 대하여, 추상화된 바디의 길이인 39를 키로 설정할 수 있다. 그리고 프로세서(130)는 제 1 함수(200)에 대하여 추상화된 바디 및 MD5 해시 함수에 기초하여, 해시 값을 "8b03 c2a8 ecea 8cc4 9c6d d780 9771 cfd9"로 산출할 수 있다.For example,
또한, 프로세서(130)는 제 2 함수(210)에 대하여 추상화된 바디 길이인 39를 키로 설정할 수 있다. 그리고 프로세서(130)는 추상화된 제 2 함수(210)의 바디 및 해시 함수에 기초하여, 해시 값을 "019c e125 de43 45d0 87d7 706f 1482 2bf1"로 설정할 수 있다.In addition, the
프로세서(130)는 해당 소프트웨어에 대응하는 딕셔너리에 제 1 함수(200)에 대한 키 및 해시 값(204)와 제 2 함수(210)에 대한 키 및 해시 값(214)을 저장할 수 있다. 이때, 제 1 함수(200) 및 제 2 함수(210)가 동일한 키가 설정되므로, 실제 딕셔너리에 저장되는 값은 키 39 및 키에 대응하는 해시 값의 집합 {"8b03 c2a8 ecea 8cc4 9c6d d780 9771 cfd9", "019c e125 de43 45d0 87d7 706f 1482 2bf1"}이 될 수 있다. The
한편, 소프트웨어에 대응하여 추출된 복수의 함수에 대한 딕셔너리가 생성되면, 프로세서(130)는 취약 코드 클론 집합과 비교하여, 해당 소프트웨어에 포함된 코드 클론을 탐지할 수 있다(S330).Meanwhile, when a dictionary for a plurality of functions extracted corresponding to the software is generated, the
이때, 취약 코드 클론 집합에 포함된 소스 코드는 정규화 및 추상화되어 저장된 것일 수 있다. 즉, 프로세서(130)는 해당 소프트웨어에 대한 코드 클론을 탐지하기 이전에, 기수집된 소프트웨어로부터 복수의 함수를 추출하고, 추출된 함수에 대한 정규화 및 추상화를 수행할 수 있다. 그리고 프로세서(130)는 정규화 및 추상화된 함수를 딕셔너리 자료구조에 기초하여, 취약 코드 클론 집합에 저장할 수 있다. 이때, 딕셔너리 자료구조는 앞에서 설명한 바와 같이, 해시마크 딕셔너리일 수 있다. At this time, the source code included in the vulnerable code clone set may be normalized and abstracted and stored. That is, the
또한, 취약 코드 클론 집합은 하나 이상의 소프트웨어에 대하여 각각 생성된 딕셔너리를 포함하는 것이거나, 하나 이상의 소프트웨어에 대하여 생성된 하나의 딕셔너리일 수 있다. In addition, the vulnerable code clone set may include a dictionary generated for each of the one or more software, or a dictionary generated for one or more software.
그리고 프로세스는 해당 소프트웨어에 포함된 함수를 포함하는 딕셔너리가 생성되면, 생성된 딕셔너리 및 취약 코드 클론 집합의 키를 비교할 수 있다. 그리고 프로세서(130)는 복수의 함수에 대한 딕셔너리의 키 및 취약 코드 클론 집합의 키가 일치하는 경우, 해당 키에 포함된 각각의 값을 비교할 수 있다.The process then compares the generated dictionary with the keys of the set of vulnerable code clones when a dictionary containing the functions contained in the software is created. If the key of the dictionary and the key of the set of vulnerable code clones are matched, the
다시 도 2를 참조하면, 프로세서(130)는 취약 코드 클론 집합에 대하여, 해당 소프트웨어에 대응하는 딕셔너리에 포함된 키 39와 일치하는 키를 검색할 수 있다. 그리고 프로세서(130)는 취약 코드 클론 집합 중 키가 39인 경우가 존재하지 않으면, 프로세서(130)는 해당 소프트웨어가 코드 클론이 아님을 판단할 수 있다.Referring again to FIG. 2, the
만약, 취약 코드 클론 집합 중 키가 39인 경우가 존재하면, 프로세서(130)는 키 39에 대응하는 해시 값과 제 1 함수(200) 및 제 2 함수(210)로부터 추출된 해시 값 {"8b03...", "019c..."}을 비교할 수 있다. 그리고 취약 코드 클론 집합 중 키 39에 대응하는 해시 값에 제 1 함수(200) 및 제 2 함수(210)로부터 추출된 해시 값이 존재하지 않은 경우, 프로세서(130)는 해당 소프트웨어가 코드 클론이 아님을 판단할 수 있다. 또한, 취약 코드 클론 집합 중 키 39에 대응하는 해시 값에 제 1 함수(200) 및 제 2 함수(210)로부터 추출된 해시 값이 존재하는 경우, 프로세서(130)는 해당 소프트웨어가 코드 클론임을 판단할 수 있다.If there is a key 39 in the set of vulnerable code clones, the
이와 같이, 프로세서(130)는 딕셔너리 자료구조에 기초하여, 취약 코드 클론 집합의 키 값과 소프트웨어로부터 추출된 함수에 대응하는 키 값을 먼저, 비교할 수 있다. 그러므로 프로세서(130)는 취약 코드 클론 집합에 포함된 복수의 소스 코드와 소프트웨어에 포함된 복수의 소스 코드를 각각 비교하지 않을 수 있다. 즉, 프로세서(130)는 키 값이 일치하는 소스 코드만을 비교할 수 있으므로 검색 범위(search space)를 줄이는 효과가 있다. 또한, 키 값은 정수이므로, 프로세서(130)는 문자열의 비교보다 빠르게 키 값을 검색할 수 있다.As such, the
한편, 프로세서(130)는 해당 소프트웨어에 대한 코드 클론 여부를 판단한 이후, 해당 소프트웨어로부터 추출된 딕셔너리를 취약 코드 클론 집합에 추가할 수 있다. 그리고 프로세서(130)는 향후 해당 소프트웨어로부터 추출된 딕셔너리가 추가된 취약 코드 클론 집합에 기초하여, 타 소프트웨어에 대한 코드 클론 여부를 판단할 수 있다.Meanwhile, the
다음은 도 5를 참조하여, 본 발명의 일 실시예에 따른 코드 클론 탐지 장치(100)에서의 소프트웨어의 코드 클론 탐지 방법을 설명한다.5, a method of detecting a code clone of software in a code
도 5는 본 발명의 일 실시예에 따른 코드 클론 탐지 장치(100)의 소프트웨어의 코드 클론 탐지 방법에 대한 순서도이다. 5 is a flowchart of a method of detecting a code clone of software of the code
코드 클론 탐지 장치(100)는 소프트웨어에 대응하는 소스 코드로부터 복수의 함수를 추출한다(S500).The code
그리고 코드 클론 탐지 장치(100)는 추출된 복수의 함수에 기초하여, 정규화 및 추상화를 수행한다(S510).Then, the code
코드 클론 탐지 장치(100)는 추상화된 복수의 함수를 취약 코드 클론 집합과 비교하여, 소프트웨어에 대한 코드 클론 여부를 판단한다(S520). 이때, 취약 코드 클론 집합은 복수의 타 소프트웨어에 포함된 함수로부터 추출된 후 정규화 및 추상화되어 저장된 복수의 취약 코드를 포함한다. The code
한편, 코드 클론 탐지 장치(100)는 추출된 복수의 함수에 기초하여, 정규화 및 추상화를 수행한 이후, 정규화 및 추상화된 복수의 함수에 기초하여, 소프트웨어에 대한 딕셔너리를 생성할 수 있다. On the other hand, the code
이때, 코드 클론 탐지 장치(100)는 정규화 및 추상화된 함수의 문자열 길이를 딕셔너리의 키로 설정할 수 있다. 또한, 코드 클론 탐지 장치(100)는 상기 정규화 및 추상화된 함수를 딕셔너리의 값으로 설정할 수 있다.At this time, the code
그리고 코드 클론 탐지 장치(100)는 해당 소프트웨어에 대한 코드 클론 여부를 판단하기 위하여, 생성된 딕셔너리 및 취약 코드 클론 집합을 비교할 수 있다.Then, the code
이때, 취약 코드 클론 집합 및 해당 소프트웨어에 대응하여 생성된 딕셔너리는 딕셔너리 자료구조에 기초하여 생성된 것일 수 있다.At this time, the set of vulnerable code clones and dictionaries generated corresponding to the corresponding software may be generated based on the dictionary data structure.
그러므로 코드 클론 탐지 장치(100)는 취약 코드 클론 집합의 키와 해당 소프트웨어에 대응하여 생성된 딕셔너리의 키를 비교할 수 있다. 그리고 코드 클론 탐지 장치(100)는 키값이 동일한 경우, 취약 코드 클론 집합의 키에 대응하는 값과 해당 소프트웨어의 딕셔너리의 키에 대응하는 값을 비교할 수 있다.Therefore, the code
그리고 최종적으로 각각의 값이 동일한 경우, 프로세서(130)는 해당 소프트웨어의 코드 클론을 탐지할 수 있다.Finally, if the respective values are the same, the
본 발명의 일 실시예에 따른 소프트웨어에 대한 코드 클론 탐지 장치(100) 및 방법은 소프트웨어에 포함된 소스 코드에 대한 정규화 및 추상화를 수행하므로, 소스 코드에 포함된 함수 및 변수의 이름과 자료형 등을 수정한 경우에도 코드 클론을 탐지할 수 있다.The
또한, 소프트웨어에 대한 코드 클론 탐지 장치(100) 및 방법은 딕셔너리 자료구조에 기초하여, 취약 코드 클론 집합 및 해당 소프트웨어에 대한 정수형의 키를 먼저 비교하고, 키 검색을 통하여 축소된 검색 범위에 포함된 해시 값의 비교를 수행하여, 최종적으로 코드 클론을 탐지하므로 시간 복잡도가 상수 시간 내로 짧아질 수 있다. 즉, 소프트웨어에 대한 코드 클론 탐지 장치(100) 및 방법은 상수 시간 내에 코드 클론을 탐지할 수 있으므로, 대용량의 오픈 소스 소프트웨어의 코드 클론을 빠르고 효율적으로 탐지할 수 있다.In addition, the code
본 발명의 일 실시예는 컴퓨터에 의해 실행되는 프로그램 모듈과 같은 컴퓨터에 의해 실행 가능한 명령어를 포함하는 기록 매체의 형태로도 구현될 수 있다. 컴퓨터 판독 가능 매체는 컴퓨터에 의해 액세스될 수 있는 임의의 가용 매체일 수 있고, 휘발성 및 비휘발성 매체, 분리형 및 비분리형 매체를 모두 포함한다. 또한, 컴퓨터 판독가능 매체는 컴퓨터 저장 매체 및 통신 매체를 모두 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함한다. 통신 매체는 전형적으로 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈, 또는 반송파와 같은 변조된 데이터 신호의 기타 데이터, 또는 기타 전송 메커니즘을 포함하며, 임의의 정보 전달 매체를 포함한다. One embodiment of the present invention may also be embodied in the form of a recording medium including instructions executable by a computer, such as program modules, being executed by a computer. Computer readable media can be any available media that can be accessed by a computer and includes both volatile and nonvolatile media, removable and non-removable media. In addition, the computer-readable medium may include both computer storage media and communication media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Communication media typically includes any information delivery media, including computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave, or other transport mechanism.
본 발명의 방법 및 시스템은 특정 실시예와 관련하여 설명되었지만, 그것들의 구성 요소 또는 동작의 일부 또는 전부는 범용 하드웨어 아키텍쳐를 갖는 컴퓨터 시스템을 사용하여 구현될 수 있다.While the methods and systems of the present invention have been described in connection with specific embodiments, some or all of those elements or operations may be implemented using a computer system having a general purpose hardware architecture.
전술한 본 발명의 설명은 예시를 위한 것이며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.It will be understood by those skilled in the art that the foregoing description of the present invention is for illustrative purposes only and that those of ordinary skill in the art can readily understand that various changes and modifications may be made without departing from the spirit or essential characteristics of the present invention. will be. It is therefore to be understood that the above-described embodiments are illustrative in all aspects and not restrictive. For example, each component described as a single entity may be distributed and implemented, and components described as being distributed may also be implemented in a combined form.
본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.The scope of the present invention is defined by the appended claims rather than the detailed description and all changes or modifications derived from the meaning and scope of the claims and their equivalents are to be construed as being included within the scope of the present invention do.
100: 코드 클론 탐지 장치
110: 메모리
120: 데이터베이스
130: 프로세서100: Code clone detection device
110: Memory
120: Database
130: Processor
Claims (14)
소프트웨어에서 코드 클론을 탐지하는 프로그램이 저장된 메모리 및
상기 프로그램을 실행하는 프로세서를 포함하고,
상기 프로세서는 상기 소프트웨어에 대응하는 소스 코드로부터 복수의 함수를 추출하여 정규화 및 추상화를 수행하고, 정규화 및 추상화된 함수의 문자열 길이를 기초로 키를 설정하고 상기 정규화 및 추상화된 함수에 대응되는 값을 설정하여 딕셔너리를 생성하며,
상기 생성된 딕셔너리를 취약 코드 클론 집합과 비교하여, 상기 소프트웨어에 대한 코드 클론 여부를 판단하되,
상기 취약 코드 클론 집합은
딕셔너리 자료구조를 기초로, 복수의 타 소프트웨어에 포함된 함수로부터 추출된 후 정규화 및 추상화되어 저장된 복수의 취약 코드를 포함하는, 코드 클론 탐지 장치.A software code clone detection apparatus, comprising:
The program that detects the code clone in the software stores the memory and
And a processor for executing the program,
The processor extracts a plurality of functions from the source code corresponding to the software, performs normalization and abstraction, sets a key based on the string length of the normalized and abstracted function, and sets a value corresponding to the normalized and abstracted function To create a dictionary,
Comparing the generated dictionary with a vulnerable code clone set to determine whether a code is cloned for the software,
The vulnerable code clone set
A plurality of vulnerable codes extracted from a function included in a plurality of other software programs and normalized and abstracted and stored based on a dictionary data structure.
상기 프로세서는 상기 딕셔너리에 포함된 키 및 상기 취약 코드 클론 집합의 키를 비교하고,
상기 딕셔너리에 포함된 키 및 상기 취약 코드 클론 집합의 키가 일치하는 경우, 상기 딕셔너리에 포함된 키에 대응하는 값 및 상기 취약 코드 클론 집합의 키에 대응하는 취약 코드와의 비교를 수행하여 상기 소프트웨어에 대한 코드 클론 여부를 판단하는 것인, 코드 클론 탐지 장치.The method according to claim 1,
The processor compares the key contained in the dictionary and the key of the vulnerable code clone set,
When a key included in the dictionary and a key of the vulnerable code clone set match, compares the value corresponding to the key included in the dictionary and the vulnerable code corresponding to the key of the vulnerable code clone set, Code clone detection means for determining whether or not a code clone is detected.
상기 프로세서는 MD5(message digest 5) 알고리즘에 기초하여, 상기 정규화 및 추상화된 함수에 대응하는 값을 산출하는, 코드 클론 탐지 장치.The method according to claim 1,
Wherein the processor computes a value corresponding to the normalized and abstracted function based on an MD5 (message digest 5) algorithm.
상기 프로세서는 상기 정규화 및 추상화된 복수의 함수를 상기 취약 코드 클론 집합에 추가하는, 코드 클론 탐지 장치.The method according to claim 1,
Wherein the processor adds the normalized and abstracted functions to the vulnerable code clone set.
상기 프로세서는 상기 추출된 복수의 함수에 포함된 화이트스페이스(whitespace) 문자를 제거하고, 상기 화이트스페이스 문자가 제거된 함수에 포함된 문자를 소문자로 변환하되,
상기 화이트스페이스 문자는 공백(space), 탭(tab) 문자 및 개행(new line) 문자를 포함하는, 코드 클론 탐지 장치.The method according to claim 1,
Wherein the processor removes whitespace characters included in the extracted functions and converts the characters included in the function in which the white space characters are removed to lower case,
Wherein the white space character comprises a space, a tab character, and a new line character.
상기 프로세서는 상기 추출된 복수의 함수에 포함된 변수의 자료형, 변수의 이름 및 함수 인자 각각에 대하여 미리 정해진 식별자로 변환하는, 코드 클론 탐지 장치.The method according to claim 1,
Wherein the processor converts a data type of a variable included in the plurality of extracted functions, a name of a variable, and a function factor into a predetermined identifier.
상기 프로세서는 상기 소프트웨어에 대응하는 프로그래밍 언어에 기초하여, 정규식(regular expression)을 정의하고,
상기 정의된 정규식(regular expression)에 기초하여, 상기 함수를 추출하고, 상기 추출된 함수에 대한 정규화 및 추상화를 수행하는 것인, 코드 클론 탐지 장치.The method according to claim 1,
Wherein the processor defines a regular expression based on a programming language corresponding to the software,
Extracts the function based on the regular expression defined above and performs normalization and abstraction on the extracted function.
상기 소프트웨어에 대응하는 소스 코드로부터 복수의 함수를 추출하는 단계;
상기 추출된 복수의 함수에 대한 정규화 및 추상화를 수행하는 단계;
정규화 및 추상화된 함수의 문자열 길이를 기초로 키를 설정하고, 상기 정규화 및 추상화된 함수에 대응되는 값을 설정하여 딕셔너리를 생성하는 단계; 및
상기 생성된 딕셔너리를 취약 코드 클론 집합과 비교하여, 상기 소프트웨어에 대한 코드 클론 여부를 판단하는 단계를 포함하되,
상기 취약 코드 클론 집합은
딕셔너리 자료구조를 기초로, 복수의 타 소프트웨어에 포함된 함수로부터 추출된 후 정규화 및 추상화되어 저장된 복수의 취약 코드를 포함하는, 코드 클론 탐지 방법. A method of detecting a code clone of software in a code clone detection apparatus,
Extracting a plurality of functions from a source code corresponding to the software;
Performing normalization and abstraction on the extracted functions;
Setting a key based on the string length of the normalized and abstracted function, and setting a value corresponding to the normalized and abstracted function to generate a dictionary; And
Comparing the generated dictionary with a vulnerable code clone set to determine whether the software is a code clone,
The vulnerable code clone set
A method of detecting a code clone, comprising: a plurality of vulnerable codes extracted from a function included in a plurality of other software programs and normalized and abstracted based on a dictionary data structure;
상기 소프트웨어에 대한 코드 클론 여부를 판단하는 단계는,
상기 딕셔너리에 포함된 키 및 상기 취약 코드 클론 집합의 키를 비교하는 단계;
상기 딕셔너리에 포함된 키 및 상기 취약 코드 클론 집합의 키가 일치하는 경우, 상기 딕셔너리에 포함된 키에 대응하는 값 및 상기 취약 코드 클론 집합의 키에 대응하는 취약 코드와의 비교를 수행하여, 상기 소프트웨어에 대한 코드 클론 여부를 판단하는 단계를 포함하는, 코드 클론 탐지 방법.11. The method of claim 10,
The step of determining whether or not the software is a clone of code,
Comparing the key contained in the dictionary and the key of the vulnerable code clone set;
Performing a comparison between a value corresponding to a key included in the dictionary and a vulnerable code corresponding to a key of the vulnerable code clone set when the key included in the dictionary matches the key of the vulnerable code clone set, Determining whether a code is cloned for the software.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020160050845A KR101780233B1 (en) | 2016-04-26 | 2016-04-26 | Apparatus and method for deteting code cloning of software |
US15/492,554 US10146532B2 (en) | 2016-04-26 | 2017-04-20 | Apparatus and method for detecting code cloning of software |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020160050845A KR101780233B1 (en) | 2016-04-26 | 2016-04-26 | Apparatus and method for deteting code cloning of software |
Publications (1)
Publication Number | Publication Date |
---|---|
KR101780233B1 true KR101780233B1 (en) | 2017-09-21 |
Family
ID=60034710
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020160050845A KR101780233B1 (en) | 2016-04-26 | 2016-04-26 | Apparatus and method for deteting code cloning of software |
Country Status (2)
Country | Link |
---|---|
US (1) | US10146532B2 (en) |
KR (1) | KR101780233B1 (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019135425A1 (en) * | 2018-01-04 | 2019-07-11 | 라인플러스 주식회사 | Open source software license verification method and system |
KR20190084468A (en) * | 2018-01-08 | 2019-07-17 | 국방과학연구소 | Apparatus and method for summarizing function information |
KR102104322B1 (en) * | 2018-12-13 | 2020-04-24 | 한화시스템 주식회사 | Method for comparing source code for software reuse |
KR20200072711A (en) * | 2018-12-13 | 2020-06-23 | 한화시스템 주식회사 | System for comparing source code for software reuse |
CN112148359A (en) * | 2020-10-10 | 2020-12-29 | 中国人民解放军国防科技大学 | Distributed code clone detection and search method, system and medium based on subblock filtering |
KR20210037628A (en) * | 2020-05-07 | 2021-04-06 | 베이징 바이두 넷컴 사이언스 앤 테크놀로지 코., 엘티디. | Code reuse processing method, device, electronic equipment, computer readable storage medium and computer program |
KR20210098297A (en) * | 2020-01-31 | 2021-08-10 | 고려대학교 산학협력단 | Computet program for detecting software vulnerability based on binary code clone |
KR20220107677A (en) | 2021-01-26 | 2022-08-02 | 고려대학교 산학협력단 | Method for identifying open-source software components at the source-code level |
CN118656125A (en) * | 2024-08-21 | 2024-09-17 | 南开大学 | Method, device and storage medium for collaborative detection of cloned code by cloud-edge-end |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107943516B (en) * | 2017-12-06 | 2020-11-13 | 南京邮电大学 | LLVM-based clone code detection method |
US10565470B2 (en) | 2017-12-15 | 2020-02-18 | International Business Machines Corporation | System, method and recording medium for user interface (UI)-level clone detection |
US10713364B2 (en) * | 2018-05-08 | 2020-07-14 | WhiteSource Ltd. | System and method for identifying vulnerabilities in code due to open source usage |
KR102505127B1 (en) | 2018-05-30 | 2023-03-02 | 삼성전자주식회사 | Electronic device for detecting vulnerability of software and operation method thereof |
WO2020049622A1 (en) * | 2018-09-03 | 2020-03-12 | 日本電気株式会社 | Information processing device, analysis system, analysis method, and non-transitory computer-readable medium having analysis program stored thereon |
CN109445844B (en) * | 2018-11-05 | 2024-06-21 | 浙江网新恒天软件有限公司 | Code clone detection method based on hash value, electronic equipment and storage medium |
CN111368296A (en) * | 2019-06-27 | 2020-07-03 | 北京关键科技股份有限公司 | Source code file matching rate analysis method |
CN110377276B (en) * | 2019-07-19 | 2023-05-23 | 潍柴动力股份有限公司 | Source code file management method and device |
CN110851176B (en) * | 2019-10-22 | 2023-07-04 | 天津大学 | Clone code detection method capable of automatically constructing and utilizing pseudo-clone corpus |
CN110989991B (en) * | 2019-10-25 | 2023-12-01 | 深圳开源互联网安全技术有限公司 | Method and system for detecting source code clone open source software in application program |
CN110990273B (en) * | 2019-11-29 | 2024-04-23 | 中国银行股份有限公司 | Clone code detection method and device |
CN113946366A (en) * | 2020-07-17 | 2022-01-18 | 华为技术有限公司 | Code analysis method, system and computing equipment |
CN112215013B (en) * | 2020-11-02 | 2022-04-19 | 天津大学 | A deep learning-based clone code semantic detection method |
CN112651028B (en) * | 2021-01-05 | 2022-09-30 | 西安工业大学 | Vulnerable code clone detection method based on context semantics and patch verification |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101568224B1 (en) * | 2014-12-26 | 2015-11-11 | 고려대학교 산학협력단 | Analysis device and method for software security |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6954747B1 (en) * | 2000-11-14 | 2005-10-11 | Microsoft Corporation | Methods for comparing versions of a program |
US7503035B2 (en) * | 2003-11-25 | 2009-03-10 | Software Analysis And Forensic Engineering Corp. | Software tool for detecting plagiarism in computer source code |
US7493596B2 (en) * | 2004-06-30 | 2009-02-17 | International Business Machines Corporation | Method, system and program product for determining java software code plagiarism and infringement |
US7681045B2 (en) * | 2006-10-12 | 2010-03-16 | Black Duck Software, Inc. | Software algorithm identification |
US8255885B2 (en) * | 2008-06-16 | 2012-08-28 | Software Analysis And Forensic Engineering Corp. | Detecting copied computer source code by examining computer object code |
US9110769B2 (en) * | 2010-04-01 | 2015-08-18 | Microsoft Technology Licensing, Llc | Code-clone detection and analysis |
EP2652621A4 (en) | 2010-12-15 | 2014-08-20 | Microsoft Corp | Intelligent code differencing using code clone detection |
US9720925B1 (en) * | 2012-04-12 | 2017-08-01 | Orchard Valley Management Llc | Software similarity searching |
EP3161618A4 (en) * | 2014-06-30 | 2017-06-28 | Microsoft Technology Licensing, LLC | Code recommendation |
-
2016
- 2016-04-26 KR KR1020160050845A patent/KR101780233B1/en active IP Right Grant
-
2017
- 2017-04-20 US US15/492,554 patent/US10146532B2/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101568224B1 (en) * | 2014-12-26 | 2015-11-11 | 고려대학교 산학협력단 | Analysis device and method for software security |
Non-Patent Citations (1)
Title |
---|
Kodhai, Egambaram, and Selvadurai Kanmani. "Method-level code clone detection through LWH (Light Weight Hybrid) approach." Journal of Software Engineering Research and Development, 2014.* |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019135425A1 (en) * | 2018-01-04 | 2019-07-11 | 라인플러스 주식회사 | Open source software license verification method and system |
KR20190084468A (en) * | 2018-01-08 | 2019-07-17 | 국방과학연구소 | Apparatus and method for summarizing function information |
KR102092192B1 (en) | 2018-01-08 | 2020-03-23 | 국방과학연구소 | Apparatus and method for summarizing function information |
KR102104322B1 (en) * | 2018-12-13 | 2020-04-24 | 한화시스템 주식회사 | Method for comparing source code for software reuse |
KR20200072711A (en) * | 2018-12-13 | 2020-06-23 | 한화시스템 주식회사 | System for comparing source code for software reuse |
KR102160544B1 (en) * | 2018-12-13 | 2020-09-28 | 한화시스템 주식회사 | System for comparing source code for software reuse |
KR102318714B1 (en) * | 2020-01-31 | 2021-10-28 | 고려대학교 산학협력단 | Computet program for detecting software vulnerability based on binary code clone |
KR20210098297A (en) * | 2020-01-31 | 2021-08-10 | 고려대학교 산학협력단 | Computet program for detecting software vulnerability based on binary code clone |
KR20210037628A (en) * | 2020-05-07 | 2021-04-06 | 베이징 바이두 넷컴 사이언스 앤 테크놀로지 코., 엘티디. | Code reuse processing method, device, electronic equipment, computer readable storage medium and computer program |
KR102505002B1 (en) | 2020-05-07 | 2023-03-02 | 베이징 바이두 넷컴 사이언스 앤 테크놀로지 코., 엘티디. | Code reuse processing method, device, electronic equipment, computer readable storage medium and computer program |
CN112148359A (en) * | 2020-10-10 | 2020-12-29 | 中国人民解放军国防科技大学 | Distributed code clone detection and search method, system and medium based on subblock filtering |
KR20220107677A (en) | 2021-01-26 | 2022-08-02 | 고려대학교 산학협력단 | Method for identifying open-source software components at the source-code level |
KR102476358B1 (en) * | 2021-01-26 | 2022-12-08 | 고려대학교 산학협력단 | Method for identifying open-source software components at the source-code level |
US11836486B2 (en) | 2021-01-26 | 2023-12-05 | Korea University Research And Business Foundation | Method for identifying open-source software components at the source-code level |
CN118656125A (en) * | 2024-08-21 | 2024-09-17 | 南开大学 | Method, device and storage medium for collaborative detection of cloned code by cloud-edge-end |
Also Published As
Publication number | Publication date |
---|---|
US20170308380A1 (en) | 2017-10-26 |
US10146532B2 (en) | 2018-12-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101780233B1 (en) | Apparatus and method for deteting code cloning of software | |
US9882923B2 (en) | Automatic context-sensitive sanitization | |
US20240020109A1 (en) | Method and system for supporting smart contracts in a blockchain network | |
EP2939111A1 (en) | Extending a development environment | |
US7904963B2 (en) | Generating code to validate input data | |
Yu et al. | Optimal sanitization synthesis for web application vulnerability repair | |
JP4951416B2 (en) | Program verification method and program verification apparatus | |
Wu et al. | Foundational proof checkers with small witnesses | |
Li et al. | Detecting standard violation errors in smart contracts | |
WO2020136837A1 (en) | Attack tree generation device, attack tree generation method, and attack tree generation program | |
KR101696694B1 (en) | Method And Apparatus For Analysing Source Code Vulnerability By Using TraceBack | |
KR102209151B1 (en) | Method and device for patching security vulnerable executable binaries | |
CN115391785A (en) | Method, device and equipment for detecting risks of software bugs | |
Holık et al. | Fast matching of regular patterns with synchronizing counting | |
CN114047928B (en) | A smart contract formal verification method and system suitable for combined transactions | |
CN115168861A (en) | Data security verification method, device, equipment and storage medium | |
CN112948400B (en) | Database management method, database management device and terminal equipment | |
Burke et al. | A practical method for syntactic error diagnosis and recovery | |
US7814328B1 (en) | Digital signatures for embedded code | |
CN115599388B (en) | API (application program interface) document generation method, storage medium and electronic equipment | |
Buro et al. | Abstract Code Injection: A Semantic Approach Based on Abstract Non-Interference | |
CN116841906A (en) | Intelligent contract detection method and device and electronic equipment | |
US20070130620A1 (en) | Method, computer arrangement, computer program and computer program product for checking for the presence of control statements in a data value | |
CN111796832A (en) | Hot patch file generation method, device, equipment and storage medium | |
CN112162777B (en) | Source code feature extraction method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20160426 |
|
PA0201 | Request for examination | ||
PE0902 | Notice of grounds for rejection |
Comment text: Notification of reason for refusal Patent event date: 20170523 Patent event code: PE09021S01D |
|
E701 | Decision to grant or registration of patent right | ||
PE0701 | Decision of registration |
Patent event code: PE07011S01D Comment text: Decision to Grant Registration Patent event date: 20170810 |
|
GRNT | Written decision to grant | ||
PR0701 | Registration of establishment |
Comment text: Registration of Establishment Patent event date: 20170914 Patent event code: PR07011E01D |
|
PR1002 | Payment of registration fee |
Payment date: 20170915 End annual number: 3 Start annual number: 1 |
|
PG1601 | Publication of registration | ||
PR1001 | Payment of annual fee |
Payment date: 20200814 Start annual number: 4 End annual number: 4 |
|
PR1001 | Payment of annual fee |
Payment date: 20220914 Start annual number: 6 End annual number: 6 |
|
PR1001 | Payment of annual fee |
Payment date: 20240903 Start annual number: 8 End annual number: 8 |