<commit_before>package org.sis.connector;

import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.ExponentialBackoffRetry;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.AsyncClientHttpRequestFactory;
import org.springframework.http.client.HttpComponentsAsyncClientHttpRequestFactory;
import org.springframework.web.client.AsyncRestTemplate;

@Configuration
public class ConnectorConfiguration {

  private static final int HTTP_READ_TIMEOUT_IN_MILLIS = 2_000;
  private static final int HTTP_CONNECT_TIMEOUT_IN_MILLIS = 2_000;

  @Bean
  @Autowired
  public AsyncRestTemplate asyncRestTemplate(AsyncClientHttpRequestFactory asyncClientHttpRequestFactory) {
    return new AsyncRestTemplate(asyncClientHttpRequestFactory);
  }

  @Bean
  public AsyncClientHttpRequestFactory asyncClientHttpRequestFactory() {
    HttpComponentsAsyncClientHttpRequestFactory factory = new HttpComponentsAsyncClientHttpRequestFactory();
    factory.setReadTimeout(HTTP_READ_TIMEOUT_IN_MILLIS);
    factory.setConnectTimeout(HTTP_CONNECT_TIMEOUT_IN_MILLIS);
    return factory;
  }

  @Bean(initMethod = "start", destroyMethod = "close")
  public CuratorFramework curatorFramework() {
    return CuratorFrameworkFactory.newClient("localhost:9001", new ExponentialBackoffRetry(1000, 3));
  }
}<commit_msg>Hardcoded default port for embedded ZK<commit_after>package org.sis.connector;

import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.ExponentialBackoffRetry;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.AsyncClientHttpRequestFactory;
import org.springframework.http.client.HttpComponentsAsyncClientHttpRequestFactory;
import org.springframework.web.client.AsyncRestTemplate;

@Configuration
public class ConnectorConfiguration {

  private static final int HTTP_READ_TIMEOUT_IN_MILLIS = 2_000;
  private static final int HTTP_CONNECT_TIMEOUT_IN_MILLIS = 2_000;

  @Bean
  @Autowired
  public AsyncRestTemplate asyncRestTemplate(AsyncClientHttpRequestFactory asyncClientHttpRequestFactory) {
    return new AsyncRestTemplate(asyncClientHttpRequestFactory);
  }

  @Bean
  public AsyncClientHttpRequestFactory asyncClientHttpRequestFactory() {
    HttpComponentsAsyncClientHttpRequestFactory factory = new HttpComponentsAsyncClientHttpRequestFactory();
    factory.setReadTimeout(HTTP_READ_TIMEOUT_IN_MILLIS);
    factory.setConnectTimeout(HTTP_CONNECT_TIMEOUT_IN_MILLIS);
    return factory;
  }

  @Bean(initMethod = "start", destroyMethod = "close")
  public CuratorFramework curatorFramework() {
    return CuratorFrameworkFactory.newClient("localhost:9983", new ExponentialBackoffRetry(1000, 3));
  }
}
{'fraction_non_alphanumeric': 0.07131384516543528, 'fraction_numerical': 0.01092194025056216, 'mean_word_length': 7.65, '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': '6645309', 'n_tokens_mistral': 839, 'n_tokens_neox': 830, 'n_words': 143}