Frequently Asked Questions

What kinds of concurrency defects does ThreadSafe look for?
What kinds of concurrency defects does ThreadSafe not look for?
I have just fixed a subtle concurrency bug in my Java program. Can I use ThreadSafe to ensure it does not happen again?
How do I configure ThreadSafe?
Does ThreadSafe run on Linux/Windows/OS X/whatever?
Does ThreadSafe run on IntelliJ IDEA or NetBeans?
What happens when you release a new version of ThreadSafe?
I can’t figure out how to stamp out this bug! Can you help?
When using an in-house library, I sometimes run into concurrency issues. Can ThreadSafe help?
I’m having a problem with ThreadSafe. Where can I get help?
My virus checker says that ThreadSafe contains a virus. What should I do?
How can I give you feedback on ThreadSafe?
Where can I find out more about ThreadSafe?
How do I arrange a free trial of ThreadSafe?
I love ThreadSafe! How do I buy a license?
What do I get for $499?
How will I pay?
What does ‘VAT’ mean and do I have to pay it?
The purchase form asks for a discount code. How do I get one?
I need ThreadSafe for everybody on my team. What should I do?



What kinds of concurrency defects does ThreadSafe look for?

ThreadSafe focuses on checking for common mistakes made by programmers when using the standard APIs provided by Java for writing concurrent programs. ThreadSafe checks for incorrect usage of Java’s built-in synchronization mechanisms, as well as common errors that occur when using synchronized collections, the java.util.concurrent collections APIs, and first-class locks. ThreadSafe also includes preliminary support for the concurrency facilities provided by the Android APIs.

The specific list of defects is changing as we implement new analyses and refine the existing ones, but currently it includes the following:

  • Inconsistent and mixed use of synchronization while accessing shared fields and collections, which can lead to data races.
  • Reassignment of fields while holding locks on their values, which can lead to data races.
  • Circularity in lock dependencies, which can lead to deadlocks.
  • Use of blocking methods on java.util.concurrent queues while locks are held, which can lead to deadlocks.
  • Intermixing of thread-safe and non-thread-safe collections, either by overwriting a field that usually contains a thread-safe collection with a non-thread-safe collection, or by publishing non-thread-safe collections through a thread-safe collection that is later mutated. Either of these can lead to data races.
  • Atomicity violations while using java.util.concurrent collections, e.g., a sequence of a get, a check, and a put to a collection without synchronization. Also atomicity violations that can arise when iterating over synchronized collections without the correct lock held.
  • Synchronizing on objects that may not be shared, for example String objects.
  • Stylistic errors, which can often be indictators of poor code quality. For instance: catching ConcurrentModificationException; using .isLocked() and then .lock() instead of using .tryLock(); consistently synchronizing when using a thread-safe collection.

ThreadSafe includes online documentation that describes each of the specific problems that it checks for in more detail, together with suggestions for remediation.



What kinds of concurrency defects does ThreadSafe not look for?

ThreadSafe focuses primarily on checking for common mistakes that occur when using the standard Java APIs (with preliminary support for additional APIs provided for Android programming).

We do not yet include support for all of java.util.concurrent. Specifically, ThreadSafe does not check for misuse of the advanced synchronization facilities provided by java.util.concurrent, for example the java.util.concurrent.atomic package. Nor does it currently include any checkers for mistakes that may occur when writing parallel programs using the Fork-Join framework.

Finding bugs in intricate lock-free algorithms requires analysis technology that does not scale well. Such algorithms should be left to specialized concurrency experts. ThreadSafe can be configured to find defects in applications that use libraries containing such algorithms.

Which analyses we include in new releases of ThreadSafe is dictated both by what is possible using analysis technology that is mature enough for integration into a usable product, and by the features and concurrency defects that we see often in ‘average’ Java programs.

If you have a Java concurrency problem that is not currently covered by ThreadSafe, Contemplate’s Java concurrency specialists may be able to help by adding custom configuration to ThreadSafe and/or by use of advanced analysis technology that is not yet mature enough for integration into ThreadSafe. Contact sales@contemplateltd.com to discuss terms.



I have just fixed a subtle concurrency bug in my Java program. Can I use ThreadSafe to ensure it does not happen again?

ThreadSafe scans your code looking for a range of common errors that occur when writing concurrent programs in Java. If your concurrency bug falls into one of the categories of error that ThreadSafe currently checks for, then it is straightforward to integrate ThreadSafe into your development process to ensure that this bug does not happen again.

If your bug does not fall into one of the categories currently covered by ThreadSafe, Contemplate’s Java concurrency specialists may still be able to help by adding custom configuration to ThreadSafe and/or by use of advanced analysis technology that is not yet mature enough for integration into ThreadSafe. Contact sales@contemplateltd.com to discuss terms.



How do I configure ThreadSafe?

ThreadSafe defines a set of concurrency rules for which findings are reported. The default, which can be changed, is to use all rules during analysis. The severity of rule violations can also be configured.

Configuration to support proprietary libraries and frameworks is possible but currently requires specialist assistance from Contemplate’s staff.



Does ThreadSafe run on Linux/Windows/OS X/whatever?

ThreadSafe supports the following platforms:

• Windows XP or later
• Mac OS X 10.6 or later
• Linux (glibc 2.3 or later)

The software requirements include:

• Java SE 6 Update 10 or later
• Eclipse 3.6 or later (ThreadSafe for Eclipse only)
• SonarQube 4.3 or later (ThreadSafe for SonarQube only)


Does ThreadSafe run on IntelliJ IDEA or NetBeans?

Currently the only IDE we support is Eclipse. Users of other IDEs can use the ThreadSafe Command Line Interface to produce an HTML report with clickable links. This provides ways of browsing findings and relating them to the source code that are similar to what ThreadSafe for Eclipse provides.



What happens when you release a new version of ThreadSafe?

We will send an email containing a download link to all licensed ThreadSafe users who are entitled to free upgrades. Users whose entitlement to free upgrades has recently expired will receive information about the upgrade with an invitation to purchase another year of upgrades and support. The current price for this is $150/year.



I can’t figure out how to stamp out this bug! Can you help?

Contemplate’s Java concurrency specialists are available to help you with your software quality issues. In this work, we use advanced analysis technology that is not yet mature enough for integration into ThreadSafe. Contact sales@contemplateltd.com to discuss terms.



When using an in-house library, I sometimes run into concurrency issues. Can ThreadSafe help?

ThreadSafe can be configured to help you find concurrency issues arising through use of proprietary libraries and frameworks. Contact sales@contemplateltd.com to discuss how we can assist you with this.



I’m having a problem with ThreadSafe. Where can I get help?

Send email to support@contemplateltd.com. Please indicate which version of ThreadSafe you are using. (In Eclipse: Help -> About Eclipse and then click on the Contemplate logo. In SonarQube: Settings -> System Info.)

To diagnose some problems, we will need to see the ThreadSafe log file. Here’s where you can find it:

ThreadSafe for Eclipse
<your-eclipse-workspace>/.metadata/.plugins/com.contemplateltd.eclipse.plugin/<your-project>/ThreadSafe.log.txt
ThreadSafe Command Line Interface
log/ThreadSafe.log.txt in the directory specified as outputDirectory. If invocation from the command line fails, then the information returned from the invocation attempt will also provide clues.
ThreadSafe for SonarQube
threadsafe/ThreadSafe.log.txt in your project directory, possibly inside .sonar, depending on your configuration. For problems with SonarQube setup, its command-line switches (for instance -e or -X for SonarRunner) provide more information.

If there is a problem, the most interesting part of the log file would be towards the end. In case it contains information that you are reluctant to send us – it will mention your class names etc. but contains no actual code – then you can replace your class names with XXX etc.


My virus checker says that ThreadSafe contains a virus. What should I do?

For a brief period, the virus definitions in Microsoft Security Essentials on Windows 7 incorrectly identified one version of ThreadSafe as containing a trojan. If this happens to you, please update your virus definitions (use the Update tab in Microsoft Security Essentials) and the warning should go away. Depending on the action taken by the virus checker, you may need to re-download ThreadSafe and/or delete AppData\Local\Temp\threadsafe before running ThreadSafe.



How can I give you feedback on ThreadSafe?

We’d be very grateful for feedback, both positive and negative, using this short survey. Or if you hate surveys, just send email to support@contemplateltd.com.



Where can I find out more about ThreadSafe?

You can watch a short introduction to ThreadSafe and a sequence of two short demo videos on YouTube. If your company prevents access to YouTube, then you can download these videos from here, here and here.

Case studies and white papers, and a product data sheet, are available from our website.



How do I arrange a free trial of ThreadSafe?

Fill out and submit the Download Trial Form. You will receive an email with a download link and a license key giving you 2 weeks of access to ThreadSafe Solo‘s full functionality. The download bundle includes easy-to-follow step-by-step installation instructions.



I love ThreadSafe! How do I buy a license?

To buy ThreadSafe Solo, fill out the purchase form pay using your credit card or PayPal account. You will receive an email with a download link, a perpetual single-user license, and a VAT invoice. The download bundle includes easy-to-follow step-by-step installation instructions.

To buy ThreadSafe Enterprise, contact sales@contemplateltd.com to discuss your needs.



What do I get for $499?

You get a perpetual single-user license for ThreadSafe Solo for Eclipse, plus free upgrades and support for a year.

We will contact you close to the end of the year to ask if you wish to buy another year of upgrades and support. The current price for this is $150/year.



How will I pay?

Payments are handled through PayPal, with payment coming from your PayPal account or your credit card. Currency conversion is handled automatically through PayPal. We can handle other payment methods – please contact sales@contemplateltd.com.



What does ‘VAT’ mean and do I have to pay it?

VAT is ‘Value-Added Tax’. That’s what sales tax is called in the UK, which is where Contemplate is based. The current VAT rate is 20% on the purchase price.

No VAT is charged for purchases outside the European Union.

We are required to charge VAT on all purchases in the UK. VAT-registered UK businesses should be able to reclaim it from HMRC.

We are also required to charge VAT on all purchases in the European Union except to VAT-registered businesses. If you use our ‘Buy a license’ form then you will be charged VAT if you are located in an EU country. If you are a VAT-registered business in the EU but outside the UK, please write to us at sales@contemplateltd.com instead, supplying your VAT number, and we will deal with your purchase manually but quickly.



The purchase form asks for a discount code. How do I get one?

From time to time, Contemplate gives limited-time discounts to attendees of events at which we exhibit. Come to our stand to get a discount code. We’d be very interested to hear about your Java software quality problems and to discuss how ThreadSafe can help!



I need ThreadSafe for everybody on my team. What should I do?

ThreadSafe Solo is for a single user, so you will need to buy a separate license for each user. You might want to consider ThreadSafe Enterprise – contact sales@contemplateltd.com to discuss your needs.