<commit_before>package org.openbaton.nfvo.api;

import org.openbaton.exceptions.NotFoundException;
import org.openbaton.nfvo.security.interfaces.UserManagement;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by lto on 13/10/16.
 */
@RestController
@RequestMapping("/api/v1/main")
public class RestMain {

  @Value("${nfvo.rabbit.brokerIp}")
  private String nfvoIp;

  @Value("${server.port}")
  private String nfvoPort;

  @Autowired private UserManagement userManagement;

  @RequestMapping(
    value = "version",
    method = RequestMethod.GET,
    produces = MediaType.TEXT_PLAIN_VALUE
  )
  public String getVersion() {
    return RestMain.class.getPackage().getImplementationVersion();
  }

  @RequestMapping(
    value = "openbaton-rc",
    method = RequestMethod.GET,
    produces = MediaType.APPLICATION_OCTET_STREAM_VALUE
  )
  public String getOpenRCFile(@RequestHeader("project-id") String projectId)
      throws NotFoundException {
    return getOpenRcFile(projectId);<commit_msg>Imp: fix test<commit_after>package org.openbaton.nfvo.api;

import org.openbaton.exceptions.NotFoundException;
import org.openbaton.nfvo.security.interfaces.UserManagement;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by lto on 13/10/16.
 */
@RestController
@RequestMapping("/api/v1/main")
@ConfigurationProperties
public class RestMain {

  public String getNfvoIp() {
    return nfvoIp;
  }

  public void setNfvoIp(String nfvoIp) {
    this.nfvoIp = nfvoIp;
  }

  public String getNfvoPort() {
    return nfvoPort;
  }

  public void setNfvoPort(String nfvoPort) {
    this.nfvoPort = nfvoPort;
  }

  @Value("${nfvo.rabbit.brokerIp:localhost}")
  private String nfvoIp;

  @Value("${server.port:8080}")
  private String nfvoPort;

  @Autowired private UserManagement userManagement;

  @RequestMapping(
    value = "version",
    method = RequestMethod.GET,
    produces = MediaType.TEXT_PLAIN_VALUE
  )
  public String getVersion() {
    return RestMain.class.getPackage().getImplementationVersion();
  }

  @RequestMapping(
    value = "openbaton-rc",
    method = RequestMethod.GET,
    produces = MediaType.APPLICATION_OCTET_STREAM_VALUE
  )
  public String getOpenRCFile(@RequestHeader("project-id") String projectId)
      throws NotFoundException {
    return getOpenRcFile(projectId);
{'fraction_non_alphanumeric': 0.10516252390057361, 'fraction_numerical': 0.0057361376673040155, 'mean_word_length': 5.048169556840077, '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': '4362588', 'n_tokens_mistral': 958, 'n_tokens_neox': 942, 'n_words': 166}