[Demonstration 1]

[Buggy Method]
@Override
protected void onPostExecute(Places[] places) {
    Marker marker;
    for (Places place : places) {
        if (containsPlace(place, foodDrink)) {
            marker = addMarkerToMap(place, BitmapDescriptorFactory.HUE_VIOLET);
            foodDrinkMarkers.add(marker);
        } else if (containsPlace(place, entertainment)) {
            marker = addMarkerToMap(place, BitmapDescriptorFactory.HUE_GREEN);
            entertainmentMarkers.add(marker);
        } else if (containsPlace(place, shopping)) {
            marker = addMarkerToMap(place, BitmapDescriptorFactory.HUE_MAGENTA);
            shoppingMarkers.add(marker);
        } else if (containsPlace(place, healthBeauty)) {
            marker = addMarkerToMap(place, BitmapDescriptorFactory.HUE_CYAN);
            healthBeautyMarkers.add(marker);
        } else if (containsPlace(place, services)) {
            marker = addMarkerToMap(place, BitmapDescriptorFactory.HUE_AZURE);
            servicesMarkers.add(marker);
        } else {
            marker = addMarkerToMap(place, BitmapDescriptorFactory.HUE_ORANGE);
            otherMarkers.add(marker);
        }
    }
    googleMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {

        @Override
        public boolean onMarkerClick(Marker marker) {
            if (pArray != null) {
                for (Places place : pArray) {
                    if (marker.getTitle().equals(place.getName())) {
                        setCurrentPlace(place);
                    }
                }
            }
            return false;
        }
    });
}

[Buggy Hunk]
if(pArray != null) {

[Patch]
if(pArray != null && marker.getTitle() != null) {

[Demonstration 2]

[Buggy Method]
@Override
protected void internalDone(Object caller, IStatus status) {
    if (status != null && Platform.inDebugMode()) {
        Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
    }
}

[Buggy Hunk]
if (status != null && Platform.inDebugMode()) {

[Patch]
if (status != null && !status.isOK() && Platform.inDebugMode()) {

[Demonstration 3]

[Buggy Method]
@Override
protected JTextField makeTechnologyComponent() {
    JTextField textField = null;
    if (getWidget().isPasswd()) {
        textField = new JPasswordField() {

            @Override
            public Dimension getMinimumSize() {
                return MINIMUM_SIZE;
            }
        };
    } else {
        textField = new JTextField() {

            @Override
            public Dimension getMinimumSize() {
                return MINIMUM_SIZE;
            }
        };
    }
    textField.getDocument().addDocumentListener(new DocumentListener() {

        @Override
        public void changedUpdate(DocumentEvent e) {
            if (!validateOnReturn && !isUpdating()) {
                textChanged();
                // updateModelFromWidget();
            }
        }

        @Override
        public void insertUpdate(DocumentEvent e) {
            GinaStackEvent stack = null;
            try {
                stack = GENotifier.raise(FIBEventFactory.getInstance().createTextEvent(FIBTextEventDescription.INSERTED, e.getOffset(), e.getLength(), e.getDocument().getText(e.getOffset(), e.getLength()), getTechnologyComponent().getText()));
            } catch (BadLocationException e2) {
                e2.printStackTrace();
            }
            if (!validateOnReturn && !isUpdating()) {
                try {
                    if (ToolBox.getPLATFORM() == ToolBox.MACOS) {
                        if (e.getLength() == 1) {
                            char c = getTechnologyComponent().getText().charAt(e.getOffset());
                            if (c == '´' || c == 'ˆ' || c == '˜' || c == '`' || c == '¨') {
                                if (stack != null)
                                    stack.end();
                                return;
                            }
                        }
                    }
                } catch (RuntimeException e1) {
                    e1.printStackTrace();
                }
                textChanged();
                // updateModelFromWidget();
            }
            if (stack != null)
                stack.end();
        }

        @Override
        public void removeUpdate(DocumentEvent e) {
            GinaStackEvent stack = GENotifier.raise(FIBEventFactory.getInstance().createTextEvent(FIBTextEventDescription.REMOVED, e.getOffset(), e.getLength(), "", getValue()));
            if (!validateOnReturn && !isUpdating()) {
                textChanged();
                // updateModelFromWidget();
            }
            stack.end();
        }
    });
    textField.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            textChanged();
            // updateModelFromWidget();
            final Window w = SwingUtilities.windowForComponent(getTechnologyComponent());
            if (w instanceof JDialog) {
                if (((JDialog) w).getRootPane().getDefaultButton() != null) {
                    SwingUtilities.invokeLater(new Runnable() {

                        @Override
                        public void run() {
                            // TODO Auto-generated method stub
                            ((JDialog) w).getRootPane().getDefaultButton().doClick();
                        }
                    });
                }
            }
        }
    });
    textField.addFocusListener(this);
    textField.setEnabled(true);
    return textField;
}

[Buggy Hunk]
if (!validateOnReturn && !isUpdating()) {

[Patch]
if (!validateOnReturn && !isUpdating() && !widgetUpdating()) {