package bugIdeas;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import junit.framework.TestCase;

public class Ideas_2008_11_14 extends TestCase {
	
	
	
	public void testOne() {
		HashMap<String,String> m = new HashMap<String,String>();
		m.put("a","a");
		assertFalse(m.containsKey(1));
		assertFalse(m.containsValue(1));
		assertFalse(m.entrySet().contains(1));
		assertFalse(m.keySet().contains(1));
		assertFalse(m.values().contains(1));
	}
	HashMap<String,String> m = new HashMap<String,String>();
	Set<Integer> is = new HashSet<Integer>();
	
	public void foo() {

		m.put("a","a");
		Set<Map.Entry<Integer,Integer>> es = new HashSet<Map.Entry<Integer,Integer>>();	
		boolean b1 = m.entrySet().contains(1);
		boolean b2 = m.keySet().contains(1);
		boolean b3 = m.values().contains(1);
		boolean b4 = m.entrySet().equals(es);
		boolean b5 = m.entrySet().equals(is);
		 m.entrySet().contains(1);
		boolean b6 = m.keySet().equals(is);
		boolean b7 = m.values().equals(is);
		System.out.printf("%b %b %b %b %b %b %b\n", b1, b2, b3, b4, b5, b6, b7);
	}
}

@@ -748,32 +748,39 @@
 t().contains(1);
+ // bad
 %0A%09%09boolean b2 = 
@@ -794,32 +794,38 @@
 t().contains(1);
+ // ok
 %0A%09%09boolean b3 = 
@@ -839,32 +839,38 @@
 s().contains(1);
+ // ok
 %0A%09%09boolean b4 = 
@@ -893,16 +893,22 @@
 als(es);
+ // ok
 %0A%09%09boole
@@ -939,16 +939,23 @@
 als(is);
+ // bad
 %0A%09%09 m.en
@@ -975,16 +975,23 @@
 ains(1);
+ // bad
 %0A%09%09boole
@@ -1020,16 +1020,22 @@
 als(is);
+ // ok
 %0A%09%09boole
@@ -1064,16 +1064,22 @@
 als(is);
+ // ok
 %0A%09%09Syste

Add comments as to which calls are oK and which are bad