Subject Name: producerconsumer
Souce Code Language: Java
Number of Versions: 1
Number of Variants: 1
   - orig
Error expected:
   orig: race
Non-determinisitc: yes

***orig***
LOC: 99 (noncomment Java source code)
Classes: 8
Methods: 16
Fields: 21
Statements: 61
wait() call: 2
notifyAll() call: 3
Sync blocks: 4
Thread start() calls: 2
New expressions: 7

The producerconsumer subject presented here is the
Java version of the classic producer-consumer problem
exhibiting the inadequate concurrency solution resulting in
a race condition.  This version is based on the bug patterns
reported in [1] and is a research object in references [2] and [3]:

References:

[1] Y. Eytani, and S. Ur. "Compiling a Benchmark of Documented Multi-threaded Bugs"
in Proceedings of the 18th International Symposium on Parallel and Distributed 
Processing: 266. April 2004.

[2] Y. Eytani, K. Havelund, S.D. Stoller, and S. Ur.  "Toward a Framework and 
Benchmark for Testing Tools for Multi-Threaded Programs" in Concurrency and 
Computation: Practice and Experience, 19(3): 267-279. 2006.

[3] Dwyer, Matthew B. and Person, Suzette and Elbaum, Sebastian.
Controlling factors in evaluating path-sensitive error detection techniques,
SIGSOFT '06/FSE-14: Proceedings of the 14th ACM SIGSOFT international symposium
on Foundations of software engineering, 2006, isbn 1-59593-468-5, pp. 92--104,
Portland, Oregon, USA, ACM, New York, NY, USA.
