[Demonstration 1]

[Buggy Method]
@Path("/validatecollaborativecontent/{idAnnotatedCollaborativeContentAnalysis:\\d+}/status")
@GET
public String getStatusCollaborativeContentVerifications(@PathParam("idAnnotatedCollaborativeContentAnalysis") String contentID) throws LpRestException {
    try {
        if (map.containsKey(Integer.valueOf(contentID))) {
            List<AbstractAnalysisClass> listanalysisInterface = map.get(Integer.valueOf(contentID));
            Integer progress = getProgress(listanalysisInterface);
            if (progress > 99)
                return "OK";
            else
                return "InProgess_" + progress + "%";
        }
        log.error("Element not found");
        return "ERROR";
    } catch (Exception e) {
        log.fatal("Fatal " + e.getMessage());
        return "FATAL ERROR";
    }
}

[Buggy Hunk]
log.error("Element not found");

[Patch]
log.error("Element not found: "+contentID+" map:"+map.keySet().toString());

[Demonstration 2]

[Buggy Method]
@Override
public void onClick(View v) {
    todoIOnClickToEditListener.onClickToEditListener(todo, position);
}

[Buggy Hunk]
todoIOnClickToEditListener.onClickToEditListener(todo, position);

[Patch]
todoIOnClickToEditListener.onClickToEditListener(todo, holder.getAdapterPosition());

[Demonstration 3]

[Buggy Method]
public E toEntity(M object) {
    boolean alreadySetted = false;
    try {
        E entityObject = entityClass.newInstance();
        for (String getter : modelMapper.keySet()) {
            try {
                Method getterModelMethod = modelClass.getMethod(getter);
                Method getterEntityMethod = entityClass.getMethod(getter);
                String modelName = null;
                Class modelReturnClass = getterModelMethod.getReturnType();
                if (Collection.class.isAssignableFrom(modelReturnClass)) {
                    Type typeGeneric = getterModelMethod.getGenericReturnType();
                    if (typeGeneric instanceof ParameterizedType) {
                        ParameterizedType paramType = (ParameterizedType) typeGeneric;
                        Type[] argTypes = paramType.getActualTypeArguments();
                        if (argTypes.length > 0) {
                            modelName = cleanTypeName(argTypes[0].toString());
                        }
                    }
                } else if (ModelData.class.isAssignableFrom(modelReturnClass)) {
                    modelName = modelReturnClass.getName();
                }
                if (modelName != null) {
                    try {
                        Class dumpedClass = Class.forName(modelName);
                        MapperComponent mapperComponent = getMapperComponentFromName(mapperNameFromModelName(dumpedClass.getName()));
                        if (mapperComponent != null) {
                            Method setterEntityMethod = entityClass.getMethod(modelMapper.get(getter), modelReturnClass);
                            Method mapperToEntityMethod = null;
                            try {
                                mapperToEntityMethod = mapperComponent.mapper.getClass().getMethod("toEntity", modelReturnClass);
                            } catch (NoSuchMethodException e) {
                                if (isDebug) {
                                    Log.e(LOG_TAG, e.getMessage());
                                    e.printStackTrace();
                                }
                            }
                            if (mapperToEntityMethod != null) {
                                try {
                                    Object modelValue = getterModelMethod.invoke(object);
                                    Object value = mapperToEntityMethod.invoke(mapperComponent.mapper, modelValue);
                                    setterEntityMethod.invoke(entityObject, value);
                                    alreadySetted = true;
                                } catch (IllegalArgumentException e) {
                                    if (isDebug) {
                                        Log.e(LOG_TAG, e.getMessage());
                                        e.printStackTrace();
                                    }
                                } catch (IllegalAccessException e) {
                                    if (isDebug) {
                                        Log.e(LOG_TAG, e.getMessage());
                                        e.printStackTrace();
                                    }
                                } catch (InvocationTargetException e) {
                                    if (isDebug) {
                                        Log.e(LOG_TAG, e.getMessage());
                                        e.printStackTrace();
                                    }
                                }
                            }
                        }
                    } catch (ClassNotFoundException cle) {
                        if (isDebug) {
                            Log.e(LOG_TAG, cle.getMessage());
                            cle.printStackTrace();
                        }
                    } catch (NoSuchMethodException e) {
                        if (isDebug) {
                            Log.e(LOG_TAG, e.getMessage());
                            e.printStackTrace();
                        }
                    }
                }
                if (!alreadySetted) {
                    Method setterEntityMethod = null;
                    try {
                        setterEntityMethod = entityClass.getMethod(modelMapper.get(getter), getterEntityMethod.getReturnType());
                    } catch (NoSuchMethodException nsme) {
                        if (entityClass.getSuperclass() != null) {
                            setterEntityMethod = entityClass.getSuperclass().getMethod(modelMapper.get(getter), getterEntityMethod.getReturnType());
                        }
                    }
                    if (setterEntityMethod != null) {
                        try {
                            setterEntityMethod.invoke(entityObject, getterModelMethod.invoke(object));
                        } catch (IllegalArgumentException e) {
                            if (isDebug) {
                                Log.e(LOG_TAG, e.getMessage());
                                e.printStackTrace();
                            }
                        } catch (IllegalAccessException e) {
                            if (isDebug) {
                                Log.e(LOG_TAG, e.getMessage());
                                e.printStackTrace();
                            }
                        } catch (InvocationTargetException e) {
                            if (isDebug) {
                                Log.e(LOG_TAG, e.getMessage());
                                e.printStackTrace();
                            }
                        }
                    }
                }
            } catch (SecurityException e) {
                if (isDebug) {
                    Log.e(LOG_TAG, e.getMessage());
                    e.printStackTrace();
                }
            } catch (NoSuchMethodException e) {
                if (isDebug) {
                    Log.e(LOG_TAG, e.getMessage());
                    e.printStackTrace();
                }
            }
        }
        return entityObject;
    } catch (IllegalAccessException iae) {
        if (isDebug) {
            Log.e(LOG_TAG, iae.getMessage());
            iae.printStackTrace();
        }
        return null;
    } catch (InstantiationException ie) {
        if (isDebug) {
            Log.e(LOG_TAG, ie.getMessage());
            ie.printStackTrace();
        }
        return null;
    }
}

[Buggy Hunk]
Method setterEntityMethod = entityClass.getMethod(modelMapper.get(getter), modelReturnClass);

[Patch]
Method setterEntityMethod = entityClass.getMethod(modelMapper.get(getter), entityClass);