[Demonstration 1]

[Buggy Method]
private <T> void updateNodeForObjectListAttribute(Class<T> objectClass, String objectAttribute, String nodeAttribute, Event event) {
    if (objectClass.isInstance(event.getObject()) && event.getAttributeChange().checkName(objectAttribute)) {
        T object = objectClass.cast(event.getObject());
        for (Node node : ((TrainDiagram) event.getSource()).getNet().getNodes()) {
            Collection<T> attribute = node.getAttributeAsCollection(nodeAttribute, objectClass);
            if (attribute.contains(object)) {
                updateNode(node);
            }
        }
    }
}

[Buggy Hunk]
if (attribute.contains(object)) {

[Patch]
if (attribute != null && attribute.contains(object)) {

[Demonstration 2]

[Buggy Method]
@Override
public TumblrPost getPost(String blogName, String id) {
    try {
        long lId = Long.parseLong(id);
        Post post = libraryInstance.blogPost(blogName, lId);
        return TumblrPostConversion.jumblrPostConversion(post);
    } catch (JumblrException | NumberFormatException | MalformedURLException e) {
        debug(e);
        throw new TumblrAPIException(e.getMessage());
    }
}

[Buggy Hunk]
return TumblrPostConversion.jumblrPostConversion(post);

[Patch]
return jumblrPostConversion(post);

[Demonstration 3]

[Buggy Method]
protected void overrideArgument(String key, boolean value) {
    getArguments().putBoolean(key, value);
}

[Buggy Hunk]
protected void overrideArgument(String key, boolean value) {

[Patch]
public void overrideArgument(String key, boolean value) {