[Demonstration 1]

[Buggy Method]
public void visit(Expression.Let node) {
    final DeclarationsHelper helper = new DeclarationsHelper(node.getDeclarations());
    final Converter child = createChild(helper.getNames());
    final List<Expression> expressions = helper.getExpressions();
    final List<Statement> statements = new ArrayList<Statement>(expressions.size());
    for (Expression expression : expressions) {
        statements.add(new Statement(child.convert(expression)));
    }
    commands.add(new Command.AllocateFrame(statements));
    node.getExpression().accept(this);
    commands.add(Command.FREE_FRAME);
}

[Buggy Hunk]
node.getExpression().accept(this);

[Patch]
commands.addAll(child.convert(node.getExpression()));

[Demonstration 2]

[Buggy Method]
public static TRSRTransformation getNodeMatrix(Animation animation, Node<?> node, int frame) {
    TRSRTransformation ret = TRSRTransformation.identity();
    Key key = null;
    if (animation != null)
        key = animation.getKeys().get(frame, node);
    else if (key == null && node.getAnimation() != null && node.getAnimation() != animation)
        key = node.getAnimation().getKeys().get(frame, node);
    if (key != null) {
        Node<?> parent = node.getParent();
        if (parent != null) {
            TRSRTransformation pm = cache.getUnchecked(Triple.<Animation, Node<?>, Integer>of(animation, node.getParent(), frame));
            ret = ret.compose(pm);
            ret = ret.compose(new TRSRTransformation(parent.getPos(), parent.getRot(), parent.getScale(), null));
        }
        ret = ret.compose(new TRSRTransformation(key.getPos(), key.getRot(), key.getScale(), null));
        Matrix4f rm = new TRSRTransformation(node.getPos(), node.getRot(), node.getScale(), null).getMatrix();
        rm.invert();
        ret = ret.compose(new TRSRTransformation(rm));
        if (parent != null) {
            rm = new TRSRTransformation(parent.getPos(), parent.getRot(), parent.getScale(), null).getMatrix();
            rm.invert();
            ret = ret.compose(new TRSRTransformation(rm));
        }
    }
    return ret;
}

[Buggy Hunk]
else if(key == null && node.getAnimation() != null && node.getAnimation() != animation) key = node.getAnimation().getKeys().get(frame, node);

[Patch]
else if(node.getAnimation() != null && node.getAnimation() != animation) key = node.getAnimation().getKeys().get(frame, node);

[Demonstration 3]

[Buggy Method]
@Test(expected = ServerServiceException.class)
public void unauthorizeOperationsUserATest() throws ServerServiceException {
    List<OWLOntologyChange> changes = new ArrayList<>();
    changes.add(new AddAxiom(ontology, axiom2));
    changes.add(new RemoveAxiom(ontology, axiom1));
    changes.add(new AddOntologyAnnotation(ontology, annotation2));
    changes.add(new RemoveOntologyAnnotation(ontology, annotation1));
    changes.add(new AddImport(ontology, importDecl2));
    changes.add(new RemoveImport(ontology, importDecl1));
    changes.add(new SetOntologyID(ontology, otherOntologyId));
    CommitBundle commits = new CommitBundleImpl(changes, headRevision);
    try {
        policyFilter.commit(tokenUserA, projectX, commits);
    } catch (ServerServiceException e) {
        OperationNotAllowedException onae = (OperationNotAllowedException) e.getCause();
        Set<Operation> unauthorizedOperations = onae.getOperations();
        assertThat(unauthorizedOperations, containsInAnyOrder(Operations.ADD_AXIOM, Operations.REMOVE_IMPORT));
        throw e;
    }
}

[Buggy Hunk]
assertThat(unauthorizedOperations, containsInAnyOrder(Operations.ADD_AXIOM, Operations.REMOVE_IMPORT));

[Patch]
assertThat(unauthorizedOperations, containsInAnyOrder(Operations.ADD_IMPORT, Operations.REMOVE_IMPORT));