<commit_before>package com.emc.mongoose.api.common.net;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.rmi.server.RMIServerSocketFactory;
import java.rmi.server.RMISocketFactory;

/**
 Created by andrey on 15.07.17.
 */
public final class FixedPortRmiSocketFactory
extends RMISocketFactory
implements RMIServerSocketFactory {

	public int fixedPort;

	public FixedPortRmiSocketFactory(final int fixedPort) {
		this.fixedPort = fixedPort;
	}

	public final void setFixedPort(final int fixedPort) {
		this.fixedPort = fixedPort;
	}

	@Override
	public final Socket createSocket(final String host, final int port)
	throws IOException {
		return new Socket(host, fixedPort);
	}

	@Override
	public final ServerSocket createServerSocket(final int port)
	throws IOException {
		System.out.println("New server socket @ port # " + port);
		return new ServerSocket(fixedPort);
	}
}<commit_msg>need test another fixed RMI ports approach<commit_after>package com.emc.mongoose.api.common.net;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.rmi.server.RMIServerSocketFactory;
import java.rmi.server.RMISocketFactory;

/**
 Created by andrey on 15.07.17.
 */
public final class FixedPortRmiSocketFactory
extends RMISocketFactory
implements RMIServerSocketFactory {

	public int fixedPort;

	public FixedPortRmiSocketFactory(final int fixedPort) {
		this.fixedPort = fixedPort;
	}

	public final void setFixedPort(final int fixedPort) {
		this.fixedPort = fixedPort;
	}

	@Override
	public final Socket createSocket(final String host, final int port)
	throws IOException {
		System.out.println("New socket @ port # " + port);
		return new Socket(host, port);
	}

	@Override
	public final ServerSocket createServerSocket(final int port)
	throws IOException {
		System.out.println("New server socket @ port # " + port);
		return new ServerSocket(port);
	}
}
{'fraction_non_alphanumeric': 0.08677685950413223, 'fraction_numerical': 0.006198347107438017, 'mean_word_length': 5.072100313479623, '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': '6350267', 'n_tokens_mistral': 628, 'n_tokens_neox': 587, 'n_words': 160}