Creating a method from a block of code
US7464370B2 · kind B2 · utility
Assignee
Inventors
Key dates
| Filing date | Dec 4, 2003 |
| Grant date | Dec 9, 2008 |
| Priority date | — |
| Expiry date | Jun 16, 2025 |
Classification
- Technology area (CPC G)Physics
- CPC primaryG06F8/33
- WIPO fieldComputer technology
- WIPO sectorElectrical engineering
Abstract
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.
Source: USPTO / EPO open patent data. Objective bibliographic and citation counts.