Article ID | Journal | Published Year | Pages | File Type |
---|---|---|---|---|
461026 | Journal of Systems and Software | 2015 | 23 Pages |
•An analysis of 2227 Java projects, comprising more than 650 million lines of code.•Seventy seven percent of the projects create threads or employ a concurrency control mechanism.•Concurrent programming constructs are used both frequently and intensively.•Adoption of java.util.concurrent is moderate (23% of the concurrent projects use it).•Efficient and safe data structures, e.g., ConcurrentHashMap, are not yet widely used.
In both academia and industry, there is a strong belief that multicore technology will radically change the way software is built. However, little is known about the current state of use of concurrent programming constructs. In this work we present an empirical work aimed at studying the usage of concurrent programming constructs of 2227 real world, stable and mature Java projects from SourceForge. We have studied the usage of concurrent techniques in the most recent versions of these applications and also how usage has evolved along time. The main findings of our study are: (I) More than 75% of the latest versions of the projects either explicitly create threads or employ some concurrency control mechanism. (II) More than half of these projects exhibit at least 47 synchronized methods and 3 implementations of the Runnable interface per 100,000 LoC, which means that not only concurrent programming constructs are used often but they are also employed intensively. (III) The adoption of the java.util.concurrent library is only moderate (approximately 23% of the concurrent projects employ it). (IV) Efficient and thread-safe data structures, such as ConcurrentHashMap, are not yet widely used, despite the fact that they present numerous advantages.