idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
5,036
public boolean onTouchEvent(MotionEvent event) {<NEW_LINE>if (event.getPointerCount() != 1 || !view.mapGestureAllowed(OsmandMapLayer.MapGestureType.DOUBLE_TAP_ZOOM_CHANGE)) {<NEW_LINE>resetEvents();<NEW_LINE>mIsDoubleTapping = false;<NEW_LINE>mScrolling = false;<NEW_LINE>mIsInZoomMode = false;<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (event.getAction() == MotionEvent.ACTION_UP) {<NEW_LINE>boolean handled = false;<NEW_LINE>if (mIsInZoomMode) {<NEW_LINE>mIsInZoomMode = false;<NEW_LINE>listener.onZoomEnded(scale);<NEW_LINE>handled = true;<NEW_LINE>} else if (secondDown != null) {<NEW_LINE>if (calculateSqaredDistance(secondDown, event) < mDoubleTapSlopSquare && event.getEventTime() - secondDown.getEventTime() < LONG_PRESS_TIMEOUT) {<NEW_LINE>listener.onDoubleTap(event);<NEW_LINE>}<NEW_LINE>handled = true;<NEW_LINE>} else if (!mScrolling) {<NEW_LINE>firstUp = MotionEvent.obtain(event);<NEW_LINE>} else {<NEW_LINE>resetEvents();<NEW_LINE>}<NEW_LINE>if (handled) {<NEW_LINE>resetEvents();<NEW_LINE>}<NEW_LINE>mIsDoubleTapping = false;<NEW_LINE>mScrolling = false;<NEW_LINE>return handled;<NEW_LINE>} else {<NEW_LINE>if (event.getAction() == MotionEvent.ACTION_DOWN && !mIsInZoomMode) {<NEW_LINE>if (isConsideredDoubleTap(firstDown, firstUp, event)) {<NEW_LINE>mIsDoubleTapping = true;<NEW_LINE>secondDown = MotionEvent.obtain(event);<NEW_LINE>float x = event.getX();<NEW_LINE>float y = event.getY();<NEW_LINE>listener.onGestureInit(x, y, x, y);<NEW_LINE>zoomCenter = isXLargeDevice(view.getContext()) ? new <MASK><NEW_LINE>listener.onZoomStarted(zoomCenter);<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>firstDown = MotionEvent.obtain(event);<NEW_LINE>}<NEW_LINE>} else if (event.getAction() == MotionEvent.ACTION_MOVE) {<NEW_LINE>if (!mScrolling && secondDown == null && firstDown != null) {<NEW_LINE>mScrolling = calculateSqaredDistance(firstDown, event) > mTouchSlopSquare;<NEW_LINE>}<NEW_LINE>if (isConfirmedScale(secondDown, event)) {<NEW_LINE>mIsInZoomMode = true;<NEW_LINE>}<NEW_LINE>if (mIsInZoomMode) {<NEW_LINE>float delta = convertPxToDp((int) (firstDown.getY() - event.getY()));<NEW_LINE>float scaleDelta = delta / (displayHeightPx / SCALE_PER_SCREEN);<NEW_LINE>scale = 1 - scaleDelta;<NEW_LINE>listener.onZooming(scale);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
PointF(x, y) : centerScreen;
1,611,276
public void uploadCertificate(String appKey, String devCertificateFile, String devCertificatePassword, String proCertificateFile, String proCertificatePassword) throws APIConnectionException, APIRequestException {<NEW_LINE>Preconditions.checkArgument(devCertificateFile != null || proCertificateFile != null, "dev certificate file or pro certificate file should not be null");<NEW_LINE>NativeHttpClient client = (NativeHttpClient) mHttpClient;<NEW_LINE>String url = mBasePath + mV1AppPath + "/" + appKey + "/certificate";<NEW_LINE>Map<String, String> fileMap = new HashMap<String, String>();<NEW_LINE>Map<String, String> textMap = new HashMap<String, String>();<NEW_LINE>if (devCertificateFile != null) {<NEW_LINE>textMap.put("devCertificatePassword", devCertificatePassword);<NEW_LINE>fileMap.put("devCertificateFile", devCertificateFile);<NEW_LINE>}<NEW_LINE>if (proCertificateFile != null) {<NEW_LINE>textMap.put("proCertificatePassword", proCertificatePassword);<NEW_LINE>fileMap.put("proCertificateFile", proCertificateFile);<NEW_LINE>}<NEW_LINE>String response = client.formUploadByPost(<MASK><NEW_LINE>LOG.info("uploadFile:{}", response);<NEW_LINE>}
url, textMap, fileMap, null);
576,126
private Iterable<Token> doInsertions(List<Insertion> insertions, Iterable<Token> tokens) {<NEW_LINE>ListIterator<Insertion> li = insertions.listIterator();<NEW_LINE>Insertion next_ins = li.hasNext() ? (Insertion) li.next() : null;<NEW_LINE>int len = 0;<NEW_LINE>LinkedList<Token> rc = new LinkedList<Token>();<NEW_LINE>for (Token t : tokens) {<NEW_LINE>len += t.getValue().length();<NEW_LINE>String s = t.getValue();<NEW_LINE>int pos = 0;<NEW_LINE>while (next_ins != null && next_ins.index <= len) {<NEW_LINE>rc.add(new Token(t.getPos(), t.getType(), s.substring(pos, s.length() + (next_ins.index - len))));<NEW_LINE>pos = s.length() + (next_ins.index - len);<NEW_LINE>for (Token tt : next_ins.lngBuffer) rc.add(tt);<NEW_LINE>next_ins = li.hasNext() ? li.next() : null;<NEW_LINE>}<NEW_LINE>if (pos < s.length())<NEW_LINE>rc.add(new Token(t.getPos(), t.getType(), <MASK><NEW_LINE>}<NEW_LINE>// Do remaining tokens<NEW_LINE>while (li.hasNext()) for (Token tt : ((Insertion) li.next()).lngBuffer) rc.add(tt);<NEW_LINE>return rc;<NEW_LINE>}
s.substring(pos)));
637,836
private void addTopics(AdminClient adminClient, List<NewTopic> topicsToAdd) {<NEW_LINE>CreateTopicsResult topicResults = adminClient.createTopics(topicsToAdd);<NEW_LINE>try {<NEW_LINE>topicResults.all().get(this.operationTimeout, TimeUnit.SECONDS);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>Thread.currentThread().interrupt();<NEW_LINE><MASK><NEW_LINE>} catch (TimeoutException e) {<NEW_LINE>throw new KafkaException("Timed out waiting for create topics results", e);<NEW_LINE>} catch (ExecutionException e) {<NEW_LINE>if (e.getCause() instanceof TopicExistsException) {<NEW_LINE>// Possible race with another app instance<NEW_LINE>LOGGER.debug(e.getCause(), "Failed to create topics");<NEW_LINE>} else {<NEW_LINE>LOGGER.error(e.getCause(), "Failed to create topics");<NEW_LINE>// NOSONAR<NEW_LINE>throw new KafkaException("Failed to create topics", e.getCause());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
LOGGER.error(e, "Interrupted while waiting for topic creation results");
1,259,402
public NDList processInput(TranslatorContext ctx, QAInput input) {<NEW_LINE>String question = input.getQuestion();<NEW_LINE>String paragraph = input.getParagraph();<NEW_LINE>if (toLowerCase) {<NEW_LINE>question = question.toLowerCase(locale);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>BertToken token;<NEW_LINE>if (padding) {<NEW_LINE>token = tokenizer.encode(question, paragraph, maxLength);<NEW_LINE>} else {<NEW_LINE>token = tokenizer.encode(question, paragraph);<NEW_LINE>}<NEW_LINE>tokens = token.getTokens();<NEW_LINE>NDManager manager = ctx.getNDManager();<NEW_LINE>long[] indices = tokens.stream().mapToLong(vocabulary::getIndex).toArray();<NEW_LINE>long[] attentionMask = token.getAttentionMask().stream().mapToLong(i -> i).toArray();<NEW_LINE>NDList ndList = new NDList(3);<NEW_LINE>ndList.add(manager.create(indices));<NEW_LINE>ndList.add(manager.create(attentionMask));<NEW_LINE>if (includeTokenTypes) {<NEW_LINE>long[] tokenTypes = token.getTokenTypes().stream().mapToLong(i -> i).toArray();<NEW_LINE>ndList.add(manager.create(tokenTypes));<NEW_LINE>}<NEW_LINE>return ndList;<NEW_LINE>}
paragraph = paragraph.toLowerCase(locale);
859,915
public void configConstant(Constants constants) {<NEW_LINE>JbootAppListenerManager.me().onConstantConfigBefore(constants);<NEW_LINE>constants.setRenderFactory(JbootRenderFactory.me());<NEW_LINE>constants.setDevMode(Jboot.isDevMode());<NEW_LINE>constants.setLogFactory(new JbootLogFactory());<NEW_LINE>constants.setMaxPostSize(1024 * 1024 * 2000);<NEW_LINE>constants.setReportAfterInvocation(false);<NEW_LINE>constants.setControllerFactory(JbootControllerManager.me());<NEW_LINE>constants.setJsonFactory(JbootJson::new);<NEW_LINE>constants.setInjectDependency(true);<NEW_LINE>constants.setTokenCache(new JbootTokenCache());<NEW_LINE>constants.setCaptchaCache(new JbootCaptchaCache());<NEW_LINE>constants.setBaseUploadPath(LocalAttachmentContainerConfig.getInstance().buildUploadAbsolutePath());<NEW_LINE>constants.setJsonDatePattern(DateUtil.datetimePattern);<NEW_LINE>if (JbootWebConfig.getInstance().isPathVariableEnable()) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>constants.setActionMapping(JbootActionMapping::new);<NEW_LINE>}<NEW_LINE>JbootAppListenerManager.me().onConstantConfig(constants);<NEW_LINE>}
constants.setActionMapping(PathVariableActionMapping::new);
950,137
public static XComponentContext createInitialComponentContext(Map<String, Object> context_entries) throws Exception {<NEW_LINE>ServiceManager xSMgr = new ServiceManager();<NEW_LINE>XImplementationLoader xImpLoader = UnoRuntime.queryInterface(XImplementationLoader.class, new JavaLoader());<NEW_LINE>XInitialization xInit = UnoRuntime.<MASK><NEW_LINE>Object[] args = new Object[] { xSMgr };<NEW_LINE>xInit.initialize(args);<NEW_LINE>// initial component context<NEW_LINE>if (context_entries == null) {<NEW_LINE>context_entries = new HashMap<>(1);<NEW_LINE>}<NEW_LINE>// add smgr<NEW_LINE>context_entries.put("/singletons/com.sun.star.lang.theServiceManager", new ComponentContextEntry(null, xSMgr));<NEW_LINE>// ... xxx todo: add standard entries<NEW_LINE>XComponentContext xContext = new ComponentContext(context_entries, null);<NEW_LINE>xSMgr.setDefaultContext(xContext);<NEW_LINE>XSet xSet = UnoRuntime.queryInterface(XSet.class, xSMgr);<NEW_LINE>// insert basic jurt factories<NEW_LINE>insertBasicFactories(xSet, xImpLoader);<NEW_LINE>return xContext;<NEW_LINE>}
queryInterface(XInitialization.class, xImpLoader);
79,959
private void describeInsertStatementByShardingSphereMetaData(final PostgreSQLPreparedStatement preparedStatement) {<NEW_LINE>if (!preparedStatement.describeRows().isPresent()) {<NEW_LINE>// TODO Consider the SQL `insert into table (col) values ($1) returning id`<NEW_LINE>preparedStatement.setRowDescription(PostgreSQLNoDataPacket.getInstance());<NEW_LINE>}<NEW_LINE>InsertStatement insertStatement = (InsertStatement) preparedStatement.getSqlStatement();<NEW_LINE>if (0 == insertStatement.getParameterCount()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Set<Integer> unspecifiedTypeParameterIndexes = getUnspecifiedTypeParameterIndexes(preparedStatement);<NEW_LINE>if (unspecifiedTypeParameterIndexes.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String schemaName = connectionSession.getSchemaName();<NEW_LINE>String logicTableName = insertStatement.getTable().getTableName().getIdentifier().getValue();<NEW_LINE>TableMetaData tableMetaData = ProxyContext.getInstance().getMetaData(schemaName).getDefaultSchema().get(logicTableName);<NEW_LINE>Map<String, ColumnMetaData> columnMetaData = tableMetaData.getColumns();<NEW_LINE>List<String> columnNames;<NEW_LINE>if (insertStatement.getColumns().isEmpty()) {<NEW_LINE>columnNames = new ArrayList<>(tableMetaData.getColumns().keySet());<NEW_LINE>} else {<NEW_LINE>columnNames = insertStatement.getColumns().stream().map(each -> each.getIdentifier().getValue()).collect(Collectors.toList());<NEW_LINE>}<NEW_LINE>Iterator<InsertValuesSegment> iterator = insertStatement.getValues().iterator();<NEW_LINE>int parameterMarkerIndex = 0;<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>InsertValuesSegment each = iterator.next();<NEW_LINE>ListIterator<ExpressionSegment> listIterator = each.getValues().listIterator();<NEW_LINE>for (int columnIndex = listIterator.nextIndex(); listIterator.hasNext(); columnIndex = listIterator.nextIndex()) {<NEW_LINE>ExpressionSegment value = listIterator.next();<NEW_LINE>if (!(value instanceof ParameterMarkerExpressionSegment)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (!unspecifiedTypeParameterIndexes.contains(parameterMarkerIndex)) {<NEW_LINE>parameterMarkerIndex++;<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String columnName = columnNames.get(columnIndex);<NEW_LINE>PostgreSQLColumnType parameterType = PostgreSQLColumnType.valueOfJDBCType(columnMetaData.get(columnName).getDataType());<NEW_LINE>preparedStatement.getParameterTypes()<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.set(parameterMarkerIndex++, parameterType);
211,144
public final void compute() {<NEW_LINE><MASK><NEW_LINE>final LongBinaryOperator reducer;<NEW_LINE>if ((transformer = this.transformer) != null && (reducer = this.reducer) != null) {<NEW_LINE>long r = this.basis;<NEW_LINE>for (int i = baseIndex, f, h; batch > 0 && (h = ((f = baseLimit) + i) >>> 1) > i; ) {<NEW_LINE>addToPendingCount(1);<NEW_LINE>(rights = new MapReduceValuesToLongTask<K, V>(this, batch >>>= 1, baseLimit = h, f, tab, rights, transformer, r, reducer)).fork();<NEW_LINE>}<NEW_LINE>for (Node<K, V> p; (p = advance()) != null; ) r = reducer.applyAsLong(r, transformer.applyAsLong(p.val));<NEW_LINE>result = r;<NEW_LINE>CountedCompleter<?> c;<NEW_LINE>for (c = firstComplete(); c != null; c = c.nextComplete()) {<NEW_LINE>MapReduceValuesToLongTask<K, V> t = (MapReduceValuesToLongTask<K, V>) c, s = t.rights;<NEW_LINE>while (s != null) {<NEW_LINE>t.result = reducer.applyAsLong(t.result, s.result);<NEW_LINE>s = t.rights = s.nextRight;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
final ToLongFunction<? super V> transformer;
1,084,029
public ScimGroupExternalMember mapExternalGroup(final String groupId, final String externalGroup, final String origin, final String zoneId) throws ScimResourceNotFoundException, MemberAlreadyExistsException {<NEW_LINE>ScimGroup group = scimGroupProvisioning.retrieve(groupId, zoneId);<NEW_LINE>if (!StringUtils.hasText(externalGroup)) {<NEW_LINE>throw new ScimResourceConstraintFailedException("external group must not be null when mapping an external group");<NEW_LINE>}<NEW_LINE>if (!StringUtils.hasText(origin)) {<NEW_LINE>throw new ScimResourceConstraintFailedException("origin must not be null when mapping an external group");<NEW_LINE>}<NEW_LINE>if (null != group) {<NEW_LINE>try {<NEW_LINE>int result = jdbcTemplate.update(ADD_EXTERNAL_GROUP_MAPPING_SQL, ps -> {<NEW_LINE>ps.setString(1, groupId);<NEW_LINE><MASK><NEW_LINE>ps.setTimestamp(3, new Timestamp(System.currentTimeMillis()));<NEW_LINE>ps.setString(4, origin);<NEW_LINE>ps.setString(5, zoneId);<NEW_LINE>});<NEW_LINE>} catch (DuplicateKeyException e) {<NEW_LINE>// we should not throw, if the mapping exist, we should leave it<NEW_LINE>// there.<NEW_LINE>logger.info("The mapping between group " + group.getDisplayName() + " and external group " + externalGroup + " already exists");<NEW_LINE>// throw new<NEW_LINE>// MemberAlreadyExistsException("The mapping between group " +<NEW_LINE>// group.getDisplayName() + " and external group " +<NEW_LINE>// externalGroup + " already exists");<NEW_LINE>}<NEW_LINE>return getExternalGroupMap(groupId, externalGroup, origin, zoneId);<NEW_LINE>} else {<NEW_LINE>throw new ScimResourceNotFoundException("Group does not exist");<NEW_LINE>}<NEW_LINE>}
ps.setString(2, externalGroup);
1,548,196
public static CodegenExpression codegen(CodegenExpression input, ExprForge dateFormatForge, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) {<NEW_LINE>CodegenMethod method = codegenMethodScope.makeChild(EPTypePremade.LOCALDATETIME.getEPType(), StringToLocalDateTimeWExprFormatComputerEval.class, codegenClassScope).addParam(EPTypePremade.STRING.getEPType(), "input");<NEW_LINE>CodegenExpression formatter;<NEW_LINE>if (dateFormatForge.getForgeConstantType().isConstant()) {<NEW_LINE>formatter = formatFieldExpr(EPTypePremade.DATETIMEFORMATTER.<MASK><NEW_LINE>} else {<NEW_LINE>method.getBlock().declareVar(EPTypePremade.DATETIMEFORMATTER.getEPType(), "formatter", staticMethod(ExprCastNode.class, "stringToDateTimeFormatterSafe", dateFormatForge.evaluateCodegen(EPTypePremade.OBJECT.getEPType(), method, exprSymbol, codegenClassScope)));<NEW_LINE>formatter = ref("formatter");<NEW_LINE>}<NEW_LINE>method.getBlock().methodReturn(staticMethod(StringToLocalDateTimeWStaticFormatComputer.class, "stringToLocalDateTimeWStaticFormatParse", ref("input"), formatter));<NEW_LINE>return localMethod(method, input);<NEW_LINE>}
getEPType(), dateFormatForge, codegenClassScope);
189,855
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) {<NEW_LINE>if (msg instanceof HttpRequestMetaData) {<NEW_LINE>closeHandler.protocolPayloadBeginOutbound(ctx);<NEW_LINE>HttpRequestMetaData metaData = (HttpRequestMetaData) msg;<NEW_LINE>HttpHeaders h1Headers = metaData.headers();<NEW_LINE>waitForContinuation = REQ_EXPECT_CONTINUE.test(metaData);<NEW_LINE>CharSequence host = h1Headers.getAndRemove(HOST);<NEW_LINE>Http2Headers h2Headers = h1HeadersToH2Headers(h1Headers);<NEW_LINE>if (host == null) {<NEW_LINE>host = metaData.host();<NEW_LINE>if (host != null) {<NEW_LINE>h2Headers.authority(host);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>h2Headers.authority(host);<NEW_LINE>}<NEW_LINE>method = metaData.method();<NEW_LINE>h2Headers.<MASK><NEW_LINE>if (!CONNECT.equals(method)) {<NEW_LINE>// The ":scheme" and ":path" pseudo-header fields MUST be omitted for CONNECT.<NEW_LINE>// https://tools.ietf.org/html/rfc7540#section-8.3<NEW_LINE>h2Headers.scheme(scheme.name());<NEW_LINE>h2Headers.path(metaData.requestTarget());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>writeMetaData(ctx, metaData, h2Headers, true, promise);<NEW_LINE>} finally {<NEW_LINE>final Http2StreamChannel streamChannel = (Http2StreamChannel) ctx.channel();<NEW_LINE>final int streamId = streamChannel.stream().id();<NEW_LINE>if (streamId > 0) {<NEW_LINE>observer.streamIdAssigned(streamId);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (msg instanceof Buffer) {<NEW_LINE>writeBuffer(ctx, (Buffer) msg, promise);<NEW_LINE>} else if (msg instanceof HttpHeaders) {<NEW_LINE>writeTrailers(ctx, msg, promise);<NEW_LINE>} else {<NEW_LINE>ctx.write(msg, promise);<NEW_LINE>}<NEW_LINE>}
method(method.name());
740,263
public static boolean isSameDevice(final String uniqueDeviceId) {<NEW_LINE>// {prefix}{type}{32id}<NEW_LINE>if (TextUtils.isEmpty(uniqueDeviceId) && uniqueDeviceId.length() < 33)<NEW_LINE>return false;<NEW_LINE>if (uniqueDeviceId.equals(udid))<NEW_LINE>return true;<NEW_LINE>final String cachedId = UtilsBridge.getSpUtils4Utils(<MASK><NEW_LINE>if (uniqueDeviceId.equals(cachedId))<NEW_LINE>return true;<NEW_LINE>int st = uniqueDeviceId.length() - 33;<NEW_LINE>String type = uniqueDeviceId.substring(st, st + 1);<NEW_LINE>if (type.startsWith("1")) {<NEW_LINE>String macAddress = getMacAddress();<NEW_LINE>if (macAddress.equals("")) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return uniqueDeviceId.substring(st + 1).equals(getUdid("", macAddress));<NEW_LINE>} else if (type.startsWith("2")) {<NEW_LINE>final String androidId = getAndroidID();<NEW_LINE>if (TextUtils.isEmpty(androidId)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return uniqueDeviceId.substring(st + 1).equals(getUdid("", androidId));<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
).getString(KEY_UDID, null);
559,199
public com.amazonaws.services.storagegateway.model.ServiceUnavailableErrorException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.storagegateway.model.ServiceUnavailableErrorException serviceUnavailableErrorException = new com.amazonaws.services.<MASK><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 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("error", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>serviceUnavailableErrorException.setError(StorageGatewayErrorJsonUnmarshaller.getInstance().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 serviceUnavailableErrorException;<NEW_LINE>}
storagegateway.model.ServiceUnavailableErrorException(null);
1,745,181
public void testSFRemoteHomeHandleSerialization() throws Exception {<NEW_LINE>HomeHandle handle = fhome1.getHomeHandle();<NEW_LINE>assertNotNull("Get EJB home handle from home was null.", handle);<NEW_LINE>ByteArrayOutputStream bos = new ByteArrayOutputStream();<NEW_LINE>ObjectOutputStream os = new ObjectOutputStream(bos);<NEW_LINE>os.writeObject(handle);<NEW_LINE>os.close();<NEW_LINE>ObjectInputStream is = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()));<NEW_LINE>handle = <MASK><NEW_LINE>is.close();<NEW_LINE>assertNotNull("Deserialized home handle from stream was null.", handle);<NEW_LINE>// Narrow needed in Liberty since not using IBM ORB<NEW_LINE>EJBHome ejbHome = (SFRaHome) PortableRemoteObject.narrow(handle.getEJBHome(), SFRaHome.class);<NEW_LINE>// EJBHome ejbHome = handle.getEJBHome();<NEW_LINE>assertNotNull("Get EJB Home from handle was null.", ejbHome);<NEW_LINE>assertEquals("Test EJB Home name was unexpected value.", fhome1.getClass().getName(), ejbHome.getClass().getName());<NEW_LINE>}
(HomeHandle) is.readObject();
689,938
private JPanel buttonTab(final RailButton rbc) {<NEW_LINE>JPanel primary = new JPanel(new MigLayout("fill"));<NEW_LINE>JPanel panel = new JPanel(new MigLayout());<NEW_LINE>{<NEW_LINE>// // Outer Diameter<NEW_LINE>panel.add(new JLabel(trans.get("RailBtnCfg.lbl.OuterDiam")));<NEW_LINE>DoubleModel ODModel = new DoubleModel(component, "OuterDiameter", UnitGroup.UNITS_LENGTH, 0);<NEW_LINE>JSpinner ODSpinner = new JSpinner(ODModel.getSpinnerModel());<NEW_LINE>ODSpinner.setEditor(new SpinnerEditor(ODSpinner));<NEW_LINE>panel.add(ODSpinner, "growx");<NEW_LINE>panel.add(new UnitSelector(ODModel), "growx");<NEW_LINE>panel.add(new BasicSlider(ODModel.getSliderModel(0, 0.001, 0.02)), "w 100lp, wrap");<NEW_LINE>}<NEW_LINE>{<NEW_LINE>// // Height<NEW_LINE>panel.add(new JLabel(trans.get("RailBtnCfg.lbl.TotalHeight")));<NEW_LINE>DoubleModel heightModel = new DoubleModel(component, "TotalHeight", UnitGroup.UNITS_LENGTH, 0);<NEW_LINE>JSpinner heightSpinner = new JSpinner(heightModel.getSpinnerModel());<NEW_LINE>heightSpinner.setEditor(new SpinnerEditor(heightSpinner));<NEW_LINE>panel.add(heightSpinner, "growx");<NEW_LINE>panel.add(new UnitSelector(heightModel), "growx");<NEW_LINE>panel.add(new BasicSlider(heightModel.getSliderModel(0, 0.001, 0.02)), "w 100lp, wrap");<NEW_LINE>}<NEW_LINE>{<NEW_LINE>// // Angular Position:<NEW_LINE>panel.add(new JLabel(trans.get("RailBtnCfg.lbl.Angle")));<NEW_LINE>DoubleModel angleModel = new DoubleModel(component, "AngleOffset", UnitGroup.<MASK><NEW_LINE>JSpinner angleSpinner = new JSpinner(angleModel.getSpinnerModel());<NEW_LINE>angleSpinner.setEditor(new SpinnerEditor(angleSpinner));<NEW_LINE>panel.add(angleSpinner, "growx");<NEW_LINE>panel.add(new UnitSelector(angleModel), "growx");<NEW_LINE>panel.add(new BasicSlider(angleModel.getSliderModel(-Math.PI, Math.PI)), "w 100lp, wrap");<NEW_LINE>}<NEW_LINE>{<NEW_LINE>// // Position relative to:<NEW_LINE>panel.add(new JLabel(trans.get("RailBtnCfg.lbl.PosRelativeTo")));<NEW_LINE>final EnumModel<AxialMethod> methodModel = new EnumModel<AxialMethod>(component, "AxialMethod", AxialMethod.axialOffsetMethods);<NEW_LINE>JComboBox<AxialMethod> relToCombo = new JComboBox<AxialMethod>(methodModel);<NEW_LINE>panel.add(relToCombo, "spanx, growx, wrap");<NEW_LINE>}<NEW_LINE>{<NEW_LINE>// // plus<NEW_LINE>panel.add(new JLabel(trans.get("RailBtnCfg.lbl.Plus")), "right");<NEW_LINE>DoubleModel offsetModel = new DoubleModel(component, "AxialOffset", UnitGroup.UNITS_LENGTH);<NEW_LINE>JSpinner offsetSpinner = new JSpinner(offsetModel.getSpinnerModel());<NEW_LINE>offsetSpinner.setEditor(new SpinnerEditor(offsetSpinner));<NEW_LINE>panel.add(offsetSpinner, "growx");<NEW_LINE>panel.add(new UnitSelector(offsetModel), "growx");<NEW_LINE>panel.add(new BasicSlider(offsetModel.getSliderModel(new DoubleModel(component.getParent(), "Length", -1.0, UnitGroup.UNITS_NONE), new DoubleModel(component.getParent(), "Length"))), "w 100lp, wrap para");<NEW_LINE>}<NEW_LINE>primary.add(panel, "grow, gapright 201p");<NEW_LINE>panel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::][]", ""));<NEW_LINE>// // Instance count<NEW_LINE>panel.add(instanceablePanel(rbc), "span, wrap");<NEW_LINE>// // Material<NEW_LINE>panel.add(materialPanel(Material.Type.BULK), "span, wrap");<NEW_LINE>primary.add(panel, "grow");<NEW_LINE>return primary;<NEW_LINE>}
UNITS_ANGLE, -180, +180);
36,820
public DescribeTableResult describeTable(DescribeTableRequest describeTableRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeTableRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<DescribeTableRequest> request = null;<NEW_LINE>Response<DescribeTableResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeTableRequestMarshaller().marshall(describeTableRequest);<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>Unmarshaller<DescribeTableResult, JsonUnmarshallerContext> unmarshaller = new DescribeTableResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<DescribeTableResult> responseHandler = new JsonResponseHandler<DescribeTableResult>(unmarshaller);<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1,395,295
public synchronized void init(PreferencesFacade preferencesFacade) {<NEW_LINE>this.latitude = preferencesFacade.getDouble(LATITUDE, 0);<NEW_LINE>this.longitude = preferencesFacade.getDouble(LONGITUDE, 0);<NEW_LINE>double maxLatitude = preferencesFacade.<MASK><NEW_LINE>double minLatitude = preferencesFacade.getDouble(LATITUDE_MIN, Double.NaN);<NEW_LINE>double maxLongitude = preferencesFacade.getDouble(LONGITUDE_MAX, Double.NaN);<NEW_LINE>double minLongitude = preferencesFacade.getDouble(LONGITUDE_MIN, Double.NaN);<NEW_LINE>if (isNan(maxLatitude, minLatitude, maxLongitude, minLongitude)) {<NEW_LINE>this.mapLimit = null;<NEW_LINE>} else {<NEW_LINE>this.mapLimit = new BoundingBox(minLatitude, minLongitude, maxLatitude, maxLongitude);<NEW_LINE>}<NEW_LINE>this.zoomLevel = preferencesFacade.getByte(ZOOM_LEVEL, (byte) 0);<NEW_LINE>this.zoomLevelMax = preferencesFacade.getByte(ZOOM_LEVEL_MAX, Byte.MAX_VALUE);<NEW_LINE>this.zoomLevelMin = preferencesFacade.getByte(ZOOM_LEVEL_MIN, (byte) 0);<NEW_LINE>this.scaleFactor = Math.pow(2, this.zoomLevel);<NEW_LINE>}
getDouble(LATITUDE_MAX, Double.NaN);
1,783,126
final DeactivateUserResult executeDeactivateUser(DeactivateUserRequest deactivateUserRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deactivateUserRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeactivateUserRequest> request = null;<NEW_LINE>Response<DeactivateUserResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeactivateUserRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deactivateUserRequest));<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, "WorkDocs");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeactivateUser");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeactivateUserResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeactivateUserResultJsonUnmarshaller());<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);
445,803
private static String detectDefaultWebBrowser() {<NEW_LINE>// XXX hotfix for #233047<NEW_LINE>// assert !EventQueue.isDispatchThread();<NEW_LINE>// #233145<NEW_LINE>if (!XDG_SETTINGS_AVAILABLE) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>OutputProcessorFactory outputProcessorFactory = new OutputProcessorFactory();<NEW_LINE>// NOI18N<NEW_LINE>ExternalProcessBuilder // NOI18N<NEW_LINE>processBuilder = // NOI18N<NEW_LINE>new ExternalProcessBuilder(XDG_SETTINGS_COMMAND).// NOI18N<NEW_LINE>addArgument(// NOI18N<NEW_LINE>"get").// NOI18N<NEW_LINE>addArgument("default-web-browser");<NEW_LINE>ExecutionDescriptor silentDescriptor = new ExecutionDescriptor().inputOutput(InputOutput.NULL).inputVisible(false).frontWindow(false).showProgress(false).outProcessorFactory(outputProcessorFactory);<NEW_LINE>// NOI18N<NEW_LINE>Future<Integer> // NOI18N<NEW_LINE>result = ExecutionService.newService(processBuilder, silentDescriptor, "Detecting default web browser").run();<NEW_LINE>try {<NEW_LINE>result.get(10, TimeUnit.SECONDS);<NEW_LINE>} catch (InterruptedException | ExecutionException | TimeoutException ex) {<NEW_LINE>LOGGER.log(Level.INFO, null, ex);<NEW_LINE>}<NEW_LINE>String output = outputProcessorFactory.getOutput();<NEW_LINE>if (output == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return <MASK><NEW_LINE>}
output.toLowerCase(Locale.US);
1,574,460
public static IndexInfo indexInfoOf(Document sourceDocument) {<NEW_LINE>Document keyDbObject = (Document) sourceDocument.get("key");<NEW_LINE>int numberOfElements = keyDbObject.keySet().size();<NEW_LINE>List<IndexField> indexFields = new ArrayList<IndexField>(numberOfElements);<NEW_LINE>for (String key : keyDbObject.keySet()) {<NEW_LINE>Object value = keyDbObject.get(key);<NEW_LINE>if (TWO_D_IDENTIFIERS.contains(value)) {<NEW_LINE>indexFields.add(IndexField.geo(key));<NEW_LINE>} else if ("text".equals(value)) {<NEW_LINE>Document weights = (Document) sourceDocument.get("weights");<NEW_LINE>for (String fieldName : weights.keySet()) {<NEW_LINE>indexFields.add(IndexField.text(fieldName, Float.valueOf(weights.get(fieldName).toString())));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (ObjectUtils.nullSafeEquals("hashed", value)) {<NEW_LINE>indexFields.add<MASK><NEW_LINE>} else if (key.endsWith("$**")) {<NEW_LINE>indexFields.add(IndexField.wildcard(key));<NEW_LINE>} else {<NEW_LINE>Double keyValue = new Double(value.toString());<NEW_LINE>if (ONE.equals(keyValue)) {<NEW_LINE>indexFields.add(IndexField.create(key, ASC));<NEW_LINE>} else if (MINUS_ONE.equals(keyValue)) {<NEW_LINE>indexFields.add(IndexField.create(key, DESC));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String name = sourceDocument.get("name").toString();<NEW_LINE>boolean unique = sourceDocument.containsKey("unique") ? (Boolean) sourceDocument.get("unique") : false;<NEW_LINE>boolean sparse = sourceDocument.containsKey("sparse") ? (Boolean) sourceDocument.get("sparse") : false;<NEW_LINE>String language = sourceDocument.containsKey("default_language") ? (String) sourceDocument.get("default_language") : "";<NEW_LINE>String partialFilter = extractPartialFilterString(sourceDocument);<NEW_LINE>IndexInfo info = new IndexInfo(indexFields, name, unique, sparse, language);<NEW_LINE>info.partialFilterExpression = partialFilter;<NEW_LINE>info.collation = sourceDocument.get("collation", Document.class);<NEW_LINE>if (sourceDocument.containsKey("expireAfterSeconds")) {<NEW_LINE>Number expireAfterSeconds = sourceDocument.get("expireAfterSeconds", Number.class);<NEW_LINE>info.expireAfter = Duration.ofSeconds(NumberUtils.convertNumberToTargetClass(expireAfterSeconds, Long.class));<NEW_LINE>}<NEW_LINE>if (sourceDocument.containsKey("wildcardProjection")) {<NEW_LINE>info.wildcardProjection = sourceDocument.get("wildcardProjection", Document.class);<NEW_LINE>}<NEW_LINE>return info;<NEW_LINE>}
(IndexField.hashed(key));
1,292,154
public void removeStone(int x, int y, Stone color) {<NEW_LINE>synchronized (this) {<NEW_LINE>if (!Board.isValid(x, y) || this.getStones()[Board.getIndex(x, y)] == Stone.EMPTY)<NEW_LINE>return;<NEW_LINE>BoardData data = this.getData();<NEW_LINE>Stone[] stones = data.stones;<NEW_LINE>Zobrist zobrist = data.zobrist;<NEW_LINE>// set the stone at (x, y) to empty<NEW_LINE>Stone oriColor = stones[Board<MASK><NEW_LINE>stones[Board.getIndex(x, y)] = Stone.EMPTY;<NEW_LINE>zobrist.toggleStone(x, y, oriColor);<NEW_LINE>data.moveNumberList[Board.getIndex(x, y)] = 0;<NEW_LINE>}<NEW_LINE>}
.getIndex(x, y)];
1,188,059
private static long indexBuilder(DatasetGraph dsg, InputStream input, String indexName) {<NEW_LINE>long tickPoint = BulkLoaderX.DataTick;<NEW_LINE>int superTick = BulkLoaderX.DataSuperTick;<NEW_LINE>// Location of storage, not the DB.<NEW_LINE>DatasetGraphTDB dsgtdb = TDBInternal.getDatasetGraphTDB(dsg);<NEW_LINE>int keyLength = SystemTDB.SizeOfNodeId * indexName.length();<NEW_LINE>int valueLength = 0;<NEW_LINE>// The name is the order. Input is already in the right order.<NEW_LINE>int tupleLength = indexName.length();<NEW_LINE>TupleIndex index = TDBInternal.findIndex(dsg, indexName);<NEW_LINE>if (index == null)<NEW_LINE>throw new TDBException("Can not find index: " + indexName);<NEW_LINE>String primaryOrder;<NEW_LINE>if (tupleLength == 3) {<NEW_LINE>primaryOrder = Names.primaryIndexTriples;<NEW_LINE>} else if (tupleLength == 4) {<NEW_LINE>primaryOrder = Names.primaryIndexQuads;<NEW_LINE>} else {<NEW_LINE>throw new TDBException("Index name: " + indexName);<NEW_LINE>}<NEW_LINE>TupleMap colMap = TupleMap.create(primaryOrder, indexName);<NEW_LINE>int blockSize = SystemTDB.BlockSize;<NEW_LINE>RecordFactory recordFactory = ((TupleIndexRecord) index).getRangeIndex().getRecordFactory();<NEW_LINE>int order = BPlusTreeParams.calcOrder(blockSize, recordFactory);<NEW_LINE>BPlusTreeParams bptParams = new BPlusTreeParams(order, recordFactory);<NEW_LINE>// Extract from index.<NEW_LINE>TupleIndexRecord tIdxRec = (TupleIndexRecord) index;<NEW_LINE>BPlusTree bpt = (BPlusTree) (tIdxRec.getRangeIndex());<NEW_LINE>BlockMgr blkMgrNodes = bpt.getNodeManager().getBlockMgr();<NEW_LINE>BlockMgr blkMgrRecords = bpt.getRecordsMgr().getBlockMgr();<NEW_LINE>BufferChannel blkState = bpt<MASK><NEW_LINE>// ----<NEW_LINE>int rowBlock = 1000;<NEW_LINE>Iterator<Record> iter = new RecordsFromInput(input, tupleLength, colMap, rowBlock);<NEW_LINE>// ProgressMonitor.<NEW_LINE>ProgressMonitor monitor = ProgressMonitorOutput.create(BulkLoaderX.LOG_Index, indexName, tickPoint, superTick);<NEW_LINE>ProgressIterator<Record> iter2 = new ProgressIterator<>(iter, monitor);<NEW_LINE>monitor.start();<NEW_LINE>// Independent transaction on just this BPlusTree, not the dataset.<NEW_LINE>CoLib.executeWrite(index, () -> {<NEW_LINE>BPlusTree bpt2 = BPlusTreeRewriter.packIntoBPlusTree(iter2, bptParams, recordFactory, blkState, blkMgrNodes, blkMgrRecords);<NEW_LINE>});<NEW_LINE>monitor.finish();<NEW_LINE>long count = monitor.getTicks();<NEW_LINE>return count;<NEW_LINE>}
.getStateManager().getBufferChannel();
316,694
public void visitTag(Tag parseTag, IParseDictionary parseDictionary) throws LogParseException {<NEW_LINE>String currentMethod = null;<NEW_LINE>String holder = null;<NEW_LINE>List<Tag> allChildren = parseTag.getChildren();<NEW_LINE>for (Tag child : allChildren) {<NEW_LINE>String tagName = child.getName();<NEW_LINE>Map<String, String> attrs = child.getAttributes();<NEW_LINE>switch(tagName) {<NEW_LINE>case TAG_METHOD:<NEW_LINE>{<NEW_LINE><MASK><NEW_LINE>holder = attrs.get(ATTR_HOLDER);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>// changes member context<NEW_LINE>case TAG_CALL:<NEW_LINE>{<NEW_LINE>String methodID = attrs.get(ATTR_METHOD);<NEW_LINE>Tag methodTag = parseDictionary.getMethod(methodID);<NEW_LINE>Map<String, String> methodTagAttributes = methodTag.getAttributes();<NEW_LINE>currentMethod = methodTagAttributes.get(ATTR_NAME);<NEW_LINE>holder = methodTagAttributes.get(ATTR_HOLDER);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case TAG_INTRINSIC:<NEW_LINE>{<NEW_LINE>if (holder != null && currentMethod != null) {<NEW_LINE>Tag klassTag = parseDictionary.getKlass(holder);<NEW_LINE>String intrinsic = child.getAttributes().get(ATTR_ID);<NEW_LINE>if (klassTag != null) {<NEW_LINE>String fqName = klassTag.getAttributes().get(ATTR_NAME).replace(C_SLASH, C_DOT) + C_DOT + currentMethod;<NEW_LINE>result.put(fqName, intrinsic);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>holder = null;<NEW_LINE>currentMethod = null;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case TAG_PHASE:<NEW_LINE>{<NEW_LINE>String phaseName = attrs.get(ATTR_NAME);<NEW_LINE>if (S_PARSE_HIR.equals(phaseName)) {<NEW_LINE>visitTag(child, parseDictionary);<NEW_LINE>} else {<NEW_LINE>logger.warn("Don't know how to handle phase {}", phaseName);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case // nested parse from inlining<NEW_LINE>TAG_PARSE:<NEW_LINE>{<NEW_LINE>visitTag(child, parseDictionary);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>default:<NEW_LINE>handleOther(child);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
currentMethod = attrs.get(ATTR_NAME);
478,622
public void marshall(User user, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (user == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(user.getId(), ID_BINDING);<NEW_LINE>protocolMarshaller.marshall(user.getArn(), ARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(user.getUsername(), USERNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(user.getIdentityInfo(), IDENTITYINFO_BINDING);<NEW_LINE>protocolMarshaller.marshall(user.getPhoneConfig(), PHONECONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(user.getDirectoryUserId(), DIRECTORYUSERID_BINDING);<NEW_LINE>protocolMarshaller.marshall(user.getSecurityProfileIds(), SECURITYPROFILEIDS_BINDING);<NEW_LINE>protocolMarshaller.marshall(user.getRoutingProfileId(), ROUTINGPROFILEID_BINDING);<NEW_LINE>protocolMarshaller.marshall(user.getHierarchyGroupId(), HIERARCHYGROUPID_BINDING);<NEW_LINE>protocolMarshaller.marshall(user.getTags(), TAGS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + <MASK><NEW_LINE>}<NEW_LINE>}
e.getMessage(), e);
883,838
public static int mulAddTo(int[] x, int xOff, int[] y, int yOff, int[] zz, int zzOff) {<NEW_LINE>long y_0 = y[yOff + 0] & M;<NEW_LINE>long y_1 = y[yOff + 1] & M;<NEW_LINE>long y_2 = y[yOff + 2] & M;<NEW_LINE>long y_3 = y[yOff + 3] & M;<NEW_LINE>long zc = 0;<NEW_LINE>for (int i = 0; i < 4; ++i) {<NEW_LINE>long c = 0, x_i = x[xOff + i] & M;<NEW_LINE>c += x_i * y_0 + (zz[zzOff + 0] & M);<NEW_LINE>zz[zzOff + 0] = (int) c;<NEW_LINE>c >>>= 32;<NEW_LINE>c += x_i * y_1 + (zz[zzOff + 1] & M);<NEW_LINE>zz[zzOff + 1] = (int) c;<NEW_LINE>c >>>= 32;<NEW_LINE>c += x_i * y_2 + (zz[zzOff + 2] & M);<NEW_LINE>zz[zzOff <MASK><NEW_LINE>c >>>= 32;<NEW_LINE>c += x_i * y_3 + (zz[zzOff + 3] & M);<NEW_LINE>zz[zzOff + 3] = (int) c;<NEW_LINE>c >>>= 32;<NEW_LINE>zc += c + (zz[zzOff + 4] & M);<NEW_LINE>zz[zzOff + 4] = (int) zc;<NEW_LINE>zc >>>= 32;<NEW_LINE>++zzOff;<NEW_LINE>}<NEW_LINE>return (int) zc;<NEW_LINE>}
+ 2] = (int) c;
1,457,278
public SearchJob execute(Search search, SearchUser searchUser, ExecutionState executionState) {<NEW_LINE>final Search searchWithStreams = search.addStreamsToQueriesWithoutStreams(() -> searchUser.streams().loadAll());<NEW_LINE>final Search searchWithExecutionState = searchWithStreams.applyExecutionState(objectMapper, firstNonNull(executionState, ExecutionState.empty()));<NEW_LINE>authorize(searchWithExecutionState, searchUser);<NEW_LINE>final SearchJob searchJob = queryEngine.execute(searchJobService.create(searchWithExecutionState, searchUser.username()));<NEW_LINE>try {<NEW_LINE>Uninterruptibles.getUninterruptibly(searchJob.getResultFuture(), 60000, TimeUnit.MILLISECONDS);<NEW_LINE>} catch (ExecutionException e) {<NEW_LINE>LOG.error("Error executing search job <{}>", <MASK><NEW_LINE>throw new InternalServerErrorException("Error executing search job: " + e.getMessage(), e);<NEW_LINE>} catch (TimeoutException e) {<NEW_LINE>throw new InternalServerErrorException("Timeout while executing search job");<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.error("Other error", e);<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>return searchJob;<NEW_LINE>}
searchJob.getId(), e);
748,553
public void translateToBedrock(ProxySession session, EntityDataMap dictionary, EntityMetadata metadata) {<NEW_LINE>if (metadata.getId() == 15) {<NEW_LINE>// Dragon phase<NEW_LINE>switch((int) metadata.getValue()) {<NEW_LINE>case // Landed, performing breath attack<NEW_LINE>5:<NEW_LINE>EntityEventPacket entityEventPacket = new EntityEventPacket();<NEW_LINE>entityEventPacket.setRuntimeEntityId(entity.getProxyEid());<NEW_LINE>entityEventPacket.setType(EntityEventType.DRAGON_FLAMING);<NEW_LINE>entityEventPacket.setData(0);<NEW_LINE>session.sendPacket(entityEventPacket);<NEW_LINE>break;<NEW_LINE>// Landed, looking for a player for breath attack<NEW_LINE>case 6:<NEW_LINE>case // Landed, roar before beginning breath attack<NEW_LINE>7:<NEW_LINE>dictionary.getFlags().setFlag(EntityFlag.SITTING, true);<NEW_LINE>break;<NEW_LINE>case 9:<NEW_LINE>// Handle death here?<NEW_LINE>break;<NEW_LINE>case // Hovering with no AI<NEW_LINE>10:<NEW_LINE>dictionary.getFlags().setFlag(EntityFlag.NO_AI, true);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>super.<MASK><NEW_LINE>}
translateToBedrock(session, dictionary, metadata);
1,126,258
protected void securityRealmGenerator(XmlGenerator gen, String name, RealmConfig c) {<NEW_LINE>gen.open("realm", "name", name);<NEW_LINE>if (c.isAuthenticationConfigured()) {<NEW_LINE>gen.open("authentication");<NEW_LINE>jaasAuthenticationGenerator(gen, c.getJaasAuthenticationConfig());<NEW_LINE>tlsAuthenticationGenerator(gen, c.getTlsAuthenticationConfig());<NEW_LINE>ldapAuthenticationGenerator(gen, c.getLdapAuthenticationConfig());<NEW_LINE>kerberosAuthenticationGenerator(gen, c.getKerberosAuthenticationConfig());<NEW_LINE>simpleAuthenticationGenerator(gen, c.getSimpleAuthenticationConfig());<NEW_LINE>gen.close();<NEW_LINE>}<NEW_LINE>if (c.isIdentityConfigured()) {<NEW_LINE>gen.open("identity");<NEW_LINE>CredentialsFactoryConfig cf = c.getCredentialsFactoryConfig();<NEW_LINE>if (cf != null) {<NEW_LINE>gen.open("credentials-factory", "class-name", cf.getClassName()).appendProperties(cf.getProperties()).close();<NEW_LINE>}<NEW_LINE>UsernamePasswordIdentityConfig upi = c.getUsernamePasswordIdentityConfig();<NEW_LINE>if (upi != null) {<NEW_LINE>gen.node("username-password", null, "username", upi.getUsername(), "password", getOrMaskValue(upi.getPassword()));<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (ti != null) {<NEW_LINE>gen.node("token", getOrMaskValue(ti.getTokenEncoded()), "encoding", ti.getEncoding().toString());<NEW_LINE>}<NEW_LINE>kerberosIdentityGenerator(gen, c.getKerberosIdentityConfig());<NEW_LINE>gen.close();<NEW_LINE>}<NEW_LINE>gen.close();<NEW_LINE>}
TokenIdentityConfig ti = c.getTokenIdentityConfig();
1,158,989
NavigableSet<E> createSubSet(SortedSet<E> sortedSet, E firstExclusive, E lastExclusive) {<NEW_LINE>NavigableSet<E> set = (NavigableSet<E>) sortedSet;<NEW_LINE>if (from == Bound.NO_BOUND && to == Bound.INCLUSIVE) {<NEW_LINE>return <MASK><NEW_LINE>} else if (from == Bound.EXCLUSIVE && to == Bound.NO_BOUND) {<NEW_LINE>return set.tailSet(firstExclusive, false);<NEW_LINE>} else if (from == Bound.EXCLUSIVE && to == Bound.EXCLUSIVE) {<NEW_LINE>return set.subSet(firstExclusive, false, lastExclusive, false);<NEW_LINE>} else if (from == Bound.EXCLUSIVE && to == Bound.INCLUSIVE) {<NEW_LINE>return set.subSet(firstExclusive, false, lastInclusive, true);<NEW_LINE>} else if (from == Bound.INCLUSIVE && to == Bound.INCLUSIVE) {<NEW_LINE>return set.subSet(firstInclusive, true, lastInclusive, true);<NEW_LINE>} else {<NEW_LINE>return (NavigableSet<E>) super.createSubSet(set, firstExclusive, lastExclusive);<NEW_LINE>}<NEW_LINE>}
set.headSet(lastInclusive, true);
109,059
public static void serializeFlowMod(JsonGenerator jGen, OFFlowMod flowMod) throws IOException, JsonProcessingException {<NEW_LINE>// IMHO this just looks nicer and is easier to read if everything is quoted<NEW_LINE>jGen.configure(Feature.WRITE_NUMBERS_AS_STRINGS, true);<NEW_LINE>jGen.writeStartObject();<NEW_LINE>// return the enum names<NEW_LINE>jGen.writeStringField("version", flowMod.getVersion().toString());<NEW_LINE>jGen.writeStringField("command", flowMod.getCommand().toString());<NEW_LINE>jGen.writeNumberField("cookie", flowMod.getCookie().getValue());<NEW_LINE>jGen.writeNumberField("priority", flowMod.getPriority());<NEW_LINE>jGen.writeNumberField("idleTimeoutSec", flowMod.getIdleTimeout());<NEW_LINE>jGen.writeNumberField("hardTimeoutSec", flowMod.getHardTimeout());<NEW_LINE>jGen.writeStringField("outPort", flowMod.getOutPort().toString());<NEW_LINE>switch(flowMod.getVersion()) {<NEW_LINE>case OF_10:<NEW_LINE>break;<NEW_LINE>case OF_11:<NEW_LINE>jGen.writeNumberField("flags", OFFlowModFlagsSerializerVer11.toWireValue<MASK><NEW_LINE>jGen.writeNumberField("cookieMask", flowMod.getCookieMask().getValue());<NEW_LINE>jGen.writeStringField("outGroup", flowMod.getOutGroup().toString());<NEW_LINE>jGen.writeStringField("tableId", flowMod.getTableId().toString());<NEW_LINE>break;<NEW_LINE>case OF_12:<NEW_LINE>jGen.writeNumberField("flags", OFFlowModFlagsSerializerVer12.toWireValue(flowMod.getFlags()));<NEW_LINE>jGen.writeNumberField("cookieMask", flowMod.getCookieMask().getValue());<NEW_LINE>jGen.writeStringField("outGroup", flowMod.getOutGroup().toString());<NEW_LINE>jGen.writeStringField("tableId", flowMod.getTableId().toString());<NEW_LINE>break;<NEW_LINE>case OF_13:<NEW_LINE>jGen.writeNumberField("flags", OFFlowModFlagsSerializerVer13.toWireValue(flowMod.getFlags()));<NEW_LINE>jGen.writeNumberField("cookieMask", flowMod.getCookieMask().getValue());<NEW_LINE>jGen.writeStringField("outGroup", flowMod.getOutGroup().toString());<NEW_LINE>break;<NEW_LINE>case OF_14:<NEW_LINE>jGen.writeNumberField("flags", OFFlowModFlagsSerializerVer14.toWireValue(flowMod.getFlags()));<NEW_LINE>jGen.writeNumberField("cookieMask", flowMod.getCookieMask().getValue());<NEW_LINE>jGen.writeStringField("outGroup", flowMod.getOutGroup().toString());<NEW_LINE>jGen.writeStringField("tableId", flowMod.getTableId().toString());<NEW_LINE>break;<NEW_LINE>case OF_15:<NEW_LINE>jGen.writeNumberField("flags", OFFlowModFlagsSerializerVer14.toWireValue(flowMod.getFlags()));<NEW_LINE>jGen.writeNumberField("cookieMask", flowMod.getCookieMask().getValue());<NEW_LINE>jGen.writeStringField("outGroup", flowMod.getOutGroup().toString());<NEW_LINE>jGen.writeStringField("tableId", flowMod.getTableId().toString());<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>logger.error("Unimplemented serializer for OFVersion {}", flowMod.getVersion());<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>MatchSerializer.serializeMatch(jGen, flowMod.getMatch());<NEW_LINE>// handle OF1.1+ instructions with actions within<NEW_LINE>if (flowMod.getVersion() == OFVersion.OF_10) {<NEW_LINE>jGen.writeObjectFieldStart("actions");<NEW_LINE>OFActionListSerializer.serializeActions(jGen, flowMod.getActions());<NEW_LINE>jGen.writeEndObject();<NEW_LINE>} else {<NEW_LINE>OFInstructionListSerializer.serializeInstructionList(jGen, flowMod.getInstructions());<NEW_LINE>}<NEW_LINE>// end not-empty instructions (else)<NEW_LINE>jGen.writeEndObject();<NEW_LINE>}
(flowMod.getFlags()));
499,870
private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String containerAppName, String name, 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 (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (containerAppName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (name == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, containerAppName, name, this.client.getApiVersion(), accept, context);<NEW_LINE>}
error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));
1,044,048
public void marshall(CaseDetails caseDetails, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (caseDetails == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(caseDetails.getCaseId(), CASEID_BINDING);<NEW_LINE>protocolMarshaller.marshall(caseDetails.getDisplayId(), DISPLAYID_BINDING);<NEW_LINE>protocolMarshaller.marshall(caseDetails.getSubject(), SUBJECT_BINDING);<NEW_LINE>protocolMarshaller.marshall(caseDetails.getStatus(), STATUS_BINDING);<NEW_LINE>protocolMarshaller.marshall(caseDetails.getServiceCode(), SERVICECODE_BINDING);<NEW_LINE>protocolMarshaller.marshall(caseDetails.getCategoryCode(), CATEGORYCODE_BINDING);<NEW_LINE>protocolMarshaller.marshall(caseDetails.getSeverityCode(), SEVERITYCODE_BINDING);<NEW_LINE>protocolMarshaller.marshall(caseDetails.getSubmittedBy(), SUBMITTEDBY_BINDING);<NEW_LINE>protocolMarshaller.marshall(caseDetails.getTimeCreated(), TIMECREATED_BINDING);<NEW_LINE>protocolMarshaller.marshall(caseDetails.getRecentCommunications(), RECENTCOMMUNICATIONS_BINDING);<NEW_LINE>protocolMarshaller.marshall(caseDetails.getCcEmailAddresses(), CCEMAILADDRESSES_BINDING);<NEW_LINE>protocolMarshaller.marshall(caseDetails.getLanguage(), LANGUAGE_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + <MASK><NEW_LINE>}<NEW_LINE>}
e.getMessage(), e);
496,996
private static Map<TypeAlias, jnr.ffi.NativeType> buildTypeMap() {<NEW_LINE>Map<TypeAlias, jnr.ffi.NativeType> m = new EnumMap<TypeAlias, NativeType>(TypeAlias.class);<NEW_LINE>m.put(TypeAlias.int8_t, NativeType.SCHAR);<NEW_LINE>m.put(TypeAlias.u_int8_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.int16_t, NativeType.SSHORT);<NEW_LINE>m.put(TypeAlias.u_int16_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.int32_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.u_int32_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.int64_t, NativeType.SLONGLONG);<NEW_LINE>m.put(TypeAlias.u_int64_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.intptr_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.uintptr_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.caddr_t, NativeType.ADDRESS);<NEW_LINE>m.put(TypeAlias.dev_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.blkcnt_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.blksize_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.gid_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.in_addr_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.in_port_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.ino_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.ino64_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.key_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.mode_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.nlink_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.id_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.pid_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.off_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.swblk_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.uid_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.clock_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.size_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.ssize_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.time_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.fsblkcnt_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.fsfilcnt_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.sa_family_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.socklen_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.rlim_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.cc_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.speed_t, NativeType.UINT);<NEW_LINE>m.put(<MASK><NEW_LINE>return m;<NEW_LINE>}
TypeAlias.tcflag_t, NativeType.UINT);
1,059,972
private CompletableFuture<CoreMessageReceiver> createLink() {<NEW_LINE>this.linkOpen = new WorkItem<>(new CompletableFuture<>(), this.operationTimeout);<NEW_LINE>this.scheduleLinkOpenTimeout(<MASK><NEW_LINE>this.sendTokenAndSetRenewTimer(false).handleAsync((v, sasTokenEx) -> {<NEW_LINE>if (sasTokenEx != null) {<NEW_LINE>Throwable cause = ExceptionUtil.extractAsyncCompletionCause(sasTokenEx);<NEW_LINE>TRACE_LOGGER.info("Sending SAS Token failed. ReceivePath:{}", this.receivePath, cause);<NEW_LINE>this.linkOpen.getWork().completeExceptionally(cause);<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>this.underlyingFactory.scheduleOnReactorThread(new DispatchHandler() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onEvent() {<NEW_LINE>CoreMessageReceiver.this.createReceiveLink();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (IOException ioException) {<NEW_LINE>this.cancelSASTokenRenewTimer();<NEW_LINE>this.linkOpen.getWork().completeExceptionally(new ServiceBusException(false, "Failed to create Receiver, see cause for more details.", ioException));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}, MessagingFactory.INTERNAL_THREAD_POOL);<NEW_LINE>return this.linkOpen.getWork();<NEW_LINE>}
this.linkOpen.getTimeoutTracker());
319,579
private void buildMemberTypes(AccessRestriction accessRestriction) {<NEW_LINE>SourceTypeBinding sourceType = this.referenceContext.binding;<NEW_LINE>ReferenceBinding[] memberTypeBindings = Binding.NO_MEMBER_TYPES;<NEW_LINE>if (this.referenceContext.memberTypes != null) {<NEW_LINE>int length = this.referenceContext.memberTypes.length;<NEW_LINE>memberTypeBindings = new ReferenceBinding[length];<NEW_LINE>int count = 0;<NEW_LINE>nextMember: for (int i = 0; i < length; i++) {<NEW_LINE>TypeDeclaration memberContext = this.referenceContext.memberTypes[i];<NEW_LINE>if (this.environment().isProcessingAnnotations && this.environment().isMissingType(memberContext.name)) {<NEW_LINE>// resolved a type ref before APT generated the type<NEW_LINE>throw new SourceTypeCollisionException();<NEW_LINE>}<NEW_LINE>switch(TypeDeclaration.kind(memberContext.modifiers)) {<NEW_LINE>case TypeDeclaration.INTERFACE_DECL:<NEW_LINE>case TypeDeclaration.ANNOTATION_TYPE_DECL:<NEW_LINE>if (// no need to check for enum, since implicitly static<NEW_LINE>sourceType.isNestedType() && sourceType.isClass() && !sourceType.isStatic()) {<NEW_LINE>problemReporter().illegalLocalTypeDeclaration(memberContext);<NEW_LINE>continue nextMember;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>ReferenceBinding type = sourceType;<NEW_LINE>// check that the member does not conflict with an enclosing type<NEW_LINE>do {<NEW_LINE>if (CharOperation.equals(type.sourceName, memberContext.name)) {<NEW_LINE><MASK><NEW_LINE>continue nextMember;<NEW_LINE>}<NEW_LINE>type = type.enclosingType();<NEW_LINE>} while (type != null);<NEW_LINE>// check that the member type does not conflict with another sibling member type<NEW_LINE>for (int j = 0; j < i; j++) {<NEW_LINE>if (CharOperation.equals(this.referenceContext.memberTypes[j].name, memberContext.name)) {<NEW_LINE>problemReporter().duplicateNestedType(memberContext);<NEW_LINE>continue nextMember;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// GROOVY edit<NEW_LINE>// ClassScope memberScope = new ClassScope(this, memberContext);<NEW_LINE>ClassScope memberScope = memberContext.newClassScope(this);<NEW_LINE>// GROOVY end<NEW_LINE>memberTypeBindings[count++] = memberScope.buildType(sourceType, sourceType.fPackage, accessRestriction);<NEW_LINE>}<NEW_LINE>if (count != length)<NEW_LINE>System.arraycopy(memberTypeBindings, 0, memberTypeBindings = new ReferenceBinding[count], 0, count);<NEW_LINE>}<NEW_LINE>sourceType.setMemberTypes(memberTypeBindings);<NEW_LINE>}
problemReporter().typeCollidesWithEnclosingType(memberContext);
366,797
public CacheCompiledConditionWithRouteToCache generateCacheCompileCondition(Expression condition, MatchingMetaInfoHolder storeMatchingMetaInfoHolder, SiddhiQueryContext siddhiQueryContext, List<VariableExpressionExecutor> storeVariableExpressionExecutors) {<NEW_LINE>boolean routeToCache = checkConditionToRouteToCache(condition, storeMatchingMetaInfoHolder);<NEW_LINE>MetaStateEvent metaStateEvent = new MetaStateEvent(storeMatchingMetaInfoHolder.getMetaStateEvent().getMetaStreamEvents().length);<NEW_LINE>for (MetaStreamEvent referenceMetaStreamEvent : storeMatchingMetaInfoHolder.getMetaStateEvent().getMetaStreamEvents()) {<NEW_LINE>metaStateEvent.addEvent(referenceMetaStreamEvent);<NEW_LINE>}<NEW_LINE>MatchingMetaInfoHolder matchingMetaInfoHolder = new MatchingMetaInfoHolder(metaStateEvent, storeMatchingMetaInfoHolder.getMatchingStreamEventIndex(), storeMatchingMetaInfoHolder.getStoreEventIndex(), storeMatchingMetaInfoHolder.getMatchingStreamDefinition(), this.tableDefinition, storeMatchingMetaInfoHolder.getCurrentState());<NEW_LINE>Map<String, Table> <MASK><NEW_LINE>tableMap.put(this.tableDefinition.getId(), this);<NEW_LINE>return new CacheCompiledConditionWithRouteToCache(compileCondition(condition, matchingMetaInfoHolder, storeVariableExpressionExecutors, tableMap, siddhiQueryContext, routeToCache), routeToCache);<NEW_LINE>}
tableMap = new ConcurrentHashMap<>();
642,397
public void validateCustomerVisibleNaming(IntermediateModel trimmedModel) {<NEW_LINE>Metadata metadata = trimmedModel.getMetadata();<NEW_LINE>validateCustomerVisibleName(<MASK><NEW_LINE>validateCustomerVisibleName(metadata.getSyncBuilderInterface(), "metadata-derived builder interface name");<NEW_LINE>validateCustomerVisibleName(metadata.getAsyncInterface(), "metadata-derived async interface name");<NEW_LINE>validateCustomerVisibleName(metadata.getAsyncBuilderInterface(), "metadata-derived async builder interface name");<NEW_LINE>validateCustomerVisibleName(metadata.getBaseBuilderInterface(), "metadata-derived builder interface name");<NEW_LINE>validateCustomerVisibleName(metadata.getBaseExceptionName(), "metadata-derived exception name");<NEW_LINE>validateCustomerVisibleName(metadata.getBaseRequestName(), "metadata-derived request name");<NEW_LINE>validateCustomerVisibleName(metadata.getBaseResponseName(), "metadata-derived response name");<NEW_LINE>trimmedModel.getOperations().values().forEach(operation -> {<NEW_LINE>validateCustomerVisibleName(operation.getOperationName(), "operations");<NEW_LINE>});<NEW_LINE>trimmedModel.getWaiters().forEach((name, waiter) -> {<NEW_LINE>validateCustomerVisibleName(name, "waiters");<NEW_LINE>});<NEW_LINE>trimmedModel.getShapes().values().forEach(shape -> {<NEW_LINE>String shapeName = shape.getShapeName();<NEW_LINE>validateCustomerVisibleName(shapeName, "shapes");<NEW_LINE>shape.getMembers().forEach(member -> {<NEW_LINE>validateCustomerVisibleName(member.getFluentGetterMethodName(), shapeName + " shape");<NEW_LINE>validateCustomerVisibleName(member.getFluentSetterMethodName(), shapeName + " shape");<NEW_LINE>validateCustomerVisibleName(member.getFluentEnumGetterMethodName(), shapeName + " shape");<NEW_LINE>validateCustomerVisibleName(member.getFluentEnumSetterMethodName(), shapeName + " shape");<NEW_LINE>validateCustomerVisibleName(member.getExistenceCheckMethodName(), shapeName + " shape");<NEW_LINE>validateCustomerVisibleName(member.getBeanStyleGetterMethodName(), shapeName + " shape");<NEW_LINE>validateCustomerVisibleName(member.getBeanStyleSetterMethodName(), shapeName + " shape");<NEW_LINE>validateCustomerVisibleName(member.getEnumType(), shapeName + " shape");<NEW_LINE>});<NEW_LINE>});<NEW_LINE>}
metadata.getSyncInterface(), "metadata-derived interface name");
518,542
public RemoveStatus remove(K key, V value) throws StoreAccessException {<NEW_LINE>checkKey(key);<NEW_LINE>checkValue(value);<NEW_LINE>conditionalRemoveObserver.begin();<NEW_LINE>AtomicReference<RemoveStatus> outcome = new AtomicReference<>(RemoveStatus.KEY_MISSING);<NEW_LINE>StoreEventSink<K, V> eventSink = storeEventDispatcher.eventSink();<NEW_LINE>try {<NEW_LINE>map.computeIfPresent(key, (mappedKey, mappedValue) -> {<NEW_LINE>long now = timeSource.getTimeMillis();<NEW_LINE>if (mappedValue.isExpired(now)) {<NEW_LINE>updateUsageInBytesIfRequired(-mappedValue.size());<NEW_LINE>fireOnExpirationEvent(mappedKey, mappedValue, eventSink);<NEW_LINE>return null;<NEW_LINE>} else if (value.equals(mappedValue.get())) {<NEW_LINE>updateUsageInBytesIfRequired(-mappedValue.size());<NEW_LINE><MASK><NEW_LINE>outcome.set(RemoveStatus.REMOVED);<NEW_LINE>return null;<NEW_LINE>} else {<NEW_LINE>outcome.set(RemoveStatus.KEY_PRESENT);<NEW_LINE>OnHeapValueHolder<V> holder = strategy.setAccessAndExpiryWhenCallerlUnderLock(key, mappedValue, now, eventSink);<NEW_LINE>if (holder == null) {<NEW_LINE>updateUsageInBytesIfRequired(-mappedValue.size());<NEW_LINE>}<NEW_LINE>return holder;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>storeEventDispatcher.releaseEventSink(eventSink);<NEW_LINE>RemoveStatus removeStatus = outcome.get();<NEW_LINE>switch(removeStatus) {<NEW_LINE>case REMOVED:<NEW_LINE>conditionalRemoveObserver.end(StoreOperationOutcomes.ConditionalRemoveOutcome.REMOVED);<NEW_LINE>break;<NEW_LINE>case KEY_MISSING:<NEW_LINE>case KEY_PRESENT:<NEW_LINE>conditionalRemoveObserver.end(StoreOperationOutcomes.ConditionalRemoveOutcome.MISS);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>}<NEW_LINE>return removeStatus;<NEW_LINE>} catch (RuntimeException re) {<NEW_LINE>storeEventDispatcher.releaseEventSinkAfterFailure(eventSink, re);<NEW_LINE>throw handleException(re);<NEW_LINE>}<NEW_LINE>}
eventSink.removed(mappedKey, mappedValue);
1,108,094
// Test the getRunningTaskCount method<NEW_LINE>@Test<NEW_LINE>public void testGetRunningTaskCount() throws Exception {<NEW_LINE>PolicyExecutor executor = provider.create("testgetRunningTaskCount").maxConcurrency(2);<NEW_LINE>CountDownLatch beginLatch1 = new CountDownLatch(1);<NEW_LINE>CountDownLatch continueLatch1 = new CountDownLatch(1);<NEW_LINE>CountDownLatch beginLatch2 = new CountDownLatch(1);<NEW_LINE>CountDownLatch continueLatch2 = new CountDownLatch(1);<NEW_LINE>// no tasks running<NEW_LINE>assertEquals(0, executor.getRunningTaskCount());<NEW_LINE>CountDownTask task1 = new CountDownTask(beginLatch1, continueLatch1, TimeUnit.HOURS.toNanos(1));<NEW_LINE>// task1 will begin running and block on continueLatch1<NEW_LINE>Future<Boolean> future1 = executor.submit(task1);<NEW_LINE>assertTrue(beginLatch1.await(TIMEOUT_NS, TimeUnit.NANOSECONDS));<NEW_LINE>// task1 is running<NEW_LINE>assertEquals(1, executor.getRunningTaskCount());<NEW_LINE>CountDownTask task2 = new CountDownTask(beginLatch2, continueLatch2, TimeUnit.HOURS.toNanos(1));<NEW_LINE>// task2 will begin running and block on continueLatch2<NEW_LINE>Future<Boolean> future2 = executor.submit(task2);<NEW_LINE>assertTrue(beginLatch2.await(TIMEOUT_NS, TimeUnit.NANOSECONDS));<NEW_LINE>// task1 and task2 are running<NEW_LINE>assertEquals(2, executor.getRunningTaskCount());<NEW_LINE>// allow task1 to complete<NEW_LINE>continueLatch1.countDown();<NEW_LINE>assertTrue(future1.get(TIMEOUT_NS, TimeUnit.NANOSECONDS));<NEW_LINE>for (long start = System.nanoTime(); executor.getRunningTaskCount() != 1 && System.nanoTime() - start < TIMEOUT_NS; Thread.sleep(200)) ;<NEW_LINE>// task2 is running<NEW_LINE>assertEquals(<MASK><NEW_LINE>executor.shutdown();<NEW_LINE>// task2 is running<NEW_LINE>assertEquals(1, executor.getRunningTaskCount());<NEW_LINE>// allow task2 to complete<NEW_LINE>continueLatch2.countDown();<NEW_LINE>assertTrue(future2.get(TIMEOUT_NS, TimeUnit.NANOSECONDS));<NEW_LINE>for (long start = System.nanoTime(); executor.getRunningTaskCount() != 0 && System.nanoTime() - start < TIMEOUT_NS; Thread.sleep(200)) ;<NEW_LINE>// no tasks running<NEW_LINE>assertEquals(0, executor.getRunningTaskCount());<NEW_LINE>}
1, executor.getRunningTaskCount());
1,643,396
public void exitAas_application(Aas_applicationContext ctx) {<NEW_LINE>if (ctx.junos_application() != null) {<NEW_LINE>JunosApplication application = toJunosApplication(ctx.junos_application());<NEW_LINE>if (!application.hasDefinition()) {<NEW_LINE>_w.redFlag(String.format("unimplemented pre-defined junos application: '%s'", ctx.junos_application().getText()));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>_currentApplicationSet.setMembers(ImmutableList.<ApplicationSetMemberReference>builder().addAll(_currentApplicationSet.getMembers()).add(new JunosApplicationReference(<MASK><NEW_LINE>} else {<NEW_LINE>String name = toString(ctx.name);<NEW_LINE>int line = getLine(ctx.name.getStart());<NEW_LINE>_currentApplicationSet.setMembers(ImmutableList.<ApplicationSetMemberReference>builder().addAll(_currentApplicationSet.getMembers()).add(new ApplicationOrApplicationSetReference(name)).build());<NEW_LINE>// only mark the structure as referenced if we know it's not a pre-defined application<NEW_LINE>_configuration.referenceStructure(APPLICATION_OR_APPLICATION_SET, name, APPLICATION_SET_MEMBER_APPLICATION, line);<NEW_LINE>}<NEW_LINE>}
application)).build());
510,714
private void processRxChar(int chr) {<NEW_LINE>// process incoming data<NEW_LINE>log.finer(this.toString() + " RX: '" + String.format("%02X : %1c", (byte) chr, chr < 32 ? '.' : chr) + "'");<NEW_LINE>switch(chr) {<NEW_LINE>// ignore special characters<NEW_LINE>case 32:<NEW_LINE>break;<NEW_LINE>// trigger message handling for new request<NEW_LINE>case '>':<NEW_LINE>message += (char) chr;<NEW_LINE>// trigger message handling<NEW_LINE>case 10:<NEW_LINE>case 13:<NEW_LINE>try {<NEW_LINE>if (messageHandler != null && !message.isEmpty()) {<NEW_LINE>messageHandler.handleTelegram(message.toCharArray());<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>log.log(<MASK><NEW_LINE>}<NEW_LINE>message = "";<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>message += (char) chr;<NEW_LINE>}<NEW_LINE>}
Level.WARNING, "handleTelegram", ex);
1,036,427
protected Long countCompletedWork(Business business, DateRange dateRange, String applicationId, String processId, String unit, String person) throws Exception {<NEW_LINE>EntityManager em = business.entityManagerContainer().get(WorkCompleted.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Long> cq = cb.createQuery(Long.class);<NEW_LINE>Root<WorkCompleted> root = cq.from(WorkCompleted.class);<NEW_LINE>Predicate p = cb.between(root.get(WorkCompleted_.completedTime), dateRange.getStart(), dateRange.getEnd());<NEW_LINE>if (!StringUtils.equals(applicationId, StandardJaxrsAction.EMPTY_SYMBOL)) {<NEW_LINE>p = cb.and(p, cb.equal(root.get(WorkCompleted_.application), applicationId));<NEW_LINE>}<NEW_LINE>if (!StringUtils.equals(processId, StandardJaxrsAction.EMPTY_SYMBOL)) {<NEW_LINE>p = cb.and(p, cb.equal(root.get(WorkCompleted_.process), processId));<NEW_LINE>}<NEW_LINE>if (!StringUtils.equals(unit, StandardJaxrsAction.EMPTY_SYMBOL)) {<NEW_LINE>List<String> units = new ArrayList<>();<NEW_LINE>units.add(unit);<NEW_LINE>units.addAll(business.organization().unit().listWithUnitSubNested(unit));<NEW_LINE>p = cb.and(p, root.get(WorkCompleted_.creatorUnit).in(units));<NEW_LINE>}<NEW_LINE>if (!StringUtils.equals(person, StandardJaxrsAction.EMPTY_SYMBOL)) {<NEW_LINE>p = cb.and(p, cb.equal(root.get(<MASK><NEW_LINE>}<NEW_LINE>cq.select(cb.count(root)).where(p);<NEW_LINE>return em.createQuery(cq).getSingleResult();<NEW_LINE>}
WorkCompleted_.creatorPerson), person));
1,041,942
public void itemStateChanged(ItemEvent e) {<NEW_LINE>// If selected: disable buttons, set their bg values from default setting, set sample bg & fg<NEW_LINE>// If deselected: enable buttons, set their bg values from current setting, set sample bg & bg<NEW_LINE>Color newBackground = null;<NEW_LINE>Color newForeground = null;<NEW_LINE>Font newFont = null;<NEW_LINE>if (e.getStateChange() == ItemEvent.SELECTED) {<NEW_LINE>backgroundButtons<MASK><NEW_LINE>foregroundButtons[position].setEnabled(false);<NEW_LINE>fontButtons[position].setEnabled(false);<NEW_LINE>newBackground = Globals.getSettings().getDefaultColorSettingByPosition(backgroundSettingPositions[position]);<NEW_LINE>newForeground = Globals.getSettings().getDefaultColorSettingByPosition(foregroundSettingPositions[position]);<NEW_LINE>newFont = Globals.getSettings().getDefaultFontByPosition(fontSettingPositions[position]);<NEW_LINE>currentNondefaultBackground[position] = backgroundButtons[position].getBackground();<NEW_LINE>currentNondefaultForeground[position] = foregroundButtons[position].getBackground();<NEW_LINE>currentNondefaultFont[position] = samples[position].getFont();<NEW_LINE>} else {<NEW_LINE>backgroundButtons[position].setEnabled(true);<NEW_LINE>foregroundButtons[position].setEnabled(true);<NEW_LINE>fontButtons[position].setEnabled(true);<NEW_LINE>newBackground = currentNondefaultBackground[position];<NEW_LINE>newForeground = currentNondefaultForeground[position];<NEW_LINE>newFont = currentNondefaultFont[position];<NEW_LINE>}<NEW_LINE>backgroundButtons[position].setBackground(newBackground);<NEW_LINE>foregroundButtons[position].setBackground(newForeground);<NEW_LINE>// fontButtons[position].setFont(newFont);<NEW_LINE>samples[position].setBackground(newBackground);<NEW_LINE>samples[position].setForeground(newForeground);<NEW_LINE>samples[position].setFont(newFont);<NEW_LINE>}
[position].setEnabled(false);
574,559
static Variants allowedVariants(@Nullable GoReferenceExpression structFieldReference) {<NEW_LINE>GoValue value = parent(structFieldReference, GoValue.class);<NEW_LINE>GoElement element = parent(value, GoElement.class);<NEW_LINE>if (element != null && element.getKey() != null) {<NEW_LINE>return Variants.NONE;<NEW_LINE>}<NEW_LINE>GoType type = GoPsiImplUtil.getLiteralType(element, true);<NEW_LINE>if (!(type instanceof GoStructType)) {<NEW_LINE>return Variants.NONE;<NEW_LINE>}<NEW_LINE>boolean hasValueInitializers = false;<NEW_LINE>boolean hasFieldValueInitializers = false;<NEW_LINE>GoLiteralValue literalValue = parent(element, GoLiteralValue.class);<NEW_LINE>List<GoElement> fieldInitializers = literalValue != null ? literalValue.getElementList() : Collections.emptyList();<NEW_LINE>for (GoElement initializer : fieldInitializers) {<NEW_LINE>if (initializer == element) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>PsiElement colon = initializer.getColon();<NEW_LINE>hasFieldValueInitializers |= colon != null;<NEW_LINE>hasValueInitializers |= colon == null;<NEW_LINE>}<NEW_LINE>return hasFieldValueInitializers && !hasValueInitializers ? Variants.FIELD_NAME_ONLY : !hasFieldValueInitializers && hasValueInitializers <MASK><NEW_LINE>}
? Variants.VALUE_ONLY : Variants.BOTH;
1,816,232
public void exectute() {<NEW_LINE>try {<NEW_LINE>// create a temporary file for the resource editory PDF<NEW_LINE>File f = File.createTempFile("CodenameOneDesigner", ".pdf");<NEW_LINE>FileOutputStream out = new FileOutputStream(f);<NEW_LINE>InputStream input = getClass().getResourceAsStream("/CodenameOne-Designer.pdf");<NEW_LINE>byte[] buffer = new byte[65536];<NEW_LINE>int size = input.read(buffer);<NEW_LINE>while (size > -1) {<NEW_LINE>out.write(buffer, 0, size);<NEW_LINE>size = input.read(buffer);<NEW_LINE>}<NEW_LINE>out.close();<NEW_LINE>f.deleteOnExit();<NEW_LINE>try {<NEW_LINE>Desktop.getDesktop().open(f);<NEW_LINE>} catch (Throwable err) {<NEW_LINE>// desktop class isn't available in Java 5...<NEW_LINE>JOptionPane.showMessageDialog(mainPanel, <MASK><NEW_LINE>}<NEW_LINE>} catch (IOException ex) {<NEW_LINE>JOptionPane.showMessageDialog(mainPanel, "Error creating help file: \n" + ex, "IO Error", JOptionPane.ERROR_MESSAGE);<NEW_LINE>}<NEW_LINE>}
"Help is only available with a Java 6 or newer VM\nit requires Acrobat reader", "Help", JOptionPane.ERROR_MESSAGE);
1,167,445
public void deleteOrphanedPacks() {<NEW_LINE><MASK><NEW_LINE>String query = "SELECT " + PACK_ID + " FROM " + TABLE_NAME + " WHERE " + INSTALLED + " = ? AND " + PACK_ID + " NOT IN (" + "SELECT DISTINCT " + AttachmentDatabase.STICKER_PACK_ID + " FROM " + AttachmentDatabase.TABLE_NAME + " " + "WHERE " + AttachmentDatabase.STICKER_PACK_ID + " NOT NULL" + ")";<NEW_LINE>String[] args = new String[] { "0" };<NEW_LINE>db.beginTransaction();<NEW_LINE>try {<NEW_LINE>boolean performedDelete = false;<NEW_LINE>try (Cursor cursor = db.rawQuery(query, args)) {<NEW_LINE>while (cursor != null && cursor.moveToNext()) {<NEW_LINE>String packId = cursor.getString(cursor.getColumnIndexOrThrow(PACK_ID));<NEW_LINE>if (!BlessedPacks.contains(packId)) {<NEW_LINE>deletePack(db, packId);<NEW_LINE>performedDelete = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>db.setTransactionSuccessful();<NEW_LINE>if (performedDelete) {<NEW_LINE>notifyStickerPackListeners();<NEW_LINE>notifyStickerListeners();<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>db.endTransaction();<NEW_LINE>}<NEW_LINE>}
SQLiteDatabase db = databaseHelper.getSignalWritableDatabase();
1,226,712
public void beforeActionInvocation(Method actionMethod) {<NEW_LINE>// when using await, this code get called multiple times.<NEW_LINE>// When recovering from await() we're going to restore (overwrite) validation.current<NEW_LINE>// with the object-instance from the previous part of the execution.<NEW_LINE>// If this is happening it is no point in doing anything here, since<NEW_LINE>// we overwrite it later on.<NEW_LINE>if (isAwakingFromAwait()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Validation.current.set(restore());<NEW_LINE>boolean verify = false;<NEW_LINE>for (Annotation[] annotations : actionMethod.getParameterAnnotations()) {<NEW_LINE>if (annotations.length > 0) {<NEW_LINE>verify = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!verify) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<ConstraintViolation> violations = new Validator().validateAction(actionMethod);<NEW_LINE>ArrayList<Error> errors = new ArrayList<>();<NEW_LINE>String[] paramNames = Java.parameterNames(actionMethod);<NEW_LINE>for (ConstraintViolation violation : violations) {<NEW_LINE>errors.add(new Error(paramNames[((MethodParameterContext) violation.getContext()).getParameterIndex()], violation.getMessage(), violation.getMessageVariables() == null ? new String[0] : violation.getMessageVariables().values().toArray(new String[0])<MASK><NEW_LINE>}<NEW_LINE>Validation.current.get().errors.addAll(errors);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new UnexpectedException(e);<NEW_LINE>}<NEW_LINE>}
, violation.getSeverity()));
65,165
public XContentBuilder innerXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>if (sliceId != null) {<NEW_LINE>builder.field(SLICE_ID_FIELD, sliceId);<NEW_LINE>}<NEW_LINE>builder.field(TOTAL_FIELD, total);<NEW_LINE>if (params.paramAsBoolean(INCLUDE_UPDATED, true)) {<NEW_LINE>builder.field(UPDATED_FIELD, updated);<NEW_LINE>}<NEW_LINE>if (params.paramAsBoolean(INCLUDE_CREATED, true)) {<NEW_LINE>builder.field(CREATED_FIELD, created);<NEW_LINE>}<NEW_LINE>builder.field(DELETED_FIELD, deleted);<NEW_LINE>builder.field(BATCHES_FIELD, batches);<NEW_LINE>builder.field(VERSION_CONFLICTS_FIELD, versionConflicts);<NEW_LINE>builder.field(NOOPS_FIELD, noops);<NEW_LINE>builder.startObject(RETRIES_FIELD);<NEW_LINE>{<NEW_LINE>builder.field(RETRIES_BULK_FIELD, bulkRetries);<NEW_LINE>builder.field(RETRIES_SEARCH_FIELD, searchRetries);<NEW_LINE>}<NEW_LINE>builder.endObject();<NEW_LINE>builder.humanReadableField(THROTTLED_RAW_FIELD, THROTTLED_HR_FIELD, throttled);<NEW_LINE>builder.field(REQUESTS_PER_SEC_FIELD, requestsPerSecond == Float.POSITIVE_INFINITY ? -1 : requestsPerSecond);<NEW_LINE>if (reasonCancelled != null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>builder.humanReadableField(THROTTLED_UNTIL_RAW_FIELD, THROTTLED_UNTIL_HR_FIELD, throttledUntil);<NEW_LINE>if (false == sliceStatuses.isEmpty()) {<NEW_LINE>builder.startArray(SLICES_FIELD);<NEW_LINE>for (StatusOrException slice : sliceStatuses) {<NEW_LINE>if (slice == null) {<NEW_LINE>builder.nullValue();<NEW_LINE>} else {<NEW_LINE>slice.toXContent(builder, params);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>builder.endArray();<NEW_LINE>}<NEW_LINE>return builder;<NEW_LINE>}
builder.field(CANCELED_FIELD, reasonCancelled);
911,922
public static DescribeChannelUsersResponse unmarshall(DescribeChannelUsersResponse describeChannelUsersResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeChannelUsersResponse.setRequestId(_ctx.stringValue("DescribeChannelUsersResponse.RequestId"));<NEW_LINE>describeChannelUsersResponse.setCommTotalNum(_ctx.integerValue("DescribeChannelUsersResponse.CommTotalNum"));<NEW_LINE>describeChannelUsersResponse.setIsChannelExist(_ctx.booleanValue("DescribeChannelUsersResponse.IsChannelExist"));<NEW_LINE>describeChannelUsersResponse.setLiveUserNum(_ctx.integerValue("DescribeChannelUsersResponse.LiveUserNum"));<NEW_LINE>describeChannelUsersResponse.setTimestamp(_ctx.integerValue("DescribeChannelUsersResponse.Timestamp"));<NEW_LINE>describeChannelUsersResponse.setChannelProfile<MASK><NEW_LINE>describeChannelUsersResponse.setInteractiveUserNum(_ctx.integerValue("DescribeChannelUsersResponse.InteractiveUserNum"));<NEW_LINE>List<String> userList = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeChannelUsersResponse.UserList.Length"); i++) {<NEW_LINE>userList.add(_ctx.stringValue("DescribeChannelUsersResponse.UserList[" + i + "]"));<NEW_LINE>}<NEW_LINE>describeChannelUsersResponse.setUserList(userList);<NEW_LINE>List<String> interactiveUserList = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeChannelUsersResponse.InteractiveUserList.Length"); i++) {<NEW_LINE>interactiveUserList.add(_ctx.stringValue("DescribeChannelUsersResponse.InteractiveUserList[" + i + "]"));<NEW_LINE>}<NEW_LINE>describeChannelUsersResponse.setInteractiveUserList(interactiveUserList);<NEW_LINE>List<String> liveUserList = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeChannelUsersResponse.LiveUserList.Length"); i++) {<NEW_LINE>liveUserList.add(_ctx.stringValue("DescribeChannelUsersResponse.LiveUserList[" + i + "]"));<NEW_LINE>}<NEW_LINE>describeChannelUsersResponse.setLiveUserList(liveUserList);<NEW_LINE>return describeChannelUsersResponse;<NEW_LINE>}
(_ctx.integerValue("DescribeChannelUsersResponse.ChannelProfile"));
1,322,276
public JsonStructure forward(MediaContent content) {<NEW_LINE>Media media = content.media;<NEW_LINE>JsonObjectBuilder mediaJson = json.createObjectBuilder();<NEW_LINE>mediaJson.add(FULL_FIELD_NAME_BITRATE, media.bitrate);<NEW_LINE>if (media.copyright == null) {<NEW_LINE>mediaJson.add(FULL_FIELD_NAME_COPYRIGHT, JsonValue.NULL);<NEW_LINE>} else {<NEW_LINE>mediaJson.add(FULL_FIELD_NAME_COPYRIGHT, media.copyright);<NEW_LINE>}<NEW_LINE>mediaJson.add(FULL_FIELD_NAME_DURATION, media.duration);<NEW_LINE>mediaJson.add(FULL_FIELD_NAME_FORMAT, media.format);<NEW_LINE>mediaJson.add(FULL_FIELD_NAME_HEIGHT, media.height);<NEW_LINE>JsonArrayBuilder personsJson = json.createArrayBuilder();<NEW_LINE>for (String person : media.persons) {<NEW_LINE>personsJson.add(person);<NEW_LINE>}<NEW_LINE>mediaJson.add(FULL_FIELD_NAME_PERSONS, personsJson);<NEW_LINE>mediaJson.add(FULL_FIELD_NAME_PLAYER, media.player.name());<NEW_LINE>mediaJson.add(FULL_FIELD_NAME_SIZE, media.size);<NEW_LINE>mediaJson.add(FULL_FIELD_NAME_TITLE, media.title);<NEW_LINE>mediaJson.add(FULL_FIELD_NAME_URI, media.uri);<NEW_LINE>mediaJson.add(FULL_FIELD_NAME_WIDTH, media.width);<NEW_LINE>JsonArrayBuilder imagesJson = json.createArrayBuilder();<NEW_LINE>for (Image image : content.images) {<NEW_LINE>JsonObjectBuilder imageJson = json.createObjectBuilder();<NEW_LINE>imageJson.add(FULL_FIELD_NAME_TITLE, image.title);<NEW_LINE>imageJson.add(FULL_FIELD_NAME_URI, image.uri);<NEW_LINE>imageJson.add(FULL_FIELD_NAME_HEIGHT, image.height);<NEW_LINE>imageJson.add(FULL_FIELD_NAME_WIDTH, image.width);<NEW_LINE>imageJson.add(FULL_FIELD_NAME_SIZE, image.size.name());<NEW_LINE>imagesJson.add(imageJson);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>contentJson.add(FULL_FIELD_NAME_MEDIA, mediaJson);<NEW_LINE>contentJson.add(FULL_FIELD_NAME_IMAGES, imagesJson);<NEW_LINE>return contentJson.build();<NEW_LINE>}
JsonObjectBuilder contentJson = json.createObjectBuilder();
1,722,098
private // Save history state (sometimes we don'ty need it)<NEW_LINE>boolean // Save history state (sometimes we don'ty need it)<NEW_LINE>runDataPump(// Save history state (sometimes we don'ty need it)<NEW_LINE>@NotNull final DBSDataContainer dataContainer, // Save history state (sometimes we don'ty need it)<NEW_LINE>@Nullable final DBDDataFilter dataFilter, // Save history state (sometimes we don'ty need it)<NEW_LINE>final int offset, // Save history state (sometimes we don'ty need it)<NEW_LINE>final int maxRows, // Save history state (sometimes we don'ty need it)<NEW_LINE>final int focusRow, // Scroll operation<NEW_LINE>final boolean saveHistory, // Refresh. Nothing was changed but refresh from server or scroll happened<NEW_LINE>final boolean scroll, final boolean refresh, @Nullable final Runnable finalizer) {<NEW_LINE>if (viewerPanel.isDisposed()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>DBCExecutionContext executionContext = getExecutionContext();<NEW_LINE>if (executionContext == null || dataContainer.getDataSource() != executionContext.getDataSource()) {<NEW_LINE>// This may happen during cross-database entity navigation<NEW_LINE>executionContext = DBUtils.getDefaultContext(dataContainer, false);<NEW_LINE>}<NEW_LINE>if (executionContext == null) {<NEW_LINE>UIUtils.showMessageBox(viewerPanel.getShell(), <MASK><NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Cancel any refresh jobs<NEW_LINE>autoRefreshControl.cancelRefresh();<NEW_LINE>// Read data<NEW_LINE>final DBDDataFilter useDataFilter = dataFilter != null ? dataFilter : (dataContainer == getDataContainer() ? model.getDataFilter() : null);<NEW_LINE>Composite progressControl = viewerPanel;<NEW_LINE>if (activePresentation.getControl() instanceof Composite) {<NEW_LINE>progressControl = (Composite) activePresentation.getControl();<NEW_LINE>}<NEW_LINE>ResultSetJobDataRead dataPumpJob = new ResultSetDataPumpJob(dataContainer, useDataFilter, executionContext, progressControl, focusRow, saveHistory, scroll, dataFilter, finalizer);<NEW_LINE>dataPumpJob.setOffset(offset);<NEW_LINE>dataPumpJob.setMaxRows(maxRows);<NEW_LINE>dataPumpJob.setRefresh(refresh);<NEW_LINE>queueDataPump(dataPumpJob);<NEW_LINE>return true;<NEW_LINE>}
"Data read", "Can't read data - no active connection", SWT.ICON_WARNING);
1,355,938
private void init() {<NEW_LINE>setLayout(new BorderLayout(0, 5));<NEW_LINE>setBorder(makeBorder());<NEW_LINE>// $NON-NLS-1$<NEW_LINE>clearEachIteration = new JCheckBox(JMeterUtils.getResString("clear_cache_per_iter"), false);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>controlledByThreadGroup = new JCheckBox(JMeterUtils.getResString("cache_clear_controlled_by_threadgroup"), false);<NEW_LINE>controlledByThreadGroup.setActionCommand(CONTROLLED_BY_THREADGROUP);<NEW_LINE>controlledByThreadGroup.addActionListener(this);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>useExpires = new JCheckBox(JMeterUtils.getResString("use_expires"), false);<NEW_LINE>JPanel northPanel = new JPanel();<NEW_LINE>northPanel.setLayout(new VerticalLayout(5, VerticalLayout.BOTH));<NEW_LINE><MASK><NEW_LINE>northPanel.add(clearEachIteration);<NEW_LINE>northPanel.add(controlledByThreadGroup);<NEW_LINE>northPanel.add(useExpires);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>JLabel label = new JLabel(JMeterUtils.getResString("cache_manager_size"));<NEW_LINE>maxCacheSize = new JTextField(20);<NEW_LINE>maxCacheSize.setName(CacheManager.MAX_SIZE);<NEW_LINE>label.setLabelFor(maxCacheSize);<NEW_LINE>JPanel maxCacheSizePanel = new JPanel(new BorderLayout(5, 0));<NEW_LINE>maxCacheSizePanel.add(label, BorderLayout.WEST);<NEW_LINE>maxCacheSizePanel.add(maxCacheSize, BorderLayout.CENTER);<NEW_LINE>northPanel.add(maxCacheSizePanel);<NEW_LINE>add(northPanel, BorderLayout.NORTH);<NEW_LINE>}
northPanel.add(makeTitlePanel());
919,078
void refreshUI(UserPreferences prefs) {<NEW_LINE>IPreferenceStore store = propertyPage.getPreferenceStore();<NEW_LINE>scariestRankCombo.setText(MarkerSeverity.get(store.getString(FindBugsConstants.RANK_SCARIEST_MARKER_SEVERITY)).name());<NEW_LINE>scaryRankCombo.setText(MarkerSeverity.get(store.getString(FindBugsConstants.RANK_SCARY_MARKER_SEVERITY)).name());<NEW_LINE>troublingRankCombo.setText(MarkerSeverity.get(store.getString(FindBugsConstants.RANK_TROUBLING_MARKER_SEVERITY)).name());<NEW_LINE>ofConcernRankCombo.setText(MarkerSeverity.get(store.getString(FindBugsConstants.RANK_OFCONCERN_MARKER_SEVERITY)).name());<NEW_LINE>ProjectFilterSettings filterSettings = prefs.getFilterSettings();<NEW_LINE>minRankSlider.setSelection(filterSettings.getMinRank());<NEW_LINE>updateRankValueLabel();<NEW_LINE>minPriorityCombo.<MASK><NEW_LINE>for (Button checkBox : chkEnableBugCategoryList) {<NEW_LINE>checkBox.setSelection(filterSettings.containsCategory((String) checkBox.getData()));<NEW_LINE>}<NEW_LINE>syncSelectedCategories();<NEW_LINE>}
setText(filterSettings.getMinPriority());
257,855
public boolean processCommandLineArgs(String[] cliArgs) throws IOException, DatabusException {<NEW_LINE>CommandLineParser cliParser = new GnuParser();<NEW_LINE>_cmd = null;<NEW_LINE>try {<NEW_LINE>_cmd = cliParser.parse(_cliOptions, cliArgs);<NEW_LINE>} catch (ParseException pe) {<NEW_LINE>System.err.println(NAME + ": failed to parse command-line options: " + pe.toString());<NEW_LINE>printCliHelp();<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (_cmd.hasOption(HELP_OPT_CHAR)) {<NEW_LINE>printCliHelp();<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (!_cmd.hasOption(SCHEMA_REGISTRY_LOCATION_OPT_CHAR)) {<NEW_LINE>System.err.println("Please specify the schema registry location");<NEW_LINE>return false;<NEW_LINE>} else {<NEW_LINE>_schemaRegistryLocation = _cmd.getOptionValue(SCHEMA_REGISTRY_LOCATION_OPT_CHAR);<NEW_LINE>File f = new File(_schemaRegistryLocation);<NEW_LINE>if (!f.isDirectory()) {<NEW_LINE>System.err.println("Schema Registry (" + _schemaRegistryLocation + ") is not a valid directory !! Please specify one");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!_cmd.hasOption(OUTPUT_DIRECTORY_OPT_CHAR)) {<NEW_LINE>System.err.println("Please specify the output directory");<NEW_LINE>return false;<NEW_LINE>} else {<NEW_LINE>_outputDirectory = _cmd.getOptionValue(OUTPUT_DIRECTORY_LONG_STR);<NEW_LINE>File f = new File(_outputDirectory);<NEW_LINE>if (!f.isDirectory()) {<NEW_LINE>System.err.println("Output Directory (" + _outputDirectory + ") is not a valid directory !! Please specify one");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!_cmd.hasOption(SCHEMA_NAME_OPT_CHAR)) {<NEW_LINE>System.out.println("Please specify the Schema name !!");<NEW_LINE>return false;<NEW_LINE>} else {<NEW_LINE>_schemaName = _cmd.getOptionValue(SCHEMA_NAME_OPT_CHAR);<NEW_LINE>}<NEW_LINE>if (!_cmd.hasOption(DB_URI_OPT_CHAR)) {<NEW_LINE><MASK><NEW_LINE>return false;<NEW_LINE>} else {<NEW_LINE>_dbUri = _cmd.getOptionValue(DB_URI_OPT_CHAR);<NEW_LINE>}<NEW_LINE>if (!_cmd.hasOption(SRC_NAMES_OPT_CHAR)) {<NEW_LINE>System.err.println("Please specify comma seperated list of source names");<NEW_LINE>return false;<NEW_LINE>} else {<NEW_LINE>_srcNames = Arrays.asList(_cmd.getOptionValue(SRC_NAMES_LONG_STR).split(","));<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
System.err.println("Plase specify the DB URI !!");
1,057,128
protected Mono<Predicate> createReactiveJoinFilter(QueryMetadata metadata) {<NEW_LINE>MultiValueMap<Expression<?>, Mono<Predicate>> predicates = new LinkedMultiValueMap<>();<NEW_LINE>List<JoinExpression> joins = metadata.getJoins();<NEW_LINE>for (int i = joins.size() - 1; i >= 0; i--) {<NEW_LINE>JoinExpression join = joins.get(i);<NEW_LINE>Path<?> source = (Path) ((Operation<?>) join.getTarget()).getArg(0);<NEW_LINE>Path<?> target = (Path) ((Operation<?>) join.getTarget()).getArg(1);<NEW_LINE>Collection<Mono<Predicate>> extraFilters = predicates.<MASK><NEW_LINE>Mono<Predicate> filter = allOf(extraFilters).map(it -> ExpressionUtils.allOf(join.getCondition(), it)).switchIfEmpty(Mono.justOrEmpty(join.getCondition()));<NEW_LINE>//<NEW_LINE>Mono<Predicate> //<NEW_LINE>predicate = //<NEW_LINE>getIds(target.getType(), filter).collectList().handle((it, sink) -> {<NEW_LINE>if (it.isEmpty()) {<NEW_LINE>sink.error(new NoMatchException(source));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Path<?> path = ExpressionUtils.path(String.class, source, "$id");<NEW_LINE>sink.next(ExpressionUtils.in((Path<Object>) path, it));<NEW_LINE>});<NEW_LINE>predicates.add(source.getRoot(), predicate);<NEW_LINE>}<NEW_LINE>Path<?> source = (Path) ((Operation) joins.get(0).getTarget()).getArg(0);<NEW_LINE>return allOf(predicates.get(source.getRoot())).onErrorResume(NoMatchException.class, e -> Mono.just(ExpressionUtils.predicate(MongodbOps.NO_MATCH, e.source)));<NEW_LINE>}
get(target.getRoot());
1,051,591
private int drainOneByOne(Consumer<E> c, int limit) {<NEW_LINE>final long[] sBuffer = sequenceBuffer;<NEW_LINE>final long mask = this.mask;<NEW_LINE>final E[] buffer = this.buffer;<NEW_LINE>long cIndex;<NEW_LINE>long seqOffset;<NEW_LINE>long seq;<NEW_LINE>long expectedSeq;<NEW_LINE>for (int i = 0; i < limit; i++) {<NEW_LINE>do {<NEW_LINE>cIndex = lvConsumerIndex();<NEW_LINE>seqOffset = calcCircularLongElementOffset(cIndex, mask);<NEW_LINE>seq = lvLongElement(sBuffer, seqOffset);<NEW_LINE>expectedSeq = cIndex + 1;<NEW_LINE>if (seq < expectedSeq) {<NEW_LINE>return i;<NEW_LINE>}<NEW_LINE>} while (// another consumer beat us to it<NEW_LINE>// failed the CAS<NEW_LINE>seq > expectedSeq || !casConsumerIndex(cIndex, cIndex + 1));<NEW_LINE>final long offset = calcCircularRefElementOffset(cIndex, mask);<NEW_LINE>final E e = lpRefElement(buffer, offset);<NEW_LINE>spRefElement(buffer, offset, null);<NEW_LINE>soLongElement(sBuffer, <MASK><NEW_LINE>c.accept(e);<NEW_LINE>}<NEW_LINE>return limit;<NEW_LINE>}
seqOffset, cIndex + mask + 1);
300,320
private void configureImport() {<NEW_LINE>// Add an event type that has a byte-type property value<NEW_LINE>compileDeploy("create schema MyByteEvent(byteValue byte)");<NEW_LINE>// keep the last few events from the variant stream<NEW_LINE>EPStatement stmt = compileDeploy("select RuntimeConfigMain.check2BitSet(byteValue) as check2BitSet from MyByteEvent#lastevent");<NEW_LINE>// send an event<NEW_LINE>Map<String, Object> eventData = new HashMap<String, Object>();<NEW_LINE>eventData.put("byteValue", (byte) 2);<NEW_LINE>runtime.getEventService().sendEventMap(eventData, "MyByteEvent");<NEW_LINE>// print results<NEW_LINE>System.out.println("\nConfigure Import:");<NEW_LINE>System.out.println("Received:" + " check2BitSet=" + stmt.iterator().next().get("check2BitSet"));<NEW_LINE>// send a second event<NEW_LINE>eventData = new HashMap<String, Object>();<NEW_LINE>eventData.put("byteValue", (byte) 1);<NEW_LINE>runtime.getEventService().sendEventMap(eventData, "MyByteEvent");<NEW_LINE>// print results<NEW_LINE>System.out.println("Received:" + " check2BitSet=" + stmt.iterator().next<MASK><NEW_LINE>}
().get("check2BitSet"));
160,577
public Object visit(ASTReference node, Object data) {<NEW_LINE><MASK><NEW_LINE>if (variableName.startsWith("$")) {<NEW_LINE>variableName = variableName.substring(1, variableName.length());<NEW_LINE>}<NEW_LINE>if (!foreachStack.isEmpty()) {<NEW_LINE>Foreach currentForeach = foreachStack.peek();<NEW_LINE>if (currentForeach.getItem() == null) {<NEW_LINE>currentForeach.setItem(variableName);<NEW_LINE>} else if (currentForeach.getSequence() == null) {<NEW_LINE>currentForeach.setSequence(variableName);<NEW_LINE>} else {<NEW_LINE>String firstToken = variableName;<NEW_LINE>int index = firstToken.indexOf('.');<NEW_LINE>if (index != -1) {<NEW_LINE>firstToken = firstToken.substring(0, index);<NEW_LINE>}<NEW_LINE>if (firstToken.equals(currentForeach.getItem())) {<NEW_LINE>String field = "";<NEW_LINE>if (index != -1) {<NEW_LINE>field = variableName.substring(index, variableName.length());<NEW_LINE>}<NEW_LINE>extractor.addFieldName(currentForeach.getSequence() + field, true);<NEW_LINE>} else {<NEW_LINE>extractor.addFieldName(variableName, false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>extractor.addFieldName(variableName, false);<NEW_LINE>}<NEW_LINE>return super.visit(node, data);<NEW_LINE>}
String variableName = node.literal();
1,308,137
boolean expectCanAssignTo(Node n, JSType rightType, JSType leftType, String msg) {<NEW_LINE>if (leftType.isTemplateType()) {<NEW_LINE>TemplateType left = leftType.toMaybeTemplateType();<NEW_LINE>if (rightType.containsReferenceAncestor(left) || rightType.isUnknownType() || left.isUnknownType()) {<NEW_LINE>// The only time we can assign to a variable with a template type is if the value assigned<NEW_LINE>// has a type that explicitly has it as a supertype.<NEW_LINE>// Otherwise, the template type is existential and it is unknown whether or not it is a<NEW_LINE>// proper super type.<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>registerMismatchAndReport(n, TYPE_MISMATCH_WARNING, msg, rightType, leftType, new HashSet<>(), new HashSet<>());<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!rightType.isSubtypeOf(leftType)) {<NEW_LINE>mismatch(<MASK><NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
n, msg, rightType, leftType);
1,560,826
private int glassModifiers(KeyCombination kcc) {<NEW_LINE>int ret = 0;<NEW_LINE>if (kcc.getShift() == KeyCombination.ModifierValue.DOWN) {<NEW_LINE>ret += KeyEvent.MODIFIER_SHIFT;<NEW_LINE>}<NEW_LINE>if (kcc.getControl() == KeyCombination.ModifierValue.DOWN) {<NEW_LINE>ret += KeyEvent.MODIFIER_CONTROL;<NEW_LINE>}<NEW_LINE>if (kcc.getAlt() == KeyCombination.ModifierValue.DOWN) {<NEW_LINE>ret += KeyEvent.MODIFIER_ALT;<NEW_LINE>}<NEW_LINE>if (kcc.getShortcut() == KeyCombination.ModifierValue.DOWN) {<NEW_LINE>if (PlatformUtil.isLinux()) {<NEW_LINE>ret += KeyEvent.MODIFIER_CONTROL;<NEW_LINE>} else if (PlatformUtil.isMac()) {<NEW_LINE>ret += KeyEvent.MODIFIER_COMMAND;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (kcc.getMeta() == KeyCombination.ModifierValue.DOWN) {<NEW_LINE>if (PlatformUtil.isLinux()) {<NEW_LINE>// RT-19326 - Linux shortcut support<NEW_LINE>ret += KeyEvent.MODIFIER_WINDOWS;<NEW_LINE>} else if (PlatformUtil.isMac()) {<NEW_LINE>ret += KeyEvent.MODIFIER_COMMAND;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (kcc instanceof KeyCodeCombination) {<NEW_LINE>KeyCode kcode = ((KeyCodeCombination) kcc).getCode();<NEW_LINE><MASK><NEW_LINE>if (((code >= KeyCode.F1.getCode()) && (code <= KeyCode.F12.getCode())) || ((code >= KeyCode.F13.getCode()) && (code <= KeyCode.F24.getCode()))) {<NEW_LINE>ret += KeyEvent.MODIFIER_FUNCTION;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return (ret);<NEW_LINE>}
int code = kcode.getCode();
972,906
public int unwind(int pathIndex, int nextIndex) {<NEW_LINE>int pathDepth = nextIndex - 1;<NEW_LINE>double nextFractionOne = getScale(pathDepth);<NEW_LINE>double fractionOne = fractionOnes(pathIndex);<NEW_LINE>double fractionZero = fractionZeros(pathIndex);<NEW_LINE>if (fractionOne != 0) {<NEW_LINE>double stepUp = fractionZero / (double) (pathDepth + 1);<NEW_LINE>double stepDown = fractionOne / (double) nextIndex;<NEW_LINE>double countUp = 0.0;<NEW_LINE>double countDown = nextIndex * stepDown;<NEW_LINE>for (int i = pathDepth; i >= 0; --i, countUp += stepUp, countDown -= stepDown) {<NEW_LINE>double tmp = nextFractionOne / countDown;<NEW_LINE>nextFractionOne = <MASK><NEW_LINE>setScale(i, tmp);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>double stepDown = (fractionZero + DBL_EPSILON) / (double) (pathDepth + 1);<NEW_LINE>double countDown = pathDepth * stepDown;<NEW_LINE>for (int i = 0; i <= pathDepth; ++i, countDown -= stepDown) {<NEW_LINE>setScale(i, getScale(i) / countDown);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int i = pathIndex; i < pathDepth; ++i) {<NEW_LINE>PathElement element = getElement(i + 1);<NEW_LINE>setValues(i, element.fractionOnes, element.fractionZeros, element.featureIndex);<NEW_LINE>}<NEW_LINE>return nextIndex - 1;<NEW_LINE>}
getScale(i) - tmp * countUp;
9,481
public PredefinedLoadMetricSpecification unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>PredefinedLoadMetricSpecification predefinedLoadMetricSpecification = new PredefinedLoadMetricSpecification();<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 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("PredefinedLoadMetricType", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>predefinedLoadMetricSpecification.setPredefinedLoadMetricType(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("ResourceLabel", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>predefinedLoadMetricSpecification.setResourceLabel(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 predefinedLoadMetricSpecification;<NEW_LINE>}
class).unmarshall(context));
637,234
protected void onViewClick(View view, final LogLine data) {<NEW_LINE>super.onViewClick(view, data);<NEW_LINE>data.setExpanded(!data.isExpanded());<NEW_LINE>if (data.isExpanded() && data.getProcessId() != -1) {<NEW_LINE>mLogText.setSingleLine(false);<NEW_LINE>mTime.setVisibility(View.VISIBLE);<NEW_LINE>mPid.setVisibility(View.VISIBLE);<NEW_LINE>view.setBackgroundColor(Color.BLACK);<NEW_LINE>mLogText.setTextColor(TagColorUtil.getTextColor(getContext(), data.getLogLevel(), true));<NEW_LINE>mTag.setTextColor(TagColorUtil.getTextColor(getContext(), data.getLogLevel(), true));<NEW_LINE>} else {<NEW_LINE>mLogText.setSingleLine(true);<NEW_LINE><MASK><NEW_LINE>mPid.setVisibility(View.GONE);<NEW_LINE>view.setBackgroundColor(Color.WHITE);<NEW_LINE>mLogText.setTextColor(TagColorUtil.getTextColor(getContext(), data.getLogLevel(), false));<NEW_LINE>mTag.setTextColor(TagColorUtil.getTextColor(getContext(), data.getLogLevel(), false));<NEW_LINE>}<NEW_LINE>itemView.setOnLongClickListener(new View.OnLongClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean onLongClick(View v) {<NEW_LINE>ClipData clipData = ClipData.newPlainText("Label", data.getOriginalLine());<NEW_LINE>mClipboard.setPrimaryClip(clipData);<NEW_LINE>ToastUtils.showShort("copy success");<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
mTime.setVisibility(View.GONE);
1,192,916
private static byte[] encode(long l, int sign) {<NEW_LINE>assert l >= 0;<NEW_LINE>// the header is formed of:<NEW_LINE>// - 1 bit for the sign<NEW_LINE>// - 4 bits for the number of additional bytes<NEW_LINE>// - up to 3 bits of the value<NEW_LINE>// additional bytes are data bytes<NEW_LINE>int numBits = 64 - Long.numberOfLeadingZeros(l);<NEW_LINE>int numAdditionalBytes = (numBits + 7 - 3) / 8;<NEW_LINE>byte[] encoded = new byte[1 + numAdditionalBytes];<NEW_LINE>// write data bytes<NEW_LINE>int i = encoded.length;<NEW_LINE>while (numBits > 0) {<NEW_LINE>int index = --i;<NEW_LINE>// byte 0 can't encode more than 3 bits<NEW_LINE>assert index > 0 || numBits <= 3;<NEW_LINE>encoded[index] = (byte) l;<NEW_LINE>l >>>= 8;<NEW_LINE>numBits -= 8;<NEW_LINE>}<NEW_LINE>assert Byte.toUnsignedInt<MASK><NEW_LINE>assert encoded.length == 1 || encoded[0] != 0 || Byte.toUnsignedInt(encoded[1]) > 0x07;<NEW_LINE>if (sign == 0) {<NEW_LINE>// reverse the order<NEW_LINE>for (int j = 0; j < encoded.length; ++j) {<NEW_LINE>encoded[j] = (byte) ~Byte.toUnsignedInt(encoded[j]);<NEW_LINE>}<NEW_LINE>// the first byte only uses 3 bits, we need the 5 upper bits for the header<NEW_LINE>encoded[0] &= 0x07;<NEW_LINE>}<NEW_LINE>// write the header<NEW_LINE>encoded[0] |= sign << 7;<NEW_LINE>if (sign > 0) {<NEW_LINE>encoded[0] |= numAdditionalBytes << 3;<NEW_LINE>} else {<NEW_LINE>encoded[0] |= (15 - numAdditionalBytes) << 3;<NEW_LINE>}<NEW_LINE>return encoded;<NEW_LINE>}
(encoded[0]) <= 0x07;
1,164,049
public void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {<NEW_LINE>if (in.readableBytes() < 8) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ByteBuf copy = in.slice();<NEW_LINE>int index = copy.readUnsignedByte();<NEW_LINE>int file = copy.readUnsignedShort();<NEW_LINE>// decompress() starts reading here<NEW_LINE><MASK><NEW_LINE>int compressedFileSize = copy.readInt();<NEW_LINE>assert compression == CompressionType.NONE || compression == CompressionType.BZ2 || compression == CompressionType.GZ;<NEW_LINE>int size = // 1 byte compresion type, 4 byte compressed size<NEW_LINE>compressedFileSize + // compression has leading 4 byte decompressed length<NEW_LINE>5 + (compression != CompressionType.NONE ? 4 : 0);<NEW_LINE>assert size > 0;<NEW_LINE>int breaks = calculateBreaks(size);<NEW_LINE>// 3 for index/file<NEW_LINE>if (size + 3 + breaks > in.readableBytes()) {<NEW_LINE>logger.trace("Index {} archive {}: Not enough data yet {} > {}", index, file, size + 3 + breaks, in.readableBytes());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ByteBuf compressedData = Unpooled.buffer(size);<NEW_LINE>int totalRead = 3;<NEW_LINE>// skip index/file<NEW_LINE>in.skipBytes(3);<NEW_LINE>for (int i = 0; i < breaks + 1; ++i) {<NEW_LINE>int bytesInBlock = CHUNK_SIZE - (totalRead % CHUNK_SIZE);<NEW_LINE>int bytesToRead = Math.min(bytesInBlock, size - compressedData.writerIndex());<NEW_LINE>logger.trace("{}/{}: reading block {}/{}, read so far this block: {}, file status: {}/{}", index, file, (totalRead % CHUNK_SIZE), CHUNK_SIZE, bytesInBlock, compressedData.writerIndex(), size);<NEW_LINE>ByteBuf chunk = in.readBytes(bytesToRead);<NEW_LINE>compressedData.writeBytes(chunk);<NEW_LINE>chunk.release();<NEW_LINE>totalRead += bytesToRead;<NEW_LINE>if (i < breaks) {<NEW_LINE>assert compressedData.writerIndex() < size;<NEW_LINE>int b = in.readUnsignedByte();<NEW_LINE>++totalRead;<NEW_LINE>assert b == 0xff;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>assert compressedData.writerIndex() == size;<NEW_LINE>logger.trace("{}/{}: done downloading file, remaining buffer {}", index, file, in.readableBytes());<NEW_LINE>ArchiveResponsePacket archiveResponse = new ArchiveResponsePacket();<NEW_LINE>archiveResponse.setIndex(index);<NEW_LINE>archiveResponse.setArchive(file);<NEW_LINE>archiveResponse.setData(compressedData.array());<NEW_LINE>out.add(archiveResponse);<NEW_LINE>compressedData.release();<NEW_LINE>}
int compression = copy.readUnsignedByte();
297,464
public HeatMap readHeatMap(final MetricsCondition condition, final String valueColumnName, final Duration duration) throws IOException {<NEW_LINE>final List<PointOfTime> pointOfTimes = duration.assembleDurationPoints();<NEW_LINE>final List<String> ids = new ArrayList<>(pointOfTimes.size());<NEW_LINE>pointOfTimes.forEach(pointOfTime -> ids.add(pointOfTime.id(condition.getEntity().buildId())));<NEW_LINE>final WhereQueryImpl<SelectQueryImpl> query = select().column(ID_COLUMN).column(valueColumnName).from(client.getDatabase(), condition.getName()).where(contains(ID_COLUMN, Joiner.on("|").join(ids)));<NEW_LINE>final QueryResult.Series series = client.queryForSingleSeries(query);<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("SQL: {} result set: {}", query.getCommand(), series);<NEW_LINE>}<NEW_LINE>final int defaultValue = ValueColumnMetadata.INSTANCE.getDefaultValue(condition.getName());<NEW_LINE>final HeatMap heatMap = new HeatMap();<NEW_LINE>if (series != null) {<NEW_LINE>for (List<Object> values : series.getValues()) {<NEW_LINE>heatMap.buildColumn(values.get(1).toString(), values.get(2<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>heatMap.fixMissingColumns(ids, defaultValue);<NEW_LINE>return heatMap;<NEW_LINE>}
).toString(), defaultValue);
989,021
public boolean start() {<NEW_LINE>Set<MeterRegistry> meterRegistrySet = Metrics.globalRegistry.getRegistries().stream().filter(reporter -> reporter instanceof PrometheusMeterRegistry).collect(Collectors.toSet());<NEW_LINE>PrometheusMeterRegistry prometheusMeterRegistry;<NEW_LINE>if (meterRegistrySet.size() == 0) {<NEW_LINE>prometheusMeterRegistry <MASK><NEW_LINE>Metrics.addRegistry(prometheusMeterRegistry);<NEW_LINE>} else {<NEW_LINE>prometheusMeterRegistry = (PrometheusMeterRegistry) meterRegistrySet.toArray()[0];<NEW_LINE>}<NEW_LINE>httpServer = HttpServer.create().idleTimeout(Duration.ofMillis(30_000L)).option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 2000).port(Integer.parseInt(metricConfig.getPrometheusExporterPort())).route(routes -> routes.get("/metrics", (request, response) -> response.sendString(Mono.just(prometheusMeterRegistry.scrape())))).bindNow();<NEW_LINE>LOGGER.info("http server for metrics started, listen on {}", metricConfig.getPrometheusExporterPort());<NEW_LINE>return true;<NEW_LINE>}
= new PrometheusMeterRegistry(PrometheusConfig.DEFAULT);
585,382
private void writeImageBorder(DataOutputStream output, Border border) throws IOException {<NEW_LINE>// Write the number of images can be 2, 3, 8 or 9<NEW_LINE>Image[] images = Accessor.getImages(border);<NEW_LINE>int resourceCount = 0;<NEW_LINE>for (int iter = 0; iter < images.length; iter++) {<NEW_LINE>if (images[iter] != null && findId(images[iter], true) != null) {<NEW_LINE>resourceCount++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (resourceCount != 2 && resourceCount != 3 && resourceCount != 8 && resourceCount != 9) {<NEW_LINE>System.<MASK><NEW_LINE>resourceCount = 2;<NEW_LINE>}<NEW_LINE>output.writeByte(resourceCount);<NEW_LINE>switch(resourceCount) {<NEW_LINE>case 2:<NEW_LINE>output.writeUTF(findId(images[0], true));<NEW_LINE>output.writeUTF(findId(images[4], true));<NEW_LINE>break;<NEW_LINE>case 3:<NEW_LINE>output.writeUTF(findId(images[0], true));<NEW_LINE>output.writeUTF(findId(images[4], true));<NEW_LINE>output.writeUTF(findId(images[8], true));<NEW_LINE>break;<NEW_LINE>case 8:<NEW_LINE>for (int iter = 0; iter < 8; iter++) {<NEW_LINE>output.writeUTF(findId(images[iter], true));<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case 9:<NEW_LINE>for (int iter = 0; iter < 9; iter++) {<NEW_LINE>output.writeUTF(findId(images[iter], true));<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}
out.println("Odd resource count for image border: " + resourceCount);
445,092
private static void registerAlloyRecipe(Pair<Things, NNList<Things>> alloy) {<NEW_LINE>final Things result = NullHelper.notnull(alloy.getLeft(), "missing result item stack in alloy recipe");<NEW_LINE>final NNList<Things> input = alloy.getRight();<NEW_LINE>FluidStack fluidResult = getFluidForItems(result);<NEW_LINE>if (fluidResult == null) {<NEW_LINE>tryBasinAloying(result, input);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Set<String> used = new HashSet<>();<NEW_LINE>used.add(fluidResult.getFluid().getName());<NEW_LINE>FluidStack[] fluids = new FluidStack[input.size()];<NEW_LINE>List<String> debug = new ArrayList<>();<NEW_LINE>for (int i = 0; i < input.size(); i++) {<NEW_LINE>if ((fluids[i] = getFluidForItems(NullHelper.notnull(input.get(i), "missing input item stack in alloy recipe"))) == null || used.contains(fluids[i].getFluid().getName())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>used.add(fluids[i].getFluid().getName());<NEW_LINE>debug.add(toString(fluids[i]));<NEW_LINE>}<NEW_LINE>gcd(fluidResult, fluids);<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>} catch (TinkerAPIException e) {<NEW_LINE>throw new RuntimeException("Error while registering alloy recipe '" + debug + " => " + toString(fluidResult) + "' with Tinkers", e);<NEW_LINE>}<NEW_LINE>Log.debug("Tinkers.registerAlloy: " + toString(fluidResult) + ", " + debug);<NEW_LINE>}
TinkerRegistry.registerAlloy(fluidResult, fluids);
1,132,095
private static Map<String, List<CardInfo>> generateBasicLands(List<String> setsToUse) {<NEW_LINE>Set<String> landSets = TournamentUtil.getLandSetCodeForDeckSets(setsToUse);<NEW_LINE>CardCriteria criteria = new CardCriteria();<NEW_LINE>if (!landSets.isEmpty()) {<NEW_LINE>criteria.setCodes(landSets.toArray(new String[landSets.size()]));<NEW_LINE>}<NEW_LINE>criteria.ignoreSetsWithSnowLands();<NEW_LINE>Map<String, List<CardInfo>> basicLandMap = new HashMap<>();<NEW_LINE>for (ColoredManaSymbol c : ColoredManaSymbol.values()) {<NEW_LINE>String landName = DeckGeneratorPool.<MASK><NEW_LINE>criteria.rarities(Rarity.LAND).name(landName);<NEW_LINE>List<CardInfo> cards = CardRepository.instance.findCards(criteria);<NEW_LINE>if (cards.isEmpty()) {<NEW_LINE>// Workaround to get basic lands if lands are not available for the given sets<NEW_LINE>criteria.setCodes("M15");<NEW_LINE>cards = CardRepository.instance.findCards(criteria);<NEW_LINE>}<NEW_LINE>basicLandMap.put(landName, cards);<NEW_LINE>}<NEW_LINE>return basicLandMap;<NEW_LINE>}
getBasicLandName(c.toString());
338,156
protected boolean addOneUnaryRule(UnaryRule rule, Map<String, TransducerGraph> graphs) {<NEW_LINE>String parentString = stateIndex.get(rule.parent);<NEW_LINE>String childString = stateIndex.get(rule.child);<NEW_LINE>if (isSyntheticState(parentString)) {<NEW_LINE>String topcat = getTopCategoryOfSyntheticState(parentString);<NEW_LINE>TransducerGraph graph = getGraphFromMap(graphs, topcat);<NEW_LINE>Double output = Double.valueOf(smartNegate(rule.score()));<NEW_LINE>graph.addArc(graph.getStartNode(), parentString, childString, output);<NEW_LINE>return true;<NEW_LINE>} else if (isSyntheticState(childString)) {<NEW_LINE>// need to add Arc from synthetic state to endState<NEW_LINE>TransducerGraph <MASK><NEW_LINE>Double output = Double.valueOf(smartNegate(rule.score()));<NEW_LINE>// parentString should the the same as endState<NEW_LINE>graph.addArc(childString, parentString, END, output);<NEW_LINE>graph.setEndNode(parentString);<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
graph = getGraphFromMap(graphs, parentString);
1,390,855
// @see com.biglybt.ui.swt.views.table.TableViewSWTMenuFillListener#fillMenu(java.lang.String, org.eclipse.swt.widgets.Menu)<NEW_LINE>@Override<NEW_LINE>public void fillMenu(String sColumnName, final Menu menu) {<NEW_LINE>Object[] dataSources = tv.getSelectedDataSources(true);<NEW_LINE>DownloadManager[] selecteddms = getSelectedDownloads();<NEW_LINE>if (selecteddms.length == 0 && dataSources.length > 0) {<NEW_LINE>Map<DownloadManager, List<DiskManagerFileInfo>> map = new IdentityHashMap<>();<NEW_LINE>List<DownloadManager> dms = new ArrayList<>();<NEW_LINE>for (Object ds : dataSources) {<NEW_LINE>if (ds instanceof DiskManagerFileInfo) {<NEW_LINE>DiskManagerFileInfo info = (DiskManagerFileInfo) ds;<NEW_LINE>DownloadManager dm = info.getDownloadManager();<NEW_LINE>List<DiskManagerFileInfo> list = map.get(dm);<NEW_LINE>if (list == null) {<NEW_LINE>list = new ArrayList<>(dm.getDiskManagerFileInfoSet().nbFiles());<NEW_LINE>map.put(dm, list);<NEW_LINE>dms.add(dm);<NEW_LINE>}<NEW_LINE>list.add(info);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>DownloadManager[] manager_list = dms.toArray(new DownloadManager[dms.size()]);<NEW_LINE>DiskManagerFileInfo[][] files_list = new DiskManagerFileInfo[manager_list.length][];<NEW_LINE>for (int i = 0; i < manager_list.length; i++) {<NEW_LINE>List<DiskManagerFileInfo> list = map.get(manager_list[i]);<NEW_LINE>files_list[i] = list.toArray(new DiskManagerFileInfo[list.size()]);<NEW_LINE>}<NEW_LINE>if (files_list.length > 0) {<NEW_LINE>FilesViewMenuUtil.fillMenu(tv, sColumnName, menu, manager_list, files_list, null, false, false);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>boolean hasSelection = (selecteddms.length > 0);<NEW_LINE>if (hasSelection) {<NEW_LINE>boolean isSeedingView = Download.class.equals(forDataSourceType) || DownloadTypeComplete.class.equals(forDataSourceType);<NEW_LINE>TorrentUtil.fillTorrentMenu(menu, selecteddms, core, true, (isSeedingView) ? 2 : 1, tv);<NEW_LINE>// ---<NEW_LINE>new <MASK><NEW_LINE>}<NEW_LINE>}
MenuItem(menu, SWT.SEPARATOR);
648,772
public boolean closeCurrentProject() {<NEW_LINE>if (controller.getCurrentProject() != null) {<NEW_LINE>// Save ?<NEW_LINE>String messageBundle = NbBundle.getMessage(ProjectControllerUIImpl.class, "CloseProject_confirm_message");<NEW_LINE>String titleBundle = NbBundle.getMessage(ProjectControllerUIImpl.class, "CloseProject_confirm_title");<NEW_LINE>String saveBundle = NbBundle.getMessage(ProjectControllerUIImpl.class, "CloseProject_confirm_save");<NEW_LINE>String doNotSaveBundle = NbBundle.<MASK><NEW_LINE>String cancelBundle = NbBundle.getMessage(ProjectControllerUIImpl.class, "CloseProject_confirm_cancel");<NEW_LINE>NotifyDescriptor msg = new NotifyDescriptor(messageBundle, titleBundle, NotifyDescriptor.YES_NO_CANCEL_OPTION, NotifyDescriptor.INFORMATION_MESSAGE, new Object[] { saveBundle, doNotSaveBundle, cancelBundle }, saveBundle);<NEW_LINE>Object result = DialogDisplayer.getDefault().notify(msg);<NEW_LINE>if (result == saveBundle) {<NEW_LINE>saveProject();<NEW_LINE>} else if (result == cancelBundle) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>controller.closeCurrentProject();<NEW_LINE>// Actions<NEW_LINE>saveProject = false;<NEW_LINE>saveAsProject = false;<NEW_LINE>projectProperties = false;<NEW_LINE>closeProject = false;<NEW_LINE>newWorkspace = false;<NEW_LINE>deleteWorkspace = false;<NEW_LINE>duplicateWorkspace = false;<NEW_LINE>renameWorkspace = false;<NEW_LINE>// Title bar<NEW_LINE>SwingUtilities.invokeLater(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>JFrame frame = (JFrame) WindowManager.getDefault().getMainWindow();<NEW_LINE>String title = frame.getTitle();<NEW_LINE>title = title.substring(0, title.indexOf(" - "));<NEW_LINE>frame.setTitle(title);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
getMessage(ProjectControllerUIImpl.class, "CloseProject_confirm_doNotSave");
907,754
/* }}} String getHost */<NEW_LINE>private void connect() /* {{{ */<NEW_LINE>{<NEW_LINE>JMXServiceURL service_url;<NEW_LINE>Map<String, Object> environment;<NEW_LINE>// already connected<NEW_LINE>if (this._jmx_connector != null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>environment = null;<NEW_LINE>if (this._password != null) {<NEW_LINE>String[] credentials;<NEW_LINE>if (this._username == null)<NEW_LINE>this._username = new String("monitorRole");<NEW_LINE>credentials = new String[] { this._username, this._password };<NEW_LINE>environment = new HashMap<String, Object>();<NEW_LINE>environment.put(JMXConnector.CREDENTIALS, credentials);<NEW_LINE>environment.put(JMXConnectorFactory.PROTOCOL_PROVIDER_CLASS_LOADER, this.getClass().getClassLoader());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>service_url <MASK><NEW_LINE>this._jmx_connector = JMXConnectorFactory.connect(service_url, environment);<NEW_LINE>this._mbean_connection = _jmx_connector.getMBeanServerConnection();<NEW_LINE>} catch (Exception e) {<NEW_LINE>Collectd.logError("GenericJMXConfConnection: " + "Creating MBean server connection failed: " + e);<NEW_LINE>disconnect();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}
= new JMXServiceURL(this._service_url);
536,297
public boolean checkIfItemOutdated(IndexItem item, java.text.DateFormat format) {<NEW_LINE>boolean outdated = false;<NEW_LINE><MASK><NEW_LINE>String indexActivatedDate = indexActivatedFileNames.get(sfName);<NEW_LINE>String indexFilesDate = indexFileNames.get(sfName);<NEW_LINE>item.setDownloaded(false);<NEW_LINE>item.setOutdated(false);<NEW_LINE>if (indexActivatedDate == null && indexFilesDate == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>item.setDownloaded(true);<NEW_LINE>String date = item.getDate(format);<NEW_LINE>boolean parsed = false;<NEW_LINE>if (indexActivatedDate != null) {<NEW_LINE>try {<NEW_LINE>item.setLocalTimestamp(format.parse(indexActivatedDate).getTime());<NEW_LINE>parsed = true;<NEW_LINE>} catch (ParseException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!parsed && indexFilesDate != null) {<NEW_LINE>try {<NEW_LINE>item.setLocalTimestamp(format.parse(indexFilesDate).getTime());<NEW_LINE>parsed = true;<NEW_LINE>} catch (ParseException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (date != null && !date.equals(indexActivatedDate) && !date.equals(indexFilesDate)) {<NEW_LINE>long oldItemSize = 0;<NEW_LINE>long itemSize = item.getContentSize();<NEW_LINE>if ((item.getType() == DownloadActivityType.NORMAL_FILE && !item.extra) || item.getType() == DownloadActivityType.ROADS_FILE || item.getType() == DownloadActivityType.WIKIPEDIA_FILE || item.getType() == DownloadActivityType.DEPTH_CONTOUR_FILE || item.getType() == DownloadActivityType.SRTM_COUNTRY_FILE) {<NEW_LINE>outdated = true;<NEW_LINE>} else if (item.getType() == DownloadActivityType.WIKIVOYAGE_FILE || item.getType() == DownloadActivityType.TRAVEL_FILE) {<NEW_LINE>oldItemSize = app.getAppPath(IndexConstants.WIKIVOYAGE_INDEX_DIR + item.getTargetFileName()).length();<NEW_LINE>if (itemSize != oldItemSize) {<NEW_LINE>outdated = true;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (parsed && item.getTimestamp() > item.getLocalTimestamp()) {<NEW_LINE>outdated = true;<NEW_LINE>} else if (item.getType() == DownloadActivityType.VOICE_FILE) {<NEW_LINE>if (item instanceof AssetIndexItem) {<NEW_LINE>File file = new File(((AssetIndexItem) item).getDestFile());<NEW_LINE>oldItemSize = file.length();<NEW_LINE>}<NEW_LINE>} else if (item.getType() == DownloadActivityType.FONT_FILE) {<NEW_LINE>oldItemSize = new File(app.getAppPath(IndexConstants.FONT_INDEX_DIR), item.getTargetFileName()).length();<NEW_LINE>} else {<NEW_LINE>oldItemSize = app.getAppPath(item.getTargetFileName()).length();<NEW_LINE>}<NEW_LINE>if (!parsed && itemSize != oldItemSize) {<NEW_LINE>outdated = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (outdated) {<NEW_LINE>logItemUpdateInfo(item, format, itemSize, oldItemSize);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>item.setOutdated(outdated);<NEW_LINE>return outdated;<NEW_LINE>}
String sfName = item.getTargetFileName();
1,690,533
public void visitEnd() {<NEW_LINE>super.visitEnd();<NEW_LINE>if (visibleParamAnnotations != null) {<NEW_LINE>VisibilityParameterAnnotationTag tag = new VisibilityParameterAnnotationTag(visibleParamAnnotations.length, AnnotationConstants.RUNTIME_VISIBLE);<NEW_LINE>for (VisibilityAnnotationTag vat : visibleParamAnnotations) {<NEW_LINE>tag.addVisibilityAnnotation(vat);<NEW_LINE>}<NEW_LINE>method.addTag(tag);<NEW_LINE>}<NEW_LINE>if (invisibleParamAnnotations != null) {<NEW_LINE>VisibilityParameterAnnotationTag tag = new VisibilityParameterAnnotationTag(invisibleParamAnnotations.length, AnnotationConstants.RUNTIME_INVISIBLE);<NEW_LINE>for (VisibilityAnnotationTag vat : invisibleParamAnnotations) {<NEW_LINE>tag.addVisibilityAnnotation(vat);<NEW_LINE>}<NEW_LINE>method.addTag(tag);<NEW_LINE>}<NEW_LINE>if (visibleLocalVarAnnotations != null) {<NEW_LINE>VisibilityLocalVariableAnnotationTag tag = new VisibilityLocalVariableAnnotationTag(visibleLocalVarAnnotations.size(), AnnotationConstants.RUNTIME_VISIBLE);<NEW_LINE>for (VisibilityAnnotationTag vat : visibleLocalVarAnnotations) {<NEW_LINE>tag.addVisibilityAnnotation(vat);<NEW_LINE>}<NEW_LINE>method.addTag(tag);<NEW_LINE>}<NEW_LINE>if (invisibleLocalVarAnnotations != null) {<NEW_LINE>VisibilityLocalVariableAnnotationTag tag = new VisibilityLocalVariableAnnotationTag(invisibleLocalVarAnnotations.<MASK><NEW_LINE>for (VisibilityAnnotationTag vat : invisibleLocalVarAnnotations) {<NEW_LINE>tag.addVisibilityAnnotation(vat);<NEW_LINE>}<NEW_LINE>method.addTag(tag);<NEW_LINE>}<NEW_LINE>if (!isFullyEmpty(parameterNames)) {<NEW_LINE>method.addTag(new ParamNamesTag(parameterNames));<NEW_LINE>}<NEW_LINE>if (method.isConcrete()) {<NEW_LINE>method.setSource(createAsmMethodSource(maxLocals, instructions, localVariables, tryCatchBlocks, scb.getKlass().moduleName));<NEW_LINE>}<NEW_LINE>}
size(), AnnotationConstants.RUNTIME_INVISIBLE);
207,616
public X509ExtendedKeyManager createKeyManager() {<NEW_LINE>try {<NEW_LINE>final KeyStore keyStore = KeyStoreUtil.readKeyStore(path, type, storePassword);<NEW_LINE>checkKeyStore(keyStore);<NEW_LINE>return KeyStoreUtil.createKeyManager(keyStore, keyPassword, algorithm);<NEW_LINE>} catch (UnrecoverableKeyException e) {<NEW_LINE>String message = "failed to load a KeyManager for keystore [" + path.toAbsolutePath() + "], this is usually caused by an incorrect key-password";<NEW_LINE>if (keyPassword.length == 0) {<NEW_LINE>message += " (no key-password was provided)";<NEW_LINE>} else if (Arrays.equals(storePassword, keyPassword)) {<NEW_LINE>message += " (we tried to access the key using the same password as the keystore)";<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>} catch (GeneralSecurityException e) {<NEW_LINE>throw new SslConfigException("failed to load a KeyManager for keystore [" + path + "] of type [" + type + "]", e);<NEW_LINE>}<NEW_LINE>}
throw new SslConfigException(message, e);
985,412
public final // JPA2.g:548:1: result_variable : WORD ;<NEW_LINE>JPA2Parser.result_variable_return result_variable() throws RecognitionException {<NEW_LINE>JPA2Parser.result_variable_return retval = new JPA2Parser.result_variable_return();<NEW_LINE>retval.start = input.LT(1);<NEW_LINE>Object root_0 = null;<NEW_LINE>Token WORD631 = null;<NEW_LINE>Object WORD631_tree = null;<NEW_LINE>try {<NEW_LINE>// JPA2.g:549:5: ( WORD )<NEW_LINE>// JPA2.g:549:7: WORD<NEW_LINE>{<NEW_LINE>root_0 = (Object) adaptor.nil();<NEW_LINE>WORD631 = (Token) match(input, WORD, FOLLOW_WORD_in_result_variable5006);<NEW_LINE>if (state.failed)<NEW_LINE>return retval;<NEW_LINE>if (state.backtracking == 0) {<NEW_LINE>WORD631_tree = (Object) adaptor.create(WORD631);<NEW_LINE>adaptor.addChild(root_0, WORD631_tree);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>retval.stop = input.LT(-1);<NEW_LINE>if (state.backtracking == 0) {<NEW_LINE>retval.tree = (<MASK><NEW_LINE>adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);<NEW_LINE>}<NEW_LINE>} catch (RecognitionException re) {<NEW_LINE>reportError(re);<NEW_LINE>recover(input, re);<NEW_LINE>retval.tree = (Object) adaptor.errorNode(input, retval.start, input.LT(-1), re);<NEW_LINE>} finally {<NEW_LINE>// do for sure before leaving<NEW_LINE>}<NEW_LINE>return retval;<NEW_LINE>}
Object) adaptor.rulePostProcessing(root_0);
1,606,139
public boolean apply(Game game, Ability source) {<NEW_LINE>// In the case that Fractured Loyalty is blinked<NEW_LINE>Permanent enchantment = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);<NEW_LINE>if (enchantment == null) {<NEW_LINE>// It was not blinked, use the standard method<NEW_LINE>enchantment = game.getPermanentOrLKIBattlefield(source.getSourceId());<NEW_LINE>}<NEW_LINE>if (enchantment != null) {<NEW_LINE>Permanent enchantedCreature = game.getPermanent(enchantment.getAttachedTo());<NEW_LINE>if (enchantedCreature != null) {<NEW_LINE>Player controller = game.getPlayer(enchantedCreature.getControllerId());<NEW_LINE>if (enchantment.getAttachedTo() != null) {<NEW_LINE>if (controller != null && !enchantedCreature.isControlledBy(this.getTargetPointer().getFirst(game, source))) {<NEW_LINE>ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfGame, this.getTargetPointer()<MASK><NEW_LINE>effect.setTargetPointer(new FixedTarget(enchantment.getAttachedTo(), game));<NEW_LINE>game.addEffect(effect, source);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
.getFirst(game, source));
1,434,658
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {<NEW_LINE>NetworkMessage networkMessage = (NetworkMessage) msg;<NEW_LINE>if (networkMessage.getMessage() instanceof Command) {<NEW_LINE>Command command = (Command) networkMessage.getMessage();<NEW_LINE>Object encodedCommand = encodeCommand(ctx.channel(), command);<NEW_LINE>StringBuilder s = new StringBuilder();<NEW_LINE>s.append("[").append(ctx.channel().id().asShortText()).append("] ");<NEW_LINE>s.append("id: ").append(getUniqueId(command.getDeviceId())).append(", ");<NEW_LINE>s.append("command type: ").append(command.getType()).append(" ");<NEW_LINE>if (encodedCommand != null) {<NEW_LINE>s.append("sent");<NEW_LINE>} else {<NEW_LINE>s.append("not sent");<NEW_LINE>}<NEW_LINE>LOGGER.<MASK><NEW_LINE>ctx.write(new NetworkMessage(encodedCommand, networkMessage.getRemoteAddress()), promise);<NEW_LINE>} else {<NEW_LINE>super.write(ctx, msg, promise);<NEW_LINE>}<NEW_LINE>}
info(s.toString());
972,845
private CachedValueProvider.Result<Location> computeLocation() {<NEW_LINE>Objects.requireNonNull(myElement);<NEW_LINE>Location defaultLocation = new Location(-1, -1, null, -1);<NEW_LINE>PsiFile containingFile = myElement.getContainingFile();<NEW_LINE>InjectedLanguageManager injectedLanguageManager = InjectedLanguageManager.<MASK><NEW_LINE>PsiFile topLevelFile = injectedLanguageManager.getTopLevelFile(myElement);<NEW_LINE>if (topLevelFile == null)<NEW_LINE>return CachedValueProvider.Result.create(defaultLocation, ModificationTracker.NEVER_CHANGED);<NEW_LINE>com.intellij.openapi.editor.Document document = PsiDocumentManager.getInstance(myElement.getProject()).getDocument(topLevelFile);<NEW_LINE>if (document == null)<NEW_LINE>return CachedValueProvider.Result.create(defaultLocation, ModificationTracker.NEVER_CHANGED);<NEW_LINE>VirtualFile virtualFile = topLevelFile.getVirtualFile();<NEW_LINE>int offset = injectedLanguageManager.injectedToHost(myElement, myElement.getNavigationElement().getTextOffset());<NEW_LINE>int lineNumber = document.getLineNumber(offset);<NEW_LINE>int column = offset - document.getLineStartOffset(lineNumber);<NEW_LINE>Location location = new Location(lineNumber + 1, column + 1, virtualFile != null ? FileUtil.toSystemIndependentName(virtualFile.getPath()) : null, offset);<NEW_LINE>return CachedValueProvider.Result.create(location, containingFile, topLevelFile, document);<NEW_LINE>}
getInstance(myElement.getProject());
633,174
public JournalEntry read() throws IOException {<NEW_LINE>int firstByte = inputStream.read();<NEW_LINE>if (firstByte == -1) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// All journal entries start with their size in bytes written as a varint.<NEW_LINE>int size = ProtoUtils.readRawVarint32(firstByte, inputStream);<NEW_LINE>byte[] buffer = size <= mBuffer.length <MASK><NEW_LINE>// Total bytes read so far for journal entry.<NEW_LINE>int totalBytesRead = 0;<NEW_LINE>while (totalBytesRead < size) {<NEW_LINE>// Bytes read in last read request.<NEW_LINE>int latestBytesRead = inputStream.read(buffer, totalBytesRead, size - totalBytesRead);<NEW_LINE>if (latestBytesRead < 0) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>totalBytesRead += latestBytesRead;<NEW_LINE>}<NEW_LINE>if (totalBytesRead < size) {<NEW_LINE>LOG.warn("Journal entry was truncated. Expected to read " + size + " bytes but only got " + totalBytesRead);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>JournalEntry entry = JournalEntry.parseFrom(new ByteArrayInputStream(buffer, 0, size));<NEW_LINE>if (entry != null) {<NEW_LINE>mLatestSequenceNumber = entry.getSequenceNumber();<NEW_LINE>}<NEW_LINE>return entry;<NEW_LINE>}
? mBuffer : new byte[size];
150,685
void onMouseMoveDragging(Point dragStart, int diffX, int diffY, GridElement draggedGridElement, boolean isShiftKeyDown, boolean isCtrlKeyDown, boolean firstDrag, boolean isMiddleMouseButton) {<NEW_LINE>if (diffX != 0 || diffY != 0) {<NEW_LINE>cursorWasMovedDuringDrag = true;<NEW_LINE>}<NEW_LINE>if (firstDrag && draggedGridElement != null && !isMiddleMouseButton) {<NEW_LINE>// if draggedGridElement == null the whole diagram is dragged and nothing has to be checked for sticking<NEW_LINE>stickablesToMove.put(draggedGridElement, getStickablesToMoveWhenElementsMove(draggedGridElement, Collections.<GridElement>emptyList()));<NEW_LINE>}<NEW_LINE>if (isCtrlKeyDown && !selector.isLassoActive() && !isMiddleMouseButton) {<NEW_LINE>selector.startSelection(dragStart);<NEW_LINE>}<NEW_LINE>if (selector.isLassoActive()) {<NEW_LINE><MASK><NEW_LINE>} else if (isMiddleMouseButton) {<NEW_LINE>moveElements(diffX, diffY, firstDrag, new ArrayList<>());<NEW_LINE>} else if (!resizeDirections.isEmpty()) {<NEW_LINE>draggedGridElement.drag(resizeDirections, diffX, diffY, getRelativePoint(dragStart, draggedGridElement), isShiftKeyDown, firstDrag, stickablesToMove.get(draggedGridElement), false);<NEW_LINE>} else // if a single element is selected, drag it (and pass the dragStart, because it's important for Relations)<NEW_LINE>if (selector.getSelectedElements().size() == 1) {<NEW_LINE>draggedGridElement.drag(Collections.<Direction>emptySet(), diffX, diffY, getRelativePoint(dragStart, draggedGridElement), isShiftKeyDown, firstDrag, stickablesToMove.get(draggedGridElement), false);<NEW_LINE>} else if (!selector.isLassoActive()) {<NEW_LINE>// if != 1 elements are selected, move them<NEW_LINE>moveElements(diffX, diffY, firstDrag, selector.getSelectedElements());<NEW_LINE>}<NEW_LINE>redraw(false);<NEW_LINE>}
selector.updateLasso(diffX, diffY);
1,785,055
private void updateMember(final RaftMember member, final Instant time) {<NEW_LINE>if (member.equals(localMember)) {<NEW_LINE>localMember.update(member.getType(), time);<NEW_LINE>members.add(localMember);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// If the member state doesn't already exist, create it.<NEW_LINE>RaftMemberContext state = membersMap.get(member.memberId());<NEW_LINE>if (state == null) {<NEW_LINE>final DefaultRaftMember defaultMember = new DefaultRaftMember(member.memberId(), member.getType(), time);<NEW_LINE>state = new RaftMemberContext(defaultMember, this, raft.getMaxAppendsPerFollower());<NEW_LINE>state.resetState(raft.getLog());<NEW_LINE>members.add(state.getMember());<NEW_LINE>remoteMembers.add(state);<NEW_LINE>membersMap.put(member.memberId(), state);<NEW_LINE>}<NEW_LINE>// If the member type has changed, update the member type and reset its state.<NEW_LINE>if (state.getMember().getType() != member.getType()) {<NEW_LINE>state.getMember().update(member.getType(), time);<NEW_LINE>state.resetState(raft.getLog());<NEW_LINE>}<NEW_LINE>// Update the optimized member collections according to the member type.<NEW_LINE>for (final List<RaftMemberContext> memberType : memberTypes.values()) {<NEW_LINE>memberType.remove(state);<NEW_LINE>}<NEW_LINE>List<RaftMemberContext> memberType = memberTypes.get(member.getType());<NEW_LINE>if (memberType == null) {<NEW_LINE>memberType = new CopyOnWriteArrayList<>();<NEW_LINE>memberTypes.put(<MASK><NEW_LINE>}<NEW_LINE>memberType.add(state);<NEW_LINE>}
member.getType(), memberType);
762,826
public void expunge() {<NEW_LINE>Term[] primarykeys = mediaFileDao.getArtistExpungeCandidates().stream().map(m -> documentFactory.createPrimarykey(m)).toArray(i -> new Term[i]);<NEW_LINE>try {<NEW_LINE>writers.get(IndexType.ARTIST).deleteDocuments(primarykeys);<NEW_LINE>} catch (IOException e) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>primarykeys = mediaFileDao.getAlbumExpungeCandidates().stream().map(m -> documentFactory.createPrimarykey(m)).toArray(i -> new Term[i]);<NEW_LINE>try {<NEW_LINE>writers.get(IndexType.ALBUM).deleteDocuments(primarykeys);<NEW_LINE>} catch (IOException e) {<NEW_LINE>LOG.error("Failed to delete album doc.", e);<NEW_LINE>}<NEW_LINE>primarykeys = mediaFileDao.getSongExpungeCandidates().stream().map(m -> documentFactory.createPrimarykey(m)).toArray(i -> new Term[i]);<NEW_LINE>try {<NEW_LINE>writers.get(IndexType.SONG).deleteDocuments(primarykeys);<NEW_LINE>} catch (IOException e) {<NEW_LINE>LOG.error("Failed to delete song doc.", e);<NEW_LINE>}<NEW_LINE>primarykeys = artistDao.getExpungeCandidates().stream().map(m -> documentFactory.createPrimarykey(m)).toArray(i -> new Term[i]);<NEW_LINE>try {<NEW_LINE>writers.get(IndexType.ARTIST_ID3).deleteDocuments(primarykeys);<NEW_LINE>} catch (IOException e) {<NEW_LINE>LOG.error("Failed to delete artistId3 doc.", e);<NEW_LINE>}<NEW_LINE>primarykeys = albumDao.getExpungeCandidates().stream().map(m -> documentFactory.createPrimarykey(m)).toArray(i -> new Term[i]);<NEW_LINE>try {<NEW_LINE>writers.get(IndexType.ALBUM_ID3).deleteDocuments(primarykeys);<NEW_LINE>} catch (IOException e) {<NEW_LINE>LOG.error("Failed to delete albumId3 doc.", e);<NEW_LINE>}<NEW_LINE>}
LOG.error("Failed to delete artist doc.", e);
678,740
public static TypeHandle of(PackageElement pkg, String name, IMixinAnnotationProcessor ap) {<NEW_LINE>String fqName = pkg.getQualifiedName() + "." + name;<NEW_LINE>if (TypeHandleASM.cache.containsKey(fqName)) {<NEW_LINE>return TypeHandleASM.cache.get(fqName);<NEW_LINE>}<NEW_LINE>InputStream is = null;<NEW_LINE>try {<NEW_LINE>Filer filer = ap.getProcessingEnvironment().getFiler();<NEW_LINE>is = filer.getResource(StandardLocation.CLASS_PATH, pkg.getQualifiedName(), name + ".class").openInputStream();<NEW_LINE>ClassNode classNode = new ClassNode();<NEW_LINE>new ClassReader(is<MASK><NEW_LINE>TypeHandleASM typeHandle = new TypeHandleASM(pkg, fqName, classNode, ap.getTypeProvider());<NEW_LINE>TypeHandleASM.cache.put(fqName, typeHandle);<NEW_LINE>return typeHandle;<NEW_LINE>} catch (FileNotFoundException fnfe) {<NEW_LINE>// This is expected if the resource doesn't exist<NEW_LINE>TypeHandleASM.cache.put(fqName, null);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>// This isn't expected but there's not a lot we can do about it, so just give up<NEW_LINE>} finally {<NEW_LINE>if (is != null) {<NEW_LINE>try {<NEW_LINE>is.close();<NEW_LINE>} catch (IOException ex) {<NEW_LINE>ex.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
).accept(classNode, 0);
1,735,205
public RequestReplyFuture<K, V, R> sendAndReceive(ProducerRecord<K, V> record, @Nullable Duration replyTimeout) {<NEW_LINE>// NOSONAR (sync)<NEW_LINE>Assert.state(this.running, "Template has not been start()ed");<NEW_LINE>Duration timeout = replyTimeout;<NEW_LINE>if (timeout == null) {<NEW_LINE>timeout = this.defaultReplyTimeout;<NEW_LINE>}<NEW_LINE>CorrelationKey correlationId = this.correlationStrategy.apply(record);<NEW_LINE>Assert.notNull(correlationId, "the created 'correlationId' cannot be null");<NEW_LINE>Headers headers = record.headers();<NEW_LINE>boolean hasReplyTopic = headers.lastHeader(KafkaHeaders.REPLY_TOPIC) != null;<NEW_LINE>if (!hasReplyTopic && this.replyTopic != null) {<NEW_LINE>headers.add(new RecordHeader(this.replyTopicHeaderName, this.replyTopic));<NEW_LINE>if (this.replyPartition != null) {<NEW_LINE>headers.add(new RecordHeader(this.replyPartitionHeaderName, this.replyPartition));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>headers.add(new RecordHeader(this.correlationHeaderName, correlationId.getCorrelationId()));<NEW_LINE>this.logger.debug(() -> "Sending: " + KafkaUtils.format(record) + WITH_CORRELATION_ID + correlationId);<NEW_LINE>RequestReplyFuture<K, V, R> future = new RequestReplyFuture<>();<NEW_LINE>this.futures.put(correlationId, future);<NEW_LINE>try {<NEW_LINE>future<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>this.futures.remove(correlationId);<NEW_LINE>throw new KafkaException("Send failed", e);<NEW_LINE>}<NEW_LINE>scheduleTimeout(record, correlationId, timeout);<NEW_LINE>return future;<NEW_LINE>}
.setSendFuture(send(record));
1,843,022
private static void renderConfigOptionsIfNecessary(FacesContext facesContext) throws IOException {<NEW_LINE>ResponseWriter writer = facesContext.getResponseWriter();<NEW_LINE>MyfacesConfig config = MyfacesConfig.getCurrentInstance(facesContext.getExternalContext());<NEW_LINE>ScriptContext script = new ScriptContext();<NEW_LINE>boolean autoScroll = config.isAutoScroll();<NEW_LINE>boolean autoSave = JavascriptUtils.isSaveFormSubmitLinkIE(facesContext.getExternalContext());<NEW_LINE>if (autoScroll || autoSave) {<NEW_LINE>script.prettyLine();<NEW_LINE>script.increaseIndent();<NEW_LINE>script.append("(!window.myfaces) ? window.myfaces = {} : null;");<NEW_LINE>script.append("(!myfaces.core) ? myfaces.core = {} : null;");<NEW_LINE>script.append("(!myfaces.core.config) ? myfaces.core.config = {} : null;");<NEW_LINE>}<NEW_LINE>if (autoScroll) {<NEW_LINE>script.append("myfaces.core.config.autoScroll = true;");<NEW_LINE>}<NEW_LINE>if (autoSave) {<NEW_LINE>script.append("myfaces.core.config.ieAutoSave = true;");<NEW_LINE>}<NEW_LINE>if (autoScroll || autoSave) {<NEW_LINE>writer.startElement(HTML.SCRIPT_ELEM, null);<NEW_LINE>writer.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);<NEW_LINE>writer.writeText(<MASK><NEW_LINE>writer.endElement(HTML.SCRIPT_ELEM);<NEW_LINE>}<NEW_LINE>}
script.toString(), null);
1,580,329
static void multipleLetterRepetitionWords(Path in, Path out) throws IOException {<NEW_LINE>Histogram<String> noisyWords = Histogram.loadFromUtf8File(in, ' ');<NEW_LINE>Histogram<String> repetitionWords = new Histogram<>();<NEW_LINE>for (String w : noisyWords) {<NEW_LINE>if (w.length() == 1) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>int maxRepetitionCount = 1;<NEW_LINE>int repetitionCount = 1;<NEW_LINE>char lastChar = w.charAt(0);<NEW_LINE>for (int i = 1; i < w.length(); i++) {<NEW_LINE>char <MASK><NEW_LINE>if (c == lastChar) {<NEW_LINE>repetitionCount++;<NEW_LINE>} else {<NEW_LINE>if (repetitionCount > maxRepetitionCount) {<NEW_LINE>maxRepetitionCount = repetitionCount;<NEW_LINE>}<NEW_LINE>repetitionCount = 0;<NEW_LINE>}<NEW_LINE>lastChar = c;<NEW_LINE>}<NEW_LINE>if (maxRepetitionCount > 1) {<NEW_LINE>repetitionWords.set(w, noisyWords.getCount(w));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>repetitionWords.saveSortedByCounts(out, " ");<NEW_LINE>}
c = w.charAt(i);
1,845,169
public static NodeValue formatNumber(NodeValue nv, NodeValue picture, NodeValue nvLocale) {<NEW_LINE>if (!nv.isNumber())<NEW_LINE>NodeValue.raise(new ExprEvalException("Not a number: " + nv));<NEW_LINE>if (!picture.isString())<NEW_LINE>NodeValue.raise(<MASK><NEW_LINE>if (nvLocale != null && !nvLocale.isString())<NEW_LINE>NodeValue.raise(new ExprEvalException("Not a string: " + nvLocale));<NEW_LINE>Locale locale = Locale.ROOT;<NEW_LINE>if (nvLocale != null)<NEW_LINE>locale = Locale.forLanguageTag(nvLocale.asString());<NEW_LINE>DecimalFormatSymbols dfs = DecimalFormatSymbols.getInstance(locale);<NEW_LINE>NumberFormat formatter = (dfs == null) ? new DecimalFormat(picture.getString()) : new DecimalFormat(picture.getString(), dfs);<NEW_LINE>NumericType nt = XSDFuncOp.classifyNumeric("fn:formatNumber", nv);<NEW_LINE>String s = null;<NEW_LINE>switch(nt) {<NEW_LINE>case OP_DECIMAL:<NEW_LINE>case OP_DOUBLE:<NEW_LINE>case OP_FLOAT:<NEW_LINE>s = formatter.format(nv.getDouble());<NEW_LINE>break;<NEW_LINE>case OP_INTEGER:<NEW_LINE>s = formatter.format(nv.getInteger().longValue());<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>return NodeValue.makeString(s);<NEW_LINE>}
new ExprEvalException("Not a string: " + picture));
1,701,681
public static DescribePriceResponse unmarshall(DescribePriceResponse describePriceResponse, UnmarshallerContext context) {<NEW_LINE>describePriceResponse.setRequestId(context.stringValue("DescribePriceResponse.RequestId"));<NEW_LINE>Order order = new Order();<NEW_LINE>order.setOriginalAmount(context.floatValue("DescribePriceResponse.Order.OriginalAmount"));<NEW_LINE>order.setTradeAmount(context.floatValue("DescribePriceResponse.Order.TradeAmount"));<NEW_LINE>order.setDiscountAmount<MASK><NEW_LINE>List<String> ruleIds = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < context.lengthValue("DescribePriceResponse.Order.RuleIds.Length"); i++) {<NEW_LINE>ruleIds.add(context.stringValue("DescribePriceResponse.Order.RuleIds[" + i + "]"));<NEW_LINE>}<NEW_LINE>order.setRuleIds(ruleIds);<NEW_LINE>describePriceResponse.setOrder(order);<NEW_LINE>List<Rule> rules = new ArrayList<Rule>();<NEW_LINE>for (int i = 0; i < context.lengthValue("DescribePriceResponse.Rules.Length"); i++) {<NEW_LINE>Rule rule = new Rule();<NEW_LINE>rule.setRuleDescId(context.longValue("DescribePriceResponse.Rules[" + i + "].RuleDescId"));<NEW_LINE>rule.setName(context.stringValue("DescribePriceResponse.Rules[" + i + "].Name"));<NEW_LINE>rule.setTitle(context.stringValue("DescribePriceResponse.Rules[" + i + "].Title"));<NEW_LINE>rules.add(rule);<NEW_LINE>}<NEW_LINE>describePriceResponse.setRules(rules);<NEW_LINE>return describePriceResponse;<NEW_LINE>}
(context.floatValue("DescribePriceResponse.Order.DiscountAmount"));
245,282
final CommitTransactionResult executeCommitTransaction(CommitTransactionRequest commitTransactionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(commitTransactionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CommitTransactionRequest> request = null;<NEW_LINE>Response<CommitTransactionResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new CommitTransactionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(commitTransactionRequest));<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, "RDS Data");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CommitTransaction");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CommitTransactionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CommitTransactionResultJsonUnmarshaller());<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>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
786,726
ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>HotPictureInfoServiceAdv hotPictureInfoService = new HotPictureInfoServiceAdv();<NEW_LINE>Wo wo = null;<NEW_LINE>HotPictureInfo hotPictureInfo = null;<NEW_LINE>if (id == null || id.isEmpty() || "(0)".equals(id)) {<NEW_LINE>throw new InfoIdEmptyException();<NEW_LINE>}<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new InfoQueryByIdException(e, id);<NEW_LINE>}<NEW_LINE>if (hotPictureInfo != null) {<NEW_LINE>try {<NEW_LINE>hotPictureInfoService.delete(id);<NEW_LINE>wo = new Wo(id);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new InfoDeleteException(e, id);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>CacheManager.notify(HotPictureInfo.class);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>result.setData(wo);<NEW_LINE>return result;<NEW_LINE>}
hotPictureInfo = hotPictureInfoService.get(id);
1,345,533
public PartitionGetResult partitionGet(PartitionGetParam partParam) {<NEW_LINE>HistAggrParam.HistPartitionAggrParam param = (HistAggrParam.HistPartitionAggrParam) partParam;<NEW_LINE>LOG.info("For the gradient histogram of GBDT, we use PS to find the optimal split");<NEW_LINE>GBDTParam gbtparam = new GBDTParam();<NEW_LINE>gbtparam.numSplit = param.getSplitNum();<NEW_LINE>gbtparam.minChildWeight = param.getMinChildWeight();<NEW_LINE>gbtparam.regAlpha = param.getRegAlpha();<NEW_LINE>gbtparam.regLambda = param.getRegLambda();<NEW_LINE>ServerIntDoubleRow row = (ServerIntDoubleRow) psContext.getMatrixStorageManager().getRow(param.getMatrixId(), param.getRowId(), param.getPartKey().getPartitionId());<NEW_LINE>SplitEntry splitEntry = GradHistHelper.findSplitOfServerRow(row, gbtparam);<NEW_LINE>int fid = splitEntry.getFid();<NEW_LINE>int splitIndex = (int) splitEntry.getFvalue();<NEW_LINE>double lossGain = splitEntry.getLossChg();<NEW_LINE>GradStats leftGradStat = splitEntry.leftGradStat;<NEW_LINE>GradStats rightGradStat = splitEntry.rightGradStat;<NEW_LINE>double leftSumGrad = leftGradStat.sumGrad;<NEW_LINE>double leftSumHess = leftGradStat.sumHess;<NEW_LINE>double rightSumGrad = rightGradStat.sumGrad;<NEW_LINE>double rightSumHess = rightGradStat.sumHess;<NEW_LINE>LOG.info(String.format("split of matrix[%d] part[%d] row[%d]: fid[%d], split index[%d], loss gain[%f], " + "left sumGrad[%f], left sum hess[%f], right sumGrad[%f], right sum hess[%f]", param.getMatrixId(), param.getPartKey().getPartitionId(), param.getRowId(), fid, splitIndex, lossGain, leftSumGrad, leftSumHess, rightSumGrad, rightSumHess));<NEW_LINE>int startFid = (int) row.getStartCol() / (2 * gbtparam.numSplit);<NEW_LINE>// each split contains 7 doubles<NEW_LINE>int sendStartCol = startFid * 7;<NEW_LINE>// int sendStartCol = (int) row.getStartCol();<NEW_LINE>int sendEndCol = sendStartCol + 7;<NEW_LINE>ServerIntDoubleRow sendRow = new ServerIntDoubleRow(param.getRowId(), RowType.T_DOUBLE_DENSE, sendStartCol, sendEndCol, sendEndCol - sendStartCol, RouterType.RANGE);<NEW_LINE>LOG.info(String.format("Create server row of split result: row id[%d], start col[%d], end col[%d]", param.getRowId(), sendStartCol, sendEndCol));<NEW_LINE>sendRow.set(0 + sendStartCol, fid);<NEW_LINE>sendRow.set(1 + sendStartCol, splitIndex);<NEW_LINE>sendRow.<MASK><NEW_LINE>sendRow.set(3 + sendStartCol, leftSumGrad);<NEW_LINE>sendRow.set(4 + sendStartCol, leftSumHess);<NEW_LINE>sendRow.set(5 + sendStartCol, rightSumGrad);<NEW_LINE>sendRow.set(6 + sendStartCol, rightSumHess);<NEW_LINE>return new PartitionGetRowResult(sendRow);<NEW_LINE>}
set(2 + sendStartCol, lossGain);
1,433,585
// TODO: We cannot use Searches#search() at the moment because that method cannot handle multiple streams. (because of Searches#extractStreamId())<NEW_LINE>// We also cannot use the new search code at the moment because it doesn't do pagination.<NEW_LINE>Result eventSearch(EventsSearchParameters parameters, String filterString, Set<String> eventStreams, Set<String> forbiddenSourceStreams) {<NEW_LINE>checkArgument(parameters != null, "parameters cannot be null");<NEW_LINE>checkArgument(!eventStreams.isEmpty(), "eventStreams cannot be empty");<NEW_LINE>checkArgument(forbiddenSourceStreams != null, "forbiddenSourceStreams cannot be null");<NEW_LINE>final Sorting.Direction sortDirection = parameters.sortDirection() == EventsSearchParameters.SortDirection.ASC ? Sorting.Direction.ASC : Sorting.Direction.DESC;<NEW_LINE>final Sorting sorting = new Sorting(parameters.sortBy(), sortDirection);<NEW_LINE>final String queryString = parameters<MASK><NEW_LINE>final Set<String> affectedIndices = getAffectedIndices(eventStreams, parameters.timerange());<NEW_LINE>return moreSearchAdapter.eventSearch(queryString, parameters.timerange(), affectedIndices, sorting, parameters.page(), parameters.perPage(), eventStreams, filterString, forbiddenSourceStreams);<NEW_LINE>}
.query().trim();
334,735
public String generateToolTip(XYDataset dataset, int series, int item) {<NEW_LINE>if (!(dataset instanceof OHLCDataset)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>OHLCDataset d = (OHLCDataset) dataset;<NEW_LINE>Number high = d.getHigh(series, item);<NEW_LINE>Number low = d.getLow(series, item);<NEW_LINE>Number open = d.getOpen(series, item);<NEW_LINE>Number close = d.getClose(series, item);<NEW_LINE>Number x = d.getX(series, item);<NEW_LINE>sb.append(d.getSeriesKey(series).toString());<NEW_LINE>if (x != null) {<NEW_LINE>Date date = new <MASK><NEW_LINE>sb.append("--> Date=").append(this.dateFormatter.format(date));<NEW_LINE>if (high != null) {<NEW_LINE>sb.append(" High=");<NEW_LINE>sb.append(this.numberFormatter.format(high.doubleValue()));<NEW_LINE>}<NEW_LINE>if (low != null) {<NEW_LINE>sb.append(" Low=");<NEW_LINE>sb.append(this.numberFormatter.format(low.doubleValue()));<NEW_LINE>}<NEW_LINE>if (open != null) {<NEW_LINE>sb.append(" Open=");<NEW_LINE>sb.append(this.numberFormatter.format(open.doubleValue()));<NEW_LINE>}<NEW_LINE>if (close != null) {<NEW_LINE>sb.append(" Close=");<NEW_LINE>sb.append(this.numberFormatter.format(close.doubleValue()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return sb.toString();<NEW_LINE>}
Date(x.longValue());
101,698
public static void main(String[] args) {<NEW_LINE>int arraySize = 20;<NEW_LINE>Comparable[] array = new Comparable[arraySize];<NEW_LINE>for (int i = 0; i < array.length; i++) {<NEW_LINE>double value = StdRandom.uniform();<NEW_LINE>array[i] = value;<NEW_LINE>}<NEW_LINE>int numberOfIncrements = getNumberOfIncrements(arraySize);<NEW_LINE>// Set canvas size<NEW_LINE>StdDraw.setCanvasSize(30 * (arraySize <MASK><NEW_LINE>StdDraw.setXscale(-0.5, arraySize / 3 + 1);<NEW_LINE>// +1 to draw the input array<NEW_LINE>StdDraw.setYscale(-0.5, numberOfIncrements + 0.8 + 1);<NEW_LINE>StdDraw.setFont(new Font("SansSerif", Font.PLAIN, 13));<NEW_LINE>draw(array, numberOfIncrements + 1, "Input");<NEW_LINE>shellSort(array);<NEW_LINE>}
+ 3), 30 * arraySize);
593,689
public static void removePlatform(final NbPlatform plaf) throws IOException {<NEW_LINE>try {<NEW_LINE>ProjectManager.mutex().writeAccess(new Mutex.ExceptionAction<Void>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Void run() throws IOException {<NEW_LINE><MASK><NEW_LINE>props.remove(PLATFORM_PREFIX + plaf.getID() + PLATFORM_DEST_DIR_SUFFIX);<NEW_LINE>props.remove(PLATFORM_PREFIX + plaf.getID() + PLATFORM_HARNESS_DIR_SUFFIX);<NEW_LINE>props.remove(PLATFORM_PREFIX + plaf.getID() + PLATFORM_LABEL_SUFFIX);<NEW_LINE>props.remove(PLATFORM_PREFIX + plaf.getID() + PLATFORM_SOURCES_SUFFIX);<NEW_LINE>props.remove(PLATFORM_PREFIX + plaf.getID() + PLATFORM_JAVADOC_SUFFIX);<NEW_LINE>PropertyUtils.putGlobalProperties(props);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (MutexException e) {<NEW_LINE>throw (IOException) e.getException();<NEW_LINE>}<NEW_LINE>getPlatformsInternal().remove(plaf);<NEW_LINE>// #97262<NEW_LINE>ModuleList.refresh();<NEW_LINE>LOG.log(Level.FINE, "NbPlatform removed: {0}", plaf);<NEW_LINE>}
EditableProperties props = PropertyUtils.getGlobalProperties();
185,396
final DeleteUserPoolClientResult executeDeleteUserPoolClient(DeleteUserPoolClientRequest deleteUserPoolClientRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteUserPoolClientRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteUserPoolClientRequest> request = null;<NEW_LINE>Response<DeleteUserPoolClientResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteUserPoolClientRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteUserPoolClientRequest));<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, "Cognito Identity Provider");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteUserPoolClient");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteUserPoolClientResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteUserPoolClientResultJsonUnmarshaller());<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>}
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();