[Demonstration 1]

[Buggy Method]
private void registerReturn() {
    final Handler handler = new Handler() {

        @Override
        public void handleMessage(Message msg) {
            String jsonText = msg.getData().getString("responseBody");
            Log.d(TAG, "jsonText = " + jsonText);
            try {
                JSONObject jsonObj = new JSONObject(jsonText);
                String result = jsonObj.getString("result");
                if (result.equals("success")) {
                    textViewBookState.setText("在库");
                    buttonBook.setVisibility(View.INVISIBLE);
                } else {
                    Toast.makeText(getApplicationContext(), "accept borrow request failed! result=" + result, Toast.LENGTH_SHORT).show();
                }
            } catch (JSONException e) {
                Toast.makeText(getApplicationContext(), "unknown response remote service!", Toast.LENGTH_SHORT).show();
                e.printStackTrace();
            }
        }
    };
    HttpUtil httptd = new HttpUtil();
    httptd.submitAsyncHttpClientPostReturnBook(token, shopName, bookName, "", handler);
}

[Buggy Hunk]
httptd.submitAsyncHttpClientPostReturnBook(token, shopName, bookName, "", handler);

[Patch]
httptd.submitAsyncHttpClientPostReturnBook(token, shopName, bookName,  handler);

[Demonstration 2]

[Buggy Method]
@Override
public DirMdAttrPosList findDirMdIndex(MdIndex mdIndex) {
    NewDirMdIndex parentDir = getParentDirMdIndex(mdIndex.getPath());
    if (parentDir == null) {
        return null;
    }
    NewDirMdIndex dirMdIndex = findRdbDao.getNewDirMdIndex(MdUtils.genMdIndexKey(parentDir.getFileCode(), mdIndex.getName()));
    if (mdIndex.getPath().equals("/")) {
        dirMdIndex = parentDir;
    }
    List<Long> distrCodeList = dirMdIndex.getDistrCodeList();
    List<ClusterNodeInfo> nodeInfoList = commonModule.getMdLocationList(distrCodeList);
    return new DirMdAttrPosList(nodeInfoList);
}

[Buggy Hunk]
if (mdIndex.getPath().equals("/")) {

[Patch]
if (mdIndex.getPath().equals("/") && mdIndex.getName().equals("")) {

[Demonstration 3]

[Buggy Method]
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    String action = req.getPathInfo();
    req.setCharacterEncoding("utf-8");
    resp.setContentType("text/html;charset=UTF-8");
    switch(action) {
        case "/step1":
            Part filePart = req.getPart("file");
            // check file size
            if (filePart.getSize() == 0) {
                req.setAttribute("error", "You have to choose ODS file!");
                initializePage(req, resp);
                return;
            }
            //System.out.println(System.getProperty("java.io.tmpdir"));
            // create temp file
            File directory = new File(getServletContext().getRealPath("/"));
            File file = File.createTempFile("tmp", ".ods", null);
            file.setReadable(true, false);
            file.setExecutable(true, false);
            file.setWritable(true, false);
            req.setAttribute("path", file.getAbsolutePath());
            filePart.write(file.getAbsolutePath());
            List<String> tables = new ArrayList<>();
            try {
                //NodeList
                //String path = "/home/sarhan/Documents/School/fiods/src/Albums.ods";
                nodeList = getDocumentUtils().getTables(getDocumentUtils().getDocument(file.getAbsolutePath()));
                for (int i = 0; i < nodeList.getLength(); ++i) {
                    Element e = (Element) nodeList.item(i);
                    tables.add(e.getAttribute("table:name"));
                }
                req.setAttribute("tables", tables);
                req.setAttribute("step", "step2");
            } catch (Exception e) {
                e.printStackTrace();
            }
            initializePage(req, resp);
            break;
        case "/step2":
            tableName = req.getParameter("table");
            req.setAttribute("step", "step3");
            initializePage(req, resp);
            break;
        case "/step3":
            String searchValue = req.getParameter("value");
            Element sheet = getDocumentUtils().getTable(nodeList, tableName);
            List<Element> rows = getDocumentUtils().getRows(sheet, searchValue);
            List<List<String>> rowStrings = NodesToStrings(rows);
            req.setAttribute("rows", rowStrings);
            req.setAttribute("step", "step4");
            initializePage(req, resp);
            break;
        case "/step4":
            req.setAttribute("step", "step1");
            initializePage(req, resp);
            break;
    }
}

[Buggy Hunk]
List<List<String>> rowStrings = NodesToStrings(rows);

[Patch]
List<List<String>> rowStrings = getDocumentUtils().NodesToStrings(rows);