[Demonstration 1]

[Buggy Method]
public Map<String, Object> getPropertiesForLocation(String pid, String location) throws IOException {
    if (pid == null || pid.length() < 1) {
        throw new IOException("Argument pid cannot be null or empty");
    }
    Map<String, Object> propertiesTable = new HashMap<String, Object>();
    Configuration config = configurationAdmin.getConfiguration(pid, location);
    Dictionary<String, Object> properties = config.getProperties();
    if (properties != null) {
        Enumeration<String> keys = properties.keys();
        while (keys.hasMoreElements()) {
            String key = keys.nextElement();
            propertiesTable.put(key, properties.get(key));
        }
    }
    return propertiesTable;
}

[Buggy Hunk]
Map<String, Object> propertiesTable = new HashMap<String, Object>();

[Patch]
Map<String, Object> propertiesTable = new HashMap<>();

[Demonstration 2]

[Buggy Method]
public static boolean isVideoFile(File file) {
    String name = file.getName().toLowerCase();
    return file.isFile() && Arrays.asList(VIDEO_FILE_TYPE).contains(name.substring(name.lastIndexOf('.') + 1));
}

[Buggy Hunk]
String name = file.getName().toLowerCase();

[Patch]
String name = file.getName().toLowerCase(Locale.getDefault());

[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>>();