<commit_before>
package com.directthought.lifeguard.util;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.xerox.amazonws.sqs.MessageQueue;
import com.xerox.amazonws.sqs.QueueService;
import com.xerox.amazonws.sqs.SQSException;

public class QueueUtil {
	private static Log logger = LogFactory.getLog(QueueUtil.class);

	public static MessageQueue getQueueOrElse(QueueService qs, String queueName) {
		MessageQueue ret = null;
		while (ret == null) {
			try {
				ret = qs.getOrCreateMessageQueue(queueName);
			} catch (SQSException ex) {
				logger.error("Error access message queue, Retrying.", ex);
				try { Thread.sleep(1000); } catch (InterruptedException iex) { }
			}
		}
		return ret;
	}

	public static void sendMessageForSure(MessageQueue queue, String message) {
		while (true) {
			try {
				queue.sendMessage(message);
			} catch (SQSException ex) {
				logger.warn("Error sending message, Retrying.");
				try { Thread.sleep(2000); } catch (InterruptedException iex) {}
			}
		}
	}
}
<commit_msg>forgot to exit msg send retry loop on success<commit_after>
package com.directthought.lifeguard.util;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.xerox.amazonws.sqs.MessageQueue;
import com.xerox.amazonws.sqs.QueueService;
import com.xerox.amazonws.sqs.SQSException;

public class QueueUtil {
	private static Log logger = LogFactory.getLog(QueueUtil.class);

	public static MessageQueue getQueueOrElse(QueueService qs, String queueName) {
		MessageQueue ret = null;
		while (ret == null) {
			try {
				ret = qs.getOrCreateMessageQueue(queueName);
			} catch (SQSException ex) {
				logger.error("Error access message queue, Retrying.", ex);
				try { Thread.sleep(1000); } catch (InterruptedException iex) { }
			}
		}
		return ret;
	}

	public static void sendMessageForSure(MessageQueue queue, String message) {
		while (true) {
			try {
				queue.sendMessage(message);
				return;
			} catch (SQSException ex) {
				logger.warn("Error sending message, Retrying.");
				try { Thread.sleep(2000); } catch (InterruptedException iex) {}
			}
		}
	}
}

{'fraction_non_alphanumeric': 0.10843373493975904, 'fraction_numerical': 0.0071396697902722, 'mean_word_length': 3.5476673427991887, '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': '4550173', 'n_tokens_mistral': 809, 'n_tokens_neox': 714, 'n_words': 161}