Patents
US 7,464,370 B2#42996891 Most CitedExpiredUnited States (USPTO)Utility

Creating a method from a block of code

2Forward Citations (#42996891 Global)
0.1/yrCitation Velocity (#44218388 Global)
0.94Citation PageRank (#45395846 Global)
25Prior Art Cited
1Claims (1 Indep. · 0 Dep.)
0Drawings / Sheets

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.

Interactive Citation Constellation Global Citation Ranking

Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 25 · Forward citations: 2.

Claims (1 — 1 Independent, 0 Dependent)

  1. Claim 1Independent Claim

    A method comprising: receiving an operation from a user interface, a selection of a block of code at a copy location in an application, and a selection of a paste location in the application, wherein the copy location is different than the paste location; in response to the receiving, determining whether the block of code has a size greater than a threshold; if the block of code has the size greater than the threshold, creating a method that comprises the block of code, replacing the block of code at the copy location in the application with a first invocation of the method, adding a second in

Technical Overview & Description

Full multi-page specification text is archived at the issuing office. Read complete official specification ↗

References Cited — Backward Prior Art (25)

PatentTitleYearCitations
US 5,325,533 AEngineering system for modeling computer programs1994234
US 5,701,489 ASystem for partial in-line expansion of procedure calls during program compilation199762
US 5,740,443 ACall-site specific selective automatic inlining199890
US 5,845,119 ASoftware development tool for combining software components/modules199865
US 6,072,951 AProfile driven optimization of frequently executed paths with inlining of code fragment (one or more lines of code from a child procedure to a parent procedure)200069
US 6,195,793 B1Method and computer program product for adaptive inlining in a computer system200137
US 6,230,314 B1Method and device for program transformation using class hierarchy transformation based upon type constraint analysis200147
US 6,301,700 B1Method and apparatus for slicing class hierarchies200138
US 2002032804 A1Heavyweight and lightweight instrumentation—130
US 6,427,234 B1System and method for performing selective dynamic compilation using run-time information2002384
US 2002184609 A1Method and apparatus to produce software—14
US 6,578,194 B1System and method using extended relocation types and operations in relocating operations200326
US 2003204833 A1Method for dynamically adding new code to an application program—20
US 2004111719 A1Method for safely instrumenting large binary code—18
US 2004221282 A1Method for the compression of an interpreted code semantic analysis—16
US 6,851,106 B1Object oriented optimizing code generator with user selection of use or do not use for dynamic generation of functions200522
US 6,851,110 B2Optimizing an executable computer program having address-bridging code segments200520
US 2005097530 A1Template compilation method—19
US 6,904,454 B2Method and apparatus for content repository with versioning and data modeling2005105
US 6,934,935 B1Method and apparatus for accurate profiling of computer programs2005114
US 2005229154 A1System and method for generating and maintaining software code—190
US 7,110,936 B2System and method for generating and maintaining software code200675
US 7,137,104 B2Semantics-based composition of class hierarchies200618
US 7,240,338 B1Computer language translation system and method of converting procedural computer language software to object-oriented computer language software200740
US 7,266,813 B2Determining how many class-type checks to inline200712

Non-Patent Literature (3)

  • Gallagher, Keith, Loyola College in Maryland; Layman, Lucas, North Carolina State University; "Are Decomposition Slices Clones?", 2003 IEEE, retrieved from scholar.google.com on Aug. 27, 2007.
  • Myers, Brad A; Kosbie, David S; "Reusable Hierarchical Command Objects", 1996 ACM, p. 260-267, retrieved from scholar.google.com Aug. 27, 2007.
  • Myers, Brad; Ko, Andrew; "Studying Development and Debugging To help Create a Better Programming Environment: For the CHI 2003 Workshop on Perspectives in End User Development", 2003, retrieved from scholar.google.com Aug. 27, 2007.