<commit_before>package ru.job4j;

public class ContainString {
	
	private boolean result;
	
	public boolean contains(String origin, String sub) {
		
		char[] originBuf = new char[origin.length()];
		char[] subBuf = new char[sub.length()];
		
		origin.getChars(0, origin.length(), originBuf, 0);
		sub.getChars(0, sub.length(), subBuf, 0);
		
		for (int j = 0; j < origin.length(); j++) {
			if (originBuf[j] == subBuf[0]) {
				boolean[] bool = new boolean[sub.length()];
				for (int i = 0; i < bool.length; i++) {
					bool[i] = (originBuf[j + i] == subBuf[i]);
				}
				for (int a = 0; a < bool.length; a++) {
					this.result |= bool[a];
				}
				if (this.result == true) {
					break;
				}
			}
		}
		return this.result;
	}
}<commit_msg>task 228 edited<commit_after>package ru.job4j;

public class ContainString {
	
	public boolean contains(String origin, String sub) {
		
		boolean result = true;
		
		char[] originBuf = origin.toCharArray();
		char[] subBuf = sub.toCharArray();
		
		boolean[] bool = new boolean[sub.length()];
		
		for (int j = 0; j < originBuf.length; j++) {
			if (originBuf[j] == subBuf[0]) {
				for (int i = 0; i < bool.length; i++) {
					bool[i] = (originBuf[j + i] == subBuf[i]);
					result &= bool[i];
				}
				if (result == true) {
					break;
				}
			}
		}
		return result;
	}
}
{'fraction_non_alphanumeric': 0.1734848484848485, 'fraction_numerical': 0.012121212121212121, 'mean_word_length': 2.8069164265129682, 'pattern_counts': {'":': 0, '<': 8, '<?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': '5446496', 'n_tokens_mistral': 586, 'n_tokens_neox': 466, 'n_words': 125}