Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a static analysis tool which automatically checks for race conditions in Java projects? [closed]

Is there a static analysis tool which automatically checks for race conditions in Java projects? Preferably the one supporting Eclipse, Spring and Hibernate. Thanks

EDIT: I may need not necessarily a static analysis tool but maybe a tool which runs the java threads (at least JUnit) with different random speed and also can reproduce the same speed profile under debugger. So, almost any way of detecting race conditions would be helpful.

like image 537
user1081596 Avatar asked Jan 27 '12 18:01

user1081596


People also ask

Which tool will help us detecting possible race conditions in a program?

RapiTest helps you test potential race conditions in your code. Using RapiTest, you can: Design and run a multithreaded test. Identify potential race conditions.

How does Java handle race conditions?

Race conditions can be avoided by proper thread synchronization in critical sections. Thread synchronization can be achieved using a synchronized block of Java code. Thread synchronization can also be achieved using other synchronization constructs like locks or atomic variables like java. util.

What does static analysis tools detect?

Static analysis identifies defects before you run a program (e.g., between coding and unit testing). Dynamic code analysis identifies defects after you run a program (e.g., during unit testing). However, some coding errors might not surface during unit testing.


1 Answers

JLint can be used to detect race-conditions. IBM's ConTest is designed to test concurrency issues, so have a look at that as well.

like image 111
Aravind Yarram Avatar answered Sep 22 '22 09:09

Aravind Yarram