[Demonstration 1]

[Buggy Method]
@Override
public int hashCode() {
    return Float.valueOf(x).hashCode() ^ Float.valueOf(y).hashCode() ^ Float.valueOf(z).hashCode();
}

[Buggy Hunk]
^ Float.valueOf(z).hashCode();

[Patch]
^ Float.valueOf(z).hashCode() ^ Float.valueOf(pointarea).hashCode()^normalVector.hashCode();

[Demonstration 2]

[Buggy Method]
public static void set(String name, long v) {
    AtomicLong ref = cm.get(name);
    if (ref == null) {
        synchronized (cm) {
            ref = new AtomicLong(v);
            AtomicLong old = cm.put(name, ref);
            if (old != null) {
                ref.addAndGet(old.get());
            }
        }
    } else {
        ref.set(v);
    }
}

[Buggy Hunk]
ref.addAndGet(old.get());

[Patch]
ref.set(v);

[Demonstration 3]

[Buggy Method]
public ReferenciaWithAutoID getReferenciaCopia(ObjectId key) throws Exception {
    Iterator<ReferenciaWithAutoID> i = dao.getReferencias();
    while (i.hasNext()) {
        ReferenciaWithAutoID ref = i.next();
        if (ref.getIdEnlaceOriginal().equals(key)) {
            byte[] imagenByte = null;
            try {
                imagenByte = Files.readAllBytes(Paths.get(Config.getInstance().getProperty(Config.PATH_IMAGENES) + ref.get_id() + ".png"));
            } catch (Exception e) {
                imagenByte = Files.readAllBytes(Paths.get(Config.getInstance().getProperty(Config.PATH_IMAGENES) + "error.png"));
            }
            String imagenBase = DatatypeConverter.printBase64Binary(imagenByte);
            ref.setImagenProyecto(imagenBase);
            return ref;
        }
    }
    ReferenciaWithAutoID vacia = new ReferenciaWithAutoID();
    vacia.setAutor("vacia");
    return vacia;
}

[Buggy Hunk]
if(ref.getIdEnlaceOriginal().equals(key)){

[Patch]
if(ref.getIdEnlaceOriginal()!=null && ref.getIdEnlaceOriginal().equals(key)){