[Demonstration 1]

[Buggy Method]
public void execAsync(final String sql, final Object values, @NonNull final ExecCallback callback) {
    executor.execute(new Runnable() {

        @Override
        public void run() {
            SQLException exception = null;
            try {
                exec(sql, values);
            } catch (SQLException e) {
                exception = e;
            }
            final SQLException _exception = exception;
            mainThreadHandler.post(new Runnable() {

                @Override
                public void run() {
                    callback.onDone(_exception);
                }
            });
        }
    });
}

[Buggy Hunk]
public void execAsync(final String sql, final Object values, @NonNull final ExecCallback callback) {

[Patch]
public void execAsync(final String sql, final Object values, final ExecCallback callback) {

[Demonstration 2]

[Buggy Method]
private void doExecute(ProxyData proxyData, CountDownLatch latch) {
    executor.submit(() -> {
        try {
            proxyDataApiService.updateBeginTestTime(proxyData.getId(), LocalDateTime.now());
            // 开始测试
            waitingTestProxyValidatorExecutor.executeValidator(proxyData);
            proxyDataApiService.updateEndTestTime(proxyData.getId(), LocalDateTime.now());
        } catch (Exception e) {
            logger.error("代理测试定时：由于异常中断测试流程");
            logger.error(e.getMessage(), e);
        }
        latch.countDown();
    });
}

[Buggy Hunk]
executor.submit(() -> {

[Patch]
proxyTestExecutor.submit(() -> {

[Demonstration 3]

[Buggy Method]
private void makeAGuess(View view) {
    //        if(STATE != 0) return;
    final Button button = (Button) view;
    view.setEnabled(false);
    invisib.add(button);
    JSONObject obj = new JSONObject();
    try {
        obj.put("sessionId", sessionId);
        obj.put("action", "guessWord");
        obj.put("guess", button.getText().toString());
    } catch (JSONException e) {
        e.printStackTrace();
    }
    Log.d("hangman", "make a guess obj:" + obj);
    showLoading("make guess");
    NetHttpPost.excute(obj, new NetHttpPost.NetHttpResponse() {

        @Override
        public void onsuccess(String resultStr) {
            try {
                hideLoading();
                JSONObject resultJson = new JSONObject(resultStr);
                if (resultJson != null) {
                    Log.d("hangman", "make a guess:" + resultJson);
                    JSONObject data = resultJson.optJSONObject("data");
                    String newWord = data.optString("word");
                    triedWord = data.optInt("totalWordCount");
                    restTime = 10 - data.optInt("wrongGuessCountOfCurrentWord");
                    char[] c = newWord.toCharArray();
                    final ArrayList<GameLetter> letters = new ArrayList<GameLetter>();
                    for (int i = 0; i < c.length; i++) {
                        //*对应的ASCII表 的值
                        if (c[i] != 42) {
                            letterIsR = true;
                        }
                        letters.add(new GameLetter(c[i] + "", false));
                    }
                    if (!newWord.contains("*")) {
                        isComplete = true;
                    }
                    runOnUiThread(new Runnable() {

                        public void run() {
                            letterHolder.removeAllViews();
                            ArrayListAdapter.addViews(HangmanActivity.this, letters, letterHolder);
                            triedText.setText(getResources().getString(R.string.tried) + ":" + triedWord);
                            restText.setText(getResources().getString(R.string.rest) + ":" + restTime);
                            if (letterIsR) {
                                button.setTextColor(getResources().getColor(R.color.correct));
                            } else {
                                button.setTextColor(getResources().getColor(R.color.wrong));
                                hangedMan.setBackgroundResource(getResources().getIdentifier("hangmanbilde" + (10 - restTime), "drawable", getPackageName()));
                            }
                            if (isComplete || restTime == 0) {
                                getResult();
                                for (Button button : invisib) {
                                    button.setEnabled(true);
                                    button.setTextColor(getResources().getColor(R.color.black));
                                }
                                hangedMan.setBackgroundResource(getResources().getIdentifier("hangmanbilde" + 0, "drawable", getPackageName()));
                            }
                        }
                    });
                }
            } catch (JSONException e) {
                e.printStackTrace();
            }
        }
    });
}

[Buggy Hunk]
obj.put("guess", button.getText().toString());

[Patch]
obj.put("guess", button.getText().toString().toUpperCase());