<commit_before>package org.fiteagle.interactors.sfa.common;

import java.util.ArrayList;
import java.util.Iterator;

public class Authorization {
	
	Boolean authorized=false;
	private Boolean credentialTypesAndVersionValid=false;
	private String authorizationFailMessage="";
	private AMCode returnCode;
	
	
	public static final String GENI_VERSION = "3";
	public static final String GENI_TYPE = "geni_sfa";
	GeniCredentialType credentialType;
	
	public Authorization() {
		this.credentialType = new GeniCredentialType();
		credentialType.setGeni_type(GENI_TYPE);
		credentialType.setGeni_version(GENI_VERSION);
	}

	public GeniCredentialType getCredentialType() {
		return credentialType;
	}

	public void setCredentialType(GeniCredentialType credentialType) {
		this.credentialType = credentialType;
	}
	
	public void checkCredentialsList(ListCredentials listCredentials) {
		
		ArrayList<Credentials> credentialList = listCredentials.getCredentialsList();
		for (Iterator iterator = credentialList.iterator(); iterator.hasNext();) {
			Credentials credentials = (Credentials) iterator.next();
			this.checkCredentialTypeAndVersion(credentials);
			if (!this.areCredentialTypeAndVersionValid()) {
				return;
			}
			//TODO: check credentials in Credentials.geni_value!!
		}
		
	}
	
	

	public boolean areCredentialTypeAndVersionValid() {
		return getCredentialTypesAndVersionValid();<commit_msg>Fixed a warning.<commit_after>package org.fiteagle.interactors.sfa.common;

import java.util.ArrayList;
import java.util.Iterator;

public class Authorization {
	
	Boolean authorized=false;
	private Boolean credentialTypesAndVersionValid=false;
	private String authorizationFailMessage="";
	private AMCode returnCode;
	
	
	public static final String GENI_VERSION = "3";
	public static final String GENI_TYPE = "geni_sfa";
	GeniCredentialType credentialType;
	
	public Authorization() {
		this.credentialType = new GeniCredentialType();
		credentialType.setGeni_type(GENI_TYPE);
		credentialType.setGeni_version(GENI_VERSION);
	}

	public GeniCredentialType getCredentialType() {
		return credentialType;
	}

	public void setCredentialType(GeniCredentialType credentialType) {
		this.credentialType = credentialType;
	}
	
	public void checkCredentialsList(ListCredentials listCredentials) {
		
		ArrayList<Credentials> credentialList = listCredentials.getCredentialsList();
		for (Iterator<Credentials> iterator = credentialList.iterator(); iterator.hasNext();) {
			Credentials credentials = (Credentials) iterator.next();
			this.checkCredentialTypeAndVersion(credentials);
			if (!this.areCredentialTypeAndVersionValid()) {
				return;
			}
			//TODO: check credentials in Credentials.geni_value!!
		}
		
	}
	
	

	public boolean areCredentialTypeAndVersionValid() {
		return getCredentialTypesAndVersionValid();
{'fraction_non_alphanumeric': 0.08505338078291814, 'fraction_numerical': 0.0007117437722419929, 'mean_word_length': 5.9236453201970445, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '6991321', 'n_tokens_mistral': 882, 'n_tokens_neox': 810, 'n_words': 165}