<commit_before>/**
 * Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies
 *
 * Please see distribution for license.
 */
package com.opengamma.financial.analytics.volatility.surface;

import org.apache.commons.lang.Validate;

import com.opengamma.core.config.ConfigSource;
import com.opengamma.id.VersionCorrection;

/**
 *
 */
public class ConfigDBFuturePriceCurveSpecificationSource implements FuturePriceCurveSpecificationSource {
  private final ConfigSource _configSource;

  public ConfigDBFuturePriceCurveSpecificationSource(final ConfigSource configSource) {
    Validate.notNull(configSource, "config source");
    _configSource = configSource;
  }

  protected ConfigSource getConfigSource() {
    return _configSource;
  }

  @Override
  public FuturePriceCurveSpecification getSpecification(final String name, final String instrumentType) {
    return _configSource.getLatestByName(FuturePriceCurveSpecification.class, name + "_" + instrumentType);
  }

  @Override
  public FuturePriceCurveSpecification getSpecification(final String name, final String instrumentType, final VersionCorrection versionCorrection) {
    return _configSource.getSingle(FuturePriceCurveSpecification.class, name, versionCorrection);
  }
}<commit_msg>[PLAT-5032] Fix versioned method<commit_after>/**
 * Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies
 *
 * Please see distribution for license.
 */
package com.opengamma.financial.analytics.volatility.surface;

import org.apache.commons.lang.Validate;

import com.opengamma.core.config.ConfigSource;
import com.opengamma.id.VersionCorrection;

/**
 *
 */
public class ConfigDBFuturePriceCurveSpecificationSource implements FuturePriceCurveSpecificationSource {
  private final ConfigSource _configSource;

  public ConfigDBFuturePriceCurveSpecificationSource(final ConfigSource configSource) {
    Validate.notNull(configSource, "config source");
    _configSource = configSource;
  }

  protected ConfigSource getConfigSource() {
    return _configSource;
  }

  @Override
  public FuturePriceCurveSpecification getSpecification(final String name, final String instrumentType) {
    return _configSource.getLatestByName(FuturePriceCurveSpecification.class, name + "_" + instrumentType);
  }

  @Override
  public FuturePriceCurveSpecification getSpecification(final String name, final String instrumentType, final VersionCorrection versionCorrection) {
    return _configSource.getSingle(FuturePriceCurveSpecification.class, name + "_" + instrumentType, versionCorrection);
  }
}
{'fraction_non_alphanumeric': 0.07451737451737452, 'fraction_numerical': 0.004633204633204633, 'mean_word_length': 5.9093333333333335, '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': '6278794', 'n_tokens_mistral': 687, 'n_tokens_neox': 684, 'n_words': 162}