[Demonstration 1]

[Buggy Method]
@FXML
protected void searchExecute(final ActionEvent event) {
    if (searchWord.getText() == null) {
        Alert alert = new Alert(Alert.AlertType.INFORMATION);
        alert.setTitle("INFO");
        alert.setHeaderText("検索ワードを入力してください");
        alert.show();
        return;
    }
    if (!(chkExcel.isSelected() && chkWord.isSelected())) {
        Alert alert = new Alert(Alert.AlertType.INFORMATION);
        alert.setTitle("INFO");
        alert.setHeaderText("チェックボックスを選択してください");
        alert.show();
        return;
    }
    if (chkExcel.isSelected()) {
        ExcelGrep excel = new ExcelGrep(searchWord.getText(), SearchTypes.FUZZY, resultOutPath.getText());
        try {
            excel.grepOutTempFile(searchDir.getText());
            excel.moveTempFile();
        } catch (IOException e) {
            System.out.println("Excelファイルの検索に失敗しました");
            e.printStackTrace();
        }
    }
    if (chkWord.isSelected()) {
        WordGrep word = new WordGrep(searchWord.getText(), SearchTypes.FUZZY, resultOutPath.getText());
        try {
            word.grepOutTempFile(searchDir.getText());
            word.moveTempFile();
        } catch (IOException e) {
            System.out.println("Wordファイルの検索に失敗しました");
            e.printStackTrace();
        }
    }
    Alert alert = new Alert(Alert.AlertType.INFORMATION);
    alert.setTitle("INFO");
    alert.setHeaderText("検索が終わりました");
    alert.show();
}

[Buggy Hunk]
if(!(chkExcel.isSelected() && chkWord.isSelected())){

[Patch]
if(!chkExcel.isSelected() && !chkWord.isSelected()){

[Demonstration 2]

[Buggy Method]
@Override
public View getView(int pos, View view, ViewGroup parent) {
    view = LayoutInflater.from(ChoosePatientAppointmentActivity.this).inflate(R.layout.appointments_history_cell, null);
    TextView tvDoctorName = (TextView) view.findViewById(R.id.tvDoctorName);
    TextView tvDateTime = (TextView) view.findViewById(R.id.tvDateTime);
    final ImageView ivCheck = (ImageView) view.findViewById(R.id.ivCheck);
    tvDateTime.setTypeface(AppConstants.WALSHEIM_LIGHT);
    tvDoctorName.setTypeface(AppConstants.WALSHEIM_LIGHT);
    final GetPatientAppointmentsResponse.AppointmentRow data = patientAppointments.get(pos);
    /*if(data.is)
            {
                view.setVisibility(View.GONE);
            }*/
    long dayInstance = data.appointmentDetails.ConsultationDt.longValue();
    long timeInstance = TimeUtils.getLongForHHMMSS(data.appointmentDetails.StartTime + ":00");
    long totalInstance = dayInstance + timeInstance;
    StringBuilder sb = new StringBuilder();
    sb.append(DateUtils.isToday(totalInstance) ? "Today" : TimeUtils.getDay(totalInstance)).append(" - ").append(data.appointmentDetails.StartTime.substring(0, 5));
    tvDoctorName.setText(data.doctorDetail.doctorFullName);
    tvDateTime.setText(sb.toString());
    ivCheck.setTag(R.id.ivCheck, pos);
    if (data.isSelected) {
        ivCheck.setBackgroundResource(R.drawable.check_box_sq_admin);
    } else {
        ivCheck.setBackgroundResource(R.drawable.un_check_admin);
    }
    ivCheck.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            int pos = (int) ivCheck.getTag(R.id.ivCheck);
            Log.e("clicked at : ", "" + pos);
            for (GetPatientAppointmentsResponse.AppointmentRow data : patientAppointments) data.isSelected = false;
            if (patientAppointments.get(pos).isSelected) {
                patientAppointments.get(pos).isSelected = false;
            } else {
                patientAppointments.get(pos).isSelected = true;
            }
            selectedPatientAppointment = data;
            notifyDataSetChanged();
        }
    });
    view.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            ivCheck.performClick();
        }
    });
    return view;
}

[Buggy Hunk]
tvDateTime.setText(sb.toString());

[Patch]
tvDateTime.setText(sb.toString()+" Hrs");

[Demonstration 3]

[Buggy Method]
public static Result service(String ownerName, String projectName, String service, boolean isAdvertise) throws IOException, UnsupportedOperationException, ServletException {
    if (!isSupportedService(service)) {
        return forbidden(String.format("Unsupported service: '%s'", service));
    }
    Project project = Project.findByOwnerAndProjectName(ownerName, projectName);
    if (project == null) {
        return notFound();
    }
    models.User user = UserApp.currentUser();
    if (!isAllowed(project, service)) {
        if (user.isAnonymous()) {
            return BasicAuthAction.unauthorized(response());
        } else {
            // If you want the Git client showing your custom message to
            // the user, the Content-Type should be exact "text/plain"
            // without any parameter. For more details, see the code at
            // https://github.com/git/git/commit/426e70d4a11ce3b4f70636d57c6a0ab16ae08a00#diff-eea0ad565ec5903a11b6023755d491cfR154
            response().setHeader("Content-Type", "text/plain");
            return forbidden(String.format("'%s' has no permission to '%s/%s'.", user.name, ownerName, projectName));
        }
    }
    if (isAdvertise) {
        return ok(RepositoryService.gitAdvertise(project, service, response()));
    } else {
        if (request().body().isMaxSizeExceeded()) {
            return status(REQUEST_ENTITY_TOO_LARGE);
        } else {
            user.visits(project);
            return ok(RepositoryService.gitRpc(project, service, request(), response()));
        }
    }
}

[Buggy Hunk]
user.name, ownerName, projectName));

[Patch]
user.loginId, ownerName, projectName));