[Demonstration 1]

[Buggy Method]
@Test
public void rootArray3Test() throws JSONReaderException {
    Integer[] integers = new Integer[5];
    ObjectDeserializer.mergeFromReader(new java.io.StringReader("[ 2, 4, 6, 8, 10 ]"), integers);
    assertEquals(2, (int) integers[0]);
    assertEquals(6, (int) integers[2]);
    assertEquals(10, (int) integers[4]);
}

[Buggy Hunk]
ObjectDeserializer.mergeFromReader(new java.io.StringReader("[ 2, 4, 6, 8, 10 ]"), integers);

[Patch]
ObjectDeserializer.mergeFromReader(new StringReader("[ 2, 4, 6, 8, 10 ]"), integers);

[Demonstration 2]

[Buggy Method]
public static Boolean CompareFiles(File src, File tgt) throws IOException, InterruptedException {
    //if either file is missing, fail
    if (!src.exists() || !tgt.exists())
        return false;
    //if file sizes differ, fail
    if (FileUtils.sizeOf(src) != FileUtils.sizeOf(tgt))
        return false;
    if (FileUtils.checksumCRC32(src) != FileUtils.checksumCRC32(tgt))
        return false;
    if (SystemProperties.getInstance().getBooleanProperty("stornext.externalComparator", false))
        return FileUtils.contentEquals(src, tgt);
    try {
        StorNextScripts.ValidateExecutable(StorNextScripts.DEFAULT_COMPARE_PATH);
    } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    List<String> newcli = new ArrayList<String>();
    newcli.add(StorNextScripts.DEFAULT_VERIFY_PATH.getAbsolutePath());
    newcli.add(src.getAbsolutePath());
    newcli.add(tgt.getAbsolutePath());
    return FileHelper.System3(newcli.toArray(new String[newcli.size()]));
}

[Buggy Hunk]
if(SystemProperties.getInstance().getBooleanProperty("stornext.externalComparator", false))

[Patch]
if(!SystemProperties.getInstance().getBooleanProperty("stornext.externalComparator", false))

[Demonstration 3]

[Buggy Method]
@Test
public void test_build_with_pure_map_value() {
    Map<String, Integer> map = new HashMap<String, Integer>();
    map.put("one", 1);
    map.put("two", 2);
    holder.expose(map);
    assertEquals("{\"one\":1,\"two\":2}", holder.build());
}

[Buggy Hunk]
Map<String, Integer> map = new HashMap<String, Integer>();

[Patch]
Map<String, Integer> map = new TreeMap<String, Integer>();