[Demonstration 1]

[Buggy Method]
public void run() {
    while (true) {
        try {
            String[] read = reader.readLine().split(":");
            if (listener != null)
                listener.onMessageReceive(socket.getInetAddress().toString(), read[0], read.length > 1 ? "niente" : read[1]);
        } catch (IOException e) {
            // TODO Auto-generated catch block
            //e.printStackTrace();
            try {
                socket.close();
            } catch (IOException e1) {
                // TODO Auto-generated catch block
                //e1.printStackTrace();
            }
            return;
        }
    }
}

[Buggy Hunk]
listener.onMessageReceive(socket.getInetAddress().toString(), read[0], read.length > 1 ? "niente" : read[1]);

[Patch]
listener.onMessageReceive(socket.getInetAddress().toString(), read[0], read.length > 1 ? read[1] : "");

[Demonstration 2]

[Buggy Method]
private Iterable<Module> getPluginModules() {
    // using the plugin class loader allows to access Services from plugins
    final Iterator<Module> moduleIt = ServiceLoader.load(Module.class, this.pluginClassLoader).iterator();
    // Wrap modules for logging purposes
    final Iterator<Module> wrapped = new Iterator<Module>() {

        @Override
        public boolean hasNext() {
            return moduleIt.hasNext();
        }

        @Override
        public Module next() {
            final Module module = moduleIt.next();
            LOG.debug("Installing module '{}'", next());
            return module;
        }
    };
    return Iterators.iterableOf(wrapped);
}

[Buggy Hunk]
LOG.debug("Installing module '{}'", next());

[Patch]
LOG.debug("Installing module '{}'", module);

[Demonstration 3]

[Buggy Method]
@Override
public void notiClicked(String eventType, String raiserId, String raiserThumb, String eventDate, String elementId) {
    if (eventType.equals("2") || eventType.equals("4") || eventType.equals("9")) {
        // commentFragment = new CommentFragment(elementId);
        Bundle bundle = new Bundle();
        bundle.putString("postId", elementId);
        commentFragment = new CommentFragment();
        commentFragment.setArguments(bundle);
        setFragmentView(commentFragment, R.id.container1, -1, true);
    } else if (eventType.equals("5")) {
        userProfile = new UserProfile();
        userProfile.userProfile1(elementId);
        setFragmentView(userProfile, R.id.container, -1, true);
    }
}

[Buggy Hunk]
if(eventType.equals("2") || eventType.equals("4") || eventType.equals("9")){

[Patch]
if(eventType.equals("2") || eventType.equals("4") || eventType.equals("9") || eventType.equals("12")){