Program: 113656
Project: 113656
Buggy source:
public void testCreateDelete() throws Exception {
  final String uid="String_Node_Str";
  final List<String> gids=createGIDs("String_Node_Str");
  final String volumeName="String_Node_Str";
  final UserCredentials uc=MRCClient.getCredentials(uid,gids);
  invokeSync(client.mkvol(mrcAddress,uc,volumeName,1,getDefaultStripingPolicy(),YesToAnyoneFileAccessPolicy.POLICY_ID,0));
  invokeSync(client.rmvol(mrcAddress,uc,volumeName));
  invokeSync(client.mkvol(mrcAddress,uc,volumeName,1,getDefaultStripingPolicy(),YesToAnyoneFileAccessPolicy.POLICY_ID,0));
  invokeSync(client.mkdir(mrcAddress,uc,volumeName + "String_Node_Str",0));
  invokeSync(client.mkdir(mrcAddress,uc,volumeName + "String_Node_Str",0));
  for (int i=0; i < 10; i++)   invokeSync(client.create(mrcAddress,uc,volumeName + "String_Node_Str" + i+ "String_Node_Str",0));
  try {
    invokeSync(client.create(mrcAddress,uc,volumeName,0));
    fail("String_Node_Str");
  }
 catch (  MRCException exc) {
  }
  try {
    invokeSync(client.create(mrcAddress,uc,volumeName + "String_Node_Str",0));
    fail("String_Node_Str");
  }
 catch (  MRCException exc) {
  }
  try {
    invokeSync(client.create(mrcAddress,uc,volumeName + "String_Node_Str",0));
    fail("String_Node_Str");
  }
 catch (  MRCException exc) {
  }
  DirectoryEntrySet entrySet=invokeSync(client.readdir(mrcAddress,uc,volumeName));
  assertEquals(2,entrySet.size());
  entrySet=invokeSync(client.readdir(mrcAddress,uc,volumeName + "String_Node_Str"));
  assertEquals(10,entrySet.size());
  Stat stat=invokeSync(client.getattr(mrcAddress,uc,volumeName + "String_Node_Str"));
  assertEquals(uid,stat.getUser_id());
  assertTrue("String_Node_Str",(stat.getMode() & Constants.SYSTEM_V_FCNTL_H_S_IFREG) != 0);
  assertEquals(0,stat.getSize());
  assertTrue(stat.getAtime_ns() > 0);
  assertTrue(stat.getCtime_ns() > 0);
  assertTrue(stat.getMtime_ns() > 0);
  assertTrue((stat.getMode() & 511) > 0);
  assertEquals(1,stat.getNlink());
  invokeSync(client.unlink(mrcAddress,uc,volumeName + "String_Node_Str"));
  entrySet=invokeSync(client.readdir(mrcAddress,uc,volumeName + "String_Node_Str"));
  assertEquals(9,entrySet.size());
  invokeSync(client.rmdir(mrcAddress,uc,volumeName + "String_Node_Str"));
}

Fixed version (ground truth):
public void testCreateDelete() throws Exception {
  final String uid="String_Node_Str";
  final List<String> gids=createGIDs("String_Node_Str");
  final String volumeName="String_Node_Str";
  final UserCredentials uc=MRCClient.getCredentials(uid,gids);
  invokeSync(client.mkvol(mrcAddress,uc,volumeName,1,getDefaultStripingPolicy(),POSIXFileAccessPolicy.POLICY_ID,0775));
  invokeSync(client.rmvol(mrcAddress,uc,volumeName));
  invokeSync(client.mkvol(mrcAddress,uc,volumeName,1,getDefaultStripingPolicy(),POSIXFileAccessPolicy.POLICY_ID,0775));
  invokeSync(client.mkdir(mrcAddress,uc,volumeName + "String_Node_Str",0775));
  invokeSync(client.mkdir(mrcAddress,uc,volumeName + "String_Node_Str",0775));
  for (int i=0; i < 10; i++)   invokeSync(client.create(mrcAddress,uc,volumeName + "String_Node_Str" + i+ "String_Node_Str",0775));
  try {
    invokeSync(client.create(mrcAddress,uc,volumeName,0775));
    fail("String_Node_Str");
  }
 catch (  MRCException exc) {
  }
  try {
    invokeSync(client.create(mrcAddress,uc,volumeName + "String_Node_Str",0775));
    fail("String_Node_Str");
  }
 catch (  MRCException exc) {
  }
  try {
    invokeSync(client.create(mrcAddress,uc,volumeName + "String_Node_Str",0775));
    fail("String_Node_Str");
  }
 catch (  MRCException exc) {
  }
  try {
    invokeSync(client.mkdir(mrcAddress,uc,volumeName + "String_Node_Str",0));
    fail("String_Node_Str");
  }
 catch (  MRCException exc) {
  }
  DirectoryEntrySet entrySet=invokeSync(client.readdir(mrcAddress,uc,volumeName));
  assertEquals(2,entrySet.size());
  entrySet=invokeSync(client.readdir(mrcAddress,uc,volumeName + "String_Node_Str"));
  assertEquals(10,entrySet.size());
  Stat stat=invokeSync(client.getattr(mrcAddress,uc,volumeName + "String_Node_Str"));
  assertEquals(uid,stat.getUser_id());
  assertTrue("String_Node_Str",(stat.getMode() & Constants.SYSTEM_V_FCNTL_H_S_IFREG) != 0);
  assertEquals(0,stat.getSize());
  assertTrue(stat.getAtime_ns() > 0);
  assertTrue(stat.getCtime_ns() > 0);
  assertTrue(stat.getMtime_ns() > 0);
  assertTrue((stat.getMode() & 511) > 0);
  assertEquals(1,stat.getNlink());
  invokeSync(client.unlink(mrcAddress,uc,volumeName + "String_Node_Str"));
  entrySet=invokeSync(client.readdir(mrcAddress,uc,volumeName + "String_Node_Str"));
  assertEquals(9,entrySet.size());
  invokeSync(client.rmdir(mrcAddress,uc,volumeName + "String_Node_Str"));
}