Detector: | Jadet |
Target: | project ' synthetic ' versionflip-2 |
Misuse: | misuse ' flip-2 ' |
Tags: |
Details about the known misuse from the MUBench dataset.
Description: | Misses to call ByteBuffer.flip() between writing to and reading from the buffer (or vice versa). There''s many ways to read/write buffer, some of which fail if flip() is missing, while others just do nothing. StackOverflow: http://stackoverflow.com/questions/10166011/how-to-use-java-nio-channels-filechannel-to-write-a-byte-to-a-file-basics/10166055 |
Fix Description: | Add a call to ByteBuffer.flip() |
Violation Types: |
|
In File: | ByteBufferFlip.java |
In Method: | misuse(byte[]) |
Code with Misuse: |
|
Code with Pattern(s): |
|