Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Findbugs misuses from Govind Singh's thesis #437

Open
salsolatragus opened this issue Sep 18, 2019 · 1 comment
Open

Add Findbugs misuses from Govind Singh's thesis #437

salsolatragus opened this issue Sep 18, 2019 · 1 comment

Comments

@salsolatragus
Copy link
Collaborator

salsolatragus commented Sep 18, 2019

I have added 12 new examples in the Synthetic project that were found from Findbugs documentation (website and research papers) (#198).

I have then executed Findbugs with these examples and the result is summarized in the table below:

Name Bug code Detected by Findbugs
Doublecheckedlocking DC_DOUBLECHECK Yes
Exceptionnotthrown RV_EXCEPTION_NOT_THROWN Yes
Infiniterecursion IL_INFINITE_RECURSIVE_LOOP Yes
Misshashcode HE_EQUALS_NO_HASHCODE No
Nonexistingclone CN_IDIOM No
Nosuchelementexcepption IT_NO_SUCH_ELEMENT Yes
Redundantnullcheck RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE Yes
Synconboolean DL_SYNCHRONIZATION_ON_BOOLEAN No
Synconboxedprimitive DL_SYNCHRONIZATION_ON_BOXED_PRIMITIVE Yes
Synconstring DL_SYNCHRONIZATION_ON_SHARED_CONSTANT No
Unreleasedlock UL_UNRELEASED_LOCK No
unsynchronizeddateformat STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE No

Please note that all of these bugs except 11 (Unreleasedlock) and 12 (Unsynchronizeddateformat) were detected successfully by Findbugs when ran in stand-alone mode using its GUI.

@salsolatragus
Copy link
Collaborator Author

  • Add invokeAndWait() misuse
  • Check (and add?) Object.notifyAll() throws IllegalMonitorStateException if called without lock on object.
  • Check (and add?) JUnit assert in a Runnable.run() as an example of superfluous context?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant