Program: 100787
Project: 100787
Buggy source:
@Test public void testFileContentParallel() throws Exception {
  final File e=new File(expDir,"String_Node_Str");
  assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str")),readLines(new File(e,"String_Node_Str")));
  assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")),readLines(new File(e,"String_Node_Str")));
  assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")),readLines(new File(e,"String_Node_Str")));
  assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str")),readLines(new File(e,"String_Node_Str")));
  assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str")),readLines(new File(e,"String_Node_Str")));
  assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str")),readLines(new File(e,"String_Node_Str")));
  final Properties ditaProps=readProperties(new File(tempDirParallel,FILE_NAME_DITA_LIST));
  assertEquals("String_Node_Str" + File.separator,ditaProps.getProperty("String_Node_Str"));
  final DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
  final DocumentBuilder builder=factory.newDocumentBuilder();
  final Document document=builder.parse(new File(tempDirParallel + File.separator + KEYDEF_LIST_FILE));
  final Element elem=document.getDocumentElement();
  final NodeList nodeList=elem.getElementsByTagName("String_Node_Str");
  final Map<String,List<String>> expKeyDef=new HashMap<String,List<String>>();
  expKeyDef.put("String_Node_Str",Arrays.asList("String_Node_Str","String_Node_Str" + UNIX_SEPARATOR + "String_Node_Str","String_Node_Str" + UNIX_SEPARATOR + "String_Node_Str"));
  expKeyDef.put("String_Node_Str",Arrays.asList("String_Node_Str","String_Node_Str" + UNIX_SEPARATOR + "String_Node_Str","String_Node_Str" + UNIX_SEPARATOR + "String_Node_Str"));
  expKeyDef.put("String_Node_Str",Arrays.asList("String_Node_Str","String_Node_Str" + UNIX_SEPARATOR + "String_Node_Str","String_Node_Str" + UNIX_SEPARATOR + "String_Node_Str"));
  expKeyDef.put("String_Node_Str",Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str" + UNIX_SEPARATOR + "String_Node_Str"));
  for (int i=0; i < nodeList.getLength(); i++) {
    final Element el=(Element)nodeList.item(i);
    final List<String> exp=expKeyDef.get(el.getAttribute("String_Node_Str"));
    assertEquals(exp.get(0),el.getAttribute("String_Node_Str"));
    assertEquals(exp.get(1),el.getAttribute("String_Node_Str"));
    assertEquals(exp.get(2),el.getAttribute("String_Node_Str"));
  }
}

Fixed version (ground truth):
@Test public void testFileContentParallel() throws Exception {
  final File e=new File(expDir,"String_Node_Str");
  assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str")),readLines(new File(e,"String_Node_Str")));
  assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")),readLines(new File(e,"String_Node_Str")));
  assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")),readLines(new File(e,"String_Node_Str")));
  assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str")),readLines(new File(e,"String_Node_Str")));
  assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str")),readLines(new File(e,"String_Node_Str")));
  assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(Collections.emptySet(),readLines(new File(e,"String_Node_Str")));
  assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str")),readLines(new File(e,"String_Node_Str")));
  final Properties ditaProps=readProperties(new File(tempDirParallel,FILE_NAME_DITA_LIST));
  assertEquals("String_Node_Str" + File.separator,ditaProps.getProperty("String_Node_Str"));
  final DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
  final DocumentBuilder builder=factory.newDocumentBuilder();
  final Document document=builder.parse(new File(tempDirParallel + File.separator + KEYDEF_LIST_FILE));
  final Element elem=document.getDocumentElement();
  final NodeList nodeList=elem.getElementsByTagName("String_Node_Str");
  final Map<String,List<String>> expKeyDef=new HashMap<String,List<String>>();
  expKeyDef.put("String_Node_Str",Arrays.asList("String_Node_Str","String_Node_Str" + URI_SEPARATOR + "String_Node_Str","String_Node_Str" + URI_SEPARATOR + "String_Node_Str"));
  expKeyDef.put("String_Node_Str",Arrays.asList("String_Node_Str","String_Node_Str" + URI_SEPARATOR + "String_Node_Str","String_Node_Str" + URI_SEPARATOR + "String_Node_Str"));
  expKeyDef.put("String_Node_Str",Arrays.asList("String_Node_Str","String_Node_Str" + URI_SEPARATOR + "String_Node_Str","String_Node_Str" + URI_SEPARATOR + "String_Node_Str"));
  expKeyDef.put("String_Node_Str",Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str" + URI_SEPARATOR + "String_Node_Str"));
  for (int i=0; i < nodeList.getLength(); i++) {
    final Element el=(Element)nodeList.item(i);
    final List<String> exp=expKeyDef.get(el.getAttribute("String_Node_Str"));
    assertEquals(exp.get(0),el.getAttribute("String_Node_Str"));
    assertEquals(exp.get(1),el.getAttribute("String_Node_Str"));
    assertEquals(exp.get(2),el.getAttribute("String_Node_Str"));
  }
}