<commit_before>package core.commands;

import core.Constants;
import core.entities.QueueManager;
import core.entities.Server;
import core.exceptions.BadArgumentsException;
import core.exceptions.DoesNotExistException;
import core.util.Utils;
import net.dv8tion.jda.core.entities.Member;

public class CmdDeleteNotification extends Command{
	
	public CmdDeleteNotification(){
		this.helpMsg = Constants.DELETENOTIFICATION_HELP;
		this.description = Constants.DELETENOTIFICATION_DESC;
		this.name = Constants.DELETENOTIFICATION_NAME;
	}
	
	@Override
	public void execCommand(Server server, Member member, String[] args) {
		QueueManager qm = server.getQueueManager();
		try{
			if(args.length <= 1){
				if(args.length == 0){
					qm.removeNotification(member.getUser());
				}else{
					try{
						qm.removeNotification(member.getUser(), Integer.valueOf(args[0]));
					}catch(NumberFormatException ex){
						qm.removeNotification(member.getUser(), args[1]);
					}
				}
			}else{
				throw new BadArgumentsException();
			}
			this.response = Utils.createMessage("Notification(s) removed", "", true);
			System.out.println(success());
			qm.saveToFile();
		}catch(BadArgumentsException | DoesNotExistException ex){
			this.response = Utils.createMessage("Error!", ex.getMessage(), false);
		}
	}
	
}<commit_msg>Fix array out of bounds bug<commit_after>package core.commands;

import core.Constants;
import core.entities.QueueManager;
import core.entities.Server;
import core.exceptions.BadArgumentsException;
import core.exceptions.DoesNotExistException;
import core.util.Utils;
import net.dv8tion.jda.core.entities.Member;

public class CmdDeleteNotification extends Command{
	
	public CmdDeleteNotification(){
		this.helpMsg = Constants.DELETENOTIFICATION_HELP;
		this.description = Constants.DELETENOTIFICATION_DESC;
		this.name = Constants.DELETENOTIFICATION_NAME;
	}
	
	@Override
	public void execCommand(Server server, Member member, String[] args) {
		QueueManager qm = server.getQueueManager();
		try{
			if(args.length <= 1){
				if(args.length == 0){
					qm.removeNotification(member.getUser());
				}else{
					try{
						qm.removeNotification(member.getUser(), Integer.valueOf(args[0]));
					}catch(NumberFormatException ex){
						qm.removeNotification(member.getUser(), args[0]);
					}
				}
			}else{
				throw new BadArgumentsException();
			}
			this.response = Utils.createMessage("Notification(s) removed", "", true);
			System.out.println(success());
			qm.saveToFile();
		}catch(BadArgumentsException | DoesNotExistException ex){
			this.response = Utils.createMessage("Error!", ex.getMessage(), false);
		}
	}
	
}
{'fraction_non_alphanumeric': 0.12348484848484849, 'fraction_numerical': 0.003787878787878788, 'mean_word_length': 4.7663755458515285, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5704494', 'n_tokens_mistral': 942, 'n_tokens_neox': 814, 'n_words': 149}