<commit_before><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd">

<!-- 
  <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="ignoreResourceNotFound" value="true" />
    <property name="properties" >
      <props>
        <prop key="opennms.etc" >${opennms.home}/etc</prop>
      </props>
    </property>
    <property name="locations">
      <list>
        <value>file:${opennms.home}/etc/opennms.properties</value>
        <value>classpath:opennms-test.properties</value>
      </list>
    </property>
  </bean>
-->      
   <bean id="propertyPlaceholderConfigure" class="org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer">
     <property name="properties">
       <props>
         <prop key="test.overridden.properties">NOT_FOUND</prop>
       </props>
     </property>
     <!--  set this so properties can be overridden by setting the system property -->
     <property name="systemPropertiesModeName" value="override" />
   </bean>
   <bean id="overridePropertiesForTesting" class="org.springframework.beans.factory.config.PropertyOverrideConfigurer">
     <property name="ignoreResourceNotFound" value="true" />
     <property name="location" value="${test.overridden.properties}" />
   </bean>
  
	<bean id="init-datasource-factory" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
		<property name="staticMethod"><value>org.opennms.netmgt.config.DataSourceFactory.init</value></property>
	</bean>

	<bean id="dataSource" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean" depends-on="init-datasource-factory">
		<property name="staticMethod"><value>org.opennms.netmgt.config.DataSourceFactory.getInstance</value></property>
	</bean>
	
	<bean id="timeKeeper" class="org.opennms.core.utils.DefaultTimeKeeper" />
	
	<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
		<property name="dataSource">
			<ref bean="dataSource" />
		</property>
		<property name="annotatedClasses">
			<list>
				<value>org.opennms.netmgt.model.OnmsDistPoller</value>
				<value>org.opennms.netmgt.model.OnmsAssetRecord</value>
				<value>org.opennms.netmgt.model.OnmsNode</value>
				<value>org.opennms.netmgt.model.OnmsIpInterface</value>
				<value>org.opennms.netmgt.model.OnmsSnmpInterface</value>
				<value>org.opennms.netmgt.model.OnmsMonitoredService</value>
				<value>org.opennms.netmgt.model.OnmsCategory</value>
				<value>org.opennms.netmgt.model.OnmsServiceType</value>
				<value>org.opennms.netmgt.model.OnmsOutage</value>
	        	<value>org.opennms.netmgt.model.OnmsEvent</value>
        	    <value>org.opennms.netmgt.model.OnmsAlarm</value>
                <value>org.opennms.netmgt.model.OnmsNotification</value>
                <value>org.opennms.netmgt.model.OnmsUserNotification</value>
				<value>org.opennms.netmgt.model.OnmsLocationMonitor</value>
                <value>org.opennms.netmgt.model.OnmsLocationSpecificStatus</value>
                <value>org.opennms.netmgt.model.PollStatus</value>
			</list>
		</property>
		<!--  property name="schemaUpdate" value="true">
		</property -->
		<property name="annotatedPackages">
			<list>
				<value>org.opennms.netmgt.model</value>
			</list>
		</property>
		<property name="hibernateProperties">
			<value>
				hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
		        hibernate.cache.use_second_level_cache=false
        		hibernate.cache=false
        		hibernate.cache.use_query_cache=false
        		hibernate.jdbc.batch_size=0	
				<!-- hibernate.format_sql=true -->
        	</value>
		</property>
	</bean>

  <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
    <property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <bean id="transactionTemplate" class="org.springframework.transaction.support.TransactionTemplate">
    <property name="transactionManager" ref="transactionManager" />
  </bean>
	
  <bean id="alarmDao" class="org.opennms.netmgt.dao.hibernate.AlarmDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <bean id="assetRecordDao" class="org.opennms.netmgt.dao.hibernate.AssetRecordDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
  
  <bean id="categoryDao" class="org.opennms.netmgt.dao.hibernate.CategoryDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>

	<bean id="distPollerDao" class="org.opennms.netmgt.dao.hibernate.DistPollerDaoHibernate">
		<property name="sessionFactory" ref="sessionFactory" />
	</bean>

  <bean id="demandPollDao" class="org.opennms.netmgt.dao.hibernate.DemandPollDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <bean id="eventDao" class="org.opennms.netmgt.dao.hibernate.EventDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <bean id="ipInterfaceDao" class="org.opennms.netmgt.dao.hibernate.IpInterfaceDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
  
  <bean id="monitoredServiceDao" class="org.opennms.netmgt.dao.hibernate.MonitoredServiceDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
  
  <bean id="nodeDao" class="org.opennms.netmgt.dao.hibernate.NodeDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
  
  <bean id="notificationDao" class="org.opennms.netmgt.dao.hibernate.NotificationDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
  
  <bean id="outageDao" class="org.opennms.netmgt.dao.hibernate.OutageDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
  
  <bean id="serviceTypeDao" class="org.opennms.netmgt.dao.hibernate.ServiceTypeDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
  
  <bean id="snmpInterfaceDao" class="org.opennms.netmgt.dao.hibernate.SnmpInterfaceDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <bean id="userNotificationDao" class="org.opennms.netmgt.dao.hibernate.UserNotificationDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
  
  <bean id="availabilityReportLocatorDao" class="org.opennms.netmgt.dao.hibernate.AvailabilityReportLocatorDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
  
  <!-- this requires a property setting -->
  <bean id="locationMonitorDao" class="org.opennms.netmgt.dao.hibernate.LocationMonitorDaoHibernate" >
    <property name="sessionFactory" ref="sessionFactory"/>
    <property name="monitoringLocationConfigResource" value="file:${opennms.home}/etc/monitoring-locations.xml" />
  </bean>
  
  

<!-- deprecating  
  <bean id="aggregateStatusViewDao" class="org.opennms.netmgt.dao.hibernate.AggregateStatusViewDaoHibernate" >
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
--> 
</beans>
<commit_msg>Make sure we have a default propertyPlaceHolderConfigurer<commit_after><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd">

<!-- 
  <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="ignoreResourceNotFound" value="true" />
    <property name="properties" >
      <props>
        <prop key="opennms.etc" >${opennms.home}/etc</prop>
      </props>
    </property>
    <property name="locations">
      <list>
        <value>file:${opennms.home}/etc/opennms.properties</value>
        <value>classpath:opennms-test.properties</value>
      </list>
    </property>
  </bean>
-->      
   <bean id="propertyPlaceholderConfigure" class="org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer">
     <property name="properties">
       <props>
         <prop key="test.overridden.properties">NOT_FOUND</prop>
       </props>
     </property>
     <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
   </bean>
   <bean id="overridePropertiesForTesting" class="org.springframework.beans.factory.config.PropertyOverrideConfigurer">
     <property name="ignoreResourceNotFound" value="true" />
     <property name="location" value="${test.overridden.properties}" />
   </bean>
  
	<bean id="init-datasource-factory" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
		<property name="staticMethod"><value>org.opennms.netmgt.config.DataSourceFactory.init</value></property>
	</bean>

	<bean id="dataSource" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean" depends-on="init-datasource-factory">
		<property name="staticMethod"><value>org.opennms.netmgt.config.DataSourceFactory.getInstance</value></property>
	</bean>
	
	<bean id="timeKeeper" class="org.opennms.core.utils.DefaultTimeKeeper" />
	
	<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
		<property name="dataSource">
			<ref bean="dataSource" />
		</property>
		<property name="annotatedClasses">
			<list>
				<value>org.opennms.netmgt.model.OnmsDistPoller</value>
				<value>org.opennms.netmgt.model.OnmsAssetRecord</value>
				<value>org.opennms.netmgt.model.OnmsNode</value>
				<value>org.opennms.netmgt.model.OnmsIpInterface</value>
				<value>org.opennms.netmgt.model.OnmsSnmpInterface</value>
				<value>org.opennms.netmgt.model.OnmsMonitoredService</value>
				<value>org.opennms.netmgt.model.OnmsCategory</value>
				<value>org.opennms.netmgt.model.OnmsServiceType</value>
				<value>org.opennms.netmgt.model.OnmsOutage</value>
	        	<value>org.opennms.netmgt.model.OnmsEvent</value>
        	    <value>org.opennms.netmgt.model.OnmsAlarm</value>
                <value>org.opennms.netmgt.model.OnmsNotification</value>
                <value>org.opennms.netmgt.model.OnmsUserNotification</value>
				<value>org.opennms.netmgt.model.OnmsLocationMonitor</value>
                <value>org.opennms.netmgt.model.OnmsLocationSpecificStatus</value>
                <value>org.opennms.netmgt.model.PollStatus</value>
			</list>
		</property>
		<!--  property name="schemaUpdate" value="true">
		</property -->
		<property name="annotatedPackages">
			<list>
				<value>org.opennms.netmgt.model</value>
			</list>
		</property>
		<property name="hibernateProperties">
			<value>
				hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
		        hibernate.cache.use_second_level_cache=false
        		hibernate.cache=false
        		hibernate.cache.use_query_cache=false
        		hibernate.jdbc.batch_size=0	
				<!-- hibernate.format_sql=true -->
        	</value>
		</property>
	</bean>

  <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
    <property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <bean id="transactionTemplate" class="org.springframework.transaction.support.TransactionTemplate">
    <property name="transactionManager" ref="transactionManager" />
  </bean>
	
  <bean id="alarmDao" class="org.opennms.netmgt.dao.hibernate.AlarmDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <bean id="assetRecordDao" class="org.opennms.netmgt.dao.hibernate.AssetRecordDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
  
  <bean id="categoryDao" class="org.opennms.netmgt.dao.hibernate.CategoryDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>

	<bean id="distPollerDao" class="org.opennms.netmgt.dao.hibernate.DistPollerDaoHibernate">
		<property name="sessionFactory" ref="sessionFactory" />
	</bean>

  <bean id="demandPollDao" class="org.opennms.netmgt.dao.hibernate.DemandPollDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <bean id="eventDao" class="org.opennms.netmgt.dao.hibernate.EventDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <bean id="ipInterfaceDao" class="org.opennms.netmgt.dao.hibernate.IpInterfaceDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
  
  <bean id="monitoredServiceDao" class="org.opennms.netmgt.dao.hibernate.MonitoredServiceDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
  
  <bean id="nodeDao" class="org.opennms.netmgt.dao.hibernate.NodeDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
  
  <bean id="notificationDao" class="org.opennms.netmgt.dao.hibernate.NotificationDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
  
  <bean id="outageDao" class="org.opennms.netmgt.dao.hibernate.OutageDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
  
  <bean id="serviceTypeDao" class="org.opennms.netmgt.dao.hibernate.ServiceTypeDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
  
  <bean id="snmpInterfaceDao" class="org.opennms.netmgt.dao.hibernate.SnmpInterfaceDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>

  <bean id="userNotificationDao" class="org.opennms.netmgt.dao.hibernate.UserNotificationDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
  
  <bean id="availabilityReportLocatorDao" class="org.opennms.netmgt.dao.hibernate.AvailabilityReportLocatorDaoHibernate">
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
  
  <!-- this requires a property setting -->
  <bean id="locationMonitorDao" class="org.opennms.netmgt.dao.hibernate.LocationMonitorDaoHibernate" >
    <property name="sessionFactory" ref="sessionFactory"/>
    <property name="monitoringLocationConfigResource" value="file:${opennms.home}/etc/monitoring-locations.xml" />
  </bean>
  
  

<!-- deprecating  
  <bean id="aggregateStatusViewDao" class="org.opennms.netmgt.dao.hibernate.AggregateStatusViewDaoHibernate" >
  	<property name="sessionFactory" ref="sessionFactory" />
  </bean>
--> 
</beans>

{'fraction_non_alphanumeric': 0.15059418112279743, 'fraction_numerical': 0.0015025269771889087, 'mean_word_length': 4.722157092614302, 'pattern_counts': {'":': 0, '<': 326, '<?xml version=': 2, '>': 326, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1567562', 'n_tokens_mistral': 5043, 'n_tokens_neox': 4774, 'n_words': 546}