idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
925,611
public void addContent(ByteBuf buffer, boolean last) throws IOException {<NEW_LINE>if (fileUpload instanceof MemoryFileUpload) {<NEW_LINE>try {<NEW_LINE>checkSize(fileUpload.length() + buffer.readableBytes());<NEW_LINE>if (fileUpload.length() + buffer.readableBytes() > limitSize) {<NEW_LINE>DiskFileUpload diskFileUpload = new DiskFileUpload(fileUpload.getName(), fileUpload.getFilename(), fileUpload.getContentType(), fileUpload.getContentTransferEncoding(), fileUpload.getCharset(<MASK><NEW_LINE>diskFileUpload.setMaxSize(maxSize);<NEW_LINE>ByteBuf data = fileUpload.getByteBuf();<NEW_LINE>if (data != null && data.isReadable()) {<NEW_LINE>diskFileUpload.addContent(data.retain(), false);<NEW_LINE>}<NEW_LINE>// release old upload<NEW_LINE>fileUpload.release();<NEW_LINE>fileUpload = diskFileUpload;<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>buffer.release();<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>fileUpload.addContent(buffer, last);<NEW_LINE>}
), definedSize, baseDir, deleteOnExit);
1,310,314
private void updateTrailData() {<NEW_LINE>if (!isInHerbiboarArea()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean pathActive = false;<NEW_LINE>boolean wasStarted = started;<NEW_LINE>// Get trail data<NEW_LINE>for (HerbiboarSearchSpot spot : HerbiboarSearchSpot.values()) {<NEW_LINE>for (TrailToSpot trail : spot.getTrails()) {<NEW_LINE>int value = client.getVar(trail.getVarbit());<NEW_LINE>if (value == trail.getValue()) {<NEW_LINE>// The trail after you have searched the spot<NEW_LINE>currentGroup = spot.getGroup();<NEW_LINE>nextTrail = trail;<NEW_LINE>// You never visit the same spot twice<NEW_LINE>if (!currentPath.contains(spot)) {<NEW_LINE>currentPath.add(spot);<NEW_LINE>}<NEW_LINE>} else if (value > 0) {<NEW_LINE>// The current trail<NEW_LINE>shownTrails.addAll(trail.getFootprintIds());<NEW_LINE>pathActive = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>finishId = client.getVar(Varbits.HB_FINISH);<NEW_LINE>// The started varbit doesn't get set until the first spot of the rotation has been searched<NEW_LINE>// so we need to use the current group as an indicator of the rotation being started<NEW_LINE>started = client.getVar(Varbits.<MASK><NEW_LINE>boolean finished = !pathActive && started;<NEW_LINE>if (!wasStarted && started) {<NEW_LINE>startSpot = HerbiboarStart.from(startPoint);<NEW_LINE>}<NEW_LINE>ruleApplicable = HerbiboarRule.canApplyRule(startSpot, currentPath);<NEW_LINE>if (finished) {<NEW_LINE>resetTrailData();<NEW_LINE>}<NEW_LINE>}
HB_STARTED) > 0 || currentGroup != null;
876,460
// beforeSave<NEW_LINE>@Override<NEW_LINE>protected boolean afterSave(final boolean newRecord, final boolean success) {<NEW_LINE>if (!success || newRecord) {<NEW_LINE>return success;<NEW_LINE>}<NEW_LINE>// Propagate Description changes<NEW_LINE>if (is_ValueChanged("Description") || is_ValueChanged("POReference")) {<NEW_LINE>final String sql = DB.convertSqlToNative("UPDATE C_Invoice i" + " SET (Description,POReference)=" + "(SELECT Description,POReference " + <MASK><NEW_LINE>final int no = DB.executeUpdateEx(sql, get_TrxName());<NEW_LINE>log.debug("Description -> #" + no);<NEW_LINE>}<NEW_LINE>// Propagate Changes of Payment Info to existing (not reversed/closed) invoices<NEW_LINE>if (is_ValueChanged("PaymentRule") || is_ValueChanged("C_PaymentTerm_ID") || is_ValueChanged("DateAcct") || is_ValueChanged("C_Payment_ID") || is_ValueChanged("C_CashLine_ID")) {<NEW_LINE>final String sql = DB.convertSqlToNative("UPDATE C_Invoice i " + "SET (PaymentRule,C_PaymentTerm_ID,DateAcct,C_Payment_ID,C_CashLine_ID)=" + "(SELECT PaymentRule,C_PaymentTerm_ID,DateAcct,C_Payment_ID,C_CashLine_ID " + "FROM C_Order o WHERE i.C_Order_ID=o.C_Order_ID)" + "WHERE DocStatus NOT IN ('RE','CL') AND C_Order_ID=" + getC_Order_ID());<NEW_LINE>// Don't touch Closed/Reversed entries<NEW_LINE>final int no = DB.executeUpdate(sql, get_TrxName());<NEW_LINE>log.debug("Payment -> #" + no);<NEW_LINE>}<NEW_LINE>// Sync Lines<NEW_LINE>if (// metas: tsa: 01767: don't sync bp and bplocation<NEW_LINE>is_ValueChanged("AD_Org_ID") || /*<NEW_LINE>* || is_ValueChanged(MOrder.COLUMNNAME_C_BPartner_ID)<NEW_LINE>* || is_ValueChanged(MOrder.COLUMNNAME_C_BPartner_Location_ID)<NEW_LINE>*/<NEW_LINE>is_ValueChanged(MOrder.COLUMNNAME_DateOrdered) || is_ValueChanged(MOrder.COLUMNNAME_DatePromised) || is_ValueChanged(MOrder.COLUMNNAME_M_Warehouse_ID) || is_ValueChanged(MOrder.COLUMNNAME_M_Shipper_ID) || is_ValueChanged(MOrder.COLUMNNAME_C_Currency_ID)) {<NEW_LINE>for (final MOrderLine line : getLines()) {<NEW_LINE>if (is_ValueChanged("AD_Org_ID")) {<NEW_LINE>line.setAD_Org_ID(getAD_Org_ID());<NEW_LINE>}<NEW_LINE>// metas: tsa: 01767: don't sync bp and bplocation<NEW_LINE>if (is_ValueChanged(MOrder.COLUMNNAME_DateOrdered)) {<NEW_LINE>line.setDateOrdered(getDateOrdered());<NEW_LINE>}<NEW_LINE>if (is_ValueChanged(MOrder.COLUMNNAME_DatePromised)) {<NEW_LINE>line.setDatePromised(getDatePromised());<NEW_LINE>}<NEW_LINE>if (is_ValueChanged(MOrder.COLUMNNAME_M_Warehouse_ID)) {<NEW_LINE>line.setM_Warehouse_ID(getM_Warehouse_ID());<NEW_LINE>}<NEW_LINE>if (is_ValueChanged(MOrder.COLUMNNAME_M_Shipper_ID)) {<NEW_LINE>line.setM_Shipper_ID(getM_Shipper_ID());<NEW_LINE>}<NEW_LINE>if (is_ValueChanged(MOrder.COLUMNNAME_C_Currency_ID)) {<NEW_LINE>line.setC_Currency_ID(getC_Currency_ID());<NEW_LINE>}<NEW_LINE>line.saveEx();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>//<NEW_LINE>return true;<NEW_LINE>}
"FROM C_Order o WHERE i.C_Order_ID=o.C_Order_ID) " + "WHERE DocStatus NOT IN ('RE','CL') AND C_Order_ID=" + getC_Order_ID());
1,593,772
private void internalInitializeLiveRoom() {<NEW_LINE>LoginInfo loginInfo = new LoginInfo();<NEW_LINE>loginInfo.sdkAppID = GenerateTestUserSig.SDKAPPID;<NEW_LINE>loginInfo.userID = ProfileManager.getInstance().getUserModel().userId;<NEW_LINE>loginInfo.userSig = ProfileManager.getInstance().getUserModel().userSig;<NEW_LINE>loginInfo.userName = mUserName;<NEW_LINE>loginInfo.userAvatar = mUserAvatar;<NEW_LINE>LiveRoomActivity.this.mUserId = ProfileManager.getInstance().getUserModel().userId;<NEW_LINE>mMLVBLiveRoom.login(loginInfo, new IMLVBLiveRoomListener.LoginCallback() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onError(int errCode, String errInfo) {<NEW_LINE>setTitle(errInfo);<NEW_LINE>printGlobalLog(getString(R.string.mlvb_live_room_init_fail, errInfo));<NEW_LINE>mRetryInitRoomRunnable = new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>Toast.makeText(LiveRoomActivity.this, getString(R.string.mlvb_retry), Toast.LENGTH_SHORT).show();<NEW_LINE>initializeLiveRoom();<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onSuccess() {<NEW_LINE>setTitle(getString<MASK><NEW_LINE>printGlobalLog(getString(R.string.mlvb_live_room_init_success), mUserId);<NEW_LINE>Fragment fragment = getFragmentManager().findFragmentById(R.id.mlvb_rtmproom_fragment_container);<NEW_LINE>if (!(fragment instanceof LiveRoomChatFragment)) {<NEW_LINE>FragmentTransaction ft = getFragmentManager().beginTransaction();<NEW_LINE>fragment = LiveRoomListFragment.newInstance(mUserId);<NEW_LINE>ft.replace(R.id.mlvb_rtmproom_fragment_container, fragment);<NEW_LINE>ft.commit();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
(R.string.mlvb_phone_live));
356,895
private AmazonS3 createAmazonS3Client(Configuration hadoopConfig, ClientConfiguration clientConfig) {<NEW_LINE>Optional<EncryptionMaterialsProvider> encryptionMaterialsProvider = createEncryptionMaterialsProvider(hadoopConfig);<NEW_LINE>AmazonS3Builder<? extends AmazonS3Builder, ? extends AmazonS3> clientBuilder;<NEW_LINE>String <MASK><NEW_LINE>if (signerType != null) {<NEW_LINE>clientConfig.withSignerOverride(signerType);<NEW_LINE>}<NEW_LINE>if (encryptionMaterialsProvider.isPresent()) {<NEW_LINE>clientBuilder = AmazonS3EncryptionClient.encryptionBuilder().withCredentials(credentialsProvider).withEncryptionMaterials(encryptionMaterialsProvider.get()).withClientConfiguration(clientConfig).withMetricsCollector(METRIC_COLLECTOR);<NEW_LINE>} else {<NEW_LINE>clientBuilder = AmazonS3Client.builder().withCredentials(credentialsProvider).withClientConfiguration(clientConfig).withMetricsCollector(METRIC_COLLECTOR);<NEW_LINE>}<NEW_LINE>boolean regionOrEndpointSet = false;<NEW_LINE>// use local region when running inside of EC2<NEW_LINE>if (pinS3ClientToCurrentRegion) {<NEW_LINE>Region region = Regions.getCurrentRegion();<NEW_LINE>if (region != null) {<NEW_LINE>clientBuilder = clientBuilder.withRegion(region.getName());<NEW_LINE>regionOrEndpointSet = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String endpoint = hadoopConfig.get(S3_ENDPOINT);<NEW_LINE>if (endpoint != null) {<NEW_LINE>clientBuilder = clientBuilder.withEndpointConfiguration(new EndpointConfiguration(endpoint, null));<NEW_LINE>regionOrEndpointSet = true;<NEW_LINE>}<NEW_LINE>if (isPathStyleAccess) {<NEW_LINE>clientBuilder = clientBuilder.enablePathStyleAccess();<NEW_LINE>}<NEW_LINE>if (!regionOrEndpointSet) {<NEW_LINE>clientBuilder = clientBuilder.withRegion(US_EAST_1);<NEW_LINE>clientBuilder.setForceGlobalBucketAccessEnabled(true);<NEW_LINE>}<NEW_LINE>return clientBuilder.build();<NEW_LINE>}
signerType = hadoopConfig.get(S3_SIGNER_TYPE);
1,109,148
public static ListItemsResponse unmarshall(ListItemsResponse listItemsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listItemsResponse.setRequestId(_ctx.stringValue("ListItemsResponse.requestId"));<NEW_LINE>Result result = new Result();<NEW_LINE>Total total = new Total();<NEW_LINE>total.setInstanceRecommendItem(_ctx.longValue("ListItemsResponse.result.total.instanceRecommendItem"));<NEW_LINE>total.setQueryCount(_ctx.longValue("ListItemsResponse.result.total.queryCount"));<NEW_LINE>total.setSceneRecommendItem(_ctx.longValue("ListItemsResponse.result.total.sceneRecommendItem"));<NEW_LINE>total.setSceneWeightItem(_ctx.longValue("ListItemsResponse.result.total.sceneWeightItem"));<NEW_LINE>total.setTotalCount(_ctx.longValue("ListItemsResponse.result.total.totalCount"));<NEW_LINE>total.setWeightItem(_ctx.longValue("ListItemsResponse.result.total.weightItem"));<NEW_LINE>result.setTotal(total);<NEW_LINE>List<DetailItem> detail = new ArrayList<DetailItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListItemsResponse.result.detail.Length"); i++) {<NEW_LINE>DetailItem detailItem = new DetailItem();<NEW_LINE>detailItem.setAuthor(_ctx.stringValue("ListItemsResponse.result.detail[" + i + "].author"));<NEW_LINE>detailItem.setBrandId(_ctx.stringValue("ListItemsResponse.result.detail[" + i + "].brandId"));<NEW_LINE>detailItem.setCategoryPath(_ctx.stringValue<MASK><NEW_LINE>detailItem.setChannel(_ctx.stringValue("ListItemsResponse.result.detail[" + i + "].channel"));<NEW_LINE>detailItem.setDuration(_ctx.stringValue("ListItemsResponse.result.detail[" + i + "].duration"));<NEW_LINE>detailItem.setExpireTime(_ctx.stringValue("ListItemsResponse.result.detail[" + i + "].expireTime"));<NEW_LINE>detailItem.setItemId(_ctx.stringValue("ListItemsResponse.result.detail[" + i + "].itemId"));<NEW_LINE>detailItem.setItemType(_ctx.stringValue("ListItemsResponse.result.detail[" + i + "].itemType"));<NEW_LINE>detailItem.setPubTime(_ctx.stringValue("ListItemsResponse.result.detail[" + i + "].pubTime"));<NEW_LINE>detailItem.setShopId(_ctx.stringValue("ListItemsResponse.result.detail[" + i + "].shopId"));<NEW_LINE>detailItem.setStatus(_ctx.stringValue("ListItemsResponse.result.detail[" + i + "].status"));<NEW_LINE>detailItem.setTitle(_ctx.stringValue("ListItemsResponse.result.detail[" + i + "].title"));<NEW_LINE>detail.add(detailItem);<NEW_LINE>}<NEW_LINE>result.setDetail(detail);<NEW_LINE>listItemsResponse.setResult(result);<NEW_LINE>return listItemsResponse;<NEW_LINE>}
("ListItemsResponse.result.detail[" + i + "].categoryPath"));
878,025
private Mono<Response<ScalingPlanInner>> updateWithResponseAsync(String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan, 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.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<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 (scalingPlanName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter scalingPlanName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (scalingPlan != null) {<NEW_LINE>scalingPlan.validate();<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, <MASK><NEW_LINE>}
scalingPlanName, scalingPlan, accept, context);
269,573
final RegisterWorkspaceDirectoryResult executeRegisterWorkspaceDirectory(RegisterWorkspaceDirectoryRequest registerWorkspaceDirectoryRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(registerWorkspaceDirectoryRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<RegisterWorkspaceDirectoryRequest> request = null;<NEW_LINE>Response<RegisterWorkspaceDirectoryResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new RegisterWorkspaceDirectoryRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(registerWorkspaceDirectoryRequest));<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, "WorkSpaces");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RegisterWorkspaceDirectory");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<RegisterWorkspaceDirectoryResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RegisterWorkspaceDirectoryResultJsonUnmarshaller());<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.ClientExecuteTime);
1,310,788
final ListRecoveryPointsByBackupVaultResult executeListRecoveryPointsByBackupVault(ListRecoveryPointsByBackupVaultRequest listRecoveryPointsByBackupVaultRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listRecoveryPointsByBackupVaultRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListRecoveryPointsByBackupVaultRequest> request = null;<NEW_LINE>Response<ListRecoveryPointsByBackupVaultResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListRecoveryPointsByBackupVaultRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listRecoveryPointsByBackupVaultRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Backup");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListRecoveryPointsByBackupVault");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListRecoveryPointsByBackupVaultResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListRecoveryPointsByBackupVaultResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
1,417,922
public okhttp3.Call readPersistentVolumeCall(String name, String pretty, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/api/v1/persistentvolumes/{name}".replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString()));<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();<NEW_LINE>if (pretty != null) {<NEW_LINE>localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty));<NEW_LINE>}<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, String> localVarCookieParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" };<NEW_LINE>final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>if (localVarAccept != null) {<NEW_LINE>localVarHeaderParams.put("Accept", localVarAccept);<NEW_LINE>}<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>localVarHeaderParams.put("Content-Type", localVarContentType);<NEW_LINE>String[] localVarAuthNames = new String[] { "BearerToken" };<NEW_LINE>return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, <MASK><NEW_LINE>}
localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
392,812
public com.amazonaws.services.computeoptimizer.model.AccessDeniedException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.computeoptimizer.model.AccessDeniedException accessDeniedException = 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>} 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 accessDeniedException;<NEW_LINE>}
computeoptimizer.model.AccessDeniedException(null);
420,730
private Mono<Response<QueryPerformanceInsightResetDataResultInner>> resetQueryPerformanceInsightDataWithResponseAsync(String resourceGroupName, String serverName) {<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.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<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 (serverName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String apiVersion = "2018-06-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>return FluxUtil.withContext(context -> service.resetQueryPerformanceInsightData(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)).contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext(<MASK><NEW_LINE>}
)).readOnly()));
455,400
public // , ISequentialInStream<NEW_LINE>int // , ISequentialInStream<NEW_LINE>Code(// ISequentialOutStream<NEW_LINE>java.io.InputStream inStream, java.io.OutputStream outStream, long outSize, ICompressProgressInfo progress) throws java.io.IOException {<NEW_LINE>byte[] _buffer = new byte[kBufferSize];<NEW_LINE>long TotalSize = 0;<NEW_LINE>for (; ; ) {<NEW_LINE>int realProcessedSize;<NEW_LINE>int size = kBufferSize;<NEW_LINE>if (// NULL<NEW_LINE>outSize != -1)<NEW_LINE>if (size > (outSize - TotalSize))<NEW_LINE>size = <MASK><NEW_LINE>realProcessedSize = inStream.read(_buffer, 0, size);<NEW_LINE>if (// EOF<NEW_LINE>realProcessedSize == -1)<NEW_LINE>break;<NEW_LINE>outStream.write(_buffer, 0, realProcessedSize);<NEW_LINE>TotalSize += realProcessedSize;<NEW_LINE>if (progress != null) {<NEW_LINE>int res = progress.SetRatioInfo(TotalSize, TotalSize);<NEW_LINE>if (res != HRESULT.S_OK)<NEW_LINE>return res;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return HRESULT.S_OK;<NEW_LINE>}
(int) (outSize - TotalSize);
727,948
private void maybeRecordExportDeclaration(NodeTraversal t, Node n) {<NEW_LINE>if (!currentScript.isModule || !n.getString().equals("exports") || !isAssignTarget(n)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// ClosureCheckModule reports an error for duplicate 'exports = ' assignments, but that error<NEW_LINE>// may be suppressed. If so then use the final assignment as the canonical one.<NEW_LINE>if (currentScript.defaultExport != null) {<NEW_LINE>ExportDefinition previousExport = currentScript.defaultExport;<NEW_LINE>String localName = previousExport.getLocalName();<NEW_LINE>if (localName != null && currentScript.namesToInlineByAlias.containsKey(localName)) {<NEW_LINE>currentScript.namesToInlineByAlias.remove(localName);<NEW_LINE>}<NEW_LINE>currentScript.defaultExportLocalName = null;<NEW_LINE>}<NEW_LINE>Node exportRhs = n.getNext();<NEW_LINE>// Exports object should have already been converted in ScriptPreprocess step.<NEW_LINE>checkState(!NodeUtil.isNamedExportsLiteral(exportRhs), "Exports object should have been converted already");<NEW_LINE>currentScript.willCreateExportsObject = true;<NEW_LINE>ExportDefinition defaultExport = ExportDefinition.newDefaultExport(t, exportRhs);<NEW_LINE>currentScript.defaultExport = defaultExport;<NEW_LINE>if (!currentScript.declareLegacyNamespace && defaultExport.hasInlinableName(currentScript.exportsToInline.keySet())) {<NEW_LINE><MASK><NEW_LINE>currentScript.defaultExportLocalName = localName;<NEW_LINE>recordExportToInline(defaultExport);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}
String localName = defaultExport.getLocalName();
1,231,079
protected void createEdge(LookUpCameraInfo dbCams, String src, String dst, DogArray<AssociatedPair> pairs, DogArray<AssociatedIndex> matches) {<NEW_LINE>DMatrixRMaj fundamental = new DMatrixRMaj(3, 3);<NEW_LINE>DogArray_I32 inlierIdx = new DogArray_I32();<NEW_LINE>// Retrieve any prior information on the cameras<NEW_LINE>dbCams.lookupCalibration(src, priorA);<NEW_LINE><MASK><NEW_LINE>boolean sameCamera = dbCams.viewToCamera(src) == dbCams.viewToCamera(dst);<NEW_LINE>if (verbose != null)<NEW_LINE>verbose.printf("_ createEdge['%s'] -> '%s', prior: src={fx=%.1f cx=%.1f cy=%.1f} dst={fx=%.1f cx=%.1f cy=%.1f} \n", src, dst, priorA.fx, priorA.cx, priorA.cy, priorB.fx, priorB.cx, priorB.cy);<NEW_LINE>// Pass in null if it's the same camera so that score algorithm will know it's dealing with a single camera<NEW_LINE>epipolarScore.process(priorA, sameCamera ? null : priorB, srcFeats.size, dstFeats.size, pairs.toList(), fundamental, inlierIdx);<NEW_LINE>PairwiseImageGraph.Motion edge = graph.edges.grow();<NEW_LINE>edge.is3D = epipolarScore.is3D();<NEW_LINE>edge.score3D = epipolarScore.getScore();<NEW_LINE>edge.index = graph.edges.size - 1;<NEW_LINE>edge.src = graph.lookupNode(src);<NEW_LINE>edge.dst = graph.lookupNode(dst);<NEW_LINE>edge.src.connections.add(edge);<NEW_LINE>edge.dst.connections.add(edge);<NEW_LINE>// Allocate memory and copy inliers<NEW_LINE>edge.inliers.resize(inlierIdx.size);<NEW_LINE>for (int i = 0; i < inlierIdx.size; i++) {<NEW_LINE>edge.inliers.get(i).setTo(matches.get(inlierIdx.get(i)));<NEW_LINE>}<NEW_LINE>}
dbCams.lookupCalibration(dst, priorB);
1,671,270
public static List<Locale> languagesByCountry(String countryCode) {<NEW_LINE>if (countryCode == null) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>List<Locale> langs = LANGUAGES_BY_COUNTRY.get(countryCode);<NEW_LINE>if (langs == null) {<NEW_LINE>langs = new ArrayList<Locale>();<NEW_LINE>List<Locale> locales = availableLocaleList();<NEW_LINE>for (int i = 0; i < locales.size(); i++) {<NEW_LINE>Locale locale = locales.get(i);<NEW_LINE>if (countryCode.equals(locale.getCountry()) && locale.getVariant().length() == 0) {<NEW_LINE>langs.add(locale);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>langs = Collections.unmodifiableList(langs);<NEW_LINE>LANGUAGES_BY_COUNTRY.putIfAbsent(countryCode, langs);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>return langs;<NEW_LINE>}
langs = LANGUAGES_BY_COUNTRY.get(countryCode);
292,351
private void buildCloseViewsActions() {<NEW_LINE>for (ViewInfo info : openViewsList) {<NEW_LINE>tool.removeAction(info.getAction());<NEW_LINE>}<NEW_LINE>openViewsList.clear();<NEW_LINE><MASK><NEW_LINE>if (pdp == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>tool.setMenuGroup(new String[] { ToolConstants.MENU_PROJECT, "Close View" }, "AView", "4");<NEW_LINE>ProjectLocator[] projectViews = pdp.getProjectViews();<NEW_LINE>for (ProjectLocator view : projectViews) {<NEW_LINE>DockingAction action = new CloseViewPluginAction(GhidraURL.getDisplayString(view.getURL()));<NEW_LINE>openViewsList.add(new ViewInfo(action, view.getURL()));<NEW_LINE>tool.addAction(action);<NEW_LINE>}<NEW_LINE>if (projectViews.length > 1) {<NEW_LINE>DockingAction action = new DockingAction(CLOSE_ALL_OPEN_VIEWS, plugin.getName(), false) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionContext context) {<NEW_LINE>closeView(CLOSE_ALL_OPEN_VIEWS);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>action.setMenuBarData(new MenuData(new String[] { ToolConstants.MENU_PROJECT, "Close View", CLOSE_ALL_OPEN_VIEWS }, "AView"));<NEW_LINE>openViewsList.add(new ViewInfo(action, null));<NEW_LINE>tool.addAction(action);<NEW_LINE>} else if (projectViews.length == 0) {<NEW_LINE>DockingAction action = new DockingAction("Close View", plugin.getName()) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionContext context) {<NEW_LINE>// do nothing - place holder menu item only<NEW_LINE>}<NEW_LINE>};<NEW_LINE>action.setEnabled(false);<NEW_LINE>action.setMenuBarData(new MenuData(new String[] { ToolConstants.MENU_PROJECT, "Close View" }, "AView"));<NEW_LINE>action.getMenuBarData().setMenuSubGroup("4");<NEW_LINE>openViewsList.add(new ViewInfo(action, null));<NEW_LINE>tool.addAction(action);<NEW_LINE>}<NEW_LINE>}
ProjectDataPanel pdp = plugin.getProjectDataPanel();
1,096,090
private static Optional<io.swagger.v3.oas.models.media.Schema> toSchema(ParserContext ctx, Map<String, Object> annotation) {<NEW_LINE>Map<String, List<io.swagger.v3.oas.models.media.Schema>> schemaMap = new HashMap<>();<NEW_LINE>schemaType(ctx, annotation, "implementation", schemaMap::put);<NEW_LINE>schemaType(ctx, annotation, "not", schemaMap::put);<NEW_LINE>schemaType(ctx, <MASK><NEW_LINE>schemaType(ctx, annotation, "oneOf", schemaMap::put);<NEW_LINE>schemaType(ctx, annotation, "allOf", schemaMap::put);<NEW_LINE>if (schemaMap.isEmpty()) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>List<io.swagger.v3.oas.models.media.Schema> schemas = schemaMap.get("implementation");<NEW_LINE>io.swagger.v3.oas.models.media.Schema schema;<NEW_LINE>if (schemas == null || schemas.isEmpty()) {<NEW_LINE>ComposedSchema composedSchema = new ComposedSchema();<NEW_LINE>Optional.ofNullable(schemaMap.get("anyOf")).ifPresent(composedSchema::anyOf);<NEW_LINE>Optional.ofNullable(schemaMap.get("oneOf")).ifPresent(composedSchema::oneOf);<NEW_LINE>Optional.ofNullable(schemaMap.get("allOf")).ifPresent(composedSchema::allOf);<NEW_LINE>schema = composedSchema;<NEW_LINE>} else {<NEW_LINE>schema = schemas.get(0);<NEW_LINE>}<NEW_LINE>Optional.ofNullable(schemaMap.get("not")).ifPresent(not -> schema.not(not.get(0)));<NEW_LINE>Optional.ofNullable(annotation.get("nullable")).filter(nullable -> nullable instanceof Boolean).ifPresent(nullable -> schema.setNullable((Boolean) nullable));<NEW_LINE>annotationValue(annotation, "externalDocs", value -> externalDocumentation(value, schema::setExternalDocs));<NEW_LINE>return Optional.of(schema);<NEW_LINE>}
annotation, "anyOf", schemaMap::put);
505,105
public void marshall(AdministrativeAction administrativeAction, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (administrativeAction == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(administrativeAction.getProgressPercent(), PROGRESSPERCENT_BINDING);<NEW_LINE>protocolMarshaller.marshall(administrativeAction.getRequestTime(), REQUESTTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(administrativeAction.getStatus(), STATUS_BINDING);<NEW_LINE>protocolMarshaller.marshall(administrativeAction.getTargetFileSystemValues(), TARGETFILESYSTEMVALUES_BINDING);<NEW_LINE>protocolMarshaller.marshall(administrativeAction.getFailureDetails(), FAILUREDETAILS_BINDING);<NEW_LINE>protocolMarshaller.marshall(administrativeAction.getTargetVolumeValues(), TARGETVOLUMEVALUES_BINDING);<NEW_LINE>protocolMarshaller.marshall(administrativeAction.getTargetSnapshotValues(), TARGETSNAPSHOTVALUES_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
administrativeAction.getAdministrativeActionType(), ADMINISTRATIVEACTIONTYPE_BINDING);
746,005
private static void callShowWarning(PythonContext context, Object category, Object text, Object message, Object filename, int lineno, Object sourceline, Object sourceIn) {<NEW_LINE>PRaiseNode raise = PRaiseNode.getUncached();<NEW_LINE>Object showFn = getWarningsAttr(context, "_showwarnmsg", sourceIn != null);<NEW_LINE>if (showFn == null) {<NEW_LINE>showWarning(filename, lineno, text, category, sourceline);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!PyCallableCheckNode.getUncached().execute(showFn)) {<NEW_LINE>throw raise.raise(PythonBuiltinClassType.TypeError, "warnings._showwarnmsg() must be set to a callable");<NEW_LINE>}<NEW_LINE>Object warnmsgCls = getWarningsAttr(context, "WarningMessage", false);<NEW_LINE>if (warnmsgCls == null) {<NEW_LINE>throw raise.raise(PythonBuiltinClassType.RuntimeError, "unable to get warnings.WarningMessage");<NEW_LINE>}<NEW_LINE>Object source = sourceIn == null ? PNone.NONE : sourceIn;<NEW_LINE>assert message != null && category != null && filename != null && source != null;<NEW_LINE>assert message != PNone.NO_VALUE && category != PNone.NO_VALUE && filename != PNone.NO_VALUE && source != PNone.NO_VALUE;<NEW_LINE>Object msg = CallNode.getUncached().execute(warnmsgCls, message, category, filename, lineno, PNone.<MASK><NEW_LINE>CallNode.getUncached().execute(showFn, msg);<NEW_LINE>}
NONE, PNone.NONE, source);
938,244
public void marshall(CreateKnowledgeBaseRequest createKnowledgeBaseRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createKnowledgeBaseRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createKnowledgeBaseRequest.getDescription(), DESCRIPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createKnowledgeBaseRequest.getKnowledgeBaseType(), KNOWLEDGEBASETYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createKnowledgeBaseRequest.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createKnowledgeBaseRequest.getRenderingConfiguration(), RENDERINGCONFIGURATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createKnowledgeBaseRequest.getServerSideEncryptionConfiguration(), SERVERSIDEENCRYPTIONCONFIGURATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createKnowledgeBaseRequest.getSourceConfiguration(), SOURCECONFIGURATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createKnowledgeBaseRequest.getTags(), TAGS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
createKnowledgeBaseRequest.getClientToken(), CLIENTTOKEN_BINDING);
1,420,394
public InfrastructureResponse listInfrastructure() {<NEW_LINE>final InfrastructureResponse response = new InfrastructureResponse();<NEW_LINE>response.setZones(dataCenterDao.countAll());<NEW_LINE>response.setPods(podDao.countAll());<NEW_LINE>response.setClusters(clusterDao.countAll());<NEW_LINE>response.setHosts(hostDao.countAllByType(Host.Type.Routing));<NEW_LINE>response.setStoragePools(storagePoolDao.countAll());<NEW_LINE>response.setImageStores(imageStoreDao.countAllImageStores());<NEW_LINE>response.setSystemvms(vmInstanceDao.listByTypes(VirtualMachine.Type.ConsoleProxy, VirtualMachine.Type.SecondaryStorageVm).size());<NEW_LINE>response.setRouters(domainRouterDao.countAllByRole<MASK><NEW_LINE>response.setInternalLbs(domainRouterDao.countAllByRole(VirtualRouter.Role.INTERNAL_LB_VM));<NEW_LINE>response.setAlerts(alertDao.countAll());<NEW_LINE>int cpuSockets = 0;<NEW_LINE>for (final Host host : hostDao.listByType(Host.Type.Routing)) {<NEW_LINE>if (host.getCpuSockets() != null) {<NEW_LINE>cpuSockets += host.getCpuSockets();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>response.setCpuSockets(cpuSockets);<NEW_LINE>response.setManagementServers(managementServerHostDao.listAll().size());<NEW_LINE>return response;<NEW_LINE>}
(VirtualRouter.Role.VIRTUAL_ROUTER));
1,844,195
public void documentSet(String appName, String path, ReadableMap data, ReadableMap options, Promise promise) {<NEW_LINE>FirebaseFirestore firebaseFirestore = getFirestoreForApp(appName);<NEW_LINE>DocumentReference documentReference = getDocumentForFirestore(firebaseFirestore, path);<NEW_LINE>Tasks.call(getTransactionalExecutor(), () -> parseReadableMap(firebaseFirestore, data)).continueWithTask(getTransactionalExecutor(), task -> {<NEW_LINE>Task<Void> setTask;<NEW_LINE>Map<String, Object> settableData = Objects.requireNonNull(task.getResult());<NEW_LINE>if (options.hasKey("merge") && options.getBoolean("merge")) {<NEW_LINE>setTask = documentReference.set(settableData, SetOptions.merge());<NEW_LINE>} else if (options.hasKey("mergeFields")) {<NEW_LINE>List<String> fields = new ArrayList<>();<NEW_LINE>for (Object object : Objects.requireNonNull(options.getArray("mergeFields")).toArrayList()) {<NEW_LINE>fields.add((String) object);<NEW_LINE>}<NEW_LINE>setTask = documentReference.set(settableData, SetOptions.mergeFields(fields));<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>return setTask;<NEW_LINE>}).addOnCompleteListener(task -> {<NEW_LINE>if (task.isSuccessful()) {<NEW_LINE>promise.resolve(null);<NEW_LINE>} else {<NEW_LINE>rejectPromiseFirestoreException(promise, task.getException());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
setTask = documentReference.set(settableData);
226,728
public void lookupDocuments(List<Point2D_F64> dots, int minLandmarks, List<FoundDocument> output) {<NEW_LINE>output.clear();<NEW_LINE>// It needs to have a minimum of this number of points to work<NEW_LINE>if (dots.size() < numberOfNeighborsN + 1)<NEW_LINE>return;<NEW_LINE>votingBooths.reset();<NEW_LINE>foundMap.clear();<NEW_LINE>resultsStorage.reset();<NEW_LINE>// Used to keep track of what has been seen and what has not been seen<NEW_LINE>votingBooths.<MASK><NEW_LINE>var featureComputed = new LlahFeature(numberOfInvariants);<NEW_LINE>// Compute features, look up matching known features, then vote<NEW_LINE>computeAllFeatures(dots, (dotIdx, pointSet) -> lookupProcessor(pointSet, dotIdx, featureComputed, votingBooths));<NEW_LINE>for (int dotIdx = 0; dotIdx < dots.size(); dotIdx++) {<NEW_LINE>DotVotingBooth booth = votingBooths.get(dotIdx);<NEW_LINE>if (booth.votes.size == 0)<NEW_LINE>continue;<NEW_LINE>DotToLandmark best = booth.votes.get(0);<NEW_LINE>for (int i = 1; i < booth.votes.size; i++) {<NEW_LINE>DotToLandmark b = booth.votes.get(i);<NEW_LINE>if (b.count > best.count) {<NEW_LINE>best = b;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>FoundDocument doc = foundMap.get(best.documentID);<NEW_LINE>if (doc == null) {<NEW_LINE>doc = resultsStorage.grow();<NEW_LINE>doc.init(documents.get(best.documentID));<NEW_LINE>foundMap.put(best.documentID, doc);<NEW_LINE>}<NEW_LINE>if (doc.landmarkHits.get(best.landmarkID) < best.count) {<NEW_LINE>doc.landmarkHits.set(best.landmarkID, best.count);<NEW_LINE>doc.landmarkToDots.set(best.landmarkID, dotIdx);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>foundMap.forEachEntry((docID, doc) -> {<NEW_LINE>if (doc.countSeenLandmarks() >= minLandmarks) {<NEW_LINE>output.add(doc);<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>});<NEW_LINE>}
resize(dots.size());
909,386
static ValueSummary<?> castFromAny(Guard pc, ValueSummary<?> def, UnionVS anyVal) {<NEW_LINE>ValueSummary<?> result;<NEW_LINE>if (def instanceof UnionVS) {<NEW_LINE>return anyVal;<NEW_LINE>}<NEW_LINE>Class<? extends ValueSummary> type = def.getClass();<NEW_LINE>Guard typeGuard = anyVal.getGuardFor(type);<NEW_LINE>Guard pcNotDefined = pc.and(typeGuard.not());<NEW_LINE>Guard pcDefined = pc.and(typeGuard);<NEW_LINE>if (pcDefined.isFalse()) {<NEW_LINE>if (type.equals(PrimitiveVS.class)) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>System.out.println(anyVal.restrict(typeGuard));<NEW_LINE>throw new ClassCastException(String.format("Casting to %s under path constraint %s is not defined", type, pcNotDefined));<NEW_LINE>}<NEW_LINE>result = anyVal.getValue(type).restrict(pc);<NEW_LINE>return result;<NEW_LINE>}
return new PrimitiveVS<>(pc);
1,062,393
public boolean dispatchKeyEvent(KeyEvent event) {<NEW_LINE>CommonApplication.getPreferences().setLastUserInteraction(System.currentTimeMillis());<NEW_LINE>mKeyHandler.checkShortcut(event);<NEW_LINE>if (mDisableKeyEvents || mActiveFragment == null) {<NEW_LINE>// 'll be enabled again after fragment switching<NEW_LINE>Log.d(TAG, "Key events are disabled...");<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>event = mKeyHandler.translateKey(event);<NEW_LINE>if (event == null) {<NEW_LINE>// event is ignored<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (event.getKeyCode() == KeyEvent.KEYCODE_BACK && !mLoadingDone) {<NEW_LINE>Log.d(TAG, "Back pressed. Exiting from the app...");<NEW_LINE>mAppStateWatcher.onExit();<NEW_LINE>SmartUtils.returnToLaunchersDialogOrExit(this);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>Log.d(TAG, "Dispatching event: " + event + ", on fragment: " + mActiveFragment.getClass().getSimpleName());<NEW_LINE>// give a ability to modify this event in the middle of the pipeline<NEW_LINE>mEvent = event;<NEW_LINE>return mVoiceBridge.onKeyEvent(mEvent) || mActiveFragment.<MASK><NEW_LINE>}
dispatchKeyEvent(mEvent) || superDispatchKeyEventWrapper();
107,330
MergeResult _merge(PersonIdent committer, String message) throws IOException {<NEW_LINE>if (revWalk.isMergedInto(branchTip, srcTip)) {<NEW_LINE>// fast-forward<NEW_LINE>mergeCommit = srcTip;<NEW_LINE>refLogMessage = "merge " + src + ": Fast-forward";<NEW_LINE>operationMessage = MessageFormat.format("fast-forwarding {0} to commit {1}", branchTip.getName(), srcTip.getName());<NEW_LINE>return new MergeResult(MergeStatus.MERGED, srcTip.getName());<NEW_LINE>}<NEW_LINE>RecursiveMerger merger = (RecursiveMerger) MergeStrategy.RECURSIVE.newMerger(repository, true);<NEW_LINE>boolean merged = merger.merge(branchTip, srcTip);<NEW_LINE>if (merged) {<NEW_LINE>// create a merge commit and a reference to track the merge commit<NEW_LINE>ObjectId treeId = merger.getResultTreeId();<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>// Create a commit object<NEW_LINE>CommitBuilder commitBuilder = new CommitBuilder();<NEW_LINE>commitBuilder.setCommitter(committer);<NEW_LINE>commitBuilder.setAuthor(committer);<NEW_LINE>commitBuilder.setEncoding(Constants.CHARSET);<NEW_LINE>if (StringUtils.isEmpty(message)) {<NEW_LINE>message = MessageFormat.format("merge {0} into {1}", srcTip.getName(), branchTip.getName());<NEW_LINE>}<NEW_LINE>commitBuilder.setMessage(message);<NEW_LINE>commitBuilder.setParentIds(branchTip.getId(), srcTip.getId());<NEW_LINE>commitBuilder.setTreeId(treeId);<NEW_LINE>// Insert the merge commit into the repository<NEW_LINE>ObjectId mergeCommitId = odi.insert(commitBuilder);<NEW_LINE>odi.flush();<NEW_LINE>mergeCommit = revWalk.parseCommit(mergeCommitId);<NEW_LINE>refLogMessage = "commit: " + mergeCommit.getShortMessage();<NEW_LINE>operationMessage = MessageFormat.format("merging commit {0} into {1}", srcTip.getName(), branchTip.getName());<NEW_LINE>// return the merge commit id<NEW_LINE>return new MergeResult(MergeStatus.MERGED, mergeCommitId.getName());<NEW_LINE>} finally {<NEW_LINE>odi.close();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new MergeResult(MergeStatus.FAILED, null);<NEW_LINE>}
ObjectInserter odi = repository.newObjectInserter();
147,308
public okhttp3.Call findPetsByStatusCall(List<String> status, final ApiCallback _callback) throws ApiException {<NEW_LINE>String basePath = null;<NEW_LINE>// Operation Servers<NEW_LINE>String[] localBasePaths = new String[] {};<NEW_LINE>// Determine Base Path to Use<NEW_LINE>if (localCustomBaseUrl != null) {<NEW_LINE>basePath = localCustomBaseUrl;<NEW_LINE>} else if (localBasePaths.length > 0) {<NEW_LINE>basePath = localBasePaths[localHostIndex];<NEW_LINE>} else {<NEW_LINE>basePath = null;<NEW_LINE>}<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/pet/findByStatus";<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new <MASK><NEW_LINE>Map<String, String> localVarCookieParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>if (status != null) {<NEW_LINE>localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "status", status));<NEW_LINE>}<NEW_LINE>final String[] localVarAccepts = { "application/xml", "application/json" };<NEW_LINE>final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>if (localVarAccept != null) {<NEW_LINE>localVarHeaderParams.put("Accept", localVarAccept);<NEW_LINE>}<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>if (localVarContentType != null) {<NEW_LINE>localVarHeaderParams.put("Content-Type", localVarContentType);<NEW_LINE>}<NEW_LINE>String[] localVarAuthNames = new String[] { "petstore_auth" };<NEW_LINE>return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);<NEW_LINE>}
HashMap<String, String>();
36,584
public static // and uploads it to the blurred bucket.<NEW_LINE>void blur(BlobInfo blobInfo) throws IOException {<NEW_LINE>String bucketName = blobInfo.getBucket();<NEW_LINE>String fileName = blobInfo.getName();<NEW_LINE>// Download image<NEW_LINE>Blob blob = storage.get(BlobId.of(bucketName, fileName));<NEW_LINE>Path download = Paths.get("/tmp/", fileName);<NEW_LINE>blob.downloadTo(download);<NEW_LINE>// Construct the command.<NEW_LINE>List<String> args = new ArrayList<String>();<NEW_LINE>args.add("convert");<NEW_LINE>args.add(download.toString());<NEW_LINE>args.add("-blur");<NEW_LINE>args.add("0x8");<NEW_LINE>Path upload = Paths.<MASK><NEW_LINE>args.add(upload.toString());<NEW_LINE>try {<NEW_LINE>ProcessBuilder pb = new ProcessBuilder(args);<NEW_LINE>Process process = pb.start();<NEW_LINE>process.waitFor();<NEW_LINE>} catch (Exception e) {<NEW_LINE>System.out.println(String.format("Error: %s", e.getMessage()));<NEW_LINE>}<NEW_LINE>// Upload image to blurred bucket.<NEW_LINE>BlobId blurredBlobId = BlobId.of(BLURRED_BUCKET_NAME, fileName);<NEW_LINE>BlobInfo blurredBlobInfo = BlobInfo.newBuilder(blurredBlobId).setContentType(blob.getContentType()).build();<NEW_LINE>try {<NEW_LINE>byte[] blurredFile = Files.readAllBytes(upload);<NEW_LINE>Blob blurredBlob = storage.create(blurredBlobInfo, blurredFile);<NEW_LINE>System.out.println(String.format("Blurred image uploaded to: gs://%s/%s", BLURRED_BUCKET_NAME, fileName));<NEW_LINE>} catch (Exception e) {<NEW_LINE>System.out.println(String.format("Error in upload: %s", e.getMessage()));<NEW_LINE>}<NEW_LINE>// Remove images from fileSystem<NEW_LINE>Files.delete(download);<NEW_LINE>Files.delete(upload);<NEW_LINE>}
get("/tmp/", "blurred-" + fileName);
1,232,237
protected void bindImplementationSpecificMetrics(MeterRegistry registry) {<NEW_LINE>StatisticsGateway stats = getStats();<NEW_LINE>Gauge.builder("cache.remoteSize", stats, StatisticsGateway::getRemoteSize).tags(getTagsWithCacheName()).description("The number of entries held remotely in this cache").register(registry);<NEW_LINE>FunctionCounter.builder("cache.removals", stats, StatisticsGateway::cacheRemoveCount).tags(getTagsWithCacheName()).description("Cache removals").register(registry);<NEW_LINE>FunctionCounter.builder("cache.puts.added", stats, StatisticsGateway::cachePutAddedCount).tags(getTagsWithCacheName()).tags("result", "added").description("Cache puts resulting in a new key/value pair").register(registry);<NEW_LINE>FunctionCounter.builder("cache.puts.added", stats, StatisticsGateway::cachePutUpdatedCount).tags(getTagsWithCacheName()).tags("result", "updated").description("Cache puts resulting in an updated value").register(registry);<NEW_LINE>missMetrics(registry);<NEW_LINE>commitTransactionMetrics(registry);<NEW_LINE>rollbackTransactionMetrics(registry);<NEW_LINE>recoveryTransactionMetrics(registry);<NEW_LINE>Gauge.builder("cache.local.offheap.size", stats, StatisticsGateway::getLocalOffHeapSizeInBytes).tags(getTagsWithCacheName()).description("Local off-heap size").baseUnit(BaseUnits<MASK><NEW_LINE>Gauge.builder("cache.local.heap.size", stats, StatisticsGateway::getLocalHeapSizeInBytes).tags(getTagsWithCacheName()).description("Local heap size").baseUnit(BaseUnits.BYTES).register(registry);<NEW_LINE>Gauge.builder("cache.local.disk.size", stats, StatisticsGateway::getLocalDiskSizeInBytes).tags(getTagsWithCacheName()).description("Local disk size").baseUnit(BaseUnits.BYTES).register(registry);<NEW_LINE>}
.BYTES).register(registry);
744,723
protected CommandExecutionResult executeArg(AbstractEntityDiagram diagram, LineLocation location, RegexResult arg) throws NoSuchColorException {<NEW_LINE>final String codeRaw = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.getLazzy("CODE", 0));<NEW_LINE>final String displayRaw = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.getLazzy("DISPLAY", 0));<NEW_LINE>final String display;<NEW_LINE>final String idShort;<NEW_LINE>if (codeRaw.length() == 0) {<NEW_LINE>idShort = UniqueSequence.getString("##");<NEW_LINE>display = null;<NEW_LINE>} else {<NEW_LINE>idShort = codeRaw;<NEW_LINE>if (displayRaw == null) {<NEW_LINE>display = idShort;<NEW_LINE>} else {<NEW_LINE>display = displayRaw;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final Ident ident = diagram.buildLeafIdent(idShort);<NEW_LINE>final Code code = diagram.V1972() ? ident : diagram.buildCode(idShort);<NEW_LINE>final IGroup currentPackage = diagram.getCurrentGroup();<NEW_LINE>diagram.gotoGroup(ident, code, Display.getWithNewlines(display), GroupType.<MASK><NEW_LINE>final IEntity p = diagram.getCurrentGroup();<NEW_LINE>final String symbol = arg.get("SYMBOL", 0);<NEW_LINE>if ("together".equalsIgnoreCase(symbol)) {<NEW_LINE>p.setThisIsTogether();<NEW_LINE>}<NEW_LINE>p.setUSymbol(USymbols.fromString(symbol, diagram.getSkinParam().actorStyle(), diagram.getSkinParam().componentStyle(), diagram.getSkinParam().packageStyle()));<NEW_LINE>final String stereotype = arg.getLazzy("STEREOTYPE", 0);<NEW_LINE>if (stereotype != null) {<NEW_LINE>p.setStereotype(Stereotype.build(stereotype, false));<NEW_LINE>}<NEW_LINE>final String urlString = arg.get("URL", 0);<NEW_LINE>if (urlString != null) {<NEW_LINE>final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), UrlMode.STRICT);<NEW_LINE>final Url url = urlBuilder.getUrl(urlString);<NEW_LINE>p.addUrl(url);<NEW_LINE>}<NEW_LINE>CommandCreateClassMultilines.addTags(p, arg.get("TAGS", 0));<NEW_LINE>final Colors colors = color().getColor(diagram.getSkinParam().getThemeStyle(), arg, diagram.getSkinParam().getIHtmlColorSet());<NEW_LINE>p.setColors(colors);<NEW_LINE>return CommandExecutionResult.ok();<NEW_LINE>}
PACKAGE, currentPackage, NamespaceStrategy.SINGLE);
39,139
public void updateItem(Type item, boolean empty) {<NEW_LINE>super.updateItem(item, empty);<NEW_LINE>setGraphic(null);<NEW_LINE>if (empty) {<NEW_LINE>setText(null);<NEW_LINE>} else {<NEW_LINE>List<String> args = new ArrayList<>();<NEW_LINE>for (Type arg : item.getArgumentTypes()) {<NEW_LINE>Type used = arg;<NEW_LINE>int arrayLevel = arg.getSort() == Type.ARRAY <MASK><NEW_LINE>if (arrayLevel > 0)<NEW_LINE>used = used.getElementType();<NEW_LINE>String argType = used.getInternalName();<NEW_LINE>if (argType.indexOf('/') > 0) {<NEW_LINE>argType = argType.substring(argType.lastIndexOf('/') + 1);<NEW_LINE>} else if (used.getSort() <= Type.DOUBLE) {<NEW_LINE>argType = used.getClassName();<NEW_LINE>}<NEW_LINE>args.add(argType + array(arrayLevel));<NEW_LINE>}<NEW_LINE>setText(String.join(", ", args));<NEW_LINE>String descArgs = item.getDescriptor();<NEW_LINE>descArgs = descArgs.substring(0, descArgs.indexOf(')') + 1);<NEW_LINE>setTooltip(new Tooltip(descArgs));<NEW_LINE>}<NEW_LINE>}
? arg.getDimensions() : 0;
93,966
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {<NEW_LINE>super.onViewCreated(view, savedInstanceState);<NEW_LINE>RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.tags_suggestion_list);<NEW_LINE>recyclerView.setHasFixedSize(true);<NEW_LINE>recyclerView.setLayoutManager(new LinearLayoutManager(requireActivity()));<NEW_LINE>mAdapter = new TagsRecyclerViewAdapter(requireActivity(), this);<NEW_LINE>mAdapter.setAllTags(mTaxonomyStore.getTagsForSite(mSite));<NEW_LINE>recyclerView.setAdapter(mAdapter);<NEW_LINE>mTagsEditText = (EditText) view.findViewById(R.id.tags_edit_text);<NEW_LINE>mTagsEditText.setOnKeyListener(this);<NEW_LINE>mTagsEditText.requestFocus();<NEW_LINE>ActivityUtils.showKeyboard(mTagsEditText);<NEW_LINE>mTagsEditText.post(() -> mTagsEditText.addTextChangedListener(TagsFragment.this));<NEW_LINE>loadTags();<NEW_LINE>if (!TextUtils.isEmpty(mTags)) {<NEW_LINE>// add a , at the end so the user can start typing a new tag<NEW_LINE>mTags += ",";<NEW_LINE>mTags = StringEscapeUtils.unescapeHtml4(mTags);<NEW_LINE>mTagsEditText.setText(mTags);<NEW_LINE>mTagsEditText.<MASK><NEW_LINE>}<NEW_LINE>filterListForCurrentText();<NEW_LINE>}
setSelection(mTagsEditText.length());
1,212,096
public void validateSchema(String jsonSchema) throws JRException {<NEW_LINE>ObjectMapper mapper = new ObjectMapper();<NEW_LINE>// relax the JSON rules<NEW_LINE>mapper.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true);<NEW_LINE>mapper.configure(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);<NEW_LINE>mapper.configure(JsonParser.Feature.ALLOW_COMMENTS, true);<NEW_LINE>try {<NEW_LINE>JsonNode <MASK><NEW_LINE>if (root.isObject()) {<NEW_LINE>pathToValueNode = new HashMap<>();<NEW_LINE>pathToObjectNode = new HashMap<>();<NEW_LINE>previousPath = null;<NEW_LINE>if (!isValid((ObjectNode) root, JSON_SCHEMA_ROOT_NAME, "", null)) {<NEW_LINE>throw new JRException(EXCEPTION_MESSAGE_KEY_INVALID_JSON_OBJECT_SEMANTIC, (Object[]) null);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new JRException(EXCEPTION_MESSAGE_KEY_INVALID_JSON_OBJECT_ARRAY_FOUND, (Object[]) null);<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new JRException(EXCEPTION_MESSAGE_KEY_INVALID_JSON_OBJECT, (Object[]) null);<NEW_LINE>}<NEW_LINE>}
root = mapper.readTree(jsonSchema);
914,166
private boolean isCfDefUpdated(ColumnInfo columnInfo, CfDef cfDef, boolean isCql3Enabled, boolean isCounterColumnType, TableInfo tableInfo) throws Exception {<NEW_LINE>boolean columnPresent = false;<NEW_LINE>boolean isUpdated = false;<NEW_LINE>for (ColumnDef columnDef : cfDef.getColumn_metadata()) {<NEW_LINE>if (isColumnPresent(columnInfo, columnDef, isCql3Enabled)) {<NEW_LINE>if (!isValidationClassSame(columnInfo, columnDef, isCql3Enabled, isCounterColumnType)) {<NEW_LINE>columnDef.setValidation_class(CassandraValidationClassMapper.getValidationClass(columnInfo<MASK><NEW_LINE>// if (columnInfo.isIndexable() &&<NEW_LINE>// !columnDef.isSetIndex_type())<NEW_LINE>// {<NEW_LINE>// IndexInfo indexInfo =<NEW_LINE>// tableInfo.getColumnToBeIndexed(columnInfo.getColumnName());<NEW_LINE>// columnDef.setIndex_type(CassandraIndexHelper.getIndexType(indexInfo.getIndexType()));<NEW_LINE>// columnDef.isSetIndex_type();<NEW_LINE>// columnDef.setIndex_typeIsSet(true);<NEW_LINE>// columnDef.setIndex_nameIsSet(true);<NEW_LINE>// }<NEW_LINE>// else<NEW_LINE>// {<NEW_LINE>columnDef.setIndex_nameIsSet(false);<NEW_LINE>columnDef.setIndex_typeIsSet(false);<NEW_LINE>// }<NEW_LINE>isUpdated = true;<NEW_LINE>}<NEW_LINE>columnPresent = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!columnPresent) {<NEW_LINE>cfDef.addToColumn_metadata(getColumnMetadata(columnInfo, tableInfo));<NEW_LINE>isUpdated = true;<NEW_LINE>}<NEW_LINE>return isUpdated;<NEW_LINE>}
.getType(), isCql3Enabled));
7,079
public static DescribeAppVersionResponse unmarshall(DescribeAppVersionResponse describeAppVersionResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAppVersionResponse.setRequestId(_ctx.stringValue("DescribeAppVersionResponse.RequestId"));<NEW_LINE>AppVersion appVersion = new AppVersion();<NEW_LINE>appVersion.setId(_ctx.longValue("DescribeAppVersionResponse.AppVersion.Id"));<NEW_LINE>appVersion.setAppId(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.AppId"));<NEW_LINE>appVersion.setVersionCode(_ctx.longValue("DescribeAppVersionResponse.AppVersion.VersionCode"));<NEW_LINE>appVersion.setReleaseNote(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.ReleaseNote"));<NEW_LINE>appVersion.setRemark(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.Remark"));<NEW_LINE>appVersion.setStatus(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.Status"));<NEW_LINE>appVersion.setAppVersion(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.AppVersion"));<NEW_LINE>appVersion.setDownloadUrl<MASK><NEW_LINE>appVersion.setOriginalUrl(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.OriginalUrl"));<NEW_LINE>appVersion.setIsForceUpgrade(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.IsForceUpgrade"));<NEW_LINE>appVersion.setIsSilentUpgrade(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.IsSilentUpgrade"));<NEW_LINE>appVersion.setMd5(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.Md5"));<NEW_LINE>appVersion.setApkMd5(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.ApkMd5"));<NEW_LINE>appVersion.setSize(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.Size"));<NEW_LINE>appVersion.setGmtCreate(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.GmtCreate"));<NEW_LINE>appVersion.setGmtModify(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.GmtModify"));<NEW_LINE>appVersion.setIsNeedRestart(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.IsNeedRestart"));<NEW_LINE>appVersion.setIsAllowNewInstall(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.IsAllowNewInstall"));<NEW_LINE>appVersion.setRestartType(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.RestartType"));<NEW_LINE>appVersion.setRestartAppType(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.RestartAppType"));<NEW_LINE>appVersion.setRestartAppParam(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.RestartAppParam"));<NEW_LINE>appVersion.setInstallType(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.InstallType"));<NEW_LINE>appVersion.setBlackVersionList(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.BlackVersionList"));<NEW_LINE>appVersion.setWhiteVersionList(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.WhiteVersionList"));<NEW_LINE>appVersion.setAppName(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.AppName"));<NEW_LINE>appVersion.setStatusName(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.StatusName"));<NEW_LINE>appVersion.setPackageName(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.PackageName"));<NEW_LINE>List<AdaptersItem> adapters = new ArrayList<AdaptersItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeAppVersionResponse.AppVersion.Adapters.Length"); i++) {<NEW_LINE>AdaptersItem adaptersItem = new AdaptersItem();<NEW_LINE>adaptersItem.setId(_ctx.longValue("DescribeAppVersionResponse.AppVersion.Adapters[" + i + "].Id"));<NEW_LINE>adaptersItem.setVersionId(_ctx.longValue("DescribeAppVersionResponse.AppVersion.Adapters[" + i + "].VersionId"));<NEW_LINE>adaptersItem.setDeviceModelId(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.Adapters[" + i + "].DeviceModelId"));<NEW_LINE>adaptersItem.setMinOsVersion(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.Adapters[" + i + "].MinOsVersion"));<NEW_LINE>adaptersItem.setMaxOsVersion(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.Adapters[" + i + "].MaxOsVersion"));<NEW_LINE>adaptersItem.setDeviceModelName(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.Adapters[" + i + "].DeviceModelName"));<NEW_LINE>adapters.add(adaptersItem);<NEW_LINE>}<NEW_LINE>appVersion.setAdapters(adapters);<NEW_LINE>describeAppVersionResponse.setAppVersion(appVersion);<NEW_LINE>return describeAppVersionResponse;<NEW_LINE>}
(_ctx.stringValue("DescribeAppVersionResponse.AppVersion.DownloadUrl"));
1,762,947
public static ListFunctionResponse unmarshall(ListFunctionResponse listFunctionResponse, UnmarshallerContext _ctx) {<NEW_LINE>listFunctionResponse.setRequestId(_ctx.stringValue("ListFunctionResponse.RequestId"));<NEW_LINE>listFunctionResponse.setHttpStatusCode(_ctx.stringValue("ListFunctionResponse.HttpStatusCode"));<NEW_LINE>listFunctionResponse.setSuccess(_ctx.booleanValue("ListFunctionResponse.Success"));<NEW_LINE>listFunctionResponse.setCode(_ctx.stringValue("ListFunctionResponse.Code"));<NEW_LINE>listFunctionResponse.setMessage(_ctx.stringValue("ListFunctionResponse.Message"));<NEW_LINE>Paginator paginator = new Paginator();<NEW_LINE>paginator.setPageSize(_ctx.integerValue("ListFunctionResponse.Paginator.PageSize"));<NEW_LINE>paginator.setPageNum(_ctx.integerValue("ListFunctionResponse.Paginator.PageNum"));<NEW_LINE>paginator.setTotal(_ctx.integerValue("ListFunctionResponse.Paginator.Total"));<NEW_LINE>paginator.setPageCount(_ctx.integerValue("ListFunctionResponse.Paginator.PageCount"));<NEW_LINE>listFunctionResponse.setPaginator(paginator);<NEW_LINE>List<DataListItem> dataList = new ArrayList<DataListItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListFunctionResponse.DataList.Length"); i++) {<NEW_LINE>DataListItem dataListItem = new DataListItem();<NEW_LINE>dataListItem.setName(_ctx.stringValue("ListFunctionResponse.DataList[" + i + "].Name"));<NEW_LINE>dataListItem.setDesc(_ctx.stringValue("ListFunctionResponse.DataList[" + i + "].Desc"));<NEW_LINE>dataListItem.setCreatedAt(_ctx.stringValue("ListFunctionResponse.DataList[" + i + "].CreatedAt"));<NEW_LINE>dataListItem.setModifiedAt(_ctx.stringValue("ListFunctionResponse.DataList[" + i + "].ModifiedAt"));<NEW_LINE>Spec spec = new Spec();<NEW_LINE>spec.setRuntime(_ctx.stringValue("ListFunctionResponse.DataList[" + i + "].Spec.Runtime"));<NEW_LINE>spec.setMemory(_ctx.stringValue<MASK><NEW_LINE>spec.setTimeout(_ctx.stringValue("ListFunctionResponse.DataList[" + i + "].Spec.Timeout"));<NEW_LINE>dataListItem.setSpec(spec);<NEW_LINE>dataList.add(dataListItem);<NEW_LINE>}<NEW_LINE>listFunctionResponse.setDataList(dataList);<NEW_LINE>return listFunctionResponse;<NEW_LINE>}
("ListFunctionResponse.DataList[" + i + "].Spec.Memory"));
84,417
private void copyExecutableAndClasspath(PackrOutput output) throws IOException {<NEW_LINE>byte[] exe = null;<NEW_LINE>String extension = "";<NEW_LINE>switch(config.platform) {<NEW_LINE>case Windows64:<NEW_LINE>exe = readResource("/packr-windows-x64.exe");<NEW_LINE>extension = ".exe";<NEW_LINE>break;<NEW_LINE>case Linux64:<NEW_LINE>exe = readResource("/packr-linux-x64");<NEW_LINE>break;<NEW_LINE>case MacOS:<NEW_LINE>exe = readResource("/packr-mac");<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>System.out.println("Copying executable ...");<NEW_LINE>Files.write(output.executableFolder.toPath().resolve(config.executable + extension), exe);<NEW_LINE>PackrFileUtils.chmodX(new File(output.executableFolder, config.executable + extension));<NEW_LINE><MASK><NEW_LINE>for (String file : config.classpath) {<NEW_LINE>File cpSrc = new File(file);<NEW_LINE>File cpDst = new File(output.resourcesFolder, new File(file).getName());<NEW_LINE>if (cpSrc.isFile()) {<NEW_LINE>Files.copy(cpSrc.toPath(), cpDst.toPath(), StandardCopyOption.COPY_ATTRIBUTES);<NEW_LINE>} else if (cpSrc.isDirectory()) {<NEW_LINE>PackrFileUtils.copyDirectory(cpSrc, cpDst);<NEW_LINE>} else {<NEW_LINE>System.err.println("Warning! Classpath not found: " + cpSrc);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
System.out.println("Copying classpath(s) ...");
828,813
final CacheSubnetGroup executeCreateCacheSubnetGroup(CreateCacheSubnetGroupRequest createCacheSubnetGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createCacheSubnetGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<CreateCacheSubnetGroupRequest> request = null;<NEW_LINE>Response<CacheSubnetGroup> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateCacheSubnetGroupRequestMarshaller().marshall(super.beforeMarshalling(createCacheSubnetGroupRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ElastiCache");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateCacheSubnetGroup");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<CacheSubnetGroup> responseHandler = new StaxResponseHandler<CacheSubnetGroup>(new CacheSubnetGroupStaxUnmarshaller());<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.ClientExecuteTime);
138,817
final ListMonitoringExecutionsResult executeListMonitoringExecutions(ListMonitoringExecutionsRequest listMonitoringExecutionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listMonitoringExecutionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListMonitoringExecutionsRequest> request = null;<NEW_LINE>Response<ListMonitoringExecutionsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListMonitoringExecutionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listMonitoringExecutionsRequest));<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, "SageMaker");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListMonitoringExecutions");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListMonitoringExecutionsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListMonitoringExecutionsResultJsonUnmarshaller());<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);
470,881
public static void main(String[] args) throws Exception {<NEW_LINE>if (args.length < 2) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>System.err.println("Usage: IconExe <windows executable> <ico file>");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ImageLoader loader = new ImageLoader();<NEW_LINE>List<ImageData> images = new ArrayList<ImageData>();<NEW_LINE>for (int i = 1; i < args.length; i++) {<NEW_LINE>try {<NEW_LINE>// An ICO should contain 7 images, a BMP will contain 1<NEW_LINE>ImageData[] current = loader.load(args[i]);<NEW_LINE>for (int j = 0; j < current.length; j++) {<NEW_LINE>images.add(current[j]);<NEW_LINE>}<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>// ignore so that we process the other images<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ImageData[] data = new ImageData[images.size()];<NEW_LINE><MASK><NEW_LINE>int nMissing = unloadIcons(args[0], data);<NEW_LINE>if (nMissing != 0)<NEW_LINE>// $NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$<NEW_LINE>System.err.println("Error - " + nMissing + " icon(s) not replaced in " + args[0] + " using " + args[1]);<NEW_LINE>}
data = images.toArray(data);
111,547
public Result<String> scheduleReservations(String eventName, AdminReservationModification body, boolean singleReservation, String username) {<NEW_LINE>// safety check: if there are more than 150 people in a single reservation, the reservation page could take a while before showing up,<NEW_LINE>// therefore we will limit the maximum amount of people in a single reservation to 100. This will be addressed in rel. 2.0<NEW_LINE>if (singleReservation && body.getTicketsInfo().stream().mapToLong(ti -> ti.getAttendees().size()).sum() > 100) {<NEW_LINE>return Result.error(ErrorCode.custom("MAX_NUMBER_EXCEEDED", "Maximum allowed attendees per reservation is 100"));<NEW_LINE>}<NEW_LINE>// #620 - validate reference:<NEW_LINE>var attendeesWithDuplicateReference = body.getTicketsInfo().stream().flatMap(ti -> ti.getAttendees().stream()).filter(attendee -> StringUtils.isNotEmpty(attendee.getReference())).collect(Collectors.groupingBy(attendee -> attendee.getReference().trim(), Collectors.counting())).entrySet().stream().filter(e -> e.getValue() > 1).map(Map.Entry::getKey).limit(5).toList();<NEW_LINE>if (!attendeesWithDuplicateReference.isEmpty()) {<NEW_LINE>return Result.error(ErrorCode.custom<MASK><NEW_LINE>}<NEW_LINE>return eventManager.getOptionalByName(eventName, username).map(event -> adminReservationManager.validateTickets(body, event)).map(request -> request.flatMap(pair -> insertRequest(pair.getRight(), pair.getLeft(), singleReservation, username))).orElseGet(() -> Result.error(ErrorCode.ReservationError.UPDATE_FAILED));<NEW_LINE>}
("DUPLICATE_REFERENCE", "The following codes are duplicate:" + attendeesWithDuplicateReference));
692,930
public static Map<PoolType, Collection<String>> classifyMemoryPools(MBeanServerConnection conn) throws IOException {<NEW_LINE>RuntimeMXBean rtmx = JMX.newMXBeanProxy(conn, RUNTIME_MXBEAN, RuntimeMXBean.class);<NEW_LINE>boolean jrockit = rtmx.getVmName().toUpperCase().contains("JROCKIT");<NEW_LINE>Map<PoolType, Collection<String>> map = new HashMap<GcKnowledgeBase.PoolType, Collection<String>>();<NEW_LINE>for (ObjectName gcn : conn.queryNames(COLLECTORS_PATTERN, null)) {<NEW_LINE>GarbageCollectorMXBean gc = JMX.newMXBeanProxy(conn, gcn, GarbageCollectorMXBean.class);<NEW_LINE>String gcName = jrockit <MASK><NEW_LINE>for (String pool : gc.getMemoryPoolNames()) {<NEW_LINE>PoolType type = classify(gcName, pool);<NEW_LINE>if (type != null) {<NEW_LINE>add(map, type, pool);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return map;<NEW_LINE>}
? "JRockit" : gc.getName();
322,735
public Operation.OperationResult executeFixedCostOperation(final MessageFrame frame, final EVM evm) {<NEW_LINE>final Bytes value0 = frame.popStackItem();<NEW_LINE>final Bytes value1 = frame.popStackItem();<NEW_LINE>final Bytes value2 = frame.popStackItem();<NEW_LINE>if (value2.isZero()) {<NEW_LINE>frame.pushStackItem(UInt256.ZERO);<NEW_LINE>} else {<NEW_LINE>BigInteger b0 = new BigInteger(1, value0.toArrayUnsafe());<NEW_LINE>BigInteger b1 = new BigInteger(<MASK><NEW_LINE>BigInteger b2 = new BigInteger(1, value2.toArrayUnsafe());<NEW_LINE>BigInteger result = b0.multiply(b1).mod(b2);<NEW_LINE>Bytes resultBytes = Bytes.wrap(result.toByteArray());<NEW_LINE>if (resultBytes.size() > 32) {<NEW_LINE>resultBytes = resultBytes.slice(resultBytes.size() - 32, 32);<NEW_LINE>}<NEW_LINE>final byte[] padding = new byte[32 - resultBytes.size()];<NEW_LINE>Arrays.fill(padding, result.signum() < 0 ? (byte) 0xFF : 0x00);<NEW_LINE>frame.pushStackItem(Bytes.concatenate(Bytes.wrap(padding), resultBytes));<NEW_LINE>}<NEW_LINE>return successResponse;<NEW_LINE>}
1, value1.toArrayUnsafe());
308,530
private Node parseMixin() {<NEW_LINE>Mixin mixinToken = (Mixin) expect(Mixin.class);<NEW_LINE>MixinNode node = new MixinNode();<NEW_LINE>node.setName(mixinToken.getValue());<NEW_LINE>node.setLineNumber(mixinToken.getLineNumber());<NEW_LINE>node.setFileName(filename);<NEW_LINE>if (StringUtils.isNotBlank(mixinToken.getArguments())) {<NEW_LINE>node.setArguments(mixinToken.getArguments());<NEW_LINE>}<NEW_LINE>List<String> args = node.getArguments();<NEW_LINE>String rest;<NEW_LINE>if (args.size() > 0) {<NEW_LINE>Matcher matcher = Pattern.compile("^\\.\\.\\.").matcher(args.get(args.size() - 1).trim());<NEW_LINE>if (matcher.find(0)) {<NEW_LINE>rest = args.remove(args.size() - 1).trim().replaceAll("^\\.\\.\\.", "");<NEW_LINE>node.setRest(rest);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (peek() instanceof Indent) {<NEW_LINE>this.inMixin++;<NEW_LINE>node.setBlock(block());<NEW_LINE>node.setCall(false);<NEW_LINE>this.mixins.put(<MASK><NEW_LINE>this.inMixin--;<NEW_LINE>return node;<NEW_LINE>} else {<NEW_LINE>node.setCall(true);<NEW_LINE>return node;<NEW_LINE>}<NEW_LINE>}
mixinToken.getValue(), node);
855,258
public static QueryPushStatByMsgResponse unmarshall(QueryPushStatByMsgResponse queryPushStatByMsgResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryPushStatByMsgResponse.setRequestId(_ctx.stringValue("QueryPushStatByMsgResponse.RequestId"));<NEW_LINE>List<PushStat> pushStats = new ArrayList<PushStat>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("QueryPushStatByMsgResponse.PushStats.Length"); i++) {<NEW_LINE>PushStat pushStat = new PushStat();<NEW_LINE>pushStat.setMessageId(_ctx.stringValue<MASK><NEW_LINE>pushStat.setDeletedCount(_ctx.longValue("QueryPushStatByMsgResponse.PushStats[" + i + "].DeletedCount"));<NEW_LINE>pushStat.setOpenedCount(_ctx.longValue("QueryPushStatByMsgResponse.PushStats[" + i + "].OpenedCount"));<NEW_LINE>pushStat.setSmsReceiveSuccessCount(_ctx.longValue("QueryPushStatByMsgResponse.PushStats[" + i + "].SmsReceiveSuccessCount"));<NEW_LINE>pushStat.setSmsSkipCount(_ctx.longValue("QueryPushStatByMsgResponse.PushStats[" + i + "].SmsSkipCount"));<NEW_LINE>pushStat.setSmsReceiveFailedCount(_ctx.longValue("QueryPushStatByMsgResponse.PushStats[" + i + "].SmsReceiveFailedCount"));<NEW_LINE>pushStat.setSmsFailedCount(_ctx.longValue("QueryPushStatByMsgResponse.PushStats[" + i + "].SmsFailedCount"));<NEW_LINE>pushStat.setReceivedCount(_ctx.longValue("QueryPushStatByMsgResponse.PushStats[" + i + "].ReceivedCount"));<NEW_LINE>pushStat.setSentCount(_ctx.longValue("QueryPushStatByMsgResponse.PushStats[" + i + "].SentCount"));<NEW_LINE>pushStat.setSmsSentCount(_ctx.longValue("QueryPushStatByMsgResponse.PushStats[" + i + "].SmsSentCount"));<NEW_LINE>pushStat.setAcceptCount(_ctx.longValue("QueryPushStatByMsgResponse.PushStats[" + i + "].AcceptCount"));<NEW_LINE>pushStats.add(pushStat);<NEW_LINE>}<NEW_LINE>queryPushStatByMsgResponse.setPushStats(pushStats);<NEW_LINE>return queryPushStatByMsgResponse;<NEW_LINE>}
("QueryPushStatByMsgResponse.PushStats[" + i + "].MessageId"));
195,079
private void requestNewTorIdentity() {<NEW_LINE>switch(torStatus) {<NEW_LINE>case // tor is on, we can ask for a new identity<NEW_LINE>STATUS_ON:<NEW_LINE>Rotate3dAnimation rotation = new Rotate3dAnimation(ROTATE_FROM, ROTATE_TO, imgStatus.getWidth() / 2f, imgStatus.getWidth() / 2f, 20f, false);<NEW_LINE>rotation.setFillAfter(true);<NEW_LINE>rotation.setInterpolator(new AccelerateInterpolator());<NEW_LINE>rotation.setDuration<MASK><NEW_LINE>rotation.setRepeatCount(0);<NEW_LINE>imgStatus.startAnimation(rotation);<NEW_LINE>lblStatus.setText(getString(R.string.newnym));<NEW_LINE>sendIntentToService(TorControlCommands.SIGNAL_NEWNYM);<NEW_LINE>break;<NEW_LINE>case STATUS_STARTING:<NEW_LINE>// tor is starting up, a new identity isn't needed<NEW_LINE>return;<NEW_LINE>case STATUS_OFF:<NEW_LINE>case STATUS_STOPPING:<NEW_LINE>startTor();<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}
((long) 2 * 1000);
695,946
private boolean isAnnotationEnabled(Class<? extends Annotation> clazz) {<NEW_LINE>BeanManager bm = CDI<MASK><NEW_LINE>LookupResult<? extends Annotation> lookupResult = lookupAnnotation(annotatedMethod, clazz, bm);<NEW_LINE>if (lookupResult == null) {<NEW_LINE>// not present<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String value;<NEW_LINE>final String annotationType = clazz.getSimpleName();<NEW_LINE>// Check if property defined at method level<NEW_LINE>Method method = annotatedMethod.getJavaMember();<NEW_LINE>value = getParameter(method.getDeclaringClass().getName(), method.getName(), annotationType, "enabled");<NEW_LINE>if (value != null) {<NEW_LINE>return Boolean.parseBoolean(value);<NEW_LINE>}<NEW_LINE>// Check if property defined at class level<NEW_LINE>value = getParameter(method.getDeclaringClass().getName(), annotationType, "enabled");<NEW_LINE>if (value != null) {<NEW_LINE>return Boolean.parseBoolean(value);<NEW_LINE>}<NEW_LINE>// Check if property defined at global level<NEW_LINE>value = getParameter(annotationType, "enabled");<NEW_LINE>if (value != null) {<NEW_LINE>return Boolean.parseBoolean(value);<NEW_LINE>}<NEW_LINE>// Default is enabled<NEW_LINE>return clazz == Fallback.class || FaultToleranceExtension.isFaultToleranceEnabled();<NEW_LINE>}
.current().getBeanManager();
1,433,325
@NoCache<NEW_LINE>@Consumes(MediaType.APPLICATION_JSON)<NEW_LINE>@Produces({ MediaType.APPLICATION_JSON, "application/javascript" })<NEW_LINE>@Deprecated()<NEW_LINE>public Response updateFields(@PathParam("typeIdOrVarName") final String typeIdOrVarName, final String fieldsJson, @Context final HttpServletRequest httpServletRequest, @Context final HttpServletResponse httpServletResponse) throws DotDataException, DotSecurityException {<NEW_LINE>final InitDataObject initData = this.webResource.init(null, httpServletRequest, httpServletResponse, false, null);<NEW_LINE>final User user = initData.getUser();<NEW_LINE>Response response = null;<NEW_LINE>try {<NEW_LINE>final List<Field> fields = new JsonFieldTransformer(fieldsJson).asList();<NEW_LINE>for (final Field field : fields) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>final ContentType contentType = APILocator.getContentTypeAPI(user).find(typeIdOrVarName);<NEW_LINE>final List<Field> contentTypeFields = fieldAPI.byContentTypeId(contentType.id());<NEW_LINE>response = Response.ok(new ResponseEntityView(new JsonFieldTransformer(contentTypeFields).mapList())).build();<NEW_LINE>} catch (Exception e) {<NEW_LINE>response = ResponseUtil.mapExceptionResponse(e);<NEW_LINE>}<NEW_LINE>return response;<NEW_LINE>}
fieldAPI.save(field, user);
897,589
public Dialog onCreateDialog(Bundle savedInstanceState) {<NEW_LINE>final Activity activity = getActivity();<NEW_LINE>final Story story = (Story) getArguments().getSerializable(STORY);<NEW_LINE>final String commentUserId = getArguments().getString(COMMENT_USER_ID);<NEW_LINE>final String replyId = getArguments().getString(REPLY_ID);<NEW_LINE>String replyText = getArguments().getString(REPLY_TEXT);<NEW_LINE>AlertDialog.Builder builder = new AlertDialog.Builder(activity);<NEW_LINE>builder.setTitle(R.string.edit_reply);<NEW_LINE>LayoutInflater layoutInflater = LayoutInflater.from(activity);<NEW_LINE>View replyView = layoutInflater.inflate(R.layout.reply_dialog, null);<NEW_LINE>builder.setView(replyView);<NEW_LINE>final EditText reply = (EditText) replyView.<MASK><NEW_LINE>reply.setText(replyText);<NEW_LINE>builder.setPositiveButton(R.string.edit_reply_update, new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialogInterface, int i) {<NEW_LINE>String replyText = reply.getText().toString();<NEW_LINE>FeedUtils.updateReply(activity, story, commentUserId, replyId, replyText);<NEW_LINE>EditReplyDialogFragment.this.dismiss();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>builder.setNegativeButton(R.string.edit_reply_delete, new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialogInterface, int i) {<NEW_LINE>FeedUtils.deleteReply(activity, story, commentUserId, replyId);<NEW_LINE>EditReplyDialogFragment.this.dismiss();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return builder.create();<NEW_LINE>}
findViewById(R.id.reply_field);
425,597
public static void main(String[] args) {<NEW_LINE>ReStructuredTextConverter formatter = new ReStructuredTextConverter();<NEW_LINE>formatter.addSection("Section");<NEW_LINE>formatter.addSubSection("SubSection");<NEW_LINE>formatter.addSubSubSection("SubSubSection");<NEW_LINE>formatter.addChapter("Chapter");<NEW_LINE>formatter.addPart("Part");<NEW_LINE>formatter.addBold("Hi everybody");<NEW_LINE>formatter.newLine();<NEW_LINE>formatter.newLine();<NEW_LINE>formatter.addBold("Hi");<NEW_LINE>formatter.addItalic("Hello");<NEW_LINE>formatter.addText("Hi all");<NEW_LINE>formatter.addQuote("Items");<NEW_LINE>formatter.addQuote("Item 1", 1);<NEW_LINE>formatter.addQuote("Item 2", 1);<NEW_LINE>formatter.addQuote("Item 2.1", 2);<NEW_LINE>formatter.addQuote("Item 2.2", 2);<NEW_LINE>formatter.addQuote("Item 2.3", 2);<NEW_LINE>formatter.addQuote("Item 3", 1);<NEW_LINE>formatter.addQuoteNumeric("Other");<NEW_LINE>formatter.addQuoteNumeric("Description 1", 1);<NEW_LINE>formatter.addQuoteNumeric("Description 2", 2);<NEW_LINE>formatter.addQuoteNumeric("Description 2.1", 3);<NEW_LINE>formatter.addQuoteNumeric("Description 2.2", 3);<NEW_LINE>formatter.addQuoteNumeric("Description 2.3", 3);<NEW_LINE>formatter.addQuoteNumeric("Description 3", 2);<NEW_LINE>formatter.addText("This is a collection of key documentation gathered from the ADempiere wiki and the collective experience of the " + "ADempiere Development Community. The aim of this collection is to provide a searchable and usable source of project documentation that will " + "improve on the data contained in the wiki while enhancing the readers experience. ");<NEW_LINE>formatter.addExternalLink("ADempiere Test", "http://demo.erpya.com:8888");<NEW_LINE>formatter.addText(" si no le interesa revise tambien ");<NEW_LINE><MASK><NEW_LINE>formatter.addCode("String a = \"Epale\";");<NEW_LINE>TableTextConverter table = new TableTextConverter();<NEW_LINE>ArrayList<String> row = new ArrayList<>();<NEW_LINE>row.add("Value");<NEW_LINE>row.add("Name");<NEW_LINE>row.add("Description");<NEW_LINE>table.addRow(row);<NEW_LINE>row = new ArrayList<>();<NEW_LINE>row.add("Test");<NEW_LINE>row.add("Test Process");<NEW_LINE>row.add("A Test Process");<NEW_LINE>table.addRow(row);<NEW_LINE>row = new ArrayList<>();<NEW_LINE>row.add("Production");<NEW_LINE>row.add("Production Process");<NEW_LINE>row.add("A Production Process");<NEW_LINE>table.addRow(row);<NEW_LINE>row = new ArrayList<>();<NEW_LINE>row.add("Report");<NEW_LINE>row.add("Test Report");<NEW_LINE>row.add("A Test Report");<NEW_LINE>table.addRow(row);<NEW_LINE>//<NEW_LINE>formatter.addTable(table);<NEW_LINE>// Get it gfor a file<NEW_LINE>System.out.println(formatter.toString());<NEW_LINE>}
formatter.addExternalLink("ADempiere Test 1 ", "http://demo.erpya.com:8888/webui/");
61,448
protected JMenu createMenu() {<NEW_LINE>JMenu menu = new JMenu(this);<NEW_LINE>JMenuItem item;<NEW_LINE>if (lkp == null) {<NEW_LINE>org.openide.awt.Mnemonics.setLocalizedText(menu, Bundle.CTL_MenuItem_ConflictsMenu());<NEW_LINE>item = new JMenuItem();<NEW_LINE>Action action = SystemAction.get(ResolveConflictsAction.class);<NEW_LINE>Utils.setAcceleratorBindings(MercurialAnnotator.ACTIONS_PATH_PREFIX, action);<NEW_LINE>Actions.connect(item, action, false);<NEW_LINE>menu.add(item);<NEW_LINE>item = new JMenuItem();<NEW_LINE>action = (Action) SystemAction.get(ConflictResolvedAction.class);<NEW_LINE>Utils.setAcceleratorBindings(MercurialAnnotator.ACTIONS_PATH_PREFIX, action);<NEW_LINE>Actions.connect(item, action, false);<NEW_LINE>menu.add(item);<NEW_LINE>} else {<NEW_LINE>// NOI18N<NEW_LINE>item = menu.add(SystemActionBridge.createAction(SystemAction.get(ResolveConflictsAction.class), NbBundle.getMessage(MercurialAnnotator.class, "CTL_PopupMenuItem_Resolve"), lkp, MercurialAnnotator.ACTIONS_PATH_PREFIX));<NEW_LINE>org.openide.awt.Mnemonics.setLocalizedText(item, item.getText());<NEW_LINE>// NOI18N<NEW_LINE>item = menu.add(SystemActionBridge.createAction(SystemAction.get(ConflictResolvedAction.class), NbBundle.getMessage(MercurialAnnotator.class, "CTL_PopupMenuItem_MarkResolved"), lkp, MercurialAnnotator.ACTIONS_PATH_PREFIX));<NEW_LINE>org.openide.awt.Mnemonics.setLocalizedText(<MASK><NEW_LINE>}<NEW_LINE>return menu;<NEW_LINE>}
item, item.getText());
1,702,687
public static CallInstr decode(IRReaderDecoder d) {<NEW_LINE>if (RubyInstanceConfig.IR_READING_DEBUG)<NEW_LINE>System.out.println("decodeCall");<NEW_LINE>int callTypeOrdinal = d.decodeInt();<NEW_LINE>CallType callType = CallType.fromOrdinal(callTypeOrdinal);<NEW_LINE>if (RubyInstanceConfig.IR_READING_DEBUG)<NEW_LINE>System.out.println("decodeCall - calltype: " + callType);<NEW_LINE>RubySymbol name = d.decodeSymbol();<NEW_LINE>if (RubyInstanceConfig.IR_READING_DEBUG)<NEW_LINE>System.out.println("decodeCall - methaddr: " + name);<NEW_LINE>Operand receiver = d.decodeOperand();<NEW_LINE>if (RubyInstanceConfig.IR_READING_DEBUG)<NEW_LINE>System.out.println("decodeCall - receiver: " + receiver);<NEW_LINE>int argsCount = d.decodeInt();<NEW_LINE>if (RubyInstanceConfig.IR_READING_DEBUG)<NEW_LINE>System.out.println("decodeCall - # of args: " + argsCount);<NEW_LINE>boolean hasClosureArg = argsCount < 0;<NEW_LINE>int argsLength = hasClosureArg ? (-1 * (argsCount + 1)) : argsCount;<NEW_LINE>if (RubyInstanceConfig.IR_READING_DEBUG)<NEW_LINE>System.out.println("decodeCall - # of args(2): " + argsLength);<NEW_LINE>if (RubyInstanceConfig.IR_READING_DEBUG)<NEW_LINE>System.out.println("decodeCall - hasClosure: " + hasClosureArg);<NEW_LINE>Operand[] args = new Operand[argsLength];<NEW_LINE>for (int i = 0; i < argsLength; i++) {<NEW_LINE>args[i] = d.decodeOperand();<NEW_LINE>}<NEW_LINE>Operand closure = hasClosureArg ? d.decodeOperand() : null;<NEW_LINE>if (RubyInstanceConfig.IR_READING_DEBUG)<NEW_LINE>System.out.println("before result");<NEW_LINE><MASK><NEW_LINE>if (RubyInstanceConfig.IR_READING_DEBUG)<NEW_LINE>System.out.println("decoding call, result: " + result);<NEW_LINE>return create(d.getCurrentScope(), callType, result, name, receiver, args, closure);<NEW_LINE>}
Variable result = d.decodeVariable();
1,167,582
public PyObject __call__(PyObject[] args, String[] kwds) {<NEW_LINE>if (args.length == 0) {<NEW_LINE>throw Py.TypeError("sorted() takes at least 1 argument (0 given)");<NEW_LINE>} else if (args.length > 4) {<NEW_LINE>throw Py.TypeError(String.format("sorted() takes at most 4 arguments (%s given)", args.length));<NEW_LINE>} else {<NEW_LINE>PyObject iter = args[0].__iter__();<NEW_LINE>if (iter == null) {<NEW_LINE>throw Py.TypeError(String.format("'%s' object is not iterable", args[0].getType().fastGetName()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>PyList seq = new PyList(args[0]);<NEW_LINE>PyObject[] newargs = new <MASK><NEW_LINE>System.arraycopy(args, 1, newargs, 0, args.length - 1);<NEW_LINE>ArgParser ap = new ArgParser("sorted", newargs, kwds, new String[] { "cmp", "key", "reverse" }, 0);<NEW_LINE>PyObject cmp = ap.getPyObject(0, Py.None);<NEW_LINE>PyObject key = ap.getPyObject(1, Py.None);<NEW_LINE>PyObject reverse = ap.getPyObject(2, Py.None);<NEW_LINE>seq.sort(cmp, key, reverse);<NEW_LINE>return seq;<NEW_LINE>}
PyObject[args.length - 1];
352,758
private <T extends Result> CompletableFuture<T> executeRequestOnExecutor(Parameters parameters, long queryStartNanoTime, Supplier<Request> requestSupplier) {<NEW_LINE>return runOnExecutor(() -> {<NEW_LINE>QueryState queryState = new QueryState(clientState);<NEW_LINE>Request request = requestSupplier.get();<NEW_LINE>if (parameters.tracingRequested()) {<NEW_LINE>ReflectionUtils.setTracingRequested(request);<NEW_LINE>}<NEW_LINE>request.setCustomPayload(parameters.customPayload().orElse(null));<NEW_LINE>Message.Response response = request.execute(queryState, queryStartNanoTime);<NEW_LINE>// There is only 2 types of response that can come out: either a ResultMessage (which<NEW_LINE>// itself can of different kind), or an ErrorMessage.<NEW_LINE>if (response instanceof ErrorMessage) {<NEW_LINE>// Note that we convert in runOnExecutor (to handle exceptions coming from other<NEW_LINE>// parts of this method), but we need an unchecked exception here anyway, so<NEW_LINE>// we convert, and runOnExecutor will detect it's already converted.<NEW_LINE>throw Conversion.convertInternalException((Throwable) (<MASK><NEW_LINE>}<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>T result = (T) Conversion.toResult((ResultMessage) response, Conversion.toInternal(parameters.protocolVersion()), parameters.tracingRequested());<NEW_LINE>return result;<NEW_LINE>}, parameters.protocolVersion().isGreaterOrEqualTo(ProtocolVersion.V4));<NEW_LINE>}
(ErrorMessage) response).error);
33,606
public Problem prepare(RefactoringElementsBag refactoringElements) {<NEW_LINE>if (cancelled) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ModificationResult modificationResult = new ModificationResult();<NEW_LINE>RefactoringContext context = refactoring.getRefactoringSource(<MASK><NEW_LINE>assert context != null;<NEW_LINE>switch(refactoring.getMode()) {<NEW_LINE>case refactorToExistingEmbeddedSection:<NEW_LINE>OffsetRange sectionRange = refactoring.getExistingEmbeddedCssSection();<NEW_LINE>if (sectionRange == null) {<NEW_LINE>return new Problem(true, NbBundle.getMessage(ExtractInlinedStyleRefactoringPlugin.class, "MSG_ErrorCannotDetermineEmbeddedSectionEnd"));<NEW_LINE>} else {<NEW_LINE>refactorToEmbeddedSection(modificationResult, context, sectionRange.getEnd());<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case refactorToNewEmbeddedSection:<NEW_LINE>refactorToNewEmbeddedSection(modificationResult, context);<NEW_LINE>break;<NEW_LINE>case refactorToReferedExternalSheet:<NEW_LINE>refactorToStyleSheet(modificationResult, context);<NEW_LINE>break;<NEW_LINE>case refactorToExistingExternalSheet:<NEW_LINE>if (refactorToStyleSheet(modificationResult, context)) {<NEW_LINE>importStyleSheet(modificationResult, context);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>refactoringElements.registerTransaction(new RefactoringCommit(Collections.singletonList(modificationResult)));<NEW_LINE>for (FileObject fo : modificationResult.getModifiedFileObjects()) {<NEW_LINE>for (Difference diff : modificationResult.getDifferences(fo)) {<NEW_LINE>refactoringElements.add(refactoring, DiffElement.create(diff, fo, modificationResult));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
).lookup(RefactoringContext.class);
766,615
// Utility methods<NEW_LINE>private void cleanAnnotationsAttribute(Clazz clazz, Member member, AnnotationsAttribute attribute, String attributeName) {<NEW_LINE>// Delete marked annotations.<NEW_LINE>AnnotationsAttributeEditor annotationsAttributeEditor = new AnnotationsAttributeEditor(attribute);<NEW_LINE>Annotation[] annotations = attribute.annotations;<NEW_LINE>int index = 0;<NEW_LINE>while (index < attribute.u2annotationsCount) {<NEW_LINE>Annotation annotation = annotations[index];<NEW_LINE>if (annotation.getProcessingInfo() == mark) {<NEW_LINE>// We do not increase the index here, as we are deleting this element and the next element<NEW_LINE>// to look at will be at the same index.<NEW_LINE>annotationsAttributeEditor.deleteAnnotation(index);<NEW_LINE>} else {<NEW_LINE>index++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Delete attribute if no annotations are left.<NEW_LINE>if (attribute.u2annotationsCount == 0) {<NEW_LINE>AttributesEditor attributesEditor = new AttributesEditor((ProgramClass) clazz<MASK><NEW_LINE>attributesEditor.deleteAttribute(attributeName);<NEW_LINE>}<NEW_LINE>}
, (ProgramMember) member, false);
778,040
public void read(final InputStream inputStream) throws IOException {<NEW_LINE>LOGGER.trace("CommandMessage.read");<NEW_LINE>// version, unused<NEW_LINE>StreamUtil.checkEnd(inputStream.read());<NEW_LINE>command = StreamUtil.checkEnd(inputStream.read());<NEW_LINE>StreamUtil.checkEnd(inputStream.read());<NEW_LINE>final int addressType = StreamUtil.checkEnd(inputStream.read());<NEW_LINE>if (!AddressType.isSupport(addressType) && socksServerReplyException == null) {<NEW_LINE>socksServerReplyException <MASK><NEW_LINE>}<NEW_LINE>// read address<NEW_LINE>switch(addressType) {<NEW_LINE>case AddressType.IPV4:<NEW_LINE>final byte[] addressBytes = read(inputStream, 4);<NEW_LINE>inetAddress = InetAddress.getByAddress(addressBytes);<NEW_LINE>break;<NEW_LINE>case AddressType.DOMAIN_NAME:<NEW_LINE>final int domainLength = StreamUtil.checkEnd(inputStream.read());<NEW_LINE>if (domainLength < 1) {<NEW_LINE>throw new SocksException("Length of domain must great than 0");<NEW_LINE>}<NEW_LINE>final byte[] domainBytes = read(inputStream, domainLength);<NEW_LINE>final String host = new String(domainBytes, UTF_8);<NEW_LINE>try {<NEW_LINE>inetAddress = InetAddress.getByName(host);<NEW_LINE>} catch (final UnknownHostException e) {<NEW_LINE>if (socksServerReplyException == null) {<NEW_LINE>socksServerReplyException = new SocksServerReplyException(ServerReply.HOST_UNREACHABLE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>// TODO Implement later.<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>port = bytesToInt(read(inputStream, 2));<NEW_LINE>}
= new SocksServerReplyException(ServerReply.ADDRESS_TYPE_NOT_SUPPORTED);
1,583,830
private static ImmutableList<CToolchain> createToolchains(NdkPaths ndkPaths, StlImpl stlImpl, String hostPlatform) {<NEW_LINE>List<CToolchain.Builder> toolchainBuilders = new ArrayList<>();<NEW_LINE>toolchainBuilders.addAll(new ArmCrosstools(ndkPaths<MASK><NEW_LINE>toolchainBuilders.addAll(new MipsCrosstools(ndkPaths, stlImpl).createCrosstools());<NEW_LINE>toolchainBuilders.addAll(new X86Crosstools(ndkPaths, stlImpl).createCrosstools());<NEW_LINE>ImmutableList.Builder<CToolchain> toolchains = new ImmutableList.Builder<>();<NEW_LINE>// Set attributes common to all toolchains.<NEW_LINE>for (CToolchain.Builder toolchainBuilder : toolchainBuilders) {<NEW_LINE>toolchainBuilder.setHostSystemName(hostPlatform).setTargetLibc("local").setAbiVersion(toolchainBuilder.getTargetCpu()).setAbiLibcVersion("local");<NEW_LINE>// builtin_sysroot is set individually on each toolchain.<NEW_LINE>toolchainBuilder.addCxxBuiltinIncludeDirectory("%sysroot%/usr/include");<NEW_LINE>toolchains.add(toolchainBuilder.build());<NEW_LINE>}<NEW_LINE>return toolchains.build();<NEW_LINE>}
, stlImpl).createCrosstools());
1,481,463
public TagValues unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>TagValues tagValues = new TagValues();<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("Key", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>tagValues.setKey(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Values", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>tagValues.setValues(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("MatchOptions", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>tagValues.setMatchOptions(new ListUnmarshaller<String>(context.getUnmarshaller(String.class<MASK><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 tagValues;<NEW_LINE>}
)).unmarshall(context));
1,795,018
final DeletePolicyResult executeDeletePolicy(DeletePolicyRequest deletePolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deletePolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeletePolicyRequest> request = null;<NEW_LINE>Response<DeletePolicyResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeletePolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deletePolicyRequest));<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, "ACM PCA");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeletePolicy");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeletePolicyResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new DeletePolicyResultJsonUnmarshaller());
120,694
private void sendSessionExpiredEvt() {<NEW_LINE>// Get the Application Session Listener from the application's descriptor<NEW_LINE>SipAppDesc desc = m_appSession.getAppDescriptor();<NEW_LINE>// We will not have a Sip Add Descriptor in case the app session<NEW_LINE>// was created from the factory. Seems like a hole in the Sip Servlets<NEW_LINE>// API.<NEW_LINE>if (null != desc) {<NEW_LINE>Iterator iter = desc.getAppSessionListeners().iterator();<NEW_LINE>if (!iter.hasNext()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>SipApplicationSessionEvent evt = new SipApplicationSessionEvent(m_appSession);<NEW_LINE>// Invoke listeners - a notification is sent to allow listeners<NEW_LINE>// to extend the session's expiration time.<NEW_LINE>ContextEstablisher contextEstablisher = desc.getContextEstablisher();<NEW_LINE>ClassLoader currentThreadClassLoader = null;<NEW_LINE>try {<NEW_LINE>if (contextEstablisher != null) {<NEW_LINE>currentThreadClassLoader = contextEstablisher.getThreadCurrentClassLoader();<NEW_LINE>contextEstablisher.establishContext();<NEW_LINE>}<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>((SipApplicationSessionListener) iter.next<MASK><NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>if (contextEstablisher != null) {<NEW_LINE>contextEstablisher.removeContext(currentThreadClassLoader);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
()).sessionExpired(evt);
1,479,900
private static RemoteScreenshot[] takeCurrent(JPDADebugger debugger, DebuggerEngine engine) throws RetrievalException {<NEW_LINE>List<JPDAThread> allThreads = debugger.getThreadsCollector().getAllThreads();<NEW_LINE>if (logger.isLoggable(Level.FINE)) {<NEW_LINE>logger.log(Level.FINE, "Threads = {0}", allThreads);<NEW_LINE>}<NEW_LINE>RemoteScreenshot[] rs = NO_SCREENSHOTS;<NEW_LINE>for (JPDAThread t : allThreads) {<NEW_LINE>if (t.getName().startsWith(AWTThreadName)) {<NEW_LINE>long t1 = System.nanoTime();<NEW_LINE>try {<NEW_LINE>RemoteScreenshot[] rst = take(t, engine);<NEW_LINE>if (rst.length > 0) {<NEW_LINE>if (rs.length > 0) {<NEW_LINE>RemoteScreenshot[] nrs = new RemoteScreenshot[rs.length + rst.length];<NEW_LINE>System.arraycopy(rs, 0, nrs, 0, rs.length);<NEW_LINE>System.arraycopy(rst, 0, nrs, rs.length, rst.length);<NEW_LINE>rs = nrs;<NEW_LINE>} else {<NEW_LINE>rs = rst;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// break;<NEW_LINE>} finally {<NEW_LINE>long t2 = System.nanoTime();<NEW_LINE>long ns = t2 - t1;<NEW_LINE>long ms = ns / 1000000;<NEW_LINE>logger.info("GUI Snaphot taken in " + ((ms > 0) ? (ms + " ms " + (ns - ms * 1000000) + " ns.") <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return rs;<NEW_LINE>}
: (ns + " ns.")));
1,631,610
final DescribeIndexResult executeDescribeIndex(DescribeIndexRequest describeIndexRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeIndexRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeIndexRequest> request = null;<NEW_LINE>Response<DescribeIndexResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeIndexRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeIndexRequest));<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, "kendra");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeIndex");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeIndexResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeIndexResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
996,619
public static void convolve(Kernel2D_S32 kernel, InterleavedU16 src, InterleavedI16 dst) {<NEW_LINE>final int[] dataKernel = kernel.data;<NEW_LINE>final short[] dataSrc = src.data;<NEW_LINE>final short[] dataDst = dst.data;<NEW_LINE>final int width = src.getWidth();<NEW_LINE>final int height = src.getHeight();<NEW_LINE>final <MASK><NEW_LINE>int offsetL = kernel.offset;<NEW_LINE>int offsetR = kernel.width - kernel.offset - 1;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(offsetL, height-offsetR, y -> {<NEW_LINE>for (int y = offsetL; y < height - offsetR; y++) {<NEW_LINE>int indexDst = dst.startIndex + y * dst.stride + offsetL * numBands;<NEW_LINE>for (int x = offsetL; x < width - offsetR; x++) {<NEW_LINE>int indexSrcStart = src.startIndex + (y - offsetL) * src.stride + (x - offsetL) * numBands;<NEW_LINE>for (int band = 0; band < numBands; band++) {<NEW_LINE>int total = 0;<NEW_LINE>int indexKer = 0;<NEW_LINE>for (int ki = 0; ki < kernel.width; ki++) {<NEW_LINE>int indexSrc = indexSrcStart + ki * src.stride + band;<NEW_LINE>for (int kj = 0; kj < kernel.width; kj++) {<NEW_LINE>total += (dataSrc[indexSrc] & 0xFFFF) * dataKernel[indexKer++];<NEW_LINE>indexSrc += numBands;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>dataDst[indexDst++] = (short) total;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}
int numBands = src.getNumBands();
1,704,971
public static KafkaProducer<String, String> create(final String projectId, final String apiKey) {<NEW_LINE>final String jaasConfig = String.format("org.apache.kafka.common.security.plain.PlainLoginModule " + "required username=\"%s\" password=\"%s\";", projectId, apiKey);<NEW_LINE><MASK><NEW_LINE>props.put(BOOTSTRAP_SERVERS_CONFIG, KAFKA_BROKER);<NEW_LINE>props.put(SECURITY_PROTOCOL_CONFIG, SASL_SSL.name());<NEW_LINE>props.put(SASL_MECHANISM, PLAIN_MECHANISM);<NEW_LINE>props.put(SASL_JAAS_CONFIG, jaasConfig);<NEW_LINE>props.put(ACKS_CONFIG, "all");<NEW_LINE>props.put(KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName());<NEW_LINE>props.put(VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName());<NEW_LINE>return new KafkaProducer<>(props);<NEW_LINE>}
final Properties props = new Properties();
1,392,008
public void refresh() {<NEW_LINE>collectObj();<NEW_LINE>isActive = false;<NEW_LINE>Iterator<Integer> serverIds = serverObjMap.keySet().iterator();<NEW_LINE>final List<Pack> result = new ArrayList<Pack>();<NEW_LINE>while (serverIds.hasNext()) {<NEW_LINE>int serverId = serverIds.next();<NEW_LINE>TcpProxy tcp = TcpProxy.getTcpProxy(serverId);<NEW_LINE>try {<NEW_LINE>MapPack param = new MapPack();<NEW_LINE><MASK><NEW_LINE>param.put("objHash", serverObjMap.get(serverId));<NEW_LINE>tcp.process(RequestCmd.COUNTER_TODAY_GROUP, param, new INetReader() {<NEW_LINE><NEW_LINE>public void process(DataInputX in) throws IOException {<NEW_LINE>Pack p = in.readPack();<NEW_LINE>if (p != null) {<NEW_LINE>result.add(p);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>} finally {<NEW_LINE>TcpProxy.putTcpProxy(tcp);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (result.size() > 0) {<NEW_LINE>isActive = true;<NEW_LINE>}<NEW_LINE>ExUtil.exec(canvas, new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>if (isActive) {<NEW_LINE>setActive();<NEW_LINE>} else {<NEW_LINE>setInactive();<NEW_LINE>}<NEW_LINE>long stime = DateUtil.getTime(DateUtil.yyyymmdd(TimeUtil.getCurrentTime()), "yyyyMMdd");<NEW_LINE>long etime = stime + DateUtil.MILLIS_PER_DAY;<NEW_LINE>xyGraph.primaryXAxis.setRange(stime, etime);<NEW_LINE>long now = TimeUtil.getCurrentTime();<NEW_LINE>for (Pack p : result) {<NEW_LINE>MapPack m = (MapPack) p;<NEW_LINE>int objHash = (int) m.getLong("objHash");<NEW_LINE>CircularBufferDataProvider data = (CircularBufferDataProvider) getDataProvider(objHash);<NEW_LINE>data.clearTrace();<NEW_LINE>ListValue timeLv = m.getList("time");<NEW_LINE>ListValue valueLv = m.getList("value");<NEW_LINE>for (int i = 0; i < timeLv.size(); i++) {<NEW_LINE>long time = timeLv.getLong(i);<NEW_LINE>if (time > now) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>Value v = valueLv.get(i);<NEW_LINE>data.addSample(new Sample(time, CastUtil.cdouble(v)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (CounterUtil.isPercentValue(objType, counter)) {<NEW_LINE>xyGraph.primaryYAxis.setRange(0, 100);<NEW_LINE>} else {<NEW_LINE>double max = getMaxValue();<NEW_LINE>xyGraph.primaryYAxis.setRange(0, max);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>checkSettingChange();<NEW_LINE>}
param.put("counter", counter);
1,246,778
protected void configureGeneratedSourcesAndJavadoc(Project project) {<NEW_LINE>_generateJavadocTask = project.getTasks().create("generateJavadoc", Javadoc.class);<NEW_LINE>if (_generateSourcesJarTask == null) {<NEW_LINE>//<NEW_LINE>// configuration for publishing jars containing sources for generated classes<NEW_LINE>// to the project artifacts for including in the ivy.xml<NEW_LINE>//<NEW_LINE>ConfigurationContainer configurations = project.getConfigurations();<NEW_LINE>Configuration generatedSources = configurations.maybeCreate("generatedSources");<NEW_LINE>Configuration testGeneratedSources = configurations.maybeCreate("testGeneratedSources");<NEW_LINE>testGeneratedSources.extendsFrom(generatedSources);<NEW_LINE>_generateSourcesJarTask = project.getTasks().create("generateSourcesJar", Jar.class, jarTask -> {<NEW_LINE>jarTask.setGroup(JavaBasePlugin.DOCUMENTATION_GROUP);<NEW_LINE>jarTask.setDescription("Generates a jar file containing the sources for the generated Java classes.");<NEW_LINE>// FIXME change to #getArchiveClassifier().set("sources"); breaks backwards-compatibility before 5.1<NEW_LINE>jarTask.setClassifier("sources");<NEW_LINE>});<NEW_LINE>project.getArtifacts().add("generatedSources", _generateSourcesJarTask);<NEW_LINE>}<NEW_LINE>if (_generateJavadocJarTask == null) {<NEW_LINE>//<NEW_LINE>// configuration for publishing jars containing Javadoc for generated classes<NEW_LINE>// to the project artifacts for including in the ivy.xml<NEW_LINE>//<NEW_LINE>ConfigurationContainer configurations = project.getConfigurations();<NEW_LINE>Configuration <MASK><NEW_LINE>Configuration testGeneratedJavadoc = configurations.maybeCreate("testGeneratedJavadoc");<NEW_LINE>testGeneratedJavadoc.extendsFrom(generatedJavadoc);<NEW_LINE>_generateJavadocJarTask = project.getTasks().create("generateJavadocJar", Jar.class, jarTask -> {<NEW_LINE>jarTask.dependsOn(_generateJavadocTask);<NEW_LINE>jarTask.setGroup(JavaBasePlugin.DOCUMENTATION_GROUP);<NEW_LINE>jarTask.setDescription("Generates a jar file containing the Javadoc for the generated Java classes.");<NEW_LINE>// FIXME change to #getArchiveClassifier().set("sources"); breaks backwards-compatibility before 5.1<NEW_LINE>jarTask.setClassifier("javadoc");<NEW_LINE>jarTask.from(_generateJavadocTask.getDestinationDir());<NEW_LINE>});<NEW_LINE>project.getArtifacts().add("generatedJavadoc", _generateJavadocJarTask);<NEW_LINE>} else {<NEW_LINE>// TODO: Tighten the types so that _generateJavadocJarTask must be of type Jar.<NEW_LINE>((Jar) _generateJavadocJarTask).from(_generateJavadocTask.getDestinationDir());<NEW_LINE>_generateJavadocJarTask.dependsOn(_generateJavadocTask);<NEW_LINE>}<NEW_LINE>}
generatedJavadoc = configurations.maybeCreate("generatedJavadoc");
196,733
protected RelDataType leastRestrictiveStructuredType(final List<RelDataType> types) {<NEW_LINE>final RelDataType type0 = types.get(0);<NEW_LINE>final <MASK><NEW_LINE>// precheck that all types are structs with same number of fields<NEW_LINE>// and register desired nullability for the result<NEW_LINE>boolean isNullable = false;<NEW_LINE>for (RelDataType type : types) {<NEW_LINE>if (!type.isStruct()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (type.getFieldList().size() != fieldCount) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>isNullable |= type.isNullable();<NEW_LINE>}<NEW_LINE>// recursively compute column-wise least restrictive<NEW_LINE>final Builder builder = builder();<NEW_LINE>for (int j = 0; j < fieldCount; ++j) {<NEW_LINE>// REVIEW jvs 22-Jan-2004: Always use the field name from the<NEW_LINE>// first type?<NEW_LINE>final int k = j;<NEW_LINE>builder.add(type0.getFieldList().get(j).getName(), leastRestrictive(new AbstractList<RelDataType>() {<NEW_LINE><NEW_LINE>public RelDataType get(int index) {<NEW_LINE>return types.get(index).getFieldList().get(k).getType();<NEW_LINE>}<NEW_LINE><NEW_LINE>public int size() {<NEW_LINE>return types.size();<NEW_LINE>}<NEW_LINE>}));<NEW_LINE>}<NEW_LINE>return createTypeWithNullability(builder.build(), isNullable);<NEW_LINE>}
int fieldCount = type0.getFieldCount();
268,960
public void onSensorChanged(SensorEvent sensorEvent) {<NEW_LINE>int currentType = sensorEvent.sensor.getType();<NEW_LINE>if (currentType != this.sensorType) {<NEW_LINE>// not for the current Sensor<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>double tempMs = <MASK><NEW_LINE>if (tempMs - lastReading >= interval) {<NEW_LINE>lastReading = tempMs;<NEW_LINE>WritableMap map = this.arguments.createMap();<NEW_LINE>switch(currentType) {<NEW_LINE>case Sensor.TYPE_ACCELEROMETER:<NEW_LINE>case Sensor.TYPE_GRAVITY:<NEW_LINE>case Sensor.TYPE_GYROSCOPE:<NEW_LINE>case Sensor.TYPE_MAGNETIC_FIELD:<NEW_LINE>map.putDouble("x", sensorEvent.values[0]);<NEW_LINE>map.putDouble("y", sensorEvent.values[1]);<NEW_LINE>map.putDouble("z", sensorEvent.values[2]);<NEW_LINE>break;<NEW_LINE>case Sensor.TYPE_PRESSURE:<NEW_LINE>map.putDouble("pressure", sensorEvent.values[0]);<NEW_LINE>break;<NEW_LINE>case Sensor.TYPE_ROTATION_VECTOR:<NEW_LINE>SensorManager.getQuaternionFromVector(quaternion, sensorEvent.values);<NEW_LINE>SensorManager.getRotationMatrixFromVector(rotation, sensorEvent.values);<NEW_LINE>SensorManager.getOrientation(rotation, orientation);<NEW_LINE>map.putDouble("qw", quaternion[0]);<NEW_LINE>map.putDouble("qx", quaternion[1]);<NEW_LINE>map.putDouble("qy", quaternion[2]);<NEW_LINE>map.putDouble("qz", quaternion[3]);<NEW_LINE>map.putDouble("yaw", orientation[0]);<NEW_LINE>map.putDouble("pitch", orientation[1]);<NEW_LINE>map.putDouble("roll", orientation[2]);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>Log.e("ERROR", "Sensor type '" + currentType + "' not implemented!");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// timestamp is added to all events<NEW_LINE>map.putDouble("timestamp", this.sensorTimestampToEpochMilliseconds(sensorEvent.timestamp));<NEW_LINE>this.sendEvent(this.sensorName, map);<NEW_LINE>}<NEW_LINE>}
(double) System.currentTimeMillis();
1,450,915
public MethodDelegationBinder.ParameterBinding<?> bind(AnnotationDescription.Loadable<Morph> annotation, MethodDescription source, ParameterDescription target, Implementation.Target implementationTarget, Assigner assigner, Assigner.Typing typing) {<NEW_LINE>if (!target.getType().asErasure().equals(forwardingMethod.getDeclaringType())) {<NEW_LINE>throw new IllegalStateException("Illegal use of @Morph for " + target + " which was installed for " + forwardingMethod.getDeclaringType());<NEW_LINE>}<NEW_LINE>Implementation.SpecialMethodInvocation specialMethodInvocation;<NEW_LINE>TypeDescription typeDescription = annotation.getValue(DEFAULT_TARGET<MASK><NEW_LINE>if (typeDescription.represents(void.class) && !annotation.getValue(DEFAULT_METHOD).resolve(Boolean.class)) {<NEW_LINE>specialMethodInvocation = implementationTarget.invokeSuper(source.asSignatureToken()).withCheckedCompatibilityTo(source.asTypeToken());<NEW_LINE>} else {<NEW_LINE>specialMethodInvocation = (typeDescription.represents(void.class) ? DefaultMethodLocator.Implicit.INSTANCE : new DefaultMethodLocator.Explicit(typeDescription)).resolve(implementationTarget, source);<NEW_LINE>}<NEW_LINE>return specialMethodInvocation.isValid() ? new MethodDelegationBinder.ParameterBinding.Anonymous(new RedirectionProxy(forwardingMethod.getDeclaringType().asErasure(), implementationTarget.getInstrumentedType(), specialMethodInvocation, assigner, annotation.getValue(SERIALIZABLE_PROXY).resolve(Boolean.class))) : MethodDelegationBinder.ParameterBinding.Illegal.INSTANCE;<NEW_LINE>}
).resolve(TypeDescription.class);
1,459,951
public Request<UpdateConfigurationSetTrackingOptionsRequest> marshall(UpdateConfigurationSetTrackingOptionsRequest updateConfigurationSetTrackingOptionsRequest) {<NEW_LINE>if (updateConfigurationSetTrackingOptionsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<UpdateConfigurationSetTrackingOptionsRequest> request = new DefaultRequest<MASK><NEW_LINE>request.addParameter("Action", "UpdateConfigurationSetTrackingOptions");<NEW_LINE>request.addParameter("Version", "2010-12-01");<NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>if (updateConfigurationSetTrackingOptionsRequest.getConfigurationSetName() != null) {<NEW_LINE>request.addParameter("ConfigurationSetName", StringUtils.fromString(updateConfigurationSetTrackingOptionsRequest.getConfigurationSetName()));<NEW_LINE>}<NEW_LINE>{<NEW_LINE>TrackingOptions trackingOptions = updateConfigurationSetTrackingOptionsRequest.getTrackingOptions();<NEW_LINE>if (trackingOptions != null) {<NEW_LINE>if (trackingOptions.getCustomRedirectDomain() != null) {<NEW_LINE>request.addParameter("TrackingOptions.CustomRedirectDomain", StringUtils.fromString(trackingOptions.getCustomRedirectDomain()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
<UpdateConfigurationSetTrackingOptionsRequest>(updateConfigurationSetTrackingOptionsRequest, "AmazonSimpleEmailService");
726,759
public void rangeNotification(IntSeqKey conditionPath, ContextControllerConditionNonHA originEndpoint, EventBean optionalTriggeringEvent, Map<String, Object> optionalTriggeringPattern, EventBean optionalTriggeringEventPattern, Map<String, Object> optionalPatternForInclusiveEval, Map<String, Object> terminationProperties) {<NEW_LINE><MASK><NEW_LINE>Object getterKey = factory.getGetterKey(partitionKey);<NEW_LINE>ContextControllerKeyedSvcEntry removed = keyedSvc.keyRemove(parentPath, getterKey);<NEW_LINE>if (removed == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// remember the terminating event, we don't want it to initiate a new partition<NEW_LINE>ContextControllerKeyedImpl.this.lastTerminatingEvent = optionalTriggeringEvent != null ? optionalTriggeringEvent : optionalTriggeringEventPattern;<NEW_LINE>realization.contextPartitionTerminate(conditionPath.removeFromEnd(), removed.getSubpathOrCPId(), ContextControllerKeyedImpl.this, terminationProperties, false, null);<NEW_LINE>removed.getTerminationCondition().deactivate();<NEW_LINE>}
IntSeqKey parentPath = conditionPath.removeFromEnd();
428,690
public void testTls() {<NEW_LINE>Map<String, Object> sslConfig = new HashMap<>();<NEW_LINE>sslConfig.put(SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG, TRUSTSTORE_FILENAME);<NEW_LINE>sslConfig.put(SslConfigs.SSL_TRUSTSTORE_PASSWORD_CONFIG, trustStorePassword);<NEW_LINE>sslConfig.put("security.protocol", "SASL_SSL");<NEW_LINE>sslConfig.put(SaslConfigs.SASL_MECHANISM, "PLAIN");<NEW_LINE>sslConfig.put(SaslConfigs.SASL_JAAS_CONFIG, "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"" + <MASK><NEW_LINE>KafkaReader<String, String> reader = kafkaTestClient.readerFor(sslConfig, BasicMessagingBean.CHANNEL_OUT);<NEW_LINE>KafkaWriter<String, String> writer = kafkaTestClient.writerFor(sslConfig, BasicMessagingBean.CHANNEL_IN);<NEW_LINE>writer.sendMessage("abc");<NEW_LINE>writer.sendMessage("xyz");<NEW_LINE>List<String> msgs = reader.assertReadMessages(2, KafkaTestConstants.DEFAULT_KAFKA_TIMEOUT);<NEW_LINE>assertThat(msgs, contains("cba", "zyx"));<NEW_LINE>}
testUser + "\" password=\"" + testSecret + "\";");
748,717
protected PreparedStatement prepareStatement(String sql, Object[] params) throws SQLException {<NEW_LINE>PreparedStatement statement = connection.prepareStatement(sql);<NEW_LINE>// Spanner requires specific types for NULL according to the column.<NEW_LINE>// This is unlike other databases which have a single "null type".<NEW_LINE>for (int i = 0; i < params.length; i++) {<NEW_LINE>if (params[i] == null) {<NEW_LINE>statement.setNull(i + 1, nullType);<NEW_LINE>} else if (params[i] instanceof Integer) {<NEW_LINE>statement.setInt(i + 1, (Integer) params[i]);<NEW_LINE>} else if (params[i] instanceof Boolean) {<NEW_LINE>statement.setBoolean(i + 1, (Boolean) params[i]);<NEW_LINE>} else if (params[i] instanceof String) {<NEW_LINE>statement.setString(i + 1, params<MASK><NEW_LINE>} else if (params[i] == JdbcNullTypes.StringNull) {<NEW_LINE>statement.setNull(i + 1, Types.NVARCHAR);<NEW_LINE>} else if (params[i] == JdbcNullTypes.IntegerNull) {<NEW_LINE>statement.setNull(i + 1, Types.INTEGER);<NEW_LINE>} else if (params[i] == JdbcNullTypes.BooleanNull) {<NEW_LINE>statement.setNull(i + 1, Types.BOOLEAN);<NEW_LINE>} else {<NEW_LINE>throw new FlywayException("Unhandled object of type '" + params[i].getClass().getName() + "'. ");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return statement;<NEW_LINE>}
[i].toString());
1,618,174
BLangStatementExpression desugar(BLangQueryAction queryAction, SymbolEnv env) {<NEW_LINE>containsCheckExpr = false;<NEW_LINE>HashSet<BType> prevCheckedErrorList = this.checkedErrorList;<NEW_LINE>this.checkedErrorList = new HashSet<>();<NEW_LINE>List<BLangNode> clauses = queryAction.getQueryClauses();<NEW_LINE>Location pos = clauses.get(0).pos;<NEW_LINE>BType returnType = symTable.errorOrNilType;<NEW_LINE>if (queryAction.returnsWithinDoClause) {<NEW_LINE>BInvokableSymbol invokableSymbol = env.enclInvokable.symbol;<NEW_LINE>returnType = ((BInvokableType) invokableSymbol.type).retType;<NEW_LINE>}<NEW_LINE>BLangBlockStmt queryBlock = ASTBuilderUtil.createBlockStmt(pos);<NEW_LINE>BLangVariableReference streamRef = buildStream(clauses, returnType, env, queryBlock);<NEW_LINE>BLangVariableReference result = getStreamFunctionVariableRef(queryBlock, QUERY_CONSUME_STREAM_FUNCTION, returnType, Lists.of(streamRef), pos);<NEW_LINE>BLangStatementExpression stmtExpr;<NEW_LINE>if (!containsCheckExpr && queryAction.returnsWithinDoClause) {<NEW_LINE>BLangReturn returnStmt = ASTBuilderUtil.createReturnStmt(pos, result);<NEW_LINE>BLangBlockStmt ifBody = ASTBuilderUtil.createBlockStmt(pos);<NEW_LINE>ifBody.stmts.add(returnStmt);<NEW_LINE>BLangTypeTestExpr nilTypeTestExpr = desugar.createTypeCheckExpr(pos, result, desugar.getNillTypeNode());<NEW_LINE>nilTypeTestExpr.setBType(symTable.booleanType);<NEW_LINE>BLangGroupExpr nilCheckGroupExpr = new BLangGroupExpr();<NEW_LINE>nilCheckGroupExpr.setBType(symTable.booleanType);<NEW_LINE>// !($streamElement$ is ()))<NEW_LINE>nilCheckGroupExpr.expression = desugar.createNotBinaryExpression(pos, nilTypeTestExpr);<NEW_LINE>BLangIf ifStatement = <MASK><NEW_LINE>ifStatement.expr = nilCheckGroupExpr;<NEW_LINE>ifStatement.body = ifBody;<NEW_LINE>}<NEW_LINE>stmtExpr = ASTBuilderUtil.createStatementExpression(queryBlock, addTypeConversionExpr(result, returnType));<NEW_LINE>stmtExpr.setBType(returnType);<NEW_LINE>this.checkedErrorList = prevCheckedErrorList;<NEW_LINE>return stmtExpr;<NEW_LINE>}
ASTBuilderUtil.createIfStmt(pos, queryBlock);
162,228
public boolean insertMonthlyReport(MonthlyReport report, byte[] content) {<NEW_LINE>try {<NEW_LINE>MonthlyReport monthReport = m_monthlyReportDao.findReportByDomainNamePeriod(report.getPeriod(), report.getDomain(), report.<MASK><NEW_LINE>if (monthReport != null) {<NEW_LINE>MonthlyReportContent reportContent = m_monthlyReportContentDao.createLocal();<NEW_LINE>reportContent.setKeyReportId(monthReport.getId());<NEW_LINE>reportContent.setReportId(monthReport.getId());<NEW_LINE>m_monthlyReportDao.deleteReportByDomainNamePeriod(report);<NEW_LINE>m_monthlyReportContentDao.deleteByPK(reportContent);<NEW_LINE>}<NEW_LINE>} catch (DalNotFoundException e) {<NEW_LINE>} catch (Exception e) {<NEW_LINE>Cat.logError(e);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>m_monthlyReportDao.insert(report);<NEW_LINE>int id = report.getId();<NEW_LINE>MonthlyReportContent proto = m_monthlyReportContentDao.createLocal();<NEW_LINE>proto.setReportId(id);<NEW_LINE>proto.setContent(content);<NEW_LINE>m_monthlyReportContentDao.insert(proto);<NEW_LINE>return true;<NEW_LINE>} catch (DalException e) {<NEW_LINE>Cat.logError(e);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
getName(), MonthlyReportEntity.READSET_FULL);
728,919
public String inferModuleName(Context ctx) {<NEW_LINE>Names names = Names.instance(ctx);<NEW_LINE>GeneratedJavaStubFileObject fo = _fo;<NEW_LINE>String packageName = getPackageName(fo);<NEW_LINE>if (ReflectUtil.field(ReflectUtil.method("com.sun.tools.javac.comp.Modules", "instance", Context.class).invokeStatic(ctx), "allModules").get() == null) {<NEW_LINE>// If using JavaParser.compile(), say from Lab, we don't care about modules, otherwise we run into trouble<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>JavacElements elementUtils = JavacElements.instance(ctx);<NEW_LINE>for (Object /*ModuleElement*/<NEW_LINE>ms : (Iterable) ReflectUtil.method(elementUtils, "getAllModuleElements").invoke()) {<NEW_LINE>if ((boolean) ReflectUtil.method(ms, "isUnnamed").invoke()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (ms.getClass().getSimpleName().equals("ModuleSymbol")) {<NEW_LINE>// noinspection unchecked<NEW_LINE>for (Symbol pkg : (Iterable<Symbol>) ReflectUtil.field(ms, "enclosedPackages").get()) {<NEW_LINE>if (!(pkg instanceof Symbol.PackageSymbol)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (pkg.toString().equals(packageName)) {<NEW_LINE>// noinspection unchecked<NEW_LINE>Iterable<Symbol> symbolsByName = (Iterable<Symbol>) ReflectUtil.method(ReflectUtil.method(pkg, "members").invoke(), "getSymbolsByName", Name.class).invoke(names.<MASK><NEW_LINE>if (symbolsByName.iterator().hasNext()) {<NEW_LINE>return ReflectUtil.method(ms, "getQualifiedName").invoke().toString();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
fromString(getPhysicalClassName(fo)));
1,017,456
private String buildUrl(GHGeocodingRequest request) {<NEW_LINE>String url = routeServiceUrl + "?";<NEW_LINE>if (request.isReverse()) {<NEW_LINE>if (!request.getPoint().isValid())<NEW_LINE>throw new IllegalArgumentException("For reverse geocoding you have to pass valid lat and long values");<NEW_LINE>url += "reverse=true";<NEW_LINE>} else {<NEW_LINE>if (request.getQuery() == null)<NEW_LINE>throw new IllegalArgumentException("For forward geocoding you have to a string for the query");<NEW_LINE>url += "reverse=false";<NEW_LINE>url += "&q=" + encodeURL(request.getQuery());<NEW_LINE>}<NEW_LINE>if (request.getPoint().isValid())<NEW_LINE>url += "&point=" + request.getPoint().getLat() + "," + request.getPoint().getLon();<NEW_LINE>url += "&limit=" + request.getLimit();<NEW_LINE>url += "&locale=" + <MASK><NEW_LINE>url += "&provider=" + encodeURL(request.getProvider());<NEW_LINE>if (!key.isEmpty()) {<NEW_LINE>url += "&key=" + encodeURL(key);<NEW_LINE>}<NEW_LINE>return url;<NEW_LINE>}
encodeURL(request.getLocale());
651,681
public com.amazonaws.services.simplesystemsmanagement.model.InvocationDoesNotExistException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.simplesystemsmanagement.model.InvocationDoesNotExistException invocationDoesNotExistException = new com.amazonaws.services.simplesystemsmanagement.model.InvocationDoesNotExistException(null);<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} 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 invocationDoesNotExistException;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,547,012
public static // inside the database of the program<NEW_LINE>void find_match() {<NEW_LINE>respList.clear();<NEW_LINE>// introduce thse new "string variable" to help<NEW_LINE>// support the implementation of keyword ranking<NEW_LINE>// during the matching process<NEW_LINE>String bestKeyWord = "";<NEW_LINE>Vector<Integer> index_vector = new Vector<Integer>(maxResp);<NEW_LINE>for (int i = 0; i < KnowledgeBase.length; ++i) {<NEW_LINE>String[] keyWordList = KnowledgeBase[i][0];<NEW_LINE>for (int j = 0; j < keyWordList.length; ++j) {<NEW_LINE>String keyWord = keyWordList[j];<NEW_LINE>char firstChar = keyWord.charAt(0);<NEW_LINE>char lastChar = keyWord.charAt(keyWord.length() - 1);<NEW_LINE>keyWord = trimLR(keyWord, "_");<NEW_LINE>// we inset a space character<NEW_LINE>// before and after the keyword to<NEW_LINE>// improve the matching process<NEW_LINE>keyWord = " " + keyWord + " ";<NEW_LINE>int keyPos = sInput.indexOf(keyWord);<NEW_LINE>// there has been some improvements made in<NEW_LINE>// here in order to make the matching process<NEW_LINE>// a littlebit more flexible<NEW_LINE>if (keyPos != -1) {<NEW_LINE>if (wrong_location(keyWord, firstChar, lastChar, keyPos)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// 'keyword ranking' feature implemented in this section<NEW_LINE>if (keyWord.length() > bestKeyWord.length()) {<NEW_LINE>bestKeyWord = keyWord;<NEW_LINE>index_vector.clear();<NEW_LINE>index_vector.add(i);<NEW_LINE>} else if (keyWord.length() == bestKeyWord.length()) {<NEW_LINE>index_vector.add(i);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (index_vector.size() > 0) {<NEW_LINE>sKeyWord = bestKeyWord;<NEW_LINE>Collections.shuffle(index_vector);<NEW_LINE>int <MASK><NEW_LINE>int respSize = KnowledgeBase[respIndex][1].length;<NEW_LINE>for (int j = 0; j < respSize; ++j) {<NEW_LINE>respList.add(KnowledgeBase[respIndex][1][j]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
respIndex = index_vector.elementAt(0);
413,987
private Future<ProjectProblemsProvider.Result> resolveByDefiner() {<NEW_LINE>assert definer != null;<NEW_LINE>final RunnableFuture<ProjectProblemsProvider.Result> future = new FutureTask<ProjectProblemsProvider.Result>(new Callable<ProjectProblemsProvider.Result>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public ProjectProblemsProvider.Result call() throws Exception {<NEW_LINE>ProjectProblemsProvider.Status result = ProjectProblemsProvider.Status.UNRESOLVED;<NEW_LINE>try {<NEW_LINE>Library lib = definer.call();<NEW_LINE>// NOI18N<NEW_LINE>LOG.log(Level.FINE, "found {0}", lib);<NEW_LINE>result = ProjectProblemsProvider.Status.RESOLVED;<NEW_LINE>} catch (Exception x) {<NEW_LINE>LOG.log(<MASK><NEW_LINE>result = resolveByLibraryManager();<NEW_LINE>}<NEW_LINE>return ProjectProblemsProvider.Result.create(result);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>RP.post(future);<NEW_LINE>return future;<NEW_LINE>}
Level.INFO, null, x);
565,810
public void exitIpap_access_list(Ipap_access_listContext ctx) {<NEW_LINE>String name = ctx.name.getText();<NEW_LINE>String regex = ctx.regex.getText().trim();<NEW_LINE>LineAction <MASK><NEW_LINE>IpAsPathAccessListLine.OriginType origin = toOriginType(ctx.origin);<NEW_LINE>if (origin != IpAsPathAccessListLine.OriginType.ANY) {<NEW_LINE>warn(ctx, "Origin type other than ANY is not yet supported");<NEW_LINE>}<NEW_LINE>IpAsPathAccessListLine line = new IpAsPathAccessListLine(action, regex, origin);<NEW_LINE>IpAsPathAccessList list = _configuration.getAsPathAccessLists().computeIfAbsent(name, IpAsPathAccessList::new);<NEW_LINE>list.addLine(line);<NEW_LINE>_configuration.defineStructure(AS_PATH_ACCESS_LIST, name, ctx);<NEW_LINE>}
action = toLineAction(ctx.action);
550,460
protected void executeQuery() {<NEW_LINE>// FR [ 245 ]<NEW_LINE>String errorMsg = searchPanel.validateParameters();<NEW_LINE>if (errorMsg == null) {<NEW_LINE>if (getAD_Window_ID() > 1)<NEW_LINE>bZoom.setEnabled(true);<NEW_LINE>bSelectAll.setEnabled(true);<NEW_LINE>bExport.setEnabled(true);<NEW_LINE>if (isDeleteable()) {<NEW_LINE>bDelete.setEnabled(true);<NEW_LINE>}<NEW_LINE>// For Updateable<NEW_LINE>if (isUpdateable()) {<NEW_LINE>bUpdate.setEnabled(true);<NEW_LINE>}<NEW_LINE>loadedOK = initBrowser();<NEW_LINE>Env.setContext(Env.getCtx(), 0, "currWindowNo", getWindowNo());<NEW_LINE>if (processParameterPanel != null)<NEW_LINE>processParameterPanel.refreshContext();<NEW_LINE>if (m_worker != null && m_worker.isAlive())<NEW_LINE>return;<NEW_LINE>//<NEW_LINE>int no = testCount();<NEW_LINE>if (no > 0) {<NEW_LINE>if (!ADialog.ask(getWindowNo(), m_frame.getContainer(), "InfoHighRecordCount", String.valueOf(no))) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>m_frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));<NEW_LINE>setStatusLine(Msg.getMsg(Env.getCtx(), "StartSearch"), false);<NEW_LINE>m_worker = new Worker();<NEW_LINE>m_worker.start();<NEW_LINE>} else {<NEW_LINE>ADialog.error(windowNo, m_frame.getContentPane(), "FillMandatory", Msg.parseTranslation(Env<MASK><NEW_LINE>}<NEW_LINE>}
.getCtx(), errorMsg));
1,236,859
static boolean isEqual(Binding declaringElement, Binding declaringElement2, HashSet visitedTypes) {<NEW_LINE>if (declaringElement instanceof org.eclipse.jdt.internal.compiler.lookup.TypeBinding) {<NEW_LINE>if (!(declaringElement2 instanceof org.eclipse.jdt.internal.compiler.lookup.TypeBinding)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return isEqual((org.eclipse.jdt.internal.compiler.lookup.TypeBinding) declaringElement, (org.eclipse.jdt.internal.compiler.lookup.TypeBinding) declaringElement2, visitedTypes);<NEW_LINE>} else if (declaringElement instanceof org.eclipse.jdt.internal.compiler.lookup.MethodBinding) {<NEW_LINE>if (!(declaringElement2 instanceof org.eclipse.jdt.internal.compiler.lookup.MethodBinding)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return isEqual((org.eclipse.jdt.internal.compiler.lookup.MethodBinding) declaringElement, (org.eclipse.jdt.internal.compiler.lookup.MethodBinding) declaringElement2, visitedTypes);<NEW_LINE>} else if (declaringElement instanceof VariableBinding) {<NEW_LINE>if (!(declaringElement2 instanceof VariableBinding)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return isEqual((VariableBinding) declaringElement, (VariableBinding) declaringElement2);<NEW_LINE>} else if (declaringElement instanceof org.eclipse.jdt.internal.compiler.lookup.PackageBinding) {<NEW_LINE>if (!(declaringElement2 instanceof org.eclipse.jdt.internal.compiler.lookup.PackageBinding)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>org.eclipse.jdt.internal.compiler.lookup.PackageBinding packageBinding = (org.eclipse.jdt.internal.compiler.lookup.PackageBinding) declaringElement;<NEW_LINE>org.eclipse.jdt.internal.compiler.lookup.PackageBinding packageBinding2 = (org.eclipse.jdt.internal.compiler.lookup.PackageBinding) declaringElement2;<NEW_LINE>return CharOperation.equals(packageBinding.compoundName, packageBinding2.compoundName);<NEW_LINE>} else if (declaringElement instanceof ImportBinding) {<NEW_LINE>if (!(declaringElement2 instanceof ImportBinding)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>ImportBinding importBinding = (ImportBinding) declaringElement;<NEW_LINE>ImportBinding importBinding2 = (ImportBinding) declaringElement2;<NEW_LINE>return importBinding.isStatic() == importBinding2.isStatic() && importBinding.onDemand == importBinding2.onDemand && CharOperation.equals(importBinding.compoundName, importBinding2.compoundName);<NEW_LINE>} else if (declaringElement instanceof org.eclipse.jdt.internal.compiler.lookup.ModuleBinding) {<NEW_LINE>if (!(declaringElement2 instanceof org.eclipse.jdt.internal.compiler.lookup.ModuleBinding)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>org.eclipse.jdt.internal.compiler.lookup.ModuleBinding moduleBinding = (org.eclipse.jdt.internal<MASK><NEW_LINE>org.eclipse.jdt.internal.compiler.lookup.ModuleBinding moduleBinding2 = (org.eclipse.jdt.internal.compiler.lookup.ModuleBinding) declaringElement2;<NEW_LINE>return isEqual(moduleBinding, moduleBinding2);<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
.compiler.lookup.ModuleBinding) declaringElement;
1,400,040
protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {<NEW_LINE>Parser parser = new Parser(PATTERN, (String) msg);<NEW_LINE>if (!parser.matches()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Position position = new Position(getProtocolName());<NEW_LINE>DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next());<NEW_LINE>if (deviceSession == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>position.setDeviceId(deviceSession.getDeviceId());<NEW_LINE>DateBuilder dateBuilder = new DateBuilder().setTime(parser.nextInt(0), parser.nextInt(0)<MASK><NEW_LINE>position.setValid(parser.next().equals("A"));<NEW_LINE>position.setLatitude(parser.nextCoordinate());<NEW_LINE>position.setLongitude(parser.nextCoordinate());<NEW_LINE>position.setSpeed(parser.nextDouble(0));<NEW_LINE>position.setCourse(parser.nextDouble(0));<NEW_LINE>dateBuilder.setDateReverse(parser.nextInt(0), parser.nextInt(0), parser.nextInt(0));<NEW_LINE>position.setTime(dateBuilder.getDate());<NEW_LINE>return position;<NEW_LINE>}
, parser.nextInt(0));
667,417
public Mat run(Mat inputMat, ImageBlob imageBlob) {<NEW_LINE>int origin_w = inputMat.width();<NEW_LINE>int origin_h = inputMat.height();<NEW_LINE>imageBlob.getReshapeInfo().put("resize", new int[] { origin_w, origin_h });<NEW_LINE>int im_size_max = <MASK><NEW_LINE>float scale = (float) (long_size) / (float) (im_size_max);<NEW_LINE>int width = Math.round(scale * origin_w);<NEW_LINE>int height = Math.round(scale * origin_h);<NEW_LINE>Size sz = new Size(width, height);<NEW_LINE>Imgproc.resize(inputMat, inputMat, sz, 0, 0, interpMap.get(interp));<NEW_LINE>imageBlob.setNewImageSize(inputMat.height(), 2);<NEW_LINE>imageBlob.setNewImageSize(inputMat.width(), 3);<NEW_LINE>imageBlob.setScale(scale);<NEW_LINE>return inputMat;<NEW_LINE>}
Math.max(origin_w, origin_h);
1,173,928
private static void expandDataFileRules(Path file) throws IOException {<NEW_LINE>boolean modified = false;<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>try (InputStream stream = Files.newInputStream(file);<NEW_LINE>InputStreamReader reader = new InputStreamReader(stream, StandardCharsets.UTF_8);<NEW_LINE>BufferedReader bufferedReader = new BufferedReader(reader)) {<NEW_LINE>String line;<NEW_LINE>boolean verbatim = false;<NEW_LINE>int lineNum = 0;<NEW_LINE>while (null != (line = bufferedReader.readLine())) {<NEW_LINE>++lineNum;<NEW_LINE>if (VERBATIM_RULE_LINE_PATTERN.matcher(line).matches()) {<NEW_LINE>verbatim = true;<NEW_LINE>builder.append(line).append("\n");<NEW_LINE>} else {<NEW_LINE>Matcher ruleMatcher = RULE_LINE_PATTERN.matcher(line);<NEW_LINE>if (ruleMatcher.matches()) {<NEW_LINE>verbatim = false;<NEW_LINE>builder.append(line).append("\n");<NEW_LINE>try {<NEW_LINE>String leftHandSide = ruleMatcher.group(1).trim();<NEW_LINE>String rightHandSide = ruleMatcher.group(2).trim();<NEW_LINE>expandSingleRule(builder, leftHandSide, rightHandSide);<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>System.err.println("ERROR in " + file.getFileName() + " line #" + lineNum + ":");<NEW_LINE>e.printStackTrace(System.err);<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>modified = true;<NEW_LINE>} else {<NEW_LINE>if (BLANK_OR_COMMENT_LINE_PATTERN.matcher(line).matches()) {<NEW_LINE>builder.append(line).append("\n");<NEW_LINE>} else {<NEW_LINE>if (verbatim) {<NEW_LINE>builder.append<MASK><NEW_LINE>} else {<NEW_LINE>modified = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (modified) {<NEW_LINE>System.err.println("Expanding rules in and overwriting " + file.getFileName());<NEW_LINE>Files.writeString(file, builder.toString(), StandardCharsets.UTF_8);<NEW_LINE>}<NEW_LINE>}
(line).append("\n");
122,860
private JMenu buildFileMenu() {<NEW_LINE>JMenuItem item;<NEW_LINE>fileMenu = new JMenu(tr("File"));<NEW_LINE>fileMenu.setMnemonic(KeyEvent.VK_F);<NEW_LINE>item = newJMenuItem(tr("New"), 'N');<NEW_LINE>item.addActionListener(event -> {<NEW_LINE>try {<NEW_LINE>base.handleNew();<NEW_LINE>} catch (Exception e1) {<NEW_LINE>e1.printStackTrace();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>fileMenu.add(item);<NEW_LINE>item = Editor.newJMenuItem(tr("Open..."), 'O');<NEW_LINE>item.addActionListener(event -> {<NEW_LINE>try {<NEW_LINE>base.handleOpenPrompt();<NEW_LINE>} catch (Exception e1) {<NEW_LINE>e1.printStackTrace();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>fileMenu.add(item);<NEW_LINE>base.rebuildRecentSketchesMenuItems();<NEW_LINE>recentSketchesMenu = new JMenu(tr("Open Recent"));<NEW_LINE>SwingUtilities.invokeLater(() -> rebuildRecentSketchesMenu());<NEW_LINE>fileMenu.add(recentSketchesMenu);<NEW_LINE>if (sketchbookMenu == null) {<NEW_LINE>sketchbookMenu = new JMenu(tr("Sketchbook"));<NEW_LINE>MenuScroller.setScrollerFor(sketchbookMenu);<NEW_LINE>base.rebuildSketchbookMenu(sketchbookMenu);<NEW_LINE>}<NEW_LINE>fileMenu.add(sketchbookMenu);<NEW_LINE>if (examplesMenu == null) {<NEW_LINE>examplesMenu = new JMenu(tr("Examples"));<NEW_LINE>MenuScroller.setScrollerFor(examplesMenu);<NEW_LINE>base.rebuildExamplesMenu(examplesMenu);<NEW_LINE>}<NEW_LINE>fileMenu.add(examplesMenu);<NEW_LINE>item = Editor.newJMenuItem(tr("Close"), 'W');<NEW_LINE>item.addActionListener(event -> base.handleClose(Editor.this));<NEW_LINE>fileMenu.add(item);<NEW_LINE>saveMenuItem = newJMenuItem(tr("Save"), 'S');<NEW_LINE>saveMenuItem.addActionListener(event -> handleSave(false));<NEW_LINE>fileMenu.add(saveMenuItem);<NEW_LINE>saveAsMenuItem = newJMenuItemShift(tr("Save As..."), 'S');<NEW_LINE>saveAsMenuItem.addActionListener(event -> handleSaveAs());<NEW_LINE>fileMenu.add(saveAsMenuItem);<NEW_LINE>fileMenu.addSeparator();<NEW_LINE>item = newJMenuItemShift(tr("Page Setup"), 'P');<NEW_LINE>item.addActionListener(event -> handlePageSetup());<NEW_LINE>fileMenu.add(item);<NEW_LINE>item = newJMenuItem(tr("Print"), 'P');<NEW_LINE>item.addActionListener(event -> handlePrint());<NEW_LINE>fileMenu.add(item);<NEW_LINE>// macosx already has its own preferences and quit menu<NEW_LINE>if (!OSUtils.hasMacOSStyleMenus()) {<NEW_LINE>fileMenu.addSeparator();<NEW_LINE>item = newJMenuItem(tr("Preferences"), ',');<NEW_LINE>item.addActionListener(event -> base.handlePrefs());<NEW_LINE>fileMenu.add(item);<NEW_LINE>fileMenu.addSeparator();<NEW_LINE>item = newJMenuItem<MASK><NEW_LINE>item.addActionListener(event -> base.handleQuit());<NEW_LINE>fileMenu.add(item);<NEW_LINE>}<NEW_LINE>return fileMenu;<NEW_LINE>}
(tr("Quit"), 'Q');
1,213,773
public static SqlDelete collectTableInfo(SqlDelete delete, ExecutionContext ec) {<NEW_LINE>final List<SqlNode> sources = new ArrayList<>();<NEW_LINE>final List<SqlNode> aliases = new ArrayList<>();<NEW_LINE>final Map<SqlNode, List<SqlIdentifier>> subQueryTableMap = new HashMap<>();<NEW_LINE>final SqlNode sourceTableNode = Optional.ofNullable(delete.getSourceTableNode()).orElse(delete.getTargetTable());<NEW_LINE>boolean withAlias = collectSourceTable(sourceTableNode, sources, aliases, subQueryTableMap, false, ec);<NEW_LINE>if (delete.getCondition() instanceof SqlCall) {<NEW_LINE>final TableFinder tableFinder = new TableFinder(DefaultSchema.getSchemaName(), ec);<NEW_LINE>delete.getCondition().accept(tableFinder);<NEW_LINE>subQueryTableMap.putAll(tableFinder.getSubQueryTableMap());<NEW_LINE>}<NEW_LINE>if (delete.getOrderList() != null && delete.getOrderList().size() > 0) {<NEW_LINE>final TableFinder tableFinder = new TableFinder(DefaultSchema.getSchemaName(), ec);<NEW_LINE>delete.<MASK><NEW_LINE>subQueryTableMap.putAll(tableFinder.getSubQueryTableMap());<NEW_LINE>}<NEW_LINE>return delete.initTableInfo(new SqlNodeList(sources, SqlParserPos.ZERO), new SqlNodeList(aliases, SqlParserPos.ZERO), subQueryTableMap, withAlias);<NEW_LINE>}
getOrderList().accept(tableFinder);
23,025
private static VaultEntry convertEntry(JSONObject entry) throws DatabaseImporterEntryException {<NEW_LINE>try {<NEW_LINE>AuthyEntryInfo authyEntryInfo = new AuthyEntryInfo();<NEW_LINE>authyEntryInfo.OriginalName = JsonUtils.optString(entry, "originalName");<NEW_LINE>authyEntryInfo.OriginalIssuer = JsonUtils.optString(entry, "originalIssuer");<NEW_LINE>authyEntryInfo.AccountType = JsonUtils.optString(entry, "accountType");<NEW_LINE>authyEntryInfo.Name = entry.optString("name");<NEW_LINE>boolean isAuthy = entry.has("secretSeed");<NEW_LINE>sanitizeEntryInfo(authyEntryInfo, isAuthy);<NEW_LINE>byte[] secret;<NEW_LINE>if (isAuthy) {<NEW_LINE>secret = Hex.decode(entry.getString("secretSeed"));<NEW_LINE>} else {<NEW_LINE>secret = Base32.decode<MASK><NEW_LINE>}<NEW_LINE>int digits = entry.getInt("digits");<NEW_LINE>OtpInfo info = new TotpInfo(secret, OtpInfo.DEFAULT_ALGORITHM, digits, isAuthy ? 10 : TotpInfo.DEFAULT_PERIOD);<NEW_LINE>return new VaultEntry(info, authyEntryInfo.Name, authyEntryInfo.Issuer);<NEW_LINE>} catch (OtpInfoException | JSONException | EncodingException e) {<NEW_LINE>throw new DatabaseImporterEntryException(e, entry.toString());<NEW_LINE>}<NEW_LINE>}
(entry.getString("decryptedSecret"));
836,036
private static void remapModel(String bn, String newbn) {<NEW_LINE>DynmapBlockState frombs = DynmapBlockState.getBaseStateByName(bn);<NEW_LINE>DynmapBlockState tobs = DynmapBlockState.getBaseStateByName(bn);<NEW_LINE>int fcnt = frombs.getStateCount();<NEW_LINE>for (int bs = 0; bs < tobs.getStateCount(); bs++) {<NEW_LINE>DynmapBlockState tb = tobs.getState(bs);<NEW_LINE>DynmapBlockState fs = tobs.getState(bs % fcnt);<NEW_LINE>HDBlockModel m = models_by_id_data.get(fs.globalStateIndex);<NEW_LINE>if (m != null) {<NEW_LINE>models_by_id_data.<MASK><NEW_LINE>} else {<NEW_LINE>models_by_id_data.remove(tb.globalStateIndex);<NEW_LINE>}<NEW_LINE>customModelsRequestingTileData.set(tb.globalStateIndex, customModelsRequestingTileData.get(fs.globalStateIndex));<NEW_LINE>changeIgnoredBlocks.set(tb.globalStateIndex, changeIgnoredBlocks.get(fs.globalStateIndex));<NEW_LINE>}<NEW_LINE>}
put(tb.globalStateIndex, m);
1,641,135
private ArrayList<PointOfInterest> withinSphereChunkSectionSorted(Predicate<PointOfInterestType> predicate, BlockPos origin, int radius, PointOfInterestStorage.OccupationStatus status) {<NEW_LINE>double radiusSq = radius * radius;<NEW_LINE>int minChunkX = origin.getX() - radius - 1 >> 4;<NEW_LINE>int minChunkZ = origin.getZ() - radius - 1 >> 4;<NEW_LINE>int maxChunkX = origin.getX(<MASK><NEW_LINE>int maxChunkZ = origin.getZ() + radius + 1 >> 4;<NEW_LINE>// noinspection unchecked<NEW_LINE>RegionBasedStorageSectionExtended<PointOfInterestSet> storage = (RegionBasedStorageSectionExtended<PointOfInterestSet>) this;<NEW_LINE>ArrayList<PointOfInterest> points = new ArrayList<>();<NEW_LINE>Consumer<PointOfInterest> collector = point -> {<NEW_LINE>if (Distances.isWithinCircleRadius(origin, radiusSq, point.getPos())) {<NEW_LINE>points.add(point);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>for (int x = minChunkX; x <= maxChunkX; x++) {<NEW_LINE>for (int z = minChunkZ; z <= maxChunkZ; z++) {<NEW_LINE>for (PointOfInterestSet set : storage.getInChunkColumn(x, z)) {<NEW_LINE>((PointOfInterestSetExtended) set).collectMatchingPoints(predicate, status, collector);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return points;<NEW_LINE>}
) + radius + 1 >> 4;
935,432
private void collectPropertyData(String[] propFiles, TreeMap<Key, String[]> properties, GwtLocaleFactory factory) throws FileNotFoundException, IOException {<NEW_LINE>for (String propFile : propFiles) {<NEW_LINE>if (!propFile.startsWith("DateTimeConstantsImpl") || !propFile.endsWith(".properties")) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>int len = propFile.length();<NEW_LINE>String suffix = propFile.substring(21, len - 11);<NEW_LINE>if (suffix.startsWith("_")) {<NEW_LINE>suffix = suffix.substring(1);<NEW_LINE>}<NEW_LINE>GwtLocale locale = factory.<MASK><NEW_LINE>File f = new File(propDir, propFile);<NEW_LINE>FileInputStream str = null;<NEW_LINE>try {<NEW_LINE>str = new FileInputStream(f);<NEW_LINE>LocalizedProperties props = new LocalizedProperties();<NEW_LINE>props.load(str);<NEW_LINE>Map<String, String> map = props.getPropertyMap();<NEW_LINE>for (Map.Entry<String, String> entry : map.entrySet()) {<NEW_LINE>String[] value = split(entry.getValue());<NEW_LINE>if ("dateFormats".equals(entry.getKey()) || "timeFormats".equals(entry.getKey()) || "weekendRange".equals(entry.getKey())) {<NEW_LINE>// split these out into separate fields<NEW_LINE>for (int i = 0; i < value.length; ++i) {<NEW_LINE>Key key = new Key(locale, entry.getKey() + i);<NEW_LINE>properties.put(key, new String[] { value[i] });<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>Key key = new Key(locale, entry.getKey());<NEW_LINE>properties.put(key, value);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>buildPatterns(locale, properties);<NEW_LINE>} finally {<NEW_LINE>if (str != null) {<NEW_LINE>str.close();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
fromString(suffix).getCanonicalForm();
345,152
public static DescribeEpnInstanceAttributeResponse unmarshall(DescribeEpnInstanceAttributeResponse describeEpnInstanceAttributeResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeEpnInstanceAttributeResponse.setRequestId<MASK><NEW_LINE>describeEpnInstanceAttributeResponse.setEPNInstanceId(_ctx.stringValue("DescribeEpnInstanceAttributeResponse.EPNInstanceId"));<NEW_LINE>describeEpnInstanceAttributeResponse.setEPNInstanceName(_ctx.stringValue("DescribeEpnInstanceAttributeResponse.EPNInstanceName"));<NEW_LINE>describeEpnInstanceAttributeResponse.setNetworkingModel(_ctx.stringValue("DescribeEpnInstanceAttributeResponse.NetworkingModel"));<NEW_LINE>List<ConfVersionsItem> confVersions = new ArrayList<ConfVersionsItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeEpnInstanceAttributeResponse.ConfVersions.Length"); i++) {<NEW_LINE>ConfVersionsItem confVersionsItem = new ConfVersionsItem();<NEW_LINE>confVersionsItem.setConfVersion(_ctx.stringValue("DescribeEpnInstanceAttributeResponse.ConfVersions[" + i + "].ConfVersion"));<NEW_LINE>confVersionsItem.setEnsRegionId(_ctx.stringValue("DescribeEpnInstanceAttributeResponse.ConfVersions[" + i + "].EnsRegionId"));<NEW_LINE>confVersions.add(confVersionsItem);<NEW_LINE>}<NEW_LINE>describeEpnInstanceAttributeResponse.setConfVersions(confVersions);<NEW_LINE>List<EPNInstance> instances = new ArrayList<EPNInstance>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeEpnInstanceAttributeResponse.Instances.Length"); i++) {<NEW_LINE>EPNInstance ePNInstance = new EPNInstance();<NEW_LINE>ePNInstance.setEnsRegionId(_ctx.stringValue("DescribeEpnInstanceAttributeResponse.Instances[" + i + "].EnsRegionId"));<NEW_LINE>ePNInstance.setInstanceId(_ctx.stringValue("DescribeEpnInstanceAttributeResponse.Instances[" + i + "].InstanceId"));<NEW_LINE>ePNInstance.setInstanceName(_ctx.stringValue("DescribeEpnInstanceAttributeResponse.Instances[" + i + "].InstanceName"));<NEW_LINE>ePNInstance.setIsp(_ctx.stringValue("DescribeEpnInstanceAttributeResponse.Instances[" + i + "].Isp"));<NEW_LINE>ePNInstance.setPrivateIpAddress(_ctx.stringValue("DescribeEpnInstanceAttributeResponse.Instances[" + i + "].PrivateIpAddress"));<NEW_LINE>ePNInstance.setPublicIpAddress(_ctx.stringValue("DescribeEpnInstanceAttributeResponse.Instances[" + i + "].PublicIpAddress"));<NEW_LINE>ePNInstance.setStatus(_ctx.stringValue("DescribeEpnInstanceAttributeResponse.Instances[" + i + "].Status"));<NEW_LINE>instances.add(ePNInstance);<NEW_LINE>}<NEW_LINE>describeEpnInstanceAttributeResponse.setInstances(instances);<NEW_LINE>List<EPNInstance1> vSwitches = new ArrayList<EPNInstance1>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeEpnInstanceAttributeResponse.VSwitches.Length"); i++) {<NEW_LINE>EPNInstance1 ePNInstance1 = new EPNInstance1();<NEW_LINE>ePNInstance1.setCidrBlock(_ctx.stringValue("DescribeEpnInstanceAttributeResponse.VSwitches[" + i + "].CidrBlock"));<NEW_LINE>ePNInstance1.setEnsRegionId(_ctx.stringValue("DescribeEpnInstanceAttributeResponse.VSwitches[" + i + "].EnsRegionId"));<NEW_LINE>ePNInstance1.setVSwitchId(_ctx.stringValue("DescribeEpnInstanceAttributeResponse.VSwitches[" + i + "].VSwitchId"));<NEW_LINE>ePNInstance1.setVSwitchName(_ctx.stringValue("DescribeEpnInstanceAttributeResponse.VSwitches[" + i + "].VSwitchName"));<NEW_LINE>vSwitches.add(ePNInstance1);<NEW_LINE>}<NEW_LINE>describeEpnInstanceAttributeResponse.setVSwitches(vSwitches);<NEW_LINE>return describeEpnInstanceAttributeResponse;<NEW_LINE>}
(_ctx.stringValue("DescribeEpnInstanceAttributeResponse.RequestId"));
314,807
public SubjectAreaOMASAPIResponse<Project> createProject(String serverName, String userId, Project suppliedProject) {<NEW_LINE>final String methodName = "createProject";<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("==> Method: " + methodName + ",userId=" + userId);<NEW_LINE>}<NEW_LINE>SubjectAreaOMASAPIResponse<Project> response = new SubjectAreaOMASAPIResponse<>();<NEW_LINE>AuditLog auditLog = null;<NEW_LINE>try {<NEW_LINE>auditLog = instanceHandler.getAuditLog(userId, serverName, methodName);<NEW_LINE>SubjectAreaProjectHandler handler = instanceHandler.getSubjectAreaProjectHandler(userId, serverName, methodName);<NEW_LINE>response = handler.createProject(userId, suppliedProject);<NEW_LINE>} catch (OCFCheckedExceptionBase e) {<NEW_LINE>response.setExceptionInfo(e, className);<NEW_LINE>} catch (Exception exception) {<NEW_LINE>response = getResponseForException(<MASK><NEW_LINE>}<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("<== successful method : " + methodName + ",userId=" + userId + ", response =" + response);<NEW_LINE>}<NEW_LINE>return response;<NEW_LINE>}
exception, auditLog, className, methodName);
1,196,753
public void addSign(TransactionSign req, StreamObserver<TransactionExtention> responseObserver) {<NEW_LINE>TransactionExtention.Builder trxExtBuilder = TransactionExtention.newBuilder();<NEW_LINE>Return.Builder retBuilder = Return.newBuilder();<NEW_LINE>try {<NEW_LINE>TransactionCapsule trx = transactionUtil.addSign(req);<NEW_LINE>trxExtBuilder.setTransaction(trx.getInstance());<NEW_LINE>trxExtBuilder.setTxid(trx.<MASK><NEW_LINE>retBuilder.setResult(true).setCode(response_code.SUCCESS);<NEW_LINE>} catch (Exception e) {<NEW_LINE>retBuilder.setResult(false).setCode(response_code.OTHER_ERROR).setMessage(ByteString.copyFromUtf8(e.getClass() + " : " + e.getMessage()));<NEW_LINE>logger.info(EXCEPTION_CAUGHT + e.getMessage());<NEW_LINE>}<NEW_LINE>trxExtBuilder.setResult(retBuilder);<NEW_LINE>responseObserver.onNext(trxExtBuilder.build());<NEW_LINE>responseObserver.onCompleted();<NEW_LINE>}
getTransactionId().getByteString());
34,482
private Observable<RibbonResponse<Observable<T>>> convertToRibbonResponse(final HystrixObservableCommandChain<T> commandChain, final Observable<ResultCommandPair<T>> hystrixNotificationObservable) {<NEW_LINE>return Observable.create(new OnSubscribe<RibbonResponse<Observable<T>>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void call(final Subscriber<? super RibbonResponse<Observable<T>>> t1) {<NEW_LINE>final Subject<T, T> subject = ReplaySubject.create();<NEW_LINE>hystrixNotificationObservable.materialize().subscribe(new Action1<Notification<ResultCommandPair<T>>>() {<NEW_LINE><NEW_LINE>AtomicBoolean first = new AtomicBoolean(true);<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void call(Notification<ResultCommandPair<T>> notification) {<NEW_LINE>if (first.compareAndSet(true, false)) {<NEW_LINE>HystrixObservableCommand<T> command = notification.isOnError() ? commandChain.getLastCommand() : notification<MASK><NEW_LINE>t1.onNext(new ResponseWithSubject<T>(subject, command));<NEW_LINE>t1.onCompleted();<NEW_LINE>}<NEW_LINE>if (notification.isOnNext()) {<NEW_LINE>subject.onNext(notification.getValue().getResult());<NEW_LINE>} else if (notification.isOnCompleted()) {<NEW_LINE>subject.onCompleted();<NEW_LINE>} else {<NEW_LINE>// onError<NEW_LINE>subject.onError(notification.getThrowable());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
.getValue().getCommand();
127,830
protected void translateCore(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) {<NEW_LINE>final IOperandTreeNode registerOperand1 = instruction.getOperands().get(0).getRootNode().getChildren().get(0);<NEW_LINE>final IOperandTreeNode registerOperand2 = instruction.getOperands().get(1).getRootNode().<MASK><NEW_LINE>final IOperandTreeNode registerOperand3 = instruction.getOperands().get(2).getRootNode().getChildren().get(0);<NEW_LINE>final String targetRegister = (registerOperand1.getValue());<NEW_LINE>final String sourceRegister1 = (registerOperand2.getValue());<NEW_LINE>final String sourceRegister2 = (registerOperand3.getValue());<NEW_LINE>final long baseOffset = (instruction.getAddress().toLong() * 0x100) + instructions.size();<NEW_LINE>new Processor() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected String[] process(long baseOffset, final String[] firstTwo, final String[] secondTwo) {<NEW_LINE>final String sum1 = environment.getNextVariableString();<NEW_LINE>final String diff1 = environment.getNextVariableString();<NEW_LINE>final String diff1Sat = environment.getNextVariableString();<NEW_LINE>final String sum1Sat = environment.getNextVariableString();<NEW_LINE>baseOffset = baseOffset - instructions.size();<NEW_LINE>// do the adds<NEW_LINE>instructions.add(ReilHelpers.createAdd(baseOffset + instructions.size(), dw, firstTwo[0], dw, secondTwo[1], dw, sum1));<NEW_LINE>instructions.add(ReilHelpers.createSub(baseOffset + instructions.size(), dw, firstTwo[1], dw, secondTwo[0], dw, diff1));<NEW_LINE>// Do the Sat<NEW_LINE>Helpers.signedSat(baseOffset + instructions.size(), environment, instruction, instructions, dw, firstTwo[0], dw, secondTwo[1], dw, sum1, "ADD", sum1Sat, 16L, "");<NEW_LINE>Helpers.signedSat(baseOffset + instructions.size(), environment, instruction, instructions, dw, firstTwo[1], dw, secondTwo[0], dw, diff1, "SUB", diff1Sat, 16L, "");<NEW_LINE>return new String[] { sum1Sat, diff1Sat };<NEW_LINE>}<NEW_LINE>}.generate(environment, baseOffset, 16, sourceRegister1, sourceRegister2, targetRegister, instructions);<NEW_LINE>}
getChildren().get(0);
1,829,191
private JPanel buildOptionsPanelRight() {<NEW_LINE>JPanel panel = new JPanel(new PairLayout(10, 2));<NEW_LINE>JLabel minLengthLabel = new GLabel("Minimum Length: ");<NEW_LINE>minLengthLabel.setName("minLen");<NEW_LINE>minLengthLabel.setToolTipText("<html>Searches for valid ascii or ascii unicode strings " + "greater or equal to minimum search length.<br> The null characters are not included " + "in the minimum string length.");<NEW_LINE>panel.add(minLengthLabel);<NEW_LINE>minLengthField <MASK><NEW_LINE>minLengthField.getComponent().setName("minDefault");<NEW_LINE>panel.add(minLengthField.getComponent());<NEW_LINE>JLabel alignLabel = new GLabel("Alignment: ");<NEW_LINE>alignLabel.setName("alignment");<NEW_LINE>alignLabel.setToolTipText("<html>Searches for strings that start on the given alignment<br>" + "value. The default alignment is processor dependent.");<NEW_LINE>panel.add(alignLabel);<NEW_LINE>alignField = new IntegerTextField(5, 1L);<NEW_LINE>alignField.getComponent().setName("alignDefault");<NEW_LINE>panel.add(alignField.getComponent());<NEW_LINE>createModelFieldPanel(panel);<NEW_LINE>return panel;<NEW_LINE>}
= new IntegerTextField(5, 5L);