Identifying source code elements for refactoring
AssigneeInternational Business Machines Corporation
InventorsSTEPHEN A. DAVIES, LIAM SMYTH, PAUL THOMAS
Life of this patent
Estimating the term…
Abstract
A solution for identifying build errors associated with a source code file for determining source code elements for refactoring. An embodiment of the invention utilizes a source code management system in combination with build logs generated by a build environment to determine source code elements that would benefit from refactoring.
Claims20
A method for identifying build errors associated with a source code file for determining source code elements for refactoring, the method comprising:
- identifying an error associated with a build operation of a build management system;
- interfacing with a source code management system for locating a source code file associated with the identified error;
- analyzing the source code file to identify the identified error associated with the source code file;
- analyzing historical metadata associated with the identified error from the source code file;
- identifying from the historical data whether the source code associated with the identified error has been amended since a last logged successful build operation;
- identifying a source code construct dependency associated with the source code of the identified error and locating the source code file associated with the source code construct in response to a negative determination being made;
- identifying from the historical data associated with the identified source code file whether the source code associated with the identified error has been amended since a last logged successful build operation;
- and
- logging the identified error with the identified error's historical data for further analysis, in response to a positive determination.
A computer program product comprising a tangible, non-transitory computer readable storage medium having computer usable program code embodied therewith, the computer usable program code comprising:
- computer usable program code stored on a tangible storage medium that when executed by a processor is operable to identify an error associated with a build operation of a build management system;
- computer usable program code stored on a tangible storage medium that when executed by a processor is operable to interface with a source code management system for locating a source code file associated with the identified error;
- computer usable program code stored on a tangible storage medium that when executed by a processor is operable to analyze the source code file to identify the identified error associated with the source code file;
- computer usable program code stored on a tangible storage medium that when executed by a processor is operable to analyze historical metadata associated with the identified error from the source code file;
- computer usable program code stored on a tangible storage medium that when executed by a processor is operable to identify from the historical data whether the source code associated with the identified error has been amended since a last logged successful build operation;
- computer usable program code stored on a tangible storage medium that when executed by a processor is operable to identify a source code construct dependency associated with the source code of the identified error and locating the source code file associated with the source code construct in response to a negative determination being made;
- computer usable program code stored on a tangible storage medium that when executed by a processor is operable to identify from the historical data associated with the identified source code file whether the source code associated with the identified error has been amended since a last logged successful build operation;
- and
- computer usable program code stored on a tangible storage medium that when executed by a processor is operable to log the identified error with the identified error's historical data for further analysis, in response to a positive determination.
A system for identifying build errors associated with a source code file for determining source code elements for refactoring comprising:
- a processor;
- a non-volatile memory;
- a volatile memory;
- and
- a bus communicatively linking said processor, said non-volatile memory, and said volatile memory, wherein said processor is operable to execute programmatic instructions contained in the volatile memory, wherein said non-volatile memory is a tangible non-transitory storage medium that stores computer usable program code executable by said plurality of processing cores, said computer usable program code being configured to:
- identify an error associated with a build operation of a build management system;
- interface with a source code management system for locating a source code file associated with the identified error;
- analyze the source code file to identify the identified error associated with the source code file;
- analyze historical metadata associated with the identified error from the source code file;
- identify from the historical data whether the source code associated with the identified error has been amended since a last logged successful build operation;
- identify a source code construct dependency associated with the source code of the identified error and locating the source code file associated with the source code construct in response to a negative determination being made;
- identify from the historical data associated with the identified source code file whether the source code associated with the identified error has been amended since a last logged successful build operation;
- and
- log the identified error with the identified error's historical data for further analysis, in response to a positive determination.
Dependencies are inferred from the claim text.