[Demonstration 1]

[Buggy Method]
@Override
public synchronized void write(byte[] b, int off, int len) throws IOException {
    if (isClosed()) {
        throw new IOException(ERR_STREAM_CLOSED);
    }
    while (len > 0) {
        remaining = bufferSize - pos;
        toWrite = Math.min(remaining, len);
        outBuf[pos] = b[off];
        System.arraycopy(b, off, outBuf, pos, toWrite);
        pos += toWrite;
        off += toWrite;
        len -= toWrite;
        filePos += toWrite;
        if ((bytesWrittenToBlock + pos >= blockSize) || (pos == bufferSize)) {
            flush();
        }
    }
}

[Buggy Hunk]
if (isClosed()) {

[Patch]
if (closed()) {

[Demonstration 2]

[Buggy Method]
public synchronized Validator getInstance() throws IOException {
    if (instance == null) {
        instance = new Validator();
    }
    return instance;
}

[Buggy Hunk]
public synchronized Validator getInstance() throws IOException {

[Patch]
public Validator getInstance() throws IOException {

[Demonstration 3]

[Buggy Method]
PageModel<MethodInfoView> methodList(String groupCode, String likeApiMethodCode, String likeApiMethodName, String status, Integer currPage, Integer pageSize);

[Buggy Hunk]
PageModel<MethodInfoView> methodList(String groupCode, String likeApiMethodCode, String likeApiMethodName, String status, Integer currPage,

[Patch]
PageModel<MethodInfoView> methodList(String groupCode, String search, String likeApiMethodName, String status, Integer currPage,