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

711 results about "Code segment" patented technology

In computing, a code segment, also known as a text segment or simply as text, is a portion of an object file or the corresponding section of the program's virtual address space that contains executable instructions. The term "segment" comes from the memory segment, which is a historical approach to memory management that has been succeeded by paging. When a program is stored in an object file, the code segment is a part of this file; when the loader places a program into memory so that it may be executed, various memory regions are allocated (in particular, as pages), corresponding to both the segments in the object files and to segments only needed at run time. For example, the code segment of an object file is loaded into a corresponding code segment in memory.

Systems, methods, and graphical user interfaces for training a code generation model for low-resource languages

A system, method, and computer-program product includes identifying a plurality of code synthesis items for a target programming language, generating a code synthesis prompt based on a first sampling of the plurality of code synthesis items, synthesizing, via a large language model, a plurality of raw code segments using the code synthesis prompt, executing the plurality of raw code segments with a code interpreter associated with the target programming language, determining one or more valid code segments of the plurality of raw code segments that the code interpreter successfully executed, aggregating, via a second sampling, the one or more valid code segments into one or more validated code synthesis training samples, and training a code generation model using the one or more validated code synthesis training samples. User interfaces may be provided to allow target coding tasks to be specified via text or speech.
Owner:SAS INSTITUTE INC

Transformer-based programming code value quantification system

Disclosed herein are computer-implemented systems and methods for code value assessment. For example, in one aspect, the system comprises, an input module configured to receive program code submissions from developers, a processing unit equipped with Text-Based Models with Contextual Understanding (TBM-CUs) configured to evaluate the functional meaning, purpose, and value of submitted code segments and distinguish between code contributions from human programmers and machine learning systems, a visualization module configured to present the assessed value of the analyzed code over various time periods and dimensions, offering insights into trends, patterns, and comparative performance, a communication module configured to translate programming code meaning or function into plain language summaries for non-technical stakeholders, and an AI peer review module configured to automatically review, accept or reject code contributions.
Owner:CODESCORE SP ZOO

Searching programming code repositories using latent semantic analysis

Certain aspects of the disclosure are directed to searching programming code repositories. In examples, a method is provided that includes receiving a natural language search query via a graphical user interface; converting the natural language search query into a vector representation; determining a proximity score between the vector representation of the natural language search query and at least one vector representation corresponding to a machine learning model generated natural language description of a programming code segment; and providing a search result corresponding to the programming code segment based on the proximity score.
Owner:INTUIT INC

Refactoring non-compliant code into compliant code

Techniques for intelligently prompting an LLM to refactor code are disclosed. A code snippet is accessed. This code is identified as potentially comprising a reference to an out-of-compliance library. Context for the code snippet is generated. An LLM prompt is then built. This prompt will be fed to the LLM, and the prompt instructs the LLM to refactor the code snippet into modified code, which calls a compliant library. Output of the LLM is displayed. This output is based on the LLM operating in response to the LLM prompt. The output includes a proposed rewritten version of the code snippet.
Owner:MICROSOFT TECHNOLOGY LICENSING LLC

Neural network-based context-aware code translation and optimization

Systems and methods for efficiently translating program code from a source language to a target language. Input source code is parsed, using a processor device, into an Intermediate Representation (IR). A structural and semantic model of the source code are established by applying static analysis to the IR, and a program skeleton of the target code is constructed from the IR, including generating context-aware placeholders. The IR is transformed into a Single Static Assignment (SSA) form, and a System Dependency Graph (SDG) is built from the SSA form. The SDG is traversed to order translation tasks, and ordered tasks are translated into the target language using a Large Language Model (LLM). A translated program is generated by integrating translated code segments into a coherent program structure in the target language.
Owner:INTERNATIONAL BUSINESS MACHINE CORPORATION

Code generation method and related device

Provided in the present application is a code generation method, comprising: a code development platform receives input information by a user in a first code file, extracts context information of the input information according to a data warehouse to which the first code file belongs, and retrieves a business knowledge base corresponding to the data warehouse according to the input information so as to obtain target business knowledge; then the code development platform combines the input information, the context information and the target business knowledge according to a prompt template, so as to obtain prompt information; and then the code development platform inputs the prompt information into a large language model (LLM) for reasoning, and presents to the user a code segment reasoned by the LLM. Thus, using the prompt information from the same data source in different processes for prompting the LLM can achieve complete sharing and complete alignment of the prompt information, thereby improving the accuracy of generating code in single time. Furthermore, using a unified prompt template to combine the context information and the business knowledge can make a code segment generated by the LLM more accurate, thereby improving the code acceptance rate in professional domains.
Owner:HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD

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

LLM-powered threat modeling

Techniques for implementing an AI threat modeling tool are disclosed. A static analysis tool is used to extract a candidate code snippet from a code repository. The candidate code snippet is identified as potentially being a security relevant code element. The static analysis tool generates additional context associated with the candidate code snippet. An LLM prompt is generated. This prompt is structured to include the candidate code snippet, the context, and a directive to assign a classification to the candidate code snippet. The classification includes a source classification, a sink classification, a sanitizer classification, or a flow step classification. The LLM operates on the prompt to generate output comprising a specific classification for the candidate code snippet. The output is formatted into a data extension file that is consumable by the static analysis tool.
Owner:MICROSOFT TECHNOLOGY LICENSING LLC

Storage type XSS attack detection method and device based on large language model

The invention provides a storage type XSS attack detection method and device based on a large language model, and the method comprises the steps: receiving an initial cue word, inputting the initial cue word into a cue word expander, carrying out the extension of the initial cue word, carrying out the performance evaluation to screen out a cue word meeting a preset performance index, carrying out the multi-round extension and evaluation, and obtaining a detection result. Until the optimized cue word is obtained; the method comprises the following steps: receiving a to-be-detected code, generating a program dependency graph of the to-be-detected code, decomposing the program dependency graph of the to-be-detected code into a plurality of sub-graphs with consistent program structures to obtain a plurality of sub-program dependency graphs, traversing nodes in each sub-program dependency graph, and reserving an original structure of a program; the nodes are sequentially converted into an original code format to obtain code representation fragments, the code representation fragments and the optimized cue words are input into a large language model to judge whether each code fragment is an attack vector of a storage type XSS or not, and a final speculation result is obtained. The method has the advantages of low detection cost, high accuracy and high efficiency.
Owner:NAT UNIV OF DEFENSE TECH

Computer code vulnerability detection method and system based on artificial intelligence

The invention relates to a computer code vulnerability detection method and system based on artificial intelligence, and the method comprises the steps: obtaining a detection demand input by a user, analyzing the detection demand based on a natural language processing algorithm, and extracting a target source code set corresponding to the detection demand from a to-be-detected code warehouse; performing standardization processing on the target source code set, and constructing a code feature data set; inputting the code feature data set into the trained vulnerability detection model, identifying to obtain a vulnerability code snippet, and generating a vulnerability score and a vulnerability type; and grading the vulnerability code snippets according to the vulnerability scores, generating repair suggestions in combination with vulnerability types, and outputting a corresponding detection report which comprises risk levels and the repair suggestions. The method has the effect of improving the accuracy of vulnerability detection.
Owner:BEIJING SHENZHOU EVERBRIGHT TECH CO LTD

Code reconstruction method and system, computing device, storage medium and program product

Embodiments of the present invention provide a code reconstruction method and system, a computing device, a storage medium and a program product wherein the code reconstruction method comprises: performing code analysis on a to-be-reconstructed initial code to generate a target reconstruction scheme wherein the target reconstruction scheme comprises a code reconstruction plan and a code test plan; the code reconstruction plan comprises a function dependency relationship of the target code; analyzing a function dependency relationship in the code reconstruction plan, and generating at least two code reconstruction tasks corresponding to the initial code; executing the at least two code reconstruction tasks in sequence to obtain each initial code snippet, and iteratively optimizing each initial code snippet through static analysis and dynamic verification until candidate code snippets conforming to a function dependency relationship are generated; and compiling a test case of each candidate code snippet based on the code test plan, and testing each candidate code snippet based on each test case to obtain a plurality of target code snippets conforming to the function dependency relationship. And the coherence and the consistency of the reconstructed codes are ensured.
Owner:BEIJING URBAN CONSTR INTELLIGENT CONTROL TECH CO LTD

Transformer-based programming code value quantification system

Disclosed herein are computer-implemented systems and methods for code value assessment. For example, in one aspect, the system comprises, an input module configured to receive program code submissions from developers, a processing unit equipped with Text-Based Models with Contextual Understanding (TBM-CUs) configured to evaluate the functional meaning, purpose, and value of submitted code segments and distinguish between code contributions from human programmers and machine learning systems, a visualization module configured to present the assessed value of the analyzed code over various time periods and dimensions, offering insights into trends, patterns, and comparative performance, a communication module configured to translate programming code meaning or function into plain language summaries for non-technical stakeholders, and an AI peer review module configured to automatically review, accept or reject code contributions.
Owner:CODESCORE SP ZOO

Code generation method and related device

Disclosed in the present application is a code generation method, which is applied to a code development platform. The code development platform comprises a main plug-in and a plurality of extension plug-ins, wherein the main plug-in is used for providing an actual value of a basic variable of a prompt, and the plurality of extension plug-ins are used for extending the prompt in terms of a programming language, scenario or development framework. The method comprises: a main plug-in receiving a code generation instruction, and then determining, in response to the code generation instruction, at least one extension plug-in corresponding to the code generation instruction from among a plurality of extension plug-ins; the main plug-in receiving a prompt returned by the at least one extension plug-in, wherein the prompt is obtained by means of the at least one extension plug-in extracting an actual value of an extension variable on the basis of extraction logic and replacing an extension variable in a prompt template with the actual value of the extension variable; the main plug-in performing inference by means of a language model and on the basis of the prompt, so as to obtain a second code segment. In the method, a prompt of a specific code generation task and the implementation of prompt engineering is entrusted to corresponding extension plug-ins, thereby realizing flexible extension of prompts.
Owner:HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD

Intelligent completion code optimization method based on texture pre-rendering and multi-level cache

The invention discloses an intelligent completion code optimization method based on texture pre-rendering and multi-level cache, which comprises the following steps of: pre-establishing a grammar rule set and a GPU cache characteristic database, storing a grammar style sheet when a code editor is started, generating a font image set and loading current GPU cache parameters; after a candidate code segment list pops up through intelligent completion, dividing candidate code segments into data blocks, analyzing syntax types, determining character styles, and generating candidate code segment textures through instantiation rendering and a fragment shader; according to the current GPU cache parameter, the selected priority of the candidate code segment and the compressed volume, the texture is distributed to a first-level buffer, a second-level buffer or a global video memory according to a rule, and metadata is recorded and added into a global texture cache table; and after the user selects the candidate code segment, reading texture data from the corresponding GPU buffer, calculating a display coordinate by combining a cursor row and column index, an editor basic style parameter and a DPI scaling, completing texture rendering and drawing, and realizing optimized display of the intelligent completion code.
Owner:北京麟卓信息科技有限公司

System and method for a decentralized machine learning source code generation framework via a holochain network

Systems, computer program products, and methods are described herein for a decentralized machine learning source code generation framework via a holochain network. The present invention is configured to receive a predetermined code criteria, receive a new code segment from an editor on an endpoint device, retrieve characteristics of the new code segment, determine, using a trained machine learning model, at least one subsequent code segment, based on at least the characteristics of the new code segment, determine, using an evaluation engine, at least one score of the subsequent code segment, wherein the at least one score is associated with the predetermined code criteria, and transmit to the editor of the endpoint device for displaying a predetermined number of the at least one subsequent code segments above a predetermined threshold of the at least one score.
Owner:BANK OF AMERICA CORP

Systems and processes for creating software bill of materials for large distributed builds

Systems are provided for generating, modifying and using SBOMs for facilitating risk assessment and threat mitigation for corresponding programs, and particularly for large programming builds. The creation and modification of the SBOMs includes processes for omitting declarations referenced in chunk SBOMs of program chunks incorporated into a final programming build associated with a build SBOM, but which are not actually utilized by the final programming build, as well as processes for adding new declarations for code segments that are not declared in the related chunk SBOMs, even though the code segments are utilized by the final programming build. Systems are also configured to use SBOMs in combination with configuration restriction records to assess and resolve threat events in a manner that can prevent unnecessary remedial actions for threat events that appear to be relevant to one or more files or dependencies incorporated into a program.
Owner:MICROSOFT TECHNOLOGY LICENSING LLC

Data storage position dynamic optimization method and device, equipment and storage medium

The invention provides a data storage position dynamic optimization method, device and equipment and a storage medium, and the method comprises the steps: connecting expansion card equipment with a GPU through a PCIe interface on the GPU, and carrying out BDF structure scanning and space mapping to obtain storage space configuration information; preprocessing a shared keyword code segment of the GPU kernel function code and inserting an expansion card identifier, and configuring data transmission parameters to obtain initial configuration of a CUDA shared storage mechanism; the method comprises the following steps of: partitioning a running capacity region and a high-speed cache region of a storage space of expansion card equipment, and performing thread synchronization and parallel calculation on to-be-operated data of a GPU (Graphics Processing Unit) through SLC (Single Level Cell) data block partitioning to obtain running state information of the storage space; and dynamically migrating the distribution of the to-be-operated data between the operation capacity region and the cache region according to the operation state information. By dynamically optimizing the data storage position, the utilization rate of storage resources is improved, the data access delay is reduced, the GPU computing process is accelerated, and the overall system performance is improved.
Owner:SHENZHEN QUANXING TECH CO LTD

Code modification using a virtual assistant

A system can receive an input via a chatbot interface. The input can be indicative of an update to a control parameter. The system can generate, using a large language model, a search query based on the input. The system can filter, using the search query, data related to control parameters. The system can detect, using the large language model, updates to the control parameters based on the filtered data. The system can identify, based on the updates to the control parameters and product metadata, products that fail to comply with the updates. The system can determine code segments within a source code corresponding to the products. The code segments can be related to the control parameters. The system can modify the code segments to comply with the updates to the control parameters. The system can execute the modified code segments to perform an operation.
Owner:ADP INC

LLM-based code completion method and device

The LLM-based code completion method comprises the following steps: splitting a code file stored in a code warehouse into a plurality of code snippets, and calculating relevancy scores, corresponding to the code snippets, of a to-be-completed target code file; the relevance score is used for representing the relevance degree of the code snippets and the target code file; at least one target code snippet with the highest relevancy score is screened out from the multiple code snippets, the at least one target code snippet serves as a query index, and a context code set used for conducting code completion on the target code file is retrieved from a knowledge base; wherein the knowledge base is constructed on the basis of code files stored in a code warehouse; and inputting the retrieved context code set and the target code file into a first LLM used for code completion, so that the first LLM performs reasoning calculation on the target code file based on the context code set, and a completion code corresponding to the target code file is generated.
Owner:ALIPAY (HANGZHOU) INFORMATION TECH CO LTD +1

Retrieval enhancement code generation method and system based on retrieval query statement

The invention provides a retrieval enhancement code generation method and system based on retrieval query statements. The method comprises the following steps: acquiring a plurality of retrieval query statements; screening out context information matched with the natural language requirement and the retrieval query statement from the code library; generating a first code segment according to the natural language requirement and the context information; through a plurality of first code segments in one-to-one correspondence with the plurality of retrieval query statements and a corresponding label of each first code segment, training and optimizing a retrieval query statement generator to obtain a target retrieval query statement generator; based on a target natural language requirement, utilizing a trained and optimized target retrieval query statement generator to generate a query statement; and using the query statement to retrieve the related code context, and inputting the target natural language demand and the retrieved code context into the code generation model to complete the code generation of retrieval enhancement. According to the embodiment, the interference of redundancy and irrelevant content can be effectively reduced, so that the code generation quality is improved.
Owner:PEKING UNIV

Context aware transcoding and optimization based on neural network

Systems and methods for efficiently converting program code from a source language to a target language. Input source code is parsed into an intermediate representation (IR) using a processor device. Structural and semantic models of the source code are established by applying static analysis to the IR, and a program architecture of the target code is constructed from the IR, including generating context-aware placeholders. The IR is transformed into a single static assignment (SSA) form, and a system dependency graph (SDG) is constructed from the SSA form. The SDG is traversed to sort the translation tasks, and the sorted tasks are translated into a target language using a large language model (LLM). A translated program is generated by integrating the translated code segment into a coherent program structure in the target language.
Owner:INTERNATIONAL BUSINESS MACHINE CORPORATION

Large language model auxiliary vulnerability detection method and system based on abstract syntax tree decomposition and annotation enhancement

The invention discloses a vulnerability detection method and system based on abstract syntax tree decomposition and large language model assistance. The vulnerability detection method and system are used for solving the problem that an existing pre-training model is insufficient in detection accuracy under complex code logic and multiple execution paths. The method comprises the following steps: firstly, analyzing a code snippet into an abstract syntax tree, splitting the abstract syntax tree into a plurality of sub-trees through an improved decomposition algorithm, and combining each sub-tree with a natural language annotation generated by a large language model to form an abstract sub-tree with the annotation; then, a semantic aggregator based on Transform is used for modeling the relation between the sub-trees, features are fused to a target vulnerability vector, and finally, vulnerabilities are predicted through a classifier. Based on the technical scheme, the vulnerability detection accuracy is effectively improved, and the performance of the vulnerability detection model is greatly improved.
Owner:HUNAN UNIV OF SCI & TECH SANYA RES INST

AI code effective proportion statistical method and device, medium and equipment

The invention relates to the technical field of code development, and provides an AI code effective proportion statistical method and device, a medium and equipment. The method comprises the steps of obtaining related information of codes submitted by a user; according to a user name in the related information, searching log information of an AI code generated by a corresponding user through adoption of a code generation tool; under the condition that the file name of the code submitted by the user is matched with the file name in the log information, searching a corresponding submitted code segment from the code submitted by the user according to the mark information in the log information; and calculating the similarity between the AI code and the submitted code segment, and counting the effective proportion corresponding to the AI code according to the similarity. Therefore, the calculation of the effective proportion considers the quality of the AI code, so that the effective proportion can accurately reflect the real contribution of the AI code, and the calculation process is automatically realized, thereby avoiding the tedious, time-consuming and labor-consuming conditions of manual labeling.
Owner:SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD

Generating Software Code Using Large Language Models

Techniques for generating proprietary software code using large language models (LLMs) are disclosed. An LLM is trained on billions of words, tokens, and code segments to generate non-proprietary software code. A system uses the LLM to generate proprietary software code by generating a set of LLM prompts and a proprietary code mapping. Based on receiving an instruction to generate a set of software code, a system generates a set of LLM prompts. The system prompts the LLM to generate a set of non-proprietary software code. The system further prompts the LLM to generate a set of pseudocode from the non-proprietary software code. The system further prompts the LLM to generate proprietary software code from the pseudocode and the proprietary code mapping.
Owner:ORACLE INT CORP

Code Vulnerability Evaluator

A computing platform provides code vulnerability detection and evaluation. The computing platform may use a quantum graph categorizer along with quantum polymorphism execution channels to reduce false positives and provide optimized real-time vulnerability evaluation of code and code segments. The computing platform may use a hybrid approach comprising a mix of static and dynamic vulnerability validation and real-time parallel technique execution.
Owner:BANK OF AMERICA CORP

Method and device for creating executable program code segment read-only file mapping memory copy

The invention relates to the technical field of program loading and memory management, and provides a method and equipment for creating an executable program code segment read-only file mapping memory copy, and the method comprises the steps: in a system of an NUMA architecture, when a process is executed on a certain NUMA node, mapping a code segment in a read-write mode; traversing all pages mapped by the code segment, reading one byte from each page and writing back the byte, triggering a missing page processing flow, and completing the distribution of the code segment memory copy of the process; and carrying out locking and authority control on the code segment memory copy through system calling. According to the method and equipment for creating the executable program code segment read-only file mapping memory copy, the execution performance of the program under the NUMA architecture is remarkably improved through an innovative process level code segment copy scheme and a flexible implementation mode.
Owner:CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD

Code vulnerability detection and validation

A method of code vulnerability detection includes obtaining a set of patches from at least one code repository for a vulnerability record of a vulnerability of a software component, applying the set of patches to obtain a modified set of code files modified by the set of patches, and inferring a vulnerable code section set according to the modified set of code files. The vulnerable code section set is a subset of the modified set of code files. The method further includes obtaining a vulnerable version list of a plurality of versions of the software component comprising the vulnerability, validating a version in the vulnerable version list as having the vulnerable code section set, and processing a target software comprising the version using the vulnerable code section set.
Owner:ORACLE INT CORP

Method and equipment for realizing vDSO code memory copy

The invention relates to the technical field of virtual dynamic shared objects, and provides a method and device for achieving vDSO code memory replica, and the method comprises the steps that when a process is started, a vDSO code segment is mapped to an address space of the process; running the function code according to a preset running mechanism; and modifying the vDSO code segment by adopting the function code according to a preset rule, cancelling vDSO code segment mapping of the current process, and remapping a new vDSO code segment. According to the method and the equipment for realizing the vDSO code memory copy, the program performance can be obviously improved, vDSO copies of different levels can be flexibly realized, program and kernel codes do not need to be modified, the life cycle of the vDSO copies is efficiently managed, deployment and maintenance are simplified, the program or a kernel does not need to be modified, and a user can realize the vDSO code memory copy under the condition that an existing software architecture is not changed. And rapidly deploying and starting a vDSO memory copy function.
Owner:CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD

Code quality automatic evaluation method and related equipment

The invention discloses a code quality automatic evaluation method and device, a server, a computer readable storage medium and a computer program product. The method comprises the following steps: generating a token sequence of an evaluated target code, converting the token sequence into a word vector, performing semantic correlation extraction on adjacent tokens in the word vector, constructing code representation, converting original code tokens from text information into numerical vector information, and inputting a code representation vector into a feedforward neural network model for regression prediction, so as to obtain the target code. And the code quality is automatically scored. According to the method, code representation is applied to code segment score prediction, grammar and semantic information contained in a code token sequence is fully utilized, hidden representation contained in a code segment is mined and used for predicting the quality score of the code segment, objective and fine-grained accurate one-key scoring can be achieved, and low-cost, high-efficiency and automatic intelligent code evaluation is achieved.
Owner:DUXIAOMAN TECH (BEIJING) CO LTD