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

834 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

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

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

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

Software code optimization method, system and equipment based on big data and medium

The invention provides a software code optimization method and system based on big data, equipment and a medium, and relates to the technical field of computers. The method comprises the steps that a target code library and corresponding running log data are acquired, and a first data set is obtained; cleaning, converting and aggregating the first data set from the programming language dimension, the framework dimension and the project specification dimension to obtain a second data set; training a machine learning model by using the second data set, so that the machine learning model can identify code quality, performance bottlenecks and potential defects; analyzing a code module written by a user by using the trained machine learning model to obtain a code analysis result; and according to a code analysis result, generating a corresponding code segment from the target code library, and displaying the code segment by using a visual interface. According to the technical scheme, accurate and comprehensive code optimization suggestions can be given.
Owner:CHINA TELECOM DIGITAL INTELLIGENCE TECH CO LTD HEBEI BRANCH

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

Method and apparatus for automatically generating an application code and framework

ActiveUS12229537B2Pattern matchingProcessing
Various methods, apparatuses / systems, and media for automatically building an application framework are disclosed. An internal database stores available design patterns and code snippets for developing an application. A receiver receives, as input, a requirement document that includes one or more requirements for developing the application. A processor parses the requirement document by implementing a natural language processing algorithm; creates, based on the parsed requirement document, a plurality of code blocks for generating a structure and a design pattern to be used to develop the application by matching the one or more requirements with the available design patterns; accesses the database to obtain the code snippets for the plurality of code blocks; and automatically builds an application framework based on the code snippets.
Owner:JPMORGAN CHASE BANK NA

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

Software efficient testing method and system based on artificial intelligence

The invention relates to the technical field of artificial intelligence, and discloses an efficient software testing method and system based on artificial intelligence. Generating test points one by one according to code segments of code data in the demand code data set, and generating a test path according to the test points; generating a test case of the code data according to the code features and the test path, calculating a test distance between the test case and a historical test case, and generating a test scheduling sequence according to the test distance; performing synchronous testing on the demand code data set according to the test scheduling case, and extracting defect code data in the demand code data set through a test defect report in the test result set; and generating a test update case of the defect code data according to the test case, generating a test update report of the defect code data through the test update case, and generating a test report of the target software according to the test result set and the test update report. According to the invention, the software testing efficiency can be improved.
Owner:XINBIYOU (SHENZHEN) INFORMATION TECHNOLOGY CO LTD

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