<commit_before>package us.kbase.typedobj.tests;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;

import us.kbase.common.service.UObject;
import us.kbase.typedobj.core.AbsoluteTypeDefId;
import us.kbase.typedobj.core.TypedObjectValidationReport;
import us.kbase.typedobj.exceptions.RelabelIdReferenceException;
import us.kbase.typedobj.idref.IdReference;
import us.kbase.typedobj.idref.WsIdReference;

/**
 * for testing, you can instantiate this report without running any validation code.
 * this dummy report always says that it was a success, that no subset data is extracted (get an empty object), there
 * are no errors, no IDs detected, and no Ids that can be renamed.
 * @author msneddon
 *
 */
public class DummyTypedObjectValidationReport extends
		TypedObjectValidationReport {
	
	public DummyTypedObjectValidationReport(final AbsoluteTypeDefId type, 
			final UObject data) {
		super(Collections.<String>emptyList(), null, type, data, null, Collections.<WsIdReference>emptyList());
	}
	
	@Override
	public boolean isInstanceValid() {
		return true;
	}
	
	@Override
	public List <String> getErrorMessagesAsList() {
		return new ArrayList<String>();
	}
	
	@Override
	public List<WsIdReference> getWsIdReferences() {
		return new ArrayList<WsIdReference>();
	}
	@Override
	public List<IdReference> getAllIdReferences() {
		return new ArrayList<IdReference>();
	}
	@Override
	public List<String> getAllIds() {
		return new ArrayList<String>();
	}
	
	@Override
	public List<IdReference> getAllIdReferencesOfType(String type) {
		return new ArrayList<IdReference>();
	}
	
	@Override
	public JsonNode getInstanceAfterIdRefRelabelingForTests() throws RelabelIdReferenceException {
		ObjectMapper mapper = new ObjectMapper();
		return mapper.createObjectNode();
	}

	/*@Override
	public JsonNode getJsonInstance() {
		ObjectMapper mapper = new ObjectMapper();
		return mapper.createObjectNode();
	}*/
	
	public JsonNode extractSearchableWsSubset() {
		ObjectMapper mapper = new ObjectMapper();
		return mapper.createObjectNode();
	}
	
	@Override
	public String toString() { 
		return "DummyTypedObjectValidationReport";
	}
	
	
	
}
<commit_msg>Minor refactoring of method removing.<commit_after>package us.kbase.typedobj.tests;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;

import us.kbase.common.service.UObject;
import us.kbase.typedobj.core.AbsoluteTypeDefId;
import us.kbase.typedobj.core.TypedObjectValidationReport;
import us.kbase.typedobj.exceptions.RelabelIdReferenceException;
import us.kbase.typedobj.idref.IdReference;
import us.kbase.typedobj.idref.WsIdReference;

/**
 * for testing, you can instantiate this report without running any validation code.
 * this dummy report always says that it was a success, that no subset data is extracted (get an empty object), there
 * are no errors, no IDs detected, and no Ids that can be renamed.
 * @author msneddon
 *
 */
public class DummyTypedObjectValidationReport extends
		TypedObjectValidationReport {
	
	public DummyTypedObjectValidationReport(final AbsoluteTypeDefId type, 
			final UObject data) {
		super(Collections.<String>emptyList(), null, type, data, null, Collections.<WsIdReference>emptyList());
	}
	
	@Override
	public boolean isInstanceValid() {
		return true;
	}
	
	@Override
	public List <String> getErrorMessagesAsList() {
		return new ArrayList<String>();
	}
	
	@Override
	public List<WsIdReference> getWsIdReferences() {
		return new ArrayList<WsIdReference>();
	}
	@Override
	public List<IdReference> getAllIdReferences() {
		return new ArrayList<IdReference>();
	}
	@Override
	public List<String> getAllIds() {
		return new ArrayList<String>();
	}
	
	@Override
	public JsonNode getInstanceAfterIdRefRelabelingForTests() throws RelabelIdReferenceException {
		ObjectMapper mapper = new ObjectMapper();
		return mapper.createObjectNode();
	}

	/*@Override
	public JsonNode getJsonInstance() {
		ObjectMapper mapper = new ObjectMapper();
		return mapper.createObjectNode();
	}*/
	
	public JsonNode extractSearchableWsSubset() {
		ObjectMapper mapper = new ObjectMapper();
		return mapper.createObjectNode();
	}
	
	@Override
	public String toString() { 
		return "DummyTypedObjectValidationReport";
	}
	
	
	
}

{'fraction_non_alphanumeric': 0.09477929643737397, 'fraction_numerical': 0.0, 'mean_word_length': 5.386266094420601, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '6960875', 'n_tokens_mistral': 1413, 'n_tokens_neox': 1302, 'n_words': 336}