[Demonstration 1]

[Buggy Method]
@Override
@SuppressWarnings("unchecked")
public List<OfferingEntity> find(String search, DbQuery query) {
    Criteria criteria = session.createCriteria(OfferingEntity.class);
    if (hasTranslation(query, I18nOfferingEntity.class)) {
        criteria = query.addLocaleTo(criteria, I18nOfferingEntity.class);
    }
    criteria.add(Restrictions.ilike("name", "%" + search + "%"));
    return criteria.list();
}

[Buggy Hunk]
Criteria criteria = session.createCriteria(OfferingEntity.class);

[Patch]
Criteria criteria = getDefaultCriteria("offering");

[Demonstration 2]

[Buggy Method]
public static Criteria buildQuery(SearchParams params, Session session) {
    final Criteria output = session.createCriteria(Fragment.class);
    Criteria tagCrit = output.createCriteria("tags");
    output.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
    Junction rootJunction = Restrictions.conjunction();
    for (SearchParams.Keywords keywords : params.getKeywords()) {
        final int target = keywords.getTarget();
        final List<Keyword> words = keywords.getWords();
        final boolean any = keywords.isAny();
        if (target == SearchParams.TARGET_DEFAULT) {
            Junction disj = Restrictions.disjunction();
            Junction junc = buildQueryWithKeywords(words, SearchParams.TARGET_TITLE, any);
            disj.add(junc);
            junc = buildQueryWithKeywords(words, SearchParams.TARGET_TEXT, any);
            disj.add(junc);
            rootJunction.add(disj);
        } else if (target == SearchParams.TARGET_TAG) {
            Junction junc = buildQueryWithKeywords(words, target, any);
            tagCrit.add(junc);
        } else {
            Junction junc = buildQueryWithKeywords(words, target, any);
            rootJunction.add(junc);
        }
    }
    output.add(rootJunction);
    return output;
}

[Buggy Hunk]
Junction junc = buildQueryWithKeywords(words, target, any);

[Patch]
Junction junc = buildQueryWithKeywords(words, target, true);

[Demonstration 3]

[Buggy Method]
@NonNull
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    Tweet tweet = getItem(position);
    ViewHolder holder;
    if (convertView == null) {
        convertView = LayoutInflater.from(getContext()).inflate(R.layout.item_tweet, parent, false);
        holder = new ViewHolder(convertView);
        convertView.setTag(holder);
    }
    holder = (ViewHolder) convertView.getTag();
    holder.txCreatedAt.setText(Utlity.toFriendlyTimestamp(tweet.getCreated_at()));
    try {
        holder.txContent.setText(URLDecoder.decode(tweet.getText(), "utf8"));
    } catch (UnsupportedEncodingException e) {
        e.printStackTrace();
    }
    holder.txScreenName.setText(String.format("@%s", tweet.getUser().getScreen_name()));
    holder.txName.setText(tweet.getUser().getName());
    Picasso.with(getContext()).load(tweet.getUser().getProfile_image_url_https()).noFade().fit().into(holder.ivProfileImage);
    return convertView;
}

[Buggy Hunk]
holder.txCreatedAt.setText(Utlity.toFriendlyTimestamp(tweet.getCreated_at()));

[Patch]
holder.txCreatedAt.setText(Utility.toFriendlyTimestamp(tweet.getCreated_at()));