Patents
Literature
Patsnap Eureka AI that helps you search prior art, draft patents, and assess FTO risks, powered by patent and scientific literature data.

299 results about "Source code file" patented technology

The source code file is a text file on disk. It contains instructions for the computer that are written in the C programming language. You use a text editor to create the source code file.

Code retrieval method and device and related equipment

The invention provides a code retrieval method and device and related equipment, and relates to the technical field of retrieval. The method comprises the following steps: segmenting each source code file to obtain a plurality of code blocks of each source code file; determining description information of each code block, and determining an association relationship between any two code blocks; generating a multi-layer code knowledge graph based on the description information of each code block and the incidence relation between any two code blocks; obtaining query information of a user, and determining a first code block based on the query information; determining a second code block related to the first code block in the multi-layer code knowledge graph; and generating a retrieval result by using the first code block and the second code block. Through the technical means, the problem of low code retrieval accuracy in related technologies is solved.
Owner:CHINA TELECOM CORP LTD +1

Test case generation method and system based on multi-agent efficient collaboration

The invention relates to a test case generation method and system based on multi-agent efficient collaboration, belongs to the technical field of software testing, and solves the problems of incomplete scene coverage, logic disorder and the like when a single large model processes a complex task. The method comprises the following steps: constructing a multi-modal professional field knowledge base; the task planning agent module generates a test case generation task based on a project development document and a software source code file of a to-be-tested project and distributes the test case generation task to the test demand analysis agent module; based on the test case generation task, extracting a test demand point related to the tested software configuration item, describing the test demand point, and labeling a corresponding tracking relationship between a test demand point ID and a code snippet or a function in the software source code file to construct a test demand-code snippet / function set; and generating a test case and a test description document based on the test demand-code snippet / function set and the multi-modal professional domain knowledge base. And the ability of generating the test case of the large model is enhanced through organic and efficient cooperation of multiple agents.
Owner:BEIJING JINGHANG COMPUTING & COMM RES INST

Private intelligent code collaborative optimization method and system based on graph retrieval

The invention provides a private intelligent code collaborative optimization method and system based on graph retrieval, and relates to the technical field of software engineering intelligent auxiliary tools, and the method comprises the steps: obtaining a source code file and operation log data of a private project; the method comprises the following steps: performing syntax tree analysis on a source code file through a Tree-siter analyzer to generate a corresponding abstract syntax tree; constructing a code knowledge graph by analyzing a function call relationship, an inheritance relationship and a module dependency relationship; monitoring the change of a project file in the code knowledge graph through a code change event processor, and updating the code knowledge graph in real time when the file is changed; establishing an association relationship between the running log data and a corresponding function node in the code knowledge graph; the method comprises the following steps: analyzing a natural language problem of a developer into a Cypher query statement through an intelligent Agent; obtaining a query result from the graph database; and formatting the query result to generate a final result.
Owner:QINGTA TECH

Supply chain cross-packet vulnerability detection method and device, equipment and storage medium

The invention relates to the technical field of information processing, in particular to a supply chain cross-packet vulnerability detection method, device and equipment and a storage medium. A vulnerability packet name, a sensitive API, a trigger parameter and vulnerability description are integrated into tetrad information; if so, performing cross-packet call chain analysis on the source code file by using a cross-packet chain reachability analysis algorithm, obtaining a function call sequence of the sensitive API based on a cross-packet call chain analysis result, realizing vulnerability detection on a cross-packet call chain, generating a vulnerability verification code based on tetrad information by using a preset large language model, and performing vulnerability verification on the vulnerability verification code. The method comprises the following steps: establishing a function call sequence of a bug verification code, verifying the accessibility of the bug verification code in the function call sequence, determining the bug confidence according to the energy consumption condition of a large language model, and generating bug alarm information when the accessibility verification result is that the bug is accessible and the bug confidence is high, thereby realizing double judgment of the bug, reducing the false alarm rate of the bug and improving the user satisfaction.
Owner:JIHUA LAB

Code vulnerability detection method, device and equipment

The invention discloses a code vulnerability detection method, a code vulnerability rule configuration method, a static single assignment SSA code acquisition method, devices corresponding to the methods, and electronic equipment. The code vulnerability detection method comprises the following steps: acquiring a plurality of source code files and code vulnerability rules of an application program; generating an abstract syntax tree of the source code file, and obtaining a function call relationship; and traversing the abstract syntax tree, and obtaining a cross-function risk propagation path according to the function call relationship and the code vulnerability rule. By the adoption of the processing mode, the function calling relation and the abstract syntax tree are fused to conduct cross-function code vulnerability detection, cross-function vulnerability detection of context sensitivity, flow sensitivity and domain sensitivity is achieved, and vulnerability false report and missing report are avoided; therefore, the accuracy and recall rate of vulnerability detection can be effectively improved.
Owner:ALIBABA (CHINA) CO LTD

Cross-product transplantation method and device for secondary development codes, computer equipment and medium

The invention relates to the technical field of electric digital data processing, and provides a secondary development code cross-product transplantation method and device, computer equipment and a medium. The method comprises the steps of loading a source project, screening a to-be-transplanted source code file, identifying an original API type, determining a mapping relation between the original API type and a target API type, and generating an adaptation layer code framework according to the mapping relation; copying the to-be-transplanted source code file into the target project; on the premise of keeping the project hierarchical structure of the source project, replacing the calling node of the original API type with the calling node of the adapter type, and replacing the namespace reference with the corresponding namespace in the target project to obtain a migrated source code file; and obtaining a secondary development project of the target project based on the second product API according to the adaptation layer code framework and the migrated source code file. According to the method and the device, the transplantation efficiency and accuracy of the transplantation of the cross-product secondary development codes are improved.
Owner:GLODON CO LTD

Test case generation method based on multi-modal knowledge base and self-adaptive cue words

The invention relates to a test case generation method based on a multi-modal knowledge base and self-adaptive cue words, belongs to the technical field of software testing, and solves the problems of insufficient reuse of historical project data and expert knowledge, lack of knowledge in a large model professional field, prominent illusion problem, low adoption rate of generated test cases, low practicability and the like. The method comprises the steps of generating an original test demand set of a to-be-tested item; forming a test demand-code snippet / function set based on the software source code file and the original test demand set; generating a first-stage test tree graph based on each test demand point and the corresponding code snippet / function; forming a software test outline based on the test items, the test subitems and the corresponding test demand points and code snippets / functions; forming a second-stage test tree graph based on the first-stage test tree graph and the software test outline; and generating a test case based on the second-stage test tree graph and the software test outline. And the specialty, the accuracy and the interpretability of the test case are enhanced.
Owner:BEIJING JINGHANG COMPUTING & COMM RES INST

Webpage project construction and access control method and device

The invention relates to the technical field of computer networks, in particular to a webpage project construction and access control method, which comprises the following steps: acquiring a Web project source code file, packaging the Web project source code file, configuring a root directory to correspond to the action of a rendering page, and generating a packaged resource file; uploading the packaged resource file to a code warehouse for code hosting, triggering an assembly line execution process, and storing the packaged resource file in a workpiece generated in the assembly line execution process; receiving an access request of a user, and determining item positioning information through a unique identifier in the access request; verifying the user access authority; if the user permission state indicates that the user permission verification is passed, requesting a corresponding resource file from a workpiece, and generating rendering page information containing API basic address information; and sending the rendering page information to a browser for page rendering.
Owner:BEIJING ETERNAL CREATIVE TECH CO LTD

Predicting likely-vulnerable code changes using machine learning

PendingUS20250348594A1Version controlPlatform integrity maintainanceSnapshot (computer storage)Source code file
Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for analyzing computer software source code. One of the methods includes receiving an updated snapshot of a source code file that comprises a change to an existing snapshot of the source code file maintained at a code repository for a software project; obtaining feature data; processing the feature data using a machine learning model to generate a classification output that classifies the updated snapshot into one of a plurality of categories; and performing, based on the classification output, an action with respect to the updated snapshot.
Owner:GOOGLE LLC

Code conversion method and device, page display method and device, medium and equipment

The invention discloses a code conversion method and device, a page display method and device, a medium and equipment. The method comprises the steps that code conversion demand information is acquired, and cue words are constructed based on the code conversion demand information; inputting the cue word into a code generation model to enable the code generation model to generate a source code file of the initial conversion tool; performing transcoding processing on the test case through the initial conversion tool, and deploying a converted code to the environment of the target platform to run to obtain a code running result; constructing a repair prompt word based on the code operation result, and inputting the repair prompt word into a code generation model, so that the code generation model corrects a source code file of the initial conversion tool; a code conversion tool is obtained through testing and correction of multiple iterations; and transcoding the project source code file of the source code platform through the code conversion tool to obtain a code file of the target platform. According to the method, the cross-platform code conversion efficiency can be improved.
Owner:RAJAX NETWORK &TECHNOLOGY (SHANGHAI) CO LTD

Semantic verification method and device based on large model

The invention relates to the technical field of software engineering and information processing, in particular to a semantic verification method and device based on a large model.The method comprises the steps that a source code file and a corresponding software requirement and design document are obtained, code semantic representation is generated based on grammar analysis and static program analysis, and a semantic verification result is obtained; based on text analysis and business flow chart structure identification, generating a design demand semantic representation; respectively inputting the code semantic representation and the design demand semantic representation into a pre-training language large model to generate a code implementation logic description and a design demand logic description; and performing semantic consistency verification on the two types of logic descriptions to obtain a semantic inconsistency result, determining a code position in the source code file based on the semantic inconsistency result, and outputting a scanning report. According to the invention, the automation degree and the rechecking performance of consistency checking of requirements can be improved, and the leak detection and reworking cost can be reduced.
Owner:HENGRUI (CHONGQING) ARTIFICIAL INTELLIGENCE TECH RES INST CO LTD

Software architecture recovery method and system based on structural dependence and semantic similarity

The invention discloses a software architecture recovery method and system based on structural dependence and semantic similarity, and the method comprises the steps: carrying out the coding and embedding of source code files of software through a code pre-training model, extracting the semantic information of the source code files, and calculating the semantic similarity between the source code files; using a code statistical analysis tool to extract a structure dependency relationship between the source code files; in combination with the semantic similarity and the structure dependency relationship, calculating a connection weight between the source code files, and constructing a weighted graph; and dividing the weighted graph into communities representing the software modules by adopting a community detection algorithm, and recovering the software architecture. According to the method provided by the invention, the weighted graph is constructed by combining semantic similarity and structural dependency, and software modular segmentation is carried out by adopting a community detection algorithm, so that the efficiency, accuracy and expandability of software architecture recovery are improved.
Owner:HUAZHONG NORMAL UNIV

Balancing quality and technical cost of updating dependencies in software systems

Methods, systems, and computer-readable storage media for a software dependency update system that processes computer-readable files (e.g., source code file, dependency description file) of a software project to generate an updated dependency graph using linear programming in view of a set of quality metrics for updating dependencies of the software project.
Owner:SAP SE

Test system based on multi-modal knowledge base

The invention relates to a test system based on a multi-modal knowledge base, belongs to the technical field of software testing, and solves the problems of insufficient reuse of historical project data and expert knowledge, lack of professional domain knowledge, illusion, low test case adoption rate and low practicability. The system comprises a knowledge base construction module used for constructing a hierarchical multi-mode professional field knowledge base; the preprocessing module is used for forming a standardized project development document and a software source code file of a to-be-tested project; the test case generation module is used for generating a test case and a software test description thereof based on the multi-modal professional domain knowledge base, the project development document of the project to be tested and the software source code file; and the test execution module prepares execution conditions according to the test case and the software test description thereof, and then executes the software test steps in sequence according to the input and operation description steps described by the test process to obtain an execution result of the test case. And knowledge-based and deep structured multiplexing of test assets is realized, and the test quality and efficiency are improved.
Owner:BEIJING JINGHANG COMPUTING & COMM RES INST

Code tracking method and device, electronic equipment and computer readable storage medium

The invention discloses a code tracking method and device, electronic equipment and a computer readable storage medium, code tracking is applied to a code tracking system, and the code tracking system at least comprises one terminal equipment; a Java virtual machine is deployed in the code tracking system; the method comprises the following steps: starting a Java virtual machine; when the Java virtual machine is started, loading a preset agent library locally stored in the terminal equipment and a first code file corresponding to the Java application; running the first code file, and calling a preset agent library to monitor a code execution path of a target source code corresponding to the first code file; outputting path information associated with the code execution path; the path information comprises each execution step recorded according to the execution sequence, and the record of each execution step at least comprises the line number of the executed target source code in the source code file of the Java application. According to the method, tracking of the full-link code execution path with low intrusion, high compatibility and row-level precision can be realized.
Owner:ALIBABA (CHINA) CO LTD

Code engineering automatic compiling construction method without appointing source code file paths one by one

The invention discloses a code engineering automatic compiling construction method without appointing source code file paths one by one, and belongs to the technical field of software engineering. According to the method, makefile files are created under a code project path, unified src and inc folders are created in each level of catalog of a project to store source files and header files respectively, all file paths are obtained through automatic search, compiling and linking automation is achieved through a mode rule, and automatic generation of a dependency relationship and project solution construction are supported. The invention further provides a compiling construction method of the multi-code project. According to the method, the problem that Makefile or IDE setting needs to be repeatedly modified when code files are added and deleted and paths are modified is solved; the defect that code source file retrieval paths, header file retrieval paths, header file paths depended by compiling of source files and required object file paths need to be manually specified one by one for compiling in the prior art is overcome.
Owner:杨蒙蒙

Software fault localization method based on feature intersection and KAN network

To provide a software fault localization method based on feature intersection and KAN network. The method first extracts different types of features from bug reports and source code files, then uses a crossover layer to crossover and correlate the features and extract hidden relationships between them. Furthermore, by utilizing the KAN network's learning of parameterized nonlinear activation functions, the process of fitting a polynomial function using the feature crossover network is transformed into a process of fitting multiple univariate functions, thereby overcoming the "curse of dimensionality" and more accurately capturing and adapting to complex function changes and complex high-order feature interaction information in defect localization, thereby improving defect localization performance. Finally, the output of the KAN network is input to a fully connected layer to calculate a final similarity score, which is then sorted in descending order based on the final similarity score to obtain the defect localization results.
Owner:HANGZHOU DIANZI UNIV

Software development efficiency improvement engine

In a first use case, a description of source code to be created is validated and used to form a prompt for a large language model (LLM). The prompt is provided to the LLM to generate an output. The output from the LLM is post-processed to generate the source code. In a second use case, a source code file is processed and provided, along with instructions, to an LLM. The LLM provides a list of the methods in the source code file. The LLM is requested to provide a unit test for each of the listed methods. The output from the LLM is post-processed to generate unit tests for the methods in the identified source code file. In a third use case, the LLM is used to generate unit tests for new methods added to the source code file after unit tests were generated.
Owner:SAP SE

Natural language processing engine for automated detection of source code discrepancies

Systems, computer program products, and methods are provided for automated detection of source code discrepancies. The method includes receiving a data transmission including a text file and a source code file; processing the source code file via a machine learning engine, where an output of the machine learning engine includes a plurality of identified updates; processing the text file via a natural language processing engine, where an output of the natural language processing engine includes a plurality of expected updates; identifying a difference between the plurality of identified updates and the plurality of expected updates; and performing a remedial action.
Owner:BANK OF AMERICA CORP

Recursive artificial intelligence code fix circuit

Systems, methods, and computer program products for correcting code issues, such as code smells, using artificial intelligence, are provided. A code issue in one of multiple source code files is determined. An artificial intelligence model, such as a large language model, receives the code issue and the multiple source code files. The AI model recursively modifies at least one source code file from the multiple source code files until the code issue and an error or errors introduced by modifying the at least one source code file are resolved, and the source code files are issue free.
Owner:PAYPAL INC

Code review method and device, electronic equipment and storage medium

The invention discloses a code review method and device, electronic equipment and a storage medium. Comprising the steps that a full-amount source code file of a target project is obtained from a code repository according to a code change event, multiple programming languages and dependency information corresponding to the programming languages are determined based on the full-amount source code file, and each source code file in full-amount source codes corresponds to one programming language; determining at least one to-be-reviewed source code file in the plurality of source code files, and extracting annotation information in each to-be-reviewed source code file; determining a cue word template corresponding to the to-be-reviewed source code file, and determining cue words of the to-be-reviewed source code file based on the programming language, the dependency information, the annotation information and the cue word template corresponding to the to-be-reviewed source code file; and processing each to-be-reviewed source code file and the corresponding cue word based on a preset large language model to obtain a code review result corresponding to each to-be-reviewed source code file. Flexible construction of the cue word is realized, and the accuracy of code review can be improved.
Owner:CHINA POST INFORMATION TECH (BEIJING CO LTD

Code business logic vulnerability static analysis method based on large language model

The invention relates to the technical field of code analysis, in particular to a code business logic vulnerability static analysis method based on a large language model, which comprises the following steps: performing semantic feature extraction based on a source code file set and a business requirement document to obtain a code business semantic feature map; constructing a business logic constraint knowledge network based on the code business semantic feature map, and generating a business scene simulation test case set based on the business logic constraint knowledge network; and executing the service scene simulation test case set, obtaining corresponding function runtime state data, and carrying out state transition trajectory analysis based on the function runtime state data to obtain an actual service state circulation sequence. By executing the test case and capturing the state data when the function runs, the state change of the program can be monitored in real time, an objective basis is provided for subsequent state transition trajectory analysis, and the reliability of an analysis result is ensured.
Owner:SHENZHEN HAIYUNAN NETWORK SECURITY TECH CO LTD

Communication code generation method based on XML configuration file and storage medium

The invention relates to the technical field of code generation, in particular to a communication code generation method based on an XML configuration file and a storage medium, and aims to improve the code development efficiency. The communication code generation method based on the XML configuration file comprises the steps that the XML configuration file is converted into a DOM tree with a hierarchical relation through an XML parser; traversing nodes of the DOM tree, and converting the DOM tree into an abstract syntax tree; based on the abstract syntax tree, statically checking register address conflicts, reference validity, data type compatibility and protocol constraints; traversing the abstract syntax tree to generate a Modbus communication code; and outputting the Modbus communication code as a structured source code file according to the grammar rule of the target language. According to the method, the manual coding workload is greatly reduced, and the development efficiency is improved.
Owner:BEIJING ACCUENERGY TECH CO LTD

Code change generation method based on multi-agent proxy

The invention discloses a code change generation method based on a multi-agent proxy library migration scene, which can accurately locate all code action ranges related to library migration in a file range by performing structured analysis on a source code file and combining source library import information and code feature recognition, and can improve the code change generation efficiency. The problems of omission and misjudgment caused by manual analysis or simple rule matching are avoided, and the integrity and accuracy of migration site recognition are improved. According to the method, the corresponding migration plan is generated by combining key information of the source library and the target library aiming at the identified action range to be migrated, so that the code change process is not limited to simple interface replacement any more, targeted adjustment can be performed according to a specific use scene, and the consistency of migrated codes in terms of semantics and behaviors is ensured. According to the method, through a collaborative code change generation and verification mechanism, the code change related to library migration is automatically generated and evaluated, and the reliability and availability of a generation result are improved while manual intervention is reduced.
Owner:ZHEJIANG UNIV

Computer-automated systems and methods for detecting source code plagiarism

One embodiment of the present invention relates to a computer-automated system and method for identifying copyrighted source code embedded within other source code files, utilizing advanced semantic analysis techniques. This embodiment of the invention addresses the challenge of detecting both literal and non-literal copies of copyrighted code, including instances where the code has been modified in non-semantic ways, such as through renaming variables, changing formatting, or rearranging code blocks. This embodiment creates semantic embeddings of source code using a large language model (LLM). Each segment of source code is transformed into a high-dimensional vector that captures its semantic essence, rather than its literal text. These vectors are then compared using sophisticated similarity metrics, such as cosine similarity or L2 distance, to determine the likelihood of copyright infringement. This embodiment can operate without direct access to the full source code, thereby enhancing privacy and security. Instead, the system works with embeddings that represent the semantic information of the code, significantly reducing the risk of data exposure. Additionally, this embodiment of the invention includes an optional compression module that further minimizes the data footprint by compressing the semantic vectors, enhancing the system's efficiency and scalability. This embodiment of the invention is particularly suited for use in environments where large volumes of code need to be analyzed quickly and accurately, such as in continuous integration / continuous deployment (CI / CD) pipelines. It provides a robust, scalable, and secure solution for managing copyright compliance in software development, offering significant improvements over traditional text-based or hash-based comparison methods.
Owner:STARTOS INC

Method and system for arbitrary-granularity execution clone detection

A method and apparatus are disclosed for enhancing operable functionality of input source code files from a software program by identifying a first code snippet and a first library function which have similar execution flow similarity measures by evaluating a first contiguous sequence of n items extracted from the first code snippet against a second contiguous sequence of n items extracted from the first library function using an Ngram threshold that is calculated for the first library function and one or more literals from the first code snippet so that the developer is presented with a library function recommendation which includes the first code snippet, the first library function, and instructions for replacing the first code snippet with the first library function.
Owner:DEVFACTORY INNOVATIONS FZ LLC

Distributed environment-oriented code security detection and version control method and system

The invention provides a code security detection and version control method and system oriented to a distributed environment, and relates to the technical field of software security, and the method comprises the following steps: receiving a source code file submitted by a distributed node, analyzing a syntax tree structure, extracting semantic features and control flow features, determining a code calling relationship and a data access mode, and storing the code calling relationship and the data access mode; establishing a cross-node code dependency graph; tracking a calling link and a data flow direction on the dependency graph, calculating calling frequency, access authority and data interaction strength among nodes, and identifying a security risk propagation path; constructing a federated learning network training security risk identification sub-model, and generating a security level evaluation result through encryption gradient aggregation and a differential privacy protection mechanism; double confirmation is carried out through Hash verification of a proof-of-workload layer and threshold verification of a voting consensus layer, and version state conversion is constrained based on a time sequence dependency chain. According to the method, the security risk of the distributed code can be accurately identified, and the secure and controllable management of the version is realized.
Owner:SMIC WANYE TECHNOLOGY CO LTD

Compiling security monitoring method and system for high-reliability software development

The invention relates to the technical field of computer software, and discloses a compilation security monitoring method and system for high-reliability software development, and the method comprises the steps: obtaining an initial source code carrying a security annotation; compiling the initial source code carrying the security annotation to generate an initial abstract syntax tree; analyzing the security annotation in the initial abstract syntax tree, executing deep static analysis, identifying at least one injection point, and determining the type and parameter of the security monitoring logic to be injected for each injection point; selecting a corresponding template from a preset security monitor template library according to the type of the security monitoring logic to generate a security monitoring code segment; inserting the security monitoring code segment into a corresponding injection point in the initial abstract syntax tree to form a modified final abstract syntax tree; converting the final abstract syntax tree back to a final source code file; and compiling the final source code file to generate an executable file. The problem of'black box 'of an automatic tool is solved.
Owner:CHENGDU SHUZI AUTOMATION TECH CO LTD

Software testing method and device, computer equipment, readable storage medium and program product

The invention relates to a software testing method and device, computer equipment, a readable storage medium and a program product. The method comprises the steps of obtaining a deep learning model based on a multi-stage training strategy, wherein the deep learning model is used for performing mapping test on a source code file and a demand design document; obtaining a multi-task model based on the deep learning model, wherein the multi-task model is used for performing a mapping test on the demand design document and the test document; based on a relation extraction model, optimizing the test document; the optimization at least comprises enhancement of semantic association between entities. By adopting the method, the software testing quality can be improved.
Owner:CHINA ELECTRONICS RELIABILITY AND ENVIRONMENTAL TESTING INSTITUTE ((THE FIFTH INSTITUTE OF ELECTRONICS MINISTRY OF INDUSTRY AND INFORMATION TECHNOLOGY) (CHINA SAIBAO LABORATORY)

System and methods for detecting security vulnerability fixes

A method for detecting vulnerability fixes in software code is disclosed. A source code file containing source code is obtained. The source code file may, for example, be one of the files of a source code commit. The code changes associated with the file are determined, the code changes indicating differences between a previous version and a current version of the source code. Based on the code changes, a first code representation of the previous version of the source code and a second code representation of the current version of the source code are determined. A first embedding of the first code representation and a second embedding of the second code representation are obtained. By computing a distance between the first and second embeddings, a file-level code change representation for the source code is determined, and the source code file is classified based on the file-level code change representation.
Owner:HUAWEI TECH CO LTD