<commit_before>package es.uniovi.asw.perosnalLetter;

public class SingletonTextWritter {
	SingletonTextWritter instance;
	private TextWritter generadorDocumento;
	
	private SingletonTextWritter(){
		
	}
	
	
	public SingletonTextWritter getInstance(){
		if(this.instance == null){
			this.instance = new SingletonTextWritter();
		}
		return this.instance;
	}
	
	public TextWritter getPDFTextWritter(){
		if(this.generadorDocumento == null || !this.generadorDocumento.getClass().equals(PDFTextWritter.class)){
			this.generadorDocumento = new PDFTextWritter();
		}
		return generadorDocumento;
	}
	public TextWritter getWordTextWritter(){
		if(this.generadorDocumento == null || !this.generadorDocumento.getClass().equals(WordTextWritter.class)){
			this.generadorDocumento = new PlainTextWritter();
		}
		return generadorDocumento;
	}
	public TextWritter getPlaibnTextWritter(){
		if(this.generadorDocumento == null || !this.generadorDocumento.getClass().equals(PlainTextWritter.class)){
			this.generadorDocumento = new PlainTextWritter();
		}
		return generadorDocumento;
	}
}
<commit_msg>Solucion liada del singleton<commit_after>package es.uniovi.asw.perosnalLetter;

public class SingletonTextWritter {
	SingletonTextWritter instance;
	private TextWritter generadorDocumentoPDF;
	private TextWritter generadorDocumentoWord;
	private TextWritter generadorDocumentoPlainText;
	
	private SingletonTextWritter(){
		
	}
	
	
	public SingletonTextWritter getInstance(){
		if(this.instance == null){
			this.instance = new SingletonTextWritter();
		}
		return this.instance;
	}
	
	public TextWritter getPDFTextrWitter(){
		if(this.generadorDocumentoPDF == null){
			this.generadorDocumentoPDF = new PDFTextWritter();
		}
		return generadorDocumentoPDF;
	}
	public TextWritter getWordTextWritter(){
		if(this.generadorDocumentoWord == null){
			this.generadorDocumentoWord = new PlainTextWritter();
		}
		return generadorDocumentoWord;
	}
	public TextWritter getPlaibnTextWritter(){
		if(this.generadorDocumentoPlainText == null){
			this.generadorDocumentoPlainText = new PlainTextWritter();
		}
		return generadorDocumentoPlainText;
	}
}

{'fraction_non_alphanumeric': 0.0950374531835206, 'fraction_numerical': 0.0, 'mean_word_length': 5.762658227848101, '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': '17006', 'n_tokens_mistral': 736, 'n_tokens_neox': 672, 'n_words': 116}