<commit_before>package blade.migrate.liferay70;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import org.osgi.service.component.annotations.Component;

import blade.migrate.api.FileMigrator;
import blade.migrate.core.JavaFileChecker;
import blade.migrate.core.JavaFileMigrator;
import blade.migrate.core.SearchResult;
@Component(
	property = {
		"file.extensions=java",
		"problem.summary=The getEntries method was no longer used, and contained hardcoded references to classes that will be moved into OSGi bundles.",
		"problem.tickets=LPS-56247",
		"problem.title=Removed Method getEntries from DL, DLImpl, and DLUtil Classes",
		"problem.url=https://github.com/liferay/liferay-portal/blob/master/readme/7.0/BREAKING_CHANGES.markdown#removed-method-getentries-from-dl-dlimpl-and-dlutil-classes"
	},
	service = FileMigrator.class
)
public class DLGetEntriesInvocation extends JavaFileMigrator {

	@Override
	protected List<SearchResult> searchJavaFile(File file) {
		final List<SearchResult> searchResults = new ArrayList<SearchResult>();
		final JavaFileChecker javaFileChecker = new JavaFileChecker(file);

		String[] argTypes = new String[]{"Hits"};
		List<SearchResult> dlResultsType = javaFileChecker.findMethodInvocations("DL", null, "getEntries", argTypes);
		List<SearchResult> dlResultsStatic = javaFileChecker.findMethodInvocations(null, "DL", "getEntries", argTypes);
		List<SearchResult> dlImplresultsType = javaFileChecker.findMethodInvocations("DLImpl", null, "getEntries",
				null);
		List<SearchResult> dlImplresultsStatic = javaFileChecker.findMethodInvocations(null, "DLImpl", "getEntries",
				argTypes);
		List<SearchResult> dlUtilresultsType = javaFileChecker.findMethodInvocations("DLUtil", null, "getEntries",
				argTypes);
		List<SearchResult> dlUtilresultsStatic = javaFileChecker.findMethodInvocations(null, "DLUtil", "getEntries",
				argTypes);

		searchResults.addAll(dlResultsType);
		searchResults.addAll(dlResultsStatic);
		searchResults.addAll(dlImplresultsType);
		searchResults.addAll(dlImplresultsStatic);
		searchResults.addAll(dlUtilresultsType);
		searchResults.addAll(dlUtilresultsStatic);

		return searchResults;

	}

}<commit_msg>[migrator] source formatting<commit_after>package blade.migrate.liferay70;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import org.osgi.service.component.annotations.Component;

import blade.migrate.api.FileMigrator;
import blade.migrate.core.JavaFileChecker;
import blade.migrate.core.JavaFileMigrator;
import blade.migrate.core.SearchResult;
@Component(
	property = {
		"file.extensions=java",
		"problem.summary=The getEntries method was no longer used, and contained hardcoded references to classes that will be moved into OSGi bundles.",
		"problem.tickets=LPS-56247",
		"problem.title=Removed Method getEntries from DL, DLImpl, and DLUtil Classes",
		"problem.url=https://github.com/liferay/liferay-portal/blob/master/readme/7.0/BREAKING_CHANGES.markdown#removed-method-getentries-from-dl-dlimpl-and-dlutil-classes"
	},
	service = FileMigrator.class
)
public class DLGetEntriesInvocation extends JavaFileMigrator {

	@Override
	protected List<SearchResult> searchJavaFile(File file) {
		final List<SearchResult> searchResults = new ArrayList<SearchResult>();
		final JavaFileChecker javaFileChecker = new JavaFileChecker(file);

		final String[] argTypes = new String[] { "Hits" };

		searchResults.addAll(javaFileChecker.findMethodInvocations("DL", null,
				"getEntries", argTypes));

		searchResults.addAll(javaFileChecker.findMethodInvocations(null, "DL",
				"getEntries", argTypes));

		searchResults.addAll(javaFileChecker.findMethodInvocations("DLImpl",
				null, "getEntries", null));

		searchResults.addAll(javaFileChecker.findMethodInvocations(null,
				"DLImpl", "getEntries", argTypes));

		searchResults.addAll(javaFileChecker.findMethodInvocations("DLUtil",
				null, "getEntries", argTypes));

		searchResults.addAll(javaFileChecker.findMethodInvocations(null,
				"DLUtil", "getEntries", argTypes));

		return searchResults;
	}

}
{'fraction_non_alphanumeric': 0.1111111111111111, 'fraction_numerical': 0.004405286343612335, 'mean_word_length': 6.582560296846011, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 2, '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': '6544154', 'n_tokens_mistral': 1341, 'n_tokens_neox': 1263, 'n_words': 230}