<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" xmlns:aop="http://www.springframework.org/schema/aop"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
    <aop:aspectj-autoproxy/>

    <bean id="context" class="org.motechproject.openmrs.Context" init-method="initialize">
        <constructor-arg value="jdbc:mysql://${openmrs.host}:3306/${openmrs.database}?autoReconnect=true"/>
        <constructor-arg value="${openmrs.db.username}"/>
        <constructor-arg value="${openmrs.db.password}"/>
        <constructor-arg value="${openmrs.admin.username}"/>
        <constructor-arg value="${openmrs.admin.password}"/>
    </bean>


    <bean class="org.openmrs.api.PatientService" factory-bean="context" factory-method="getPatientService"/>
    <bean class="org.openmrs.api.PersonService" factory-bean="context" factory-method="getPersonService"/>
    <bean class="org.openmrs.api.UserService" factory-bean="context" factory-method="getUserService"/>
    <bean class="org.openmrs.api.AdministrationService" factory-bean="context"
          factory-method="getAdministrationService"/>
    <bean class="org.openmrs.api.LocationService" factory-bean="context" factory-method="getLocationService"/>

    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="location" value="classpath:openmrs.properties"/>
    </bean>
    <bean class="org.motechproject.openmrs.services.FacilityServiceImpl"/>

    <bean class="org.motechproject.openmrs.services.UserServiceImpl"/>

    <bean class="org.motechproject.openmrs.security.OpenMRSSession"/>
    <bean class="org.motechproject.openmrs.advice.ApiSessionAdvice" depends-on="context" scope="prototype"/>


    <bean id="openMRSAuthenticationProvider" class="org.motechproject.openmrs.security.OpenMRSAuthenticationProvider"/>
</beans><commit_msg>Irfan | #448 |  OpenMrs services should be singleton<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" xmlns:aop="http://www.springframework.org/schema/aop"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
    <aop:aspectj-autoproxy/>

    <bean id="context" class="org.motechproject.openmrs.Context" init-method="initialize" scope="singleton">
        <constructor-arg value="jdbc:mysql://${openmrs.host}:3306/${openmrs.database}?autoReconnect=true"/>
        <constructor-arg value="${openmrs.db.username}"/>
        <constructor-arg value="${openmrs.db.password}"/>
        <constructor-arg value="${openmrs.admin.username}"/>
        <constructor-arg value="${openmrs.admin.password}"/>
    </bean>


    <bean class="org.openmrs.api.PatientService" factory-bean="context" factory-method="getPatientService" scope="singleton"/>
    <bean class="org.openmrs.api.PersonService" factory-bean="context" factory-method="getPersonService"  scope="singleton"/>
    <bean class="org.openmrs.api.UserService" factory-bean="context" factory-method="getUserService"  scope="singleton"/>
    <bean class="org.openmrs.api.AdministrationService" factory-bean="context"
          factory-method="getAdministrationService"  scope="singleton"/>
    <bean class="org.openmrs.api.LocationService" factory-bean="context" factory-method="getLocationService"  scope="singleton"/>

    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="location" value="classpath:openmrs.properties"/>
    </bean>
    <bean class="org.motechproject.openmrs.services.FacilityServiceImpl"/>

    <bean class="org.motechproject.openmrs.services.UserServiceImpl"/>

    <bean class="org.motechproject.openmrs.security.OpenMRSSession"/>
    <bean class="org.motechproject.openmrs.advice.ApiSessionAdvice" depends-on="context" scope="prototype"/>


    <bean id="openMRSAuthenticationProvider" class="org.motechproject.openmrs.security.OpenMRSAuthenticationProvider"/>
</beans>
{'fraction_non_alphanumeric': 0.16438663377438886, 'fraction_numerical': 0.006952231442027361, 'mean_word_length': 5.126373626373627, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 2, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 14, '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': '936733', 'n_tokens_mistral': 1400, 'n_tokens_neox': 1342, 'n_words': 145}