package generatedtest; import java.util.Collection; import java.util.Map; import java.util.List; import org.springframework.ui.ConcurrentModel; import org.springframework.ui.Model; import org.springframework.ui.ModelMap; // Test case generated by GenerateFlowTestCase.ql public class Test { K getMapKey(Map container) { return container.keySet().iterator().next(); } V getMapValue(Map container) { return container.get(null); } String getMapKey(Model container) { return container.asMap().keySet().iterator().next(); } Object getMapValue(Model container) { return container.getAttribute(null); } String getMapKey(ConcurrentModel container) { return container.keySet().iterator().next(); } Object getMapValue(ConcurrentModel container) { return container.getAttribute(null); } String getMapKey(ModelMap container) { return container.keySet().iterator().next(); } Object getMapValue(ModelMap container) { return container.getAttribute(null); } Object source() { return null; } void sink(Object o) { } public void test() { { // "org.springframework.ui;ConcurrentModel;false;ConcurrentModel;(Object);;Argument[0];MapValue of Argument[this];value;manual" ConcurrentModel out = null; Object in = source(); out = new ConcurrentModel(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;ConcurrentModel;false;ConcurrentModel;(String,Object);;Argument[0];MapKey of Argument[this];value;manual" ConcurrentModel out = null; String in = (String)source(); out = new ConcurrentModel(in, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;ConcurrentModel;false;ConcurrentModel;(String,Object);;Argument[1];MapValue of Argument[this];value;manual" ConcurrentModel out = null; Object in = source(); out = new ConcurrentModel(null, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAllAttributes;(Collection);;Element of Argument[0];MapValue of Argument[this];value;manual" Model out = null; Collection in = List.of(source()); out.addAllAttributes(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAllAttributes;(Collection);;Element of Argument[0];MapValue of Argument[this];value;manual" ConcurrentModel out = null; Collection in = List.of(source()); out.addAllAttributes(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAllAttributes;(Collection);;Element of Argument[0];MapValue of ReturnValue;value;manual" Model out = null; Collection in = List.of(source()); Model instance = null; out = instance.addAllAttributes(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAllAttributes;(Collection);;Element of Argument[0];MapValue of ReturnValue;value;manual" ConcurrentModel out = null; Collection in = List.of(source()); ConcurrentModel instance = null; out = instance.addAllAttributes(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAllAttributes;(Map);;MapKey of Argument[0];MapKey of Argument[this];value;manual" Model out = null; Map in = Map.of(source(), null); out.addAllAttributes(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAllAttributes;(Map);;MapKey of Argument[0];MapKey of Argument[this];value;manual" ConcurrentModel out = null; Map in = Map.of(source(), null); out.addAllAttributes(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAllAttributes;(Map);;MapKey of Argument[0];MapKey of ReturnValue;value;manual" Model out = null; Map in = Map.of(source(), null); Model instance = null; out = instance.addAllAttributes(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAllAttributes;(Map);;MapKey of Argument[0];MapKey of ReturnValue;value;manual" ConcurrentModel out = null; Map in = Map.of(source(), null); ConcurrentModel instance = null; out = instance.addAllAttributes(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAllAttributes;(Map);;MapValue of Argument[0];MapValue of Argument[this];value;manual" Model out = null; Map in = Map.of(null, source()); out.addAllAttributes(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAllAttributes;(Map);;MapValue of Argument[0];MapValue of Argument[this];value;manual" ConcurrentModel out = null; Map in = Map.of(null, source()); out.addAllAttributes(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAllAttributes;(Map);;MapValue of Argument[0];MapValue of ReturnValue;value;manual" Model out = null; Map in = Map.of(null, source()); Model instance = null; out = instance.addAllAttributes(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAllAttributes;(Map);;MapValue of Argument[0];MapValue of ReturnValue;value;manual" ConcurrentModel out = null; Map in = Map.of(null, source()); ConcurrentModel instance = null; out = instance.addAllAttributes(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAllAttributes;;;Argument[this];ReturnValue;value;manual" Model out = null; Model in = (Model)source(); out = in.addAllAttributes((Map)null); sink(out); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAllAttributes;;;Argument[this];ReturnValue;value;manual" Model out = null; Model in = (Model)source(); out = in.addAllAttributes((Collection)null); sink(out); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAllAttributes;;;Argument[this];ReturnValue;value;manual" ConcurrentModel out = null; ConcurrentModel in = (ConcurrentModel)source(); out = in.addAllAttributes((Map)null); sink(out); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAllAttributes;;;Argument[this];ReturnValue;value;manual" ConcurrentModel out = null; ConcurrentModel in = (ConcurrentModel)source(); out = in.addAllAttributes((Collection)null); sink(out); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAttribute;(Object);;Argument[0];MapValue of Argument[this];value;manual" Model out = null; Object in = source(); out.addAttribute(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAttribute;(Object);;Argument[0];MapValue of Argument[this];value;manual" ConcurrentModel out = null; Object in = source(); out.addAttribute(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAttribute;(Object);;Argument[0];MapValue of ReturnValue;value;manual" Model out = null; Object in = source(); Model instance = null; out = instance.addAttribute(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAttribute;(Object);;Argument[0];MapValue of ReturnValue;value;manual" ConcurrentModel out = null; Object in = source(); ConcurrentModel instance = null; out = instance.addAttribute(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAttribute;(String,Object);;Argument[0];MapKey of Argument[this];value;manual" Model out = null; String in = (String)source(); out.addAttribute(in, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAttribute;(String,Object);;Argument[0];MapKey of Argument[this];value;manual" ConcurrentModel out = null; String in = (String)source(); out.addAttribute(in, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAttribute;(String,Object);;Argument[0];MapKey of ReturnValue;value;manual" Model out = null; String in = (String)source(); Model instance = null; out = instance.addAttribute(in, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAttribute;(String,Object);;Argument[0];MapKey of ReturnValue;value;manual" ConcurrentModel out = null; String in = (String)source(); ConcurrentModel instance = null; out = instance.addAttribute(in, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAttribute;(String,Object);;Argument[1];MapValue of Argument[this];value;manual" Model out = null; Object in = source(); out.addAttribute(null, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAttribute;(String,Object);;Argument[1];MapValue of Argument[this];value;manual" ConcurrentModel out = null; Object in = source(); out.addAttribute(null, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAttribute;(String,Object);;Argument[1];MapValue of ReturnValue;value;manual" Model out = null; Object in = source(); Model instance = null; out = instance.addAttribute(null, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAttribute;(String,Object);;Argument[1];MapValue of ReturnValue;value;manual" ConcurrentModel out = null; Object in = source(); ConcurrentModel instance = null; out = instance.addAttribute(null, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAttribute;;;Argument[this];ReturnValue;value;manual" Model out = null; Model in = (Model)source(); out = in.addAttribute(null, null); sink(out); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAttribute;;;Argument[this];ReturnValue;value;manual" Model out = null; Model in = (Model)source(); out = in.addAttribute(null); sink(out); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAttribute;;;Argument[this];ReturnValue;value;manual" ConcurrentModel out = null; ConcurrentModel in = (ConcurrentModel)source(); out = in.addAttribute(null, null); sink(out); // $hasValueFlow } { // "org.springframework.ui;Model;true;addAttribute;;;Argument[this];ReturnValue;value;manual" ConcurrentModel out = null; ConcurrentModel in = (ConcurrentModel)source(); out = in.addAttribute(null); sink(out); // $hasValueFlow } { // "org.springframework.ui;Model;true;asMap;;;MapKey of Argument[this];MapKey of ReturnValue;value;manual" Map out = null; Model in = new ConcurrentModel((String)source(), null); out = in.asMap(); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;asMap;;;MapKey of Argument[this];MapKey of ReturnValue;value;manual" Map out = null; ConcurrentModel in = new ConcurrentModel((String)source(), null); out = in.asMap(); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;asMap;;;MapValue of Argument[this];MapValue of ReturnValue;value;manual" Map out = null; Model in = (Model)Map.of(null, source()); out = in.asMap(); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;asMap;;;MapValue of Argument[this];MapValue of ReturnValue;value;manual" Map out = null; ConcurrentModel in = new ConcurrentModel(null, source()); out = in.asMap(); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;getAttribute;;;MapValue of Argument[this];ReturnValue;value;manual" Object out = null; Model in = (Model)Map.of(null, source()); out = in.getAttribute(null); sink(out); // $hasValueFlow } { // "org.springframework.ui;Model;true;getAttribute;;;MapValue of Argument[this];ReturnValue;value;manual" Object out = null; ConcurrentModel in = new ConcurrentModel(null, source()); out = in.getAttribute(null); sink(out); // $hasValueFlow } { // "org.springframework.ui;Model;true;mergeAttributes;;;Argument[this];ReturnValue;value;manual" Model out = null; Model in = (Model)source(); out = in.mergeAttributes(null); sink(out); // $hasValueFlow } { // "org.springframework.ui;Model;true;mergeAttributes;;;Argument[this];ReturnValue;value;manual" ConcurrentModel out = null; ConcurrentModel in = (ConcurrentModel)source(); out = in.mergeAttributes(null); sink(out); // $hasValueFlow } { // "org.springframework.ui;Model;true;mergeAttributes;;;MapKey of Argument[this];MapKey of ReturnValue;value;manual" Model out = null; Model in = new ConcurrentModel((String)source(), null); out = in.mergeAttributes(null); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;mergeAttributes;;;MapKey of Argument[this];MapKey of ReturnValue;value;manual" ConcurrentModel out = null; ConcurrentModel in = new ConcurrentModel((String)source(), null); out = in.mergeAttributes(null); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;mergeAttributes;;;MapKey of Argument[0];MapKey of Argument[this];value;manual" Model out = null; Map in = Map.of(source(), null); out.mergeAttributes(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;mergeAttributes;;;MapKey of Argument[0];MapKey of Argument[this];value;manual" ConcurrentModel out = null; Map in = Map.of(source(), null); out.mergeAttributes(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;mergeAttributes;;;MapValue of Argument[this];MapValue of ReturnValue;value;manual" Model out = null; Model in = (Model)Map.of(null, source()); out = in.mergeAttributes(null); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;mergeAttributes;;;MapValue of Argument[this];MapValue of ReturnValue;value;manual" ConcurrentModel out = null; ConcurrentModel in = new ConcurrentModel(null, source()); out = in.mergeAttributes(null); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;mergeAttributes;;;MapValue of Argument[0];MapValue of Argument[this];value;manual" Model out = null; Map in = Map.of(null, source()); out.mergeAttributes(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;Model;true;mergeAttributes;;;MapValue of Argument[0];MapValue of Argument[this];value;manual" ConcurrentModel out = null; Map in = Map.of(null, source()); out.mergeAttributes(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;ModelMap;(Object);;Argument[0];MapValue of Argument[this];value;manual" ModelMap out = null; Object in = source(); out = new ModelMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;ModelMap;(String,Object);;Argument[0];MapKey of Argument[this];value;manual" ModelMap out = null; String in = (String)source(); out = new ModelMap(in, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;ModelMap;(String,Object);;Argument[1];MapValue of Argument[this];value;manual" ModelMap out = null; Object in = source(); out = new ModelMap(null, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;addAllAttributes;(Collection);;Element of Argument[0];MapValue of Argument[this];value;manual" ModelMap out = null; Collection in = List.of(source()); out.addAllAttributes(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;addAllAttributes;(Collection);;Element of Argument[0];MapValue of ReturnValue;value;manual" ModelMap out = null; Collection in = List.of(source()); ModelMap instance = null; out = instance.addAllAttributes(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;addAllAttributes;(Map);;MapKey of Argument[0];MapKey of Argument[this];value;manual" ModelMap out = null; Map in = Map.of(source(), null); out.addAllAttributes(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;addAllAttributes;(Map);;MapKey of Argument[0];MapKey of ReturnValue;value;manual" ModelMap out = null; Map in = Map.of(source(), null); ModelMap instance = null; out = instance.addAllAttributes(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;addAllAttributes;(Map);;MapValue of Argument[0];MapValue of Argument[this];value;manual" ModelMap out = null; Map in = Map.of(null, source()); out.addAllAttributes(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;addAllAttributes;(Map);;MapValue of Argument[0];MapValue of ReturnValue;value;manual" ModelMap out = null; Map in = Map.of(null, source()); ModelMap instance = null; out = instance.addAllAttributes(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;addAllAttributes;;;Argument[this];ReturnValue;value;manual" ModelMap out = null; ModelMap in = (ModelMap)source(); out = in.addAllAttributes((Map)null); sink(out); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;addAllAttributes;;;Argument[this];ReturnValue;value;manual" ModelMap out = null; ModelMap in = (ModelMap)source(); out = in.addAllAttributes((Collection)null); sink(out); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;addAttribute;(Object);;Argument[0];MapValue of Argument[this];value;manual" ModelMap out = null; Object in = source(); out.addAttribute(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;addAttribute;(Object);;Argument[0];MapValue of ReturnValue;value;manual" ModelMap out = null; Object in = source(); ModelMap instance = null; out = instance.addAttribute(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;addAttribute;(String,Object);;Argument[0];MapKey of Argument[this];value;manual" ModelMap out = null; String in = (String)source(); out.addAttribute(in, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;addAttribute;(String,Object);;Argument[0];MapKey of ReturnValue;value;manual" ModelMap out = null; String in = (String)source(); ModelMap instance = null; out = instance.addAttribute(in, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;addAttribute;(String,Object);;Argument[1];MapValue of Argument[this];value;manual" ModelMap out = null; Object in = source(); out.addAttribute(null, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;addAttribute;(String,Object);;Argument[1];MapValue of ReturnValue;value;manual" ModelMap out = null; Object in = source(); ModelMap instance = null; out = instance.addAttribute(null, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;addAttribute;;;Argument[this];ReturnValue;value;manual" ModelMap out = null; ModelMap in = (ModelMap)source(); out = in.addAttribute(null, null); sink(out); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;addAttribute;;;Argument[this];ReturnValue;value;manual" ModelMap out = null; ModelMap in = (ModelMap)source(); out = in.addAttribute(null); sink(out); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;getAttribute;;;MapValue of Argument[this];ReturnValue;value;manual" Object out = null; ModelMap in = new ModelMap(null, source()); out = in.getAttribute(null); sink(out); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;mergeAttributes;;;Argument[this];ReturnValue;value;manual" ModelMap out = null; ModelMap in = (ModelMap)source(); out = in.mergeAttributes(null); sink(out); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;mergeAttributes;;;MapKey of Argument[this];MapKey of ReturnValue;value;manual" ModelMap out = null; ModelMap in = new ModelMap((String)source(), null); out = in.mergeAttributes(null); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;mergeAttributes;;;MapKey of Argument[0];MapKey of Argument[this];value;manual" ModelMap out = null; Map in = Map.of(source(), null); out.mergeAttributes(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;mergeAttributes;;;MapValue of Argument[this];MapValue of ReturnValue;value;manual" ModelMap out = null; ModelMap in = new ModelMap(null, source()); out = in.mergeAttributes(null); sink(getMapValue(out)); // $hasValueFlow } { // "org.springframework.ui;ModelMap;false;mergeAttributes;;;MapValue of Argument[0];MapValue of Argument[this];value;manual" ModelMap out = null; Map in = Map.of(null, source()); out.mergeAttributes(in); sink(getMapValue(out)); // $hasValueFlow } } }