<commit_before>public class RedundantNullCheck {
	public void foo(String s) {
		System.out.println(s.hashCode());

		if (s != null) { // bug
			System.out.println("Yeah");

			if (s != null) { // not as bad - low priority warning
				System.out.println("Oh my");
			}
		}

		Object o = new Object();
		if (o != null) { // low priority
			System.out.println(o.hashCode());
		}

		Object o2 = null;
		if (o2 == null) { // low priority
			System.out.println("This is silly");
		}
	}

	public int bar(String s) {
		try {
		if (s == null)
			return 17;
		else return 42;
		} finally {
		// Should not signal a RCN warning here
		if (s != null) System.out.println("foo");
		}
		}
		
		
}

// vim:ts=4<commit_msg>Added new RCN test case<commit_after>public class RedundantNullCheck {
	public void foo(String s) {
		System.out.println(s.hashCode());

		if (s != null) { // bug
			System.out.println("Yeah");

			if (s != null) { // not as bad - low priority warning
				System.out.println("Oh my");
			}
		}

		Object o = new Object();
		if (o != null) { // low priority
			System.out.println(o.hashCode());
		}

		Object o2 = null;
		if (o2 == null) { // low priority
			System.out.println("This is silly");
		}
	}

   public int baz(String s) {
	if (s.hashCode() > 0) return s.hashCode();
	if (s == null) throw new NullPointerException("Foo");
    return -s.hashCode();
	}

	public int bar(String s) {
		try {
		if (s == null)
			return 17;
		else return 42;
		} finally {
		// Should not signal a RCN warning here
		if (s != null) System.out.println("foo");
		}
		}
		
		
}

// vim:ts=4
{'fraction_non_alphanumeric': 0.1644528779253637, 'fraction_numerical': 0.009487666034155597, 'mean_word_length': 2.5711060948081266, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '4107866', 'n_tokens_mistral': 662, 'n_tokens_neox': 568, 'n_words': 162}