[Demonstration 1]

[Buggy Method]
public void scoresActivity(View view) {
    Intent scoresIntent = new Intent(V_MainActivity.this, V_ScoresActivity.class);
    startActivity(scoresIntent);
}

[Buggy Hunk]
Intent scoresIntent = new Intent(V_MainActivity.this, V_ScoresActivity.class);

[Patch]
Intent scoresIntent = new Intent(V_MainActivity.this, V_ScoresActivityNew.class);

[Demonstration 2]

[Buggy Method]
private static List<IntentionSchool> recommendSchool(int admitLevel, Map<Integer, List<IntentionSchool>> recommschoolmap, Map<Integer, List<IntentionSchool>> schoolmap, int recommendCount, int maxLevel, boolean include) {
    List<IntentionSchool> list = null;
    if (include && recommschoolmap.get(admitLevel) != null) {
        list = recommschoolmap.get(admitLevel);
    } else {
        list = new Vector<IntentionSchool>();
    }
    if (list.size() < recommendCount) {
        for (int i = admitLevel + 1; i <= maxLevel; i++) {
            List<IntentionSchool> tmp = schoolmap.get(i);
            if (tmp != null) {
                Iterator<IntentionSchool> it = tmp.iterator();
                while (it.hasNext()) {
                    list.add(it.next());
                    it.remove();
                    if (list.size() == recommendCount)
                        break;
                }
            }
            if (list.size() == recommendCount)
                break;
        }
    }
    return list;
}

[Buggy Hunk]
if(tmp != null)

[Patch]
if(tmp != null && tmp.size() > 0)

[Demonstration 3]

[Buggy Method]
public static void main(String[] args) {
    sc = new Scanner(System.in);
    Vector<Vector<Integer>> result = new Vector<>();
    while (true) {
        int width = sc.nextInt();
        if (width == 0) {
            break;
        }
        Vector<Integer> input = new Vector<Integer>();
        //			int INPUT_COUNT = 0;
        while (true) {
            int value = sc.nextInt();
            int number = sc.nextInt();
            if (value == 0 && number == 0) {
                break;
            }
            for (int i = 0; i < number; i++) {
                input.addElement(value);
            }
        }
        input = Main.getResult(input, width);
        input.add(0, width);
        result.add(input);
    }
    for (Vector<Integer> temp : result) {
        print(temp);
    }
}

[Buggy Hunk]
Vector<Vector<Integer>> result = new Vector<>();

[Patch]
Vector<Vector<Integer>> result = new Vector<Vector<Integer>>();