<commit_before>package edu.umd.cs.findbugs.workflow;

import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.SortedMap;
import java.util.TreeMap;

import junit.framework.TestCase;
import edu.umd.cs.findbugs.AppVersion;

public class FindSeqNumTest extends TestCase {

	Map<String, AppVersion> versionNames;
	SortedMap<Long, AppVersion> timeStamps;
	@Override
	protected void setUp() throws Exception {
		super.setUp();
		
		versionNames = new HashMap<String, AppVersion>();
		timeStamps = new TreeMap<Long, AppVersion>();
		Set<AppVersion> versions = new HashSet<AppVersion>();
		versions.add(new AppVersion(0, Date.parse("June 1, 2005"), "v1.0"));
		versions.add(new AppVersion(1, Date.parse("June 10, 2005"), "v1.1"));
		versions.add(new AppVersion(2, Date.parse("June 20, 2005"), "v2.0"));
		
		for(AppVersion v : versions) {
			versionNames.put(v.getReleaseName(), v);
			timeStamps.put(v.getTimestamp(), v);
		}
	}
	
	public void test0() {
		assertEquals(0,Filter.FilterCommandLine.getVersionNum(versionNames, timeStamps, "0", true, 3));
	}
	public void testminusOne() {
		assertEquals(2,Filter.FilterCommandLine.getVersionNum(versionNames, timeStamps, "-1", true, 3));
	}
	public void testminusTwo() {
		assertEquals(2,Filter.FilterCommandLine.getVersionNum(versionNames, timeStamps, "-1", true, 3));
	}
	public void test1() {
		assertEquals(1,Filter.FilterCommandLine.getVersionNum(versionNames, timeStamps, "1", true, 3));
	}
	public void testV1_0() {
		assertEquals(0,Filter.FilterCommandLine.getVersionNum(versionNames, timeStamps, "v1.0", true, 3));<commit_msg>get rid of deprecated method<commit_after>package edu.umd.cs.findbugs.workflow;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.SortedMap;
import java.util.TreeMap;

import junit.framework.TestCase;
import edu.umd.cs.findbugs.AppVersion;

public class FindSeqNumTest extends TestCase {

	Map<String, AppVersion> versionNames;
	SortedMap<Long, AppVersion> timeStamps;
	@Override
	protected void setUp() throws Exception {
		super.setUp();
		
		versionNames = new HashMap<String, AppVersion>();
		timeStamps = new TreeMap<Long, AppVersion>();
		Set<AppVersion> versions = new HashSet<AppVersion>();
        SimpleDateFormat format = new SimpleDateFormat("MMMMM dd, yyyy");
		versions.add(new AppVersion(0, format.parse("June 1, 2005"), "v1.0"));
		versions.add(new AppVersion(1, format.parse("June 10, 2005"), "v1.1"));
		versions.add(new AppVersion(2, format.parse("June 20, 2005"), "v2.0"));
		
		for(AppVersion v : versions) {
			versionNames.put(v.getReleaseName(), v);
			timeStamps.put(v.getTimestamp(), v);
		}
	}
	
	public void test0() {
		assertEquals(0,Filter.FilterCommandLine.getVersionNum(versionNames, timeStamps, "0", true, 3));
	}
	public void testminusOne() {
		assertEquals(2,Filter.FilterCommandLine.getVersionNum(versionNames, timeStamps, "-1", true, 3));
	}
	public void testminusTwo() {
		assertEquals(2,Filter.FilterCommandLine.getVersionNum(versionNames, timeStamps, "-1", true, 3));
	}
	public void test1() {
		assertEquals(1,Filter.FilterCommandLine.getVersionNum(versionNames, timeStamps, "1", true, 3));
	}
	public void testV1_0() {
		assertEquals(0,Filter.FilterCommandLine.getVersionNum(versionNames, timeStamps, "v1.0", true, 3));
{'fraction_non_alphanumeric': 0.14318975552968569, 'fraction_numerical': 0.02677532013969732, 'mean_word_length': 5.73921568627451, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '5325857', 'n_tokens_mistral': 1249, 'n_tokens_neox': 1141, 'n_words': 241}