Program: 61378
Project: 61378
Buggy source:
/** 
 * <em>WARNING</em>: this method connects to the database by mean of the  underlying Spring's datasource, not using the provided one, to be fetched via JNDI. This in order to avoid potential conflicts and problems with DbUnit.
 * @param sce
 */
@Override public void contextInitialized(ServletContextEvent sce){
  ConfigurableApplicationContext context=ApplicationContextManager.getApplicationContext();
  DefaultListableBeanFactory beanFactory=(DefaultListableBeanFactory)context.getBeanFactory();
  ConnectorInstanceDAO connectorInstanceDAO=(ConnectorInstanceDAO)context.getBean("String_Node_Str");
  SyncopeConfigurationDAO syncopeConfigurationDAO=(SyncopeConfigurationDAO)context.getBean("String_Node_Str");
  SyncopeConfiguration syncopeConfiguration=syncopeConfigurationDAO.find("String_Node_Str");
  List<ConnectorInstance> instances=connectorInstanceDAO.findAll();
  Set<PropertyTO> properties=null;
  for (  ConnectorInstance instance : instances) {
    try {
      properties=(Set<PropertyTO>)ConnectorInstanceDataBinder.buildFromXML(instance.getXmlConfiguration());
      ConnectorInfoManager manager=ConnectorInstanceController.getConnectorManager(syncopeConfiguration.getConfValue());
      ConnectorFacade connector=ConnectorInstanceController.getConnectorFacade(manager,instance.getBundleName(),instance.getVersion(),instance.getConnectorName(),properties);
      beanFactory.registerSingleton(instance.getId().toString(),connector);
      if (log.isInfoEnabled()) {
        log.info("String_Node_Str" + instance.getId().toString());
      }
    }
 catch (    Throwable t) {
      log.error("String_Node_Str",t);
    }
  }
}

Fixed version (ground truth):
/** 
 * <em>WARNING</em>: this method connects to the database by mean of the  underlying Spring's datasource, not using the provided one, to be fetched via JNDI. This in order to avoid potential conflicts and problems with DbUnit.
 * @param sce
 */
@Override public void contextInitialized(ServletContextEvent sce){
  ConfigurableApplicationContext context=ApplicationContextManager.getApplicationContext();
  DefaultListableBeanFactory beanFactory=(DefaultListableBeanFactory)context.getBeanFactory();
  ConnectorInstanceDAO connectorInstanceDAO=(ConnectorInstanceDAO)context.getBean("String_Node_Str");
  SyncopeConfigurationDAO syncopeConfigurationDAO=(SyncopeConfigurationDAO)context.getBean("String_Node_Str");
  SyncopeConfiguration syncopeConfiguration=syncopeConfigurationDAO.find("String_Node_Str");
  List<ConnectorInstance> instances=connectorInstanceDAO.findAll();
  Set<PropertyTO> properties=null;
  for (  ConnectorInstance instance : instances) {
    try {
      properties=(Set<PropertyTO>)ConnectorInstanceDataBinder.buildFromXML(instance.getXmlConfiguration());
      ConnectorInfoManager manager=ConnectorInstanceController.getConnectorManager(syncopeConfiguration.getConfValue());
      ConnectorFacade connector=ConnectorInstanceController.getConnectorFacade(manager,instance.getBundleName(),instance.getVersion(),instance.getConnectorName(),properties);
      if (log.isInfoEnabled()) {
        log.info("String_Node_Str" + connector);
      }
      beanFactory.registerSingleton(instance.getId().toString(),connector);
      if (log.isInfoEnabled()) {
        log.info("String_Node_Str" + instance.getId().toString());
      }
    }
 catch (    Throwable t) {
      log.error("String_Node_Str",t);
    }
  }
}