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

1103 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.

Large language models for creating a multi-lingual, low-resource code translation dataset

One or more unit-test cases are generated from a monolingual code corpus and the generated unit-test cases are filtered to generate a corpus of unit-test cases which have acceptability scores exceeding one or more predefined thresholds. One or more of the code samples of the monolingual code corpus are translated from a source language to a target language using a pretrained Large Language Model and the generated unit-test cases are translated from the source language to the target language. The LLM-translated code samples are validated using the translated unit-test cases and a parallel-data training corpus comprising the LLM-translated code samples that pass the validation is created. The pretrained large language model (LLM) is fine-tuned using the parallel-data training corpus, a given code segment is translated using the fine-tuned large language model (LLM), the translated given code segment is tested and the tested given code segment is deployed.
Owner:INTERNATIONAL BUSINESS MACHINE CORPORATION +1

Code search for examples to augment model prompt

A user query for information regarding data of a codebase is answered by a large language model given a prompt that includes examples of code segments from the codebase that are similar to the user query. The code segments from the codebase are associated with metadata that includes both natural language text and source code. The search for the examples of code segments from the codebase is based on embeddings of code segments and associated metadata that are closely similar to an embedding of the user query and context.
Owner:MICROSOFT TECHNOLOGY LICENSING LLC

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

Automated data extraction pipeline for large language model training

An automated data extraction pipeline for large language model (LLM) training may include extracting a set of code segments from a set of natural language question-answer (Q&A) combinations that each include a provided input, a provided output, and a provided code segment formatted to transform the provided input into the provided output. The data extraction pipeline may then generate a predicted output from a question portion of a first natural language Q&A combination using a first LLM. A first extracted code segment from the extracted set of code segments may then be executed to generate a first actual output of the first extracted code segment. One or more data samples may then be generated for training a second LLM based on a comparison of the first actual output to the predicted output. The second LLM may then be trained using the one or more data samples.
Owner:SALESFORCE 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

System and method for transpilation of source code using machine learning

The disclosed system and method automate the transpilation of query source code to a distributed data processing system. The process involves instantiating transpiler libraries and source code, executing the source code, and transpiling the source code into a transpiled code using the transpiler libraries. A machine learning algorithm is utilized to control the operation of the transpilation process wherever different transpilation options are available as an automated mechanism for adapting transpilation based on tracked downstream operational characteristics. The system is configured for automatic source code generation in the target language as an output, which can then be deployed to a distributed data processing or query system. Variants are described using a combination of test and production environments for initial testing and tuning of the machine learning model architecture until a performance threshold is met. A same code segment may be transpiled periodically for continual automatic optimization.
Owner:HSBC GRP MANAGEMENT SERVICES LTD

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

Code performance optimization based on an information-enhanced diffusion model

A given segment of computer code is obtained and modified to produce one or more inefficient versions of the given segment of computer code in comparison to the given segment of computer code. A code parse tree is generated for the given segment of computer code and each inefficient version of the given segment of computer code. Model embeddings are generated based on the generated code parse trees and a diffusion model is trained based on the generated model embeddings.
Owner:INTERNATIONAL BUSINESS MACHINE CORPORATION

Code analysis method, device and system, electronic equipment and storage medium

The invention provides a code analysis method, device and system, electronic equipment and a storage medium, and relates to the technical field of code processing. Comprising the following steps: determining a code file needing to run in a project according to a self-contained file of the project, and dividing codes in the code file into fragments taking a function as a minimum unit to obtain a plurality of code segments; determining a code hierarchical relationship corresponding to the plurality of code segments according to a calling relationship of functions in a code file; according to the sequence of the code levels from low to high, the multiple code segments are sequentially input into the first natural language model according to a first preset instruction format, code annotations corresponding to the code segments are obtained, and the first preset instruction format is used for indicating the first natural language model to generate the code annotations of the code segments; the code segments are input into the first natural language model according to the sequence of the code levels from low to high, the first natural language model can generate more accurate annotations through the calling relation between the code segments, and rapid code interpretation is achieved.
Owner:XIANGYANG BRANCH CHINA MOBILE GRP HUBEI CO LTD +1

Fuzzy test case generation method and system based on large language model

The invention discloses a fuzzy test case generation method and system based on a large language model. The method comprises the following steps: receiving user input information for describing a target test case; automatically extracting the user input information based on a preset extraction model to obtain a fuzzy test prompt; inputting the fuzzy test prompt into a generation model, generating a code segment by using the generation model, and performing scoring; using the code segment with the highest score as an optimal prompt, inputting the code segment into the generation model again, and generating a fuzzy test case by using the generation model; and iteratively executing the steps until a predefined number of fuzz test cases are generated, and forming a fuzz test case set by using all the fuzz test cases. According to the scheme, the diversity and the coverage rate of the test cases are improved.
Owner:STATE GRID SHANDONG ELECTRIC POWER CO +4

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

Intelligent and predictive modules for software development and coding using artificial intelligence and machine learning

An AI tool for writing computer code is generated by collecting code entry data from a plurality of remote computing devices, training a code completion network using the code entry data, wherein the code completion network is configured to predict one or more additional code entry activities based on a provided set of code entry activities, and providing the code completion network to one or more development sessions. A code segment is intelligently generated by receiving a request to modify computer code of a program in a development interface, and presenting a text input component and a code description prompt. The technique further includes receiving, via the text input component, a code description, applying at least part of the code description to a code generation network to obtain a code segment suggestion and presenting the code segment suggestion on a display.
Owner:REPLIT INC

Code loading method and device

The invention discloses a code loading method and device. The memory carried by the Internet of Things equipment comprises a pre-allocated transfer memory space. Sequentially reading the first code snippets from the first code segment according to the space size of the transfer memory space, storing the first code snippets into the transfer memory space based on the storage addresses of the first code snippets in the transfer memory space, and performing symbol relocation operation on the first code snippets, and mapping the symbol address corresponding to the identifier contained in the first code snippet into a storage address of the identifier in the FLASH storage. And for any first code snippet stored in the transfer memory space, storing the first code snippet in FLASH storage, so as to execute the ELF file in the FLASH storage in an XIP mode. Therefore, in the process of loading the ELF file, only a transfer memory space with a fixed size needs to be occupied, and the occupation of RAM resources is further reduced.
Owner:ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD

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

Code positioning method based on programming language migration

The invention discloses a code positioning method based on programming language migration, relates to computer software, and aims to refine functions into typical processes to construct a function library and a total keyword table, generate function tags through simulation transformation and design a subject term self-checking crawler system. A large number of accurate primary and secondary language code segments are obtained based on a subject relevancy discrimination method and a Hash matching method to construct a primary and secondary code library, an adversarial generator is pre-trained based on an adversarial training strategy to achieve alignment of primary and secondary language features, and a large model encoder is finely adjusted by adopting comparative learning in combination with the primary code library to maximize separability of code representation. A pre-training Softmax regression classifier is assisted to realize function label endowing of a code segment, a to-be-positioned word and a to-be-positioned code are acquired, the to-be-positioned code is split, the to-be-positioned word is identified based on a dual-channel query strategy to select a positive example, and the positive example and the code segment are input into a pre-training and fine-tuning network to realize code positioning of a specified function or a specified typical process.
Owner:NINGBO JINWANG INFORMATION IND CO LTD

Code coverage rate data exporting method and device, equipment and medium

The invention discloses a code coverage rate data exporting method and device, equipment and a medium, relates to the technical field of software testing, is applied to NVMe equipment, and comprises the steps that when a data exporting command sent by a target host is obtained, the data exporting command is analyzed to obtain address information of a memory buffer area pre-applied in the target host and the size of the buffer area; transmitting and writing pre-collected code coverage rate data into a memory buffer area; the code coverage rate data is data which is obtained by the NVMe equipment after establishing a one-way linked list for a target data structure used for storing code coverage rate information in each source file and counting executed code segments by using a preset instrumentation code and is added to the one-way linked list; and after writing of the code coverage rate data in the one-way linked list is completed, sending a target command used for representing that the execution of the writing operation is completed to the target host, so that the target host generates a coverage rate data file for the obtained code coverage rate data by using a local file system.
Owner:SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT 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

Application program installation package generation method, application program installation method and related equipment

The invention discloses an application program installation package generation method, an application program installation method and related equipment, under the condition of a static link, a server can compile archive mirror images of a plurality of versions of an application program at a plurality of preset positions based on a source engineering component and an application program source component; the terminal equipment can apply for the archiving mirror image of the corresponding version from the server based on the existing storage space state, and download, check, install, unload and the like of the archiving mirror image are completed. Therefore, the terminal equipment can independently load the application program, the static link relation of the application program is consistent with that of the source project, the original static link relation of the source project is not influenced, in addition, as the source component of the application program and the source project component jointly participate in static link, the existing code segment and data segment of the source project can be reused, and the application program can be conveniently loaded. Therefore, the application program archiving mirror image can only contain the content different from the source project, the size of the application program archiving mirror image is reduced, the downloading and installing efficiency is improved, and the user experience is improved.
Owner:HUAWEI TECH CO LTD

Testing Benchmark Generation Method and Testing Benchmark Generation System Capable of Adjusting Prompt Data

A testing benchmark generation method includes providing a product, generating prompt data of the product by a prompt generation module, generating a code snippet by a large language model according to the prompt data, semantically checking the code snippet by an inference module for determining if the code snippet is successfully verified, compiling the code snippet and executing the code snippet to drive the product after the code snippet is successfully verified, analyzing an execution result corresponding to the code snippet after the code snippet is executed under the product, comparing the execution result corresponding to the code snippet with at least one constraint of the product by a profiling module for determining if the code snippet matches the at least one constraint, and adding the code snippet to testing benchmark data of a testing benchmark generation module.
Owner:MEDIATEK INC

Dynamic accumulator allocation

The invention relates to dynamic accumulator allocation. A system includes a graphics processing unit (GPU) including at least one processor and a plurality of registers. In some examples, based on execution of an instruction by at least one in at least one processor, a particular number of registers is allocated to a thread, and the number of registers is assigned to the thread. In some examples, a compiler is to account for register requirements of a code segment and the number of registers available in determining the number of registers for allocation to the code segment.
Owner:INTEL CORP

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