<commit_before>/* This class is part of the XP framework's EAS connectivity 
 *
 * $Id$
 */

package net.xp_framework.beans.stateless;

import javax.ejb.EJBException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import java.rmi.RemoteException;

/**
 * Calculator demonstration
 *
 * @ejb.bean
 *      name="Calculator"
 *      type="Stateless"
 *      view-type="both"
 *      jndi-name="xp/Calculator"
 *		display-name="Calculator Demo"
 * @ejb.util
 *      generate="physical"
 */
public class CalculatorBean implements SessionBean {

    /**
     * Adds two floating point numbers 
     *
     * @ejb.interface-method view-type = "both"
     * @param   float a
     * @param   float b
     * @return  float the sum of the given parameters a and b
     */
    public float add(float a, float b) {
        return a + b;
    }

    /**
     * Adds two integers
     *
     * @ejb.interface-method view-type = "both"
     * @param   int a
     * @param   int b
     * @return  int the sum of the given parameters a and b
     */
    public int add(int a, int b) {
        return a + b;
    }

    /**
     * Activate method
     *
     * @access  public
     */
    public void ejbActivate() throws EJBException, RemoteException { }

    /**
     * Passivate method
     *
     * @access  public
     */
    public void ejbPassivate() throws EJBException, RemoteException { }

    /**
     * Remove method
     *
     * @access  public<commit_msg>- Add new methods:   . subtract   . multiply<commit_after>/* This class is part of the XP framework's EAS connectivity 
 *
 * $Id$
 */

package net.xp_framework.beans.stateless;

import javax.ejb.EJBException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import java.rmi.RemoteException;

/**
 * Calculator demonstration
 *
 * @ejb.bean
 *      name="Calculator"
 *      type="Stateless"
 *      view-type="both"
 *      jndi-name="xp/Calculator"
 *		display-name="Calculator Demo"
 * @ejb.util
 *      generate="physical"
 */
public class CalculatorBean implements SessionBean {

    /**
     * Adds two floating point numbers 
     *
     * @ejb.interface-method view-type = "both"
     * @param   float a
     * @param   float b
     * @return  float the sum of the given parameters a and b
     */
    public float add(float a, float b) {
        return a + b;
    }

    /**
     * Adds two integers
     *
     * @ejb.interface-method view-type = "both"
     * @param   int a
     * @param   int b
     * @return  int the sum of the given parameters a and b
     */
    public int add(int a, int b) {
        return a + b;
    }

    /**
     * Subtracts two floating point numbers 
     *
     * @ejb.interface-method view-type = "both"
     * @param   float a
     * @param   float b
     * @return  float the result of the subtraction of the given parameters a and b
     */
    public float subtract(float a, float b) {
        return a - b;
    }

    /**
     * Adds two integers
     Subtracts
     * @ejb.interface-method view-type = "both"
     * @param   int a
     * @param   int b
     * @return  int the result of the subtraction of the given parameters a and b
     */
    public int subtract(int a, int b) {
        return a - b;
    }

    /**
     * Multiplies two floating point numbers 
     *
     * @ejb.interface-method view-type = "both"
     * @param   float a
     * @param   float b
     * @return  float the product of the given parameters a and b
     */
    public float multiply(float a, float b) {
        return a * b;
    }

    /**
     * Multiplies two integers
     *
     * @ejb.interface-method view-type = "both"
     * @param   int a
     * @param   int b
     * @return  int the product of the given parameters a and b
     */
    public int multiply(int a, int b) {
        return a * b;
    }

    /**
     * Activate method
     *
     * @access  public
     */
    public void ejbActivate() throws EJBException, RemoteException { }

    /**
     * Passivate method
     *
     * @access  public
     */
    public void ejbPassivate() throws EJBException, RemoteException { }

    /**
     * Remove method
     *
     * @access  public
{'fraction_non_alphanumeric': 0.10484644913627639, 'fraction_numerical': 0.0, 'mean_word_length': 1.963041933191187, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '683628', 'n_tokens_mistral': 1354, 'n_tokens_neox': 1294, 'n_words': 399}