Program: 4148
Project: 4148
Buggy source:
/** 
 * Tests whether the FileManager.isSensitiveDirectory(File) function is functioning properly. 
 */
public void testSensitiveDirectoryPredicate() throws Exception {
  File file=null;
  assertFalse("String_Node_Str",FileManager.isSensitiveDirectory(file));
  file=new File("String_Node_Str");
  assertFalse("String_Node_Str",FileManager.isSensitiveDirectory(file));
  String userHome=System.getProperty("String_Node_Str");
  assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(userHome)));
  String realOS=System.getProperty("String_Node_Str");
  try {
    setOSName("String_Node_Str");
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(userHome,"String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(userHome,"String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    setOSName("String_Node_Str");
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    setOSName("String_Node_Str");
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
  }
  finally {
    setOSName(realOS);
  }
}

Fixed version (ground truth):
/** 
 * Tests whether the FileManager.isSensitiveDirectory(File) function is functioning properly. 
 */
public void testSensitiveDirectoryPredicate() throws Exception {
  File file=null;
  assertFalse("String_Node_Str",FileManager.isSensitiveDirectory(file));
  file=new File("String_Node_Str");
  assertFalse("String_Node_Str",FileManager.isSensitiveDirectory(file));
  String userHome=System.getProperty("String_Node_Str");
  assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(userHome)));
  String realOS=System.getProperty("String_Node_Str");
  try {
    setOSName("String_Node_Str");
    assertTrue(OSUtils.isWindowsXP());
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    setOSName("String_Node_Str");
    assertTrue(OSUtils.isWindowsNT());
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertFalse("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertFalse("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    setOSName("String_Node_Str");
    assertTrue(OSUtils.isWindowsVista());
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(userHome + File.separator + "String_Node_Str")));
    assertFalse("String_Node_Str",FileManager.isSensitiveDirectory(new File("String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    setOSName("String_Node_Str");
    assertTrue(OSUtils.isWindows95());
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(userHome + File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(userHome + File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    setOSName("String_Node_Str");
    assertTrue(OSUtils.isWindows98());
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(userHome + File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    setOSName("String_Node_Str");
    assertTrue(OSUtils.isWindowsMe());
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(userHome + File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    setOSName("String_Node_Str");
    assertTrue(OSUtils.isMacOSX());
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    setOSName("String_Node_Str");
    assertTrue(OSUtils.isLinux());
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
    assertTrue("String_Node_Str",FileManager.isSensitiveDirectory(new File(File.separator + "String_Node_Str")));
  }
  finally {
    setOSName(realOS);
  }
}