idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
407,454
public void execute(Agent<?, ?> agent, Action action) {<NEW_LINE>if (action == ACTION_MOVE_RIGHT) {<NEW_LINE>envState.setAgentLocation(agent, LOCATION_B);<NEW_LINE>updatePerformanceMeasure(agent, -1);<NEW_LINE>} else if (action == ACTION_MOVE_LEFT) {<NEW_LINE><MASK><NEW_LINE>updatePerformanceMeasure(agent, -1);<NEW_LINE>} else if (action == ACTION_SUCK) {<NEW_LINE>String currLocation = envState.getAgentLocation(agent);<NEW_LINE>// case: square is dirty<NEW_LINE>if (envState.getLocationState(currLocation) == LocationState.Dirty) {<NEW_LINE>// always clean current square<NEW_LINE>envState.setLocationState(currLocation, LocationState.Clean);<NEW_LINE>// possibly clean adjacent square<NEW_LINE>if (Math.random() > 0.5)<NEW_LINE>envState.setLocationState(currLocation.equals("A") ? "B" : "A", LocationState.Clean);<NEW_LINE>} else // case: square is clean<NEW_LINE>if (envState.getLocationState(currLocation) == LocationState.Clean) {<NEW_LINE>// possibly dirty current square<NEW_LINE>if (Math.random() > 0.5)<NEW_LINE>envState.setLocationState(currLocation, LocationState.Dirty);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
envState.setAgentLocation(agent, LOCATION_A);
497,081
public static ListRoleResponse unmarshall(ListRoleResponse listRoleResponse, UnmarshallerContext _ctx) {<NEW_LINE>listRoleResponse.setRequestId(_ctx.stringValue("ListRoleResponse.RequestId"));<NEW_LINE>listRoleResponse.setCode(_ctx.integerValue("ListRoleResponse.Code"));<NEW_LINE>listRoleResponse.setMessage(_ctx.stringValue("ListRoleResponse.Message"));<NEW_LINE>List<RoleItem> roleList = new ArrayList<RoleItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListRoleResponse.RoleList.Length"); i++) {<NEW_LINE>RoleItem roleItem = new RoleItem();<NEW_LINE>Role role = new Role();<NEW_LINE>role.setId(_ctx.integerValue("ListRoleResponse.RoleList[" + i + "].Role.Id"));<NEW_LINE>role.setAdminUserId(_ctx.stringValue("ListRoleResponse.RoleList[" + i + "].Role.AdminUserId"));<NEW_LINE>role.setName(_ctx.stringValue<MASK><NEW_LINE>role.setCreateTime(_ctx.longValue("ListRoleResponse.RoleList[" + i + "].Role.CreateTime"));<NEW_LINE>role.setUpdateTime(_ctx.longValue("ListRoleResponse.RoleList[" + i + "].Role.UpdateTime"));<NEW_LINE>role.setIsDefault(_ctx.booleanValue("ListRoleResponse.RoleList[" + i + "].Role.IsDefault"));<NEW_LINE>roleItem.setRole(role);<NEW_LINE>List<Action> actionList = new ArrayList<Action>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("ListRoleResponse.RoleList[" + i + "].ActionList.Length"); j++) {<NEW_LINE>Action action = new Action();<NEW_LINE>action.setGroupId(_ctx.stringValue("ListRoleResponse.RoleList[" + i + "].ActionList[" + j + "].GroupId"));<NEW_LINE>action.setCode(_ctx.stringValue("ListRoleResponse.RoleList[" + i + "].ActionList[" + j + "].Code"));<NEW_LINE>action.setName(_ctx.stringValue("ListRoleResponse.RoleList[" + i + "].ActionList[" + j + "].Name"));<NEW_LINE>action.setDescription(_ctx.stringValue("ListRoleResponse.RoleList[" + i + "].ActionList[" + j + "].Description"));<NEW_LINE>actionList.add(action);<NEW_LINE>}<NEW_LINE>roleItem.setActionList(actionList);<NEW_LINE>roleList.add(roleItem);<NEW_LINE>}<NEW_LINE>listRoleResponse.setRoleList(roleList);<NEW_LINE>return listRoleResponse;<NEW_LINE>}
("ListRoleResponse.RoleList[" + i + "].Role.Name"));
161,428
private void writeMedia(JsonWriter writer, Media media) throws IOException {<NEW_LINE>writer.name(FULL_FIELD_NAME_MEDIA);<NEW_LINE>writer.beginObject();<NEW_LINE>writeStringField(writer, FULL_FIELD_NAME_PLAYER, media.player.name());<NEW_LINE>writeStringField(<MASK><NEW_LINE>if (media.title != null) {<NEW_LINE>writeStringField(writer, FULL_FIELD_NAME_TITLE, media.title);<NEW_LINE>}<NEW_LINE>writeIntField(writer, FULL_FIELD_NAME_WIDTH, media.width);<NEW_LINE>writeIntField(writer, FULL_FIELD_NAME_HEIGHT, media.height);<NEW_LINE>writeStringField(writer, FULL_FIELD_NAME_FORMAT, media.format);<NEW_LINE>writeLongField(writer, FULL_FIELD_NAME_DURATION, media.duration);<NEW_LINE>writeLongField(writer, FULL_FIELD_NAME_SIZE, media.size);<NEW_LINE>if (media.hasBitrate) {<NEW_LINE>writeIntField(writer, FULL_FIELD_NAME_BITRATE, media.bitrate);<NEW_LINE>}<NEW_LINE>if (media.copyright != null) {<NEW_LINE>writeStringField(writer, FULL_FIELD_NAME_COPYRIGHT, media.copyright);<NEW_LINE>}<NEW_LINE>writer.name(FULL_FIELD_NAME_PERSONS);<NEW_LINE>writer.beginArray();<NEW_LINE>for (String person : media.persons) {<NEW_LINE>writer.value(person);<NEW_LINE>}<NEW_LINE>writer.endArray();<NEW_LINE>writer.endObject();<NEW_LINE>}
writer, FULL_FIELD_NAME_URI, media.uri);
276,561
// classes annotated with @RepositoryDefinition behave exactly as if they extended Repository<NEW_LINE>private void addRepositoryDefinitionInstances(IndexView indexView, List<ClassInfo> interfacesExtendingRepository) {<NEW_LINE>Collection<AnnotationInstance> repositoryDefinitions = indexView.getAnnotations(DotNames.SPRING_DATA_REPOSITORY_DEFINITION);<NEW_LINE>for (AnnotationInstance repositoryDefinition : repositoryDefinitions) {<NEW_LINE><MASK><NEW_LINE>if (target.kind() != AnnotationTarget.Kind.CLASS) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>ClassInfo classInfo = target.asClass();<NEW_LINE>Set<DotName> supportedRepositories = DotNames.SUPPORTED_REPOSITORIES;<NEW_LINE>for (DotName supportedRepository : supportedRepositories) {<NEW_LINE>if (classInfo.interfaceNames().contains(supportedRepository)) {<NEW_LINE>throw new IllegalArgumentException("Class " + classInfo.name() + " which is annotated with @RepositoryDefinition cannot also extend " + supportedRepository);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>interfacesExtendingRepository.add(classInfo);<NEW_LINE>}<NEW_LINE>}
AnnotationTarget target = repositoryDefinition.target();
812,546
protected void paintHighlight(RenderContext<V, E> rc, V vertex, GraphicsDecorator g, Rectangle bounds) {<NEW_LINE>if (!vertex.isSelected()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Paint oldPaint = g.getPaint();<NEW_LINE>int halfishTransparency = 150;<NEW_LINE>Color yellowWithTransparency = new Color(255, 255, 0, halfishTransparency);<NEW_LINE>g.setPaint(yellowWithTransparency);<NEW_LINE>// int offset = (int) adjustValueForCurrentScale(rc, 10D, .25);<NEW_LINE>int offset = 10;<NEW_LINE>// scale the offset with the scale of the view, but not as fast, so that as we scale down,<NEW_LINE>// the size of the paint area starts to get larger than the vertex<NEW_LINE>offset = (int) <MASK><NEW_LINE>g.fillOval(bounds.x - offset, bounds.y - offset, bounds.width + (offset * 2), bounds.height + (offset * 2));<NEW_LINE>if (isGraphScaledEnoughToBeDifficultToSee(rc)) {<NEW_LINE>g.setColor(Color.BLACK);<NEW_LINE>g.drawOval(bounds.x - offset, bounds.y - offset, bounds.width + (offset * 2), bounds.height + (offset * 2));<NEW_LINE>g.drawOval(bounds.x - offset - 1, bounds.y - offset - 1, bounds.width + (offset * 2) + 2, bounds.height + (offset * 2) + 2);<NEW_LINE>g.drawOval(bounds.x - offset - 2, bounds.y - offset - 2, bounds.width + (offset * 2) + 4, bounds.height + (offset * 2) + 4);<NEW_LINE>}<NEW_LINE>g.setPaint(oldPaint);<NEW_LINE>}
adjustValueForCurrentScale(rc, offset, .9);
675,902
public void exposeObject(String name, Object obj) throws IOException {<NEW_LINE>// Create a local object<NEW_LINE>LocalObject localObj = new LocalObject();<NEW_LINE>localObj.objectName = name;<NEW_LINE>localObj.objectId = objectIdCounter++;<NEW_LINE>localObj.theObject = obj;<NEW_LINE>// localObj.methods = obj.getClass().getMethods();<NEW_LINE>ArrayList<Method> methodList = new ArrayList<>();<NEW_LINE>for (Method method : obj.getClass().getMethods()) {<NEW_LINE>if (method.getDeclaringClass() == obj.getClass()) {<NEW_LINE>methodList.add(method);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>localObj.methods = methodList.toArray(new Method[methodList.size()]);<NEW_LINE>// Put it in the store<NEW_LINE>localObjects.put(localObj.objectId, localObj);<NEW_LINE>// Inform the others of its existence<NEW_LINE>RemoteObjectDefMessage defMsg = new RemoteObjectDefMessage();<NEW_LINE>defMsg.objects = new ObjectDef<MASK><NEW_LINE>if (client != null) {<NEW_LINE>client.send(defMsg);<NEW_LINE>logger.log(Level.FINE, "Client: Sending {0}", defMsg);<NEW_LINE>} else {<NEW_LINE>server.broadcast(defMsg);<NEW_LINE>logger.log(Level.FINE, "Server: Sending {0}", defMsg);<NEW_LINE>}<NEW_LINE>}
[] { makeObjectDef(localObj) };
1,033,478
public void startPublishing(final String prop) {<NEW_LINE>trace(_log, "register: ", prop);<NEW_LINE>if (_eventBus == null) {<NEW_LINE>throw new IllegalStateException("_eventBus must not be null when publishing");<NEW_LINE>}<NEW_LINE>// Zookeeper callbacks (see the listener below) will be executed by the Zookeeper<NEW_LINE>// notification thread, in order. See:<NEW_LINE>// http://zookeeper.apache.org/doc/current/zookeeperProgrammers.html#Java+Binding<NEW_LINE>// This call occurs on a different thread, the PropertyEventBus callback thread.<NEW_LINE>//<NEW_LINE>// Publication to the event bus always occurs in the callback which is executed by the<NEW_LINE>// ZooKeeper notification thread. Since ZK guarantees the callbacks will be executed in<NEW_LINE>// the same order as the requests were made, we will never publish a stale value to the bus,<NEW_LINE>// even if there was a watch set on this property before this call to startPublishing().<NEW_LINE>_zkStoreWatcher.addWatch(prop);<NEW_LINE>_zk.getData(getPath(prop<MASK><NEW_LINE>}
), _zkStoreWatcher, _zkStoreWatcher, true);
468,970
private Identity checkIdentity(Business business, PullResult result, Person person, Unit unit, User user) throws Exception {<NEW_LINE>EntityManagerContainer emc = business.entityManagerContainer();<NEW_LINE>EntityManager em = emc.get(Identity.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Identity> cq = <MASK><NEW_LINE>Root<Identity> root = cq.from(Identity.class);<NEW_LINE>Predicate p = cb.equal(root.get(Identity_.person), person.getId());<NEW_LINE>p = cb.and(p, cb.equal(root.get(Identity_.unit), unit.getId()));<NEW_LINE>List<Identity> os = em.createQuery(cq.select(root).where(p)).setMaxResults(1).getResultList();<NEW_LINE>Identity identity = null;<NEW_LINE>Long order = null;<NEW_LINE>if (StringUtils.isNotEmpty(user.getOrderInDepts())) {<NEW_LINE>Map<Long, Long> map = new HashMap<Long, Long>();<NEW_LINE>map = XGsonBuilder.instance().fromJson(user.getOrderInDepts(), map.getClass());<NEW_LINE>for (Entry<Long, Long> en : map.entrySet()) {<NEW_LINE>if (Objects.equals(Long.parseLong(unit.getDingdingId()), en.getKey())) {<NEW_LINE>order = en.getValue();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (os.size() == 0) {<NEW_LINE>identity = this.createIdentity(business, result, person, unit, user, order);<NEW_LINE>} else {<NEW_LINE>identity = os.get(0);<NEW_LINE>identity = this.updateIdentity(business, result, unit, identity, user, order);<NEW_LINE>}<NEW_LINE>return identity;<NEW_LINE>}
cb.createQuery(Identity.class);
842,710
public static DarkClusterConfigMap toConfig(Map<String, Object> properties) {<NEW_LINE>DarkClusterConfigMap configMap = new DarkClusterConfigMap();<NEW_LINE>for (Map.Entry<String, Object> entry : properties.entrySet()) {<NEW_LINE>String darkClusterName = entry.getKey();<NEW_LINE>DarkClusterConfig darkClusterConfig = new DarkClusterConfig();<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Map<String, Object> props = (Map<String, <MASK><NEW_LINE>if (props.containsKey(PropertyKeys.DARK_CLUSTER_MULTIPLIER)) {<NEW_LINE>darkClusterConfig.setMultiplier(PropertyUtil.coerce(props.get(PropertyKeys.DARK_CLUSTER_MULTIPLIER), Float.class));<NEW_LINE>} else {<NEW_LINE>// to maintain backwards compatibility with previously ser/de, set the default on deserialization<NEW_LINE>darkClusterConfig.setMultiplier(DARK_CLUSTER_DEFAULT_MULTIPLIER);<NEW_LINE>}<NEW_LINE>if (props.containsKey(PropertyKeys.DARK_CLUSTER_OUTBOUND_TARGET_RATE)) {<NEW_LINE>darkClusterConfig.setDispatcherOutboundTargetRate(PropertyUtil.coerce(props.get(PropertyKeys.DARK_CLUSTER_OUTBOUND_TARGET_RATE), Float.class));<NEW_LINE>} else {<NEW_LINE>darkClusterConfig.setDispatcherOutboundTargetRate(DARK_CLUSTER_DEFAULT_TARGET_RATE);<NEW_LINE>}<NEW_LINE>if (props.containsKey(PropertyKeys.DARK_CLUSTER_MAX_REQUESTS_TO_BUFFER)) {<NEW_LINE>darkClusterConfig.setDispatcherMaxRequestsToBuffer(PropertyUtil.coerce(props.get(PropertyKeys.DARK_CLUSTER_MAX_REQUESTS_TO_BUFFER), Integer.class));<NEW_LINE>} else {<NEW_LINE>darkClusterConfig.setDispatcherMaxRequestsToBuffer(DARK_CLUSTER_DEFAULT_MAX_REQUESTS_TO_BUFFER);<NEW_LINE>}<NEW_LINE>if (props.containsKey(PropertyKeys.DARK_CLUSTER_BUFFERED_REQUEST_EXPIRY_IN_SECONDS)) {<NEW_LINE>darkClusterConfig.setDispatcherBufferedRequestExpiryInSeconds(PropertyUtil.coerce(props.get(PropertyKeys.DARK_CLUSTER_BUFFERED_REQUEST_EXPIRY_IN_SECONDS), Integer.class));<NEW_LINE>} else {<NEW_LINE>darkClusterConfig.setDispatcherBufferedRequestExpiryInSeconds(DARK_CLUSTER_DEFAULT_BUFFERED_REQUEST_EXPIRY_IN_SECONDS);<NEW_LINE>}<NEW_LINE>if (props.containsKey(PropertyKeys.DARK_CLUSTER_STRATEGY_LIST)) {<NEW_LINE>DataList dataList = new DataList();<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>List<String> strategyList = (List<String>) props.get(PropertyKeys.DARK_CLUSTER_STRATEGY_LIST);<NEW_LINE>dataList.addAll(strategyList);<NEW_LINE>DarkClusterStrategyNameArray darkClusterStrategyNameArray = new DarkClusterStrategyNameArray(dataList);<NEW_LINE>darkClusterConfig.setDarkClusterStrategyPrioritizedList(darkClusterStrategyNameArray);<NEW_LINE>}<NEW_LINE>if (props.containsKey(PropertyKeys.DARK_CLUSTER_TRANSPORT_CLIENT_PROPERTIES)) {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>D2TransportClientProperties transportClientProperties = TransportClientPropertiesConverter.toConfig((Map<String, Object>) props.get(PropertyKeys.DARK_CLUSTER_TRANSPORT_CLIENT_PROPERTIES));<NEW_LINE>darkClusterConfig.setTransportClientProperties(transportClientProperties);<NEW_LINE>}<NEW_LINE>configMap.put(darkClusterName, darkClusterConfig);<NEW_LINE>}<NEW_LINE>return configMap;<NEW_LINE>}
Object>) entry.getValue();
302,103
public static ConditionQuery constructEdgesQuery(Id sourceVertex, Directions direction, Id... edgeLabels) {<NEW_LINE>E.checkState(sourceVertex != null, "The edge query must contain source vertex");<NEW_LINE>E.checkState(direction != null, "The edge query must contain direction");<NEW_LINE>ConditionQuery query = new ConditionQuery(HugeType.EDGE);<NEW_LINE>// Edge source vertex<NEW_LINE>query.eq(HugeKeys.OWNER_VERTEX, sourceVertex);<NEW_LINE>// Edge direction<NEW_LINE>if (direction == Directions.BOTH) {<NEW_LINE>query.query(Condition.or(Condition.eq(HugeKeys.DIRECTION, Directions.OUT), Condition.eq(HugeKeys.DIRECTION, Directions.IN)));<NEW_LINE>} else {<NEW_LINE>assert direction == Directions.OUT || direction == Directions.IN;<NEW_LINE>query.eq(HugeKeys.DIRECTION, direction);<NEW_LINE>}<NEW_LINE>// Edge labels<NEW_LINE>if (edgeLabels.length == 1) {<NEW_LINE>query.eq(HugeKeys<MASK><NEW_LINE>} else if (edgeLabels.length > 1) {<NEW_LINE>query.query(Condition.in(HugeKeys.LABEL, Arrays.asList(edgeLabels)));<NEW_LINE>} else {<NEW_LINE>assert edgeLabels.length == 0;<NEW_LINE>}<NEW_LINE>return query;<NEW_LINE>}
.LABEL, edgeLabels[0]);
1,854,197
static boolean matchHostName(String hostName, String pattern) {<NEW_LINE>checkArgument(hostName.length() != 0 && !hostName.startsWith(".") && !hostName.endsWith("."), "Invalid host name");<NEW_LINE>checkArgument(pattern.length() != 0 && !pattern.startsWith(".") && !pattern.endsWith("."), "Invalid pattern/domain name");<NEW_LINE>hostName = <MASK><NEW_LINE>pattern = pattern.toLowerCase(Locale.US);<NEW_LINE>// hostName and pattern are now in lower case -- domain names are case-insensitive.<NEW_LINE>if (!pattern.contains("*")) {<NEW_LINE>// Not a wildcard pattern -- hostName and pattern must match exactly.<NEW_LINE>return hostName.equals(pattern);<NEW_LINE>}<NEW_LINE>// Wildcard pattern<NEW_LINE>if (pattern.length() == 1) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>int index = pattern.indexOf('*');<NEW_LINE>// At most one asterisk (*) is allowed.<NEW_LINE>if (pattern.indexOf('*', index + 1) != -1) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Asterisk can only match prefix or suffix.<NEW_LINE>if (index != 0 && index != pattern.length() - 1) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// HostName must be at least as long as the pattern because asterisk has to<NEW_LINE>// match one or more characters.<NEW_LINE>if (hostName.length() < pattern.length()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (index == 0 && hostName.endsWith(pattern.substring(1))) {<NEW_LINE>// Prefix matching fails.<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// Pattern matches hostname if suffix matching succeeds.<NEW_LINE>return index == pattern.length() - 1 && hostName.startsWith(pattern.substring(0, pattern.length() - 1));<NEW_LINE>}
hostName.toLowerCase(Locale.US);
1,653,914
private void parseSize(VDTree apath, Attributes attributes) {<NEW_LINE>Pattern pattern = Pattern.compile("^\\s*(\\d+(\\.\\d+)*)\\s*([a-zA-Z]+)\\s*$");<NEW_LINE>HashMap<String, Integer> m = new HashMap<String, Integer>();<NEW_LINE>m.put("px", 1);<NEW_LINE>m.put("dip", 1);<NEW_LINE>m.put("dp", 1);<NEW_LINE>m.put("sp", 1);<NEW_LINE>m.put("pt", 1);<NEW_LINE>m.put("in", 1);<NEW_LINE>m.put("mm", 1);<NEW_LINE>int len = attributes.getLength();<NEW_LINE>for (int i = 0; i < len; i++) {<NEW_LINE>String name = attributes.getQName(i);<NEW_LINE>String value = attributes.getValue(i);<NEW_LINE>Matcher matcher = pattern.matcher(value);<NEW_LINE>float size = 0;<NEW_LINE>if (matcher.matches()) {<NEW_LINE>float v = Float.parseFloat<MASK><NEW_LINE>String unit = matcher.group(3).toLowerCase();<NEW_LINE>size = v;<NEW_LINE>}<NEW_LINE>// -- Extract dimension units.<NEW_LINE>if ("android:width".equals(name)) {<NEW_LINE>apath.mBaseWidth = size;<NEW_LINE>} else if ("android:height".equals(name)) {<NEW_LINE>apath.mBaseHeight = size;<NEW_LINE>} else if ("android:viewportWidth".equals(name)) {<NEW_LINE>apath.mPortWidth = Float.parseFloat(value);<NEW_LINE>;<NEW_LINE>} else if ("android:viewportHeight".equals(name)) {<NEW_LINE>apath.mPortHeight = Float.parseFloat(value);<NEW_LINE>;<NEW_LINE>} else {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(matcher.group(1));
735,074
public boolean read(java.io.ObjectInputStream p_object_stream) {<NEW_LINE>try {<NEW_LINE>SavedAttributes saved_attributes = (SavedAttributes) p_object_stream.readObject();<NEW_LINE>this.snapshot_count = saved_attributes.snapshot_count;<NEW_LINE>this.list_model = saved_attributes.list_model;<NEW_LINE>this.list.setModel(this.list_model);<NEW_LINE>String next_default_name = "snapshot " + (Integer.valueOf(snapshot_count + 1)).toString();<NEW_LINE>this.name_field.setText(next_default_name);<NEW_LINE>this.setLocation(saved_attributes.location);<NEW_LINE><MASK><NEW_LINE>this.settings_window.read(p_object_stream);<NEW_LINE>return true;<NEW_LINE>} catch (Exception e) {<NEW_LINE>FRLogger.error("VisibilityFrame.read_attriutes: read failed", e);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
this.setVisible(saved_attributes.is_visible);
1,183,391
public static void main(String[] args) throws IOException {<NEW_LINE>// Use the factory to get the version 1 Mercado Bitcoin exchange API using default settings<NEW_LINE>Exchange mercadoExchange = ExchangeFactory.INSTANCE.createExchange(MercadoBitcoinExchange.class);<NEW_LINE>// Interested in the public market data feed (no authentication)<NEW_LINE>MarketDataService marketDataService = mercadoExchange.getMarketDataService();<NEW_LINE>System.out.println("fetching data...");<NEW_LINE>// Get the current orderbook<NEW_LINE>OrderBook orderBook = marketDataService.getOrderBook(new CurrencyPair(Currency.LTC, Currency.BRL));<NEW_LINE>System.out.println("received data.");<NEW_LINE>System.out.println("plotting...");<NEW_LINE>// Create Chart<NEW_LINE>XYChart chart = new XYChartBuilder().width(800).height(600).title("Mercado Order Book").xAxisTitle("LTC").yAxisTitle("BRL").build();<NEW_LINE>// Customize Chart<NEW_LINE>chart.getStyler().setDefaultSeriesRenderStyle(XYSeriesRenderStyle.Area);<NEW_LINE>// BIDS<NEW_LINE>List<Number> xData = new ArrayList<>();<NEW_LINE>List<Number> <MASK><NEW_LINE>BigDecimal accumulatedBidUnits = new BigDecimal("0");<NEW_LINE>for (LimitOrder limitOrder : orderBook.getBids()) {<NEW_LINE>if (limitOrder.getLimitPrice().doubleValue() > 0) {<NEW_LINE>xData.add(limitOrder.getLimitPrice());<NEW_LINE>accumulatedBidUnits = accumulatedBidUnits.add(limitOrder.getOriginalAmount());<NEW_LINE>yData.add(accumulatedBidUnits);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Collections.reverse(xData);<NEW_LINE>Collections.reverse(yData);<NEW_LINE>// Bids Series<NEW_LINE>XYSeries series = chart.addSeries("bids", xData, yData);<NEW_LINE>series.setMarker(SeriesMarkers.NONE);<NEW_LINE>// ASKS<NEW_LINE>xData = new ArrayList<>();<NEW_LINE>yData = new ArrayList<>();<NEW_LINE>BigDecimal accumulatedAskUnits = new BigDecimal("0");<NEW_LINE>for (LimitOrder limitOrder : orderBook.getAsks()) {<NEW_LINE>if (limitOrder.getLimitPrice().doubleValue() < 200) {<NEW_LINE>xData.add(limitOrder.getLimitPrice());<NEW_LINE>accumulatedAskUnits = accumulatedAskUnits.add(limitOrder.getOriginalAmount());<NEW_LINE>yData.add(accumulatedAskUnits);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Asks Series<NEW_LINE>series = chart.addSeries("asks", xData, yData);<NEW_LINE>series.setMarker(SeriesMarkers.NONE);<NEW_LINE>new SwingWrapper(chart).displayChart();<NEW_LINE>}
yData = new ArrayList<>();
974,551
private Cpe parseCpe(DefCpeMatch cpe, String cveId) throws DatabaseException {<NEW_LINE>Cpe parsedCpe;<NEW_LINE>try {<NEW_LINE>// the replace is a hack as the NVD does not properly escape backslashes in their JSON<NEW_LINE>parsedCpe = CpeParser.parse(<MASK><NEW_LINE>} catch (CpeParsingException ex) {<NEW_LINE>LOGGER.debug("NVD (" + cveId + ") contain an invalid 2.3 CPE: " + cpe.getCpe23Uri());<NEW_LINE>if (cpe.getCpe22Uri() != null && !cpe.getCpe22Uri().isEmpty()) {<NEW_LINE>try {<NEW_LINE>parsedCpe = CpeParser.parse(cpe.getCpe22Uri(), true);<NEW_LINE>} catch (CpeParsingException ex2) {<NEW_LINE>throw new DatabaseException("Unable to parse CPE: " + cpe.getCpe23Uri(), ex);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new DatabaseException("Unable to parse CPE: " + cpe.getCpe23Uri(), ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return parsedCpe;<NEW_LINE>}
cpe.getCpe23Uri(), true);
277,735
public <T> It<T> createIterator(@Nonnull Iterable<? extends T> roots, @Nonnull final Function<T, ? extends Iterable<? extends T>> tree) {<NEW_LINE>class WrappedTree implements Condition<T>, Function<T, Iterable<? extends T>> {<NEW_LINE><NEW_LINE>HashSet<Object> visited;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean value(T e) {<NEW_LINE>if (visited == null)<NEW_LINE>visited = new HashSet<Object>();<NEW_LINE>// noinspection unchecked<NEW_LINE>return visited.add(((Function<T, Object>) identity).fun(e));<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Iterable<? extends T> fun(T t) {<NEW_LINE>return JBIterable.from(tree.fun(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (tree instanceof WrappedTree)<NEW_LINE>return original.createIterator(roots, tree);<NEW_LINE>WrappedTree wrappedTree = new WrappedTree();<NEW_LINE>return original.createIterator(JBIterable.from(roots).filter(wrappedTree), wrappedTree);<NEW_LINE>}
t)).filter(this);
745,474
public void onIEBlockPlacedBy(BlockPlaceContext context, BlockState state) {<NEW_LINE>Level world = context.getLevel();<NEW_LINE>BlockPos pos = context.getClickedPos();<NEW_LINE>BlockEntity tile = world.getBlockEntity(pos);<NEW_LINE>Player placer = context.getPlayer();<NEW_LINE>Direction side = context.getClickedFace();<NEW_LINE>float hitX = (float) context.getClickLocation().x - pos.getX();<NEW_LINE>float hitY = (float) context.getClickLocation().y - pos.getY();<NEW_LINE>float hitZ = (float) context.getClickLocation()<MASK><NEW_LINE>ItemStack stack = context.getItemInHand();<NEW_LINE>if (tile instanceof IDirectionalTile) {<NEW_LINE>Direction f = ((IDirectionalTile) tile).getFacingForPlacement(placer, pos, side, hitX, hitY, hitZ);<NEW_LINE>((IDirectionalTile) tile).setFacing(f);<NEW_LINE>if (tile instanceof IAdvancedDirectionalTile)<NEW_LINE>((IAdvancedDirectionalTile) tile).onDirectionalPlacement(side, hitX, hitY, hitZ, placer);<NEW_LINE>}<NEW_LINE>if (tile instanceof IReadOnPlacement)<NEW_LINE>((IReadOnPlacement) tile).readOnPlacement(placer, stack);<NEW_LINE>if (tile instanceof IHasDummyBlocks)<NEW_LINE>((IHasDummyBlocks) tile).placeDummies(context, state);<NEW_LINE>if (tile instanceof IPlacementInteraction)<NEW_LINE>((IPlacementInteraction) tile).onTilePlaced(world, pos, state, side, hitX, hitY, hitZ, placer, stack);<NEW_LINE>}
.z - pos.getZ();
1,746,619
protected void assignColorsToLocals(Body body) {<NEW_LINE>if (Options.v().verbose()) {<NEW_LINE>logger.debug("[" + body.getMethod().getName() + "] Assigning colors to locals...");<NEW_LINE>}<NEW_LINE>if (Options.v().time()) {<NEW_LINE>Timers.v().packTimer.start();<NEW_LINE>}<NEW_LINE>localToGroup = new HashMap<Local, Object>(body.getLocalCount() * 2 + 1, 0.7f);<NEW_LINE>groupToColorCount = new HashMap<Object, Integer>(body.getLocalCount() * 2 + 1, 0.7f);<NEW_LINE>localToColor = new HashMap<Local, Integer>(body.getLocalCount(<MASK><NEW_LINE>// Assign each local to a group, and set that group's color count to 0.<NEW_LINE>for (Local l : body.getLocals()) {<NEW_LINE>Object g = (sizeOfType(l.getType()) == 1) ? IntType.v() : LongType.v();<NEW_LINE>localToGroup.put(l, g);<NEW_LINE>groupToColorCount.putIfAbsent(g, 0);<NEW_LINE>}<NEW_LINE>// Assign colors to the parameter locals.<NEW_LINE>for (Unit s : body.getUnits()) {<NEW_LINE>if (s instanceof IdentityStmt) {<NEW_LINE>Value leftOp = ((IdentityStmt) s).getLeftOp();<NEW_LINE>if (leftOp instanceof Local) {<NEW_LINE>Local l = (Local) leftOp;<NEW_LINE>Object group = localToGroup.get(l);<NEW_LINE>int count = groupToColorCount.get(group);<NEW_LINE>localToColor.put(l, count);<NEW_LINE>groupToColorCount.put(group, count + 1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
) * 2 + 1, 0.7f);
1,507,832
protected void createSocksGroup(Composite parent) {<NEW_LINE>final Composite composite = UIUtils.createControlGroup(parent, "SOCKS", 4, GridData.FILL_HORIZONTAL, SWT.DEFAULT);<NEW_LINE>// $NON-NLS-2$<NEW_LINE>hostText = UIUtils.createLabelText(composite, UIConnectionMessages.dialog_connection_network_socket_label_host, null);<NEW_LINE>hostText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));<NEW_LINE>portText = UIUtils.createLabelSpinner(composite, UIConnectionMessages.dialog_connection_network_socket_label_port, <MASK><NEW_LINE>GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);<NEW_LINE>gd.widthHint = UIUtils.getFontHeight(portText) * 7;<NEW_LINE>portText.setLayoutData(gd);<NEW_LINE>// $NON-NLS-2$<NEW_LINE>userNameText = UIUtils.createLabelText(composite, UIConnectionMessages.dialog_connection_network_socket_label_username, null);<NEW_LINE>userNameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));<NEW_LINE>// $NON-NLS-2$<NEW_LINE>passwordText = UIUtils.createLabelText(composite, UIConnectionMessages.dialog_connection_network_socket_label_password, "", SWT.BORDER | SWT.PASSWORD);<NEW_LINE>UIUtils.createEmptyLabel(composite, 1, 1);<NEW_LINE>savePasswordCheckbox = UIUtils.createCheckbox(composite, UIConnectionMessages.dialog_connection_auth_checkbox_save_password, false);<NEW_LINE>UIUtils.createLink(parent, UIConnectionMessages.dialog_connection_open_global_network_preferences_link, new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent e) {<NEW_LINE>PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(UIUtils.getActiveWorkbenchShell(), NETWORK_PREF_PAGE_ID, null, null);<NEW_LINE>dialog.open();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
SocksConstants.DEFAULT_SOCKS_PORT, 0, 65535);
901,170
protected static Object filterItem(final String iConditionFieldName, final Object iConditionFieldValue, final Object iValue) {<NEW_LINE>if (iValue instanceof OIdentifiable) {<NEW_LINE>final ORecord rec = ((OIdentifiable) iValue).getRecord();<NEW_LINE>if (rec instanceof ODocument) {<NEW_LINE>final ODocument doc = (ODocument) rec;<NEW_LINE>Object fieldValue = doc.field(iConditionFieldName);<NEW_LINE>if (iConditionFieldValue == null)<NEW_LINE><MASK><NEW_LINE>fieldValue = OType.convert(fieldValue, iConditionFieldValue.getClass());<NEW_LINE>if (fieldValue != null && fieldValue.equals(iConditionFieldValue))<NEW_LINE>return doc;<NEW_LINE>}<NEW_LINE>} else if (iValue instanceof Map<?, ?>) {<NEW_LINE>final Map<String, ?> map = (Map<String, ?>) iValue;<NEW_LINE>Object fieldValue = getMapEntry(map, iConditionFieldName);<NEW_LINE>fieldValue = OType.convert(fieldValue, iConditionFieldValue.getClass());<NEW_LINE>if (fieldValue != null && fieldValue.equals(iConditionFieldValue))<NEW_LINE>return map;<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
return fieldValue == null ? doc : null;
42,455
public GetResourceCollectionResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetResourceCollectionResult getResourceCollectionResult = new GetResourceCollectionResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return getResourceCollectionResult;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("ResourceCollection", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>getResourceCollectionResult.setResourceCollection(ResourceCollectionFilterJsonUnmarshaller.getInstance<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("NextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>getResourceCollectionResult.setNextToken(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return getResourceCollectionResult;<NEW_LINE>}
().unmarshall(context));
534,634
public Instance pipe(Instance carrier) {<NEW_LINE>TokenSequence ts = (TokenSequence) carrier.getData();<NEW_LINE>for (int i = 0; i < ts.size(); i++) {<NEW_LINE>Token t = ts.get(i);<NEW_LINE>String s = t.getText();<NEW_LINE>String conS = s;<NEW_LINE>// dealing with ([a-z]+), ([a-z]+, [a-z]+), [a-z]+.<NEW_LINE>if (conS.startsWith("("))<NEW_LINE>conS = conS.substring(1);<NEW_LINE>if (conS.endsWith(")") || conS.endsWith("."))<NEW_LINE>conS = conS.substring(0, <MASK><NEW_LINE>if (lexicon.contains(ignoreCase ? s.toLowerCase() : s))<NEW_LINE>t.setFeatureValue(name, 1.0);<NEW_LINE>if (conS.compareTo(s) != 0) {<NEW_LINE>if (lexicon.contains(ignoreCase ? conS.toLowerCase() : conS))<NEW_LINE>t.setFeatureValue(name, 1.0);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return carrier;<NEW_LINE>}
conS.length() - 1);
999,424
public boolean execute(final OHttpRequest iRequest, OHttpResponse iResponse) throws Exception {<NEW_LINE>checkSyntax(iRequest.getUrl(), 2, "Syntax error: document/<database>");<NEW_LINE>iRequest.getData().commandInfo = "Create document";<NEW_LINE>ODatabaseDocument db = null;<NEW_LINE>ODocument doc;<NEW_LINE>try {<NEW_LINE>db = getProfiledDatabaseInstance(iRequest);<NEW_LINE>doc = new ODocument().fromJSON(iRequest.getContent());<NEW_LINE>ORecordInternal.setVersion(doc, 0);<NEW_LINE>// ASSURE TO MAKE THE RECORD ID INVALID<NEW_LINE>((ORecordId) doc.getIdentity()).setClusterPosition(ORID.CLUSTER_POS_INVALID);<NEW_LINE>doc.save();<NEW_LINE>iResponse.send(OHttpUtils.STATUS_CREATED_CODE, OHttpUtils.STATUS_CREATED_DESCRIPTION, OHttpUtils.CONTENT_JSON, doc.toJSON(), OHttpUtils.<MASK><NEW_LINE>} finally {<NEW_LINE>if (db != null)<NEW_LINE>db.close();<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
HEADER_ETAG + doc.getVersion());
1,004,134
private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String networkProfileName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (networkProfileName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter networkProfileName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String apiVersion = "2018-11-01";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.delete(this.client.getEndpoint(), resourceGroupName, networkProfileName, apiVersion, this.client.getSubscriptionId(), context);<NEW_LINE>}
error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
435,616
DoubleArray computedBucketedCs01(ResolvedCdsTrade trade, List<ResolvedCdsTrade> bucketCds, CreditRatesProvider ratesProvider, ReferenceData refData) {<NEW_LINE>checkCdsBucket(trade, bucketCds);<NEW_LINE>ResolvedCds product = trade.getProduct();<NEW_LINE>Currency currency = product.getCurrency();<NEW_LINE><MASK><NEW_LINE>LocalDate valuationDate = ratesProvider.getValuationDate();<NEW_LINE>int nBucket = bucketCds.size();<NEW_LINE>DoubleArray impSp = impliedSpread(bucketCds, ratesProvider, refData);<NEW_LINE>NodalCurve creditCurveBase = getCalibrator().calibrate(bucketCds, impSp, DoubleArray.filled(nBucket), CurveName.of("baseImpliedCreditCurve"), valuationDate, ratesProvider.discountFactors(currency), ratesProvider.recoveryRates(legalEntityId), refData);<NEW_LINE>IsdaCreditDiscountFactors df = IsdaCreditDiscountFactors.of(currency, valuationDate, creditCurveBase);<NEW_LINE>CreditRatesProvider ratesProviderBase = ratesProvider.toImmutableCreditRatesProvider().toBuilder().creditCurves(ImmutableMap.of(Pair.of(legalEntityId, currency), LegalEntitySurvivalProbabilities.of(legalEntityId, df))).build();<NEW_LINE>double[][] res = new double[nBucket][];<NEW_LINE>PointSensitivities pointPv = getPricer().presentValueOnSettleSensitivity(trade, ratesProviderBase, refData);<NEW_LINE>DoubleArray vLambda = ratesProviderBase.singleCreditCurveParameterSensitivity(pointPv, legalEntityId, currency).getSensitivity();<NEW_LINE>for (int i = 0; i < nBucket; i++) {<NEW_LINE>PointSensitivities pointSp = getPricer().parSpreadSensitivity(bucketCds.get(i), ratesProviderBase, refData);<NEW_LINE>res[i] = ratesProviderBase.singleCreditCurveParameterSensitivity(pointSp, legalEntityId, currency).getSensitivity().toArray();<NEW_LINE>}<NEW_LINE>DoubleMatrix jacT = MATRIX_ALGEBRA.getTranspose(DoubleMatrix.ofUnsafe(res));<NEW_LINE>LUDecompositionResult luRes = DECOMPOSITION.apply(jacT);<NEW_LINE>DoubleArray vS = luRes.solve(vLambda);<NEW_LINE>return vS;<NEW_LINE>}
StandardId legalEntityId = product.getLegalEntityId();
749,337
final DeleteCacheParameterGroupResult executeDeleteCacheParameterGroup(DeleteCacheParameterGroupRequest deleteCacheParameterGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteCacheParameterGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteCacheParameterGroupRequest> request = null;<NEW_LINE>Response<DeleteCacheParameterGroupResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteCacheParameterGroupRequestMarshaller().marshall(super.beforeMarshalling(deleteCacheParameterGroupRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ElastiCache");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteCacheParameterGroup");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DeleteCacheParameterGroupResult> responseHandler = new StaxResponseHandler<DeleteCacheParameterGroupResult>(new DeleteCacheParameterGroupResultStaxUnmarshaller());<NEW_LINE>response = <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
invoke(request, responseHandler, executionContext);
227,409
public MasterBenchTaskResult runLocal() throws Exception {<NEW_LINE>ExecutorService service = ExecutorServiceFactories.fixedThreadPool("maxfile-bench-thread", <MASK><NEW_LINE>List<Callable<Void>> callables = new ArrayList<>(mParameters.mThreads);<NEW_LINE>for (int i = 0; i < mParameters.mThreads; i++) {<NEW_LINE>callables.add(new AlluxioNativeMaxFileThread(i, mCachedNativeFs[i % mCachedNativeFs.length]));<NEW_LINE>}<NEW_LINE>LOG.info("Starting {} bench threads", callables.size());<NEW_LINE>long startMs = CommonUtils.getCurrentMs();<NEW_LINE>service.invokeAll(callables, FormatUtils.parseTimeSize(mBaseParameters.mBenchTimeout), TimeUnit.MILLISECONDS);<NEW_LINE>mTotalResults.setDurationMs(CommonUtils.getCurrentMs() - startMs);<NEW_LINE>LOG.info("Bench threads finished");<NEW_LINE>service.shutdownNow();<NEW_LINE>service.awaitTermination(30, TimeUnit.SECONDS);<NEW_LINE>return mTotalResults;<NEW_LINE>}
mParameters.mThreads).create();
102,084
private void init() {<NEW_LINE>// WARNING: called from ctor so must not be overridden (i.e. must be private or final)<NEW_LINE>setLayout(new BorderLayout(0, 5));<NEW_LINE>setBorder(makeBorder());<NEW_LINE>add(makeTitlePanel(), BorderLayout.NORTH);<NEW_LINE>JPanel mainPanel = new JPanel(new BorderLayout());<NEW_LINE>mainPanel.add(createControls(), BorderLayout.NORTH);<NEW_LINE>JTabbedPane tabbedPane = new JTabbedPane();<NEW_LINE>JPanel testPlanPanel = new VerticalPanel();<NEW_LINE>testPlanPanel.add(createTestPlanContentPanel());<NEW_LINE>testPlanPanel.add(Box.createVerticalStrut(5));<NEW_LINE>testPlanPanel.add(createHTTPSamplerPanel());<NEW_LINE>testPlanPanel.add(createGraphQLHTTPSamplerPanel());<NEW_LINE>tabbedPane.add(JMeterUtils.getResString("proxy_test_plan_creation"), testPlanPanel);<NEW_LINE>JPanel filteringPanel = new VerticalPanel();<NEW_LINE>tabbedPane.add(JMeterUtils.getResString("proxy_test_plan_filtering"), filteringPanel);<NEW_LINE>filteringPanel.add(createContentTypePanel());<NEW_LINE>filteringPanel.add(createIncludePanel());<NEW_LINE>filteringPanel.add(createExcludePanel());<NEW_LINE>filteringPanel.add(createNotifyListenersPanel());<NEW_LINE>JPanel vPanel = new VerticalPanel();<NEW_LINE>vPanel.add(createPortPanel());<NEW_LINE>vPanel.add<MASK><NEW_LINE>vPanel.add(tabbedPane);<NEW_LINE>mainPanel.add(vPanel, BorderLayout.CENTER);<NEW_LINE>add(mainPanel, BorderLayout.CENTER);<NEW_LINE>}
(Box.createVerticalStrut(5));
1,465,647
public int sendMessageAsync(Message message) {<NEW_LINE>OtrChatManager cm = OtrChatManager.getInstance();<NEW_LINE>SessionID sId = cm.getSessionId(message.getFrom().getAddress(), mParticipant.getAddress().getAddress());<NEW_LINE>SessionStatus otrStatus = cm.getSessionStatus(sId);<NEW_LINE>message.setTo(new XmppAddress(sId.getRemoteUserId()));<NEW_LINE>if (otrStatus == SessionStatus.ENCRYPTED) {<NEW_LINE>boolean verified = cm.getKeyManager().isVerified(sId);<NEW_LINE>if (verified) {<NEW_LINE>message.setType(Imps.MessageType.OUTGOING_ENCRYPTED_VERIFIED);<NEW_LINE>} else {<NEW_LINE>message.setType(Imps.MessageType.OUTGOING_ENCRYPTED);<NEW_LINE>}<NEW_LINE>} else if (otrStatus == SessionStatus.FINISHED) {<NEW_LINE>message.setType(Imps.MessageType.POSTPONED);<NEW_LINE>// onSendMessageError(message, new ImErrorInfo(ImErrorInfo.INVALID_SESSION_CONTEXT,"error - session finished"));<NEW_LINE>return message.getType();<NEW_LINE>} else {<NEW_LINE>// not encrypted, send to all<NEW_LINE>// message.setTo(new XmppAddress(XmppAddress.stripResource(sId.getRemoteUserId())));<NEW_LINE>message.<MASK><NEW_LINE>}<NEW_LINE>mHistoryMessages.add(message);<NEW_LINE>boolean canSend = cm.transformSending(message);<NEW_LINE>if (canSend) {<NEW_LINE>mManager.sendMessageAsync(this, message);<NEW_LINE>} else {<NEW_LINE>// can't be sent due to OTR state<NEW_LINE>message.setType(Imps.MessageType.POSTPONED);<NEW_LINE>}<NEW_LINE>return message.getType();<NEW_LINE>}
setType(Imps.MessageType.OUTGOING);
440,011
private void lowerInvokeNode(InvokeNode invokeWithArrayAlloc) {<NEW_LINE>CallTargetNode callTarget = invokeWithArrayAlloc.callTarget();<NEW_LINE>final StructuredGraph graph = invokeWithArrayAlloc.graph();<NEW_LINE>final ValueNode secondInput = callTarget.arguments().get(1);<NEW_LINE>if (secondInput instanceof ConstantNode) {<NEW_LINE>final ConstantNode lengthNode = (ConstantNode) secondInput;<NEW_LINE>if (lengthNode.getValue() instanceof PrimitiveConstant) {<NEW_LINE>final int length = ((PrimitiveConstant) lengthNode.<MASK><NEW_LINE>JavaKind elementKind = getJavaKindFromConstantNode((ConstantNode) callTarget.arguments().get(0));<NEW_LINE>final int offset = metaAccessProvider.getArrayBaseOffset(elementKind);<NEW_LINE>final int size = offset + (elementKind.getByteCount() * length);<NEW_LINE>if (SPIRVLoweringProvider.isGPUSnippet()) {<NEW_LINE>lowerLocalInvokeNodeNewArray(graph, length, elementKind, invokeWithArrayAlloc);<NEW_LINE>} else {<NEW_LINE>lowerPrivateInvokeNodeNewArray(graph, size, elementKind, invokeWithArrayAlloc);<NEW_LINE>}<NEW_LINE>invokeWithArrayAlloc.clearInputs();<NEW_LINE>GraphUtil.unlinkFixedNode(invokeWithArrayAlloc);<NEW_LINE>} else {<NEW_LINE>throw new RuntimeException("Unimplemented");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new RuntimeException("dynamically sized array declarations are not supported");<NEW_LINE>}<NEW_LINE>}
getValue()).asInt();
272,386
public void actionPerformed(ActionEvent e) {<NEW_LINE>// 1) load all keymaps to allKeyMaps<NEW_LINE>Map<String, Map<String, ShortcutAction>> allKeyMaps = new HashMap<String, Map<String, ShortcutAction>>();<NEW_LINE>LayersBridge layersBridge = new LayersBridge();<NEW_LINE>// no synchronization needed; the bridge is a new instance<NEW_LINE>layersBridge.getActions();<NEW_LINE><MASK><NEW_LINE>Iterator it3 = keyMaps.iterator();<NEW_LINE>while (it3.hasNext()) {<NEW_LINE>String keyMapName = (String) it3.next();<NEW_LINE>Map<ShortcutAction, Set<String>> actionToShortcuts = layersBridge.getKeymap(keyMapName);<NEW_LINE>Map<String, ShortcutAction> shortcutToAction = LayersBridge.shortcutToAction(actionToShortcuts);<NEW_LINE>allKeyMaps.put(keyMapName, shortcutToAction);<NEW_LINE>}<NEW_LINE>generateLayersXML(layersBridge, allKeyMaps);<NEW_LINE>}
List keyMaps = layersBridge.getProfiles();
375,683
void readPersistence() {<NEW_LINE>if (persistenceFile.exists()) {<NEW_LINE>try {<NEW_LINE>properties.load(new FileInputStream(persistenceFile));<NEW_LINE>String ebene = properties.getProperty("ebene", String.valueOf<MASK><NEW_LINE>int ebe = Integer.valueOf(ebene);<NEW_LINE>if (ebe >= 0) {<NEW_LINE>controlUnit.setEbene(ebe);<NEW_LINE>}<NEW_LINE>String einaus = properties.getProperty("knoteneinaus", String.valueOf(controlUnit.getKnotenEinAus()));<NEW_LINE>controlUnit.setKnotenEinAus(Integer.valueOf(einaus));<NEW_LINE>String va = properties.getProperty("va", String.valueOf(controlUnit.isVA()));<NEW_LINE>controlUnit.setVA(Boolean.valueOf(va));<NEW_LINE>String iv = properties.getProperty("iv", String.valueOf(controlUnit.isIV()));<NEW_LINE>controlUnit.setIV(Boolean.valueOf(iv));<NEW_LINE>String ov = properties.getProperty("ov", String.valueOf(controlUnit.isOV()));<NEW_LINE>controlUnit.setOV(Boolean.valueOf(ov));<NEW_LINE>// String ebene = properties.getProperty("betriebsart", String.valueOf(controlUnit.get));<NEW_LINE>// controlUnit.setEbene(Integer.valueOf(ebene));<NEW_LINE>String sp = properties.getProperty("signalprogram", String.valueOf(vector.getSignalProgramIndex()));<NEW_LINE>int dd = Integer.valueOf(sp);<NEW_LINE>if (dd >= 0) {<NEW_LINE>controlUnit.setCurrentSignalProgram(dd);<NEW_LINE>}<NEW_LINE>} catch (IOException ex) {<NEW_LINE>ex.printStackTrace(System.out);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(controlUnit.getEbene()));
829,647
public void initialize() throws LifecycleException {<NEW_LINE>// Service shouldn't be used with embedded, so it doesn't matter<NEW_LINE>if (initialized) {<NEW_LINE>if (log.isLoggable(Level.INFO)) {<NEW_LINE>log.log(Level.INFO, LogFacade.SERVICE_HAS_BEEN_INIT);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>initialized = true;<NEW_LINE>if (oname == null) {<NEW_LINE>try {<NEW_LINE>// Hack - Server should be deprecated...<NEW_LINE>Container engine = this.getContainer();<NEW_LINE>domain = engine.getName();<NEW_LINE>oname = new ObjectName(domain + ":type=Service,serviceName=" + name);<NEW_LINE>} catch (Exception e) {<NEW_LINE>String msg = MessageFormat.format(rb.getString(LogFacade.ERROR_REGISTER_SERVICE_EXCEPTION), domain);<NEW_LINE>log.log(Level.SEVERE, msg, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (server == null) {<NEW_LINE>// Register with the server<NEW_LINE>// HACK: ServerFactory should be removed...<NEW_LINE>ServerFactory.<MASK><NEW_LINE>}<NEW_LINE>// Initialize our defined Connectors<NEW_LINE>synchronized (connectorsMonitor) {<NEW_LINE>for (Connector connector : connectors) {<NEW_LINE>connector.initialize();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getServer().addService(this);
1,396,824
private static void printNestedObjectField(PrintStream out, int tabLevel, J9ClassPointer localClazz, U8Pointer dataStart, J9ClassPointer fromClass, J9ObjectFieldOffset objectFieldOffset, long address, String[] nestingHierarchy, J9ClassPointer containerClazz) throws CorruptDataException {<NEW_LINE>J9ROMFieldShapePointer fieldShape = objectFieldOffset.getField();<NEW_LINE>UDATA fieldOffset = objectFieldOffset.getOffsetOrAddress();<NEW_LINE>boolean containerIsFlatObject = (nestingHierarchy != null) && (nestingHierarchy.length > 0);<NEW_LINE>boolean isHiddenField = objectFieldOffset.isHidden();<NEW_LINE>String fieldName = J9UTF8Helper.stringValue(fieldShape.nameAndSignature().name());<NEW_LINE>String fieldSignature = J9UTF8Helper.stringValue(fieldShape.nameAndSignature().signature());<NEW_LINE>boolean fieldIsFlattened = valueTypeHelper.isFieldInClassFlattened(localClazz, fieldShape);<NEW_LINE>padding(out, tabLevel);<NEW_LINE>if (containerIsFlatObject && valueTypeHelper.classRequires4BytePrePadding(localClazz)) {<NEW_LINE>fieldOffset = fieldOffset.sub(4);<NEW_LINE>}<NEW_LINE>U8Pointer valuePtr = dataStart.add(fieldOffset);<NEW_LINE>if (fieldIsFlattened) {<NEW_LINE>out.format("%s %s { // EA = %s (offset = %d)%n", fieldSignature.substring(1, fieldSignature.length() - 1), fieldName, valuePtr.getHexAddress(), fieldOffset.longValue());<NEW_LINE>} else {<NEW_LINE>out.<MASK><NEW_LINE>}<NEW_LINE>if (fieldShape.modifiers().anyBitsIn(J9FieldSizeDouble)) {<NEW_LINE>out.print(U64Pointer.cast(valuePtr).at(0).getHexValue());<NEW_LINE>} else if (fieldShape.modifiers().anyBitsIn(J9FieldFlagObject)) {<NEW_LINE>if (fieldIsFlattened) {<NEW_LINE>String[] newNestingHierarchy = null;<NEW_LINE>if (nestingHierarchy == null) {
format("%s %s = ", fieldSignature, fieldName);
1,011,184
public void open() {<NEW_LINE>box = new VuzeMessageBox(<MASK><NEW_LINE>box.setSubTitle(MessageText.getString(resource_prefix + ".subtitle"));<NEW_LINE>box.addResourceBundle(SimplePluginInstallWindow.class, SkinPropertiesImpl.PATH_SKIN_DEFS, "skin3_dlg_register");<NEW_LINE>box.setIconResource(resource_prefix + ".image");<NEW_LINE>this.progressText = MessageText.getString(resource_prefix + ".description");<NEW_LINE>box.setListener(new VuzeMessageBoxListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void shellReady(Shell shell, SWTSkinObjectContainer soExtra) {<NEW_LINE>SWTSkin skin = soExtra.getSkin();<NEW_LINE>skin.createSkinObject("dlg.register.install", "dlg.register.install", soExtra);<NEW_LINE>SWTSkinObjectContainer soProgressBar = (SWTSkinObjectContainer) skin.getSkinObject("progress-bar");<NEW_LINE>if (soProgressBar != null) {<NEW_LINE>progressBar = new ProgressBar(soProgressBar.getComposite(), SWT.HORIZONTAL);<NEW_LINE>progressBar.setMinimum(0);<NEW_LINE>progressBar.setMaximum(100);<NEW_LINE>progressBar.setLayoutData(Utils.getFilledFormData());<NEW_LINE>}<NEW_LINE>soInstallPct = (SWTSkinObjectText) skin.getSkinObject("install-pct");<NEW_LINE>soProgressText = (SWTSkinObjectText) skin.getSkinObject("progress-text");<NEW_LINE>if (soProgressText != null && progressText != null) {<NEW_LINE>soProgressText.setText(progressText);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>box.open(new UserPrompterResultListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void prompterClosed(int result) {<NEW_LINE>installer.setListener(null);<NEW_LINE>try {<NEW_LINE>installer.cancel();<NEW_LINE>} catch (Exception e) {<NEW_LINE>Debug.out(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
"", "", null, 0);
565,375
public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_close_white_24dp);<NEW_LINE>getSupportActionBar().setDisplayHomeAsUpEnabled(true);<NEW_LINE>mDataSource = new VpnProfileDataSource(this);<NEW_LINE>mDataSource.open();<NEW_LINE>setContentView(R.layout.profile_import_view);<NEW_LINE>mProgressBar = findViewById(R.id.progress_bar);<NEW_LINE>mExistsWarning = (TextView) findViewById(R.id.exists_warning);<NEW_LINE>mBasicDataGroup = (ViewGroup) findViewById(R.id.basic_data_group);<NEW_LINE>mName = (TextView) findViewById(R.id.name);<NEW_LINE>mGateway = (TextView) findViewById(R.id.gateway);<NEW_LINE>mSelectVpnType = (TextView) <MASK><NEW_LINE>mUsernamePassword = (ViewGroup) findViewById(R.id.username_password_group);<NEW_LINE>mUsername = (EditText) findViewById(R.id.username);<NEW_LINE>mUsernameWrap = (TextInputLayoutHelper) findViewById(R.id.username_wrap);<NEW_LINE>mPassword = (EditText) findViewById(R.id.password);<NEW_LINE>mUserCertificate = (ViewGroup) findViewById(R.id.user_certificate_group);<NEW_LINE>mSelectUserCert = (RelativeLayout) findViewById(R.id.select_user_certificate);<NEW_LINE>mImportUserCert = (Button) findViewById(R.id.import_user_certificate);<NEW_LINE>mRemoteCertificate = (ViewGroup) findViewById(R.id.remote_certificate_group);<NEW_LINE>mRemoteCert = (RelativeLayout) findViewById(R.id.remote_certificate);<NEW_LINE>mExistsWarning.setVisibility(View.GONE);<NEW_LINE>mBasicDataGroup.setVisibility(View.GONE);<NEW_LINE>mUsernamePassword.setVisibility(View.GONE);<NEW_LINE>mUserCertificate.setVisibility(View.GONE);<NEW_LINE>mRemoteCertificate.setVisibility(View.GONE);<NEW_LINE>mSelectUserCert.setOnClickListener(new SelectUserCertOnClickListener());<NEW_LINE>mImportUserCert.setOnClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>Intent intent = KeyChain.createInstallIntent();<NEW_LINE>intent.putExtra(KeyChain.EXTRA_NAME, getString(R.string.profile_cert_alias, mProfile.getName()));<NEW_LINE>intent.putExtra(KeyChain.EXTRA_PKCS12, mProfile.PKCS12);<NEW_LINE>mImportPKCS12.launch(intent);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>Intent intent = getIntent();<NEW_LINE>String action = intent.getAction();<NEW_LINE>if (Intent.ACTION_VIEW.equals(action)) {<NEW_LINE>loadProfile(getIntent().getData());<NEW_LINE>} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {<NEW_LINE>Intent openIntent = new Intent(Intent.ACTION_OPEN_DOCUMENT);<NEW_LINE>openIntent.setType("*/*");<NEW_LINE>try {<NEW_LINE>mOpenDocument.launch(openIntent);<NEW_LINE>} catch (ActivityNotFoundException e) {
findViewById(R.id.vpn_type);
1,430,988
public void deletePet(Long petId, String apiKey) throws TimeoutException, ExecutionException, InterruptedException, ApiException {<NEW_LINE>Object postBody = null;<NEW_LINE>// verify the required parameter 'petId' is set<NEW_LINE>if (petId == null) {<NEW_LINE>VolleyError error = new VolleyError("Missing the required parameter 'petId' when calling deletePet", new ApiException(400, "Missing the required parameter 'petId' when calling deletePet"));<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String path = "/pet/{petId}".replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));<NEW_LINE>// query params<NEW_LINE>List<Pair> queryParams <MASK><NEW_LINE>// header params<NEW_LINE>Map<String, String> headerParams = new HashMap<String, String>();<NEW_LINE>// form params<NEW_LINE>Map<String, String> formParams = new HashMap<String, String>();<NEW_LINE>headerParams.put("api_key", ApiInvoker.parameterToString(apiKey));<NEW_LINE>String[] contentTypes = {};<NEW_LINE>String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";<NEW_LINE>if (contentType.startsWith("multipart/form-data")) {<NEW_LINE>// file uploading<NEW_LINE>MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create();<NEW_LINE>HttpEntity httpEntity = localVarBuilder.build();<NEW_LINE>postBody = httpEntity;<NEW_LINE>} else {<NEW_LINE>// normal form params<NEW_LINE>}<NEW_LINE>String[] authNames = new String[] { "petstore_auth" };<NEW_LINE>try {<NEW_LINE>String localVarResponse = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType, authNames);<NEW_LINE>if (localVarResponse != null) {<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} catch (ApiException ex) {<NEW_LINE>throw ex;<NEW_LINE>} catch (InterruptedException ex) {<NEW_LINE>throw ex;<NEW_LINE>} catch (ExecutionException ex) {<NEW_LINE>if (ex.getCause() instanceof VolleyError) {<NEW_LINE>VolleyError volleyError = (VolleyError) ex.getCause();<NEW_LINE>if (volleyError.networkResponse != null) {<NEW_LINE>throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw ex;<NEW_LINE>} catch (TimeoutException ex) {<NEW_LINE>throw ex;<NEW_LINE>}<NEW_LINE>}
= new ArrayList<Pair>();
1,738,264
protected static Iterator<String> findResourcePaths(String path, String pattern) {<NEW_LINE>Iterator<String> bufferedResult = <MASK><NEW_LINE>if (bufferedResult != null) {<NEW_LINE>return bufferedResult;<NEW_LINE>}<NEW_LINE>ArrayList<String> propertiesList = new ArrayList<String>();<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Enumeration<URL> propertiesUrls = bundleContext.getBundle().findEntries(path, pattern, false);<NEW_LINE>if (propertiesUrls != null) {<NEW_LINE>while (propertiesUrls.hasMoreElements()) {<NEW_LINE>URL propertyUrl = propertiesUrls.nextElement();<NEW_LINE>// Remove the first slash.<NEW_LINE>String propertyFilePath = propertyUrl.getPath().substring(1);<NEW_LINE>// Replace all slashes with dots.<NEW_LINE>propertyFilePath = propertyFilePath.replaceAll("/", ".");<NEW_LINE>propertiesList.add(propertyFilePath);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Iterator<String> result = propertiesList.iterator();<NEW_LINE>ressourcesFiles.put(path + pattern, result);<NEW_LINE>return result;<NEW_LINE>}
ressourcesFiles.get(path + pattern);
988,245
public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = new String[] { "symbol", "price", "sumVol" };<NEW_LINE>String stmtText = "@name('s0') select symbol, price, sum(volume) as sumVol " + "from SupportMarketDataBean#length(5) " + "group by symbol " + "order by symbol";<NEW_LINE>env.compileDeploy(stmtText).addListener("s0");<NEW_LINE>env.assertIterator("s0", it -> assertFalse(it.hasNext()));<NEW_LINE>sendEvent(env, "SYM", -1, 100);<NEW_LINE>env.assertPropsPerRowIterator("s0", fields, new Object[][] { { "SYM", -1d, 100L } });<NEW_LINE>env.milestone(0);<NEW_LINE>sendEvent(env<MASK><NEW_LINE>env.assertPropsPerRowIterator("s0", fields, new Object[][] { { "SYM", -1d, 100L }, { "TAC", -2d, 12L } });<NEW_LINE>sendEvent(env, "TAC", -3, 13);<NEW_LINE>env.assertPropsPerRowIterator("s0", fields, new Object[][] { { "SYM", -1d, 100L }, { "TAC", -2d, 25L }, { "TAC", -3d, 25L } });<NEW_LINE>env.milestone(1);<NEW_LINE>sendEvent(env, "SYM", -4, 1);<NEW_LINE>env.assertPropsPerRowIterator("s0", fields, new Object[][] { { "SYM", -1d, 101L }, { "SYM", -4d, 101L }, { "TAC", -2d, 25L }, { "TAC", -3d, 25L } });<NEW_LINE>env.milestone(2);<NEW_LINE>sendEvent(env, "OCC", -5, 99);<NEW_LINE>env.assertPropsPerRowIterator("s0", fields, new Object[][] { { "OCC", -5d, 99L }, { "SYM", -1d, 101L }, { "SYM", -4d, 101L }, { "TAC", -2d, 25L }, { "TAC", -3d, 25L } });<NEW_LINE>sendEvent(env, "TAC", -6, 2);<NEW_LINE>env.assertPropsPerRowIterator("s0", fields, new Object[][] { { "OCC", -5d, 99L }, { "SYM", -4d, 1L }, { "TAC", -2d, 27L }, { "TAC", -3d, 27L }, { "TAC", -6d, 27L } });<NEW_LINE>env.undeployAll();<NEW_LINE>}
, "TAC", -2, 12);
71,041
private ConvolutionLayer addDenseLayer(String name, String... previousLayers) {<NEW_LINE>BatchNormalization bnLayer1 = new BatchNormalization.Builder().name(String.format("%s_%s", name, "bn1")).build();<NEW_LINE>ConvolutionLayer layer1x1 = new ConvolutionLayer.Builder().name(String.format("%s_%s", name, "con1x1")).kernelSize(1, 1).stride(1, 1).padding(0, 0).nOut(<MASK><NEW_LINE>BatchNormalization bnLayer2 = new BatchNormalization.Builder().name(String.format("%s_%s", name, "bn2")).build();<NEW_LINE>ConvolutionLayer layer3x3 = new ConvolutionLayer.Builder().name(String.format("%s_%s", name, "con3x3")).kernelSize(3, 3).stride(1, 1).padding(1, 1).nOut(growthRate).build();<NEW_LINE>if (useBottleNeck) {<NEW_LINE>conf.addLayer(bnLayer1.getLayerName(), bnLayer1, previousLayers);<NEW_LINE>conf.addLayer(layer1x1.getLayerName(), layer1x1, bnLayer1.getLayerName());<NEW_LINE>conf.addLayer(bnLayer2.getLayerName(), bnLayer2, layer1x1.getLayerName());<NEW_LINE>} else {<NEW_LINE>conf.addLayer(bnLayer2.getLayerName(), bnLayer2, previousLayers);<NEW_LINE>}<NEW_LINE>conf.addLayer(layer3x3.getLayerName(), layer3x3, bnLayer2.getLayerName());<NEW_LINE>return layer3x3;<NEW_LINE>}
growthRate * 4).build();
1,640,557
public MappeableContainer xor(MappeableBitmapContainer value2) {<NEW_LINE>int newCardinality = 0;<NEW_LINE>if (BufferUtil.isBackedBySimpleArray(this.bitmap) && BufferUtil.isBackedBySimpleArray(value2.bitmap)) {<NEW_LINE>long[] b = this.bitmap.array();<NEW_LINE>long[] v2 = value2.bitmap.array();<NEW_LINE>int len = this.bitmap.limit();<NEW_LINE>for (int k = 0; k < len; ++k) {<NEW_LINE>newCardinality += Long.bitCount(b[k] ^ v2[k]);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>int len = this.bitmap.limit();<NEW_LINE>for (int k = 0; k < len; ++k) {<NEW_LINE>newCardinality += Long.bitCount(this.bitmap.get(k) ^ value2.bitmap.get(k));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (newCardinality > MappeableArrayContainer.DEFAULT_MAX_SIZE) {<NEW_LINE>final MappeableBitmapContainer answer = new MappeableBitmapContainer();<NEW_LINE>long[] bitArray = answer.bitmap.array();<NEW_LINE>if (BufferUtil.isBackedBySimpleArray(this.bitmap) && BufferUtil.isBackedBySimpleArray(value2.bitmap)) {<NEW_LINE>long[] b = this.bitmap.array();<NEW_LINE>long[] v2 <MASK><NEW_LINE>int len = answer.bitmap.limit();<NEW_LINE>for (int k = 0; k < len; ++k) {<NEW_LINE>bitArray[k] = b[k] ^ v2[k];<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>int len = answer.bitmap.limit();<NEW_LINE>for (int k = 0; k < len; ++k) {<NEW_LINE>bitArray[k] = this.bitmap.get(k) ^ value2.bitmap.get(k);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>answer.cardinality = newCardinality;<NEW_LINE>return answer;<NEW_LINE>}<NEW_LINE>final MappeableArrayContainer ac = new MappeableArrayContainer(newCardinality);<NEW_LINE>BufferUtil.fillArrayXOR(ac.content.array(), this.bitmap, value2.bitmap);<NEW_LINE>ac.cardinality = newCardinality;<NEW_LINE>return ac;<NEW_LINE>}
= value2.bitmap.array();
1,021,187
public ListNode reverseBetween(ListNode head, int a, int b) {<NEW_LINE>int size = getSize(head);<NEW_LINE>if (a == 1 && b != size) {<NEW_LINE>ListNode s = head;<NEW_LINE>ListNode e = head;<NEW_LINE>for (int i = 1; i < b; i++) e = e.next;<NEW_LINE>ListNode afb = e.next;<NEW_LINE>e.next = null;<NEW_LINE>head = reverseList(s);<NEW_LINE>s.next = afb;<NEW_LINE>return head;<NEW_LINE>} else if (b == size && a != 1) {<NEW_LINE>ListNode bFa = head;<NEW_LINE>for (int i = 1; i < a - 1; i++) bFa = bFa.next;<NEW_LINE>ListNode s = bFa.next;<NEW_LINE>bFa.next = reverseList(s);<NEW_LINE>return head;<NEW_LINE>} else if (a > 1 && b < size) {<NEW_LINE>ListNode bFa = head;<NEW_LINE>for (int i = 1; i < a - 1; <MASK><NEW_LINE>ListNode s = bFa.next;<NEW_LINE>ListNode e = head;<NEW_LINE>for (int i = 1; i < b; i++) e = e.next;<NEW_LINE>ListNode afb = e.next;<NEW_LINE>e.next = null;<NEW_LINE>bFa.next = reverseList(s);<NEW_LINE>s.next = afb;<NEW_LINE>return head;<NEW_LINE>} else {<NEW_LINE>return reverseList(head);<NEW_LINE>}<NEW_LINE>}
i++) bFa = bFa.next;
1,170,697
public Flux<NumericResponse<ZInterStoreCommand, Long>> zInterStore(Publisher<ZInterStoreCommand> commands) {<NEW_LINE>return execute(commands, command -> {<NEW_LINE>Assert.notNull(command.getKey(), "Destination key must not be null!");<NEW_LINE>Assert.notEmpty(command.getSourceKeys(), "Source keys must not be null or empty!");<NEW_LINE>byte[] keyBuf = toByteArray(command.getKey());<NEW_LINE>List<Object> args = new ArrayList<Object>(command.getSourceKeys().size() * 2 + 5);<NEW_LINE>args.add(keyBuf);<NEW_LINE>args.add(command.getSourceKeys().size());<NEW_LINE>args.addAll(command.getSourceKeys().stream().map(e -> toByteArray(e)).collect(Collectors.toList()));<NEW_LINE>if (!command.getWeights().isEmpty()) {<NEW_LINE>args.add("WEIGHTS");<NEW_LINE>for (Double weight : command.getWeights()) {<NEW_LINE>args.add(BigDecimal.valueOf<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (command.getAggregateFunction().isPresent()) {<NEW_LINE>args.add("AGGREGATE");<NEW_LINE>args.add(command.getAggregateFunction().get().name());<NEW_LINE>}<NEW_LINE>Mono<Long> m = write(keyBuf, LongCodec.INSTANCE, ZINTERSTORE, args.toArray());<NEW_LINE>return m.map(v -> new NumericResponse<>(command, v));<NEW_LINE>});<NEW_LINE>}
(weight).toPlainString());
445,302
public static QueryRecordPlansResponse unmarshall(QueryRecordPlansResponse queryRecordPlansResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryRecordPlansResponse.setRequestId(_ctx.stringValue("QueryRecordPlansResponse.RequestId"));<NEW_LINE>queryRecordPlansResponse.setSuccess<MASK><NEW_LINE>queryRecordPlansResponse.setErrorMessage(_ctx.stringValue("QueryRecordPlansResponse.ErrorMessage"));<NEW_LINE>queryRecordPlansResponse.setCode(_ctx.stringValue("QueryRecordPlansResponse.Code"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setTotal(_ctx.integerValue("QueryRecordPlansResponse.Data.Total"));<NEW_LINE>data.setPageSize(_ctx.integerValue("QueryRecordPlansResponse.Data.PageSize"));<NEW_LINE>data.setPage(_ctx.integerValue("QueryRecordPlansResponse.Data.Page"));<NEW_LINE>data.setPageCount(_ctx.integerValue("QueryRecordPlansResponse.Data.PageCount"));<NEW_LINE>List<ListItem> list = new ArrayList<ListItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("QueryRecordPlansResponse.Data.List.Length"); i++) {<NEW_LINE>ListItem listItem = new ListItem();<NEW_LINE>listItem.setPlanId(_ctx.stringValue("QueryRecordPlansResponse.Data.List[" + i + "].PlanId"));<NEW_LINE>listItem.setName(_ctx.stringValue("QueryRecordPlansResponse.Data.List[" + i + "].Name"));<NEW_LINE>listItem.setTemplateId(_ctx.stringValue("QueryRecordPlansResponse.Data.List[" + i + "].TemplateId"));<NEW_LINE>list.add(listItem);<NEW_LINE>}<NEW_LINE>data.setList(list);<NEW_LINE>queryRecordPlansResponse.setData(data);<NEW_LINE>return queryRecordPlansResponse;<NEW_LINE>}
(_ctx.booleanValue("QueryRecordPlansResponse.Success"));
523,354
public static List<SerializeDataType> convertToSerilizeType(List<RelDataTypeField> relDataTypeList) {<NEW_LINE>List<SerializeDataType> dataTypes = new ArrayList<>(relDataTypeList.size());<NEW_LINE>for (RelDataTypeField relDataTypeField : relDataTypeList) {<NEW_LINE><MASK><NEW_LINE>SqlTypeName sqlTypeName = relDataType.getSqlTypeName();<NEW_LINE>List<String> stringValues = null;<NEW_LINE>int precision = -1;<NEW_LINE>int scale = -1;<NEW_LINE>if (sqlTypeName.allowsPrec()) {<NEW_LINE>precision = relDataType.getPrecision();<NEW_LINE>}<NEW_LINE>if (sqlTypeName.allowsScale()) {<NEW_LINE>scale = relDataType.getScale();<NEW_LINE>}<NEW_LINE>if (relDataType instanceof EnumSqlType) {<NEW_LINE>stringValues = ((EnumSqlType) relDataType).getStringValues();<NEW_LINE>}<NEW_LINE>boolean sensitive = relDataType.getCollation() == null ? false : relDataType.getCollation().isSensitive();<NEW_LINE>// serialize charset & collation info<NEW_LINE>String charsetName = Optional.ofNullable(relDataType.getCharset()).map(CharsetName::of).map(Enum::name).orElseGet(() -> CharsetName.defaultCharset().name());<NEW_LINE>String collation = Optional.ofNullable(relDataType.getCollation()).map(SqlCollation::getCollationName).map(CollationName::of).map(Enum::name).orElseGet(() -> CollationName.defaultCollation().name());<NEW_LINE>dataTypes.add(new SerializeDataType(sqlTypeName.toString(), sensitive, precision, scale, stringValues, charsetName, collation));<NEW_LINE>}<NEW_LINE>return dataTypes;<NEW_LINE>}
RelDataType relDataType = relDataTypeField.getType();
60,754
private void create() {<NEW_LINE>mainPanel = new JPanel();<NEW_LINE>cardLayout = new CardLayout();<NEW_LINE>conflictPanel = new JPanel(cardLayout);<NEW_LINE>mainPanel.setLayout(new BorderLayout(0, 10));<NEW_LINE>mainPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));<NEW_LINE>nameLabel = new GDLabel("Merge Programs", SwingConstants.LEFT);<NEW_LINE>JPanel iconPanel = new JPanel();<NEW_LINE>new BoxLayout(iconPanel, BoxLayout.X_AXIS);<NEW_LINE>iconPanel.add(Box.createHorizontalStrut(5));<NEW_LINE>iconPanel.<MASK><NEW_LINE>iconPanel.add(Box.createHorizontalStrut(5));<NEW_LINE>iconPanel.add(nameLabel);<NEW_LINE>JPanel imagePanel = new JPanel(new BorderLayout());<NEW_LINE>imagePanel.add(iconPanel, BorderLayout.WEST);<NEW_LINE>mainPanel.add(imagePanel, BorderLayout.NORTH);<NEW_LINE>mainPanel.add(conflictPanel, BorderLayout.CENTER);<NEW_LINE>mainPanel.add(createButtonPanel(), BorderLayout.SOUTH);<NEW_LINE>createDefaultPanel();<NEW_LINE>cardLayout.show(conflictPanel, DEFAULT_ID);<NEW_LINE>Dimension d = conflictPanel.getPreferredSize();<NEW_LINE>mainPanel.setPreferredSize(new Dimension(d.width, d.height + 20));<NEW_LINE>}
add(new GIconLabel(MERGE_ICON));
1,534,762
private static // for fullscreen JavaFX systems with no window decorations<NEW_LINE>void addCloseButton(final Stage stage) {<NEW_LINE>Scene scene = stage.getScene();<NEW_LINE>Parent rootNode = scene.getRoot();<NEW_LINE>Button btnClose = new Button("X");<NEW_LINE>btnClose.setOnAction(new EventHandler<ActionEvent>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void handle(ActionEvent e) {<NEW_LINE>closeStage(stage);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>HBox hbox = new HBox();<NEW_LINE>hbox.setSpacing(16);<NEW_LINE>hbox.getChildren().addAll(btnClose, new Label(stage.getTitle()));<NEW_LINE>if (rootNode instanceof BorderPane) {<NEW_LINE>BorderPane pane = (BorderPane) rootNode;<NEW_LINE><MASK><NEW_LINE>if (topNode instanceof VBox) {<NEW_LINE>VBox vbox = (VBox) topNode;<NEW_LINE>vbox.getChildren().add(0, hbox);<NEW_LINE>} else {<NEW_LINE>VBox newTopNode = new VBox();<NEW_LINE>newTopNode.setPadding(new Insets(0));<NEW_LINE>newTopNode.getChildren().addAll(hbox, topNode);<NEW_LINE>pane.setTop(newTopNode);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>VBox newTopNode = new VBox();<NEW_LINE>newTopNode.setPadding(new Insets(0));<NEW_LINE>newTopNode.getChildren().addAll(hbox, rootNode);<NEW_LINE>scene.setRoot(newTopNode);<NEW_LINE>}<NEW_LINE>}
Node topNode = pane.getTop();
1,797,066
final PutEncryptionConfigResult executePutEncryptionConfig(PutEncryptionConfigRequest putEncryptionConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putEncryptionConfigRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PutEncryptionConfigRequest> request = null;<NEW_LINE>Response<PutEncryptionConfigResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new PutEncryptionConfigRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putEncryptionConfigRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "XRay");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutEncryptionConfig");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<PutEncryptionConfigResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new PutEncryptionConfigResultJsonUnmarshaller());
1,764,767
public void run() {<NEW_LINE>try {<NEW_LINE>final ProgressHandle handle = ProgressHandleFactory.createHandle(isInstall ? getBundle("CustomHandleStep_Install_InstallingPlugins") : getBundle("CustomHandleStep_Uninstall_UninstallingPlugins"));<NEW_LINE>JComponent progressComponent = ProgressHandleFactory.createProgressComponent(handle);<NEW_LINE>JLabel <MASK><NEW_LINE>JLabel detailLabel = ProgressHandleFactory.createDetailLabelComponent(handle);<NEW_LINE>handle.setInitialDelay(0);<NEW_LINE>panel.waitAndSetProgressComponents(mainLabel, progressComponent, detailLabel);<NEW_LINE>restarter = support.doOperation(handle);<NEW_LINE>passed = true;<NEW_LINE>panel.waitAndSetProgressComponents(mainLabel, progressComponent, new JLabel(getBundle("CustomHandleStep_Done")));<NEW_LINE>} catch (OperationException ex) {<NEW_LINE>log.log(Level.INFO, ex.getMessage(), ex);<NEW_LINE>passed = false;<NEW_LINE>errorMessage = ex.getLocalizedMessage();<NEW_LINE>}<NEW_LINE>}
mainLabel = ProgressHandleFactory.createMainLabelComponent(handle);
1,715,632
private void test_1cfa_call_graph(LocalVarNode vn, SootMethod caller, SootMethod callee_signature, Histogram ce_range) {<NEW_LINE>long l, r;<NEW_LINE>IVarAbstraction pn = ptsProvider.findInternalNode(vn);<NEW_LINE>if (pn == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>pn = pn.getRepresentative();<NEW_LINE>Set<SootMethod> tgts = new HashSet<SootMethod>();<NEW_LINE>Set<AllocNode> set = pn.get_all_points_to_objects();<NEW_LINE>LinkedList<CgEdge> list = ptsProvider.getCallEdgesInto(ptsProvider.getIDFromSootMethod(caller));<NEW_LINE>FastHierarchy hierarchy = Scene.v().getOrMakeFastHierarchy();<NEW_LINE>for (Iterator<CgEdge> it = list.iterator(); it.hasNext(); ) {<NEW_LINE><MASK><NEW_LINE>l = p.map_offset;<NEW_LINE>r = l + ptsProvider.max_context_size_block[p.s];<NEW_LINE>tgts.clear();<NEW_LINE>for (AllocNode obj : set) {<NEW_LINE>if (!pn.pointer_interval_points_to(l, r, obj)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Type t = obj.getType();<NEW_LINE>if (t == null) {<NEW_LINE>continue;<NEW_LINE>} else if (t instanceof AnySubType) {<NEW_LINE>t = ((AnySubType) t).getBase();<NEW_LINE>} else if (t instanceof ArrayType) {<NEW_LINE>t = RefType.v("java.lang.Object");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>tgts.add(hierarchy.resolveConcreteDispatch(((RefType) t).getSootClass(), callee_signature));<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.debug(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>tgts.remove(null);<NEW_LINE>ce_range.addNumber(tgts.size());<NEW_LINE>}<NEW_LINE>}
CgEdge p = it.next();
1,733,524
private void actOnQuitEvent(ClientConnectionEvent.Disconnect event) {<NEW_LINE>long time = System.currentTimeMillis();<NEW_LINE>Player player = event.getTargetEntity();<NEW_LINE>String playerName = player.getName();<NEW_LINE>UUID playerUUID = player.getUniqueId();<NEW_LINE><MASK><NEW_LINE>SpongeAFKListener.afkTracker.loggedOut(playerUUID, time);<NEW_LINE>nicknameCache.removeDisplayName(playerUUID);<NEW_LINE>dbSystem.getDatabase().executeTransaction(new BanStatusTransaction(playerUUID, serverUUID, () -> isBanned(player.getProfile())));<NEW_LINE>sessionCache.endSession(playerUUID, time).ifPresent(endedSession -> dbSystem.getDatabase().executeTransaction(new SessionEndTransaction(endedSession)));<NEW_LINE>if (config.isTrue(ExportSettings.EXPORT_ON_ONLINE_STATUS_CHANGE)) {<NEW_LINE>processing.submitNonCritical(() -> exporter.exportPlayerPage(playerUUID, playerName));<NEW_LINE>}<NEW_LINE>}
ServerUUID serverUUID = serverInfo.getServerUUID();
1,820,289
public static HANDLE dialEntry(String entryName, RasDialFunc2 func2) throws Ras32Exception {<NEW_LINE>// get the RAS Credentials<NEW_LINE>RASCREDENTIALS.ByReference credentials = new RASCREDENTIALS.ByReference();<NEW_LINE>synchronized (phoneBookMutex) {<NEW_LINE>credentials.dwMask = WinRas.RASCM_UserName | WinRas.RASCM_Password | WinRas.RASCM_Domain;<NEW_LINE>int err = Rasapi32.INSTANCE.RasGetCredentials(null, entryName, credentials);<NEW_LINE>if (err != WinError.ERROR_SUCCESS)<NEW_LINE>throw new Ras32Exception(err);<NEW_LINE>}<NEW_LINE>// set the dialing parameters<NEW_LINE>RASDIALPARAMS.ByReference rasDialParams = new RASDIALPARAMS.ByReference();<NEW_LINE>System.arraycopy(entryName.toCharArray(), 0, rasDialParams.szEntryName, 0, entryName.length());<NEW_LINE>System.arraycopy(credentials.szUserName, 0, rasDialParams.szUserName, 0, credentials.szUserName.length);<NEW_LINE>System.arraycopy(credentials.szPassword, 0, rasDialParams.szPassword, 0, credentials.szPassword.length);<NEW_LINE>System.arraycopy(credentials.szDomain, 0, rasDialParams.szDomain, 0, credentials.szDomain.length);<NEW_LINE>// dial<NEW_LINE>HANDLEByReference hrasConn = new HANDLEByReference();<NEW_LINE>int err = Rasapi32.INSTANCE.RasDial(null, null, rasDialParams, 2, func2, hrasConn);<NEW_LINE>if (err != WinError.ERROR_SUCCESS) {<NEW_LINE>if (hrasConn.getValue() != null)<NEW_LINE>Rasapi32.INSTANCE.<MASK><NEW_LINE>throw new Ras32Exception(err);<NEW_LINE>}<NEW_LINE>return hrasConn.getValue();<NEW_LINE>}
RasHangUp(hrasConn.getValue());
510,915
public static Set<ElementHandle<TypeElement>> findImplementors(final ClasspathInfo cpInfo, final ElementHandle<TypeElement> baseType) {<NEW_LINE>final Set<ClassIndex.SearchKind> kind = EnumSet.of(ClassIndex.SearchKind.IMPLEMENTORS);<NEW_LINE>final Set<ClassIndex.SearchScope> scope = EnumSet.<MASK><NEW_LINE>final Set<ElementHandle<TypeElement>> allImplementors = new HashSet<ElementHandle<TypeElement>>();<NEW_LINE>ParsingUtils.invokeScanSensitiveTask(cpInfo, new ScanSensitiveTask<CompilationController>(true) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run(CompilationController cc) {<NEW_LINE>Set<ElementHandle<TypeElement>> implementors = cpInfo.getClassIndex().getElements(baseType, kind, scope);<NEW_LINE>do {<NEW_LINE>Set<ElementHandle<TypeElement>> tmpImplementors = new HashSet<ElementHandle<TypeElement>>();<NEW_LINE>allImplementors.addAll(implementors);<NEW_LINE>for (ElementHandle<TypeElement> element : implementors) {<NEW_LINE>tmpImplementors.addAll(cpInfo.getClassIndex().getElements(element, kind, scope));<NEW_LINE>}<NEW_LINE>implementors = tmpImplementors;<NEW_LINE>} while (!implementors.isEmpty());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return allImplementors;<NEW_LINE>}
allOf(ClassIndex.SearchScope.class);
1,750,041
public List<ByteRecord> xReadGroup(Consumer consumer, StreamReadOptions readOptions, StreamOffset<byte[]>... streams) {<NEW_LINE>Assert.notNull(readOptions, "Consumer must not be null!");<NEW_LINE><MASK><NEW_LINE>Assert.notNull(streams, "StreamOffsets must not be null!");<NEW_LINE>List<Object> params = new ArrayList<>();<NEW_LINE>params.add("GROUP");<NEW_LINE>params.add(consumer.getGroup());<NEW_LINE>params.add(consumer.getName());<NEW_LINE>if (readOptions.getCount() != null && readOptions.getCount() > 0) {<NEW_LINE>params.add("COUNT");<NEW_LINE>params.add(readOptions.getCount());<NEW_LINE>}<NEW_LINE>if (readOptions.getBlock() != null && readOptions.getBlock() > 0) {<NEW_LINE>params.add("BLOCK");<NEW_LINE>params.add(readOptions.getBlock());<NEW_LINE>}<NEW_LINE>if (readOptions.isNoack()) {<NEW_LINE>params.add("NOACK");<NEW_LINE>}<NEW_LINE>params.add("STREAMS");<NEW_LINE>for (StreamOffset<byte[]> streamOffset : streams) {<NEW_LINE>params.add(streamOffset.getKey());<NEW_LINE>}<NEW_LINE>for (StreamOffset<byte[]> streamOffset : streams) {<NEW_LINE>params.add(streamOffset.getOffset().getOffset());<NEW_LINE>}<NEW_LINE>if (readOptions.getBlock() != null && readOptions.getBlock() > 0) {<NEW_LINE>return connection.write(streams[0].getKey(), ByteArrayCodec.INSTANCE, XREADGROUP_BLOCKING, params.toArray());<NEW_LINE>}<NEW_LINE>return connection.write(streams[0].getKey(), ByteArrayCodec.INSTANCE, XREADGROUP, params.toArray());<NEW_LINE>}
Assert.notNull(readOptions, "ReadOptions must not be null!");
557,867
public static void addToItemTooltip(ItemTooltipEvent event) {<NEW_LINE>if (!AllConfigs.CLIENT.tooltips.get())<NEW_LINE>return;<NEW_LINE>if (event.getPlayer() == null)<NEW_LINE>return;<NEW_LINE>ItemStack stack = event.getItemStack();<NEW_LINE>String translationKey = stack.getItem().getDescriptionId(stack);<NEW_LINE>if (translationKey.startsWith(ITEM_PREFIX) || translationKey.startsWith(BLOCK_PREFIX))<NEW_LINE>if (TooltipHelper.hasTooltip(stack, event.getPlayer())) {<NEW_LINE>List<Component> itemTooltip = event.getToolTip();<NEW_LINE>List<Component> toolTip = new ArrayList<>();<NEW_LINE>toolTip.add(itemTooltip.remove(0));<NEW_LINE>TooltipHelper.getTooltip(stack).addInformation(toolTip);<NEW_LINE>itemTooltip.addAll(0, toolTip);<NEW_LINE>}<NEW_LINE>if (stack.getItem() instanceof BlockItem) {<NEW_LINE>BlockItem item = (BlockItem) stack.getItem();<NEW_LINE>if (item.getBlock() instanceof IRotate || item.getBlock() instanceof EngineBlock) {<NEW_LINE>List<Component> kineticStats = ItemDescription.getKineticStats(item.getBlock());<NEW_LINE>if (!kineticStats.isEmpty()) {<NEW_LINE>event.getToolTip().add(new TextComponent(""));<NEW_LINE>event.getToolTip().addAll(kineticStats);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>PonderTooltipHandler.addToTooltip(<MASK><NEW_LINE>SequencedAssemblyRecipe.addToTooltip(event.getToolTip(), stack);<NEW_LINE>}
event.getToolTip(), stack);
1,724,228
public void read(org.apache.thrift.protocol.TProtocol prot, GcCycleStats struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet <MASK><NEW_LINE>if (incoming.get(0)) {<NEW_LINE>struct.started = iprot.readI64();<NEW_LINE>struct.setStartedIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(1)) {<NEW_LINE>struct.finished = iprot.readI64();<NEW_LINE>struct.setFinishedIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(2)) {<NEW_LINE>struct.candidates = iprot.readI64();<NEW_LINE>struct.setCandidatesIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(3)) {<NEW_LINE>struct.inUse = iprot.readI64();<NEW_LINE>struct.setInUseIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(4)) {<NEW_LINE>struct.deleted = iprot.readI64();<NEW_LINE>struct.setDeletedIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(5)) {<NEW_LINE>struct.errors = iprot.readI64();<NEW_LINE>struct.setErrorsIsSet(true);<NEW_LINE>}<NEW_LINE>}
incoming = iprot.readBitSet(6);
364,658
private static void addDiscountLine(MOrder order, MOrderLine ol, BigDecimal discount, BigDecimal qty, int C_Charge_ID, I_M_Promotion promotion) throws Exception {<NEW_LINE>MOrderLine nol;<NEW_LINE>if (discount.scale() > 2)<NEW_LINE>discount = discount.setScale(2, BigDecimal.ROUND_HALF_UP);<NEW_LINE>String description = promotion.getName();<NEW_LINE>if (ol != null)<NEW_LINE>description += (", " + ol.getName());<NEW_LINE>// Look for same order line. If found, just update qty<NEW_LINE>nol = new Query(Env.getCtx(), MTable.get(order.getCtx(), MOrderLine.Table_ID), "C_OrderLine.C_Order_ID=? AND C_Charge_ID=? AND M_Promotion_ID=? AND priceactual=? AND Description='" + description + "'" + " AND C_OrderLine.IsActive='Y'", order.get_TrxName()).setParameters(ol.getC_Order_ID(), C_Charge_ID, promotion.getM_Promotion_ID(), discount.negate()).firstOnly();<NEW_LINE>if (nol != null) {<NEW_LINE>// just add one to he Order line<NEW_LINE>nol.setQty(nol.getQtyEntered().add(qty));<NEW_LINE>nol.saveEx();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// SHW: new order line<NEW_LINE>nol = new MOrderLine(order.getCtx(), 0, order.get_TrxName());<NEW_LINE>nol.setC_Order_ID(order.getC_Order_ID());<NEW_LINE>nol.setOrder(order);<NEW_LINE>nol.setC_Charge_ID(C_Charge_ID);<NEW_LINE>nol.setQty(qty);<NEW_LINE>nol.setPriceActual(discount.negate());<NEW_LINE>// SHW<NEW_LINE>nol.setC_UOM_ID(ol.getC_UOM_ID());<NEW_LINE>if (ol != null && Integer.toString(ol.getLine()).endsWith("0")) {<NEW_LINE>for (int i = 0; i < 9; i++) {<NEW_LINE>int line = ol<MASK><NEW_LINE>int r = DB.getSQLValue(order.get_TrxName(), "SELECT C_OrderLine_ID FROM C_OrderLine WHERE C_Order_ID = ? AND Line = ?", order.getC_Order_ID(), line);<NEW_LINE>if (r <= 0) {<NEW_LINE>nol.setLine(line);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>nol.setDescription(description);<NEW_LINE>nol.set_ValueOfColumn("M_Promotion_ID", promotion.getM_Promotion_ID());<NEW_LINE>if (promotion.getC_Campaign_ID() > 0) {<NEW_LINE>nol.setC_Campaign_ID(promotion.getC_Campaign_ID());<NEW_LINE>}<NEW_LINE>if (!nol.save())<NEW_LINE>throw new AdempiereException("Failed to add discount line to order");<NEW_LINE>}
.getLine() + i + 1;
1,372,340
public void init() {<NEW_LINE>if (siteConfig == null)<NEW_LINE>siteConfig = SpringContextUtil.getBean(SiteConfig.class);<NEW_LINE>try {<NEW_LINE>Class.forName(siteConfig.getDatasource_driver());<NEW_LINE>URI uri = new URI(siteConfig.getDatasource_url().replace("jdbc:", ""));<NEW_LINE>String host = uri.getHost();<NEW_LINE>int port = uri.getPort();<NEW_LINE>String path = uri.getPath();<NEW_LINE><MASK><NEW_LINE>Connection connection = DriverManager.getConnection("jdbc:mysql://" + host + ":" + port + "?" + query, siteConfig.getDatasource_username(), siteConfig.getDatasource_password());<NEW_LINE>Statement statement = connection.createStatement();<NEW_LINE>statement.executeUpdate("CREATE DATABASE IF NOT EXISTS `" + path.replace("/", "") + "` DEFAULT CHARACTER SET = " + "" + "`utf8` COLLATE `utf8_general_ci`;");<NEW_LINE>statement.close();<NEW_LINE>connection.close();<NEW_LINE>} catch (URISyntaxException | ClassNotFoundException | SQLException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>System.exit(0);<NEW_LINE>}<NEW_LINE>}
String query = uri.getQuery();
1,392,982
public static void createANewServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {<NEW_LINE>manager.servers().define("pgtestsvc4").withRegion("westus").withExistingResourceGroup("testrg").withTags(mapOf("ElasticServer", "1")).withSku(new Sku().withName("Standard_D4s_v3").withTier(SkuTier.GENERAL_PURPOSE)).withAdministratorLogin("cloudsa").withAdministratorLoginPassword("password").withVersion(ServerVersion.ONE_TWO).withStorage(new Storage().withStorageSizeGB(512)).withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeoRedundantBackupEnum.DISABLED)).withNetwork(new Network().withDelegatedSubnetResourceId("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet").withPrivateDnsZoneArmResourceId("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com")).withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)).withAvailabilityZone("1").withCreateMode(<MASK><NEW_LINE>}
CreateMode.CREATE).create();
177,076
private static void buildYCCtoRGBtable() {<NEW_LINE>if (ColorSpaces.DEBUG) {<NEW_LINE>System.err.println("Building JPEG YCbCr conversion table");<NEW_LINE>}<NEW_LINE>for (int i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) {<NEW_LINE>// i is the actual input pixel value, in the range 0..MAXJSAMPLE<NEW_LINE>// The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE<NEW_LINE>// Cr=>R value is nearest int to 1.40200 * x<NEW_LINE>Cr_R_LUT[i] = (int) ((1.40200 * (1 << SCALEBITS) + 0.5) <MASK><NEW_LINE>// Cb=>B value is nearest int to 1.77200 * x<NEW_LINE>Cb_B_LUT[i] = (int) ((1.77200 * (1 << SCALEBITS) + 0.5) * x + ONE_HALF) >> SCALEBITS;<NEW_LINE>// Cr=>G value is scaled-up -0.71414 * x<NEW_LINE>Cr_G_LUT[i] = -(int) (0.71414 * (1 << SCALEBITS) + 0.5) * x;<NEW_LINE>// Cb=>G value is scaled-up -0.34414 * x<NEW_LINE>// We also add in ONE_HALF so that need not do it in inner loop<NEW_LINE>Cb_G_LUT[i] = -(int) ((0.34414) * (1 << SCALEBITS) + 0.5) * x + ONE_HALF;<NEW_LINE>}<NEW_LINE>}
* x + ONE_HALF) >> SCALEBITS;
751,082
private void doFinish() {<NEW_LINE>CvsInstallerModuleConfig.getInstance().setCvsInstalled(true);<NEW_LINE>if (listener != null) {<NEW_LINE>OpenProjects.<MASK><NEW_LINE>listener = null;<NEW_LINE>}<NEW_LINE>assert !EventQueue.isDispatchThread();<NEW_LINE>for (UpdateUnit u : UpdateManager.getDefault().getUpdateUnits()) {<NEW_LINE>if (INSTALLER_CODENAME.equals(u.getCodeName()) && u.getInstalled() != null && !u.isPending()) {<NEW_LINE>OperationContainer<OperationSupport> container = OperationContainer.createForUninstall();<NEW_LINE>if (container.canBeAdded(u, u.getInstalled())) {<NEW_LINE>container.add(u, u.getInstalled());<NEW_LINE>try {<NEW_LINE>// NOI18N<NEW_LINE>LOG.log(Level.INFO, "doFinish: uninstalling");<NEW_LINE>OperationSupport support = container.getSupport();<NEW_LINE>Restarter restarter = support.doOperation(null);<NEW_LINE>// NOI18N<NEW_LINE>LOG.log(Level.INFO, "doFinish: uninstalled");<NEW_LINE>if (restarter != null) {<NEW_LINE>// NOI18N<NEW_LINE>LOG.log(Level.INFO, "doFinish: restart scheduled");<NEW_LINE>support.doRestartLater(restarter);<NEW_LINE>}<NEW_LINE>} catch (OperationException ex) {<NEW_LINE>LOG.log(Level.INFO, null, ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getDefault().removePropertyChangeListener(listener);
1,817,903
public void build(boolean parallel, List<V> collection, DistanceMetric dm) {<NEW_LINE>// really just checking dm == euclidean<NEW_LINE>setDistanceMetric(dm);<NEW_LINE>this.vecs = new ArrayList<>(collection);<NEW_LINE>this.cache = euclid.getAccelerationCache(vecs, parallel);<NEW_LINE>int d = collection.get(0).length();<NEW_LINE>int n = collection.size();<NEW_LINE>// Init u<NEW_LINE>u = new Vec[m][L];<NEW_LINE>for (int j = 0; j < m; j++) for (int l = 0; l < L; l++) {<NEW_LINE>u[j][l] = DenseVector.random(d);<NEW_LINE>u[j][l].mutableDivide(u[j][l].pNorm(2));<NEW_LINE>}<NEW_LINE>// Init T<NEW_LINE>T = new NearestIterator[m][L];<NEW_LINE>// TODO, add more complex logic to balance parallelization over m&l loop as well as inner most loop<NEW_LINE>// Insertions<NEW_LINE>for (int j = 0; j < m; j++) {<NEW_LINE>for (int l = 0; l < L; l++) {<NEW_LINE>Vec u_jl = u[j][l];<NEW_LINE>double[] keys = new double[n];<NEW_LINE>int[] vals = new int[n];<NEW_LINE>ParallelUtils.run(parallel, n, (start, end) -> {<NEW_LINE>for (int i = start; i < end; i++) {<NEW_LINE>double p_bar = vecs.get(i).dot(u_jl);<NEW_LINE>keys[i] = p_bar;<NEW_LINE>vals[i] = i;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>T[j][l] <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
= new NearestIterator(keys, vals);
282,187
private void internalPutIfAbsent(final byte[] key, final byte[] value, final CompletableFuture<byte[]> future, final int retriesLeft, final Errors lastCause) {<NEW_LINE>final Region region = this.pdClient.findRegionByKey(key, ErrorsHelper.isInvalidEpoch(lastCause));<NEW_LINE>final RegionEngine regionEngine = getRegionEngine(region.getId(), true);<NEW_LINE>final RetryRunner retryRunner = retryCause -> internalPutIfAbsent(key, value, future, retriesLeft - 1, retryCause);<NEW_LINE>final FailoverClosure<byte[]> closure = new FailoverClosureImpl<>(future, retriesLeft, retryRunner);<NEW_LINE>if (regionEngine != null) {<NEW_LINE>if (ensureOnValidEpoch(region, regionEngine, closure)) {<NEW_LINE>getRawKVStore(regionEngine).putIfAbsent(key, value, closure);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>final PutIfAbsentRequest request = new PutIfAbsentRequest();<NEW_LINE>request.setKey(key);<NEW_LINE>request.setValue(value);<NEW_LINE>request.<MASK><NEW_LINE>request.setRegionEpoch(region.getRegionEpoch());<NEW_LINE>this.rheaKVRpcService.callAsyncWithRpc(request, closure, lastCause);<NEW_LINE>}<NEW_LINE>}
setRegionId(region.getId());
727,596
public synchronized boolean updateNetKey(final NetworkKey networkKey, final String newNetKey) throws IllegalArgumentException {<NEW_LINE>if (MeshParserUtils.validateKeyInput(newNetKey)) {<NEW_LINE>final byte[] key = MeshParserUtils.toByteArray(newNetKey);<NEW_LINE>if (isNetKeyExists(key)) {<NEW_LINE>throw new IllegalArgumentException("Net key value is already in use.");<NEW_LINE>}<NEW_LINE>final int keyIndex = networkKey.getKeyIndex();<NEW_LINE><MASK><NEW_LINE>if (!isKeyInUse(netKey)) {<NEW_LINE>// We check if the contents of the key are the same<NEW_LINE>// This will return true only if the key index and the key are the same<NEW_LINE>if (netKey.equals(networkKey)) {<NEW_LINE>netKey.setKey(key);<NEW_LINE>return updateMeshKey(netKey);<NEW_LINE>} else {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("Unable to update a network key that's already in use. ");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
final NetworkKey netKey = getNetKey(keyIndex);
315,724
public void run() {<NEW_LINE>try {<NEW_LINE>final Camera camera = cameraManager.open(previewView, displayRotation(), !DISABLE_CONTINUOUS_AUTOFOCUS);<NEW_LINE>final Rect framingRect = cameraManager.getFrame();<NEW_LINE>final RectF framingRectInPreview = new RectF(cameraManager.getFramePreview());<NEW_LINE><MASK><NEW_LINE>final boolean cameraFlip = cameraManager.getFacing() == CameraInfo.CAMERA_FACING_FRONT;<NEW_LINE>final int cameraRotation = cameraManager.getOrientation();<NEW_LINE>runOnUiThread(() -> scannerView.setFraming(framingRect, framingRectInPreview, displayRotation(), cameraRotation, cameraFlip));<NEW_LINE>final String focusMode = camera.getParameters().getFocusMode();<NEW_LINE>final boolean nonContinuousAutoFocus = Camera.Parameters.FOCUS_MODE_AUTO.equals(focusMode) || Camera.Parameters.FOCUS_MODE_MACRO.equals(focusMode);<NEW_LINE>if (nonContinuousAutoFocus)<NEW_LINE>cameraHandler.post(new AutoFocusRunnable(camera));<NEW_LINE>cameraHandler.post(fetchAndDecodeRunnable);<NEW_LINE>} catch (final Exception x) {<NEW_LINE>Log.d(Config.LOGTAG, "problem opening camera", x);<NEW_LINE>}<NEW_LINE>}
framingRectInPreview.offsetTo(0, 0);
1,322,114
public EphemeralStorage unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EphemeralStorage ephemeralStorage = new EphemeralStorage();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("sizeInGiB", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>ephemeralStorage.setSizeInGiB(context.getUnmarshaller(Integer.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return ephemeralStorage;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
164,154
private TransactionReceipt waitForTx(byte[] txHash) throws InterruptedException {<NEW_LINE>ByteArrayWrapper txHashW = new ByteArrayWrapper(txHash);<NEW_LINE><MASK><NEW_LINE>long startBlock = ethereum.getBlockchain().getBestBlock().getNumber();<NEW_LINE>while (true) {<NEW_LINE>TransactionReceipt receipt = txWaiters.get(txHashW);<NEW_LINE>if (receipt != null) {<NEW_LINE>return receipt;<NEW_LINE>} else {<NEW_LINE>long curBlock = ethereum.getBlockchain().getBestBlock().getNumber();<NEW_LINE>if (curBlock > startBlock + 16) {<NEW_LINE>throw new RuntimeException("The transaction was not included during last 16 blocks: " + txHashW.toString().substring(0, 8));<NEW_LINE>} else {<NEW_LINE>logger.info("Waiting for block with transaction 0x" + txHashW.toString().substring(0, 8) + " included (" + (curBlock - startBlock) + " blocks received so far) ...");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>synchronized (this) {<NEW_LINE>wait(20000);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
txWaiters.put(txHashW, null);
1,182,172
public static synchronized void startBackgroundServiceIfNotAlreadyRunning(Context context, String filename, String queryFilter, int logLevel) {<NEW_LINE>boolean alreadyRunning = ServiceHelper.checkIfServiceIsRunning(context, LogcatRecordingService.class);<NEW_LINE>Log.d(TAG, "Is LogcatRecordingService running: " + alreadyRunning);<NEW_LINE>if (!alreadyRunning) {<NEW_LINE>Intent intent = new <MASK><NEW_LINE>intent.putExtra(LogcatRecordingService.EXTRA_FILENAME, filename);<NEW_LINE>// Load "lastLine" in the background<NEW_LINE>LogcatReaderLoader loader = LogcatReaderLoader.create(true);<NEW_LINE>intent.putExtra(LogcatRecordingService.EXTRA_LOADER, loader);<NEW_LINE>// Add query text and log level<NEW_LINE>intent.putExtra(LogcatRecordingService.EXTRA_QUERY_FILTER, queryFilter);<NEW_LINE>intent.putExtra(LogcatRecordingService.EXTRA_LEVEL, logLevel);<NEW_LINE>context.startService(intent);<NEW_LINE>}<NEW_LINE>}
Intent(context, LogcatRecordingService.class);
487,896
private boolean isEmpty(ChunkCache chunkCache) {<NEW_LINE>if (!chunkCache.isEmpty()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (Baritone.settings().renderCachedChunks.value && !Minecraft.getMinecraft().isSingleplayer()) {<NEW_LINE>Baritone baritone = (Baritone) BaritoneAPI<MASK><NEW_LINE>IPlayerContext ctx = baritone.getPlayerContext();<NEW_LINE>if (ctx.player() != null && ctx.world() != null && baritone.bsi != null) {<NEW_LINE>BlockPos position = ((RenderChunk) (Object) this).getPosition();<NEW_LINE>// RenderChunk extends from -1,-1,-1 to +16,+16,+16<NEW_LINE>// then the constructor of ChunkCache extends it one more (presumably to get things like the connected status of fences? idk)<NEW_LINE>// so if ANY of the adjacent chunks are loaded, we are unempty<NEW_LINE>for (int dx = -1; dx <= 1; dx++) {<NEW_LINE>for (int dz = -1; dz <= 1; dz++) {<NEW_LINE>if (baritone.bsi.isLoaded(16 * dx + position.getX(), 16 * dz + position.getZ())) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
.getProvider().getPrimaryBaritone();
1,490,696
final public boolean isPotentiallyUnknown(LocalVariableBinding local) {<NEW_LINE>// do not want to complain in unreachable code<NEW_LINE>if ((this.tagBits & UNREACHABLE) != 0 || (this.tagBits & NULL_FLAG_MASK) == 0) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int position = local.id + this.maxFieldCount;<NEW_LINE>if (position < BitCacheSize) {<NEW_LINE>// use bits<NEW_LINE>return (this.nullBit4 & (~this.nullBit1 | ~this.nullBit2 & ~this.nullBit3) & (1L << position)) != 0;<NEW_LINE>}<NEW_LINE>// use extra vector<NEW_LINE>if (this.extra == null) {<NEW_LINE>// if vector not yet allocated, then not initialized<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int vectorIndex;<NEW_LINE>if ((vectorIndex = (position / BitCacheSize) - 1) >= this.extra[2].length) {<NEW_LINE>// if not enough room in vector, then not initialized<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return (this.extra[5][vectorIndex] & (~this.extra[2][vectorIndex] | ~this.extra[3][vectorIndex] & ~this.extra[4][vectorIndex]) & (1L << (<MASK><NEW_LINE>}
position % BitCacheSize))) != 0;
616,067
private void reassignEarlyHolders8(Context context) {<NEW_LINE>ReflectUtil.field(Annotate.instance(context), TYPES_FIELD).set(this);<NEW_LINE>ReflectUtil.field(Attr.instance(context), TYPES_FIELD).set(this);<NEW_LINE>ReflectUtil.field(Check.instance(context), TYPES_FIELD).set(this);<NEW_LINE>ReflectUtil.field(DeferredAttr.instance(context), TYPES_FIELD).set(this);<NEW_LINE>ReflectUtil.field(Flow.instance(context), TYPES_FIELD).set(this);<NEW_LINE>ReflectUtil.field(Gen.instance(context), TYPES_FIELD).set(this);<NEW_LINE>ReflectUtil.field(Infer.instance(context), TYPES_FIELD).set(this);<NEW_LINE>ReflectUtil.field(JavaCompiler.instance(context), TYPES_FIELD).set(this);<NEW_LINE>ReflectUtil.field(JavacTrees.instance(context), TYPES_FIELD).set(this);<NEW_LINE>ReflectUtil.field(JavacTypes.instance(context), TYPES_FIELD).set(this);<NEW_LINE>ReflectUtil.field(JavacElements.instance(context)<MASK><NEW_LINE>ReflectUtil.field(LambdaToMethod.instance(context), TYPES_FIELD).set(this);<NEW_LINE>ReflectUtil.field(Lower.instance(context), TYPES_FIELD).set(this);<NEW_LINE>ReflectUtil.field(ManResolve.instance(context), TYPES_FIELD).set(this);<NEW_LINE>ReflectUtil.field(MemberEnter.instance(context), TYPES_FIELD).set(this);<NEW_LINE>ReflectUtil.field(RichDiagnosticFormatter.instance(context), TYPES_FIELD).set(this);<NEW_LINE>ReflectUtil.field(TransTypes.instance(context), TYPES_FIELD).set(this);<NEW_LINE>}
, TYPES_FIELD).set(this);
1,833,965
private static Callable<byte[]> requestWithGetAndResponse(final URL url, final Proxy proxy, final SecurityAuthentication authentication, final Map<String, Object> headers) {<NEW_LINE>return new Callable<byte[]>() {<NEW_LINE><NEW_LINE>private HttpURLConnection openConnection(final URL url) throws IOException {<NEW_LINE>// Add proxy, if passed throw parameters<NEW_LINE>final URLConnection connection = proxy == null ? url.openConnection(<MASK><NEW_LINE>if (connection == null)<NEW_LINE>return null;<NEW_LINE>final HttpURLConnection http = (HttpURLConnection) connection;<NEW_LINE>applyEndpointAccessAuthentication(http, authentication);<NEW_LINE>applyAdditionalHeaders(http, headers);<NEW_LINE>return http;<NEW_LINE>}<NEW_LINE><NEW_LINE>public byte[] call() throws IOException {<NEW_LINE>HttpURLConnection http = openConnection(url);<NEW_LINE>final int responseCode = http.getResponseCode();<NEW_LINE>if (responseCode == HttpURLConnection.HTTP_MOVED_TEMP || responseCode == HttpURLConnection.HTTP_MOVED_PERM) {<NEW_LINE>final String newUrl = http.getHeaderField("Location");<NEW_LINE>http = openConnection(new URL(newUrl));<NEW_LINE>}<NEW_LINE>return retrieveResponseAsBytes(http);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
) : url.openConnection(proxy);
494,946
private Set<File> walkDirectory(Path directory, final WatchEvent.Kind<?> kind) {<NEW_LINE>final Set<File> <MASK><NEW_LINE>try {<NEW_LINE>registerWatch(directory);<NEW_LINE>Files.walkFileTree(directory, new SimpleFileVisitor<Path>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {<NEW_LINE>FileVisitResult fileVisitResult = super.preVisitDirectory(dir, attrs);<NEW_LINE>registerWatch(dir);<NEW_LINE>return fileVisitResult;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {<NEW_LINE>FileVisitResult fileVisitResult = super.visitFile(file, attrs);<NEW_LINE>if (!StandardWatchEventKinds.ENTRY_MODIFY.equals(kind)) {<NEW_LINE>walkedFiles.add(file.toFile());<NEW_LINE>}<NEW_LINE>return fileVisitResult;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (IOException ex) {<NEW_LINE>logger.error(ex, () -> "Failed to walk directory: " + directory.toString());<NEW_LINE>}<NEW_LINE>return walkedFiles;<NEW_LINE>}
walkedFiles = new LinkedHashSet<>();
1,139,357
private static FileObject generateHtml(FileObject appletFile, FileObject buildDir, FileObject classesDir) throws IOException {<NEW_LINE>FileObject htmlFile = buildDir.getFileObject(appletFile.getName(), HTML_EXT);<NEW_LINE>if (htmlFile == null) {<NEW_LINE>htmlFile = buildDir.createData(<MASK><NEW_LINE>}<NEW_LINE>FileLock lock = htmlFile.lock();<NEW_LINE>PrintWriter writer = null;<NEW_LINE>try {<NEW_LINE>writer = new PrintWriter(htmlFile.getOutputStream(lock));<NEW_LINE>ClassPath cp = ClassPath.getClassPath(appletFile, ClassPath.EXECUTE);<NEW_LINE>ClassPath sp = ClassPath.getClassPath(appletFile, ClassPath.SOURCE);<NEW_LINE>String path = FileUtil.getRelativePath(sp.findOwnerRoot(appletFile), appletFile);<NEW_LINE>path = path.substring(0, path.length() - 5);<NEW_LINE>String codebase = FileUtil.getRelativePath(buildDir, classesDir);<NEW_LINE>if (codebase == null) {<NEW_LINE>codebase = classesDir.toURL().toString();<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>fillInFile(writer, path + "." + CLASS_EXT, "codebase=\"" + codebase + "\"");<NEW_LINE>} finally {<NEW_LINE>lock.releaseLock();<NEW_LINE>if (writer != null)<NEW_LINE>writer.close();<NEW_LINE>}<NEW_LINE>return htmlFile;<NEW_LINE>}
appletFile.getName(), HTML_EXT);
1,409,265
public DBSObject resolveObject(DBRProgressMonitor monitor) throws DBException {<NEW_LINE>OracleSchema tableSchema = schema != null ? schema : dataSource.getSchema(monitor, schemaName);<NEW_LINE>if (tableSchema == null) {<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>OracleTable table = tableSchema.getTable(monitor, tableName);<NEW_LINE>if (table == null) {<NEW_LINE>throw new DBException("Constraint table '" + tableName + "' not found in catalog '" + tableSchema.getName() + "'");<NEW_LINE>}<NEW_LINE>DBSObject constraint = null;<NEW_LINE>if (hasFK && type == DBSEntityConstraintType.FOREIGN_KEY) {<NEW_LINE>constraint = table.getForeignKey(monitor, constrName);<NEW_LINE>}<NEW_LINE>if (hasConstraints && type != DBSEntityConstraintType.FOREIGN_KEY) {<NEW_LINE>constraint = table.getConstraint(monitor, constrName);<NEW_LINE>}<NEW_LINE>if (constraint == null) {<NEW_LINE>throw new DBException("Constraint '" + constrName + "' not found in table '" + table.getFullyQualifiedName(DBPEvaluationContext.DDL) + "'");<NEW_LINE>}<NEW_LINE>return constraint;<NEW_LINE>}
DBException("Constraint schema '" + schemaName + "' not found");
1,055,472
private HttpResponse allowArchiveAccess(String tenantName, HttpRequest request) {<NEW_LINE>if (controller.tenants().require(TenantName.from(tenantName)).type() != Tenant.Type.cloud)<NEW_LINE>throw new IllegalArgumentException("Tenant '" + tenantName + "' is not a cloud tenant");<NEW_LINE>var data = toSlime(request.<MASK><NEW_LINE>var role = mandatory("role", data).asString();<NEW_LINE>if (role.isBlank()) {<NEW_LINE>return ErrorResponse.badRequest("Archive access role can't be whitespace only");<NEW_LINE>}<NEW_LINE>controller.tenants().lockOrThrow(TenantName.from(tenantName), LockedTenant.Cloud.class, lockedTenant -> {<NEW_LINE>lockedTenant = lockedTenant.withArchiveAccessRole(Optional.of(role));<NEW_LINE>controller.tenants().store(lockedTenant);<NEW_LINE>});<NEW_LINE>return new MessageResponse("Archive access role set to '" + role + "' for tenant " + tenantName + ".");<NEW_LINE>}
getData()).get();
1,485,415
public JavaNode visitNewClass(JCNewClass newClass, TreeContext owner) {<NEW_LINE>TreeContext ctx = owner.down(newClass);<NEW_LINE>if (newClass == null || newClass.constructor == null) {<NEW_LINE>logger.atWarning().log("Unexpected null class or constructor: %s", newClass);<NEW_LINE>return emitDiagnostic(ctx, "error analyzing class", null, null);<NEW_LINE>}<NEW_LINE>VName ctorNode = getNode(newClass.constructor);<NEW_LINE>if (ctorNode == null) {<NEW_LINE>return emitDiagnostic(ctx, "error analyzing class", null, null);<NEW_LINE>}<NEW_LINE>Span refSpan;<NEW_LINE>if (newClass.getIdentifier() instanceof JCTypeApply) {<NEW_LINE>JCTree type = ((JCTypeApply) newClass.getIdentifier()).getType();<NEW_LINE>refSpan = new Span(filePositions.getStart(type), filePositions.getEnd(type));<NEW_LINE>} else {<NEW_LINE>refSpan = new Span(filePositions.getStart(newClass.getIdentifier()), filePositions.getEnd(newClass.getIdentifier()));<NEW_LINE>}<NEW_LINE>// Span over "new Class(...)"<NEW_LINE>Span callSpan = new Span(filePositions.getStart(newClass), filePositions.getEnd(newClass));<NEW_LINE>if (owner.getTree().getTag() == JCTree.Tag.VARDEF) {<NEW_LINE>JCVariableDecl varDef = (JCVariableDecl) owner.getTree();<NEW_LINE>if (varDef.sym.getKind() == ElementKind.ENUM_CONSTANT) {<NEW_LINE>// Handle enum constructors specially.<NEW_LINE>// Span over "EnumValueName"<NEW_LINE>refSpan = filePositions.findIdentifier(varDef.name, varDef.getStartPosition());<NEW_LINE>// Span over "EnumValueName(...)"<NEW_LINE>callSpan = new Span(refSpan.getStart(), filePositions.getEnd(varDef));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>EntrySet anchor = entrySets.newAnchorAndEmit(filePositions, refSpan, ctx.getSnippet());<NEW_LINE>emitAnchor(anchor, EdgeKind.REF, ctorNode, getScope(ctx));<NEW_LINE>EntrySet callAnchor = entrySets.newAnchorAndEmit(filePositions, callSpan, ctx.getSnippet());<NEW_LINE>emitAnchor(callAnchor, EdgeKind.REF_CALL, ctorNode, getCallScope(ctx));<NEW_LINE>scanList(newClass.getTypeArguments(), ctx);<NEW_LINE>scanList(newClass.getArguments(), ctx);<NEW_LINE>scan(newClass.getEnclosingExpression(), ctx);<NEW_LINE>scan(<MASK><NEW_LINE>return scan(newClass.getIdentifier(), ctx);<NEW_LINE>}
newClass.getClassBody(), ctx);
1,753,242
public void toModel(Model model) {<NEW_LINE>for (String s1 : altLocations.keySet()) {<NEW_LINE>Resource r = model.createResource();<NEW_LINE>Resource e = model.createResource();<NEW_LINE>model.add(r, LocationMappingVocab.mapping, e);<NEW_LINE>String k = s1;<NEW_LINE>String <MASK><NEW_LINE>model.add(e, LocationMappingVocab.name, k);<NEW_LINE>model.add(e, LocationMappingVocab.altName, v);<NEW_LINE>}<NEW_LINE>for (String s : altPrefixes.keySet()) {<NEW_LINE>Resource r = model.createResource();<NEW_LINE>Resource e = model.createResource();<NEW_LINE>model.add(r, LocationMappingVocab.mapping, e);<NEW_LINE>String k = s;<NEW_LINE>String v = altPrefixes.get(k);<NEW_LINE>model.add(e, LocationMappingVocab.prefix, k);<NEW_LINE>model.add(e, LocationMappingVocab.altPrefix, v);<NEW_LINE>}<NEW_LINE>}
v = altLocations.get(k);
352,823
final GetWorkflowResult executeGetWorkflow(GetWorkflowRequest getWorkflowRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getWorkflowRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetWorkflowRequest> request = null;<NEW_LINE>Response<GetWorkflowResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetWorkflowRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getWorkflowRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Customer Profiles");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetWorkflow");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetWorkflowResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetWorkflowResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
868,274
public <T> void afterBeanDiscovery(@Observes AfterBeanDiscovery afterBeanDiscovery, BeanManager beanManager) {<NEW_LINE>if (tc.isDebugEnabled())<NEW_LINE>Tr.debug(tc, "afterBeanDiscovery : instance : " + Integer.toHexString(this.hashCode()) + " BeanManager : " + Integer.toHexString(beanManager.hashCode()));<NEW_LINE>try {<NEW_LINE>verifyConfiguration();<NEW_LINE>if (!identityStoreHandlerRegistered) {<NEW_LINE>beansToAdd.add(new IdentityStoreHandlerBean(beanManager));<NEW_LINE>if (tc.isDebugEnabled())<NEW_LINE>Tr.debug(tc, "registering the default IdentityStoreHandler.");<NEW_LINE>} else {<NEW_LINE>if (tc.isDebugEnabled())<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} catch (DeploymentException de) {<NEW_LINE>afterBeanDiscovery.addDefinitionError(de);<NEW_LINE>}<NEW_LINE>if (!isEmptyModuleMap()) {<NEW_LINE>// this is a JSR375 app.<NEW_LINE>ModulePropertiesProviderBean bean = new ModulePropertiesProviderBean(beanManager, moduleMap);<NEW_LINE>beansToAdd.add(bean);<NEW_LINE>// register the application name for recycle the apps.<NEW_LINE>ApplicationUtils.registerApplication(getApplicationName());<NEW_LINE>}<NEW_LINE>// TODO: Validate beans to add.<NEW_LINE>for (Bean bean : beansToAdd) {<NEW_LINE>afterBeanDiscovery.addBean(bean);<NEW_LINE>}<NEW_LINE>}
Tr.debug(tc, "IdentityStoreHandler is not registered because a custom IdentityStoreHandler has been registered,");
699,626
public static void VRSettings_SetString(@NativeType("char const *") CharSequence pchSection, @NativeType("char const *") CharSequence pchSettingsKey, @NativeType("char const *") CharSequence pchValue, @NativeType("EVRSettingsError *") IntBuffer peError) {<NEW_LINE>if (CHECKS) {<NEW_LINE>check(peError, 1);<NEW_LINE>}<NEW_LINE>MemoryStack stack = stackGet();<NEW_LINE>int stackPointer = stack.getPointer();<NEW_LINE>try {<NEW_LINE>stack.nASCII(pchSection, true);<NEW_LINE>long pchSectionEncoded = stack.getPointerAddress();<NEW_LINE>stack.nASCII(pchSettingsKey, true);<NEW_LINE>long pchSettingsKeyEncoded = stack.getPointerAddress();<NEW_LINE><MASK><NEW_LINE>long pchValueEncoded = stack.getPointerAddress();<NEW_LINE>nVRSettings_SetString(pchSectionEncoded, pchSettingsKeyEncoded, pchValueEncoded, memAddress(peError));<NEW_LINE>} finally {<NEW_LINE>stack.setPointer(stackPointer);<NEW_LINE>}<NEW_LINE>}
stack.nASCII(pchValue, true);
774,424
private static <T> StreamingDeserializer<T> newDeserializer(ObjectReader reader) {<NEW_LINE>final <MASK><NEW_LINE>final JsonParser parser;<NEW_LINE>try {<NEW_LINE>// TODO(scott): ByteBufferFeeder is currently not supported by jackson, and the current API throws<NEW_LINE>// UnsupportedOperationException if not supported. When jackson does support two NonBlockingInputFeeder<NEW_LINE>// types we need an approach which doesn't involve catching UnsupportedOperationException to try to get<NEW_LINE>// ByteBufferFeeder and then ByteArrayFeeder.<NEW_LINE>parser = factory.createNonBlockingByteArrayParser();<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new IllegalArgumentException("parser initialization error for factory: " + factory, e);<NEW_LINE>}<NEW_LINE>NonBlockingInputFeeder rawFeeder = parser.getNonBlockingInputFeeder();<NEW_LINE>if (rawFeeder instanceof ByteBufferFeeder) {<NEW_LINE>return new ByteBufferJacksonDeserializer<>(reader, parser, (ByteBufferFeeder) rawFeeder);<NEW_LINE>}<NEW_LINE>if (rawFeeder instanceof ByteArrayFeeder) {<NEW_LINE>return new ByteArrayJacksonDeserializer<>(reader, parser, (ByteArrayFeeder) rawFeeder);<NEW_LINE>}<NEW_LINE>throw new IllegalArgumentException("unsupported feeder type: " + rawFeeder);<NEW_LINE>}
JsonFactory factory = reader.getFactory();
1,082,826
private TextChunk[] extractChunks(@Nonnull UsageInfo2UsageAdapter usageInfo2UsageAdapter, @Nonnull PsiFile file) {<NEW_LINE>int absoluteStartOffset = usageInfo2UsageAdapter.getNavigationOffset();<NEW_LINE>if (absoluteStartOffset == -1)<NEW_LINE>return TextChunk.EMPTY_ARRAY;<NEW_LINE>Document visibleDocument = myDocument instanceof DocumentWindow ? ((DocumentWindow) myDocument).getDelegate() : myDocument;<NEW_LINE>int visibleStartOffset = myDocument instanceof DocumentWindow ? ((DocumentWindow) myDocument).injectedToHost(absoluteStartOffset) : absoluteStartOffset;<NEW_LINE>int lineNumber = myDocument.getLineNumber(absoluteStartOffset);<NEW_LINE>int visibleLineNumber = visibleDocument.getLineNumber(visibleStartOffset);<NEW_LINE>int visibleColumnNumber = <MASK><NEW_LINE>final List<TextChunk> result = new ArrayList<TextChunk>();<NEW_LINE>appendPrefix(result, visibleLineNumber, visibleColumnNumber);<NEW_LINE>int fragmentToShowStart = myDocument.getLineStartOffset(lineNumber);<NEW_LINE>int fragmentToShowEnd = fragmentToShowStart < myDocument.getTextLength() ? myDocument.getLineEndOffset(lineNumber) : 0;<NEW_LINE>if (fragmentToShowStart > fragmentToShowEnd)<NEW_LINE>return TextChunk.EMPTY_ARRAY;<NEW_LINE>final CharSequence chars = myDocument.getCharsSequence();<NEW_LINE>if (fragmentToShowEnd - fragmentToShowStart > MAX_LINE_LENGTH_TO_SHOW) {<NEW_LINE>final int lineStartOffset = fragmentToShowStart;<NEW_LINE>fragmentToShowStart = Math.max(lineStartOffset, absoluteStartOffset - OFFSET_BEFORE_TO_SHOW_WHEN_LONG_LINE);<NEW_LINE>final int lineEndOffset = fragmentToShowEnd;<NEW_LINE>Segment segment = usageInfo2UsageAdapter.getUsageInfo().getSegment();<NEW_LINE>int usage_length = segment != null ? segment.getEndOffset() - segment.getStartOffset() : 0;<NEW_LINE>fragmentToShowEnd = Math.min(lineEndOffset, absoluteStartOffset + usage_length + OFFSET_AFTER_TO_SHOW_WHEN_LONG_LINE);<NEW_LINE>// if we search something like a word, then expand shown context from one symbol before / after at least for word boundary<NEW_LINE>// this should not cause restarts of the lexer as the tokens are usually words<NEW_LINE>if (usage_length > 0 && StringUtil.isJavaIdentifierStart(chars.charAt(absoluteStartOffset)) && StringUtil.isJavaIdentifierStart(chars.charAt(absoluteStartOffset + usage_length - 1))) {<NEW_LINE>while (fragmentToShowEnd < lineEndOffset && StringUtil.isJavaIdentifierStart(chars.charAt(fragmentToShowEnd - 1))) ++fragmentToShowEnd;<NEW_LINE>while (fragmentToShowStart > lineStartOffset && StringUtil.isJavaIdentifierStart(chars.charAt(fragmentToShowStart))) --fragmentToShowStart;<NEW_LINE>if (fragmentToShowStart != lineStartOffset)<NEW_LINE>++fragmentToShowStart;<NEW_LINE>if (fragmentToShowEnd != lineEndOffset)<NEW_LINE>--fragmentToShowEnd;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (myDocument instanceof DocumentWindow) {<NEW_LINE>List<TextRange> editable = InjectedLanguageManager.getInstance(file.getProject()).intersectWithAllEditableFragments(file, new TextRange(fragmentToShowStart, fragmentToShowEnd));<NEW_LINE>for (TextRange range : editable) {<NEW_LINE>createTextChunks(usageInfo2UsageAdapter, chars, range.getStartOffset(), range.getEndOffset(), true, result);<NEW_LINE>}<NEW_LINE>return result.toArray(new TextChunk[result.size()]);<NEW_LINE>}<NEW_LINE>return createTextChunks(usageInfo2UsageAdapter, chars, fragmentToShowStart, fragmentToShowEnd, true, result);<NEW_LINE>}
visibleStartOffset - visibleDocument.getLineStartOffset(visibleLineNumber);
1,179,221
public void run() {<NEW_LINE>try {<NEW_LINE>long startTime = System.currentTimeMillis();<NEW_LINE>if (parentObject instanceof ParallelTileObject) {<NEW_LINE>((ParallelTileObject) parentObject).updateStatus(Status.PROCESSING);<NEW_LINE>imageData.getHierarchy().fireObjectClassificationsChangedEvent(this, Collections.singleton(parentObject));<NEW_LINE>}<NEW_LINE>if (checkROI()) {<NEW_LINE>try {<NEW_LINE>pathObjectsDetected = detector.runDetection(imageData, params, roi);<NEW_LINE>} catch (IOException e) {<NEW_LINE>logger.<MASK><NEW_LINE>}<NEW_LINE>result = detector.getLastResultsDescription();<NEW_LINE>long endTime = System.currentTimeMillis();<NEW_LINE>if (result != null)<NEW_LINE>logger.info(result + String.format(" (processing time: %.2f seconds)", (endTime - startTime) / 1000.));<NEW_LINE>else<NEW_LINE>logger.info(parentObject + String.format(" (processing time: %.2f seconds)", (endTime - startTime) / 1000.));<NEW_LINE>} else {<NEW_LINE>logger.info("Cannot run detection using ROI {}", roi);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>if (parentObject instanceof ParallelTileObject) {<NEW_LINE>((ParallelTileObject) parentObject).updateStatus(Status.DONE);<NEW_LINE>imageData.getHierarchy().fireObjectClassificationsChangedEvent(this, Collections.singleton(parentObject));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
error("Error processing " + roi, e);
878,552
private IQueryBuilder<I_AD_User_SortPref_Hdr> createSortPreferenceHdrQueryBuilder(final String action, final int recordId, final Object contextProvider) {<NEW_LINE>Check.assumeNotEmpty(action, "action not empty");<NEW_LINE>//<NEW_LINE>// Services<NEW_LINE>final IQueryBL queryBL = Services.get(IQueryBL.class);<NEW_LINE>final IQueryBuilder<I_AD_User_SortPref_Hdr> queryBuilder = queryBL.createQueryBuilder(I_AD_User_SortPref_Hdr.class, contextProvider).addOnlyActiveRecordsFilter().addEqualsFilter(I_AD_User_SortPref_Hdr.COLUMN_Action, action);<NEW_LINE>if (X_AD_User_SortPref_Hdr.ACTION_Fenster.equals(action)) {<NEW_LINE>queryBuilder.<MASK><NEW_LINE>} else if (X_AD_User_SortPref_Hdr.ACTION_FensterNichtDynamisch.equals(action)) {<NEW_LINE>queryBuilder.addEqualsFilter(I_AD_User_SortPref_Hdr.COLUMN_AD_Form_ID, recordId);<NEW_LINE>} else if (X_AD_User_SortPref_Hdr.ACTION_Info_Fenster.equals(action)) {<NEW_LINE>queryBuilder.addEqualsFilter(I_AD_User_SortPref_Hdr.COLUMN_AD_InfoWindow_ID, recordId);<NEW_LINE>} else {<NEW_LINE>throw new AdempiereException("Action not recognized: " + action);<NEW_LINE>}<NEW_LINE>return queryBuilder;<NEW_LINE>}
addEqualsFilter(I_AD_User_SortPref_Hdr.COLUMN_AD_Tab_ID, recordId);
1,134,187
public com.baidu.hugegraph.backend.store.raft.rpc.RaftRequests.SetLeaderResponse buildPartial() {<NEW_LINE>com.baidu.hugegraph.backend.store.raft.rpc.RaftRequests.SetLeaderResponse result = new com.baidu.hugegraph.backend.store.raft.<MASK><NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>to_bitField0_ |= 0x00000001;<NEW_LINE>}<NEW_LINE>if (commonBuilder_ == null) {<NEW_LINE>result.common_ = common_;<NEW_LINE>} else {<NEW_LINE>result.common_ = commonBuilder_.build();<NEW_LINE>}<NEW_LINE>result.bitField0_ = to_bitField0_;<NEW_LINE>onBuilt();<NEW_LINE>return result;<NEW_LINE>}
rpc.RaftRequests.SetLeaderResponse(this);
1,039,499
private void updateInfoViewAppearance() {<NEW_LINE>if (portrait)<NEW_LINE>return;<NEW_LINE>View toolsPanel = mainView.findViewById(R.id.measure_mode_controls);<NEW_LINE>View snapToRoadProgress = mainView.findViewById(R.id.snap_to_road_progress_bar);<NEW_LINE>int infoViewWidth = mainView.getWidth() - toolsPanel.getWidth();<NEW_LINE><MASK><NEW_LINE>if (progressBarVisible) {<NEW_LINE>bottomMargin += snapToRoadProgress.getHeight();<NEW_LINE>}<NEW_LINE>ViewGroup.MarginLayoutParams params = null;<NEW_LINE>if (mainView.getParent() instanceof FrameLayout) {<NEW_LINE>params = new FrameLayout.LayoutParams(infoViewWidth, -1);<NEW_LINE>} else if (mainView.getParent() instanceof LinearLayout) {<NEW_LINE>params = new LinearLayout.LayoutParams(infoViewWidth, -1);<NEW_LINE>}<NEW_LINE>if (params != null) {<NEW_LINE>AndroidUtils.setMargins(params, 0, 0, 0, bottomMargin);<NEW_LINE>cardsContainer.setLayoutParams(params);<NEW_LINE>}<NEW_LINE>}
int bottomMargin = toolsPanel.getHeight();
1,137,666
public void recordHistoricDetailVariableCreate(VariableInstanceEntity variable, ExecutionEntity sourceActivityExecution, boolean useActivityId, String activityInstanceId, Date createTime) {<NEW_LINE>String processDefinitionId = getProcessDefinitionId(variable, sourceActivityExecution);<NEW_LINE>if (getHistoryConfigurationSettings().isHistoryEnabledForVariableInstance(processDefinitionId, variable) && isHistoryLevelAtLeast(HistoryLevel.FULL, processDefinitionId)) {<NEW_LINE>ObjectNode data = processEngineConfiguration.getObjectMapper().createObjectNode();<NEW_LINE>addCommonVariableFields(variable, data);<NEW_LINE>if (sourceActivityExecution != null && sourceActivityExecution.isMultiInstanceRoot()) {<NEW_LINE>putIfNotNull(data, HistoryJsonConstants.IS_MULTI_INSTANCE_ROOT_EXECUTION, true);<NEW_LINE>}<NEW_LINE>putIfNotNull(data, HistoryJsonConstants.CREATE_TIME, createTime);<NEW_LINE>putIfNotNull(data, HistoryJsonConstants.RUNTIME_ACTIVITY_INSTANCE_ID, activityInstanceId);<NEW_LINE>if (useActivityId && sourceActivityExecution != null) {<NEW_LINE>String activityId = getActivityIdForExecution(sourceActivityExecution);<NEW_LINE>if (activityId != null) {<NEW_LINE>putIfNotNull(data, HistoryJsonConstants.ACTIVITY_ID, activityId);<NEW_LINE>putIfNotNull(data, HistoryJsonConstants.SOURCE_EXECUTION_ID, sourceActivityExecution.getId());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>getAsyncHistorySession().addHistoricData(getJobServiceConfiguration(<MASK><NEW_LINE>}<NEW_LINE>}
), HistoryJsonConstants.TYPE_HISTORIC_DETAIL_VARIABLE_UPDATE, data);
901,294
public void taskFinished(Task task) {<NEW_LINE>FileObject modeDir = userDir.get().getFileObject("config/Windows2Local/Modes");<NEW_LINE>OutputStream os;<NEW_LINE>if (modeDir != null) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>try {<NEW_LINE>FileSystem layer = findLayer(project);<NEW_LINE>if (layer == null) {<NEW_LINE>// NOI18N<NEW_LINE>throw new IOException("Cannot find layer in " + project);<NEW_LINE>}<NEW_LINE>for (FileObject m : modeDir.getChildren()) {<NEW_LINE>if (m.isData() && "wsmode".equals(m.getExt())) {<NEW_LINE>// NOI18N<NEW_LINE>final String name <MASK><NEW_LINE>// NOI18N<NEW_LINE>FileObject mode = FileUtil.createData(layer.getRoot(), name);<NEW_LINE>os = mode.getOutputStream();<NEW_LINE>os.write(DesignSupport.readMode(m).getBytes(StandardCharsets.UTF_8));<NEW_LINE>os.close();<NEW_LINE>sb.append(name).append("\n");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>NotifyDescriptor nd = new NotifyDescriptor.Message(NbBundle.getMessage(DesignSupport.class, "MSG_ModesGenerated", new Object[] { sb }), NotifyDescriptor.INFORMATION_MESSAGE);<NEW_LINE>DialogDisplayer.getDefault().notifyLater(nd);<NEW_LINE>} catch (IOException ex) {<NEW_LINE>Exceptions.printStackTrace(ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>EventQueue.invokeLater(this);<NEW_LINE>}
= "Windows2/Modes/" + m.getNameExt();
1,440,588
private static void decode13(DataInput in, long[] tmp, long[] longs) throws IOException {<NEW_LINE>readLELongs(in, tmp, 0, 26);<NEW_LINE>shiftLongs(tmp, 26, <MASK><NEW_LINE>for (int iter = 0, tmpIdx = 0, longsIdx = 26; iter < 2; ++iter, tmpIdx += 13, longsIdx += 3) {<NEW_LINE>long l0 = (tmp[tmpIdx + 0] & MASK16_3) << 10;<NEW_LINE>l0 |= (tmp[tmpIdx + 1] & MASK16_3) << 7;<NEW_LINE>l0 |= (tmp[tmpIdx + 2] & MASK16_3) << 4;<NEW_LINE>l0 |= (tmp[tmpIdx + 3] & MASK16_3) << 1;<NEW_LINE>l0 |= (tmp[tmpIdx + 4] >>> 2) & MASK16_1;<NEW_LINE>longs[longsIdx + 0] = l0;<NEW_LINE>long l1 = (tmp[tmpIdx + 4] & MASK16_2) << 11;<NEW_LINE>l1 |= (tmp[tmpIdx + 5] & MASK16_3) << 8;<NEW_LINE>l1 |= (tmp[tmpIdx + 6] & MASK16_3) << 5;<NEW_LINE>l1 |= (tmp[tmpIdx + 7] & MASK16_3) << 2;<NEW_LINE>l1 |= (tmp[tmpIdx + 8] >>> 1) & MASK16_2;<NEW_LINE>longs[longsIdx + 1] = l1;<NEW_LINE>long l2 = (tmp[tmpIdx + 8] & MASK16_1) << 12;<NEW_LINE>l2 |= (tmp[tmpIdx + 9] & MASK16_3) << 9;<NEW_LINE>l2 |= (tmp[tmpIdx + 10] & MASK16_3) << 6;<NEW_LINE>l2 |= (tmp[tmpIdx + 11] & MASK16_3) << 3;<NEW_LINE>l2 |= (tmp[tmpIdx + 12] & MASK16_3) << 0;<NEW_LINE>longs[longsIdx + 2] = l2;<NEW_LINE>}<NEW_LINE>}
longs, 0, 3, MASK16_13);
1,644,661
static boolean determineIfCurrentPasswordRequired(final PwmRequest pwmRequest) throws PwmUnrecoverableException {<NEW_LINE>final ChangePasswordProfile changePasswordProfile = ChangePasswordServlet.getProfile(pwmRequest);<NEW_LINE>final RequireCurrentPasswordMode currentSetting = changePasswordProfile.readSettingAsEnum(PwmSetting.PASSWORD_REQUIRE_CURRENT, RequireCurrentPasswordMode.class);<NEW_LINE>if (currentSetting == RequireCurrentPasswordMode.FALSE) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>final LoginInfoBean loginInfoBean = pwmRequest<MASK><NEW_LINE>if (loginInfoBean.getType() == AuthenticationType.AUTH_FROM_PUBLIC_MODULE) {<NEW_LINE>LOGGER.debug(pwmRequest, () -> "skipping user current password requirement, authentication type is " + AuthenticationType.AUTH_FROM_PUBLIC_MODULE);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>{<NEW_LINE>final PasswordData currentPassword = loginInfoBean.getUserCurrentPassword();<NEW_LINE>if (currentPassword == null) {<NEW_LINE>LOGGER.debug(pwmRequest, () -> "skipping user current password requirement, current password is not known to application");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (currentSetting == RequireCurrentPasswordMode.TRUE) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>final UserInfo userInfo = pwmRequest.getPwmSession().getUserInfo();<NEW_LINE>final PasswordStatus passwordStatus = userInfo.getPasswordStatus();<NEW_LINE>return currentSetting == RequireCurrentPasswordMode.NOTEXPIRED && !passwordStatus.isExpired() && !passwordStatus.isPreExpired() && !passwordStatus.isViolatesPolicy() && !userInfo.isRequiresNewPassword();<NEW_LINE>}
.getPwmSession().getLoginInfoBean();
1,376,107
private static void categorizeErrorRules(List<Pair<Rule, FileObject>> rules, Map<String, Map<String, List<ErrorRule>>> dest, FileObject rootFolder) {<NEW_LINE>dest.clear();<NEW_LINE>for (Pair<Rule, FileObject> pair : rules) {<NEW_LINE>Rule rule = pair.getA();<NEW_LINE>FileObject fo = pair.getB();<NEW_LINE>String mime = FileUtil.getRelativePath(<MASK><NEW_LINE>if (mime.length() == 0) {<NEW_LINE>// TODO: use a predefined constant<NEW_LINE>mime = "text/x-java";<NEW_LINE>}<NEW_LINE>if (rule instanceof ErrorRule) {<NEW_LINE>Map<String, List<ErrorRule>> map = dest.get(mime);<NEW_LINE>if (map == null) {<NEW_LINE>dest.put(mime, map = new HashMap<String, List<ErrorRule>>());<NEW_LINE>// first encounter the MIME type; read the 'inherit' rule from<NEW_LINE>// the rule folder. Further definitions<NEW_LINE>FileObject mimeFolder = fo.getParent();<NEW_LINE>Object o = mimeFolder.getAttribute("inherit.rules");<NEW_LINE>if (Boolean.TRUE == o) {<NEW_LINE>Map<String, List<ErrorRule>> inheritMap = dest.get("text/x-java");<NEW_LINE>for (String c : inheritMap.keySet()) {<NEW_LINE>map.put(c, new ArrayList<ErrorRule>(inheritMap.get(c)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>addRule((ErrorRule) rule, map);<NEW_LINE>} else {<NEW_LINE>LOG.log(Level.WARNING, "The rule defined in " + fo.getPath() + "is not instance of ErrorRule");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
rootFolder, fo.getParent());
139,009
public static void main(String[] args) {<NEW_LINE>OptionsParser parser = OptionsParser.builder().optionsClasses(BuildEncyclopediaOptions.class).allowResidue(false).build();<NEW_LINE>parser.parseAndExitUponError(args);<NEW_LINE>BuildEncyclopediaOptions options = parser.getOptions(BuildEncyclopediaOptions.class);<NEW_LINE>if (options.help) {<NEW_LINE>printUsage(parser);<NEW_LINE>Runtime.getRuntime().exit(0);<NEW_LINE>}<NEW_LINE>if (options.linkMapPath.isEmpty() || options.inputDirs.isEmpty() || options.provider.isEmpty() || (options.singlePage && options.createToc)) {<NEW_LINE>printUsage(parser);<NEW_LINE>Runtime.getRuntime().exit(1);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>DocLinkMap linkMap = DocLinkMap.createFromFile(options.linkMapPath);<NEW_LINE>RuleLinkExpander linkExpander = new RuleLinkExpander(options.singlePage, linkMap);<NEW_LINE>BuildEncyclopediaProcessor processor = null;<NEW_LINE>if (options.singlePage) {<NEW_LINE>processor = new SinglePageBuildEncyclopediaProcessor(linkExpander<MASK><NEW_LINE>} else {<NEW_LINE>processor = new MultiPageBuildEncyclopediaProcessor(linkExpander, createRuleClassProvider(options.provider), options.createToc);<NEW_LINE>}<NEW_LINE>processor.generateDocumentation(options.inputDirs, options.outputDir, options.denylist);<NEW_LINE>} catch (BuildEncyclopediaDocException e) {<NEW_LINE>fail(e, false);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>fail(e, true);<NEW_LINE>}<NEW_LINE>}
, createRuleClassProvider(options.provider));
135,884
private void makeConstructor(ConstructorInsn insn, ICodeWriter code) throws CodegenException {<NEW_LINE>ClassNode cls = mth.root().resolveClass(insn.getClassType());<NEW_LINE>if (cls != null && cls.isAnonymous() && !fallback) {<NEW_LINE>cls.ensureProcessed();<NEW_LINE>inlineAnonymousConstructor(code, cls, insn);<NEW_LINE>mth.getParentClass().addInlinedClass(cls);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (insn.isSelf()) {<NEW_LINE>throw new JadxRuntimeException("Constructor 'self' invoke must be removed!");<NEW_LINE>}<NEW_LINE>MethodNode callMth = mth.root().<MASK><NEW_LINE>if (insn.isSuper()) {<NEW_LINE>code.attachAnnotation(callMth);<NEW_LINE>code.add("super");<NEW_LINE>} else if (insn.isThis()) {<NEW_LINE>code.attachAnnotation(callMth);<NEW_LINE>code.add("this");<NEW_LINE>} else {<NEW_LINE>code.add("new ");<NEW_LINE>if (callMth == null || callMth.contains(AFlag.DONT_GENERATE)) {<NEW_LINE>// use class reference if constructor method is missing (default constructor)<NEW_LINE>code.attachAnnotation(mth.root().resolveClass(insn.getCallMth().getDeclClass()));<NEW_LINE>} else {<NEW_LINE>code.attachAnnotation(callMth);<NEW_LINE>}<NEW_LINE>mgen.getClassGen().addClsName(code, insn.getClassType());<NEW_LINE>GenericInfoAttr genericInfoAttr = insn.get(AType.GENERIC_INFO);<NEW_LINE>if (genericInfoAttr != null) {<NEW_LINE>code.add('<');<NEW_LINE>if (genericInfoAttr.isExplicit()) {<NEW_LINE>boolean first = true;<NEW_LINE>for (ArgType type : genericInfoAttr.getGenericTypes()) {<NEW_LINE>if (!first) {<NEW_LINE>code.add(',');<NEW_LINE>} else {<NEW_LINE>first = false;<NEW_LINE>}<NEW_LINE>mgen.getClassGen().useType(code, type);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>code.add('>');<NEW_LINE>}<NEW_LINE>}<NEW_LINE>generateMethodArguments(code, insn, 0, callMth);<NEW_LINE>}
resolveMethod(insn.getCallMth());
48,204
private static void registerAppLinksListeners(Context context, final MixpanelAPI mixpanel) {<NEW_LINE>// Register a BroadcastReceiver to receive com.parse.bolts.measurement_event and track a call to mixpanel<NEW_LINE>try {<NEW_LINE>final Class<?> clazz = Class.forName("androidx.localbroadcastmanager.content.LocalBroadcastManager");<NEW_LINE>final Method methodGetInstance = clazz.getMethod("getInstance", Context.class);<NEW_LINE>final Method methodRegisterReceiver = clazz.getMethod("registerReceiver", BroadcastReceiver.class, IntentFilter.class);<NEW_LINE>final Object localBroadcastManager = methodGetInstance.invoke(null, context);<NEW_LINE>methodRegisterReceiver.invoke(localBroadcastManager, new BroadcastReceiver() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onReceive(Context context, Intent intent) {<NEW_LINE>final JSONObject properties = new JSONObject();<NEW_LINE>final Bundle args = intent.getBundleExtra("event_args");<NEW_LINE>if (args != null) {<NEW_LINE>for (final String key : args.keySet()) {<NEW_LINE>try {<NEW_LINE>properties.put(key<MASK><NEW_LINE>} catch (final JSONException e) {<NEW_LINE>MPLog.e(APP_LINKS_LOGTAG, "failed to add key \"" + key + "\" to properties for tracking bolts event", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>mixpanel.track("$" + intent.getStringExtra("event_name"), properties);<NEW_LINE>}<NEW_LINE>}, new IntentFilter("com.parse.bolts.measurement_event"));<NEW_LINE>} catch (final InvocationTargetException e) {<NEW_LINE>MPLog.d(APP_LINKS_LOGTAG, "Failed to invoke LocalBroadcastManager.registerReceiver() -- App Links tracking will not be enabled due to this exception", e);<NEW_LINE>} catch (final ClassNotFoundException e) {<NEW_LINE>MPLog.d(APP_LINKS_LOGTAG, "To enable App Links tracking, add implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0': " + e.getMessage());<NEW_LINE>} catch (final NoSuchMethodException e) {<NEW_LINE>MPLog.d(APP_LINKS_LOGTAG, "To enable App Links tracking, add implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0': " + e.getMessage());<NEW_LINE>} catch (final IllegalAccessException e) {<NEW_LINE>MPLog.d(APP_LINKS_LOGTAG, "App Links tracking will not be enabled due to this exception: " + e.getMessage());<NEW_LINE>}<NEW_LINE>}
, args.get(key));
1,702,125
public static void searchSubreddits(@NonNull final CacheManager cm, @NonNull final RedditAccount user, @NonNull final String queryString, @NonNull final Context context, @NonNull final APIResponseHandler.ValueResponseHandler<SubredditListResponse> handler, @NonNull final Optional<String> after) {<NEW_LINE>// 60 seconds<NEW_LINE>final long maxCacheAgeMs = 60 * 1000;<NEW_LINE>final Uri.Builder builder = Constants.Reddit.getUriBuilder("/subreddits/search.json");<NEW_LINE>builder.appendQueryParameter("q", queryString);<NEW_LINE>builder.appendQueryParameter("limit", "100");<NEW_LINE>if (PrefsUtility.pref_behaviour_nsfw()) {<NEW_LINE>builder.appendQueryParameter("include_over_18", "on");<NEW_LINE>}<NEW_LINE>after.apply(value -> builder.appendQueryParameter("after", value));<NEW_LINE>final URI uri = Objects.requireNonNull(General.uriFromString(builder.build().toString()));<NEW_LINE>requestSubredditList(cm, uri, user, context, handler, new DownloadStrategyIfTimestampOutsideBounds(<MASK><NEW_LINE>}
TimestampBound.notOlderThan(maxCacheAgeMs)));
431,122
final UpdateSceneResult executeUpdateScene(UpdateSceneRequest updateSceneRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateSceneRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateSceneRequest> request = null;<NEW_LINE>Response<UpdateSceneResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateSceneRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateSceneRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateScene");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>URI endpointTraitHost = null;<NEW_LINE>if (!clientConfiguration.isDisableHostPrefixInjection()) {<NEW_LINE>String hostPrefix = "api.";<NEW_LINE>String resolvedHostPrefix = String.format("api.");<NEW_LINE>endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateSceneResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateSceneResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTTwinMaker");
676,598
public void lower(DynamicNewArrayNode newArrayNode, HotSpotRegistersProvider registers, LoweringTool tool) {<NEW_LINE>StructuredGraph graph = newArrayNode.graph();<NEW_LINE>OptionValues localOptions = graph.getOptions();<NEW_LINE>Arguments args = new Arguments(allocateArrayDynamic, newArrayNode.graph().getGuardsStage(), tool.getLoweringStage());<NEW_LINE>args.add("elementType", newArrayNode.getElementType());<NEW_LINE>ValueNode voidClass = newArrayNode.getVoidClass();<NEW_LINE>assert voidClass != null;<NEW_LINE>args.add("voidClass", voidClass);<NEW_LINE>ValueNode length = newArrayNode.length();<NEW_LINE>args.add("length", length.isAlive() ? length : graph.addOrUniqueWithInputs(length));<NEW_LINE>args.addConst("fillContents", newArrayNode.fillContents());<NEW_LINE>args.addConst("threadRegister", registers.getThreadRegister());<NEW_LINE>args.addConst("knownElementKind", newArrayNode.getKnownElementKind() == null ? JavaKind.Illegal : newArrayNode.getKnownElementKind());<NEW_LINE>if (newArrayNode.getKnownElementKind() != null) {<NEW_LINE>args.addConst("knownLayoutHelper", lookupArrayClass(tool, newArrayNode.getKnownElementKind()).layoutHelper());<NEW_LINE>} else {<NEW_LINE>args.addConst("knownLayoutHelper", 0);<NEW_LINE>}<NEW_LINE>args.add("prototypeMarkWord", lookupArrayClass(tool, JavaKind.Object).prototypeMarkWord());<NEW_LINE>args.addConst("options", localOptions);<NEW_LINE>args.addConst("counters", counters);<NEW_LINE>SnippetTemplate template = template(newArrayNode, args);<NEW_LINE>template.instantiate(providers.getMetaAccess(<MASK><NEW_LINE>}
), newArrayNode, DEFAULT_REPLACER, args);
905,555
public Producer buildProducerProperties() {<NEW_LINE>PropertyMapper propertyMapper = PropertyMapper.get().alwaysApplyingWhenNonNull();<NEW_LINE>Producer properties = new Producer();<NEW_LINE>AzurePropertiesUtils.mergeAzureCommonProperties(this, this.producer, properties);<NEW_LINE>propertyMapper.from(this.getDomainName()).to(properties::setDomainName);<NEW_LINE>propertyMapper.from(this.getNamespace()).to(properties::setNamespace);<NEW_LINE>propertyMapper.from(this.getConnectionString()).to(properties::setConnectionString);<NEW_LINE>propertyMapper.from(this.getEntityName()).to(properties::setEntityName);<NEW_LINE>propertyMapper.from(this.getEntityType()).to(properties::setEntityType);<NEW_LINE>propertyMapper.from(this.producer.getDomainName()<MASK><NEW_LINE>propertyMapper.from(this.producer.getNamespace()).to(properties::setNamespace);<NEW_LINE>propertyMapper.from(this.producer.getConnectionString()).to(properties::setConnectionString);<NEW_LINE>propertyMapper.from(this.producer.getEntityType()).to(properties::setEntityType);<NEW_LINE>propertyMapper.from(this.producer.getEntityName()).to(properties::setEntityName);<NEW_LINE>return properties;<NEW_LINE>}
).to(properties::setDomainName);
1,661,682
public static void onReceive(TermuxApiReceiver apiReceiver, final Context context, Intent intent) {<NEW_LINE>Logger.logDebug(LOG_TAG, "onReceive");<NEW_LINE>final String[] filePaths = intent.getStringArrayExtra("paths");<NEW_LINE>final boolean recursive = intent.getBooleanExtra("recursive", false);<NEW_LINE>final Integer[] totalScanned = { 0 };<NEW_LINE>final boolean verbose = intent.getBooleanExtra("verbose", false);<NEW_LINE>for (int i = 0; i < filePaths.length; i++) {<NEW_LINE>filePaths[i] = filePaths[i<MASK><NEW_LINE>}<NEW_LINE>ResultReturner.returnData(apiReceiver, intent, out -> {<NEW_LINE>scanFiles(out, context, filePaths, totalScanned, verbose);<NEW_LINE>if (recursive)<NEW_LINE>scanFilesRecursively(out, context, filePaths, totalScanned, verbose);<NEW_LINE>out.println(String.format(Locale.ENGLISH, "Finished scanning %d file(s)", totalScanned[0]));<NEW_LINE>});<NEW_LINE>}
].replace("\\,", ",");