Automated code replication during application development

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S152000, C707S793000, C707S793000

Reexamination Certificate

active

06321378

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Technical Field
The present invention relates in general to application development and in particular to revisions to source code during application development. Still more particularly, the present invention relates to automatically replicating revisions from one source code segment to other segments during application development.
2. Description of the Related Art
Developers utilize various tools for generating highlevel language source code for applications. Tools such as IBM VisualAge Java, Symantec Visual Cafe Pro, or Borland JBuilder, for example, are employed to develop Java applications having an integrated GUI interface within server/client source code. These tools are advanced to the point of automatically generating GUI code from the user-drawn graphical interface. They are severely limited, however, in functionality for generating or changing large amounts of non-GUI code.
Developers frequently need to make similar changes to large sections of code. For instance, a Java application which draws a map of the United States, including each individual state, may be drawn by defining polygons for each state such as the following:
int cox()={187, 251, 250, 178, 187};
int coy()={101, 105, 142, 140, 101};
int cop=cox.length
Polygon co=new Polygon (cox, coy, cop);
This code defines four x-coordinates in the “cox” array, four y-coordinates in the “coy” array, the number of points in the integer “cop,” and the Colorado polygon in the “co” polygon. Code similar to this would be replicated for each of the 50 states, resulting in at least 200 lines of code. Furthermore, some polygons would be extremely complex, such as the polygon for Texas, would requires 42 x- and y-coordinates.
If, as is frequently the case, the developer's requirements change after the code for all 50 states has been formulated, the code must be altered to satisfy the new requirements. For the example specified above, if relative coordinates are required in lieu of absolute coordinates, the source code for the Colorado polygon must be changed to:
int cox={(int)(187*x), (int)(251*x), (int)(250*x), (int)(178*x), (int)(187*x)};
int coy()={(int)(101*y), (int)(105*y), (int)(142*y), (int)(140*y), (int)(101*y)};
int cop=cox.length
Polygon co=new Polygon (cox, coy, cop);
The Colorado polygon may now be drawn at a specified point (x, y) in the display, where x and y are defined as floating point variables (which necessitates the “(int)” cast to cast the array elements back to integers).
In replicating the above changes for all fifty states, the developer must change all of the elements of all x-arrays from “NUM” to “(int)(NUM*x)” and all of the elements of all y-arrays from “NUM” to “(int)(NUM*y)”. This is a painstaking task, which may be achieved with present tools most efficiently by:
(1) Copying “(int)(” to the clipboard;
(2) Pasting “(int)(” in front of each element in both the x-arrays and the y-arrays;
(3) Copying “*x” to the clipboard;
(4) Pasting “*x” in after each element in every x-array;
(5) Copying “*y” to the clipboard; and
(6) Pasting “*y” in after each element in every y-array.
Given that there are up to 42 array elements for each of 50 states, these manual operations must be performed on up to 2,000 elements. Even with the method described above, this requires hours for editing and for debug during compilation.
It would be desirable, therefore, to provide a tool for automatically replicating similar changes in non-GUI code during development.
SUMMARY OF THE INVENTION
It is therefore one object of the present invention to provide an improved method and apparatus for application development.
It is another object of the present invention to provide an improved method and apparatus for making revisions to source code during application development.
It is yet another object of the present invention to provide a method and apparatus for automatically replicating revisions from one source code segment to other, similar source code segments during application development.
The foregoing objects are achieved as is now described. An application development tool supports a “replicate” mode of operation which, when selected, automatically archives copies of any application source code modules being edited. Where the application source code contains multiple code segments which are symmetrical with respect to size and general content, such as a number of polygon data arrays, in which similar alterations must be implemented globally, the user may make the revision in one code segment and mark the remaining code segments in which the revisions are to be replicated. The application development tool then compares the revised and archived source code modules to identify the pattern of the revisions which were made. Upon detecting a pattern to the revisions, the application development tool automatically replicates the revisions in conformance with the identified pattern within the marked code segments. A solution is thus provided for developers who must alter large amounts of code in a manner which produces an identifiable pattern to the revisions but which cannot be accomplished by simple global find-and-replace processes, saving the developer time by eliminating repetitive tasks which are both time consuming and common sources of errors requiring correction during debug.
The above as well as additional objects, features, and advantages of the present invention will become apparent in the following detailed written description.


REFERENCES:
patent: 4558413 (1985-12-01), Schmidt et al.
patent: 4641274 (1987-02-01), Swank
patent: 4807182 (1989-02-01), Queen
patent: 5440738 (1995-08-01), Bowman et al.
patent: 5715454 (1998-02-01), Smith
patent: 5768592 (1998-06-01), Chang
patent: 5794253 (1998-08-01), Norin et al.
patent: 5832514 (1998-11-01), Norin et al.
patent: 5832520 (1998-11-01), Miller
patent: 5835911 (1998-11-01), Nakagawa et al.
patent: 5940622 (1999-08-01), Patel
patent: 5953006 (1999-09-01), Baker et al.
patent: 6073214 (2000-06-01), Fawcett
patent: 6154876 (2000-11-01), Haley et al.
patent: 6167408 (2000-12-01), Cannon et al.
Title: Eliminating Synchronization Bottlenecks in Object-Based Programs Using Adaptive Replication: Source: ACM, Author: Rinard et al, 1999.*
Title: Versioning a Full-text Information Retrieval System, Source: ACM, Author: Anick et al, 1992.*
Title: Flexible Update Propogation for Weakly Consistent Replication, ACM, Author: Peterson et al, 10/97.

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Automated code replication during application development does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Automated code replication during application development, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Automated code replication during application development will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2574254

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.