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

401results about "Code refactoring" patented technology

Intelligent Bug management method and platform based on AI large model

The invention discloses an intelligent Bug management method and platform based on an AI large model. The method comprises the steps that structured error codes, unstructured log texts and development communication records are collected; standardized Bug features are obtained after preprocessing; semantic matching is performed based on a CodeBERT large model to generate a historical similar Bug case set, and a problem code segment is analyzed and positioned in combination with an AST abstract syntax tree; according to the project technology stack features, the historical similar Bug case set and the problem code segment, generating a repair scheme including code modification suggestions, automatically generated repair code snippets and implementation risk assessment; constructing and optimizing a triple knowledge graph; and finally, associating the standardized Bug features, the problem code segment, the repair scheme and the knowledge graph to obtain a Bug diagnosis result, and outputting the Bug diagnosis result. According to the method, intelligent positioning and accurate repairing of the Bug are achieved, the average Bug solving time is remarkably shortened, and meanwhile automatic precipitation of development experience is achieved through the continuously optimized knowledge graph.
Owner:FUJIAN HEALTH ROAD HEALTH TECHNOLOGY CO LTD

Code repairing method and device based on large language model, equipment and medium

The embodiment of the invention provides a code repairing method, device and equipment based on a large language model.The method comprises the following steps that a code to be repaired is analyzed through a code scanning tool on the basis of a coding specification, error information of the code to be repaired is obtained, the error information comprises an error number, a violation rule, a supplementary description, an error example, a correction example, an error type and an error code segment; generating a cue word template according to a historical repair sample and a coding specification of the large language model, and filling the cue word template with the error information to generate a filled cue word; and inputting the filled cue word into the large language model to generate a repair code segment, judging whether the repair code segment accords with a set conversion specification, and if the repair code segment accords with the conversion specification, replacing the code to be repaired with the repair code segment to generate a repaired code. According to the scheme, the code is repaired through an end-to-end automatic process, and the code repairing efficiency is improved.
Owner:BEIHANG UNIV

Retrieval enhanced warehouse-level code completion method based on semantic topology and disambiguation redundancy pruning

The invention discloses a retrieval enhanced warehouse-level code completion method based on semantic topology and disambiguation redundancy pruning. Firstly, a key value code library for accurate mapping of source code fragments and induction sub-graphs is constructed through a specific slicing algorithm; in the retrieval stage, four-level layered optimization is adopted, structural similarity is evaluated by extracting a deep semantic relationship, trimming accurate duplicate items and using a new graph-based measurement (tradeoff is performed on editing according to topological importance), results are reordered to maximize correlation and diversity, candidate items are systematically refined, and the retrieval efficiency is improved. The problems of retrieval redundancy solidification and surface similarity misleading are solved, meanwhile, cross-module dependence is analyzed through an external perception identifier disambiguator, and the problem of cross-file symbol ambiguity is solved; and finally, fusing an optimization result to generate a prompt to drive the LLM to generate higher-quality output. According to the invention, through coordination of semantic and structural signals, strong performance can be obtained even in a large-scale and resource-limited code library. Meanwhile, the design allows it to be orthogonally complementary to other cross-file methods, providing collaborative improvements when used in combination.
Owner:NANJING UNIV OF AERONAUTICS & ASTRONAUTICS

Complex code modification via chain of thought prompting

Techniques for complex code modification via chain of thought prompting are described. A modification service obtains code to be modified according to a modification goal, and can decompose the modification goal, via use of a database or a machine learning model, to identify a set of modification steps. The set of modification steps may be organized according to a chain of thoughts, tree of thoughts, or graph of thoughts. The modification service can execute the set of modification steps via use of a machine learning model to yield modified code, which can be returned to a user.
Owner:AMAZON TECH INC

Front-end multi-module development method and system based on module federation

The invention discloses a front-end multi-module development method and system based on module federation. The method comprises the following steps: extracting necessary examples, public components and public methods in a front-end project to a public basic module, and constructing a module federated product; decoupling other functional modules, and configuring a module code and a module federation construction entry in the construction configuration file; remote module lists and configuration information are managed in a centralized mode through the project configuration module; executing a construction command to call the project construction module to independently package each module and update the project configuration module; and when the application is started, the project loading module loads the public basic module and the remote function module according to the project configuration module. Compared with an existing Module Federation scheme with application as granularity, independent construction, configuration management and flexible loading during operation are achieved on the module level, dependence on repeated and redundant logic is avoided, module plug and play and version switching are supported, and therefore development efficiency, construction performance and expansibility are improved.
Owner:ZHEJIANG HUADONG ENG DIGITAL TECH CO LTD +1

Permission configuration method and device

The invention provides a permission configuration method and device. The method comprises the following steps: acquiring a source code and relative path information of a target document edited in a current editing environment; wherein the relative path information is used for representing position information of the target document relative to a root directory of a working area of the current editing environment; analyzing the source code to obtain a document structure object of the target document; performing node traversal on the document structure object to identify a target node corresponding to the interaction component from each node of the document structure object; according to the permission attribute corresponding to the target node and the relative path information, generating an attribute value of the permission attribute in the source code; wherein the attribute value is used for performing permission configuration of the interaction component, so that the accuracy and consistency of permission configuration are improved, the workload of manual permission configuration of developers is reduced, and the development efficiency is improved.
Owner:CLP JINXIN SOFTWARE (SHANGHAI CO LTD

User-defined script dynamic editing execution method and system of Unity engine

The invention provides a user-defined script dynamic editing and executing method and system of a Unity engine. The method comprises the following steps that codes are input and preprocessed; executing text cleaning, word segmentation and annotation preprocessing according to the line feed as a code line set; grammatical analysis and semantic understanding; constructing an abstract syntax tree, identifying a syntax structure, and combining context analysis semantics to generate a symbol table; processing errors in real time; positioning an error line through a multi-stage matching strategy, highlighting an error position through a visual interface, and generating a repair suggestion in combination with a line number mapping table, error propagation analysis and a multi-evidence fusion mechanism; executing dynamic codes; explaining and executing the corrected script, and feeding back an execution result; through interaction with a Unity engine, operation control of a script on a game object and a scene is realized; through three core technologies of semantic weight dynamic matching, an anti-interference navigation state machine and a hybrid sorting algorithm, the long-standing problems of low matching precision, poor interaction experience and the like in the field of code completion are solved.
Owner:SHENZHEN LIUFENG TECHNOLOGY CO LTD

Systems and methods for LLM-based code refactoring

In some aspects, a management system is provided that interfaces with software code to execute a refactoring process. The process executes iteratively, where a generative AI component (e.g., an LLM) is given the task to make a repository pass a given validation iteratively. In each step, the LLM in provided as an input a list of failed validations to resolve and the ability to interact with the repository. In some examples, the LLM is configured to read source files, write source files, and retrieves information from other data sources such as the Internet or semantically-indexed source repositories, including the repository that the process is currently operating on, among other operations. Further, external APIs and databases can also be included in the process. The LLM will then execute one or multiple of these operations and process one or multiple files to generate modified and / or new code.
Owner:MONGODB INC

Defect repairing method and device based on large model, electronic equipment and medium

The invention provides a defect repairing method and device based on a large model, electronic equipment and a medium, and relates to the field of defect repairing, and the method comprises the following steps: obtaining original log data generated in real time; analyzing the original log data through a preset model, and determining defect logs and user operation parameters; determining a target code file corresponding to the defect log; repairing the target code file through a preset model, and generating a repairing scheme to determine a repaired code file; and submitting the repair code file to a code warehouse to cover the target code file, determining an updated code warehouse, and determining a production system instance according to the updated code warehouse. According to the method, the original log of the deployed system is obtained in real time, the defect log and the associated user operation parameters are automatically analyzed and determined, the target code file is positioned, the repair scheme adjustment code is generated, then the repair code is submitted to the warehouse for updating, the production system instance is determined, and automation of the whole process of defect repair is achieved.
Owner:HANGZHOU DBAPPSECURITY CO LTD

VerilogA code automatic error correction method based on classification error library and large language model

The invention discloses a VerilogA code automatic error correction method based on a classification error library and a large language model, and the method comprises the steps: constructing a classification system of the error types of VerilogA codes, starting from an MTJ device, carrying out the statistics of 84 common errors in the VerilogA codes of MTJ based on the system, and developing an automatic training sample generation system according to the 84 common errors; the method comprises the following steps: selecting a DeepSeek-R1-7B model as a basic model through a benchmark test, and carrying out fine tuning training by utilizing a classified error data set generated by scripting to form a special error correction model for the field. The processing process comprises the steps that VerilogA codes to be corrected are received, error types and reasons are positioned through a trained model, correction codes are generated, and verification of eight types of typical circuits is passed. An error classification-model training-simulation verification system is established, verification and error correction of VerilogA codes are achieved, and time and resources in the development process are saved.
Owner:SOUTHEAST UNIV

Discovery platform for modernization of legacy program code

Methods and systems for improving modernization of legacy software using an intelligent discovery platform are described herein. A client-based agent may generate metadata regarding the received legacy software. The code metadata may be analyzed by a code classifier module, which computes a plurality of score factors from the metrics from the legacy software metadata using a knowledge base from a modernization platform. The classified code metadata may be used by a project-specific model to derive a plurality of sub-scores based on the plurality of score factors associated with the legacy software. An analytics engine may then identify a code module from the legacy software having a greatest derived vulnerability score factor. A graphical interface including reconstructed code, corresponding modern code, and an explanation of vulnerabilities may then be generated by the analytics and reporting component for the identified code module.
Owner:IONATE INC

Method of text system

The invention discloses a method for generating a text system, and aims to solve the problems of long development cycle, disjunction of requirements and technology implementation and the like of traditional software and realize automatic generation from a natural language requirement to a deployable service system based on a large language model. The method is divided into two stages: in the first stage, a system is disassembled into a logic subsystem through man-machine cooperation, core business logic is extracted, a large language model is called by adopting a divide-and-conquer strategy, and a detailed specification containing a functional process and an interface form is generated; in the second stage, a large language model is called to generate a database table structure and a DDL script, an engineering framework of a basic technology stack is initialized and integrated through a predefined scaffold, CRUD codes are generated, the codes are analyzed to generate a transformation plan for structured data, and target logic codes are incrementally integrated. According to the method, control is achieved through Python, the problem of large model input limitation is solved, and generated codes are standard and extensible. The development cycle is shortened, the requirement-design-code consistency is guaranteed, the threshold is lowered, platform locking is avoided, and enterprise digital transformation is assisted.
Owner:青岛国实信息科技有限公司

Standardizing enterprise software code through LLMs

A computer-implemented method and system standardize code patterns within enterprise software environments. A code modernization system utilizes a Large Language Model (LLM) and a specialized prompt library. The library includes pattern recognition prompts to guide the LLM in identifying specific code patterns within selected software code, potentially using enterprise-specific context. It also includes standardized solution prompts to guide the LLM in generating replacement code conforming to predefined enterprise standards for the identified patterns. The system orchestrates communication, transmitting code and relevant prompts to the LLM and receiving identified patterns and subsequently the generated standardized replacement code. This automated approach facilitates improved code quality, consistency, maintainability, and can support code translation efforts within the enterprise.
Owner:MORGAN STANLEY SERVICES GROUP INC

Code writing, checking and modifying method based on large model

The invention particularly relates to a code writing, checking and modifying method based on a large model. According to the code writing, checking and modifying method based on the large model, a fine-tuning large language model is adopted to analyze user requirements, and multi-language initial codes are generated; executing deep code review through a static analysis engine, wherein the deep code review comprises syntax tree verification, security vulnerability mode matching and API dependency chain detection; executing the automatically generated test case set in an isolation environment, monitoring operation indexes in real time, and generating a defect thermodynamic diagram; and driving the large model to perform iterative code reconstruction based on a defect analysis result until it is confirmed that a preset quality standard is met. The code writing, checking and modifying method based on the large model is suitable for multiple languages, the defect rate of codes is reduced, the software development period is prolonged, the labor cost is reduced, and the vulnerability detection rate is greatly increased.
Owner:浪潮智慧城市科技有限公司

Cloud native micro-service splitting and reconstructing method based on runtime behaviors

The invention provides a cloud native micro-service splitting and reconstructing method based on runtime behaviors. A three-layer architecture design is adopted, and the system comprises a dependency network graph construction module, a micro-service division module and a code reconstruction module. The dependency network diagram construction module models specific project source codes and user access operation into abstract representation capable of being processed by an algorithm, the micro-service division module divides a network diagram, obtains a splitting scheme for the dependency network diagram through visual page interaction with a user and manual modification, and inputs the splitting scheme into the code reconstruction module; and a code reconstruction module performs code reconstruction based on the splitting scheme and the dependency network diagram to obtain a complete and operable micro-service architecture code, so that the effect of automatically analyzing Spring Boot project source codes and monitoring the running project to generate the dependency network diagram is realized.
Owner:BEIHANG UNIV

Code automatic complementing and optimizing method and device and medium

The invention discloses an automatic code complementing and optimizing method and device and a medium. The method comprises the following steps: performing data preprocessing on an obtained code sample data set to generate high-quality training data; training the training data by adopting a pre-constructed algorithm model to generate a code completion model; performing problem diagnosis on the to-be-completed code by adopting a multi-dimensional code diagnosis strategy, and outputting a completion keyword of the to-be-completed code; inputting the completion keyword of the to-be-completed code into the code completion model, and outputting a code completion rule of the to-be-completed code; and complementing and optimizing the to-be-complemented code according to the code complementing rule to obtain a complemented code.
Owner:ANRUI DIGITAL INFORMATION TECH CO LTD

Low-resource programming language corpus enhancement method based on cross-language migration

The invention discloses a cross-language migration-based low-resource programming language corpus enhancement method, which comprises the following steps of: receiving a source language code, and driving a large language model to generate an initial target language code through a two-way retrieval mechanism fusing example guidance and knowledge constraint; secondly, constructing an automatic iterative repair closed loop by utilizing the feedback of a compiler, and carrying out self-correction on codes which fail to be compiled; thirdly, high-quality codes are screened out through automatic quality gating and fed back to a corpus and a knowledge base, and self-enhancement circulation of data and knowledge is formed; finally, the method further comprises an offline model evolution step based on grammar and semantic alignment driven by a compiler, a big language model is trained by collecting preference data generated by an online process, and the ability of the big language model to understand a target language is improved fundamentally. According to the method, the core problems of low quality, poor efficiency and lack of self-evolution ability of a low-resource programming language in code migration are solved.
Owner:NANJING UNIV

Agentic artificial intelligence based software development and modernization

Various embodiments of the present disclosure include systems, methods, and / or apparatuses for executing an agentic-AI-based software modernization system. An example system may be configured to receive one or more portions of monolithic legacy code of a legacy software program product, the monolithic legacy code comprising a plurality of code segments, group the monolithic legacy code by functionally related code segments of the plurality of code segments to define a plurality of groups, generate an API for each identified group, generate modern microservice code for each identified group to define a modernized software program product, and validate the modernized software program product.
Owner:PRESIDIO INC

Program defect repairing method and device, equipment and storage medium

The invention discloses a program defect repairing method and device, equipment and a storage medium. The method comprises the steps that a defect code segment is obtained from a first program code which is reported to be wrong, and a similar defect code segment and a similar repair patch corresponding to the defect code segment are inquired in a historical code library; constructing a first prompt word based on the defect code segment, the similar defect code segment and the similar repair patch, generating a repair patch based on the first prompt word, and repairing the first program code through the repair patch to obtain a second program code; and under the condition that the verification of the second program code is not passed, regenerating a repair patch based on a defect code segment appearing in the verification process of the second program code, and repairing the second program code through the newly generated repair patch. According to the method, the big language model is guided to generate the high-credibility repair patch through the historical similar defects and the repair patch thereof, and the problem that in the prior art, the repair patch is unreliable due to the fact that the big language model is separated from an actual repair case is solved.
Owner:ANHUI SANQI JIYU NETWORK TECH CO LTD

Impact analysis apparatus, impact analysis method and program

An impact analysis device acquires a list of method information related to a difference between a new version of a library and an old version of the library, based on a source code of the new version of the library and a source code of the old version of the library; extracts, from the list, a first difference related to a method existing in a first call graph of software that uses the old version of the library; extracts, from the list, a second difference related to a method added to a second call graph of the software that uses the new version of the library; extracts a set of method information of a caller of a transition added to the second call graph in comparison with the first call graph; and outputs a union of the first difference, the second difference, and the set, thereby enhancing support for determining a likelihood that a library update could affect operations of software.
Owner:NT T INC

AI programming method and system based on multilayer memory fusion

The invention particularly provides an AI programming method and system based on multilayer memory fusion. The method comprises the following steps: inputting a natural language programming instruction of a user into an intention recognition module to obtain a task type and a target; based on the task type and the target, dynamically retrieving related context information from the multi-layer memory system to obtain a dynamic context; based on the instruction and the dynamic context, inputting the instruction and the dynamic context into a code generation and optimization module to generate a preliminary project code; global standard parameters are obtained; performing automatic verification through a conflict detection module, and selectively obtaining a final project code and a self-repairing report according to a verification result; performing comprehensive quality evaluation on the final project code to obtain a quality evaluation result; and the preliminary project code, the verification result, the final project code, the self-repairing report and the quality evaluation result are visually fed back to the user through the user interaction module. Project codes are automatically generated, detected and self-repaired.
Owner:TERMINUS GENERAL TECH

Dynamic link library code layout optimization method and system in Serverless scene

The invention discloses a dynamic link library code layout optimization method and system in a Serverless scene, and belongs to the technical field of cloud computing. The method comprises the steps that a dynamic link database needed by an application program is determined; collecting performance data of the dynamic link library; performing rearrangement and fusion operation on function codes in the dynamic link library according to the performance data to obtain a new dynamic link library; and replacing the dynamic link database with a new dynamic link library to support the execution of the application program. According to the method and the device, the execution efficiency of the Serverless function can be remarkably improved.
Owner:PEKING UNIV

Information processing device, method, and program

To support large scale software refactoring by using a language model.SOLUTION: An information processing device is provided with execution control means for extracting a group of a plurality of code blocks including similar description determined by a prescribed language model to have a high similarity of feature information of a program by at least a portion of a set of a plurality of programs constituting prescribed software by using the language mode, and generating a common code block describing common processing based on the similar description and a plurality of partial code blocks corresponding to each code block on the basis of difference between each code block and the similar description from the plurality of code blocks belonging to the group by using the language model.SELECTED DRAWING: Figure 1
Owner:NEC CORP

Operation automation generation method and device and storage medium

The invention discloses an operation automation generation method and device and a storage medium, and relates to the technical field of automatic operation, and discloses an operation automation generation method, which comprises the following steps: generating a skill model based on an operation behavior sequence of a user in a business system, the skill model comprising a plurality of atomic operations, the execution condition and the sequence dependency relationship of the atomic operation are determined; in response to the automatic execution request, obtaining a current interface of the target service system, and comparing the current interface with a historical interface associated with the corresponding atomic operation in the skill model; according to a comparison result, performing adaptive adjustment on the corresponding atomic operation in the skill model to obtain an adjusted skill model; and based on the adjusted skill model, executing automatic operation in the target business system. Through an adaptive adjustment mechanism, the automatic process can dynamically adapt to the interface change of the target business system, and the maintainability of cross-system operation automation is effectively improved.
Owner:SHENZHEN XINGWANG XINTONG TECH CO LTD

Code reconstruction method and system based on multi-agent collaboration

The invention discloses a code reconstruction method and system based on multi-agent collaboration. The method comprises the steps that a collaborative workflow engine obtains a source code to be reconstructed; the scheduling structure analysis agent analyzes the source code to obtain code structure information of the source code; scheduling an odor analysis agent to analyze the source code based on the code structure information and a preset index to obtain odor code information in the source code; the scheduling reconstruction strategy intelligent agent analyzes the code structure information and the peculiar smell code information to obtain a code reconstruction strategy; scheduling a reconstruction execution agent to execute the code reconstruction strategy to obtain a reconstruction code; and outputting the reconstructed code. The technical problems that a traditional code reconstruction tool has limitation of single-point decision making, rule stiffness and the like, and the quality of reconstructed codes is poor are solved.
Owner:CHINA TELECOM CORP LTD

Memory allocation method, computer device, storage medium, and product

The present application relates to the technical field of memory management, and discloses a memory allocation method, a computer device, a storage medium, and a product. The method comprises: defining a special application program interface (API) for allocating a compute express link (CXL) memory; acquiring an invocation request for invoking an API; when the invocation request is used for invoking the special API, generating a CXL memory identifier representing allocation of the CXL memory; and by means of a memory mapping interface, transmitting the CXL memory identifier to a kernel mode, and allocating in the kernel mode a hardware resource related to the CXL memory. According to the present application, a special API for allocating a CXL memory is defined, and a user invokes the special API to implement allocation of the CXL memory, such that the CXL memory can be stably used; and when the user needs to allocate the CXL memory, it is only necessary to modify the invoked API, and the amount of code modification is small, thereby reducing labor costs caused by code modification.
Owner:INSPUR SUZHOU INTELLIGENT TECH CO LTD

Techniques for modifying program code using artificial intelligence agents

One embodiment of a method for modifying program code includes processing, using a first trained language model, program code to identify one or more modifications to the program code; processing, using a second trained language model, the program code and the one or more modifications to generate a plan for applying the one or more modifications; and processing, using a third trained language model, the program code and the plan to generate a modified program code.
Owner:NVIDIA CORP

Source code reconstruction method and device, equipment and medium

The invention discloses a source code reconstruction method and device, equipment and a medium. The method comprises the following steps: acquiring a to-be-processed source code and reconstruction performance description content; determining at least one target code snippet in the to-be-processed source code according to a code reconstruction standard; according to the to-be-processed source code, generating a calling relation and an input and output relation corresponding to the to-be-processed source code; aiming at each target code snippet, reconstructing the target code snippets according to the calling relation and the input and output relation to obtain reconstructed code snippets; and replacing the target code snippets in the to-be-processed source codes with the reconstructed code snippets, wherein the to-be-processed source codes before replacement and the to-be-processed source codes after replacement have the same functions. According to the embodiment of the invention, the source code upgrading efficiency and automation degree of the original system can be improved.
Owner:PIPECHINA SOUTH CHINA CO +1

Multi-terminal code repetition detection and component reconstruction method and device, equipment and medium

The invention relates to the technical field of code analysis, and discloses a multi-terminal code repetition detection and component reconstruction method, device, equipment and medium, and the method comprises the steps: carrying out code analysis on a pre-acquired project code file, and identifying a code mapping relation to obtain an abstract syntax tree and a cross-platform code mapping relation, and according to the abstract syntax tree and the cross-platform code mapping relationship, carrying out repetition logic detection on the project code file to obtain a repetition detection result, according to the repetition detection result, confirming a repetition code in the project code file, carrying out cross-platform code optimization on the repetition code to obtain an optimized code, and carrying out cross-platform code optimization on the optimized code. The method comprises the steps of obtaining duplicated codes, extracting reusable components on the basis of the duplicated codes, generating a multi-end adaptive component template according to a preset condition compiling logic, and reconstructing the optimized codes according to the reusable components and the multi-end adaptive component template to obtain reconstructed codes, so that the code duplicating detection and reconstruction efficiency is improved.
Owner:SHENZHEN LEXIN SOFTWARE TECH CO LTD