Program: 53069
Project: 53069
Buggy source:
@Test public void TestCategory() throws ClassNotFoundException, IOException, SQLException, DaoException {
  Class.forName("String_Node_Str");
  File tmpDir=File.createTempFile("String_Node_Str",null);
  tmpDir.delete();
  tmpDir.deleteOnExit();
  tmpDir.mkdirs();
  BoneCPDataSource ds=new BoneCPDataSource();
  ds.setJdbcUrl("String_Node_Str" + new File(tmpDir,"String_Node_Str").getAbsolutePath());
  ds.setUsername("String_Node_Str");
  ds.setPassword("String_Node_Str");
  Multimap<Language,LocalCategory> map=HashMultimap.create();
  LocalCategorySqlDao localDao=new LocalCategorySqlDao(ds);
  localDao.beginLoad();
  for (  Language language : Language.LANGUAGES) {
    LocalCategory temp=new LocalCategory(language,language.hashCode(),new Title(language.getEnLangName(),LanguageInfo.getByLanguage(language)));
    map.put(language,temp);
    localDao.save(temp);
  }
  localDao.endLoad();
  UniversalPage page=new UniversalCategory(23,0,map);
  UniversalCategorySqlDao dao=new UniversalCategorySqlDao(ds);
  dao.beginLoad();
  dao.save(page);
  dao.endLoad();
  UniversalPage savedPage=dao.getById(23,0);
  assert(savedPage != null);
  assert(page.equals(savedPage));
  assert(page.getNumberOfPages() == savedPage.getNumberOfPages());
  assert(page.getLanguageSetOfExistsInLangs().equals(savedPage.getLanguageSetOfExistsInLangs()));
  assert(page.getClarity() == savedPage.getClarity());
  List<Integer> pageIds=new ArrayList<Integer>();
  pageIds.add(23);
  Map<Integer,UniversalCategory> pages=dao.getByIds(pageIds,0);
  assert(pages.size() == 1);
  assert(pages.get(23).equals(page));
  assert(pages.get(23).equals(savedPage));
}

Fixed version (ground truth):
@Test public void TestCategory() throws ClassNotFoundException, IOException, SQLException, DaoException {
  Class.forName("String_Node_Str");
  File tmpDir=File.createTempFile("String_Node_Str",null);
  tmpDir.delete();
  tmpDir.deleteOnExit();
  tmpDir.mkdirs();
  BoneCPDataSource ds=new BoneCPDataSource();
  ds.setJdbcUrl("String_Node_Str" + new File(tmpDir,"String_Node_Str").getAbsolutePath());
  ds.setUsername("String_Node_Str");
  ds.setPassword("String_Node_Str");
  Multimap<Language,LocalCategory> map=HashMultimap.create();
  LocalCategorySqlDao localDao=new LocalCategorySqlDao(ds);
  localDao.beginLoad();
  for (  Language language : Language.LANGUAGES) {
    LocalCategory temp=new LocalCategory(language,language.hashCode(),new Title(language.getEnLangName(),LanguageInfo.getByLanguage(language)));
    map.put(language,temp);
    localDao.save(temp);
  }
  localDao.endLoad();
  UniversalPage page=new UniversalCategory(23,0,map);
  UniversalCategorySqlDao dao=new UniversalCategorySqlDao(ds,new LocalCategorySqlDao(ds));
  dao.beginLoad();
  dao.save(page);
  dao.endLoad();
  UniversalPage savedPage=dao.getById(23,0);
  assert(savedPage != null);
  assert(page.equals(savedPage));
  assert(page.getNumberOfPages() == savedPage.getNumberOfPages());
  assert(page.getLanguageSetOfExistsInLangs().equals(savedPage.getLanguageSetOfExistsInLangs()));
  assert(page.getClarity() == savedPage.getClarity());
  List<Integer> pageIds=new ArrayList<Integer>();
  pageIds.add(23);
  Map<Integer,UniversalCategory> pages=dao.getByIds(pageIds,0);
  assert(pages.size() == 1);
  assert(pages.get(23).equals(page));
  assert(pages.get(23).equals(savedPage));
}