[Demonstration 1]

[Buggy Method]
@Test
public void test_const_object_literal() throws IOException {
    compile("constructor_params.js");
    assertTrue(model.hasClass("FinalClass"));
    //assertTrue(model.getClassReference("FinalClass").isFinal());
    assertTrue(model.getClassReference("FinalClass").hasMethod("bar"));
    assertTrue(model.getClassReference("FinalClass").getStaticMethod("bar").isStatic());
}

[Buggy Hunk]
assertTrue(model.getClassReference("FinalClass").hasMethod("bar"));

[Patch]
assertTrue(model.getClassReference("FinalClass").hasStaticMethod("bar"));

[Demonstration 2]

[Buggy Method]
@Test
public void testSamplingIfEvery() {
    List<IfEveryAST> ifes = new ArrayList<>();
    EveryAST ev = new EveryAST(new ConstantAST(20, DataType.INTEGER), ChronoUnit.MINUTES);
    ExpressionAST cond = new ComparisonAST(ComparisonOperation.GT, new AttributeReferenceAST("temperature", DataType.ANY), new ConstantAST(40, DataType.INTEGER));
    IfEveryAST ife = new IfEveryAST(cond, ev);
    ifes.add(ife);
    ev = new EveryAST(new ConstantAST(10, DataType.INTEGER), ChronoUnit.MINUTES);
    ife = new IfEveryAST(ConstantAST.TRUE, ev);
    ifes.add(ife);
    ParserContext ctx = new ParserContext();
    SamplingIfEveryAST sa = new SamplingIfEveryAST(ifes, RatePolicy.STRICT, RefreshAST.NEVER);
    SamplingIfEvery s = sa.compile(ctx);
    assertFalse(ctx.hasErrors());
    assertThat(s.getRatePolicy(), equalTo(RatePolicy.STRICT));
    assertThat(s.getRefresh(), equalTo(RefreshAST.NEVER));
}

[Buggy Hunk]
assertThat(s.getRefresh(), equalTo(RefreshAST.NEVER));

[Patch]
assertThat(s.getRefresh(), equalTo(Refresh.NEVER));

[Demonstration 3]

[Buggy Method]
@Test
public void shouldGenerateAReceiveFromSelectedReceiveCommodities() throws Exception {
    ReceiveActivity receiveActivity = getReceiveActivity();
    ReceiveCommodityViewModel viewModel = new ReceiveCommodityViewModel(new Commodity(PANADOL), 3, 6);
    EventBus.getDefault().post(new CommodityToggledEvent(viewModel));
    Receive receive = receiveActivity.generateReceive();
    assertThat(receive.getReceiveItems().size(), is(1));
    assertThat(receive.getReceiveItems().get(0).getCommodity().getName(), is(PANADOL));
    assertThat(receive.getSource(), is(application.getString(R.string.lga)));
}

[Buggy Hunk]
assertThat(receive.getSource(), is(application.getString(R.string.lga)));

[Patch]
assertThat(receive.getSource(), is(application.getString(R.string.others_for_receive)));