[Demonstration 1]

[Buggy Method]
@Override
public boolean equals(final Object obj) {
    if (obj == null)
        return false;
    if (this == obj)
        return true;
    if (!getClass().equals(obj))
        return false;
    final Point<?> other = (Point<?>) obj;
    return _x.equals(other._x) && _y.equals(other._y);
}

[Buggy Hunk]
if (!getClass().equals(obj)) return false;

[Patch]
if (!getClass().equals(obj.getClass())) return false;

[Demonstration 2]

[Buggy Method]
public void resetPosition() {
    super.setLocation(originalLocaion);
}

[Buggy Hunk]
super.setLocation(originalLocaion);

[Patch]
super.setLocation(originalLoctaion);

[Demonstration 3]

[Buggy Method]
@Override
public boolean onScale(ScaleGestureDetector detector) {
    // Don't scale if the change is less than 2%
    if (Math.abs(detector.getScaleFactor() - 1) < 0.02)
        return false;
    // Calculate focus point in pixels without padding
    double focusX = detector.getFocusX() - PIXELS_LEFT_PADDING;
    double focusY = detector.getFocusY() - PIXELS_TOP_PADDING;
    // Calculate focus point relative to size of displayed diagram
    focusX /= getWidth() - PIXELS_RIGHT_PADDING - PIXELS_LEFT_PADDING;
    focusY /= getHeight() - PIXELS_TOP_PADDING - PIXELS_BOTTOM_PADDING;
    // Calculate focus point in displayed units
    focusX = DiagramView.this.min.real + focusX * (DiagramView.this.max.real - DiagramView.this.min.real);
    focusY = DiagramView.this.min.imaginary + focusY * (DiagramView.this.max.imaginary - DiagramView.this.min.imaginary);
    DiagramView.this.zoom(detector.getScaleFactor(), new Complex64F(focusX, focusY));
    return true;
}

[Buggy Hunk]
DiagramView.this.zoom(detector.getScaleFactor(), new Complex64F(focusX, focusY));

[Patch]
DiagramView.this.zoom(1/detector.getScaleFactor(), new Complex64F(focusX, focusY));