Add conditional element inside function.
 @param pConditional An object of ConditionalData.
 @return If pConditional is not an instance of ConditionalData,
         return nil.
761256
def add_conditional(pConditional, pBehaviour = Languages::KEEP_LEVEL)
      return nil unless (pConditional.instance_of?Languages::ConditionalData)
      add_with_manager(pConditional, 'conditional', pBehaviour)
    end
1146509
public static <K, V, A> A ifPresentApply(
            Map<K, V> map,
            K key,
            Function<? super V, ? extends A> function)
    {
        if (map instanceof UnsortedMapIterable)
        {
            return ((MapIterable<K, V>) map).ifPresentApply(key, function);
        }
        V result = map.get(key);
        return MapIterate.isAbsent(result, map, key) ? null : function.valueOf(result);
    }
601764
def add_conditional_clause(self, clause):
        
        clause.set_context_id(self.context_counter)
        self.context_counter += clause.get_context_size()
        self.conditionals.append(clause)
379091
public PropertyConstraint ifTrue(PropertyConstraint ifConstraint, PropertyConstraint thenConstraint, String type) {
		return new ConditionalPropertyConstraint(ifConstraint, thenConstraint, type);
	}
632831
public void addEpsilon(NFAState<T> to)
    {
        Transition<NFAState<T>> t = new Transition<>(this, to);
        Set<Transition<NFAState<T>>> set = transitions.get(null);
        if (set == null)
        {
            set = new HashSet<>();
            transitions.put(null, set);
        }
        set.add(t);
        edges.add(to);
        to.inStates.add(this);
    }
944635
@Override
  // not thread-safe
  public MappeableContainer add(final short x) {
    if (BufferUtil.isBackedBySimpleArray(this.content)) {
      short[] sarray = content.array();

      if (cardinality == 0 || (cardinality > 0
              && toIntUnsigned(x) > toIntUnsigned(sarray[cardinality - 1]))) {
        if (cardinality >= DEFAULT_MAX_SIZE) {
          return toBitmapContainer().add(x);
        }
        if (cardinality >= sarray.length) {
          increaseCapacity();
          sarray = content.array();
        }
        sarray[cardinality++] = x;
      } else {

        int loc = Util.unsignedBinarySearch(sarray, 0, cardinality, x);
        if (loc < 0) {
          // Transform the ArrayContainer to a BitmapContainer
          // when cardinality exceeds DEFAULT_MAX_SIZE
          if (cardinality >= DEFAULT_MAX_SIZE) {
            return toBitmapContainer().add(x);
          }
          if (cardinality >= sarray.length) {
            increaseCapacity();
            sarray = content.array();
          }
          // insertion : shift the elements > x by one
          // position to
          // the right
          // and put x in it's appropriate place
          System.arraycopy(sarray, -loc - 1, sarray, -loc, cardinality + loc + 1);
          sarray[-loc - 1] = x;
          ++cardinality;
        }
      }
    } else {
      if (cardinality == 0 || (cardinality > 0
              && toIntUnsigned(x) > toIntUnsigned(content.get(cardinality - 1)))) {
        if (cardinality >= DEFAULT_MAX_SIZE) {
          return toBitmapContainer().add(x);
        }
        if (cardinality >= content.limit()) {
          increaseCapacity();
        }
        content.put(cardinality++, x);
      }

      final int loc = BufferUtil.unsignedBinarySearch(content, 0, cardinality, x);
      if (loc < 0) {
        // Transform the ArrayContainer to a BitmapContainer
        // when cardinality exceeds DEFAULT_MAX_SIZE
        if (cardinality >= DEFAULT_MAX_SIZE) {
          final MappeableBitmapContainer a = this.toBitmapContainer();
          a.add(x);
          return a;
        }
        if (cardinality >= this.content.limit()) {
          increaseCapacity();
        }
        // insertion : shift the elements > x by one
        // position to
        // the right
        // and put x in it's appropriate place
        for (int k = cardinality; k > -loc - 1; --k) {
          content.put(k, content.get(k - 1));
        }
        content.put(-loc - 1, x);

        ++cardinality;
      }
    }
    return this;
  }
1120101
function setShouldAutoRotate(bool){
    var prototypeForNavController = findPrototypeForProperty(frameModule.topmost().ios.controller,"shouldAutorotate");
    Object.defineProperty(prototypeForNavController,"shouldAutorotate",{
        configurable:true,
        enumerable:false,
        get:function(){
            return bool;
        }
    })

}
907531
@Override
    public Object withStartElement(Location loc, QName name,
            BaseNsContext nsCtxt, ElemAttrs attrs, boolean wasEmpty)
    {
        return new CompactStartElement(loc, name, nsCtxt, attrs);
    }
1232306
@WithBridgeMethods(value = OracleQuery.class, castRequired = true)
    public C connectByPrior(Predicate cond) {
        return addFlag(Position.BEFORE_ORDER, CONNECT_BY_PRIOR, cond);
    }
1370586
@CheckResult
    @NonNull
    public final PowerAdapter showOnlyWhile(@NonNull Condition condition) {
        checkNotNull(condition, "condition");
        if (condition instanceof ConstantCondition) {
            if (condition.eval()) {
                return this;
            } else {
                return EMPTY;
            }
        }
        return new ConditionalAdapter(this, condition);
    }
788387
@Override
    public boolean add(D item) throws UnsupportedOperationException {
        readOnlyGuardCondition();
        instance.addRelation(entity, writeAttributeName, item);
        entity.save();
        return true;
    }
1066501
@WithBridgeMethods(value = OracleQuery.class, castRequired = true)
    public <A> C startWith(Predicate cond) {
        return addFlag(Position.BEFORE_ORDER, START_WITH, cond);
    }
665562
public synchronized boolean addSorted(SpdData data) {
        if (data == null) {
            return false;
        } else if (members.contains(data)) {
            return false;
        } else {
            return (insert(data) != -1);
        }
    }
651525
public ElementDefinitionDt addCode(CodingDt theValue) {
		if (theValue == null) {
			throw new NullPointerException("theValue must not be null");
		}
		getCode().add(theValue);
		return this;
	}
494542
public boolean add(Object element) {

//        reporter.updateCounter++;
        if (elementCount >= elementData.length) {
            increaseCapacity();
        }

        elementData[elementCount] = element;

        elementCount++;

        return true;
    }
1186608
@ConditionalOnClass(value = {PcapIf.class, PcapAddr.class, SockAddr.class, DeviceNotFoundException.class})
    //@ConditionalOnBean(StringBuilder.class)
    @Bean(PCAP_IF_BEAN_NAME)
    public PcapIf pcapIf(@Qualifier(ERRBUF_BEAN_NAME) StringBuilder errbuf) throws DeviceNotFoundException {
        List<PcapIf> alldevsp = new ArrayList<PcapIf>();
        if (PcapFindAllDevs(alldevsp, errbuf) != OK) {
            throw new NativeException(errbuf.toString());
        }
        String source = properties.getSource();
        if (source == null || source.isEmpty()) {
            for (PcapIf dev : alldevsp) {
                for (PcapAddr addr : dev.getAddresses()) {
                    if (addr.getAddr().getSaFamily() == SockAddr.Family.AF_INET && addr.getAddr().getData() != null) {
                        Inet4Address d = Inet4Address.valueOf(addr.getAddr().getData());
                        if (!d.equals(Inet4Address.LOCALHOST) && !d.equals(Inet4Address.ZERO)) {
                            if (LOGGER.isDebugEnabled()) {
                                LOGGER.debug("Device: {}.", dev);
                            }
                            return dev;
                        }
                    }
                }
            }
        } else {
            for (PcapIf dev : alldevsp) {
                if (dev.getName().equals(source)) {
                    if (LOGGER.isDebugEnabled()) {
                        LOGGER.debug("Device: {}.", dev);
                    }
                    return dev;
                }
            }
        }
        for (PcapIf dev : alldevsp) {
            if (dev.isLoopback()) {
                if (LOGGER.isWarnEnabled()) {
                    LOGGER.warn("No device connected to the network. Auto selected {}.", dev.getName());
                }
                return dev;
            }
        }
        throw new DeviceNotFoundException();
    }
547163
public synchronized boolean add(E e) {
        modCount++;
        ensureCapacityHelper(elementCount + 1);
        elementData[elementCount++] = e;
        return true;
    }