<commit_before>package org.springframework.roo.addon.solr;

import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.springframework.roo.model.JavaType;
import org.springframework.roo.shell.CliAvailabilityIndicator;
import org.springframework.roo.shell.CliCommand;
import org.springframework.roo.shell.CliOption;
import org.springframework.roo.shell.CommandMarker;

/**
 * Commands for the 'solr search' add-on to be used by the ROO shell.
 *
 * @author <NAME>
 * @since 1.1
 */
@Component
@Service
public class SolrCommands implements CommandMarker {

	// Fields
	@Reference private SolrOperations searchOperations;

	@CliAvailabilityIndicator({ "solr setup" })
	public boolean setupCommandAvailable() {
		return searchOperations.isInstallSearchAvailable();
	}

	@CliAvailabilityIndicator({ "solr add", "solr all" })
	public boolean solrCommandAvailable() {
		return searchOperations.isSearchAvailable();
	}

	@CliCommand(value = "solr setup", help = "Install a support for Solr search integration")
	public void setup(
		@CliOption(key = { "searchServerUrl" }, mandatory = false, unspecifiedDefaultValue = "http://localhost:8983/solr", specifiedDefaultValue = "http://localhost:8983/solr", help = "The Url of the Solr search server") final String searchServerUrl) {

		searchOperations.setupConfig(searchServerUrl);
	}

	@CliCommand(value = "solr add", help = "Make target type searchable")
	public void setup(
		@CliOption(key = "class", mandatory = false, unspecifiedDefaultValue = "*", optionContext = "update,project", help = "The target type which is made searchable") final JavaType javaType) {
		 searchOperations.addSearch(javaType);
	}

	@CliCommand(value = "solr all", help = "Make all elegible project types searchable")
	public void setup() {
		searchOperations.addAll();
	}
}<commit_msg>ROO-2745: Post 1.2.0.M1 code refactor and clean up - fixed typos and grammar in Solr commands<commit_after>package org.springframework.roo.addon.solr;

import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.springframework.roo.model.JavaType;
import org.springframework.roo.shell.CliAvailabilityIndicator;
import org.springframework.roo.shell.CliCommand;
import org.springframework.roo.shell.CliOption;
import org.springframework.roo.shell.CommandMarker;

/**
 * Commands for the 'solr search' add-on to be used by the ROO shell.
 *
 * @author <NAME>
 * @since 1.1
 */
@Component
@Service
public class SolrCommands implements CommandMarker {

	// Fields
	@Reference private SolrOperations searchOperations;

	@CliAvailabilityIndicator({ "solr setup" })
	public boolean setupCommandAvailable() {
		return searchOperations.isInstallSearchAvailable();
	}

	@CliAvailabilityIndicator({ "solr add", "solr all" })
	public boolean solrCommandAvailable() {
		return searchOperations.isSearchAvailable();
	}

	@CliCommand(value = "solr setup", help = "Install support for Solr search integration")
	public void setup(
		@CliOption(key = { "searchServerUrl" }, mandatory = false, unspecifiedDefaultValue = "http://localhost:8983/solr", specifiedDefaultValue = "http://localhost:8983/solr", help = "The URL of the Solr search server") final String searchServerUrl) {

		searchOperations.setupConfig(searchServerUrl);
	}

	@CliCommand(value = "solr add", help = "Make target type searchable")
	public void setup(
		@CliOption(key = "class", mandatory = false, unspecifiedDefaultValue = "*", optionContext = "update,project", help = "The type to be made searchable") final JavaType javaType) {
		 searchOperations.addSearch(javaType);
	}

	@CliCommand(value = "solr all", help = "Make all eligible project types searchable")
	public void setup() {
		searchOperations.addAll();
	}
}
{'fraction_non_alphanumeric': 0.11385883565172591, 'fraction_numerical': 0.0072127769191138585, 'mean_word_length': 5.592529711375212, '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': '2656331', 'n_tokens_mistral': 1187, 'n_tokens_neox': 1127, 'n_words': 298}