<commit_before>package com.nhn.pinpoint.profiler.tools;

import com.nhn.pinpoint.bootstrap.config.ProfilerConfig;
import com.nhn.pinpoint.profiler.sender.DataSender;
import com.nhn.pinpoint.profiler.sender.TcpDataSender;
import com.nhn.pinpoint.profiler.sender.UdpDataSender;

/**
 * 
 * @author netspider
 * 
 */
public class NetworkAvailabilityChecker implements PinpointTools {
	public static void main(String[] args) {
		if (args.length != 1) {
			System.out.println("usage : " + NetworkAvailabilityChecker.class.getSimpleName() + " AGENT_CONFIG_FILE");
			return;
		}

		String configPath = args[0];

        DataSender udpSender = null;
        DataSender udpSpanSender = null;
        DataSender tcpSender = null
		try {
			ProfilerConfig profilerConfig = new ProfilerConfig();
			profilerConfig.readConfigFile(configPath);

			String collector = profilerConfig.getCollectorServerIp();
			int uPort = profilerConfig.getCollectorUdpServerPort();
			int usPort = profilerConfig.getCollectorUdpSpanServerPort();
			int tPort = profilerConfig.getCollectorTcpServerPort();

			udpSender = new UdpDataSender(collector, uPort, "UDP", 10);
			udpSpanSender = new UdpDataSender(collector, usPort, "UDP-SPAN", 10);
			tcpSender = new TcpDataSender(collector, tPort);

			boolean udpSenderResult = udpSender.isNetworkAvalable();
			boolean udpSpanSenderResult = udpSpanSender.isNetworkAvalable();
			boolean tcpSenderResult = tcpSender.isNetworkAvalable();<commit_msg>[강운덕] [WEB-98] findbug 지적사항 수정.<commit_after>package com.nhn.pinpoint.profiler.tools;

import com.nhn.pinpoint.bootstrap.config.ProfilerConfig;
import com.nhn.pinpoint.profiler.sender.DataSender;
import com.nhn.pinpoint.profiler.sender.TcpDataSender;
import com.nhn.pinpoint.profiler.sender.UdpDataSender;

/**
 * 
 * @author netspider
 * 
 */
public class NetworkAvailabilityChecker implements PinpointTools {
	public static void main(String[] args) {
		if (args.length != 1) {
			System.out.println("usage : " + NetworkAvailabilityChecker.class.getSimpleName() + " AGENT_CONFIG_FILE");
			return;
		}

		String configPath = args[0];

        DataSender udpSender = null;
        DataSender udpSpanSender = null;
        DataSender tcpSender = null;
		try {
			ProfilerConfig profilerConfig = new ProfilerConfig();
			profilerConfig.readConfigFile(configPath);

			String collector = profilerConfig.getCollectorServerIp();
			int uPort = profilerConfig.getCollectorUdpServerPort();
			int usPort = profilerConfig.getCollectorUdpSpanServerPort();
			int tPort = profilerConfig.getCollectorTcpServerPort();

			udpSender = new UdpDataSender(collector, uPort, "UDP", 10);
			udpSpanSender = new UdpDataSender(collector, usPort, "UDP-SPAN", 10);
			tcpSender = new TcpDataSender(collector, tPort);

			boolean udpSenderResult = udpSender.isNetworkAvalable();
			boolean udpSpanSenderResult = udpSpanSender.isNetworkAvalable();
			boolean tcpSenderResult = tcpSender.isNetworkAvalable();
{'fraction_non_alphanumeric': 0.10281642348150662, 'fraction_numerical': 0.004750593824228029, 'mean_word_length': 5.004073319755601, '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': '6819141', 'n_tokens_mistral': 1019, 'n_tokens_neox': 949, 'n_words': 171}