[Demonstration 1]

[Buggy Method]
@When("^I transform it to \"([^\"]*)\"$")
public void iTransformItTo(String format) throws Throwable {
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    transformerService.transform(givenTwineStory, outputStream, epubTransformer);
    ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
    actualBook = epubReader.readEpub(inputStream);
}

[Buggy Hunk]
public void iTransformItTo(String format) throws Throwable {

[Patch]
public void iTransformItTo(final String format) throws Throwable {

[Demonstration 2]

[Buggy Method]
@Then("^Rewards Level should be \"([^\"]*)\"$")
public void rewards_Level_should_be(String rewardLevel) throws Throwable {
    // Write code here that turns the phrase above into concrete actions
    //memberRewardLevel == rewardLevel
    assertTrue(tddApp.getMemberRewardLevelForMember(userId) == rewardLevel);
}

[Buggy Hunk]
assertTrue(tddApp.getMemberRewardLevelForMember(userId) == rewardLevel);

[Patch]
assertTrue(tddApp.getMemberRewardLevelForMember(userId).equals(rewardLevel));

[Demonstration 3]

[Buggy Method]
private boolean isMatchingWildcardFilter(String buildParamValue, String reqParamValue) {
    String[] items = reqParamValue.replace("*", "").split(",");
    for (String item : items) {
        if (!buildParamValue.contains(item)) {
            return false;
        }
    }
    return true;
}

[Buggy Hunk]
String[] items = reqParamValue.replace("*", "").split(",");

[Patch]
final String[] items = reqParamValue.replace("*", "").split(",");