<commit_before>package ez.dork.stock.service.impl;

import java.util.Calendar;
import java.util.List;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import ez.dork.stock.domain.Stock;
import ez.dork.stock.service.StockService;

public class StockServiceImplTest {
//	private static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");

	public static void main(String[] args) {
		ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("classpath*:META-INF/spring/*.xml");
		StockService stockService = ctx.getBean(StockService.class);

//		List<Stock> resultList1 = stockService.selectHeighestStockList(Calendar.getInstance(), 1);
//		printStockList(resultList1);
//		List<Stock> resultList2 = stockService.selectHeighestStockList(Calendar.getInstance(), 2);
//		printStockList(resultList2);
//		List<Stock> resultList3 = stockService.selectHeighestStockList(Calendar.getInstance(), 3);
//		printStockList(resultList3);
//		List<Stock> resultList5 = stockService.selectHeighestStockList(Calendar.getInstance(), 5);
//		printStockList(resultList5);
//		List<Stock> resultList10 = stockService.selectHeighestStockList(Calendar.getInstance(), 10);
//		printStockList(resultList10);
		List<Stock> resultListAll = stockService.selectHeighestStockList(Calendar.getInstance(), null);
		printStockList(resultListAll);
//
//		resultList1.removeAll(resultList2);
//		resultList1.removeAll(resultList3);
//		resultList1.removeAll(resultList5);
//		resultList1.removeAll(resultList10);
//		resultList1.removeAll(resultListAll);
//
//		printStockList(resultListAll);
	}
	
	private static void printStockList(List<Stock> resultList) {
		System.out.println(String.format("==== %s ====", resultList.get(0).getDate()));
		System.out.println("code, close");
		for (Stock stock : resultList) {
			System.out.println(String.format("%s, %.2f", stock.getCode(), stock.getClose()));
		}
	}
}<commit_msg>測試 20131111號的標的<commit_after>package ez.dork.stock.service.impl;

import java.util.Calendar;
import java.util.List;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import ez.dork.stock.domain.Stock;
import ez.dork.stock.service.StockService;

public class StockServiceImplTest {
//	private static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");

	public static void main(String[] args) {
		ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("classpath*:META-INF/spring/*.xml");
		StockService stockService = ctx.getBean(StockService.class);

//		List<Stock> resultList1 = stockService.selectHeighestStockList(Calendar.getInstance(), 1);
//		printStockList(resultList1);
//		List<Stock> resultList2 = stockService.selectHeighestStockList(Calendar.getInstance(), 2);
//		printStockList(resultList2);
//		List<Stock> resultList3 = stockService.selectHeighestStockList(Calendar.getInstance(), 3);
//		printStockList(resultList3);
//		List<Stock> resultList5 = stockService.selectHeighestStockList(Calendar.getInstance(), 5);
//		printStockList(resultList5);
//		List<Stock> resultList10 = stockService.selectHeighestStockList(Calendar.getInstance(), 10);
//		printStockList(resultList10);
		Calendar calendar = Calendar.getInstance();
		calendar.set(Calendar.YEAR, 2013);
		calendar.set(Calendar.MONTH, 10);
		calendar.set(Calendar.DAY_OF_MONTH, 11);
		List<Stock> resultListAll = stockService.selectHeighestStockList(calendar, null);
		printStockList(resultListAll);
//
//		resultList1.removeAll(resultList2);
//		resultList1.removeAll(resultList3);
//		resultList1.removeAll(resultList5);
//		resultList1.removeAll(resultList10);
//		resultList1.removeAll(resultListAll);
//
//		printStockList(resultListAll);
	}
	
	private static void printStockList(List<Stock> resultList) {
		System.out.println(String.format("==== %s ====", resultList.get(0).getDate()));
		System.out.println("code, close");
		for (Stock stock : resultList) {
			System.out.println(String.format("%s, %.2f", stock.getCode(), stock.getClose()));
		}
	}
}
{'fraction_non_alphanumeric': 0.14186507936507936, 'fraction_numerical': 0.018849206349206348, 'mean_word_length': 6.201785714285714, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1796801', 'n_tokens_mistral': 1400, 'n_tokens_neox': 1280, 'n_words': 184}