Linking copied code
AssigneeInternational Business Machines Corporation
InventorsANDREW C. M. HICKS, MICHAEL TERRENCE COHOON, RYAN THOMAS RAWLINS, MICHAEL E. GILDEIN
Life of this patent
Estimating the term…
Abstract
Aspects of the invention include receiving, by a processor, a request to copy a code from a source file and receiving, by the processor, a request to paste the code into a destination file. Aspects also include creating, by the processor based at least in part on the request to paste the code, an entry in a database, the entry having an identification of the source file, an identification of the destination file, a location of the code in the source file, and a location of the code in the destination file.
Claims20
A method for linking copied code, the method comprising:
- receiving, by a processor, a request to copy code from a source file;
- receiving, by the processor, a request to paste the code into a destination file;
- creating, by the processor based at least in part on the request to paste the code, an entry in a database, the entry comprising an identification of the source file, an identification of the destination file, a location of the code in the source file, and a location of the code in the destination
- monitoring, by the processor, the destination file for changes to the code;
- calculating, by the processor based at least in part on detecting changes to the code in the destination file, a similarity score between the code in the source file and the changed code in the destination file;
- and
- based upon a determination that the similarity score is less than a threshold, deleting, by the processor, the entry in the database.
(canceled)
(canceled)
A system comprising:
- one or more processors for executing computer-readable instructions, the computer-readable instructions controlling the one or more processors to perform operations comprising:
- receiving, by a processor, a request to copy code from a source file;
- receiving, by the processor, a request to paste the code into a destination file;
- creating, by the processor based at least in part on the request to paste the code, an entry in a database, the entry comprising an identification of the source file, an identification of the destination file, a location of the code in the source file, and a location of the code in the destination file;
- monitoring, by the processor, the destination file for changes to the code;
- calculating, by the processor based at least in part on detecting changes to the code in the destination file, a similarity score between the code in the source file and the changed code in the destination file;
- and
- based upon a determination that the similarity score is less than a threshold, deleting, by the processor, the entry in the database.
(canceled)
(canceled)
A computer program product comprising a computer-readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to perform operations comprising:
- receiving, by a processor, a request to copy a code from a source file;
- receiving, by the processor, a request to paste the code into a destination file;
- creating, by the processor based at least in part on the request to paste the code, an entry in a database, the entry comprising an identification of the source file, an identification of the destination file, a location of the code in the source file, and a location of the code in the destination
- calculating, by the processor based at least in part on detecting changes to the code in the destination file, a similarity score between the code in the source file and the changed code in the destination file;
- and
- based upon a determination that the similarity score is less than a threshold, deleting, by the processor, the entry in the database.
(canceled)
Dependencies are inferred from the claim text.