<commit_before>package com.WC1.CatBot;

import java.util.List;

import org.jdom2.Document;
import org.jdom2.Element;

public class XMLManager {

	private void compileConfigFile(List<FelisBotus> bots) {
		Document doc = new Document();
		//root setup
		Element elemRoot = new Element("FelisBotusConfig");
		Element elemBotList = new Element("BotList");
		elemRoot.addContent(elemBotList);
		for (FelisBotus currBot:bots){
			//save bot name
			Element elemCurrBot = new Element(currBot.getName());
			//save bot owner
			elemCurrBot.setAttribute("Owner", currBot.getOwner());
			//save bot login
			elemCurrBot.setAttribute("Login", currBot.getLogin());
			//save password if it is to be saved
			String loginPass = currBot.getLoginPass();
			if (loginPass != null){
				elemCurrBot.setAttribute("Pass", loginPass);
			}
			elemBotList.addContent(elemCurrBot);
			IRCServer currServer = currBot.getIRCServer();
			Element elemCurrServer = new Element(currServer.getServerName());
			
			
		}


		//elemRoot.addContent(elemPass);
		//Save server
		//if (server != null){
//			Element elemServer = new Element("Server");
//			elemServer.setAttribute("Name", server.getServerName());
//			elemServer.setAttribute("Address", server.getServerAddress());
//			Element elemChannelList = new Element("Chennels");
//			//channels of the server
//			for(String currChannel:server.getChannels()){
//				Element elemCurrChannel = new Element(currChannel);
//			}
//		}
	}
}
<commit_msg>Completed compiling of botlist to XML<commit_after>package com.WC1.CatBot;

import java.util.List;

import org.jdom2.Document;
import org.jdom2.Element;

public class XMLManager {

	private void compileConfigFile(List<FelisBotus> bots) {
		Document doc = new Document();
		//root setup
		Element elemRoot = new Element("FelisBotusConfig");//<FelisBotus>
		Element elemBotList = new Element("BotList");//<BotList>
		for (FelisBotus currBot:bots){
			//save bot name
			Element elemCurrBot = new Element(currBot.getName());//<Bot Owner="" Login="" [Pass=""]>
			//save bot owner
			elemCurrBot.setAttribute("Owner", currBot.getOwner());
			//save bot login
			elemCurrBot.setAttribute("Login", currBot.getLogin());
			//save password if it is to be saved
			String loginPass = currBot.getLoginPass();
			if (loginPass != null){
				elemCurrBot.setAttribute("Pass", loginPass);
			}
			//save single server associated with this bot
			IRCServer currServer = currBot.getIRCServer(); 
			Element elemCurrServer = new Element(currServer.getServerName());//<Server address="">
			elemCurrServer.setAttribute("address", currServer.getServerAddress());
			//add support here for servers with passwords if I need it
			//add channels associated with this server
			Element currServerChannels = new Element("Channels");//<Channels>
			for (IRCChannel currChannel:currServer.getChannels()){
				Element elemCurrChannel = new Element(currChannel.getName()); //<Channel> //Do channels have certain things like passwords?
				//save ops for this channel
				Element elemCurrChannelOps = new Element("Ops");//<Ops>
				for (String currOp:currChannel.getOpList()){
					elemCurrChannelOps.addContent(new Element(currOp));//<opName/>
				}
				elemCurrChannel.addContent(elemCurrChannelOps);// </Ops>
				currServerChannels.addContent(elemCurrChannel); //</Channel>
			}
			elemCurrServer.addContent(currServerChannels);//</Channels>
			elemCurrBot.addContent(elemCurrServer);//</Server>
			elemBotList.addContent(elemCurrBot);//</Bot>
			
		}
		elemRoot.addContent(elemBotList);//</BotList>



	}
}

{'fraction_non_alphanumeric': 0.13305203938115331, 'fraction_numerical': 0.0016877637130801688, 'mean_word_length': 4.291666666666667, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '1450559', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1111, 'n_words': 250}