[Demonstration 1]

[Buggy Method]
protected Session getCurrentSession() {
    return this.sessionFactory.getCurrentSession();
}

[Buggy Hunk]
return this.sessionFactory.getCurrentSession();

[Patch]
return getSessionFactory().getCurrentSession();

[Demonstration 2]

[Buggy Method]
public void run() {
    //create a new transaction object
    trans = new TransID(id);
    Account acc = Bigbranch.lookUp(this.accountName);
    LockType lockt = new LockType("READ");
    //read lock account and get balance
    accountLockManager.setLock(acc, trans, lockt);
    balance = acc.getBalance();
    accountLockManager.unLock(trans);
    //write lock account and perform the transaction
    lockt = new LockType("WRITE");
    //if it's a deposit, add, if it's a withdrawl, subtract
    if (this.type == "deposit") {
        accountLockManager.setLock(acc, trans, lockt);
        acc.setBalance(balance + this.amount);
        accountLockManager.unLock(trans);
        System.out.println("TransID: " + trans.id + " deposited $" + this.amount + " into account '" + this.accountName + "'");
    } else {
        accountLockManager.setLock(acc, trans, lockt);
        acc.setBalance(balance - this.amount);
        accountLockManager.unLock(trans);
        System.out.println("TransID: " + trans.id + " withdrew $" + this.amount + " from account '" + this.accountName + "'");
    }
    //remove reference to object to delete it
    trans = null;
}

[Buggy Hunk]
trans = new TransID(id);

[Patch]
TransID trans = new TransID(id);

[Demonstration 3]

[Buggy Method]
@Override
public void onItemLongClick(Item item, ItemViewHolder itemViewHolder, int location, int columnLoc) {
    View floatView = item.newItemView2Show(RecyclerActivity.this, null);
    View itemView = itemViewHolder.getItemView();
    int[] locArr = new int[2];
    itemView.getLocationOnScreen(locArr);
    touchHelper.setOnDragListener(new OnBaseDragListener(item));
    touchHelper.startDrag(recyclerView.getChildViewHolder(itemView), floatView);
    if (item instanceof MainActivity.ItemText) {
        ((MainActivity.ItemText) item).setGravity(View.INVISIBLE);
        itemViewHolder.refreshView();
    }
    //                    List<ItemViewHolder> list = mBaseItemAdapter.getItemViewHolders();
    //                    for (ItemViewHolder viewHolder : list) {
    //                        viewHolder.getItemView().setPivotX(0f);
    //                        viewHolder.getItemView().setPivotY(0f);
    //                        viewHolder.getItemView().setScaleX(0.5f);
    //                        viewHolder.getItemView().setScaleY(0.5f);
    //                        int width = viewHolder.getItemView().getWidth();
    //                        viewHolder.getItemView().setTranslationX(-(width * viewHolder.location / 2));
    //                    }
    //                    mRecyclerView.setPivotX(0f);
    //                    mRecyclerView.setPivotY(0f);
    //                    mRecyclerView.setScaleX(0.5f);
    //                    mRecyclerView.setScaleY(0.5f);
    //                    mRecyclerView.requestLayout();
    //                    mRecyclerView.getLayoutParams().height = mRecyclerView.getLayoutParams().height * 2;
}

[Buggy Hunk]
touchHelper.startDrag(recyclerView.getChildViewHolder(itemView), floatView);

[Patch]
touchHelper.startDrag(recyclerView.getChildViewHolder(itemView));