// Sounds like synchronized is not being used in the code.
// Please see the following articles for related examples:
// https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalMonitorStateException.html
// https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html