<commit_before>package saas.logging.demo;

import javax.jws.HandlerChain;
import javax.jws.WebService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import saas.logging.demo.object.RequestObject;
import saas.logging.demo.object.ResponseObject;

/**
 * SaaSLoggingServiceImpl - implementation of SaaSLoggingService. 
 * 
 */
@WebService(endpointInterface = "saas.logging.demo.SaaSLoggingService")
@HandlerChain(file = "../../jaxws-handlers.xml")
public class SaaSLoggingServiceImpl implements SaaSLoggingService {

	private static final Logger LOG = LoggerFactory.getLogger(SaaSLoggingServiceImpl.class);
	
	/**
	 * SaaSLoggingServiceImpl - Default Constructor.
	 */
	public SaaSLoggingServiceImpl() {
		super();
	}


	@Override
	public ResponseObject fetchGreeting(RequestObject requestObject) {
		LOG.debug("Entry personName:{}.", requestObject.getPersonName());
		//get Document Model of omApplication xml
		try {
			Thread.sleep(500);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		
		if("".equals(requestObject.getPersonName())){
			throw new IllegalArgumentException("Invalid Parameter");
		}
		String result = "Hello " + requestObject.getPersonName();
		LOG.info("result:{}.", result);
		LOG.info("Exit personName:{}.", requestObject.getPersonName());<commit_msg>Updated service with comments<commit_after>package saas.logging.demo;

import javax.jws.HandlerChain;
import javax.jws.WebService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import saas.logging.demo.object.RequestObject;
import saas.logging.demo.object.ResponseObject;

/**
 * SaaSLoggingServiceImpl - implementation of SaaSLoggingService. 
 * 
 */
@WebService(endpointInterface = "saas.logging.demo.SaaSLoggingService")
@HandlerChain(file = "../../jaxws-handlers.xml")
public class SaaSLoggingServiceImpl implements SaaSLoggingService {

	private static final Logger LOG = LoggerFactory.getLogger(SaaSLoggingServiceImpl.class);
	
	/**
	 * SaaSLoggingServiceImpl - Default Constructor.
	 */
	public SaaSLoggingServiceImpl() {
		super();
	}


	@Override
	public ResponseObject fetchGreeting(RequestObject requestObject) {
		//logs input
		LOG.debug("Entry personName:{}.", requestObject.getPersonName());
		LOG.debug("Entry personName:{}.", requestObject.getSubscriberName());
		
		//current thread sleep to allow other threads to work
		try {
			Thread.sleep(500);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		//throwing exception if personName is empty
		if("".equals(requestObject.getPersonName())){
			throw new IllegalArgumentException("Invalid Parameter");
		}
		
		//creating result
		String result = "Hello " + requestObject.getPersonName();
		
		//logs at info level
		LOG.info("result:{}.", result);
		LOG.info("Exit personName:{}.", requestObject.getPersonName());
		
		//set response and return
{'fraction_non_alphanumeric': 0.12513181019332162, 'fraction_numerical': 0.0035149384885764497, 'mean_word_length': 4.953974895397489, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, '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': '6645312', 'n_tokens_mistral': 919, 'n_tokens_neox': 847, 'n_words': 172}