CREATING A METHOD FROM A BLOCK OF CODE

Patent №

US 7,464,370

Granted

2008-12-09

Filed 2003

Owner

INTERNATIONAL BUSINESS MACHINES CORPORATION

AI components

1

hardware

Assignment

Recorded

Dataset

AIPD

2023_r1 edition

Application

10728017

A method, apparatus, system, and signal-bearing medium that in an embodiment determine whether a block of code associated with a copy-and-paste operation or a punch-out operation has a size greater than a threshold. If the size is greater than the threshold, then a method is created and the block of code is pasted into the method. Also, an invocation to the newly created method is added at the copied-from location and the intended pasted-to location (in the case of the copy-and-paste operation) or an invocation to the newly created method is added at the copied-from location (in the case of the punch-out operation). In this way, future modifications to the block of code need only be made in one place: the method, instead of at all locations where duplicate code exists. Thus, embodiments of the invention may reduce the fragility of the code.

AI hardwareG06F 8/4436G06F 8/33

AI classification

AI hardware0.87
Knowledge representation0.03
Speech0.00
Vision0.00
Planning0.00
Evolutionary computation0.00
Natural language0.00
Machine learning0.00

Ownership

INTERNATIONAL BUSINESS MACHINES CORPORATION

assignment · 147730842

Assignors

BARSNESS, ERIC L., DETTINGER, RICHARD D., OLSON, BRIAN E.

On an employer assignment, the assignors are typically the inventors.

From the same owner

© 2026 NYSGPT2525 LLC