Towards using concurrent Java API correctly
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. Thes...
Saved in:
Main Authors: | , , , |
---|---|
Format: | text |
Language: | English |
Published: |
Institutional Knowledge at Singapore Management University
2016
|
Subjects: | |
Online Access: | https://ink.library.smu.edu.sg/sis_research/4942 https://ink.library.smu.edu.sg/context/sis_research/article/5945/viewcontent/towards_using.pdf |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Institution: | Singapore Management University |
Language: | English |
id |
sg-smu-ink.sis_research-5945 |
---|---|
record_format |
dspace |
spelling |
sg-smu-ink.sis_research-59452020-02-27T03:24:46Z Towards using concurrent Java API correctly LIU, Shuang BAI, Guangdong SUN, Jun DONG, Jin Song 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-11-08T08:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/4942 info:doi/10.1109/ICECCS.2016.32 https://ink.library.smu.edu.sg/context/sis_research/article/5945/viewcontent/towards_using.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University Programming Languages and Compilers Software Engineering |
institution |
Singapore Management University |
building |
SMU Libraries |
continent |
Asia |
country |
Singapore Singapore |
content_provider |
SMU Libraries |
collection |
InK@SMU |
language |
English |
topic |
Programming Languages and Compilers Software Engineering |
spellingShingle |
Programming Languages and Compilers Software Engineering LIU, Shuang BAI, Guangdong SUN, Jun DONG, Jin Song Towards using concurrent Java API correctly |
description |
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. |
format |
text |
author |
LIU, Shuang BAI, Guangdong SUN, Jun DONG, Jin Song |
author_facet |
LIU, Shuang BAI, Guangdong SUN, Jun DONG, Jin Song |
author_sort |
LIU, Shuang |
title |
Towards using concurrent Java API correctly |
title_short |
Towards using concurrent Java API correctly |
title_full |
Towards using concurrent Java API correctly |
title_fullStr |
Towards using concurrent Java API correctly |
title_full_unstemmed |
Towards using concurrent Java API correctly |
title_sort |
towards using concurrent java api correctly |
publisher |
Institutional Knowledge at Singapore Management University |
publishDate |
2016 |
url |
https://ink.library.smu.edu.sg/sis_research/4942 https://ink.library.smu.edu.sg/context/sis_research/article/5945/viewcontent/towards_using.pdf |
_version_ |
1770575153523064832 |