Generates code to branch if a property is dirty.

@param propNumber property number from all properties map
@param target branch target
@param when true, branch if dirty; when false, branch when not dirty
195065
private void branchIfDirty(CodeBuilder b, int propNumber,
                               Label target, boolean branchIfDirty)
    {
        String stateFieldName = StorableGenerator.PROPERTY_STATE_FIELD_NAME + (propNumber >> 4);
        b.loadThis();
        b.loadField(stateFieldName, TypeDesc.INT);

        int shift = (propNumber & 0xf) * 2;
        b.loadConstant(StorableGenerator.PROPERTY_STATE_MASK << shift);
        b.math(Opcode.IAND);
        b.loadConstant(StorableGenerator.PROPERTY_STATE_DIRTY << shift);

        b.ifComparisonBranch(target, branchIfDirty ? "==" : "!=");
    }
584929
public synchronized void setProperty(PropertyKey key, Object value)
    {
        if (!isValidKey(key))
            throw new IllegalArgumentException("Key " + key + " is not valid for " + getMapClass());

        //
        // Validate the value argument, based upon the property type reference by the key
        //
        Class propType = key.getPropertyType();
        if (value == null)
        {
            if (propType.isPrimitive() || propType.isAnnotation())
                throw new IllegalArgumentException("Invalid null value for key " + key);
        }
        else
        {
            if (propType.isPrimitive())
                propType = (Class)_primToObject.get(propType);

            if (!propType.isAssignableFrom(value.getClass()))
            {
                throw new IllegalArgumentException("Value class (" + value.getClass() + 
                                                   ") not of expected type: " + propType);
            }
        }
        _properties.put(key, value);
        _propertySets.add(key.getPropertySet());
    }
1269485
public final int getIntProp(Prop propType) {
    PropListItem item = lookupProperty(propType);
    if (item == null) {
      return 0;
    }
    return item.getIntValue();
  }
492390
private static <T> void  setIfNew(Property<T> prop, T newValue)
  {
    if(!Objects.equals(prop.getValue(), newValue))
    {
      prop.setValue(newValue);
    }
  }
614365
void exportToMapProperty(Object target, String property, Object result) {
        @SuppressWarnings("unchecked")
        Map<Object, Object> map = (Map<Object, Object>) target;
        if (result == null) {
            map.remove(property);
        } else {
            map.put(property, result);
        }
    }
428887
public void ifgt(String target) throws IOException
    {
        if (wideIndex)
        {
            out.writeByte(NOT_IFGT);
            out.writeShort(WIDEFIXOFFSET);
            Branch branch = createBranch(target);
            out.writeByte(GOTO_W);
            out.writeInt(branch);
        }
        else
        {
            Branch branch = createBranch(target);
            out.writeOpCode(IFGT);
            out.writeShort(branch);
        }
    }
194386
public Optional<Build> getBuildByNumber(final int buildNumber) {
        return builds.stream().filter(isBuildNumberEqualTo(buildNumber)).findFirst();
    }
548933
function deleteProperty(target, key) {
          var deleted = target[key];
          delete target[key];
          instance.emit(GQLBase.EVENT_MODEL_PROP_DELETE, {
            model: target,
            key: key,
            deleted: deleted
          });
        }
1039413
public static void copyPropertiesToMap(Properties source,Map<String,String> target)
    {
        if(source!=null)
        {
            //convert to map
            Iterator<Entry<Object,Object>> iterator=source.entrySet().iterator();
            Entry<Object,Object> entry=null;
            String key=null;
            String value=null;
            while(iterator.hasNext())
            {
                //get next entry
                entry=iterator.next();
                
                //get next key/value
                key=(String)entry.getKey();
                value=(String)entry.getValue();
                
                //put in map
                target.put(key,value);
            }
        }
    }
1120033
@Override
    protected void init(Object target, PropertyInfo propInfo, PropertyGrid propGrid) {
        propInfo.getConfig().setProperty("readonly", Boolean.toString(!SecurityUtil.hasDebugRole()));
        super.init(target, propInfo, propGrid);
        List<IAction> actions = new ArrayList<>(ActionRegistry.getRegisteredActions(ActionScope.BOTH));
        Collections.sort(actions, ActionUtil.comparator);
        
        for (IAction action : actions) {
            appendItem(action.toString(), action.getId());
        }
    }
483575
public void ifeq(String target) throws IOException
    {
        if (wideIndex)
        {
            out.writeByte(NOT_IFEQ);
            out.writeShort(WIDEFIXOFFSET);
            Branch branch = createBranch(target);
            out.writeByte(GOTO_W);
            out.writeInt(branch);
        }
        else
        {
            Branch branch = createBranch(target);
            out.writeOpCode(IFEQ);
            out.writeShort(branch);
        }
    }
268261
@Override
    public <T extends Inspection> T getInspectionForHitNumber(int hitNumber) {
        return (T) getInspectionsForHitNumber(hitNumber).get(0);
    }
444400
static Method getGetter(Class<?> targetClass, String propertyName) {
		if (targetClass == null) {
			return null;
		}
		final String getterName = getterName(propertyName, false);
		Method result = findPublicGetter(targetClass, getterName, propertyName, false);
		if (result == null) {
			final String booleanGetterName = getterName(propertyName, true);
			result = findPublicGetter(targetClass, booleanGetterName, propertyName, true);
			if (result == null) {
				do {
					result = findNonPublicGetter(targetClass, getterName, propertyName, false);
					if (result == null) {
						result = findNonPublicGetter(targetClass, booleanGetterName, propertyName, true);
					}
				} while (result == null && (targetClass = targetClass.getSuperclass()) != null);
			}
		}

		return result;
	}
935804
public JcNumber numberProperty(String name) {
		JcNumber ret = new JcNumber(name, this, OPERATOR.PropertyContainer.PROPERTY_ACCESS);
		QueryRecorder.recordInvocationConditional(this, "numberProperty", ret, QueryRecorder.literal(name));
		return ret;
	}
759611
public Ref checkoutBranch(Git git, String branch) {
        try {
            return git.checkout()
                .setName(branch)
                .call();
        } catch (GitAPIException e) {
            throw new IllegalStateException(e);
        }
    }
830700
function (target, source) {
        if (source) {
            for (var propName in source) {
                if (target[propName] === undefined) {
                    target[propName] = source[propName];
                }
            }
        }
        return target;
    }
936334
private void branch(int stackAdjust, Location location, byte opcode) {
        if (!(location instanceof InstructionList.LabelInstruction)) {
            throw new IllegalArgumentException("Branch location is not a label instruction");
        }
        mInstructions.new BranchInstruction(stackAdjust, opcode,
                                            (InstructionList.LabelInstruction)location);
    }