<commit_before>import java.util.*;

public class ListSumChecker {
	public static void main(String[] args) {
		
		Set<Integer> myNumList = new HashSet<Integer>(); // hashSet for actual numbers
		Set<Integer> inversList = new HashSet<Integer>(); // hashSet for invers numbers
		
		int myInt;
		
		System.out.println("Enter your result to calculate from two Sums of the hashSet: ");		
		Scanner scanResult = new Scanner(System.in);		
		int result = scanResult.nextInt();
		
		System.out.println("Enter a valid Integer to add to the hashSet");
		System.out.println("(Hint: add '0' to stop scaning)");
		
		int nextListInt;
		do {
		Scanner scanList = new Scanner(System.in);
		nextListInt = scanList.nextInt();
		myNumList.add(nextListInt);
		} while (0 < nextListInt && nextListInt < 99 );
		
		myNumList.remove(0);
		
		System.out.println("The list to check:");
		System.out.println(myNumList + "\n");

		Iterator myIterator = myNumList.iterator();
		while (myIterator.hasNext()) {
			myInt = (Integer) myIterator.next();
			if (inversList.contains(myInt)) {
				System.out.println("Two numbers of the hashSet add up to the result " + result + "\n" + 
				"The two numbers are: " + (result - myInt) + " and " + myInt + ".");
				return;
			} else {
				inversList.add(result - myInt);	
			}
					
		}
		System.out.println("None of these numbers add up to " + result +".");
		
		
		
	}

}
<commit_msg>Comments for more understanding<commit_after>import java.util.*;

public class ListSumChecker {
	public static void main(String[] args) {
		
		// hashSet for actual numbers
		Set<Integer> myNumList = new HashSet<Integer>();
		// hashSet for invers numbers
		Set<Integer> inversList = new HashSet<Integer>();
		
		int myInt;
		
		System.out.println("Enter your result to calculate from two Sums of the hashSet: ");		
		Scanner scanResult = new Scanner(System.in);		
		int result = scanResult.nextInt();
		
		System.out.println("Enter a valid Integer to add to the hashSet");
		System.out.println("(Hint: add '0' to stop scaning)");
		
		// scan as many integers as you want; end scanning with '0'
		int nextListInt;
		do {
		Scanner scanList = new Scanner(System.in);
		nextListInt = scanList.nextInt();
		myNumList.add(nextListInt);
		} while (nextListInt != 0);
		

		// '0' is end condition and not used in the hastSet
		myNumList.remove(0);
		
		System.out.println("The list to check:");
		System.out.println(myNumList + "\n");

		// iterate through myNumList
		Iterator myIterator = myNumList.iterator();
		// add the number to inversList if its not already included
		while (myIterator.hasNext()) {
			myInt = (Integer) myIterator.next();
			if (inversList.contains(myInt)) {
				System.out.println("Two numbers of the hashSet add up to the result " + result + "\n" + 
				"The two numbers are: " + (result - myInt) + " and " + myInt + ".");
				return;
			} else {
				inversList.add(result - myInt);	
			}
					
		}
		System.out.println("None of these numbers add up to " + result +".");
		
		
		
	}

}

{'fraction_non_alphanumeric': 0.13131648936170212, 'fraction_numerical': 0.003324468085106383, 'mean_word_length': 3.262039660056657, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, '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': '218960', 'n_tokens_mistral': 1114, 'n_tokens_neox': 952, 'n_words': 285}