TestData () { TestData data; try { data = (TestData)super.clone(); } catch (CloneNotSupportedException e) { //can't happen right? //noinspection CallToPrintStackTrace e.printStackTrace(); data = new TestData(); } data.TEST_SEARCH_SCOPE = new TestSearchScope.Wrapper(); data.TEST_PROPERTIES = new HashMap<>(); data.TEST_PROPERTIES.putAll(TEST_PROPERTIES); data.TEST_LISTENERS = new ArrayList<>(); data.TEST_LISTENERS.addAll(TEST_LISTENERS); data.USE_DEFAULT_REPORTERS = USE_DEFAULT_REPORTERS; data.ENVS = new LinkedHashMap<>(ENVS); data.myPatterns = new LinkedHashSet<>(); data.myPatterns.addAll(myPatterns); data.setScope(getScope()); return data; }