Patent ID: 8627465

Claim:
A method, comprising: performing by a computer system taint analysis of a computer program and determining an original set of paths from sources to sinks, wherein each path corresponds to a vulnerability because taint flows from a source in the path to a sink in the path, wherein an output of the performed taint analysis includes a map from program points to taint facts holding at these points: determining by the computer system for each variable whose type is a collection and is accessed in one of the paths in the original set of paths whether the variable points to a concrete value whose internal state is not tainted according to the taint analysis comprises: determining by the computer system at a program point by static types whether a variable is a collection and, if so, adding the collection to a list; determining, by the computer system using the map, if taint facts at the program point indicate the variable points to a concrete value whose internal state may be tainted and, if so, removing the collection from the list; and performing by the computer system for all points in the computer program the determining at a program point and determining if taint facts at the program point, wherein the list indicates each variable whose type is a collection points to a concrete value whose internal state is not tainted according to the taint analysis; for each of the collections found not to be tainted according to the taint analysis, determining by the computer system all points in the computer program where a membership check against the collection is performed; and for each of the points, determining by the computer system corresponding paths and removing those paths from the original set of paths to create a reduced set of paths.