<commit_before>package com.payu.discovery.server;


import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.payu.discovery.model.ServiceDescriptor;

@Controller
public class StatusController {

    private final DiscoveryServer discoveryServer;

    @Autowired
    public StatusController(DiscoveryServer discoveryServer) {
        this.discoveryServer = discoveryServer;
    }

    @RequestMapping(value = "/services", method = RequestMethod.GET)
    public String greeting(Model model) {
        Collection<ServiceDescriptor> services = discoveryServer.fetchAllServices();
        if (!services.isEmpty()){
            model.addAttribute("services", services);
        }
        return "services";
    }

}<commit_msg>simplifed<commit_after>package com.payu.discovery.server.monitoring;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.payu.discovery.model.ServiceDescriptor;
import com.payu.discovery.server.DiscoveryServer;

@Controller
public class StatusController {

    private final DiscoveryServer discoveryServer;

    @Autowired
    public StatusController(DiscoveryServer discoveryServer) {
        this.discoveryServer = discoveryServer;
    }

    @RequestMapping(value = "/services")
    public String greeting() {
        return "services";
    }

    @ModelAttribute("services")
    public Collection<ServiceDescriptor> populateFeatures() {
        return discoveryServer.fetchAllServices();
    }
}
{'fraction_non_alphanumeric': 0.09253731343283582, 'fraction_numerical': 0.0, 'mean_word_length': 4.6807909604519775, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4631799', 'n_tokens_mistral': 514, 'n_tokens_neox': 499, 'n_words': 94}