Patent ID: 8732142

Claim:
A method of correcting a first data race condition, the method comprising: detecting, in a computer, the first data race condition, encountered by the computer executing a program, involving a shared resource that is accessed by a first thread and a second thread, wherein the first thread accesses the shared resource before the second thread; generating a list of context-specific suggestions, specific to the context of the data race condition, for removing the data race condition, wherein the list comprises a suggestion that the first thread acquire at least a first lock synchronization object that the second thread holds, in response to determining that lockset information is available and determining that the second thread holds at least one lock synchronization object when the second thread accesses the shared resource, and wherein the list comprises a suggestion that the second thread acquire at least a second lock synchronization object that the first thread holds, in response to determining that lockset information for previous accesses to the shared resource is available, determining that the second thread does not hold at least one lock synchronization object when the second thread accesses the shared resource, and determining that the first thread holds at least one lock synchronization object when the first thread accesses the shared resource, displaying the list of context-specific suggestions through a user interface; and wherein the list comprises a suggestion that the second thread acquire at least a third synchronization object according to a vector clock mechanism, in response to determining that vector clock information is available and the first thread is ordered by at least the third synchronization object, and wherein the third synchronization object, if acquired by the second thread, removes the first data race condition.