A computer-implemented method for predicting a defect within a computer program and applying a defect prediction, the method comprising: accessing a code base of the computer program, the code base of the computer program comprising a plurality of computer program files; training a defect prediction system, the training including performing a historical analysis of defect occurrence patterns in the code base of the computer program; analyzing a commit of the computer program to identify a risk value representing a likelihood of defect occurrence within each of the plurality of computer program files; calculating a defect prediction metric for each of the plurality of computer program files, the defect prediction metric providing an objective measure of defect prediction for each of the plurality of computer program files, wherein calculating the defect prediction metric comprises: correlating the risk value with a time at which the defect occurrence is likely to appear with an exponential decay function to generate the defect prediction metric, wherein, for each computer program file, as the risk value of the computer program file increases a number of days after which a defect will likely appear in that particular computer program file decreases, the risk value is a value within a range of risk values, each of the risk values is calculated using the exponential decay function and based on a commit time of each computer program file such that a later computer program file commit timestamp increases the risk value of the computer program file corresponding to the historical analysis of defect occurrence pattern and the analysis of the commit of the computer program to identify the risk value, each of the risk values is linked to one or a set of particular times of a next defect of the computer program associated with the risk value, and the linkage of each of the risk values to the particular times correlates to the exponential decay function; and providing the defect prediction metric for use in mitigating risk associated with the defect predictions for the computer program. accessing a code base of the computer program, the code base of the computer program comprising a plurality of computer program files; training a defect prediction system, the training including performing a historical analysis of defect occurrence patterns in the code base of the computer program; analyzing a commit of the computer program to identify a risk value representing a likelihood of defect occurrence within each of the plurality of computer program files; calculating a defect prediction metric for each of the plurality of computer program files, the defect prediction metric providing an objective measure of defect prediction for each of the plurality of computer program files, wherein calculating the defect prediction metric comprises: correlating the risk value with a time at which the defect occurrence is likely to appear with an exponential decay function to generate the defect prediction metric, wherein, for each computer program file, as the risk value of the computer program file increases a number of days after which a defect will likely appear in that particular computer program file decreases, the risk value is a value within a range of risk values, each of the risk values is calculated using the exponential decay function and based on a commit time of each computer program file such that a later computer program file commit timestamp increases the risk value of the computer program file corresponding to the historical analysis of defect occurrence pattern and the analysis of the commit of the computer program to identify the risk value, each of the risk values is linked to one or a set of particular times of a next defect of the computer program associated with the risk value, and the linkage of each of the risk values to the particular times correlates to the exponential decay function; and providing the defect prediction metric for use in mitigating risk associated with the defect predictions for the computer program.