<commit_before>package edu.wustl.catissuecore.namegenerator;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
import edu.wustl.cab2b.common.util.Utility;
import edu.wustl.catissuecore.domain.CollectionProtocolRegistration;
import edu.wustl.catissuecore.util.global.Constants;
import edu.wustl.catissuecore.util.global.Variables;

/**
 * This class which contains the default implementation for Protocol 
 * Participant label generation.
 * @author sagar_baldwa
 */
 
public class ProtocolParticipantIdentifierLabelGenerator implements LabelGenerator
{
	/**
	 * 
	 */
	public String getLabel(Object object)
	{
		return null;
	}

	/**
	 * This method generates a label and sets it to CollectionProtocolRegistration
	 * domain object. Label is in the format "COLLECTIONPROTOCOLID_PARTICIPANTID"
	 */
	public void setLabel(Object object)
	{
		CollectionProtocolRegistration collectionProtocolRegistration = 
			(CollectionProtocolRegistration) object;
		
		collectionProtocolRegistration.setProtocolParticipantIdentifier(
			collectionProtocolRegistration.getCollectionProtocol().getId() + "_" + 
			collectionProtocolRegistration.getParticipant().getId());
	}

	/**
	 * 
	 */
	public void setLabel(List object)
	{
		// TODO Auto-generated method stub		
	}
}<commit_msg>Changed made for API ParticipantTestCases.java: Duplicate PPI match test case<commit_after>package edu.wustl.catissuecore.namegenerator;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
import edu.wustl.cab2b.common.util.Utility;
import edu.wustl.catissuecore.domain.CollectionProtocolRegistration;
import edu.wustl.catissuecore.util.global.Constants;
import edu.wustl.catissuecore.util.global.Variables;

/**
 * This class which contains the default implementation for Protocol 
 * Participant label generation.
 * @author sagar_baldwa
 */
 
public class ProtocolParticipantIdentifierLabelGenerator implements LabelGenerator
{
	/**
	 * 
	 */
	public String getLabel(Object object)
	{
		return null;
	}

	/**
	 * This method generates a label and sets it to CollectionProtocolRegistration
	 * domain object. Label is in the format "COLLECTIONPROTOCOLID_PARTICIPANTID"
	 */
	public void setLabel(Object object)
	{
		CollectionProtocolRegistration collectionProtocolRegistration = 
			(CollectionProtocolRegistration) object;
		if(collectionProtocolRegistration.getProtocolParticipantIdentifier() == null
				|| Constants.DOUBLE_QUOTES.equals(collectionProtocolRegistration.getProtocolParticipantIdentifier()))
		{
			collectionProtocolRegistration.setProtocolParticipantIdentifier(
					collectionProtocolRegistration.getCollectionProtocol().getId() + "_" + 
					collectionProtocolRegistration.getParticipant().getId());
		}		
	}

	/**
	 * 
	 */
	public void setLabel(List object)
	{
		// TODO Auto-generated method stub		
	}
}
{'fraction_non_alphanumeric': 0.08662175168431184, 'fraction_numerical': 0.0006416426050689766, 'mean_word_length': 5.286290322580645, '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': '2376141', 'n_tokens_mistral': 925, 'n_tokens_neox': 860, 'n_words': 184}