[Demonstration 1]

[Buggy Method]
public void setLastStep(int u, int v) {
    int color = graph[u][v];
    steps.push(new int[] { u, v, color });
    if (colors.length - 1 == color) {
        colors = Arrays.copyOf(colors, colors.length * 2);
    }
    colors[color - 1]++;
    this.setChanged();
    this.notifyObservers();
}

[Buggy Hunk]
steps.push(new int[]{u,v,color});

[Patch]
steps.push(new int[]{u,v});

[Demonstration 2]

[Buggy Method]
@Override
public Object getAdapter(Object element, Class key) {
    JavaScriptUnit node = getJSBuildFileNode(element);
    if (node == null) {
        return null;
    }
    if (IResource.class.equals(key)) {
        return getResource(node);
    }
    return null;
}

[Buggy Hunk]
JavaScriptUnit node = getJSBuildFileNode(element);

[Patch]
ITask node = getJSBuildFileNode(element);

[Demonstration 3]

[Buggy Method]
public void onBindViewHolder(ViewHolder holder, int position) {
    final int index = position;
    // - get element from your dataset at this position
    // - replace the contents of the view with that element
    Random r = new Random();
    Resources res = mContext.getResources();
    String[] colors = res.getStringArray(R.array.user_colors_array);
    final Track track = mDataset.get(index);
    final int trackId = track.id;
    final int bpm = track.bpm;
    String username = track.User.name;
    holder.title.setText(track.title.substring(0, 1).toUpperCase() + track.title.substring(1));
    holder.owner.setText(username);
    holder.mLoopButton.setText(username.substring(0, 1).toUpperCase(), 60f, Color.WHITE);
    holder.mLoopButton.setColor(Color.parseColor(colors[r.nextInt(colors.length)]));
    String date = mDataset.get(index).createdAt;
    Date formatted = null;
    try {
        formatted = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").parse(date.replaceAll("Z$", "+0000"));
    } catch (ParseException e) {
        e.printStackTrace();
    }
    SimpleDateFormat outputFormatter = new SimpleDateFormat("MMM d, h:mm a");
    holder.timeStamp.setText(outputFormatter.format(formatted));
    holder.city.setText(track.city);
    holder.mContainer.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Intent loopIntent = new Intent(mContext, LoopActivity.class);
            loopIntent.putExtra("trackId", trackId);
            loopIntent.putExtra("BPM", bpm);
            loopIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            mContext.startActivity(loopIntent);
        }
    });
}

[Buggy Hunk]
holder.mLoopButton.setColor(Color.parseColor(colors[r.nextInt(colors.length)]));

[Patch]
holder.mLoopButton.setColor(Color.parseColor(colors[username.length() % colors.length]));