Patent ID: 7640587

Claim:
A method, in a data processing system, for repairing infected source code prior to performing a code build, the infected source code including a first component and other components containing dependencies to the first component, the method comprising: detecting, by a processor, a virus pattern in the first component of the infected source code; responsive to the detecting of the virus pattern, identifying the other components in the source code containing the dependencies to the first component; only retracting the first component and the identified other components from a current code build; replacing the first component and the identified other components with a prior version of the first component and prior versions of the identified other components from an archive of a previous code build; and performing the current code build of the source code using the prior version of the first component and the prior versions of the identified other components, wherein the identifying step is based on rules defined from relationships between the first component and the other components in the source code.