[Demonstration 1]

[Buggy Method]
@Test
public void Runs_Test1() {
    Chronotimer c7 = new Chronotimer();
    c7.power();
    c7.toggleChannel("1");
    c7.toggleChannel("2");
    c7.newRun();
    assertEquals(true, c7.num("111"));
    assertEquals(true, c7.start());
    assertEquals(true, c7.finish());
}

[Buggy Hunk]
c7.newRun();

[Patch]
assertEquals(true, c7.newRun());

[Demonstration 2]

[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));

[Demonstration 3]

[Buggy Method]
private double bias(int u, int i, int t, List<Integer> userStaticCommunities, List<Integer> userCommunities, List<Integer> itemCommunities) {
    double bias = globalMean;
    int bin = bin(t);
    double dev_ut = dev(u, t);
    int cbin = cbin(t);
    // bi(t): eq. (12)
    double bi = itemBias.get(i);
    double bit = Bit.get(i, bin);
    double cu = Cu.get(u);
    double cut = (t >= 0 && t < numDays) ? Cut.get(u, t) : 0;
    bias = (bi + bit) * (cu + cut);
    // bu(t): eq. (9)
    double but = But.contains(u, t) ? But.get(u, t) : 0;
    bias += userBias.get(u) + Alpha.get(u) * dev_ut + but;
    // bci(t)
    for (int c : itemCommunities) {
        double mic = itemMemberships[cbin].get(i, c);
        double bci = BCi[cbin].get(c);
        double bcit = BCit[cbin].get(c, bin);
        bias += (bci + bcit) * mic;
    }
    // bcu(t)
    for (int c : userCommunities) {
        double muc = userMemberships[cbin].get(u, c);
        double bcu = BCu[cbin].get(c);
        double bcut = BCut.get(cbin).contains(c, t) ? BCut.get(cbin).get(c, t) : 0;
        bias += (bcu + bcut) * muc;
    }
    for (int c : userStaticCommunities) {
        double muc = userMemberships[0].get(u, c);
        double alpha = Alpha.get(c);
        double dev = devc(c, t);
        bias += alpha * dev * muc;
    }
    return bias;
}

[Buggy Hunk]
double alpha = Alpha.get(c);

[Patch]
double alpha = AlphaC.get(c);