test_class.declarator: rule = new JenkinsRule()
test_class.modifier: @ClassRule
      public static
test_class.original_string: @ClassRule
      public static JenkinsRule rule = new JenkinsRule();
test_class.type: JenkinsRule
test_class.var_name: rule
test_class.declarator: logging = new LoggerRule().record(DescribableModel.class, Level.ALL)
test_class.modifier: @ClassRule
      public static
test_class.original_string: @ClassRule
      public static LoggerRule logging = new LoggerRule().record(DescribableModel.class, Level.ALL);
test_class.type: LoggerRule
test_class.var_name: logging
test_class.file: plugin/src/test/java/org/jenkinsci/plugins/structs/describable/DescribableModelTest.java
test_class.identifier: DescribableModelTest
test_case.body: @Test
      @Issue("JENKINS-44864")
      public void given_model_when_fieldRenamed_then_uselessSettersIgnored() throws Exception {
          EvolvedClass instance;
          Map<String,Object> expected = new HashMap<String, Object>();
  
          instance = new EvolvedClass(false);
          expected.clear();
          expected.put("option", Boolean.FALSE);
          assertThat("Only required properties",
                  DescribableModel.uninstantiate2_(instance).toMap(), Matchers.is(expected));
  
          instance = new EvolvedClass(true);
          expected.clear();
          expected.put("option", Boolean.TRUE);
          assertThat("Only required properties",
                  DescribableModel.uninstantiate2_(instance).toMap(), Matchers.is(expected));
  
          instance = new EvolvedClass(true);
          instance.setName("bob");
          expected.clear();
          expected.put("option", Boolean.TRUE);
          expected.put("name", "bob");
          assertThat("current setters are rendered",
                  DescribableModel.uninstantiate2_(instance).toMap(), Matchers.is(expected));
  
          instance = new EvolvedClass(false);
          instance.setTitle("bill");
          expected.clear();
          expected.put("option", Boolean.FALSE);
          expected.put("name", "bill");
          assertThat("migrated setters are migrated",
                  DescribableModel.uninstantiate2_(instance).toMap(), Matchers.is(expected));
  
          instance = new EvolvedClass(false);
          instance.setName("random");
          instance.setDescription("This is the thing");
          expected.clear();
          expected.put("option", Boolean.FALSE);
          expected.put("name", "random");
          expected.put("description", "This is the thing");
          assertThat("if the old setter mangles the value but has 1:1 mapping, we still ignore redundant setters",
                  DescribableModel.uninstantiate2_(instance).toMap(), Matchers.is(expected));
  
          instance = new EvolvedClass(false);
          instance.setName("random");
          instance.setSummary("Legacy summary");
          expected.clear();
          expected.put("option", Boolean.FALSE);
          expected.put("name", "random");
          expected.put("description", "Prefix: Legacy summary");
          assertThat("Doesn't matter if we set the value through the old setter or the new",
                  DescribableModel.uninstantiate2_(instance).toMap(), Matchers.is(expected));
  
          instance = new EvolvedClass(false);
          instance.setLegacyMode(53);
          expected.clear();
          expected.put("option", Boolean.FALSE);
          expected.put("legacyMode", 53);
          assertThat("A deprecated setter that produces a different object instance is retained",
                  DescribableModel.uninstantiate2_(instance).toMap(), Matchers.is(expected));
  
      }
test_case.class_method_signature: DescribableModelTest.given_model_when_fieldRenamed_then_uselessSettersIgnored()
test_case.full_signature: @Test @Issue("JENKINS-44864") public void given_model_when_fieldRenamed_then_uselessSettersIgnored()
test_case.identifier: given_model_when_fieldRenamed_then_uselessSettersIgnored
test_case.invocations: clear put assertThat toMap uninstantiate2_ is clear put assertThat toMap uninstantiate2_ is setName clear put put assertThat toMap uninstantiate2_ is setTitle clear put put assertThat toMap uninstantiate2_ is setName setDescription clear put put put assertThat toMap uninstantiate2_ is setName setSummary clear put put put assertThat toMap uninstantiate2_ is setLegacyMode clear put put assertThat toMap uninstantiate2_ is
test_case.modifiers: @Test @Issue("JENKINS-44864") public
test_case.parameters: ()
test_case.return: void
test_case.signature: void given_model_when_fieldRenamed_then_uselessSettersIgnored()
focal_class.declarator: STRICT_PARAMETER_CHECKING = Main.isUnitTest
focal_class.modifier: @SuppressFBWarnings("MS_SHOULD_BE_FINAL") // Used to control warnings that instantiate parameters will be ignored
      @Restricted(NoExternalUse.class)
      public static
focal_class.original_string: @SuppressFBWarnings("MS_SHOULD_BE_FINAL") // Used to control warnings that instantiate parameters will be ignored
      @Restricted(NoExternalUse.class)
      public static boolean STRICT_PARAMETER_CHECKING = Main.isUnitTest;
focal_class.type: boolean
focal_class.var_name: STRICT_PARAMETER_CHECKING
focal_class.declarator: type
focal_class.modifier: private final
focal_class.original_string: private final Class<T> type;
focal_class.type: Class<T>
focal_class.var_name: type
focal_class.declarator: parameters = new LinkedHashMap<String, DescribableParameter>(4)
focal_class.modifier: private
focal_class.original_string: private Map<String,DescribableParameter> parameters = new LinkedHashMap<String, DescribableParameter>(4);
focal_class.type: Map<String,DescribableParameter>
focal_class.var_name: parameters
focal_class.declarator: parametersView
focal_class.modifier: private
focal_class.original_string: private Map<String,DescribableParameter> parametersView;
focal_class.type: Map<String,DescribableParameter>
focal_class.var_name: parametersView
focal_class.declarator: constructor
focal_class.modifier: private final
focal_class.original_string: private final Constructor<T> constructor;
focal_class.type: Constructor<T>
focal_class.var_name: constructor
focal_class.declarator: constructorParamNames
focal_class.modifier: private final
focal_class.original_string: private final String[] constructorParamNames;
focal_class.type: String[]
focal_class.var_name: constructorParamNames
focal_class.declarator: modelCache = new ConcurrentHashMap<String, DescribableModel>()
focal_class.modifier: static
focal_class.original_string: static ConcurrentHashMap<String, DescribableModel> modelCache = new ConcurrentHashMap<String, DescribableModel>();
focal_class.type: ConcurrentHashMap<String, DescribableModel>
focal_class.var_name: modelCache
focal_class.declarator: CLAZZ = "$class"
focal_class.modifier: public static final
focal_class.original_string: public static final String CLAZZ = "$class";
focal_class.type: String
focal_class.var_name: CLAZZ
focal_class.declarator: LOGGER = Logger.getLogger(DescribableModel.class.getName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = Logger.getLogger(DescribableModel.class.getName());
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: serialVersionUID = 1L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 1L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: defaultPrimitiveValue = new HashMap<Class, Object>()
focal_class.modifier: private static final
focal_class.original_string: private static final Map<Class,Object> defaultPrimitiveValue = new HashMap<Class, Object>();
focal_class.type: Map<Class,Object>
focal_class.var_name: defaultPrimitiveValue
focal_class.file: plugin/src/main/java/org/jenkinsci/plugins/structs/describable/DescribableModel.java
focal_class.identifier: DescribableModel
focal_class.interfaces: implements Serializable
focal_class.class_method_signature: DescribableModel.of(Class<T> clazz)
focal_class.full_signature: public static DescribableModel<T> of(Class<T> clazz)
focal_class.identifier: of
focal_class.modifiers: public static
focal_class.parameters: (Class<T> clazz)
focal_class.return: DescribableModel<T>
focal_class.signature: DescribableModel<T> of(Class<T> clazz)
focal_class.class_method_signature: DescribableModel.DescribableModel(Class<T> clazz)
focal_class.full_signature: public  DescribableModel(Class<T> clazz)
focal_class.identifier: DescribableModel
focal_class.modifiers: public
focal_class.parameters: (Class<T> clazz)
focal_class.signature:  DescribableModel(Class<T> clazz)
focal_class.class_method_signature: DescribableModel.addParameter(Map<String,DescribableParameter> props, Type type, String name, Setter setter)
focal_class.full_signature: private void addParameter(Map<String,DescribableParameter> props, Type type, String name, Setter setter)
focal_class.identifier: addParameter
focal_class.modifiers: private
focal_class.parameters: (Map<String,DescribableParameter> props, Type type, String name, Setter setter)
focal_class.return: void
focal_class.signature: void addParameter(Map<String,DescribableParameter> props, Type type, String name, Setter setter)
focal_class.class_method_signature: DescribableModel.getType()
focal_class.full_signature: public Class<T> getType()
focal_class.identifier: getType
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Class<T>
focal_class.signature: Class<T> getType()
focal_class.class_method_signature: DescribableModel.getParameters()
focal_class.full_signature: public Collection<DescribableParameter> getParameters()
focal_class.identifier: getParameters
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Collection<DescribableParameter>
focal_class.signature: Collection<DescribableParameter> getParameters()
focal_class.class_method_signature: DescribableModel.getParameter(String name)
focal_class.full_signature: public DescribableParameter getParameter(String name)
focal_class.identifier: getParameter
focal_class.modifiers: public
focal_class.parameters: (String name)
focal_class.return: DescribableParameter
focal_class.signature: DescribableParameter getParameter(String name)
focal_class.class_method_signature: DescribableModel.hasSingleRequiredParameter()
focal_class.full_signature: public boolean hasSingleRequiredParameter()
focal_class.identifier: hasSingleRequiredParameter
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean hasSingleRequiredParameter()
focal_class.class_method_signature: DescribableModel.getSoleRequiredParameter()
focal_class.full_signature: public @CheckForNull DescribableParameter getSoleRequiredParameter()
focal_class.identifier: getSoleRequiredParameter
focal_class.modifiers: public @CheckForNull
focal_class.parameters: ()
focal_class.return: DescribableParameter
focal_class.signature: DescribableParameter getSoleRequiredParameter()
focal_class.class_method_signature: DescribableModel.getFirstRequiredParameter()
focal_class.full_signature: public @CheckForNull DescribableParameter getFirstRequiredParameter()
focal_class.identifier: getFirstRequiredParameter
focal_class.modifiers: public @CheckForNull
focal_class.parameters: ()
focal_class.return: DescribableParameter
focal_class.signature: DescribableParameter getFirstRequiredParameter()
focal_class.class_method_signature: DescribableModel.getDisplayName()
focal_class.full_signature: public String getDisplayName()
focal_class.identifier: getDisplayName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getDisplayName()
focal_class.class_method_signature: DescribableModel.instantiate(Map<String,?> arguments)
focal_class.full_signature: @Deprecated public T instantiate(Map<String,?> arguments)
focal_class.identifier: instantiate
focal_class.modifiers: @Deprecated public
focal_class.parameters: (Map<String,?> arguments)
focal_class.return: T
focal_class.signature: T instantiate(Map<String,?> arguments)
focal_class.class_method_signature: DescribableModel.instantiate(Map<String,?> arguments, @CheckForNull TaskListener listener)
focal_class.full_signature: public T instantiate(Map<String,?> arguments, @CheckForNull TaskListener listener)
focal_class.identifier: instantiate
focal_class.modifiers: public
focal_class.parameters: (Map<String,?> arguments, @CheckForNull TaskListener listener)
focal_class.return: T
focal_class.signature: T instantiate(Map<String,?> arguments, @CheckForNull TaskListener listener)
focal_class.class_method_signature: DescribableModel.deeplyImmutable(Map<String, ?> m)
focal_class.full_signature: @SuppressWarnings("unchecked") private static Map<String, Object> deeplyImmutable(Map<String, ?> m)
focal_class.identifier: deeplyImmutable
focal_class.modifiers: @SuppressWarnings("unchecked") private static
focal_class.parameters: (Map<String, ?> m)
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> deeplyImmutable(Map<String, ?> m)
focal_class.class_method_signature: DescribableModel.deeplyImmutable(UninstantiatedDescribable ud)
focal_class.full_signature: private static UninstantiatedDescribable deeplyImmutable(UninstantiatedDescribable ud)
focal_class.identifier: deeplyImmutable
focal_class.modifiers: private static
focal_class.parameters: (UninstantiatedDescribable ud)
focal_class.return: UninstantiatedDescribable
focal_class.signature: UninstantiatedDescribable deeplyImmutable(UninstantiatedDescribable ud)
focal_class.class_method_signature: DescribableModel.findConstructor(int length)
focal_class.full_signature: @SuppressWarnings("unchecked") private Constructor<T> findConstructor(int length)
focal_class.identifier: findConstructor
focal_class.modifiers: @SuppressWarnings("unchecked") private
focal_class.parameters: (int length)
focal_class.return: Constructor<T>
focal_class.signature: Constructor<T> findConstructor(int length)
focal_class.class_method_signature: DescribableModel.buildArguments(Map<String,?> bag, Type[] types, String[] names, boolean callEvenIfNoArgs, TaskListener listener)
focal_class.full_signature: private Object[] buildArguments(Map<String,?> bag, Type[] types, String[] names, boolean callEvenIfNoArgs, TaskListener listener)
focal_class.identifier: buildArguments
focal_class.modifiers: private
focal_class.parameters: (Map<String,?> bag, Type[] types, String[] names, boolean callEvenIfNoArgs, TaskListener listener)
focal_class.return: Object[]
focal_class.signature: Object[] buildArguments(Map<String,?> bag, Type[] types, String[] names, boolean callEvenIfNoArgs, TaskListener listener)
focal_class.class_method_signature: DescribableModel.injectSetters(Object o, Map<String,?> arguments, TaskListener listener)
focal_class.full_signature: private void injectSetters(Object o, Map<String,?> arguments, TaskListener listener)
focal_class.identifier: injectSetters
focal_class.modifiers: private
focal_class.parameters: (Object o, Map<String,?> arguments, TaskListener listener)
focal_class.return: void
focal_class.signature: void injectSetters(Object o, Map<String,?> arguments, TaskListener listener)
focal_class.class_method_signature: DescribableModel.coerce(String context, Type type, Object o, TaskListener listener)
focal_class.full_signature: @SuppressWarnings("unchecked") private Object coerce(String context, Type type, Object o, TaskListener listener)
focal_class.identifier: coerce
focal_class.modifiers: @SuppressWarnings("unchecked") private
focal_class.parameters: (String context, Type type, Object o, TaskListener listener)
focal_class.return: Object
focal_class.signature: Object coerce(String context, Type type, Object o, TaskListener listener)
focal_class.class_method_signature: DescribableModel.coerceStringToNumber(@Nonnull String context, @Nonnull Class numberClass, @Nonnull String o)
focal_class.full_signature: private Object coerceStringToNumber(@Nonnull String context, @Nonnull Class numberClass, @Nonnull String o)
focal_class.identifier: coerceStringToNumber
focal_class.modifiers: private
focal_class.parameters: (@Nonnull String context, @Nonnull Class numberClass, @Nonnull String o)
focal_class.return: Object
focal_class.signature: Object coerceStringToNumber(@Nonnull String context, @Nonnull Class numberClass, @Nonnull String o)
focal_class.class_method_signature: DescribableModel.resolveClass(Class<?> base, @Nullable String name, @Nullable String symbol)
focal_class.full_signature: static Class<?> resolveClass(Class<?> base, @Nullable String name, @Nullable String symbol)
focal_class.identifier: resolveClass
focal_class.modifiers: static
focal_class.parameters: (Class<?> base, @Nullable String name, @Nullable String symbol)
focal_class.return: Class<?>
focal_class.signature: Class<?> resolveClass(Class<?> base, @Nullable String name, @Nullable String symbol)
focal_class.class_method_signature: DescribableModel.coerceList(String context, Type type, List<?> list, TaskListener listener)
focal_class.full_signature: private List<Object> coerceList(String context, Type type, List<?> list, TaskListener listener)
focal_class.identifier: coerceList
focal_class.modifiers: private
focal_class.parameters: (String context, Type type, List<?> list, TaskListener listener)
focal_class.return: List<Object>
focal_class.signature: List<Object> coerceList(String context, Type type, List<?> list, TaskListener listener)
focal_class.class_method_signature: DescribableModel.parameterValueClass(@Nonnull Class<?> parameterDefinitionClass)
focal_class.full_signature: private static @CheckForNull Class<?> parameterValueClass(@Nonnull Class<?> parameterDefinitionClass)
focal_class.identifier: parameterValueClass
focal_class.modifiers: private static @CheckForNull
focal_class.parameters: (@Nonnull Class<?> parameterDefinitionClass)
focal_class.return: Class<?>
focal_class.signature: Class<?> parameterValueClass(@Nonnull Class<?> parameterDefinitionClass)
focal_class.class_method_signature: DescribableModel.findSubtypes(Class<?> supertype)
focal_class.full_signature: static Set<Class<?>> findSubtypes(Class<?> supertype)
focal_class.identifier: findSubtypes
focal_class.modifiers: static
focal_class.parameters: (Class<?> supertype)
focal_class.return: Set<Class<?>>
focal_class.signature: Set<Class<?>> findSubtypes(Class<?> supertype)
focal_class.class_method_signature: DescribableModel.uninstantiate(T o)
focal_class.full_signature: public Map<String,Object> uninstantiate(T o)
focal_class.identifier: uninstantiate
focal_class.modifiers: public
focal_class.parameters: (T o)
focal_class.return: Map<String,Object>
focal_class.signature: Map<String,Object> uninstantiate(T o)
focal_class.class_method_signature: DescribableModel.uninstantiate2(T o)
focal_class.full_signature: public UninstantiatedDescribable uninstantiate2(T o)
focal_class.identifier: uninstantiate2
focal_class.modifiers: public
focal_class.parameters: (T o)
focal_class.return: UninstantiatedDescribable
focal_class.signature: UninstantiatedDescribable uninstantiate2(T o)
focal_class.class_method_signature: DescribableModel.symbolOf(Object o)
focal_class.full_signature: static String symbolOf(Object o)
focal_class.identifier: symbolOf
focal_class.modifiers: static
focal_class.parameters: (Object o)
focal_class.return: String
focal_class.signature: String symbolOf(Object o)
focal_class.class_method_signature: DescribableModel.uninstantiate_(Object o)
focal_class.full_signature: public static Map<String,Object> uninstantiate_(Object o)
focal_class.identifier: uninstantiate_
focal_class.modifiers: public static
focal_class.parameters: (Object o)
focal_class.return: Map<String,Object>
focal_class.signature: Map<String,Object> uninstantiate_(Object o)
focal_class.class_method_signature: DescribableModel.uninstantiate__(Object o, Class<T> clazz)
focal_class.full_signature: private static Map<String,Object> uninstantiate__(Object o, Class<T> clazz)
focal_class.identifier: uninstantiate__
focal_class.modifiers: private static
focal_class.parameters: (Object o, Class<T> clazz)
focal_class.return: Map<String,Object>
focal_class.signature: Map<String,Object> uninstantiate__(Object o, Class<T> clazz)
focal_class.class_method_signature: DescribableModel.uninstantiate2_(Object o)
focal_class.full_signature: @SuppressWarnings("unchecked") public static UninstantiatedDescribable uninstantiate2_(Object o)
focal_class.identifier: uninstantiate2_
focal_class.modifiers: @SuppressWarnings("unchecked") public static
focal_class.parameters: (Object o)
focal_class.return: UninstantiatedDescribable
focal_class.signature: UninstantiatedDescribable uninstantiate2_(Object o)
focal_class.class_method_signature: DescribableModel.isDeprecated()
focal_class.full_signature: public boolean isDeprecated()
focal_class.identifier: isDeprecated
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isDeprecated()
focal_class.class_method_signature: DescribableModel.getHelp()
focal_class.full_signature: public @CheckForNull String getHelp()
focal_class.identifier: getHelp
focal_class.modifiers: public @CheckForNull
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getHelp()
focal_class.class_method_signature: DescribableModel.getHelp(String name)
focal_class.full_signature: @CheckForNull String getHelp(String name)
focal_class.identifier: getHelp
focal_class.modifiers: @CheckForNull
focal_class.parameters: (String name)
focal_class.return: String
focal_class.signature: String getHelp(String name)
focal_class.class_method_signature: DescribableModel.toString(StringBuilder b, Stack<Class<?>> modelTypes)
focal_class.full_signature:  void toString(StringBuilder b, Stack<Class<?>> modelTypes)
focal_class.identifier: toString
focal_class.parameters: (StringBuilder b, Stack<Class<?>> modelTypes)
focal_class.return: void
focal_class.signature: void toString(StringBuilder b, Stack<Class<?>> modelTypes)
focal_class.class_method_signature: DescribableModel.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: DescribableModel.writeReplace()
focal_class.full_signature: private Object writeReplace()
focal_class.identifier: writeReplace
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Object
focal_class.signature: Object writeReplace()
focal_class.class_method_signature: DescribableModel.getVmDefaultValueForPrimitiveType(Class<?> type)
focal_class.full_signature: private static Object getVmDefaultValueForPrimitiveType(Class<?> type)
focal_class.identifier: getVmDefaultValueForPrimitiveType
focal_class.modifiers: private static
focal_class.parameters: (Class<?> type)
focal_class.return: Object
focal_class.signature: Object getVmDefaultValueForPrimitiveType(Class<?> type)
focal_method.body: @SuppressWarnings("unchecked")
      public static UninstantiatedDescribable uninstantiate2_(Object o) {
          return new DescribableModel(o.getClass()).uninstantiate2(o);
      }
focal_method.class_method_signature: DescribableModel.uninstantiate2_(Object o)
focal_method.full_signature: @SuppressWarnings("unchecked") public static UninstantiatedDescribable uninstantiate2_(Object o)
focal_method.identifier: uninstantiate2_
focal_method.invocations: uninstantiate2 getClass
focal_method.modifiers: @SuppressWarnings("unchecked") public static
focal_method.parameters: (Object o)
focal_method.return: UninstantiatedDescribable
focal_method.signature: UninstantiatedDescribable uninstantiate2_(Object o)