<commit_before>package com.tastymonster.automation.codegen;

import java.io.File;
import java.util.HashSet;
import java.util.Set;

/**
 * Each PageInfo object represents a single "page", as defined by the caller. If a page represents more than one template, it will be  
 * a combination of these PageInfo objects meshed together
 * @author Marcus
 *
 */
public class PageInfo {

	//This is only protected for unit testing purposes
	protected Set<FieldDetails> fields = new HashSet<FieldDetails>();
	protected String pageName;
	protected String pageURI;
	protected PresentationType presentationType;
	
	public Set<FieldDetails> getFields() {
		return fields;
	}

	public void setFields( Set<FieldDetails> fields ) {
		this.fields = fields;
	}

	public String getPageName() {
		return pageName;
	}

	public void setPageName(String pageName) {
		this.pageName = pageName;
	}

	public String getPackage() {
		return "com.tastymonster.automation.page.base";
	}

	public void setPageURI( String pageURI ) {
		this.pageURI = pageURI;
	}

	public String getPageURI() {
		return pageURI;
	}

	public PresentationType getPresentationType() {
		return presentationType;
	}

	public void setPresentationType(PresentationType presentationType) {
		this.presentationType = presentationType;
	}

	/**
	 * The file will be parsed according to its implementation. It will call parseVelocity, parseJSP, or 
	 * whatever type (plug-in) is appropriate
	 * @param file
	 * @return
	 */
	public void initPage( File file ) {
		Set<FieldDetails> fields = new HashSet<FieldDetails>();
		
		//Get parser from factory by sending it the file
		//The factory will return an IPresentationParser with the correct implementation
		// and its file contents initialized
		IPresentationParser parser = ParserFactory.getParser( file );

		this.setPageName( parser.getPageName() );
		this.setPageURI( parser.getPageURI() );

		fields = parser.buildFieldDetails();
		
		//Call the methods on the parser to populate the correct field details
		this.setFields( fields );
	}
}<commit_msg>Fixing bad practice with local variable collision, as revealed by static analysis<commit_after>package com.tastymonster.automation.codegen;

import java.io.File;
import java.util.HashSet;
import java.util.Set;

/**
 * Each PageInfo object represents a single "page", as defined by the caller. If a page represents more than one template, it will be  
 * a combination of these PageInfo objects meshed together
 * @author Marcus
 *
 */
public class PageInfo {

	//This is only protected for unit testing purposes
	protected Set<FieldDetails> fields = new HashSet<FieldDetails>();
	protected String pageName;
	protected String pageURI;
	protected PresentationType presentationType;
	
	public Set<FieldDetails> getFields() {
		return fields;
	}

	public void setFields( Set<FieldDetails> fields ) {
		this.fields = fields;
	}

	public String getPageName() {
		return pageName;
	}

	public void setPageName(String pageName) {
		this.pageName = pageName;
	}

	public String getPackage() {
		return "com.tastymonster.automation.page.base";
	}

	public void setPageURI( String pageURI ) {
		this.pageURI = pageURI;
	}

	public String getPageURI() {
		return pageURI;
	}

	public PresentationType getPresentationType() {
		return presentationType;
	}

	public void setPresentationType(PresentationType presentationType) {
		this.presentationType = presentationType;
	}

	/**
	 * The file will be parsed according to its implementation. It will call parseVelocity, parseJSP, or 
	 * whatever type (plug-in) is appropriate
	 * @param file
	 * @return
	 */
	public void initPage( File file ) {
		//Get parser from factory by sending it the file
		//The factory will return an IPresentationParser with the correct implementation
		// and its file contents initialized
		IPresentationParser parser = ParserFactory.getParser( file );

		this.setPageName( parser.getPageName() );
		this.setPageURI( parser.getPageURI() );

		//Call the methods on the parser to populate the correct field details
		this.setFields( parser.buildFieldDetails() );
	}
}
{'fraction_non_alphanumeric': 0.08306787552070571, 'fraction_numerical': 0.0, 'mean_word_length': 4.260309278350515, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '2403518', 'n_tokens_mistral': 1219, 'n_tokens_neox': 1137, 'n_words': 399}