TY - GEN
T1 - Towards Using Concurrent Java API Correctly
AU - Liu, Shuang
AU - Bai, Guangdong
AU - Sun, Jun
AU - Dong, Jin Song
N1 - Publication details (e.g. title, author(s), publication statuses and dates) are captured on an “AS IS” and “AS AVAILABLE” basis at the time of record harvesting from the data source. Suggestions for further amendments or supplementary information can be sent to [email protected].
PY - 2016/7/2
Y1 - 2016/7/2
N2 - Concurrent Programs are hard to analyze or debug due to the complex program logic and unpredictable execution environment. In practice, ordinary programmers often adopt existing well-designed concurrency related API (e.g., those in java.util.concurrent) so as to avoid dealing with these issues. These API can however often be used incorrectly, which results in hardto-debug concurrent bugs. In this work, we propose an approach for enforcing the correct usage of concurrency-related Java API. Our idea is to annotate concurrency-related Java classes with annotations related to misuse of these API and develop lightweight type checker to detect concurrent API misuse based on the annotations. To automate this process, we need to solve two problems: (1) how do we obtain annotations of the relevant API; and (2) how do we systematically detect concurrent API misuse based on the annotations? We solve the first problem by extracting annotations from the API documentation using natural language processing techniques. We solve the second problem by implementing our type checkers in the Checker Framework to detect concurrent API misuse. We apply our approach to extract annotations for all classes in the Java standard library and use them to detect concurrent API misuse in open source projects on GitHub. We confirm that concurrent API misuse is common and often results in bugs or inefficiency. © 2016 IEEE.
AB - Concurrent Programs are hard to analyze or debug due to the complex program logic and unpredictable execution environment. In practice, ordinary programmers often adopt existing well-designed concurrency related API (e.g., those in java.util.concurrent) so as to avoid dealing with these issues. These API can however often be used incorrectly, which results in hardto-debug concurrent bugs. In this work, we propose an approach for enforcing the correct usage of concurrency-related Java API. Our idea is to annotate concurrency-related Java classes with annotations related to misuse of these API and develop lightweight type checker to detect concurrent API misuse based on the annotations. To automate this process, we need to solve two problems: (1) how do we obtain annotations of the relevant API; and (2) how do we systematically detect concurrent API misuse based on the annotations? We solve the first problem by extracting annotations from the API documentation using natural language processing techniques. We solve the second problem by implementing our type checkers in the Checker Framework to detect concurrent API misuse. We apply our approach to extract annotations for all classes in the Java standard library and use them to detect concurrent API misuse in open source projects on GitHub. We confirm that concurrent API misuse is common and often results in bugs or inefficiency. © 2016 IEEE.
KW - Concurrency
KW - Java API
KW - NLP
UR - https://www.scopus.com/pages/publications/85012098118
UR - https://www.scopus.com/record/pubmetrics.uri?eid=2-s2.0-85012098118&origin=recordpage
U2 - 10.1109/ICECCS.2016.038
DO - 10.1109/ICECCS.2016.038
M3 - RGC 32 - Refereed conference paper (with host publication)
SN - 9781509055272
VL - 0
T3 - Proceedings of the IEEE International Conference on Engineering of Complex Computer Systems, ICECCS
SP - 219
EP - 222
BT - Proceedings - 2016 21st International Conference on Engineering of Complex Computer Systems, ICECCS 2016
PB - IEEE
T2 - 21st International Conference on Engineering of Complex Computer Systems, ICECCS 2016
Y2 - 6 November 2016 through 8 November 2016
ER -