# US 10,481,996 B2 · Hybrid code modification in intermediate language for software application

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,481,996 B2
- Document ID: US10481996B2
- Status: Granted
- Kind: B2
- Application number: 16/271,210
- Filed: 2019-02-08
- Published: 2019-06-06
- Granted: 2019-11-19
- Earliest claimed: 2016-07-28
- Assignees: salesforce.com, inc.
- Applicants: Salesforce.com, Inc.
- Inventors: Sergey Gorbaty
- Web page: https://patentgrep.com/patent/US10481996B2

## CPC

- G06F 11/36: Prevention of errors by analysis, debugging or testing of software
- G06F 9/45508: {Runtime interpretation or emulation, e g. emulator loops, bytecode interpretation}
- G06F 21/577: {Assessing vulnerabilities and evaluating computer system security}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Computer program, methods, and systems for code modification of a programming language platform and a software application in an intermediate language at different times are disclosed. The methods and system may modify a portion of the programming language platform in the intermediate language at a first time to alter a functionality of or add a new functionality to the programming language platform; and may modify the software application in the intermediate language at a second time different from the first time, where the software application may be modified based on a runtime analysis rule that uses the altered or added new functionality of the programming language platform. The modified programming language platform may be included in a first package, and the modified software application may be included in a second package, and executed on the modified programming language platform.

## Claims

### Claim 1

A computer program product comprising a non-transitory computer-readable medium containing an executable set of instructions for code modification of a programming language platform and a software application in a bytecode language, the set of instructions configured to:
modify an execution engine of the programming language platform in the bytecode language to alter a functionality of or add a new functionality to the programming language platform, wherein the modification of the execution engine is performed by at least one of a compiler and an interpreter;
modify the software application to include a runtime analysis rule that uses the altered or added new functionality of the programming language platform, wherein the software application is modified by:
i) loading a class of the software application into the execution engine, after startup of the software application;
ii) inserting a first bytecode to methods of the loaded class based on the runtime analysis rule; and
iii) repeating processes i) and ii) until all applicable classes of the software application are loaded and the first bytecode inserted into the classes; and
execute the modified software application on the modified execution engine.

### Claim 2 (depends on 1)

The computer program product of claim 1, wherein the programming language platform is Java programming platform.

### Claim 3 (depends on 1)

The computer program product of claim 1, wherein the execution engine of the programming language platform is a Java Virtual Machine (JVM).

### Claim 4 (depends on 1)

The computer program product of claim 1, wherein the bytecode language operates on different hardware platforms independent of hardware and an operating system on the hardware.

### Claim 5 (depends on 1)

The computer program product of claim 1, wherein the software application operates in a database system and receives requests from a user system.

### Claim 6 (depends on 1)

The computer program product of claim 1, wherein the software application generates a hypertext transfer protocol (HTTP) response to a request received from a user system.

### Claim 7 (depends on 1)

The computer program product of claim 1, wherein the runtime analysis rule assigns an input tag or a sanitization tag to an object in the software application.

### Claim 8 (depends on 1)

The computer program product of claim 1, wherein the modified execution engine of the programming language platform is included in a first software package, and the modified software application is included in a second software package different from the first software package.

### Claim 9 (depends on 1)

The computer program product of claim 1, wherein the set of instructions operable to modify the execution engine of the programming language platform is to insert first code in the bytecode language into the execution engine of the programming language platform to add the new functionality, the set of instructions operable to modify the software application is to insert second code to the software application, wherein the modified software application uses the added new functionality of the programming language platform.

### Claim 10 (depends on 1)

The computer program product of claim 1, wherein the altered or the added new functionality is a string tracking function, a stream tracking function, or an array tracking function.

### Claim 11

A system for code modification in an bytecode language, comprising:
a hardware processor; and
memory storing one or more sequences of instructions which, when executed by the processor, cause the processor to carry out the steps of:
modifying an execution engine of a programming language platform in the bytecode language to alter a functionality of or add a new functionality to the programming language platform, wherein modification of the execution engine is performed by at least one of a compiler and an interpreter; and
modifying a software application to include a runtime analysis rule that uses the altered or the added new functionality of the programming language platform, wherein the software application is modified by;
i) loading a class of the software application into the execution engine, after startup of the software application;
ii) inserting a first bytecode to methods of the loaded class based on the runtime analysis rule; and
iii) repeating processes i) and ii) until all applicable classes of the software application are loaded and the first bytecode inserted into the classes; and
executing the modified software application on the modified execution engine.

### Claim 12 (depends on 11)

The system of claim 11, wherein the instructions further cause the processor to carry out the steps of:
creating a first package of code that includes the modified execution engine of the programming language platform;
creating a second package of code that includes the modified software application; and
executing the second package of code on the first package of code.

### Claim 13 (depends on 11)

The system of claim 11, wherein the programming language platform is Java programming platform, the execution engine of the programming language platform is a Java Virtual Machine (JVM).

### Claim 14 (depends on 11)

The system of claim 11, wherein the bytecode language operates on different hardware platforms independent of hardware and an operating system operating on the hardware.

### Claim 15 (depends on 11)

The system of claim 11, wherein the software application operates in a database system, receives a request from a user system, and generates a hypertext transfer protocol (HTTP) response to the received request.

### Claim 16 (depends on 11)

The system of claim 11, wherein the runtime analysis rule assigns an input tag or a sanitization tag to an object in the software application.

### Claim 17 (depends on 11)

The system of claim 11, wherein modifying the execution engine of the programming language platform in the bytecode language is to insert first code in the bytecode language to the execution engine of the programming language platform to add the new functionality, and modifying the software application in the bytecode language is to insert second code to the software application, wherein the modified software application uses the added new functionality of the programming language platform.

### Claim 18 (depends on 17)

The system of claim 17, wherein the new functionality in the programming language platform is a string tracking function, a stream tracking function, or an array tracking function.

### Claim 19

A method for code modification in an bytecode language for a software application in a database system, comprising:
adding a new functionality to an execution engine of a programming language platform in the bytecode language, wherein the new functionality is a string tracking function, a stream tracking function, or an array tracking function, wherein modification of the execution engine is performed by at least one of a compiler and an interpreter;
modifying a software application to include a runtime analysis rule that uses the added functionality of the programming language platform, wherein the software application is modified by;
i) loading a class of the software application into the execution engine, after startup of the software application;
ii) inserting a first bytecode to methods of the loaded class based on the runtime analysis rule; and
iii) repeating processes i) and ii) until all applicable classes of the software application are loaded and the first bytecode inserted into the classes; and
executing the modified software application on the modified execution engine with the new functionality to generate a hypertext transfer protocol (HTTP) response to the received request.

### Claim 20 (depends on 19)

The method of claim 19, wherein the programming language platform is Java programming platform, the execution engine of the programming language platform is a Java Virtual Machine (JVM).

### Claim 21 (depends on 19)

The method of claim 19, wherein the bytecode language operates on different hardware platforms independent of hardware and an operating system operating on the hardware.

### Claim 22 (depends on 19)

The method of claim 19, wherein the runtime analysis rule assigns an input tag or a sanitization tag to a method of an object in the software application.
