[Demonstration 1]

[Buggy Method]
static ApportionmentInstance exponentialRandomInstance(SedgewickRandom random, int n) {
    final double[] population = new double[n];
    for (int i = 0; i < population.length; i++) {
        population[i] = 1 + random.exp(10);
    }
    final int k = random.uniform(n, 10 * n);
    return new ApportionmentInstance(population, k);
}

[Buggy Hunk]
final int k = random.uniform(n, 10 * n);

[Patch]
final int k = random.uniform(5* n, 10 * n);

[Demonstration 2]

[Buggy Method]
@Override
public int getAssessmentValue(String taskName, List<ReportVO> vos) throws SQLException, ClassNotFoundException {
    // TODO Auto-generated method stub
    List<String> nameList = new ArrayList<String>();
    nameList = getReviewerCounts(vos);
    int[][] matrix = new int[vos.size()][nameList.size()];
    int i = 0;
    int j = 0;
    for (i = 0; i < vos.size(); i++) {
        for (j = 0; j < nameList.size(); j++) {
            matrix[i][j] = 0;
        }
    }
    i = 0;
    j = 0;
    for (ReportVO vo : vos) {
        String sql = "SELECT included_id FROM merge where final_id = " + mergeDataImpl.getID(new ReportPO(vo));
        rSet = DBManager.getResultSet(sql);
        if (!rSet.next()) {
            String name = "";
            name = getUNameById(mergeDataImpl.getID(new ReportPO(vo)));
            j = nameList.indexOf(name);
            matrix[i][j] = 1;
        } else {
            int includedId = rSet.getInt(1);
            String name = "";
            name = getUNameById(includedId);
            while (rSet.next()) {
                j = nameList.indexOf(name);
                matrix[i][j] = 1;
            }
        }
        i++;
        DBManager.closeConnection();
    }
    crc = new CrcModule(matrix);
    return (int) (crc.getMhCH() + crc.getMtCH());
}

[Buggy Hunk]
nameList = getReviewerCounts(vos);

[Patch]
nameList = getReviewerNames(vos);

[Demonstration 3]

[Buggy Method]
private String possiblyFixLine(String line) {
    if (isNotBlank(line)) {
        return line;
    }
    Matcher matcher = ENDS_WITH_WHITESPACE.matcher(line);
    if (!matcher.matches()) {
        return line;
    }
    return matcher.group("beforetrailing");
}

[Buggy Hunk]
if (isNotBlank(line)) {

[Patch]
if (isBlank(line)) {