idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
532,793
protected void encodeEndPoint(WidgetBuilder wb, EndPoint endPoint, String elementClientId) throws IOException {<NEW_LINE>String type = endPoint.getType();<NEW_LINE>StringBuilder sb = SharedStringBuilder.get(SB_DIAGRAM);<NEW_LINE>String styleClass = endPoint.getStyleClass();<NEW_LINE>String hoverStyleClass = endPoint.getHoverStyleClass();<NEW_LINE>String style = endPoint.getStyle();<NEW_LINE>String hoverStyle = endPoint.getHoverStyle();<NEW_LINE>int maxConnections = endPoint.getMaxConnections();<NEW_LINE>String scope = endPoint.getScope();<NEW_LINE>wb.append("{uuid:'").append(endPoint.getId()).append("'").append(",element:'").append(elementClientId).append("'").append(",anchor:'").append(endPoint.getAnchor().toString()).append("'");<NEW_LINE>if (maxConnections != 1) {<NEW_LINE>wb.append(",maxConnections:").append(maxConnections);<NEW_LINE>}<NEW_LINE>if (style != null) {<NEW_LINE>wb.append<MASK><NEW_LINE>}<NEW_LINE>if (hoverStyle != null) {<NEW_LINE>wb.append(",hoverPaintStyle:").append(hoverStyle);<NEW_LINE>}<NEW_LINE>if (endPoint.isSource()) {<NEW_LINE>wb.append(",isSource:true");<NEW_LINE>}<NEW_LINE>if (endPoint.isTarget()) {<NEW_LINE>wb.append(",isTarget:true");<NEW_LINE>}<NEW_LINE>if (styleClass != null) {<NEW_LINE>wb.append(",cssClass:'").append(styleClass).append("'");<NEW_LINE>}<NEW_LINE>if (hoverStyleClass != null) {<NEW_LINE>wb.append(",hoverClass:'").append(hoverStyleClass).append("'");<NEW_LINE>}<NEW_LINE>if (scope != null) {<NEW_LINE>wb.append(",scope:'").append(scope).append("'");<NEW_LINE>}<NEW_LINE>if (type != null) {<NEW_LINE>wb.append(",endpoint:").append(endPoint.toJS(sb));<NEW_LINE>}<NEW_LINE>encodeOverlays(wb, endPoint.getOverlays(), "overlays");<NEW_LINE>wb.append("}");<NEW_LINE>}
(",paintStyle:").append(style);
204,433
final DescribeEntitiesDetectionV2JobResult executeDescribeEntitiesDetectionV2Job(DescribeEntitiesDetectionV2JobRequest describeEntitiesDetectionV2JobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeEntitiesDetectionV2JobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeEntitiesDetectionV2JobRequest> request = null;<NEW_LINE>Response<DescribeEntitiesDetectionV2JobResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeEntitiesDetectionV2JobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeEntitiesDetectionV2JobRequest));<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(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ComprehendMedical");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeEntitiesDetectionV2Job");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeEntitiesDetectionV2JobResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeEntitiesDetectionV2JobResultJsonUnmarshaller());<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>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
1,433,799
public static int estimateBandPassOrder(double sampleRate, int passBandStart, int passBandEnd, double passBandRippleDb, double stopBandRippleDb) {<NEW_LINE>double df = (double) FastMath.abs(passBandEnd - passBandStart) / sampleRate;<NEW_LINE>double ddp = FastMath.log10(passBandRippleDb);<NEW_LINE>double dds = FastMath.log10(stopBandRippleDb);<NEW_LINE>double a1 = 0.01201;<NEW_LINE>double a2 = 0.09664;<NEW_LINE>double a3 = -0.51325;<NEW_LINE>double a4 = 0.00203;<NEW_LINE>double a5 = -0.57054;<NEW_LINE>double a6 = -0.44314;<NEW_LINE>double t1 = a1 * ddp * ddp;<NEW_LINE>double t2 = a2 * ddp;<NEW_LINE>double t3 = a4 * ddp * ddp;<NEW_LINE>double t4 = a5 * ddp;<NEW_LINE>double cinf = dds * (t1 + t2 + <MASK><NEW_LINE>double ginf = -14.6f * (double) FastMath.log10(passBandRippleDb / stopBandRippleDb) - 16.9;<NEW_LINE>double n = cinf / df + ginf * df + 1.0;<NEW_LINE>return (int) FastMath.ceil(n);<NEW_LINE>}
a3) + t3 + t4 + a6;
1,614,986
public static boolean isCdi11OrLater(Project p) {<NEW_LINE>if (!hasResource(p, "javax/enterprise/inject/spi/AfterTypeDiscovery.class")) {<NEW_LINE>return false;<NEW_LINE>} else {<NEW_LINE>FileObject beans = getBeansXmlExists(p);<NEW_LINE>if (beans == null) {<NEW_LINE>// no beans.xml and ee7 environment, default cdi 1.1 behavior<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>WebBeansModel model = WebBeansModelFactory.getInstance().getModel(getModelSource(beans, true));<NEW_LINE>if (model == null) {<NEW_LINE>// ???<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String attribute = model.getRootComponent(<MASK><NEW_LINE>if (attribute == null || attribute.equals("1.0")) {<NEW_LINE>// no version attribute in cdi1.0 or equal to "1.0" in cdi 1.1.<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}
).getAttribute(BeansAttributes.VERSION);
542,963
public ResponseCard unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ResponseCard responseCard = new ResponseCard();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("version", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>responseCard.setVersion(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("contentType", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>responseCard.setContentType(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("genericAttachments", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>responseCard.setGenericAttachments(new ListUnmarshaller<GenericAttachment>(GenericAttachmentJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return responseCard;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,587,253
final GetFaceSearchResult executeGetFaceSearch(GetFaceSearchRequest getFaceSearchRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getFaceSearchRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetFaceSearchRequest> request = null;<NEW_LINE>Response<GetFaceSearchResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetFaceSearchRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getFaceSearchRequest));<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, "Rekognition");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetFaceSearch");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetFaceSearchResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetFaceSearchResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1,051,051
public static void main(final String... args) {<NEW_LINE>LOGGER.info("\n=========================================================" + "\n " + "\n Welcome to Spring Integration! " + "\n " + "\n For more information please visit: " + "\n https://www.springsource.org/spring-integration " + "\n " + "\n=========================================================");<NEW_LINE>final AbstractApplicationContext context = new ClassPathXmlApplicationContext("classpath:META-INF/spring/integration/*-context.xml");<NEW_LINE>context.registerShutdownHook();<NEW_LINE>final SearchRequestor searchRequestor = context.getBean(SearchRequestor.class);<NEW_LINE>final SearchA searchA = context.getBean(SearchA.class);<NEW_LINE>final SearchB searchB = <MASK><NEW_LINE>final Scanner scanner = new Scanner(System.in);<NEW_LINE>System.out.println("Please enter a choice and press <enter>: ");<NEW_LINE>System.out.println("\t1. Submit 2 search queries, 2 results returned.");<NEW_LINE>System.out.println("\t2. Submit 2 search queries, 1 search query takes too long, 1 result returned.");<NEW_LINE>System.out.println("\t3. Submit 2 search queries, 2 search queries take too long, 0 results returned.");<NEW_LINE>System.out.println("\tq. Quit the application");<NEW_LINE>System.out.print("Enter your choice: ");<NEW_LINE>while (true) {<NEW_LINE>final String input = scanner.nextLine();<NEW_LINE>if ("1".equals(input.trim())) {<NEW_LINE>searchA.setExecutionTime(1000L);<NEW_LINE>searchB.setExecutionTime(1000L);<NEW_LINE>final CompositeResult result = searchRequestor.search(TestUtils.getCompositeCriteria());<NEW_LINE>System.out.println("Number of Search Results: " + result.getResults().size());<NEW_LINE>} else if ("2".equals(input.trim())) {<NEW_LINE>searchA.setExecutionTime(6000L);<NEW_LINE>searchB.setExecutionTime(1000L);<NEW_LINE>final CompositeResult result = searchRequestor.search(TestUtils.getCompositeCriteria());<NEW_LINE>System.out.println("Number of Search Results: " + result.getResults().size());<NEW_LINE>} else if ("3".equals(input.trim())) {<NEW_LINE>searchA.setExecutionTime(6000L);<NEW_LINE>searchB.setExecutionTime(6000L);<NEW_LINE>final CompositeResult result = searchRequestor.search(TestUtils.getCompositeCriteria());<NEW_LINE>System.out.println("Result is null: " + (result == null));<NEW_LINE>} else if ("q".equals(input.trim())) {<NEW_LINE>break;<NEW_LINE>} else {<NEW_LINE>System.out.println("Invalid choice\n\n");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>System.out.println("Exiting application...bye.");<NEW_LINE>scanner.close();<NEW_LINE>context.close();<NEW_LINE>}
context.getBean(SearchB.class);
1,514,098
private static String decrypt(PublicKey publicKey, String cipherText) throws Exception {<NEW_LINE>Cipher cipher = Cipher.getInstance("RSA");<NEW_LINE>try {<NEW_LINE>cipher.init(Cipher.DECRYPT_MODE, publicKey);<NEW_LINE>} catch (InvalidKeyException e) {<NEW_LINE>// IBM JDK not support Private key encryption, public key decryption<NEW_LINE>// so fake an PrivateKey for it<NEW_LINE>RSAPublicKey rsaPublicKey = (RSAPublicKey) publicKey;<NEW_LINE>RSAPrivateKeySpec spec = new RSAPrivateKeySpec(rsaPublicKey.getModulus(), rsaPublicKey.getPublicExponent());<NEW_LINE>Key fakePrivateKey = KeyFactory.getInstance("RSA").generatePrivate(spec);<NEW_LINE>// It is a stateful object. so we need to get new one.<NEW_LINE>cipher = Cipher.getInstance("RSA");<NEW_LINE>cipher.init(Cipher.DECRYPT_MODE, fakePrivateKey);<NEW_LINE>}<NEW_LINE>if (cipherText == null || cipherText.length() == 0) {<NEW_LINE>return cipherText;<NEW_LINE>}<NEW_LINE>byte[] cipherBytes = Base64.base64ToByteArray(cipherText);<NEW_LINE>byte[] <MASK><NEW_LINE>return new String(plainBytes);<NEW_LINE>}
plainBytes = cipher.doFinal(cipherBytes);
519,573
public void marshall(CreateSimulationJobRequest createSimulationJobRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createSimulationJobRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createSimulationJobRequest.getClientRequestToken(), CLIENTREQUESTTOKEN_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSimulationJobRequest.getOutputLocation(), OUTPUTLOCATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSimulationJobRequest.getLoggingConfig(), LOGGINGCONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSimulationJobRequest.getMaxJobDurationInSeconds(), MAXJOBDURATIONINSECONDS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSimulationJobRequest.getIamRole(), IAMROLE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSimulationJobRequest.getFailureBehavior(), FAILUREBEHAVIOR_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSimulationJobRequest.getRobotApplications(), ROBOTAPPLICATIONS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSimulationJobRequest.getSimulationApplications(), SIMULATIONAPPLICATIONS_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createSimulationJobRequest.getTags(), TAGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSimulationJobRequest.getVpcConfig(), VPCCONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSimulationJobRequest.getCompute(), COMPUTE_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
createSimulationJobRequest.getDataSources(), DATASOURCES_BINDING);
1,337,522
public String uploadFile(String fileKey, File file) throws IOException {<NEW_LINE>if (s3Client == null || bucketName == null) {<NEW_LINE>throw new IllegalStateException("BackblazeDataTransferClient has not been initialised");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>long contentLength = file.length();<NEW_LINE>monitor.debug(() -> String.format("Uploading '%s' with file size %d bytes", fileKey, contentLength));<NEW_LINE>if (contentLength >= sizeThresholdForMultipartUpload) {<NEW_LINE>monitor.debug(() -> String.format("File size is larger than %d bytes, so using multipart upload", sizeThresholdForMultipartUpload));<NEW_LINE>return <MASK><NEW_LINE>}<NEW_LINE>PutObjectRequest putObjectRequest = PutObjectRequest.builder().bucket(bucketName).key(fileKey).build();<NEW_LINE>PutObjectResponse putObjectResponse = s3Client.putObject(putObjectRequest, RequestBody.fromFile(file));<NEW_LINE>return putObjectResponse.versionId();<NEW_LINE>} catch (AwsServiceException | SdkClientException e) {<NEW_LINE>throw new IOException(String.format("Error while uploading file, fileKey: %s", fileKey), e);<NEW_LINE>}<NEW_LINE>}
uploadFileUsingMultipartUpload(fileKey, file, contentLength);
719,559
protected boolean isCurrentPlanSuccessful() {<NEW_LINE>boolean successful = true;<NEW_LINE>List<ExecutionContext.ErrorMessage> errorMessages = (List<ExecutionContext.ErrorMessage>) executionContext.getExtraDatas().get(ExecutionContext.FailedMessage);<NEW_LINE>if (GeneralUtil.isNotEmpty(errorMessages)) {<NEW_LINE>// Copy a new list to avoid conflict since original list may be updated concurrently.<NEW_LINE>List<ExecutionContext.ErrorMessage> currentErrorMessages = new ArrayList<>(errorMessages);<NEW_LINE>String tableName = <MASK><NEW_LINE>for (ExecutionContext.ErrorMessage errorMessage : currentErrorMessages) {<NEW_LINE>if (errorMessage != null && errorMessage.getMessage() != null) {<NEW_LINE>String pureErrorMessage = errorMessage.getMessage().replaceAll(BACKTICK, EMPTY_CONTENT);<NEW_LINE>if (TStringUtil.equalsIgnoreCase(errorMessage.getGroupName(), groupName) && TStringUtil.containsIgnoreCase(pureErrorMessage, tableName)) {<NEW_LINE>// Check if we can ignore the error.<NEW_LINE>successful = checkIfIgnoreSqlStateAndErrorCode(null, errorMessage.getCode());<NEW_LINE>if (successful) {<NEW_LINE>// Record the error message for final determination.<NEW_LINE>phyDdlExecutionRecord.addErrorIgnored(errorMessage);<NEW_LINE>} else {<NEW_LINE>// Check if the physical object is actually done.<NEW_LINE>successful = checkIfPhyObjectDoneByHashcode();<NEW_LINE>if (successful) {<NEW_LINE>// Record the error message for final determination.<NEW_LINE>phyDdlExecutionRecord.addErrorIgnored(errorMessage);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return successful;<NEW_LINE>}
phyTableName.replaceAll(BACKTICK, EMPTY_CONTENT);
1,810,583
protected Tuple4<String[], String[], TypeInformation<?>[], String[]> prepareIoSchema(TableSchema dataSchema, Params params) {<NEW_LINE>ArrayList<String> tensorCols = new ArrayList<>();<NEW_LINE>ArrayList<TypeInformation<?>> tensorColTypes = new ArrayList<>();<NEW_LINE>String[] names = dataSchema.getFieldNames();<NEW_LINE>TypeInformation<?>[] types = dataSchema.getFieldTypes();<NEW_LINE>for (int i = 0; i < types.length; i++) {<NEW_LINE>if (AlinkTypes.TENSOR.equals(types[i]) || AlinkTypes.BOOL_TENSOR.equals(types[i]) || AlinkTypes.BYTE_TENSOR.equals(types[i]) || AlinkTypes.INT_TENSOR.equals(types[i]) || AlinkTypes.DOUBLE_TENSOR.equals(types[i]) || AlinkTypes.FLOAT_TENSOR.equals(types[i]) || AlinkTypes.LONG_TENSOR.equals(types[i]) || AlinkTypes.STRING_TENSOR.equals(types[i])) {<NEW_LINE>tensorCols<MASK><NEW_LINE>tensorColTypes.add(Types.STRING);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String[] selectedCols = tensorCols.toArray(new String[0]);<NEW_LINE>TypeInformation<?>[] selectedColTypes = tensorColTypes.toArray(new TypeInformation<?>[0]);<NEW_LINE>return Tuple4.of(selectedCols, selectedCols, selectedColTypes, null);<NEW_LINE>}
.add(names[i]);
141,648
private static void testContainers() {<NEW_LINE>TestContainers testContainers = new TestContainers();<NEW_LINE>Foo[] sv = testContainers.getStructVec();<NEW_LINE>assert sv.length == 2;<NEW_LINE>assert sv[0].getName().equals("1");<NEW_LINE>assert sv[0].calcF(0, 0) == 1;<NEW_LINE>assert sv[1].getName().equals("2");<NEW_LINE>assert sv[1].calcF(0, 0) == 2;<NEW_LINE>assert testContainers.getEmptyStructVec().length == 0;<NEW_LINE>String[] strv = testContainers.getStringVec();<NEW_LINE>assert strv.length == 7;<NEW_LINE>assert strv[0].equals("The");<NEW_LINE>assert strv<MASK><NEW_LINE>assert strv[2].equals("a");<NEW_LINE>assert strv[3].equals("young");<NEW_LINE>assert strv[4].equals("lady");<NEW_LINE>assert strv[5].equals("whose");<NEW_LINE>assert strv[6].equals("nose");<NEW_LINE>Foo[] owned = { new Foo(17, "") };<NEW_LINE>testContainers.setStructVec(owned);<NEW_LINE>Foo[] owned2 = testContainers.getStructVec();<NEW_LINE>assert owned2.length == 1;<NEW_LINE>assert owned2[0].calcF(0, 0) == 17;<NEW_LINE>assert owned2[0].getName().equals("");<NEW_LINE>}
[1].equals("was");
1,362,521
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {<NEW_LINE>View view = inflater.inflate(R.layout.group_join_bottom_sheet, container, false);<NEW_LINE>groupCancelButton = view.findViewById(R.id.group_join_cancel_button);<NEW_LINE>groupJoinButton = view.findViewById(R.id.group_join_button);<NEW_LINE>busy = view.findViewById(R.id.group_join_busy);<NEW_LINE>avatar = view.findViewById(R.id.group_join_recipient_avatar);<NEW_LINE>groupName = view.findViewById(R.id.group_join_group_name);<NEW_LINE>groupDescription = view.findViewById(R.id.group_join_group_description);<NEW_LINE>groupDetails = view.<MASK><NEW_LINE>groupJoinExplain = view.findViewById(R.id.group_join_explain);<NEW_LINE>groupCancelButton.setOnClickListener(v -> dismiss());<NEW_LINE>avatar.setImageBytesForGroup(null, new FallbackPhotoProvider(), AvatarColor.UNKNOWN);<NEW_LINE>return view;<NEW_LINE>}
findViewById(R.id.group_join_group_details);
1,325,202
final CreateMembersResult executeCreateMembers(CreateMembersRequest createMembersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createMembersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateMembersRequest> request = null;<NEW_LINE>Response<CreateMembersResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateMembersRequestProtocolMarshaller(protocolFactory).marshall<MASK><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, "Detective");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateMembers");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateMembersResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateMembersResultJsonUnmarshaller());<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>}
(super.beforeMarshalling(createMembersRequest));
1,493,545
public void marshall(ListFeatureGroupsRequest listFeatureGroupsRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (listFeatureGroupsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(listFeatureGroupsRequest.getNameContains(), NAMECONTAINS_BINDING);<NEW_LINE>protocolMarshaller.marshall(listFeatureGroupsRequest.getFeatureGroupStatusEquals(), FEATUREGROUPSTATUSEQUALS_BINDING);<NEW_LINE>protocolMarshaller.marshall(listFeatureGroupsRequest.getOfflineStoreStatusEquals(), OFFLINESTORESTATUSEQUALS_BINDING);<NEW_LINE>protocolMarshaller.marshall(listFeatureGroupsRequest.getCreationTimeAfter(), CREATIONTIMEAFTER_BINDING);<NEW_LINE>protocolMarshaller.marshall(listFeatureGroupsRequest.getCreationTimeBefore(), CREATIONTIMEBEFORE_BINDING);<NEW_LINE>protocolMarshaller.marshall(listFeatureGroupsRequest.getSortOrder(), SORTORDER_BINDING);<NEW_LINE>protocolMarshaller.marshall(listFeatureGroupsRequest.getSortBy(), SORTBY_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(listFeatureGroupsRequest.getNextToken(), NEXTTOKEN_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
listFeatureGroupsRequest.getMaxResults(), MAXRESULTS_BINDING);
679,832
private void buildHeader(byte msgCount, byte msgFlag, MaxCulMsgType msgType, byte groupId, String srcAddr, String dstAddr) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>this.msgCount = msgCount;<NEW_LINE>sb.append(String.format("%02x", msgCount).toUpperCase());<NEW_LINE>this.msgFlag = msgFlag;<NEW_LINE>sb.append(String.format("%02x", msgFlag).toUpperCase());<NEW_LINE>this.msgType = msgType;<NEW_LINE>this.msgTypeRaw = this.msgType.toByte();<NEW_LINE>sb.append(String.format("%02x", this.msgTypeRaw).toUpperCase());<NEW_LINE>this.srcAddrStr = srcAddr;<NEW_LINE>this.srcAddr[0] = (byte) (Integer.parseInt(srcAddr.substring(0, 2), 16) & 0xFF);<NEW_LINE>this.srcAddr[1] = (byte) (Integer.parseInt(srcAddr.substring(2, 4), 16) & 0xFF);<NEW_LINE>this.srcAddr[2] = (byte) (Integer.parseInt(srcAddr.substring(4, 6), 16) & 0xFF);<NEW_LINE>sb.append(srcAddr.toUpperCase());<NEW_LINE>this.dstAddrStr = dstAddr;<NEW_LINE>this.dstAddr[0] = (byte) (Integer.parseInt(dstAddr.substring(0, 2), 16) & 0xFF);<NEW_LINE>this.dstAddr[1] = (byte) (Integer.parseInt(dstAddr.substring(2, 4), 16) & 0xFF);<NEW_LINE>this.dstAddr[2] = (byte) (Integer.parseInt(dstAddr.substring(4, 6), 16) & 0xFF);<NEW_LINE>sb.<MASK><NEW_LINE>this.groupid = groupId;<NEW_LINE>sb.append(String.format("%02x", this.groupid).toUpperCase());<NEW_LINE>this.rawMsg = sb.toString();<NEW_LINE>}
append(dstAddr.toUpperCase());
934,348
public void printLog(int level) {<NEW_LINE>// convert total time to nanoseconds<NEW_LINE>totalTime = (long) (((double) totalTime * (double) 1000000000) / (<MASK><NEW_LINE>StringBuffer sb = new StringBuffer(200);<NEW_LINE>for (int i = 0; i < (level * 3); i++) sb.append(' ');<NEW_LINE>sb.append(name);<NEW_LINE>sb.append(" calls=");<NEW_LINE>sb.append(numCalls);<NEW_LINE>if ((totalTime > 0) && (parent != null) && (parent.totalTime > 0)) {<NEW_LINE>long percentTime = (1000L * totalTime) / parent.totalTime;<NEW_LINE>sb.append(", percent=");<NEW_LINE>sb.append((float) percentTime / 10f);<NEW_LINE>sb.append("%, ");<NEW_LINE>}<NEW_LINE>if (numCalls > 0) {<NEW_LINE>sb.append(", avg time=");<NEW_LINE>sb.append(totalTime / numCalls);<NEW_LINE>sb.append("ns (");<NEW_LINE>sb.append((totalTime / numCalls) / 1000000f);<NEW_LINE>sb.append("ms)");<NEW_LINE>}<NEW_LINE>Log.profile(channel, sb.toString());<NEW_LINE>ProfileNode child = children;<NEW_LINE>while (child != null) {<NEW_LINE>child.printLog(level + 1);<NEW_LINE>child = child.next;<NEW_LINE>}<NEW_LINE>}
double) ProfileTimer.getResolution());
948,561
// Final entry of adding backend<NEW_LINE>private void addBackend(String host, int heartbeatPort, boolean isFree, String destCluster, Map<String, String> tagMap) {<NEW_LINE>Backend newBackend = new Backend(Env.getCurrentEnv().getNextId(), host, heartbeatPort);<NEW_LINE>// update idToBackend<NEW_LINE>Map<Long, Backend> copiedBackends = Maps.newHashMap(idToBackendRef);<NEW_LINE>copiedBackends.put(<MASK><NEW_LINE>ImmutableMap<Long, Backend> newIdToBackend = ImmutableMap.copyOf(copiedBackends);<NEW_LINE>idToBackendRef = newIdToBackend;<NEW_LINE>// set new backend's report version as 0L<NEW_LINE>Map<Long, AtomicLong> copiedReportVersions = Maps.newHashMap(idToReportVersionRef);<NEW_LINE>copiedReportVersions.put(newBackend.getId(), new AtomicLong(0L));<NEW_LINE>ImmutableMap<Long, AtomicLong> newIdToReportVersion = ImmutableMap.copyOf(copiedReportVersions);<NEW_LINE>idToReportVersionRef = newIdToReportVersion;<NEW_LINE>if (!Strings.isNullOrEmpty(destCluster)) {<NEW_LINE>// add backend to destCluster<NEW_LINE>setBackendOwner(newBackend, destCluster);<NEW_LINE>} else if (!isFree) {<NEW_LINE>// add backend to DEFAULT_CLUSTER<NEW_LINE>setBackendOwner(newBackend, DEFAULT_CLUSTER);<NEW_LINE>} else {<NEW_LINE>// backend is free<NEW_LINE>}<NEW_LINE>// set tags<NEW_LINE>newBackend.setTagMap(tagMap);<NEW_LINE>// log<NEW_LINE>Env.getCurrentEnv().getEditLog().logAddBackend(newBackend);<NEW_LINE>LOG.info("finished to add {} ", newBackend);<NEW_LINE>// backends is changed, regenerated tablet number metrics<NEW_LINE>MetricRepo.generateBackendsTabletMetrics();<NEW_LINE>}
newBackend.getId(), newBackend);
1,346,828
private void renderMovementInfo(Graphics2D graphics, Tile tile) {<NEW_LINE>Polygon poly = Perspective.getCanvasTilePoly(client, tile.getLocalLocation());<NEW_LINE>if (poly == null || !poly.contains(client.getMouseCanvasPosition().getX(), client.getMouseCanvasPosition().getY())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (client.getCollisionMaps() != null) {<NEW_LINE>int[][] flags = client.getCollisionMaps()[client.getPlane()].getFlags();<NEW_LINE>int data = flags[tile.getSceneLocation().getX()][tile.getSceneLocation().getY()];<NEW_LINE>Set<MovementFlag> movementFlags = MovementFlag.getSetFlags(data);<NEW_LINE>if (movementFlags.isEmpty()) {<NEW_LINE>toolTipManager.add(new Tooltip("No movement flags"));<NEW_LINE>} else {<NEW_LINE>movementFlags.forEach(flag -> toolTipManager.add(new Tooltip(flag.toString())));<NEW_LINE>}<NEW_LINE>OverlayUtil.<MASK><NEW_LINE>}<NEW_LINE>}
renderPolygon(graphics, poly, GREEN);
557,861
public void send(PRUDPPacket request_packet, InetSocketAddress destination_address) throws PRUDPPacketHandlerException {<NEW_LINE>if (socket == null || socket.isClosed()) {<NEW_LINE>if (init_error != null) {<NEW_LINE>throw (new PRUDPPacketHandlerException("Transport unavailable", init_error));<NEW_LINE>}<NEW_LINE>throw (new PRUDPPacketHandlerException("Transport unavailable"));<NEW_LINE>}<NEW_LINE>checkTargetAddress(destination_address);<NEW_LINE>PRUDPPacketHandlerImpl delegate = altProtocolDelegate;<NEW_LINE>if (delegate != null && destination_address.getAddress().getClass().isInstance(delegate.explicit_bind_ip)) {<NEW_LINE>delegate.send(request_packet, destination_address);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>MyByteArrayOutputStream baos = new MyByteArrayOutputStream(MAX_PACKET_SIZE);<NEW_LINE>DataOutputStream os = new DataOutputStream(baos);<NEW_LINE>request_packet.serialise(os);<NEW_LINE>byte[] _buffer = baos.getBuffer();<NEW_LINE>int _length = baos.size();<NEW_LINE>request_packet.setSerialisedSize(_length);<NEW_LINE>DatagramPacket dg_packet = new DatagramPacket(_buffer, _length, destination_address);<NEW_LINE>// System.out.println( "Outgoing to " + dg_packet.getAddress());<NEW_LINE>if (TRACE_REQUESTS) {<NEW_LINE>Logger.log(new LogEvent(LOGID, "PRUDPPacketHandler: reply packet sent: " + request_packet.getString()));<NEW_LINE>}<NEW_LINE>sendToSocket(dg_packet);<NEW_LINE>stats.packetSent(_length);<NEW_LINE>// this is a reply to a request, no time delays considered here<NEW_LINE>} catch (Throwable e) {<NEW_LINE>Logger.log(new LogEvent(LOGID, LogEvent.LT_ERROR, "PRUDPPacketHandler: send to " + destination_address + " failed: " + <MASK><NEW_LINE>throw (new PRUDPPacketHandlerException("PRUDPPacketHandler:send failed", e));<NEW_LINE>}<NEW_LINE>}
Debug.getNestedExceptionMessage(e)));
809,421
public void authorizeSubscriptions(@NotNull final ChannelHandlerContext ctx, @NotNull final SUBSCRIBE msg) {<NEW_LINE>final String clientId = ctx.channel().attr(ChannelAttributes.CLIENT_CONNECTION).get().getClientId();<NEW_LINE>if (clientId == null || !ctx.channel().isActive()) {<NEW_LINE>// no more processing needed<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!authorizers.areAuthorizersAvailable()) {<NEW_LINE>incomingSubscribeService.processSubscribe(ctx, msg, false);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Map<String, AuthorizerProvider> providerMap = authorizers.getAuthorizerProviderMap();<NEW_LINE>if (providerMap.isEmpty()) {<NEW_LINE>incomingSubscribeService.processSubscribe(ctx, msg, false);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final ClientAuthorizers clientAuthorizers = getClientAuthorizers(ctx);<NEW_LINE>final List<ListenableFuture<SubscriptionAuthorizerOutputImpl>> listenableFutures = new ArrayList<>();<NEW_LINE>final AuthorizerProviderInput authorizerProviderInput = new AuthorizerProviderInputImpl(ctx.channel(), serverInformation, clientId);<NEW_LINE>// every topic gets its own task per authorizer<NEW_LINE>for (final Topic topic : msg.getTopics()) {<NEW_LINE>final SubscriptionAuthorizerInputImpl input = new SubscriptionAuthorizerInputImpl(UserPropertiesImpl.of(msg.getUserProperties().asList()), topic, ctx.channel(), clientId);<NEW_LINE>final <MASK><NEW_LINE>final SettableFuture<SubscriptionAuthorizerOutputImpl> topicProcessedFuture = SettableFuture.create();<NEW_LINE>listenableFutures.add(topicProcessedFuture);<NEW_LINE>final SubscriptionAuthorizerContext context = new SubscriptionAuthorizerContext(clientId, output, topicProcessedFuture, providerMap.size());<NEW_LINE>for (final Map.Entry<String, AuthorizerProvider> entry : providerMap.entrySet()) {<NEW_LINE>final SubscriptionAuthorizerTask task = new SubscriptionAuthorizerTask(entry.getValue(), entry.getKey(), authorizerProviderInput, clientAuthorizers);<NEW_LINE>pluginTaskExecutorService.handlePluginInOutTaskExecution(context, input, output, task);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final AllTopicsProcessedTask allTopicsProcessedTask = new AllTopicsProcessedTask(msg, listenableFutures, ctx, mqttServerDisconnector, incomingSubscribeService);<NEW_LINE>Futures.whenAllComplete(listenableFutures).run(allTopicsProcessedTask, MoreExecutors.directExecutor());<NEW_LINE>}
SubscriptionAuthorizerOutputImpl output = new SubscriptionAuthorizerOutputImpl(asyncer);
1,501,331
public Policy findById(ResourceServer resourceServer, String id) {<NEW_LINE>if (id == null)<NEW_LINE>return null;<NEW_LINE>CachedPolicy cached = cache.get(id, CachedPolicy.class);<NEW_LINE>if (cached != null) {<NEW_LINE>logger.tracev("by id cache hit: {0}", cached.getId());<NEW_LINE>}<NEW_LINE>if (cached == null) {<NEW_LINE>if (!modelMightExist(id))<NEW_LINE>return null;<NEW_LINE>Policy model = getPolicyStoreDelegate(<MASK><NEW_LINE>Long loaded = cache.getCurrentRevision(id);<NEW_LINE>if (model == null) {<NEW_LINE>setModelDoesNotExists(id, loaded);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (invalidations.contains(id))<NEW_LINE>return model;<NEW_LINE>cached = new CachedPolicy(loaded, model);<NEW_LINE>cache.addRevisioned(cached, startupRevision);<NEW_LINE>} else if (invalidations.contains(id)) {<NEW_LINE>return getPolicyStoreDelegate().findById(resourceServer, id);<NEW_LINE>} else if (managedPolicies.containsKey(id)) {<NEW_LINE>return managedPolicies.get(id);<NEW_LINE>}<NEW_LINE>PolicyAdapter adapter = new PolicyAdapter(cached, StoreFactoryCacheSession.this);<NEW_LINE>managedPolicies.put(id, adapter);<NEW_LINE>return adapter;<NEW_LINE>}
).findById(resourceServer, id);
1,844,901
public void pickBlockerOrder(UUID playerId, Game game) {<NEW_LINE>if (blockers.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// game.getPlayer(defenderAssignsCombatDamage(game) ? defendingPlayerId : playerId); // this was incorrect because defenderAssignsCombatDamage might be false by the time damage is dealt<NEW_LINE>Player player = game.getPlayer(playerId);<NEW_LINE>List<UUID> blockerList = new ArrayList<>(blockers);<NEW_LINE>blockerOrder.clear();<NEW_LINE>while (player.canRespond()) {<NEW_LINE>if (blockerList.size() == 1) {<NEW_LINE>blockerOrder.add(blockerList.get(0));<NEW_LINE>break;<NEW_LINE>} else {<NEW_LINE>List<Permanent> blockerPerms = new ArrayList<>();<NEW_LINE>for (UUID blockerId : blockerList) {<NEW_LINE>blockerPerms.add(game.getPermanent(blockerId));<NEW_LINE>}<NEW_LINE>UUID blockerId = player.chooseBlockerOrder(<MASK><NEW_LINE>blockerOrder.add(blockerId);<NEW_LINE>blockerList.remove(blockerId);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
blockerPerms, this, blockerOrder, game);
330,499
public List<String> introspect() {<NEW_LINE>List<String> rc = new LinkedList<String>();<NEW_LINE>String prefix = getClass().getSimpleName() + "@" + hashCode() + ": ";<NEW_LINE>rc.add(prefix + "aborted=" + this.aborted);<NEW_LINE>rc.add(prefix + "forceQueue=" + this.forceQueue);<NEW_LINE>rc.add(<MASK><NEW_LINE>rc.add(prefix + "ioCompleteAmt=" + this.ioCompleteAmt);<NEW_LINE>rc.add(prefix + "ioDoneAmt=" + this.ioDoneAmt);<NEW_LINE>rc.add(prefix + "lastIOAmt=" + this.lastIOAmt);<NEW_LINE>rc.add(prefix + "isRead=" + this.requestTypeRead);<NEW_LINE>rc.add(prefix + "timeoutInterval=" + this.timeoutInterval);<NEW_LINE>rc.add(prefix + "timeoutTime=" + this.timeoutTime);<NEW_LINE>rc.add(prefix + "link=" + this.oTCPConnLink);<NEW_LINE>if (null != this.oTCPConnLink) {<NEW_LINE>rc.addAll(this.oTCPConnLink.introspect());<NEW_LINE>}<NEW_LINE>return rc;<NEW_LINE>}
prefix + "ioAmount=" + this.ioAmount);
1,606,196
public void buildWriteMethod(JDefinedClass parcelableClass, JBlock body, JExpression parcel, JVar flags, ASTType type, JExpression targetExpression, ASTType converter, ReadWriteGenerator overrideGenerator, JExpression writeIdentitySet) {<NEW_LINE>JType parcelType = generationUtil.ref(ANDROID_PARCEL);<NEW_LINE>// write method<NEW_LINE>JType inputType = generationUtil.ref(type);<NEW_LINE>JMethod writeMethod = parcelableClass.method(JMod.PUBLIC | JMod.STATIC, Void.TYPE, WRITE_METHOD);<NEW_LINE>JBlock writeMethodBody = writeMethod.body();<NEW_LINE>JVar writeInputVar = writeMethod.param(inputType, variableNamer.generateName(inputType));<NEW_LINE>JVar parcelParam = writeMethod.param(parcelType<MASK><NEW_LINE>JVar flagsParam = writeMethod.param(int.class, variableNamer.generateName("flags"));<NEW_LINE>JVar identityParam = writeMethod.param(codeModel.ref(IdentityCollection.class), variableNamer.generateName("identityMap"));<NEW_LINE>JVar identityKey = writeMethodBody.decl(codeModel.INT, variableNamer.generateName("identity"), identityParam.invoke("getKey").arg(writeInputVar));<NEW_LINE>JConditional containsValueConditional = writeMethodBody._if(identityKey.ne(JExpr.lit(-1)));<NEW_LINE>containsValueConditional._then().invoke(parcelParam, "writeInt").arg(identityKey);<NEW_LINE>JBlock notContainsBlock = containsValueConditional._else();<NEW_LINE>notContainsBlock.invoke(parcelParam, "writeInt").arg(identityParam.invoke("put").arg(writeInputVar));<NEW_LINE>buildWriteToParcelExpression(parcelableClass, notContainsBlock, parcelParam, flagsParam, type, writeInputVar, converter, overrideGenerator, identityParam);<NEW_LINE>// invoke this generated method<NEW_LINE>body.invoke(writeMethod).arg(targetExpression).arg(parcel).arg(flags).arg(writeIdentitySet);<NEW_LINE>}
, variableNamer.generateName(parcelType));
996,326
public Void visitNewClass(NewClassTree javacTree, Node javaParserNode) {<NEW_LINE>ObjectCreationExpr node = castNode(ObjectCreationExpr.class, javaParserNode, javacTree);<NEW_LINE>processNewClass(javacTree, node);<NEW_LINE>// When using Java 11 javac, an expression like this.new MyInnerClass() would store "this"<NEW_LINE>// as the enclosing expression. In Java 8 javac, this would be stored as new<NEW_LINE>// MyInnerClass(this). So, we only traverse the enclosing expression if present in both.<NEW_LINE>if (javacTree.getEnclosingExpression() != null && node.getScope().isPresent()) {<NEW_LINE>javacTree.getEnclosingExpression().accept(this, node.getScope().get());<NEW_LINE>}<NEW_LINE>javacTree.getIdentifier().accept(this, node.getType());<NEW_LINE>if (javacTree.getTypeArguments().isEmpty()) {<NEW_LINE>assert !node.getTypeArguments().isPresent();<NEW_LINE>} else {<NEW_LINE>assert node.getTypeArguments().isPresent();<NEW_LINE>visitLists(javacTree.getTypeArguments(), node.getTypeArguments().get());<NEW_LINE>}<NEW_LINE>// Remove synthetic javac argument. When using Java 11, an expression like this.new<NEW_LINE>// MyInnerClass() would store "this" as the enclosing expression. In Java 8, this would be<NEW_LINE>// stored as new MyInnerClass(this). So, for the argument lists to match, we may have to<NEW_LINE>// remove the first argument.<NEW_LINE>List<? extends ExpressionTree> javacArgs = new ArrayList<>(javacTree.getArguments());<NEW_LINE>if (javacArgs.size() > node.getArguments().size()) {<NEW_LINE>javacArgs.remove(0);<NEW_LINE>}<NEW_LINE>visitLists(<MASK><NEW_LINE>assert (javacTree.getClassBody() != null) == node.getAnonymousClassBody().isPresent();<NEW_LINE>if (javacTree.getClassBody() != null) {<NEW_LINE>visitAnonymousClassBody(javacTree.getClassBody(), node.getAnonymousClassBody().get());<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
javacArgs, node.getArguments());
668,282
public final IJavaElement transplantHandle(IJavaElement element) {<NEW_LINE>IJavaElement parent = element.getParent();<NEW_LINE>if (parent != null) {<NEW_LINE>// recursive<NEW_LINE>parent = transplantHandle(parent);<NEW_LINE>}<NEW_LINE>switch(element.getElementType()) {<NEW_LINE>case IJavaElement.JAVA_MODEL:<NEW_LINE><MASK><NEW_LINE>case IJavaElement.JAVA_PROJECT:<NEW_LINE>return transplantHandle((IJavaProject) element);<NEW_LINE>case IJavaElement.PACKAGE_FRAGMENT_ROOT:<NEW_LINE>return transplantHandle((IJavaProject) parent, (IPackageFragmentRoot) element);<NEW_LINE>case IJavaElement.PACKAGE_FRAGMENT:<NEW_LINE>return transplantHandle((IPackageFragmentRoot) parent, (IPackageFragment) element);<NEW_LINE>case IJavaElement.COMPILATION_UNIT:<NEW_LINE>return transplantHandle((IPackageFragment) parent, (ICompilationUnit) element);<NEW_LINE>case IJavaElement.CLASS_FILE:<NEW_LINE>return transplantHandle((IPackageFragment) parent, (IClassFile) element);<NEW_LINE>case IJavaElement.TYPE:<NEW_LINE>return transplantHandle(parent, (IType) element);<NEW_LINE>case IJavaElement.FIELD:<NEW_LINE>return transplantHandle((IType) parent, (IField) element);<NEW_LINE>case IJavaElement.METHOD:<NEW_LINE>return transplantHandle((IType) parent, (IMethod) element);<NEW_LINE>case IJavaElement.INITIALIZER:<NEW_LINE>return transplantHandle((IType) parent, (IInitializer) element);<NEW_LINE>case IJavaElement.PACKAGE_DECLARATION:<NEW_LINE>return transplantHandle((ICompilationUnit) parent, (IPackageDeclaration) element);<NEW_LINE>case IJavaElement.IMPORT_CONTAINER:<NEW_LINE>return transplantHandle((ICompilationUnit) parent, (IImportContainer) element);<NEW_LINE>case IJavaElement.IMPORT_DECLARATION:<NEW_LINE>return transplantHandle((IImportContainer) parent, (IImportDeclaration) element);<NEW_LINE>case IJavaElement.LOCAL_VARIABLE:<NEW_LINE>return transplantHandle((ILocalVariable) element);<NEW_LINE>case IJavaElement.TYPE_PARAMETER:<NEW_LINE>return transplantHandle((IMember) parent, (ITypeParameter) element);<NEW_LINE>case IJavaElement.ANNOTATION:<NEW_LINE>return transplantHandle((IAnnotatable) parent, (IAnnotation) element);<NEW_LINE>default:<NEW_LINE>throw new IllegalArgumentException(element.toString());<NEW_LINE>}<NEW_LINE>}
return transplantHandle((IJavaModel) element);
1,413,999
public void initialize(AccessServiceConfig accessServiceConfig, OMRSTopicConnector enterpriseOMRSTopicConnector, OMRSRepositoryConnector repositoryConnector, AuditLog auditLog, String serverUserName) {<NEW_LINE>final String actionDescription = "initialize Glossary View OMAS";<NEW_LINE>this.auditLog = auditLog;<NEW_LINE>GlossaryViewAuditCode auditCode;<NEW_LINE>try {<NEW_LINE>auditCode = GlossaryViewAuditCode.SERVICE_INITIALIZING;<NEW_LINE>AuditLogMessageDefinition messageDefinition = new AuditLogMessageDefinition(auditCode.getLogMessageId(), auditCode.getSeverity(), auditCode.getFormattedLogMessage(serverName), auditCode.getSystemAction(), auditCode.getUserAction());<NEW_LINE>auditLog.logMessage(actionDescription, messageDefinition);<NEW_LINE>instance = new GlossaryViewServiceInstance(repositoryConnector, auditLog, serverUserName, repositoryConnector.getMaxPageSize());<NEW_LINE>serverName = instance.getServerName();<NEW_LINE>auditCode = GlossaryViewAuditCode.SERVICE_INITIALIZED;<NEW_LINE>messageDefinition = new AuditLogMessageDefinition(auditCode.getLogMessageId(), auditCode.getSeverity(), auditCode.getFormattedLogMessage(serverName), auditCode.getSystemAction(), auditCode.getUserAction());<NEW_LINE><MASK><NEW_LINE>} catch (Exception error) {<NEW_LINE>auditCode = GlossaryViewAuditCode.SERVICE_INSTANCE_FAILURE;<NEW_LINE>AuditLogMessageDefinition messageDefinition = new AuditLogMessageDefinition(auditCode.getLogMessageId(), auditCode.getSeverity(), auditCode.getFormattedLogMessage(error.getMessage()), auditCode.getSystemAction(), auditCode.getUserAction());<NEW_LINE>auditLog.logException(actionDescription, messageDefinition, error);<NEW_LINE>}<NEW_LINE>}
auditLog.logMessage(actionDescription, messageDefinition);
1,521,171
public List<MigrationQuery> compute(MappingModel mappingModel, Keyspace keyspace) {<NEW_LINE>List<MigrationQuery> queries = new ArrayList<>();<NEW_LINE>List<String> errors = new ArrayList<>();<NEW_LINE>for (EntityModel entity : mappingModel.getEntities().values()) {<NEW_LINE>switch(entity.getTarget()) {<NEW_LINE>case TABLE:<NEW_LINE>Table expectedTable = entity.getTableCqlSchema();<NEW_LINE>Table actualTable = keyspace.table(entity.getCqlName());<NEW_LINE>compute(expectedTable, actualTable, CassandraSchemaHelper::compare, CreateTableQuery::createTableAndIndexes, DropTableQuery::new, AddTableColumnQuery::new, CreateIndexQuery::new, "table", queries, errors);<NEW_LINE>break;<NEW_LINE>case UDT:<NEW_LINE>UserDefinedType expectedType = entity.getUdtCqlSchema();<NEW_LINE>UserDefinedType actualType = keyspace.userDefinedType(entity.getCqlName());<NEW_LINE>compute(expectedType, actualType, CassandraSchemaHelper::compare, CreateUdtQuery::createUdt, DropUdtQuery::new, AddUdtFieldQuery::new, <MASK><NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new AssertionError("Unexpected target " + entity.getTarget());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!errors.isEmpty()) {<NEW_LINE>String message = isPersisted ? "The GraphQL schema stored for this keyspace doesn't match the CQL data model " + "anymore. It looks like the database was altered manually." : String.format("The GraphQL schema that you provided can't be mapped to the current CQL data " + "model. Consider using a different migration strategy (current: %s).", strategy);<NEW_LINE>throw GraphqlErrorException.newErrorException().message(message + " See details in `extensions.migrationErrors` below.").extensions(ImmutableMap.of("migrationErrors", errors)).build();<NEW_LINE>}<NEW_LINE>return sortForExecution(queries);<NEW_LINE>}
UDT_NO_CREATE_INDEX, "UDT", queries, errors);
6,381
protected List<ProgrammingLanguage> sortAndFilterInternal(Map<String, SortMeta> sortBy, Map<String, FilterMeta> filterBy) {<NEW_LINE>Stream<ProgrammingLanguage<MASK><NEW_LINE>if (filterBy != null && !filterBy.isEmpty()) {<NEW_LINE>for (FilterMeta meta : filterBy.values()) {<NEW_LINE>if (meta.getFilterValue() != null) {<NEW_LINE>langsStream = langsStream.filter(lang -> {<NEW_LINE>if (meta.getField().equals("firstAppeared") && meta.getMatchMode() == MatchMode.GREATER_THAN_EQUALS) {<NEW_LINE>int filterValueInt = Integer.parseInt((String) meta.getFilterValue());<NEW_LINE>return lang.getFirstAppeared() >= filterValueInt;<NEW_LINE>}<NEW_LINE>if (meta.getField().equals("name")) {<NEW_LINE>return lang.getName().contains((String) meta.getFilterValue());<NEW_LINE>}<NEW_LINE>// TODO: add additional implementation when required<NEW_LINE>return true;<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (sortBy != null && !sortBy.isEmpty()) {<NEW_LINE>for (SortMeta meta : sortBy.values()) {<NEW_LINE>langsStream = langsStream.sorted(new ProgrammingLanguageLazySorter(meta));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return langsStream.collect(Collectors.toList());<NEW_LINE>}
> langsStream = langs.stream();
1,342,658
final GetFindingsPublicationConfigurationResult executeGetFindingsPublicationConfiguration(GetFindingsPublicationConfigurationRequest getFindingsPublicationConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getFindingsPublicationConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetFindingsPublicationConfigurationRequest> request = null;<NEW_LINE>Response<GetFindingsPublicationConfigurationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetFindingsPublicationConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getFindingsPublicationConfigurationRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetFindingsPublicationConfiguration");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetFindingsPublicationConfigurationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetFindingsPublicationConfigurationResultJsonUnmarshaller());<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.SERVICE_ID, "Macie2");
1,209,656
public void onProjectsLinked(@Nonnull final Collection linked) {<NEW_LINE>List<VcsDirectoryMapping> newMappings = ContainerUtilRt.newArrayList();<NEW_LINE>final LocalFileSystem fileSystem = LocalFileSystem.getInstance();<NEW_LINE>ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(project);<NEW_LINE>for (Object o : linked) {<NEW_LINE>final ExternalProjectSettings settings = (ExternalProjectSettings) o;<NEW_LINE>VirtualFile dir = fileSystem.<MASK><NEW_LINE>if (dir == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (!dir.isDirectory()) {<NEW_LINE>dir = dir.getParent();<NEW_LINE>}<NEW_LINE>newMappings.addAll(VcsUtil.findRoots(dir, project));<NEW_LINE>}<NEW_LINE>// There is a possible case that no VCS mappings are configured for the current project. There is a single<NEW_LINE>// mapping like <Project> - <No VCS> then. We want to replace it if only one mapping to the project root dir<NEW_LINE>// has been detected then.<NEW_LINE>List<VcsDirectoryMapping> oldMappings = vcsManager.getDirectoryMappings();<NEW_LINE>if (oldMappings.size() == 1 && newMappings.size() == 1 && StringUtil.isEmpty(oldMappings.get(0).getVcs())) {<NEW_LINE>VcsDirectoryMapping newMapping = newMappings.iterator().next();<NEW_LINE>String detectedDirPath = newMapping.getDirectory();<NEW_LINE>VirtualFile detectedDir = fileSystem.findFileByPath(detectedDirPath);<NEW_LINE>if (detectedDir != null && detectedDir.equals(project.getBaseDir())) {<NEW_LINE>newMappings.clear();<NEW_LINE>newMappings.add(new VcsDirectoryMapping("", newMapping.getVcs()));<NEW_LINE>vcsManager.setDirectoryMappings(newMappings);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>newMappings.addAll(oldMappings);<NEW_LINE>vcsManager.setDirectoryMappings(newMappings);<NEW_LINE>}
refreshAndFindFileByPath(settings.getExternalProjectPath());
842,520
public com.amazonaws.services.medialive.model.ConflictException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.medialive.model.ConflictException conflictException = new com.amazonaws.services.medialive.model.ConflictException(null);<NEW_LINE><MASK><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 conflictException;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
223,649
private BeanReference createFilterChain(Element element, ParserContext pc) {<NEW_LINE>boolean secured = !OPT_SECURITY_NONE.equals(element.getAttribute(ATT_SECURED));<NEW_LINE>if (!secured) {<NEW_LINE>validateSecuredFilterChainElement(element, pc);<NEW_LINE>for (int i = 0; i < element.getChildNodes().getLength(); i++) {<NEW_LINE>if (element.getChildNodes().item(i) instanceof Element) {<NEW_LINE>pc.getReaderContext().error("If you are using <http> to define an unsecured pattern, " + "it cannot contain child elements.", pc.extractSource(element));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return createSecurityFilterChainBean(element, pc, Collections.emptyList());<NEW_LINE>}<NEW_LINE>BeanReference portMapper = createPortMapper(element, pc);<NEW_LINE>BeanReference portResolver = createPortResolver(portMapper, pc);<NEW_LINE>ManagedList<BeanReference> authenticationProviders = new ManagedList<>();<NEW_LINE>BeanReference authenticationManager = createAuthenticationManager(element, pc, authenticationProviders);<NEW_LINE>boolean forceAutoConfig = isDefaultHttpConfig(element);<NEW_LINE>HttpConfigurationBuilder httpBldr = new HttpConfigurationBuilder(element, forceAutoConfig, pc, portMapper, portResolver, authenticationManager);<NEW_LINE>httpBldr.getSecurityContextRepositoryForAuthenticationFilters();<NEW_LINE>AuthenticationConfigBuilder authBldr = new AuthenticationConfigBuilder(element, forceAutoConfig, pc, httpBldr.getSessionCreationPolicy(), httpBldr.getRequestCache(), authenticationManager, httpBldr.getSecurityContextRepositoryForAuthenticationFilters(), httpBldr.getSessionStrategy(), portMapper, <MASK><NEW_LINE>httpBldr.setLogoutHandlers(authBldr.getLogoutHandlers());<NEW_LINE>httpBldr.setEntryPoint(authBldr.getEntryPointBean());<NEW_LINE>httpBldr.setAccessDeniedHandler(authBldr.getAccessDeniedHandlerBean());<NEW_LINE>httpBldr.setCsrfIgnoreRequestMatchers(authBldr.getCsrfIgnoreRequestMatchers());<NEW_LINE>authenticationProviders.addAll(authBldr.getProviders());<NEW_LINE>List<OrderDecorator> unorderedFilterChain = new ArrayList<>();<NEW_LINE>unorderedFilterChain.addAll(httpBldr.getFilters());<NEW_LINE>unorderedFilterChain.addAll(authBldr.getFilters());<NEW_LINE>unorderedFilterChain.addAll(buildCustomFilterList(element, pc));<NEW_LINE>unorderedFilterChain.sort(new OrderComparator());<NEW_LINE>checkFilterChainOrder(unorderedFilterChain, pc, pc.extractSource(element));<NEW_LINE>// The list of filter beans<NEW_LINE>List<BeanMetadataElement> filterChain = new ManagedList<>();<NEW_LINE>for (OrderDecorator od : unorderedFilterChain) {<NEW_LINE>filterChain.add(od.bean);<NEW_LINE>}<NEW_LINE>return createSecurityFilterChainBean(element, pc, filterChain);<NEW_LINE>}
portResolver, httpBldr.getCsrfLogoutHandler());
588,037
private UncachedKeyRing fetchKeyFromFacebook(@NonNull ParcelableProxy proxy, OperationLog log, ParcelableKeyRing entry) throws PgpGeneralException, IOException {<NEW_LINE>if (facebookServer == null) {<NEW_LINE>facebookServer = FacebookKeyserverClient.getInstance();<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>log.add(LogType.MSG_IMPORT_FETCH_FACEBOOK, 2, entry.getFbUsername());<NEW_LINE>byte[] data = facebookServer.get(entry.getFbUsername(), proxy).getBytes();<NEW_LINE>UncachedKeyRing facebookKey = UncachedKeyRing.decodeFromData(data);<NEW_LINE>if (facebookKey != null) {<NEW_LINE>log.add(LogType.MSG_IMPORT_FETCH_KEYSERVER_OK, 3);<NEW_LINE>} else {<NEW_LINE>log.add(LogType.MSG_IMPORT_FETCH_ERROR_DECODE, 3);<NEW_LINE>}<NEW_LINE>return facebookKey;<NEW_LINE>} catch (KeyserverClient.QueryFailedException e) {<NEW_LINE>// download failed, too bad. just proceed<NEW_LINE><MASK><NEW_LINE>log.add(LogType.MSG_IMPORT_FETCH_ERROR_KEYSERVER, 3, e.getMessage());<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
Timber.e(e, "query failed");
631,202
private static IndexFileList downloadIndexesListFromInternet(OsmandApplication ctx) {<NEW_LINE>try {<NEW_LINE>IndexFileList result = new IndexFileList();<NEW_LINE>log.debug("Start loading list of index files");<NEW_LINE>try {<NEW_LINE>String strUrl = ctx.getAppCustomization().getIndexesUrl();<NEW_LINE>long nd = ctx.getAppInitializer().getFirstInstalledDays();<NEW_LINE>if (nd > 0) {<NEW_LINE>strUrl += "&nd=" + nd;<NEW_LINE>}<NEW_LINE>strUrl += "&ns=" + ctx<MASK><NEW_LINE>try {<NEW_LINE>strUrl += "&aid=" + Secure.getString(ctx.getContentResolver(), Secure.ANDROID_ID);<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>log.info(strUrl);<NEW_LINE>XmlPullParser parser = XmlPullParserFactory.newInstance().newPullParser();<NEW_LINE>URLConnection connection = NetworkUtils.getHttpURLConnection(strUrl);<NEW_LINE>InputStream in = connection.getInputStream();<NEW_LINE>GZIPInputStream gzin = new GZIPInputStream(in);<NEW_LINE>parser.setInput(gzin, "UTF-8");<NEW_LINE>int next;<NEW_LINE>while ((next = parser.next()) != XmlPullParser.END_DOCUMENT) {<NEW_LINE>if (next == XmlPullParser.START_TAG) {<NEW_LINE>String attrValue = parser.getAttributeValue(null, "type");<NEW_LINE>DownloadActivityType tp = DownloadActivityType.getIndexType(attrValue);<NEW_LINE>if (tp != null) {<NEW_LINE>IndexItem it = tp.parseIndexItem(ctx, parser);<NEW_LINE>if (it != null) {<NEW_LINE>result.add(it);<NEW_LINE>}<NEW_LINE>} else if ("osmand_regions".equals(parser.getName())) {<NEW_LINE>String mapVersion = parser.getAttributeValue(null, "mapversion");<NEW_LINE>result.setMapVersion(mapVersion);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>result.sort();<NEW_LINE>gzin.close();<NEW_LINE>in.close();<NEW_LINE>} catch (IOException | XmlPullParserException e) {<NEW_LINE>log.error("Error while loading indexes from repository", e);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (result.isAcceptable()) {<NEW_LINE>return result;<NEW_LINE>} else {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>log.error("Error while loading indexes from repository", e);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
.getAppInitializer().getNumberOfStarts();
1,689,427
private List<Operation> extractOperations(RestMockService mockService) {<NEW_LINE>// Actions corresponding to same operations may be defined multiple times in SoapUI<NEW_LINE>// with different resourcePaths. We have to track them to complete them in second step.<NEW_LINE>Map<String, Operation> collectedOperations = new HashMap<String, Operation>();<NEW_LINE>List<RESTMockActionConfig> actions = mockService.getConfig().getRestMockActionList();<NEW_LINE>for (RESTMockActionConfig action : actions) {<NEW_LINE>// Check already found operation.<NEW_LINE>Operation operation = collectedOperations.get(action.getName());<NEW_LINE>if (operation == null) {<NEW_LINE>// Build a new operation.<NEW_LINE>operation = new Operation();<NEW_LINE>operation.setName(action.getName());<NEW_LINE>// Complete with REST specific fields.<NEW_LINE>operation.setMethod(action.getMethod());<NEW_LINE>// Deal with dispatcher stuffs.<NEW_LINE>operation.setDispatcher(action.getDispatchStyle().toString());<NEW_LINE>if (DispatchStyles.SEQUENCE.equals(action.getDispatchStyle().toString())) {<NEW_LINE>operation.setDispatcherRules(DispatchCriteriaHelper.extractPartsFromURIPattern(operation.getName()));<NEW_LINE>} else if (DispatchStyles.SCRIPT.equals(action.getDispatchStyle().toString())) {<NEW_LINE>String script = action.getDispatchPath();<NEW_LINE>operation.setDispatcherRules(script);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Add this configuration resource path.<NEW_LINE>operation.addResourcePath(action.getResourcePath());<NEW_LINE>collectedOperations.put(<MASK><NEW_LINE>}<NEW_LINE>return new ArrayList<>(collectedOperations.values());<NEW_LINE>}
action.getName(), operation);
1,794,150
public static IValue createFrom(final IValueInputStream vos) throws IOException {<NEW_LINE>final int index = vos.getIndex();<NEW_LINE>final <MASK><NEW_LINE>final int info = vos.readByte();<NEW_LINE>Value res;<NEW_LINE>final Value[] rvals = new Value[len];<NEW_LINE>if (info == 0) {<NEW_LINE>final int low = vos.readInt();<NEW_LINE>final int high = vos.readInt();<NEW_LINE>for (int i = 0; i < len; i++) {<NEW_LINE>rvals[i] = (Value) vos.read();<NEW_LINE>}<NEW_LINE>final IntervalValue intv = new IntervalValue(low, high);<NEW_LINE>res = new FcnRcdValue(intv, rvals);<NEW_LINE>} else {<NEW_LINE>final Value[] dvals = new Value[len];<NEW_LINE>for (int i = 0; i < len; i++) {<NEW_LINE>dvals[i] = (Value) vos.read();<NEW_LINE>rvals[i] = (Value) vos.read();<NEW_LINE>}<NEW_LINE>res = new FcnRcdValue(dvals, rvals, (info == 1));<NEW_LINE>}<NEW_LINE>vos.assign(res, index);<NEW_LINE>return res;<NEW_LINE>}
int len = vos.readNat();
622,092
void generateMapLoadIns(BIRNonTerminator.FieldAccess mapLoadIns) {<NEW_LINE>// visit map_ref<NEW_LINE>this.loadVar(mapLoadIns.rhsOp.variableDcl);<NEW_LINE>BType varRefType = mapLoadIns.rhsOp.variableDcl.type;<NEW_LINE>jvmCastGen.addUnboxInsn(this.mv, varRefType);<NEW_LINE>// visit key_expr<NEW_LINE>this.<MASK><NEW_LINE>if (varRefType.tag == TypeTags.JSON) {<NEW_LINE>if (mapLoadIns.optionalFieldAccess) {<NEW_LINE>this.mv.visitTypeInsn(CHECKCAST, B_STRING_VALUE);<NEW_LINE>this.mv.visitMethodInsn(INVOKESTATIC, JSON_UTILS, "getElementOrNil", JSON_GET_ELEMENT, false);<NEW_LINE>} else {<NEW_LINE>this.mv.visitTypeInsn(CHECKCAST, B_STRING_VALUE);<NEW_LINE>this.mv.visitMethodInsn(INVOKESTATIC, JSON_UTILS, "getElement", JSON_GET_ELEMENT, false);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (mapLoadIns.fillingRead) {<NEW_LINE>this.mv.visitMethodInsn(INVOKEINTERFACE, MAP_VALUE, "fillAndGet", PASS_OBJECT_RETURN_OBJECT, true);<NEW_LINE>} else {<NEW_LINE>this.mv.visitMethodInsn(INVOKEINTERFACE, MAP_VALUE, "get", PASS_OBJECT_RETURN_OBJECT, true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// store in the target reg<NEW_LINE>BType targetType = mapLoadIns.lhsOp.variableDcl.type;<NEW_LINE>jvmCastGen.addUnboxInsn(this.mv, targetType);<NEW_LINE>this.storeToVar(mapLoadIns.lhsOp.variableDcl);<NEW_LINE>}
loadVar(mapLoadIns.keyOp.variableDcl);
959,740
public void display(GLAutoDrawable glautodrawable) {<NEW_LINE>GL2 gl = glautodrawable.getGL().getGL2();<NEW_LINE>if (DEBUG) {<NEW_LINE>gl = new DebugGL2(gl);<NEW_LINE>}<NEW_LINE>camera.simpleAnimate();<NEW_LINE>camera.applyCamera(gl);<NEW_LINE>// int width = glautodrawable.getWidth();<NEW_LINE>gl.glClearColor(1.f, 1.f, 1.f, 1.f);<NEW_LINE>gl.glClear(GL.GL_COLOR_BUFFER_BIT);<NEW_LINE>// setup vbo, tbo's, etc.<NEW_LINE>gl.glEnable(GL2.GL_VERTEX_PROGRAM_POINT_SIZE);<NEW_LINE>gl.glEnable(GL2.GL_POINT_SPRITE);<NEW_LINE>gl.glTexEnvf(GL2.GL_POINT_SPRITE, GL2.GL_COORD_REPLACE, GL.GL_TRUE);<NEW_LINE>// This has a surprisingly large performance impact on i945:<NEW_LINE>// gl2.glPointParameteri(GL2.GL_POINT_SPRITE_COORD_ORIGIN,<NEW_LINE>// GL2.GL_LOWER_LEFT);<NEW_LINE>gl.glDisable(GL2.GL_ALPHA_TEST);<NEW_LINE>gl.glEnable(GL.GL_BLEND);<NEW_LINE>gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);<NEW_LINE>gl.glDepthMask(false);<NEW_LINE>gl.glBindBuffer(GL.GL_ARRAY_BUFFER, data.getBufferID());<NEW_LINE>gl.glClientActiveTexture(GL.GL_TEXTURE0);<NEW_LINE>gl.glTexCoordPointer(2, GL.GL_FLOAT, data.stride, data.getOffsetX());<NEW_LINE>gl.glEnableClientState(GL2.GL_TEXTURE_COORD_ARRAY);<NEW_LINE>gl.glClientActiveTexture(GL.GL_TEXTURE1);<NEW_LINE>gl.glTexCoordPointer(2, GL.GL_FLOAT, data.stride, data.getOffsetY());<NEW_LINE>gl.glEnableClientState(GL2.GL_TEXTURE_COORD_ARRAY);<NEW_LINE>gl.glClientActiveTexture(GL.GL_TEXTURE2);<NEW_LINE>gl.glTexCoordPointer(2, GL.GL_FLOAT, data.stride, data.getOffsetZ());<NEW_LINE>gl.glEnableClientState(GL2.GL_TEXTURE_COORD_ARRAY);<NEW_LINE>gl.glClientActiveTexture(GL.GL_TEXTURE0);<NEW_LINE>gl.glVertexPointer(3, GL.GL_FLOAT, data.stride, data.getOffsetShapeNum());<NEW_LINE>gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);<NEW_LINE>gl.glNormalPointer(GL.GL_FLOAT, data.stride, data.getOffsetColorNum());<NEW_LINE><MASK><NEW_LINE>scatter.enableProgram(gl);<NEW_LINE>// draw all active particles<NEW_LINE>gl.glDrawArrays(GL.GL_POINTS, 0, data.size());<NEW_LINE>// clean up<NEW_LINE>gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);<NEW_LINE>gl.glDisable(GL.GL_BLEND);<NEW_LINE>gl.glDisable(GL2.GL_POINT_SPRITE);<NEW_LINE>gl.glDisable(GL2.GL_VERTEX_PROGRAM_POINT_SIZE);<NEW_LINE>gl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0);<NEW_LINE>gl.glUseProgram(0);<NEW_LINE>}
gl.glEnableClientState(GL2.GL_NORMAL_ARRAY);
690,717
final DescribeJobLogItemsResult executeDescribeJobLogItems(DescribeJobLogItemsRequest describeJobLogItemsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeJobLogItemsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeJobLogItemsRequest> request = null;<NEW_LINE>Response<DescribeJobLogItemsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeJobLogItemsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeJobLogItemsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeJobLogItems");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeJobLogItemsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeJobLogItemsResultJsonUnmarshaller());<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.SERVICE_ID, "drs");
138,678
private void initInfo(int record_id, String value) {<NEW_LINE>if (!(record_id == 0) && value != null && value.length() > 0) {<NEW_LINE>log.severe("Received both a record_id and a value: " + record_id + " - " + value);<NEW_LINE>}<NEW_LINE>// Set values<NEW_LINE>if (// A record is defined<NEW_LINE>!(record_id == 0)) {<NEW_LINE>fieldID = record_id;<NEW_LINE>String trxName = Trx.createTrxName();<NEW_LINE>MPayment p = new MPayment(Env.getCtx(), record_id, trxName);<NEW_LINE>fCheckReceipt.setSelected(p.isReceipt());<NEW_LINE>fCheckPayment.setSelected(!p.isReceipt());<NEW_LINE>p = null;<NEW_LINE>Trx.get(trxName, false).close();<NEW_LINE>} else // Try to find other criteria in the context<NEW_LINE>{<NEW_LINE>String id;<NEW_LINE>// C_BPartner_ID<NEW_LINE>id = Env.getContext(Env.getCtx(), p_WindowNo, p_TabNo, "C_BPartner_ID", true);<NEW_LINE>if (id != null && id.length() != 0 && (new Integer(id).intValue() > 0))<NEW_LINE>fBPartner_ID.setValue(new Integer(id));<NEW_LINE>// The value passed in from the field<NEW_LINE>if (value != null && value.length() > 0) {<NEW_LINE>fDocumentNo.setValue(value);<NEW_LINE>} else {<NEW_LINE>// C_Payment_ID<NEW_LINE>id = Env.getContext(Env.getCtx(), p_WindowNo, p_TabNo, "C_Payment_ID", true);<NEW_LINE>if (id != null && id.length() != 0 && (new Integer(id).intValue() > 0)) {<NEW_LINE>fieldID = new Integer(id).intValue();<NEW_LINE>String trxName = Trx.createTrxName();<NEW_LINE>MPayment p = new MPayment(Env.getCtx(), record_id, trxName);<NEW_LINE>fCheckReceipt.setSelected(p.isReceipt());<NEW_LINE>fCheckPayment.setSelected(!p.isReceipt());<NEW_LINE>p = null;<NEW_LINE>Trx.get(trxName, false).close();<NEW_LINE>}<NEW_LINE>// C_BankAccount_ID<NEW_LINE>id = Env.getContext(Env.getCtx(), <MASK><NEW_LINE>if (id != null && id.length() != 0 && (new Integer(id).intValue() > 0))<NEW_LINE>fBankAccount_ID.setValue(new Integer(id));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
p_WindowNo, p_TabNo, "C_BankAccount_ID", true);
1,615,235
protected static Collection<Geocache> searchByBBox(final Viewport viewport) {<NEW_LINE>if (!Settings.isGCPremiumMember() || CONSUMER_KEY.isEmpty() || viewport.getLatitudeSpan() == 0 || viewport.getLongitudeSpan() == 0) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>final double lat1 = viewport.getLatitudeMax();<NEW_LINE>final double lat2 = viewport.getLatitudeMin();<NEW_LINE>final double lon1 = viewport.getLongitudeMax();<NEW_LINE>final double lon2 = viewport.getLongitudeMin();<NEW_LINE>final double latcenter = (lat1 + lat2) / 2;<NEW_LINE>final double loncenter = (lon1 + lon2) / 2;<NEW_LINE>final Geopoint gp1 = new Geopoint(lat1, lon1);<NEW_LINE>final Geopoint gp2 = new Geopoint(lat2, lon2);<NEW_LINE>// we get diameter in km, need radius in m<NEW_LINE>final int radius = (int) (gp1.distanceTo(gp2) * 500);<NEW_LINE><MASK><NEW_LINE>final Geopoint center = new Geopoint(latcenter, loncenter);<NEW_LINE>return searchByCenter(center, radius);<NEW_LINE>}
Log.d("_AL Radius: " + radius);
1,594,361
public List<LintDefectV2Entity> findDefectsByFilePath(Long taskId, String toolName, Set<Integer> excludeStatusSet, Set<String> filterPaths) {<NEW_LINE>BasicDBObject fieldsObj = new BasicDBObject();<NEW_LINE><MASK><NEW_LINE>fieldsObj.put("exclude_time", true);<NEW_LINE>Query query = new BasicQuery(new BasicDBObject(), fieldsObj);<NEW_LINE>query.addCriteria(Criteria.where("task_id").is(taskId).and("tool_name").is(toolName).and("status").nin(excludeStatusSet));<NEW_LINE>Criteria orOperator = new Criteria();<NEW_LINE>orOperator.orOperator(filterPaths.stream().map(file -> Criteria.where("file_path").regex(file)).toArray(Criteria[]::new));<NEW_LINE>query.addCriteria(orOperator);<NEW_LINE>return mongoTemplate.find(query, LintDefectV2Entity.class);<NEW_LINE>}
fieldsObj.put("status", true);
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 <MASK><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>param.put("counter", counter);<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>}
= new ArrayList<Pack>();
562,385
private void handleSegmentReferredToCountAndRententionFlags(SegmentHeader segmentHeader) throws IOException, JBIG2Exception {<NEW_LINE>short referedToSegmentCountAndRetentionFlags = reader.readByte();<NEW_LINE>// 224<NEW_LINE>int referredToSegmentCount = (referedToSegmentCountAndRetentionFlags & 224) >> 5;<NEW_LINE>// =<NEW_LINE>// 11100000<NEW_LINE>short[] retentionFlags;<NEW_LINE>// 31 =<NEW_LINE>short firstByte = (short) (referedToSegmentCountAndRetentionFlags & 31);<NEW_LINE>// 00011111<NEW_LINE>if (referredToSegmentCount <= 4) {<NEW_LINE>// short form<NEW_LINE>retentionFlags = new short[1];<NEW_LINE>retentionFlags[0] = firstByte;<NEW_LINE>} else if (referredToSegmentCount == 7) {<NEW_LINE>// long form<NEW_LINE>short[] longFormCountAndFlags = new short[4];<NEW_LINE>longFormCountAndFlags[0] = firstByte;<NEW_LINE>for (// add the next 3 bytes to the array<NEW_LINE>int i = 1; // add the next 3 bytes to the array<NEW_LINE>i < 4; // add the next 3 bytes to the array<NEW_LINE>i++) longFormCountAndFlags[i] = reader.readByte();<NEW_LINE>referredToSegmentCount = BinaryOperation.getInt32(longFormCountAndFlags);<NEW_LINE>int noOfBytesInField = (int) Math.ceil(4 + ((referredToSegmentCount + 1) / 8d));<NEW_LINE>// System.out.println("noOfBytesInField = " + noOfBytesInField);<NEW_LINE>int noOfRententionFlagBytes = noOfBytesInField - 4;<NEW_LINE>retentionFlags = new short[noOfRententionFlagBytes];<NEW_LINE>reader.readByte(retentionFlags);<NEW_LINE>} else {<NEW_LINE>// error<NEW_LINE>throw new JBIG2Exception("Error, 3 bit Segment count field = " + referredToSegmentCount);<NEW_LINE>}<NEW_LINE>segmentHeader.setReferredToSegmentCount(referredToSegmentCount);<NEW_LINE>if (JBIG2StreamDecoder.debug)<NEW_LINE>System.<MASK><NEW_LINE>segmentHeader.setRententionFlags(retentionFlags);<NEW_LINE>if (JBIG2StreamDecoder.debug)<NEW_LINE>System.out.print("retentionFlags = ");<NEW_LINE>if (JBIG2StreamDecoder.debug) {<NEW_LINE>for (short retentionFlag : retentionFlags) System.out.print(retentionFlag + " ");<NEW_LINE>System.out.println("");<NEW_LINE>}<NEW_LINE>}
out.println("referredToSegmentCount = " + referredToSegmentCount);
868,082
public Object intercept(final Invocation invocation) throws Throwable {<NEW_LINE>StatementHandler statementHandler = (StatementHandler) invocation.getTarget();<NEW_LINE>// Elegant access to object properties through MetaObject, here is access to the properties of statementHandler;<NEW_LINE>// MetaObject is an object provided by Mybatis for easy and elegant access to object properties,<NEW_LINE>// through which you can simplify the code, no need to try/catch various reflect exceptions,<NEW_LINE>// while it supports the operation of JavaBean, Collection, Map three types of object operations.<NEW_LINE>// MetaObject metaObject = MetaObject<NEW_LINE>// .forObject(statementHandler, SystemMetaObject.DEFAULT_OBJECT_FACTORY, SystemMetaObject.DEFAULT_OBJECT_WRAPPER_FACTORY,<NEW_LINE>// new DefaultReflectorFactory());<NEW_LINE>// First intercept to RoutingStatementHandler, there is a StatementHandler type delegate variable,<NEW_LINE>// its implementation class is BaseStatementHandler, and then to the BaseStatementHandler member variable mappedStatement<NEW_LINE>// MappedStatement mappedStatement = (MappedStatement) metaObject.getValue("delegate.mappedStatement");<NEW_LINE>// String id = mappedStatement.getId(); mapper method full path<NEW_LINE>// String sqlCommandType = mappedStatement.getSqlCommandType().toString(); sql method eg: insert update delete select<NEW_LINE><MASK><NEW_LINE>// get original sql file<NEW_LINE>// reflect modify sql file<NEW_LINE>Field field = boundSql.getClass().getDeclaredField("sql");<NEW_LINE>field.setAccessible(true);<NEW_LINE>field.set(boundSql, boundSql.getSql().replace("`", "\"").toLowerCase());<NEW_LINE>return invocation.proceed();<NEW_LINE>}
BoundSql boundSql = statementHandler.getBoundSql();
587,481
final BatchGetAggregateResourceConfigResult executeBatchGetAggregateResourceConfig(BatchGetAggregateResourceConfigRequest batchGetAggregateResourceConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchGetAggregateResourceConfigRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<BatchGetAggregateResourceConfigRequest> request = null;<NEW_LINE>Response<BatchGetAggregateResourceConfigResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new BatchGetAggregateResourceConfigRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchGetAggregateResourceConfigRequest));<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(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Config Service");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchGetAggregateResourceConfig");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<BatchGetAggregateResourceConfigResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchGetAggregateResourceConfigResultJsonUnmarshaller());<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>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
977,728
public synchronized void createUser(User user, int account) {<NEW_LINE>ContentValues values = new ContentValues();<NEW_LINE>long id = user.getId();<NEW_LINE>String screenName = user.getScreenName();<NEW_LINE>String name = user.getName();<NEW_LINE><MASK><NEW_LINE>values.put(FavoriteUsersSQLiteHelper.COLUMN_ACCOUNT, account);<NEW_LINE>values.put(FavoriteUsersSQLiteHelper.COLUMN_ID, id);<NEW_LINE>values.put(FavoriteUsersSQLiteHelper.COLUMN_NAME, name);<NEW_LINE>values.put(FavoriteUsersSQLiteHelper.COLUMN_PRO_PIC, proPicUrl);<NEW_LINE>values.put(FavoriteUsersSQLiteHelper.COLUMN_SCREEN_NAME, screenName);<NEW_LINE>try {<NEW_LINE>database.insert(FavoriteUsersSQLiteHelper.TABLE_HOME, null, values);<NEW_LINE>} catch (Exception e) {<NEW_LINE>open();<NEW_LINE>database.insert(FavoriteUsersSQLiteHelper.TABLE_HOME, null, values);<NEW_LINE>}<NEW_LINE>}
String proPicUrl = user.getOriginalProfileImageURL();
337,604
public static void verticalInverse(WlCoef_F32 coefficients, GrayF32 input, GrayF32 output) {<NEW_LINE>final int offsetA = coefficients.offsetScaling;<NEW_LINE>final int offsetB = coefficients.offsetWavelet;<NEW_LINE>final float[] alpha = coefficients.scaling;<NEW_LINE>final float[] beta = coefficients.wavelet;<NEW_LINE>float[] trends = new float[output.height];<NEW_LINE>float[] details = new float[output.height];<NEW_LINE>final int width = output.width;<NEW_LINE>final int height = input.height;<NEW_LINE>final int heightD2 = (height / 2) * input.stride;<NEW_LINE>final int <MASK><NEW_LINE>final int upperBorder = output.height - UtilWavelet.borderForwardUpper(coefficients, output.height);<NEW_LINE>for (int x = 0; x < width; x++) {<NEW_LINE>int indexSrc = input.startIndex + (lowerBorder / 2) * input.stride + x;<NEW_LINE>for (int y = lowerBorder; y < upperBorder; y += 2, indexSrc += input.stride) {<NEW_LINE>float a = input.data[indexSrc];<NEW_LINE>float d = input.data[indexSrc + heightD2];<NEW_LINE>// add the trend<NEW_LINE>for (int i = 0; i < 2; i++) trends[i + y + offsetA] = a * alpha[i];<NEW_LINE>// add the detail signal<NEW_LINE>for (int i = 0; i < 2; i++) details[i + y + offsetB] = d * beta[i];<NEW_LINE>}<NEW_LINE>for (int i = upperBorder + offsetA; i < upperBorder; i++) trends[i] = 0;<NEW_LINE>for (int i = upperBorder + offsetB; i < upperBorder; i++) details[i] = 0;<NEW_LINE>// perform the normal inverse transform<NEW_LINE>indexSrc = input.startIndex + (lowerBorder / 2) * input.stride + x;<NEW_LINE>for (int y = lowerBorder; y < upperBorder; y += 2, indexSrc += input.stride) {<NEW_LINE>float a = input.data[indexSrc];<NEW_LINE>float d = input.data[indexSrc + heightD2];<NEW_LINE>// add the 'average' signal<NEW_LINE>for (int i = 2; i < alpha.length; i++) {<NEW_LINE>trends[y + offsetA + i] += a * alpha[i];<NEW_LINE>}<NEW_LINE>// add the detail signal<NEW_LINE>for (int i = 2; i < beta.length; i++) {<NEW_LINE>details[y + offsetB + i] += d * beta[i];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int indexDst = output.startIndex + x + lowerBorder * output.stride;<NEW_LINE>for (int y = lowerBorder; y < upperBorder; y++, indexDst += output.stride) {<NEW_LINE>output.data[indexDst] = (trends[y] + details[y]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
lowerBorder = UtilWavelet.borderForwardLower(coefficients);
1,755,878
private Map<String, Object> _getCompositeComponentAttributesMapWrapper(UIComponent baseComponent, ELContext elContext) {<NEW_LINE>Map<Object, Object> contextMap = (Map<Object, Object>) <MASK><NEW_LINE>// We use a WeakHashMap<UIComponent, WeakReference<Map<String, Object>>> to<NEW_LINE>// hold attribute map wrappers by two reasons:<NEW_LINE>//<NEW_LINE>// 1. The wrapper is used multiple times for a very short amount of time (in fact on current request).<NEW_LINE>// 2. The original attribute map has an inner reference to UIComponent, so we need to wrap it<NEW_LINE>// with WeakReference.<NEW_LINE>//<NEW_LINE>Map<UIComponent, WeakReference<Map<String, Object>>> compositeComponentAttributesMaps = (Map<UIComponent, WeakReference<Map<String, Object>>>) contextMap.get(COMPOSITE_COMPONENT_ATTRIBUTES_MAPS);<NEW_LINE>Map<String, Object> attributesMap = null;<NEW_LINE>WeakReference<Map<String, Object>> weakReference;<NEW_LINE>if (compositeComponentAttributesMaps != null) {<NEW_LINE>weakReference = compositeComponentAttributesMaps.get(baseComponent);<NEW_LINE>if (weakReference != null) {<NEW_LINE>attributesMap = weakReference.get();<NEW_LINE>}<NEW_LINE>if (attributesMap == null) {<NEW_LINE>// create a wrapper map<NEW_LINE>attributesMap = new CompositeComponentAttributesMapWrapper(baseComponent);<NEW_LINE>compositeComponentAttributesMaps.put(baseComponent, new WeakReference<Map<String, Object>>(attributesMap));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// Create both required maps<NEW_LINE>attributesMap = new CompositeComponentAttributesMapWrapper(baseComponent);<NEW_LINE>compositeComponentAttributesMaps = new WeakHashMap<UIComponent, WeakReference<Map<String, Object>>>();<NEW_LINE>compositeComponentAttributesMaps.put(baseComponent, new WeakReference<Map<String, Object>>(attributesMap));<NEW_LINE>contextMap.put(COMPOSITE_COMPONENT_ATTRIBUTES_MAPS, compositeComponentAttributesMaps);<NEW_LINE>}<NEW_LINE>return attributesMap;<NEW_LINE>}
facesContext(elContext).getAttributes();
137,077
private ArgParsed parseLongOption(String pArg, String pNextArgument) {<NEW_LINE>// Long option<NEW_LINE>String opt = pArg.substring(2);<NEW_LINE>String value = null;<NEW_LINE>// Check for format 'key=value' as argument<NEW_LINE>Matcher <MASK><NEW_LINE>if (matcher.matches()) {<NEW_LINE>opt = matcher.group(1);<NEW_LINE>value = matcher.group(2);<NEW_LINE>}<NEW_LINE>if (OPTIONS.contains(opt)) {<NEW_LINE>verifyOptionWithArgument(opt, value, pNextArgument);<NEW_LINE>return value != null ? new ArgParsed(opt, value, false) : new ArgParsed(opt, pNextArgument, true);<NEW_LINE>} else if (OPTIONS.contains(opt + "!")) {<NEW_LINE>return new ArgParsed(opt, "true", false);<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("Unknown option '" + opt + "'");<NEW_LINE>}<NEW_LINE>}
matcher = ARGUMENT_PATTERN_WITH_EQUAL.matcher(opt);
794,143
public Boolean isVulnerable() {<NEW_LINE>List<ProtocolVersion> versions = config.getVersions();<NEW_LINE>Config tlsConfig = getTlsConfig();<NEW_LINE>List<CipherSuite> <MASK><NEW_LINE>if (tlsConfig.getDefaultClientSupportedCipherSuites().isEmpty()) {<NEW_LINE>for (CipherSuite cs : CipherSuite.getImplemented()) {<NEW_LINE>if (cs.isCBC()) {<NEW_LINE>ciphers.add(cs);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>ciphers = tlsConfig.getDefaultClientSupportedCipherSuites();<NEW_LINE>}<NEW_LINE>for (ProtocolVersion version : versions) {<NEW_LINE>for (CipherSuite suite : ciphers) {<NEW_LINE>try {<NEW_LINE>vulnerable |= executeAttackRound(version, suite);<NEW_LINE>} catch (Throwable t) {<NEW_LINE>LOGGER.warn("Problem while testing " + version.name() + " with cipher suite " + suite.name());<NEW_LINE>LOGGER.debug(t);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (vulnerable) {<NEW_LINE>LOGGER.info("VULNERABLE");<NEW_LINE>} else {<NEW_LINE>LOGGER.info("NOT VULNERABLE");<NEW_LINE>}<NEW_LINE>LOGGER.debug("All the attack runs executed. The following messages arrived at the ends of the connections");<NEW_LINE>for (ProtocolMessage pm : lastMessages) {<NEW_LINE>LOGGER.debug("----- NEXT TLS CONNECTION WITH MODIFIED APPLICATION DATA RECORD -----");<NEW_LINE>LOGGER.debug("Last protocol message in the protocol flow");<NEW_LINE>LOGGER.debug(pm.toString());<NEW_LINE>}<NEW_LINE>return vulnerable;<NEW_LINE>}
ciphers = new LinkedList<>();
1,203,496
public void rotate(double theta, boolean flipH, boolean flipV, double cx, double cy) {<NEW_LINE>cx += state.dx;<NEW_LINE>cy += state.dy;<NEW_LINE>cx *= state.scale;<NEW_LINE>cy *= state.scale;<NEW_LINE>state.g.rotate(Math.toRadians(theta), cx, cy);<NEW_LINE>// This implementation uses custom scale/translate and built-in rotation<NEW_LINE>// Rotation state is part of the AffineTransform in state.transform<NEW_LINE>if (flipH && flipV) {<NEW_LINE>theta += 180;<NEW_LINE>} else if (flipH ^ flipV) {<NEW_LINE>double tx = (flipH) ? cx : 0;<NEW_LINE>int sx = (flipH) ? -1 : 1;<NEW_LINE>double ty = (flipV) ? cy : 0;<NEW_LINE>int sy = <MASK><NEW_LINE>state.g.translate(tx, ty);<NEW_LINE>state.g.scale(sx, sy);<NEW_LINE>state.g.translate(-tx, -ty);<NEW_LINE>}<NEW_LINE>state.theta = theta;<NEW_LINE>state.rotationCx = cx;<NEW_LINE>state.rotationCy = cy;<NEW_LINE>state.flipH = flipH;<NEW_LINE>state.flipV = flipV;<NEW_LINE>}
(flipV) ? -1 : 1;
897,018
public void marshall(RegisterActivityTypeRequest registerActivityTypeRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (registerActivityTypeRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(registerActivityTypeRequest.getDomain(), DOMAIN_BINDING);<NEW_LINE>protocolMarshaller.marshall(registerActivityTypeRequest.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(registerActivityTypeRequest.getVersion(), VERSION_BINDING);<NEW_LINE>protocolMarshaller.marshall(registerActivityTypeRequest.getDescription(), DESCRIPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(registerActivityTypeRequest.getDefaultTaskStartToCloseTimeout(), DEFAULTTASKSTARTTOCLOSETIMEOUT_BINDING);<NEW_LINE>protocolMarshaller.marshall(registerActivityTypeRequest.getDefaultTaskHeartbeatTimeout(), DEFAULTTASKHEARTBEATTIMEOUT_BINDING);<NEW_LINE>protocolMarshaller.marshall(registerActivityTypeRequest.getDefaultTaskList(), DEFAULTTASKLIST_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(registerActivityTypeRequest.getDefaultTaskScheduleToStartTimeout(), DEFAULTTASKSCHEDULETOSTARTTIMEOUT_BINDING);<NEW_LINE>protocolMarshaller.marshall(registerActivityTypeRequest.getDefaultTaskScheduleToCloseTimeout(), DEFAULTTASKSCHEDULETOCLOSETIMEOUT_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
registerActivityTypeRequest.getDefaultTaskPriority(), DEFAULTTASKPRIORITY_BINDING);
1,631,707
public Mono<PollResponse<T>> poll(PollingContext<T> pollingContext, TypeReference<T> pollResponseType) {<NEW_LINE>HttpRequest request = new HttpRequest(HttpMethod.GET, pollingContext.getData(PollingConstants.LOCATION));<NEW_LINE>return httpPipeline.send(request, this.context).flatMap(response -> {<NEW_LINE>HttpHeader locationHeader = response.getHeaders().get(PollingConstants.LOCATION);<NEW_LINE>if (locationHeader != null) {<NEW_LINE>pollingContext.setData(PollingConstants.<MASK><NEW_LINE>}<NEW_LINE>LongRunningOperationStatus status;<NEW_LINE>if (response.getStatusCode() == 202) {<NEW_LINE>status = LongRunningOperationStatus.IN_PROGRESS;<NEW_LINE>} else if (response.getStatusCode() >= 200 && response.getStatusCode() <= 204) {<NEW_LINE>status = LongRunningOperationStatus.SUCCESSFULLY_COMPLETED;<NEW_LINE>} else {<NEW_LINE>status = LongRunningOperationStatus.FAILED;<NEW_LINE>}<NEW_LINE>return response.getBodyAsByteArray().map(BinaryData::fromBytes).flatMap(binaryData -> {<NEW_LINE>pollingContext.setData(PollingConstants.POLL_RESPONSE_BODY, binaryData.toString());<NEW_LINE>Duration retryAfter = ImplUtils.getRetryAfterFromHeaders(response.getHeaders(), OffsetDateTime::now);<NEW_LINE>return PollingUtils.deserializeResponse(binaryData, serializer, pollResponseType).map(value -> new PollResponse<>(status, value, retryAfter));<NEW_LINE>});<NEW_LINE>});<NEW_LINE>}
LOCATION, locationHeader.getValue());
930,395
protected List<Person> doInBackground(Account... accounts) {<NEW_LINE>if (mActivityRef.get() == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Context context = mActivityRef.get().getApplicationContext();<NEW_LINE>try {<NEW_LINE>GoogleAccountCredential credential = GoogleAccountCredential.usingOAuth2(context, Collections.singleton(CONTACTS_SCOPE));<NEW_LINE>credential.setSelectedAccount(accounts[0]);<NEW_LINE>PeopleService service = new PeopleService.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential).setApplicationName("Google Sign In Quickstart").build();<NEW_LINE>ListConnectionsResponse connectionsResponse = service.people().connections().list("people/me").setFields("names,emailAddresses").execute();<NEW_LINE>return connectionsResponse.getConnections();<NEW_LINE>} catch (UserRecoverableAuthIOException recoverableException) {<NEW_LINE>if (mActivityRef.get() != null) {<NEW_LINE>mActivityRef.<MASK><NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>Log.w(TAG, "getContacts:exception", e);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
get().onRecoverableAuthException(recoverableException);
1,716,109
private void enterPlanRouteMode() {<NEW_LINE>final MapActivity mapActivity = getMapActivity();<NEW_LINE>MapMarkersLayer markersLayer = getMapMarkersLayer();<NEW_LINE>if (mapActivity != null && markersLayer != null) {<NEW_LINE>markersLayer.setInPlanRouteMode(true);<NEW_LINE>mapActivity.disableDrawer();<NEW_LINE>AndroidUiHelper.setVisibility(mapActivity, portrait ? View.INVISIBLE : View.GONE, R.id.map_left_widgets_panel, R.id.map_right_widgets_panel, R.id.map_center_info);<NEW_LINE>AndroidUiHelper.setVisibility(mapActivity, View.GONE, R.id.map_route_info_button, R.id.map_menu_button, R.id.map_compass_button, R.id.map_layers_button, R.id.map_search_button, R.id.map_quick_actions_button);<NEW_LINE>View collapseButton = mapActivity.findViewById(R.id.map_collapse_button);<NEW_LINE>if (collapseButton != null && collapseButton.getVisibility() == View.VISIBLE) {<NEW_LINE>wasCollapseButtonVisible = true;<NEW_LINE>collapseButton.setVisibility(View.INVISIBLE);<NEW_LINE>} else {<NEW_LINE>wasCollapseButtonVisible = false;<NEW_LINE>}<NEW_LINE>if (planRouteContext.getSnappedMode() == null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>setupAppModesBtn();<NEW_LINE>OsmandMapTileView tileView = mapActivity.getMapView();<NEW_LINE>previousMapPosition = tileView.getMapPosition();<NEW_LINE>tileView.setMapPosition(portrait ? MIDDLE_TOP_CONSTANT : LANDSCAPE_MIDDLE_RIGHT_CONSTANT);<NEW_LINE>selectedCount = mapActivity.getMyApplication().getMapMarkersHelper().getSelectedMarkersCount();<NEW_LINE>planRouteContext.recreateSnapTrkSegment(planRouteContext.isAdjustMapOnStart());<NEW_LINE>planRouteContext.setAdjustMapOnStart(true);<NEW_LINE>mapActivity.refreshMap();<NEW_LINE>updateSelectButton();<NEW_LINE>}<NEW_LINE>}
planRouteContext.setSnappedMode(ApplicationMode.DEFAULT);
989,326
public Tree tree() throws ScanException, ParseException {<NEW_LINE>consumeToken();<NEW_LINE>AstNode t = text();<NEW_LINE>if (token.getSymbol() == EOF) {<NEW_LINE>if (t == null) {<NEW_LINE>t = new AstText("");<NEW_LINE>}<NEW_LINE>return new Tree(t, functions, identifiers, false);<NEW_LINE>}<NEW_LINE>AstEval e = eval();<NEW_LINE>if (token.getSymbol() == EOF && t == null) {<NEW_LINE>return new Tree(e, functions, identifiers, e.isDeferred());<NEW_LINE>}<NEW_LINE>ArrayList<AstNode> list = new ArrayList<>();<NEW_LINE>if (t != null) {<NEW_LINE>list.add(t);<NEW_LINE>}<NEW_LINE>list.add(e);<NEW_LINE>t = text();<NEW_LINE>if (t != null) {<NEW_LINE>list.add(t);<NEW_LINE>}<NEW_LINE>while (token.getSymbol() != EOF) {<NEW_LINE>if (e.isDeferred()) {<NEW_LINE>list.add(eval(true, true));<NEW_LINE>} else {<NEW_LINE>list.add(eval(true, false));<NEW_LINE>}<NEW_LINE>t = text();<NEW_LINE>if (t != null) {<NEW_LINE>list.add(t);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new Tree(createAstComposite(list), functions, <MASK><NEW_LINE>}
identifiers, e.isDeferred());
901,294
public void taskFinished(Task task) {<NEW_LINE>FileObject modeDir = userDir.get().getFileObject("config/Windows2Local/Modes");<NEW_LINE>OutputStream os;<NEW_LINE>if (modeDir != null) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>try {<NEW_LINE>FileSystem layer = findLayer(project);<NEW_LINE>if (layer == null) {<NEW_LINE>// NOI18N<NEW_LINE>throw new IOException("Cannot find layer in " + project);<NEW_LINE>}<NEW_LINE>for (FileObject m : modeDir.getChildren()) {<NEW_LINE>if (m.isData() && "wsmode".equals(m.getExt())) {<NEW_LINE>// NOI18N<NEW_LINE>final String name = "Windows2/Modes/" + m.getNameExt();<NEW_LINE>// NOI18N<NEW_LINE>FileObject mode = FileUtil.createData(<MASK><NEW_LINE>os = mode.getOutputStream();<NEW_LINE>os.write(DesignSupport.readMode(m).getBytes(StandardCharsets.UTF_8));<NEW_LINE>os.close();<NEW_LINE>sb.append(name).append("\n");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>NotifyDescriptor nd = new NotifyDescriptor.Message(NbBundle.getMessage(DesignSupport.class, "MSG_ModesGenerated", new Object[] { sb }), NotifyDescriptor.INFORMATION_MESSAGE);<NEW_LINE>DialogDisplayer.getDefault().notifyLater(nd);<NEW_LINE>} catch (IOException ex) {<NEW_LINE>Exceptions.printStackTrace(ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>EventQueue.invokeLater(this);<NEW_LINE>}
layer.getRoot(), name);
1,723,470
public boolean performCommand(ConsoleInput ci, DownloadManager dm, List<String> args) {<NEW_LINE>if (args.size() < 2) {<NEW_LINE>ci.out.println("> Command 'hack': Not enough parameters for subcommand '" + getCommandName() + "'");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>String op = args.get(0);<NEW_LINE>String tag_name = args.get(1);<NEW_LINE>TagManager tm = TagManagerFactory.getTagManager();<NEW_LINE>TagType tt = tm.getTagType(TagType.TT_DOWNLOAD_MANUAL);<NEW_LINE>Tag tag = tt.getTag(tag_name, true);<NEW_LINE>if (op.equals("add")) {<NEW_LINE>if (tag == null) {<NEW_LINE>tag = tt.createTag(tag_name, true);<NEW_LINE>ci.out.<MASK><NEW_LINE>}<NEW_LINE>tag.addTaggable(dm);<NEW_LINE>} else if (op.equals("remove")) {<NEW_LINE>if (tag == null) {<NEW_LINE>ci.out.println("Tag '" + tag_name + "' not found");<NEW_LINE>} else {<NEW_LINE>tag.removeTaggable(dm);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>ci.out.println("> Command 'hack': Invalid parameters for '" + getCommandName() + "'");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>} catch (Throwable e) {<NEW_LINE>ci.out.println("Command failed: " + Debug.getNestedExceptionMessage(e));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
println("Tag '" + tag_name + "' created");
1,152,570
public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {<NEW_LINE>final InstrumentClass target = instrumentor.getInstrumentClass(loader, className, classfileBuffer);<NEW_LINE>target.addField(AsyncContextAccessor.class);<NEW_LINE>// Set sample rate(s0)<NEW_LINE>final InstrumentMethod constructor = target.getConstructor("org.springframework.http.HttpMethod", "java.net.URI", "org.springframework.http.HttpHeaders", "org.springframework.util.MultiValueMap", "org.springframework.web.reactive.function.BodyInserter", "java.util.Map");<NEW_LINE>if (constructor != null) {<NEW_LINE>constructor.addInterceptor(BodyInserterRequestBuilderConstructorInterceptor.class);<NEW_LINE>}<NEW_LINE>// RPC<NEW_LINE>final InstrumentMethod method = target.<MASK><NEW_LINE>if (method != null) {<NEW_LINE>method.addInterceptor(BodyInserterRequestBuilderWriteToInterceptor.class);<NEW_LINE>}<NEW_LINE>return target.toBytecode();<NEW_LINE>}
getDeclaredMethod("writeTo", "org.springframework.http.client.reactive.ClientHttpRequest", "org.springframework.web.reactive.function.client.ExchangeStrategies");
670,768
final ListAnalyzersResult executeListAnalyzers(ListAnalyzersRequest listAnalyzersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listAnalyzersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListAnalyzersRequest> request = null;<NEW_LINE>Response<ListAnalyzersResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListAnalyzersRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listAnalyzersRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAnalyzers");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListAnalyzersResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListAnalyzersResultJsonUnmarshaller());<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.SERVICE_ID, "AccessAnalyzer");
446,407
public void load() {<NEW_LINE>if (panel != null) {<NEW_LINE>this.remove(panel);<NEW_LINE>}<NEW_LINE>joystickService.setActivateActionDispatcher(false);<NEW_LINE>panel = new JPanel(new MigLayout("inset 5"));<NEW_LINE>activeCheckbox = new JCheckBox(Localization.getString("platform.plugin.joystick.activate"), Settings.isActive());<NEW_LINE>panel.add(activeCheckbox, "wrap, spanx");<NEW_LINE>panel.add(new JSeparator(SwingConstants.HORIZONTAL), "wrap, spanx");<NEW_LINE>panel.add(new JLabel(Localization.<MASK><NEW_LINE>for (JoystickControl joystickControl : JoystickControl.getDigitalControls()) {<NEW_LINE>String name = Localization.getString(joystickControl.getLocalization());<NEW_LINE>StatusLabel label = new StatusLabel(name);<NEW_LINE>statusLabelMap.put(joystickControl, label);<NEW_LINE>panel.add(label, "wmin 100, hmin 24");<NEW_LINE>panel.add(new BindActionButton(joystickService, joystickControl), "wmin 150, hmin 24, wrap");<NEW_LINE>}<NEW_LINE>panel.add(new JSeparator(SwingConstants.HORIZONTAL), "wrap, spanx");<NEW_LINE>panel.add(new JLabel(Localization.getString("platform.plugin.joystick.analogControls")), "wrap, spanx, hmin 24");<NEW_LINE>panel.add(new JLabel(Localization.getString("platform.plugin.joystick.axisThreshold")), "wmin 100, hmin 24");<NEW_LINE>thresholdSpinner = new JSpinner(new SpinnerNumberModel(Settings.getAxisThreshold() * 100, 0, 100, 1));<NEW_LINE>thresholdSpinner.addChangeListener(this::onThresholdChange);<NEW_LINE>panel.add(thresholdSpinner, "wmin 150, hmin 24, wrap");<NEW_LINE>for (JoystickControl joystickControl : JoystickControl.getAnalogControls()) {<NEW_LINE>String name = Localization.getString(joystickControl.getLocalization());<NEW_LINE>StatusLabel label = new StatusLabel(name);<NEW_LINE>statusLabelMap.put(joystickControl, label);<NEW_LINE>panel.add(label, "wmin 100, hmin 24");<NEW_LINE>JCheckBox reverseAxis = null;<NEW_LINE>String wrap = ", wrap";<NEW_LINE>if (REVERSIBLE_CONTROLS.contains(joystickControl)) {<NEW_LINE>reverseAxis = new ReverseAxisCheckBox(joystickService, joystickControl);<NEW_LINE>wrap = "";<NEW_LINE>}<NEW_LINE>panel.add(new BindActionButton(joystickService, joystickControl), "wmin 150, hmin 24" + wrap);<NEW_LINE>if (reverseAxis != null) {<NEW_LINE>panel.add(reverseAxis, "wrap");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>add(panel, BorderLayout.CENTER);<NEW_LINE>SwingUtilities.invokeLater(changer::changed);<NEW_LINE>}
getString("platform.plugin.joystick.buttonControls")), "wrap, spanx, hmin 24");
748,377
static void test_i386_inout() {<NEW_LINE>// ECX register<NEW_LINE>Long r_eax = 0x1234L;<NEW_LINE>// EDX register<NEW_LINE>Long r_ecx = 0x6789L;<NEW_LINE>System.out.print("===================================\n");<NEW_LINE>System.out.print("Emulate i386 code with IN/OUT instructions\n");<NEW_LINE>// Initialize emulator in X86-32bit mode<NEW_LINE>Unicorn u = new Unicorn(Unicorn.UC_ARCH_X86, Unicorn.UC_MODE_32);<NEW_LINE>// map 2MB memory for this emulation<NEW_LINE>u.mem_map(ADDRESS, 2 * 1024 * 1024, Unicorn.UC_PROT_ALL);<NEW_LINE>// write machine code to be emulated to memory<NEW_LINE>u.mem_write(ADDRESS, X86_CODE32_INOUT);<NEW_LINE>// initialize machine registers<NEW_LINE>u.reg_write(Unicorn.UC_X86_REG_EAX, r_eax);<NEW_LINE>u.reg_write(Unicorn.UC_X86_REG_ECX, r_ecx);<NEW_LINE>// tracing all basic blocks with customized callback<NEW_LINE>u.hook_add(new MyBlockHook(<MASK><NEW_LINE>// tracing all instructions<NEW_LINE>u.hook_add(new MyCodeHook(), 1, 0, null);<NEW_LINE>// handle IN instruction<NEW_LINE>u.hook_add(new MyInHook(), null);<NEW_LINE>// handle OUT instruction<NEW_LINE>u.hook_add(new MyOutHook(), null);<NEW_LINE>// emulate machine code in infinite time<NEW_LINE>u.emu_start(ADDRESS, ADDRESS + X86_CODE32_INOUT.length, 0, 0);<NEW_LINE>// now print out some registers<NEW_LINE>System.out.print(">>> Emulation done. Below is the CPU context\n");<NEW_LINE>r_eax = (Long) u.reg_read(Unicorn.UC_X86_REG_EAX);<NEW_LINE>r_ecx = (Long) u.reg_read(Unicorn.UC_X86_REG_ECX);<NEW_LINE>System.out.printf(">>> EAX = 0x%x\n", r_eax.intValue());<NEW_LINE>System.out.printf(">>> ECX = 0x%x\n", r_ecx.intValue());<NEW_LINE>u.close();<NEW_LINE>}
), 1, 0, null);
1,464,444
public int doStartTag() throws JspException {<NEW_LINE>Properties ctx = JSPEnv.getCtx((HttpServletRequest) pageContext.getRequest());<NEW_LINE>//<NEW_LINE>WebUser wu = getWebUser(ctx);<NEW_LINE>if (wu == null)<NEW_LINE>pageContext.getSession().removeAttribute(WebUser.NAME);<NEW_LINE>else<NEW_LINE>pageContext.getSession().setAttribute(WebUser.NAME, wu);<NEW_LINE>//<NEW_LINE>String serverContext = ctx.getProperty(WebSessionCtx.CTX_SERVER_CONTEXT);<NEW_LINE>// log.fine("doStartTag - ServerContext=" + serverContext);<NEW_LINE>HtmlCode html = null;<NEW_LINE>if (wu != null && wu.isValid())<NEW_LINE><MASK><NEW_LINE>else<NEW_LINE>html = getLoginLink(serverContext);<NEW_LINE>//<NEW_LINE>JspWriter out = pageContext.getOut();<NEW_LINE>html.output(out);<NEW_LINE>//<NEW_LINE>//<NEW_LINE>return (SKIP_BODY);<NEW_LINE>}
html = getWelcomeLink(serverContext, wu);
1,549,733
public void onEnable() {<NEW_LINE>if (this.incompatibleVersion) {<NEW_LINE>Logger logger = this.loader.getLogger();<NEW_LINE>logger.severe("----------------------------------------------------------------------");<NEW_LINE>logger.severe("Your server version is not compatible with this build of LuckPerms. :(");<NEW_LINE>logger.severe("");<NEW_LINE>logger.severe("If your server is running 1.8, please update to 1.8.8 or higher.");<NEW_LINE>logger.severe("If your server is running 1.7.10, please download the Bukkit-Legacy version of LuckPerms from here:");<NEW_LINE>logger.severe("==> https://luckperms.net/download");<NEW_LINE>logger.severe("----------------------------------------------------------------------");<NEW_LINE>getServer().getPluginManager(<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>this.serverStarting = true;<NEW_LINE>this.serverStopping = false;<NEW_LINE>this.startTime = Instant.now();<NEW_LINE>try {<NEW_LINE>this.plugin.enable();<NEW_LINE>// schedule a task to update the 'serverStarting' flag<NEW_LINE>getServer().getScheduler().runTask(this.loader, () -> this.serverStarting = false);<NEW_LINE>} finally {<NEW_LINE>this.enableLatch.countDown();<NEW_LINE>}<NEW_LINE>}
).disablePlugin(this.loader);
1,019,306
protected void exportToBEncodedMap(Map map, boolean for_export) throws IOException {<NEW_LINE>String cla = this.getClass().getName();<NEW_LINE>if (cla.startsWith(MY_PACKAGE)) {<NEW_LINE>cla = cla.substring(MY_PACKAGE.length());<NEW_LINE>}<NEW_LINE>MapUtils.setMapString(map, "_impl", cla);<NEW_LINE>MapUtils.exportLong(map, "_type", type);<NEW_LINE>MapUtils.setMapString(map, "_uid", uid);<NEW_LINE>MapUtils.setMapString(map, "_name", classification);<NEW_LINE>MapUtils.exportBooleanAsLong(map, "_autoname", isNameAutomatic);<NEW_LINE>MapUtils.exportLong(map, "_rn", 1);<NEW_LINE>MapUtils.setMapString(map, "_lname", name);<NEW_LINE>MapUtils.setMapString(map, "_image_id", image_id);<NEW_LINE>if (secondary_uid != null) {<NEW_LINE>MapUtils.setMapString(map, "_suid", secondary_uid);<NEW_LINE>}<NEW_LINE>if (!for_export) {<NEW_LINE>MapUtils.exportLong(map, "_ls", last_seen);<NEW_LINE>MapUtils.exportBooleanAsLong(map, "_hide", hidden);<NEW_LINE>MapUtils.exportBooleanAsLong(map, "_ahide", auto_hidden);<NEW_LINE>}<NEW_LINE>MapUtils.exportBooleanAsLong(map, "_rm", can_remove);<NEW_LINE>MapUtils.exportBooleanAsLong(map, "_genericUSB", isGenericUSB);<NEW_LINE>MapUtils.exportBooleanAsLong(map, "_man", manual);<NEW_LINE>if (tagged) {<NEW_LINE>MapUtils.exportBooleanAsLong(map, "_tag", tagged);<NEW_LINE>}<NEW_LINE>Map<String, Object> pp_copy;<NEW_LINE>synchronized (persistent_properties) {<NEW_LINE>pp_copy <MASK><NEW_LINE>}<NEW_LINE>if (for_export) {<NEW_LINE>pp_copy.remove(PP_IP_ADDRESS);<NEW_LINE>pp_copy.remove(PP_COPY_OUTSTANDING);<NEW_LINE>pp_copy.remove(PP_COPY_TO_FOLDER);<NEW_LINE>pp_copy.remove(PP_REND_WORK_DIR);<NEW_LINE>map.put("_pprops", pp_copy);<NEW_LINE>} else {<NEW_LINE>map.put("_pprops", pp_copy);<NEW_LINE>}<NEW_LINE>}
= new HashMap<>(persistent_properties);
27,629
public Single<Long> call() {<NEW_LINE><MASK><NEW_LINE>if (query.count() && (query.hasAggregations() || !query.groupBy().isEmpty())) {<NEW_LINE>throw new UnsupportedOperationException("count(*) doesn't work with existing aggregates");<NEW_LINE>}<NEW_LINE>if (query.offset().isPresent()) {<NEW_LINE>throw new UnsupportedOperationException(String.format("count(*) with offset not supported in %s", ElasticsearchBackend.class.getSimpleName()));<NEW_LINE>}<NEW_LINE>OptionalLong limit = query.limit();<NEW_LINE>if (limit.isPresent() && limit.getAsLong() <= 0) {<NEW_LINE>// short-circuit when no results are expected<NEW_LINE>return Single.just(0L);<NEW_LINE>}<NEW_LINE>ObjectNode filter = query.filter().map(f -> Elasticsearch.toBuilder(f, session.pathNaming, session.idPredicate).toJson(session.objectMapper)).orElse(session.objectMapper.createObjectNode());<NEW_LINE>if (filter.size() != 0) {<NEW_LINE>filter = (ObjectNode) session.objectMapper.createObjectNode().set("query", filter);<NEW_LINE>}<NEW_LINE>return session.ops.count(filter).map(Json.Count::count).map(count -> limit.isPresent() ? Math.min(limit.getAsLong(), count) : count);<NEW_LINE>}
Query query = operation.query();
1,397,588
/*<NEW_LINE>*<NEW_LINE><w:p><NEW_LINE><w:pPr><NEW_LINE><w:pStyle w:val="Heading1"/><NEW_LINE></w:pPr><NEW_LINE><w:subDoc r:id="rId4"/><NEW_LINE><w:r><NEW_LINE><w:t>Another heading</w:t><NEW_LINE></w:r><NEW_LINE></w:p><NEW_LINE><NEW_LINE>* word/_rels/document.xml.rels contains:<NEW_LINE>*<NEW_LINE>* <Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/subDocument"<NEW_LINE>* Target="http://dev.plutext.org/" TargetMode="External"/><NEW_LINE><NEW_LINE>*/<NEW_LINE>public static void main(String[] args) throws Exception {<NEW_LINE>// Create the master doc, and specify<NEW_LINE>// the subdoc<NEW_LINE>String subdocx = ".\\sample-docs\\word\\sample-docx.xml";<NEW_LINE>WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();<NEW_LINE>MainDocumentPart mdp = wordMLPackage.getMainDocumentPart();<NEW_LINE>// Link to subdoc<NEW_LINE>JAXBElement<CTRel> subdoc = createSubdoc(mdp, subdocx);<NEW_LINE>// Add it to a paragraph<NEW_LINE>org.docx4j.wml.ObjectFactory wmlFactory = Context.getWmlObjectFactory();<NEW_LINE>org.docx4j.wml.P paragraph = wmlFactory.createP();<NEW_LINE>paragraph.getContent().add(subdoc);<NEW_LINE>mdp.addObject(paragraph);<NEW_LINE>// Now save it<NEW_LINE>wordMLPackage.save(new java.io.File(System.<MASK><NEW_LINE>}
getProperty("user.dir") + "/OUT_SubDocumentMASTER.docx"));
1,646,814
public static ListTimeLinesResponse unmarshall(ListTimeLinesResponse listTimeLinesResponse, UnmarshallerContext context) {<NEW_LINE>listTimeLinesResponse.setRequestId(context.stringValue("ListTimeLinesResponse.RequestId"));<NEW_LINE>listTimeLinesResponse.setCode(context.stringValue("ListTimeLinesResponse.Code"));<NEW_LINE>listTimeLinesResponse.setMessage(context.stringValue("ListTimeLinesResponse.Message"));<NEW_LINE>listTimeLinesResponse.setNextCursor(context.integerValue("ListTimeLinesResponse.NextCursor"));<NEW_LINE>listTimeLinesResponse.setAction(context.stringValue("ListTimeLinesResponse.Action"));<NEW_LINE>List<TimeLine> timeLines = new ArrayList<TimeLine>();<NEW_LINE>for (int i = 0; i < context.lengthValue("ListTimeLinesResponse.TimeLines.Length"); i++) {<NEW_LINE>TimeLine timeLine = new TimeLine();<NEW_LINE>timeLine.setStartTime(context.longValue("ListTimeLinesResponse.TimeLines[" + i + "].StartTime"));<NEW_LINE>timeLine.setEndTime(context.longValue("ListTimeLinesResponse.TimeLines[" + i + "].EndTime"));<NEW_LINE>timeLine.setTotalCount(context.integerValue("ListTimeLinesResponse.TimeLines[" + i + "].TotalCount"));<NEW_LINE>timeLine.setPhotosCount(context.integerValue<MASK><NEW_LINE>List<Photo> photos = new ArrayList<Photo>();<NEW_LINE>for (int j = 0; j < context.lengthValue("ListTimeLinesResponse.TimeLines[" + i + "].Photos.Length"); j++) {<NEW_LINE>Photo photo = new Photo();<NEW_LINE>photo.setId(context.longValue("ListTimeLinesResponse.TimeLines[" + i + "].Photos[" + j + "].Id"));<NEW_LINE>photo.setIdStr(context.stringValue("ListTimeLinesResponse.TimeLines[" + i + "].Photos[" + j + "].IdStr"));<NEW_LINE>photo.setTitle(context.stringValue("ListTimeLinesResponse.TimeLines[" + i + "].Photos[" + j + "].Title"));<NEW_LINE>photo.setLocation(context.stringValue("ListTimeLinesResponse.TimeLines[" + i + "].Photos[" + j + "].Location"));<NEW_LINE>photo.setFileId(context.stringValue("ListTimeLinesResponse.TimeLines[" + i + "].Photos[" + j + "].FileId"));<NEW_LINE>photo.setState(context.stringValue("ListTimeLinesResponse.TimeLines[" + i + "].Photos[" + j + "].State"));<NEW_LINE>photo.setMd5(context.stringValue("ListTimeLinesResponse.TimeLines[" + i + "].Photos[" + j + "].Md5"));<NEW_LINE>photo.setIsVideo(context.booleanValue("ListTimeLinesResponse.TimeLines[" + i + "].Photos[" + j + "].IsVideo"));<NEW_LINE>photo.setRemark(context.stringValue("ListTimeLinesResponse.TimeLines[" + i + "].Photos[" + j + "].Remark"));<NEW_LINE>photo.setSize(context.longValue("ListTimeLinesResponse.TimeLines[" + i + "].Photos[" + j + "].Size"));<NEW_LINE>photo.setWidth(context.longValue("ListTimeLinesResponse.TimeLines[" + i + "].Photos[" + j + "].Width"));<NEW_LINE>photo.setHeight(context.longValue("ListTimeLinesResponse.TimeLines[" + i + "].Photos[" + j + "].Height"));<NEW_LINE>photo.setCtime(context.longValue("ListTimeLinesResponse.TimeLines[" + i + "].Photos[" + j + "].Ctime"));<NEW_LINE>photo.setMtime(context.longValue("ListTimeLinesResponse.TimeLines[" + i + "].Photos[" + j + "].Mtime"));<NEW_LINE>photo.setTakenAt(context.longValue("ListTimeLinesResponse.TimeLines[" + i + "].Photos[" + j + "].TakenAt"));<NEW_LINE>photo.setShareExpireTime(context.longValue("ListTimeLinesResponse.TimeLines[" + i + "].Photos[" + j + "].ShareExpireTime"));<NEW_LINE>photo.setLike(context.longValue("ListTimeLinesResponse.TimeLines[" + i + "].Photos[" + j + "].Like"));<NEW_LINE>photos.add(photo);<NEW_LINE>}<NEW_LINE>timeLine.setPhotos(photos);<NEW_LINE>timeLines.add(timeLine);<NEW_LINE>}<NEW_LINE>listTimeLinesResponse.setTimeLines(timeLines);<NEW_LINE>return listTimeLinesResponse;<NEW_LINE>}
("ListTimeLinesResponse.TimeLines[" + i + "].PhotosCount"));
1,169,300
public TransferResult<CFValue, CFStore> visitNumericalAddition(NumericalAdditionNode n, TransferInput<CFValue, CFStore> in) {<NEW_LINE>// type of leftNode + rightNode is glb(t, s) where<NEW_LINE>// t = minusOffset(type(leftNode), rightNode) and<NEW_LINE>// s = minusOffset(type(rightNode), leftNode)<NEW_LINE>UBQualifier left = getUBQualifierForAddition(n.getLeftOperand(), in);<NEW_LINE>UBQualifier t = left.minusOffset(<MASK><NEW_LINE>UBQualifier right = getUBQualifierForAddition(n.getRightOperand(), in);<NEW_LINE>UBQualifier s = right.minusOffset(n.getLeftOperand(), atypeFactory);<NEW_LINE>UBQualifier glb = t.glb(s);<NEW_LINE>if (left.isLessThanLengthQualifier() && right.isLessThanLengthQualifier()) {<NEW_LINE>// If expression i has type @LTLengthOf(value = "f2", offset = "f1.length") int and expression<NEW_LINE>// j is less than or equal to the length of f1, then the type of i + j is @LTLengthOf("f2").<NEW_LINE>UBQualifier r = removeSequenceLengths((LessThanLengthOf) left, (LessThanLengthOf) right);<NEW_LINE>glb = glb.glb(r);<NEW_LINE>UBQualifier l = removeSequenceLengths((LessThanLengthOf) right, (LessThanLengthOf) left);<NEW_LINE>glb = glb.glb(l);<NEW_LINE>}<NEW_LINE>return createTransferResult(n, in, glb);<NEW_LINE>}
n.getRightOperand(), atypeFactory);
923,500
private void loadNode540() {<NEW_LINE>SessionSecurityDiagnosticsTypeNode node = new SessionSecurityDiagnosticsTypeNode(this.context, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, new QualifiedName(0, "SessionSecurityDiagnostics"), new LocalizedText("en", "SessionSecurityDiagnostics"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.SessionSecurityDiagnosticsDataType, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_SessionId.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_ClientUserIdOfSession.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_ClientUserIdHistory.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_AuthenticationMechanism.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_Encoding.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_TransportProtocol<MASK><NEW_LINE>node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_SecurityMode.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_SecurityPolicyUri.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_ClientCertificate.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasTypeDefinition, Identifiers.SessionSecurityDiagnosticsType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType.expanded(), false));<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
.expanded(), true));
377,742
final BatchDeleteClusterSnapshotsResult executeBatchDeleteClusterSnapshots(BatchDeleteClusterSnapshotsRequest batchDeleteClusterSnapshotsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchDeleteClusterSnapshotsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<BatchDeleteClusterSnapshotsRequest> request = null;<NEW_LINE>Response<BatchDeleteClusterSnapshotsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new BatchDeleteClusterSnapshotsRequestMarshaller().marshall(super.beforeMarshalling(batchDeleteClusterSnapshotsRequest));<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, "Redshift");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchDeleteClusterSnapshots");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<BatchDeleteClusterSnapshotsResult> responseHandler = new StaxResponseHandler<BatchDeleteClusterSnapshotsResult>(new BatchDeleteClusterSnapshotsResultStaxUnmarshaller());<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,182,729
private void init() {<NEW_LINE>mInAnimationSet = new AnimationSet(false);<NEW_LINE>TranslateAnimation mSlideInAnimation = new TranslateAnimation(TranslateAnimation.RELATIVE_TO_PARENT, 0.0f, TranslateAnimation.RELATIVE_TO_PARENT, 0.0f, TranslateAnimation.RELATIVE_TO_SELF, 1.0f, TranslateAnimation.RELATIVE_TO_SELF, 0.0f);<NEW_LINE>AlphaAnimation mFadeInAnimation = new AlphaAnimation(0.0f, 1.0f);<NEW_LINE>mInAnimationSet.addAnimation(mSlideInAnimation);<NEW_LINE>mInAnimationSet.addAnimation(mFadeInAnimation);<NEW_LINE>mOutAnimationSet = new AnimationSet(false);<NEW_LINE>TranslateAnimation mSlideOutAnimation = new TranslateAnimation(TranslateAnimation.RELATIVE_TO_PARENT, 0.0f, TranslateAnimation.RELATIVE_TO_PARENT, 0.0f, TranslateAnimation.RELATIVE_TO_SELF, 0.0f, TranslateAnimation.RELATIVE_TO_SELF, 1.0f);<NEW_LINE>AlphaAnimation mFadeOutAnimation <MASK><NEW_LINE>mOutAnimationSet.addAnimation(mSlideOutAnimation);<NEW_LINE>mOutAnimationSet.addAnimation(mFadeOutAnimation);<NEW_LINE>mOutAnimationSet.setDuration(ANIMATION_DURATION);<NEW_LINE>mOutAnimationSet.setAnimationListener(new Animation.AnimationListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onAnimationStart(Animation animation) {<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onAnimationEnd(Animation animation) {<NEW_LINE>removeAllViews();<NEW_LINE>if (!mSnacks.isEmpty()) {<NEW_LINE>sendOnHide(mSnacks.poll());<NEW_LINE>}<NEW_LINE>if (!isEmpty()) {<NEW_LINE>showSnack(mSnacks.peek());<NEW_LINE>} else {<NEW_LINE>setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onAnimationRepeat(Animation animation) {<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
= new AlphaAnimation(1.0f, 0.0f);
292,136
public DataObject execute() throws UserException, BimserverLockConflictException, BimserverDatabaseException {<NEW_LINE>Revision virtualRevision = getRevisionByRoid(roid);<NEW_LINE>ObjectIdentifier objectIdentifier = null;<NEW_LINE>for (ConcreteRevision concreteRevision : virtualRevision.getConcreteRevisions()) {<NEW_LINE>objectIdentifier = getDatabaseSession().getOidOfGuid(concreteRevision.getProject().getSchema(), guid, concreteRevision.getProject().getId(<MASK><NEW_LINE>if (objectIdentifier != null) {<NEW_LINE>long oidOfGuid = objectIdentifier.getOid();<NEW_LINE>if (oidOfGuid != -1) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (objectIdentifier == null) {<NEW_LINE>throw new UserException("Guid " + guid + " not found in this revision/project");<NEW_LINE>}<NEW_LINE>return new GetDataObjectByOidDatabaseAction(bimServer, getDatabaseSession(), getAccessMethod(), roid, objectIdentifier.getOid(), authorization).execute();<NEW_LINE>}
), concreteRevision.getId());
612,125
public static Drawable drawCircleAndImage(int color, @DimenRes int sizeResId, @DrawableRes int imageResId, @DimenRes int sizeImgResId, @NonNull Resources res) {<NEW_LINE>final int size = res.getDimensionPixelSize(sizeResId);<NEW_LINE>final Bitmap bmp = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);<NEW_LINE>final Paint paint = new Paint();<NEW_LINE>paint.setColor(color);<NEW_LINE>paint.setAntiAlias(true);<NEW_LINE>final Canvas c = new Canvas(bmp);<NEW_LINE>final float radius = size / 2.0f;<NEW_LINE>c.drawCircle(radius, radius, radius, paint);<NEW_LINE>Drawable imgD = res.getDrawable(imageResId);<NEW_LINE>imgD.mutate();<NEW_LINE>final int sizeImg = res.getDimensionPixelSize(sizeImgResId);<NEW_LINE>int offset = (size - sizeImg) / 2;<NEW_LINE>imgD.setBounds(offset, offset, <MASK><NEW_LINE>imgD.draw(c);<NEW_LINE>return new BitmapDrawable(res, bmp);<NEW_LINE>}
size - offset, size - offset);
973,820
private static String nextDateValue(TimexProperty timex, LocalDateTime date) {<NEW_LINE>if (timex.getDayOfMonth() != null) {<NEW_LINE>Integer year = date.getYear();<NEW_LINE>Integer month = date.getMonth().getValue();<NEW_LINE>if (timex.getMonth() != null) {<NEW_LINE>month = timex.getMonth();<NEW_LINE>if (date.getMonthValue() > month || (date.getMonthValue() == month && date.getDayOfMonth() > timex.getDayOfMonth())) {<NEW_LINE>year++;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (date.getDayOfMonth() > timex.getDayOfMonth()) {<NEW_LINE>month++;<NEW_LINE>if (month > 12) {<NEW_LINE>month = month % 12;<NEW_LINE>year--;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Integer finalYear = year;<NEW_LINE>Integer finalMonth = month;<NEW_LINE>return TimexValue.dateValue(new TimexProperty() {<NEW_LINE><NEW_LINE>{<NEW_LINE>setYear(finalYear);<NEW_LINE>setMonth(finalMonth);<NEW_LINE>setDayOfMonth(timex.getDayOfMonth());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>if (timex.getDayOfWeek() != null) {<NEW_LINE>LocalDateTime start = generateWeekDate(timex, date, false);<NEW_LINE>return TimexValue.dateValue(new TimexProperty() {<NEW_LINE><NEW_LINE>{<NEW_LINE>setYear(start.getYear());<NEW_LINE><MASK><NEW_LINE>setDayOfMonth(start.getDayOfMonth());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>return new String();<NEW_LINE>}
setMonth(start.getMonthValue());
1,208,938
public void deleteUser(String username) throws TimeoutException, ExecutionException, InterruptedException, ApiException {<NEW_LINE>Object postBody = null;<NEW_LINE>// verify the required parameter 'username' is set<NEW_LINE>if (username == null) {<NEW_LINE>VolleyError error = new VolleyError("Missing the required parameter 'username' when calling deleteUser", new ApiException(400, "Missing the required parameter 'username' when calling deleteUser"));<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String path = "/user/{username}".replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString<MASK><NEW_LINE>// query params<NEW_LINE>List<Pair> queryParams = new ArrayList<Pair>();<NEW_LINE>// header params<NEW_LINE>Map<String, String> headerParams = new HashMap<String, String>();<NEW_LINE>// form params<NEW_LINE>Map<String, String> formParams = new HashMap<String, String>();<NEW_LINE>String[] contentTypes = {};<NEW_LINE>String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";<NEW_LINE>if (contentType.startsWith("multipart/form-data")) {<NEW_LINE>// file uploading<NEW_LINE>MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create();<NEW_LINE>HttpEntity httpEntity = localVarBuilder.build();<NEW_LINE>postBody = httpEntity;<NEW_LINE>} else {<NEW_LINE>// normal form params<NEW_LINE>}<NEW_LINE>String[] authNames = new String[] {};<NEW_LINE>try {<NEW_LINE>String localVarResponse = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType, authNames);<NEW_LINE>if (localVarResponse != null) {<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} catch (ApiException ex) {<NEW_LINE>throw ex;<NEW_LINE>} catch (InterruptedException ex) {<NEW_LINE>throw ex;<NEW_LINE>} catch (ExecutionException ex) {<NEW_LINE>if (ex.getCause() instanceof VolleyError) {<NEW_LINE>VolleyError volleyError = (VolleyError) ex.getCause();<NEW_LINE>if (volleyError.networkResponse != null) {<NEW_LINE>throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw ex;<NEW_LINE>} catch (TimeoutException ex) {<NEW_LINE>throw ex;<NEW_LINE>}<NEW_LINE>}
(username.toString()));
1,569,012
public okhttp3.Call readClusterRoleCall(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 = "/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}".replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString<MASK><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, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);<NEW_LINE>}
(name.toString()));
359,433
public static void createEntity(HandlerContext handlerCtx) {<NEW_LINE>Map<String, Object> attrs = (Map) handlerCtx.getInputValue("attrs");<NEW_LINE>if (attrs == null) {<NEW_LINE>attrs = new HashMap<>();<NEW_LINE>}<NEW_LINE>String endpoint = (String) handlerCtx.getInputValue("endpoint");<NEW_LINE>RestResponse response = sendCreateRequest(endpoint, attrs, (List) handlerCtx.getInputValue("skipAttrs"), (List) handlerCtx.getInputValue("onlyUseAttrs"), (List) handlerCtx.getInputValue("convertToFalse"));<NEW_LINE>boolean throwException = (<MASK><NEW_LINE>parseResponse(response, handlerCtx, endpoint, attrs, false, throwException);<NEW_LINE>// ??? I believe this should return a Map, whats the point of returning the endpoint that was passed in.<NEW_LINE>// But i haven't looked through all the code, so decide to leave it for now.<NEW_LINE>handlerCtx.setOutputValue("result", endpoint);<NEW_LINE>}
Boolean) handlerCtx.getInputValue("throwException");
978,532
public void unregisterMetrics(SharedMetricRegistries sharedMetricRegistry) {<NEW_LINE>MetricRegistry vendorRegistry = sharedMetricRegistry.getOrCreate(MetricRegistry.Type.VENDOR.getName());<NEW_LINE>MetricRegistry baseRegistry = sharedMetricRegistry.getOrCreate(MetricRegistry.Type.BASE.getName());<NEW_LINE>for (MetricID metricID : vendorMetricIDs) {<NEW_LINE>boolean rc = vendorRegistry.remove(metricID);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "Unregistered " + metricID.toString() + " " + (rc ? "successfully" : "unsuccessfully"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (MetricID metricID : baseMetricIDs) {<NEW_LINE>boolean rc = baseRegistry.remove(metricID);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "Unregistered " + metricID.toString() + " " + <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>vendorMetricIDs.clear();<NEW_LINE>baseMetricIDs.clear();<NEW_LINE>}
(rc ? "successfully" : "unsuccessfully"));
808,957
public void configure(Customer customer, UniverseConfigureTaskParams taskParams) {<NEW_LINE>if (taskParams.currentClusterType == null) {<NEW_LINE>throw new PlatformServiceException(BAD_REQUEST, "currentClusterType must be set");<NEW_LINE>}<NEW_LINE>if (taskParams.clusterOperation == null) {<NEW_LINE>throw new PlatformServiceException(BAD_REQUEST, "clusterOperation must be set");<NEW_LINE>}<NEW_LINE>// TODO(Rahul): When we support multiple read only clusters, change clusterType to cluster<NEW_LINE>// uuid.<NEW_LINE>Cluster c = taskParams.getCurrentClusterType().equals(UniverseDefinitionTaskParams.ClusterType.PRIMARY) ? taskParams.getPrimaryCluster() : taskParams.getReadOnlyClusters().get(0);<NEW_LINE>UniverseDefinitionTaskParams.UserIntent primaryIntent = c.userIntent;<NEW_LINE>checkGeoPartitioningParameters(customer, taskParams, OpType.CONFIGURE);<NEW_LINE>primaryIntent.masterGFlags = trimFlags(primaryIntent.masterGFlags);<NEW_LINE>primaryIntent.tserverGFlags = trimFlags(primaryIntent.tserverGFlags);<NEW_LINE>if (StringUtils.isEmpty(primaryIntent.accessKeyCode)) {<NEW_LINE>primaryIntent.accessKeyCode = appConfig.getString("yb.security.default.access.key");<NEW_LINE>}<NEW_LINE>if (PlacementInfoUtil.checkIfNodeParamsValid(taskParams, c)) {<NEW_LINE>try {<NEW_LINE>PlacementInfoUtil.updateUniverseDefinition(taskParams, customer.<MASK><NEW_LINE>} catch (IllegalStateException | UnsupportedOperationException e) {<NEW_LINE>throw new PlatformServiceException(BAD_REQUEST, e.getMessage());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new PlatformServiceException(BAD_REQUEST, "Invalid Node/AZ combination for given instance type " + c.userIntent.instanceType);<NEW_LINE>}<NEW_LINE>}
getCustomerId(), c.uuid);
1,775,255
default <T, T2, T3, R> Higher<CRE, R> ap3(Higher<CRE, ? extends Function<T, ? extends Function<T2, ? extends Function<T3, R>>>> fn, Higher<CRE, T> apply, Higher<CRE, T2> apply2, Higher<CRE, T3> apply3) {<NEW_LINE>Higher<CRE, Function<T, Function<T2, Function<T3, R>>>> fnToUse = (Higher<CRE, Function<T, Function<T2, Function<T3, R>>>>) fn;<NEW_LINE>Higher<CRE, Function<T2, Function<T3, R>>> ap1 = ap(fnToUse, apply);<NEW_LINE>Higher<CRE, Function<T3, R>> <MASK><NEW_LINE>return ap(ap2, apply3);<NEW_LINE>}
ap2 = ap(ap1, apply2);
912,176
public PostingsEnum postings(FieldInfo fieldInfo, BlockTermState termState, PostingsEnum reuse, int flags) throws IOException {<NEW_LINE>boolean indexHasPositions = fieldInfo.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0;<NEW_LINE>if (indexHasPositions == false || PostingsEnum.featureRequested(flags, PostingsEnum.POSITIONS) == false) {<NEW_LINE>BlockDocsEnum docsEnum;<NEW_LINE>if (reuse instanceof BlockDocsEnum) {<NEW_LINE>docsEnum = (BlockDocsEnum) reuse;<NEW_LINE>if (!docsEnum.canReuse(docIn, fieldInfo)) {<NEW_LINE>docsEnum = new BlockDocsEnum(fieldInfo);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>docsEnum = new BlockDocsEnum(fieldInfo);<NEW_LINE>}<NEW_LINE>return docsEnum.reset<MASK><NEW_LINE>} else {<NEW_LINE>EverythingEnum everythingEnum;<NEW_LINE>if (reuse instanceof EverythingEnum) {<NEW_LINE>everythingEnum = (EverythingEnum) reuse;<NEW_LINE>if (!everythingEnum.canReuse(docIn, fieldInfo)) {<NEW_LINE>everythingEnum = new EverythingEnum(fieldInfo);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>everythingEnum = new EverythingEnum(fieldInfo);<NEW_LINE>}<NEW_LINE>return everythingEnum.reset((IntBlockTermState) termState, flags);<NEW_LINE>}<NEW_LINE>}
((IntBlockTermState) termState, flags);
151,855
public static DescribeVulListResponse unmarshall(DescribeVulListResponse describeVulListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeVulListResponse.setRequestId(_ctx.stringValue("DescribeVulListResponse.RequestId"));<NEW_LINE>describeVulListResponse.setCurrentPage(_ctx.integerValue("DescribeVulListResponse.CurrentPage"));<NEW_LINE>describeVulListResponse.setPageSize(_ctx.integerValue("DescribeVulListResponse.PageSize"));<NEW_LINE>describeVulListResponse.setTotalCount(_ctx.integerValue("DescribeVulListResponse.TotalCount"));<NEW_LINE>List<VulRecord> vulRecords = new ArrayList<VulRecord>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeVulListResponse.VulRecords.Length"); i++) {<NEW_LINE>VulRecord vulRecord = new VulRecord();<NEW_LINE>vulRecord.setStatus(_ctx.integerValue("DescribeVulListResponse.VulRecords[" + i + "].Status"));<NEW_LINE>vulRecord.setType(_ctx.stringValue("DescribeVulListResponse.VulRecords[" + i + "].Type"));<NEW_LINE>vulRecord.setModifyTs(_ctx.longValue("DescribeVulListResponse.VulRecords[" + i + "].ModifyTs"));<NEW_LINE>vulRecord.setDesktopName(_ctx.stringValue("DescribeVulListResponse.VulRecords[" + i + "].DesktopName"));<NEW_LINE>vulRecord.setResultCode(_ctx.stringValue("DescribeVulListResponse.VulRecords[" + i + "].ResultCode"));<NEW_LINE>vulRecord.setTag(_ctx.stringValue("DescribeVulListResponse.VulRecords[" + i + "].Tag"));<NEW_LINE>vulRecord.setDesktopId(_ctx.stringValue("DescribeVulListResponse.VulRecords[" + i + "].DesktopId"));<NEW_LINE>vulRecord.setRelated(_ctx.stringValue("DescribeVulListResponse.VulRecords[" + i + "].Related"));<NEW_LINE>vulRecord.setLastTs(_ctx.longValue("DescribeVulListResponse.VulRecords[" + i + "].LastTs"));<NEW_LINE>vulRecord.setFirstTs(_ctx.longValue("DescribeVulListResponse.VulRecords[" + i + "].FirstTs"));<NEW_LINE>vulRecord.setNecessity(_ctx.stringValue("DescribeVulListResponse.VulRecords[" + i + "].Necessity"));<NEW_LINE>vulRecord.setRepairTs(_ctx.longValue("DescribeVulListResponse.VulRecords[" + i + "].RepairTs"));<NEW_LINE>vulRecord.setOnline(_ctx.booleanValue("DescribeVulListResponse.VulRecords[" + i + "].Online"));<NEW_LINE>vulRecord.setResultMessage(_ctx.stringValue("DescribeVulListResponse.VulRecords[" + i + "].ResultMessage"));<NEW_LINE>vulRecord.setOsVersion(_ctx.stringValue("DescribeVulListResponse.VulRecords[" + i + "].OsVersion"));<NEW_LINE>vulRecord.setAliasName(_ctx.stringValue<MASK><NEW_LINE>vulRecord.setName(_ctx.stringValue("DescribeVulListResponse.VulRecords[" + i + "].Name"));<NEW_LINE>ExtendContentJson extendContentJson = new ExtendContentJson();<NEW_LINE>List<RpmEntity> rpmEntityList = new ArrayList<RpmEntity>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("DescribeVulListResponse.VulRecords[" + i + "].ExtendContentJson.RpmEntityList.Length"); j++) {<NEW_LINE>RpmEntity rpmEntity = new RpmEntity();<NEW_LINE>rpmEntity.setPath(_ctx.stringValue("DescribeVulListResponse.VulRecords[" + i + "].ExtendContentJson.RpmEntityList[" + j + "].Path"));<NEW_LINE>rpmEntity.setUpdateCmd(_ctx.stringValue("DescribeVulListResponse.VulRecords[" + i + "].ExtendContentJson.RpmEntityList[" + j + "].UpdateCmd"));<NEW_LINE>rpmEntity.setName(_ctx.stringValue("DescribeVulListResponse.VulRecords[" + i + "].ExtendContentJson.RpmEntityList[" + j + "].Name"));<NEW_LINE>rpmEntity.setFullVersion(_ctx.stringValue("DescribeVulListResponse.VulRecords[" + i + "].ExtendContentJson.RpmEntityList[" + j + "].FullVersion"));<NEW_LINE>rpmEntity.setMatchDetail(_ctx.stringValue("DescribeVulListResponse.VulRecords[" + i + "].ExtendContentJson.RpmEntityList[" + j + "].MatchDetail"));<NEW_LINE>rpmEntityList.add(rpmEntity);<NEW_LINE>}<NEW_LINE>extendContentJson.setRpmEntityList(rpmEntityList);<NEW_LINE>vulRecord.setExtendContentJson(extendContentJson);<NEW_LINE>vulRecords.add(vulRecord);<NEW_LINE>}<NEW_LINE>describeVulListResponse.setVulRecords(vulRecords);<NEW_LINE>return describeVulListResponse;<NEW_LINE>}
("DescribeVulListResponse.VulRecords[" + i + "].AliasName"));
887,983
public void decide(Authentication authentication, Object object, Collection<ConfigAttribute> configAttributes) throws AccessDeniedException {<NEW_LINE>int grant = 0;<NEW_LINE>int deny = 0;<NEW_LINE>for (AccessDecisionVoter voter : getDecisionVoters()) {<NEW_LINE>int result = voter.<MASK><NEW_LINE>switch(result) {<NEW_LINE>case AccessDecisionVoter.ACCESS_GRANTED:<NEW_LINE>grant++;<NEW_LINE>break;<NEW_LINE>case AccessDecisionVoter.ACCESS_DENIED:<NEW_LINE>deny++;<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (grant > deny) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (deny > grant) {<NEW_LINE>throw new AccessDeniedException(this.messages.getMessage("AbstractAccessDecisionManager.accessDenied", "Access is denied"));<NEW_LINE>}<NEW_LINE>if ((grant == deny) && (grant != 0)) {<NEW_LINE>if (this.allowIfEqualGrantedDeniedDecisions) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>throw new AccessDeniedException(this.messages.getMessage("AbstractAccessDecisionManager.accessDenied", "Access is denied"));<NEW_LINE>}<NEW_LINE>// To get this far, every AccessDecisionVoter abstained<NEW_LINE>checkAllowIfAllAbstainDecisions();<NEW_LINE>}
vote(authentication, object, configAttributes);
241,945
public static boolean enablePlugin(@Nullable Activity activity, @NonNull OsmandApplication app, @NonNull OsmandPlugin plugin, boolean enable) {<NEW_LINE>if (enable) {<NEW_LINE>if (!plugin.init(app, activity)) {<NEW_LINE>plugin.setEnabled(false);<NEW_LINE>return false;<NEW_LINE>} else {<NEW_LINE>plugin.setEnabled(true);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>plugin.disable(app);<NEW_LINE>plugin.setEnabled(false);<NEW_LINE>}<NEW_LINE>app.getSettings().enablePlugin(plugin.getId(), enable);<NEW_LINE>app.getQuickActionRegistry().updateActionTypes();<NEW_LINE>if (activity != null) {<NEW_LINE>if (activity instanceof MapActivity) {<NEW_LINE>final MapActivity mapActivity = (MapActivity) activity;<NEW_LINE><MASK><NEW_LINE>mapActivity.getDashboard().refreshDashboardFragments();<NEW_LINE>DashFragmentData fragmentData = plugin.getCardFragment();<NEW_LINE>if (!enable && fragmentData != null) {<NEW_LINE>FragmentManager fm = mapActivity.getSupportFragmentManager();<NEW_LINE>Fragment fragment = fm.findFragmentByTag(fragmentData.tag);<NEW_LINE>if (fragment != null) {<NEW_LINE>fm.beginTransaction().remove(fragment).commitAllowingStateLoss();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (plugin.isMarketPlugin() || plugin.isPaid()) {<NEW_LINE>if (plugin.isActive()) {<NEW_LINE>plugin.showInstallDialog(activity);<NEW_LINE>} else if (OsmandPlugin.checkPluginPackage(app, plugin)) {<NEW_LINE>plugin.showDisableDialog(activity);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
plugin.updateLayers(mapActivity, mapActivity);
867,662
private Map<String, String> parseOracleUrl(String jdbcUrl) {<NEW_LINE>HashMap<String, String> map = new HashMap<String, String>();<NEW_LINE>if (jdbcUrl == null || !StringUtils.startsWithIgnoreCase(jdbcUrl, "jdbc:oracle:thin")) {<NEW_LINE>return map;<NEW_LINE>}<NEW_LINE>int pos1 = jdbcUrl.indexOf(':', 5);<NEW_LINE>if (pos1 == -1) {<NEW_LINE>return map;<NEW_LINE>}<NEW_LINE>String type = jdbcUrl.substring(5, pos1);<NEW_LINE>map.put("type", type);<NEW_LINE>int pos2 = jdbcUrl.indexOf('?', pos1);<NEW_LINE>if (pos2 == -1) {<NEW_LINE>pos2 = jdbcUrl.length();<NEW_LINE>} else {<NEW_LINE>String paramString = jdbcUrl.substring(pos2 + 1);<NEW_LINE>parseParam(paramString, map);<NEW_LINE>}<NEW_LINE>int pos3 = jdbcUrl.indexOf("@");<NEW_LINE>if (pos3 != -1) {<NEW_LINE>String connUri = jdbcUrl.substring(pos3, pos2);<NEW_LINE>int pos4 = connUri.indexOf(":");<NEW_LINE>if (pos4 != -1) {<NEW_LINE>String host = connUri.substring(1, pos4);<NEW_LINE>map.put("host", host);<NEW_LINE>int pos5 = connUri.lastIndexOf(":");<NEW_LINE>if (pos5 != pos4) {<NEW_LINE>String port = connUri.substring(pos4 + 1, pos5);<NEW_LINE>map.put("port", port);<NEW_LINE>} else {<NEW_LINE>map.put("port", DEFAULT_ORACLE_PORT);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String urlWithoutParams = jdbcUrl.substring(0, pos2);<NEW_LINE><MASK><NEW_LINE>return map;<NEW_LINE>}
map.put("urlWithoutParams", urlWithoutParams);
616,600
public com.amazonaws.services.simplesystemsmanagement.model.OpsItemNotFoundException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.simplesystemsmanagement.model.OpsItemNotFoundException opsItemNotFoundException = new com.amazonaws.services.simplesystemsmanagement.model.OpsItemNotFoundException(null);<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><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 opsItemNotFoundException;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
697,081
private void applyState(InetAddressAndPort endpoint, ApplicationState state, VersionedValue value, EndpointState epState) {<NEW_LINE>switch(state) {<NEW_LINE>case RELEASE_VERSION:<NEW_LINE>StargateSystemKeyspace.updatePeerInfo(endpoint, "release_version", value.value);<NEW_LINE>break;<NEW_LINE>case DC:<NEW_LINE>StargateSystemKeyspace.updatePeerInfo(endpoint, "data_center", value.value);<NEW_LINE>break;<NEW_LINE>case RACK:<NEW_LINE>StargateSystemKeyspace.updatePeerInfo(endpoint, "rack", value.value);<NEW_LINE>break;<NEW_LINE>case RPC_ADDRESS:<NEW_LINE>try {<NEW_LINE>StargateSystemKeyspace.updatePeerInfo(endpoint, "rpc_address", InetAddress.getByName(value.value));<NEW_LINE>} catch (UnknownHostException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case NATIVE_ADDRESS_AND_PORT:<NEW_LINE>try {<NEW_LINE>InetAddressAndPort address = <MASK><NEW_LINE>StargateSystemKeyspace.updatePeerNativeAddress(endpoint, address);<NEW_LINE>} catch (UnknownHostException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case SCHEMA:<NEW_LINE>// Use a fix schema version for all peers (always in agreement) because stargate waits<NEW_LINE>// for DDL queries to reach agreement before returning.<NEW_LINE>StargateSystemKeyspace.updatePeerInfo(endpoint, "schema_version", StargateSystemKeyspace.SCHEMA_VERSION);<NEW_LINE>break;<NEW_LINE>case HOST_ID:<NEW_LINE>StargateSystemKeyspace.updatePeerInfo(endpoint, "host_id", UUID.fromString(value.value));<NEW_LINE>break;<NEW_LINE>case RPC_READY:<NEW_LINE>notifyRpcChange(endpoint, epState.isRpcReady());<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>}<NEW_LINE>}
InetAddressAndPort.getByName(value.value);
897,540
public void enableNetworkLogging() {<NEW_LINE>Logger logger = LoggerFactory.getLogger(REACTOR_NETWORK_LOG_CATEGORY);<NEW_LINE>if (logger.isTraceEnabled()) {<NEW_LINE>this.httpClient = this.httpClient.wiretap(REACTOR_NETWORK_LOG_CATEGORY, LogLevel.TRACE);<NEW_LINE>} else if (logger.isDebugEnabled()) {<NEW_LINE>this.httpClient = this.httpClient.wiretap(REACTOR_NETWORK_LOG_CATEGORY, LogLevel.DEBUG);<NEW_LINE>} else if (logger.isInfoEnabled()) {<NEW_LINE>this.httpClient = this.httpClient.wiretap(REACTOR_NETWORK_LOG_CATEGORY, LogLevel.INFO);<NEW_LINE>} else if (logger.isWarnEnabled()) {<NEW_LINE>this.httpClient = this.httpClient.wiretap(REACTOR_NETWORK_LOG_CATEGORY, LogLevel.WARN);<NEW_LINE>} else if (logger.isErrorEnabled()) {<NEW_LINE>this.httpClient = this.httpClient.<MASK><NEW_LINE>}<NEW_LINE>}
wiretap(REACTOR_NETWORK_LOG_CATEGORY, LogLevel.ERROR);
182,087
public final void recover() throws IOException {<NEW_LINE>String filename = this.filePrefix + "queue.chkpt";<NEW_LINE>final BufferedDataInputStream vis = new BufferedDataInputStream(filename);<NEW_LINE>this.len = vis.readLong();<NEW_LINE>this.loPool = vis.readInt();<NEW_LINE>this.hiPool = vis.readInt();<NEW_LINE>this.enqIndex = vis.readInt();<NEW_LINE>this.deqIndex = vis.readInt();<NEW_LINE>this.lastLoPool = this.loPool - 1;<NEW_LINE>for (int i = 0; i < this.enqIndex; i++) {<NEW_LINE>this.enqBuf[i] = new byte[vis.readInt()];<NEW_LINE>vis.read(this.enqBuf[i]);<NEW_LINE>}<NEW_LINE>for (int i = this.deqIndex; i < this.deqBuf.length; i++) {<NEW_LINE>this.deqBuf[i] = new byte[vis.readInt()];<NEW_LINE>vis.read<MASK><NEW_LINE>}<NEW_LINE>vis.close();<NEW_LINE>File file = new File(this.filePrefix + Integer.toString(this.lastLoPool));<NEW_LINE>boolean canRead = (this.lastLoPool < this.hiPool);<NEW_LINE>this.reader.restart(file, canRead);<NEW_LINE>String pstr = Integer.toString(this.loPool);<NEW_LINE>this.loFile = new File(this.filePrefix + pstr);<NEW_LINE>}
(this.deqBuf[i]);
1,625,390
public void saveSortConsumption(InlongGroupInfo bizInfo, String topic, String consumerGroup) {<NEW_LINE>String groupId = bizInfo.getInlongGroupId();<NEW_LINE>ConsumptionEntity exists = consumptionMapper.selectConsumptionExists(groupId, topic, consumerGroup);<NEW_LINE>if (exists != null) {<NEW_LINE>log.warn("consumption with groupId={}, topic={}, consumer group={} already exists, skip to create", groupId, topic, consumerGroup);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>log.debug("begin to save consumption, groupId={}, topic={}, consumer group={}", groupId, topic, consumerGroup);<NEW_LINE>MQType mqType = MQType.forType(bizInfo.getMiddlewareType());<NEW_LINE>ConsumptionEntity entity = new ConsumptionEntity();<NEW_LINE>entity.setInlongGroupId(groupId);<NEW_LINE>entity.setMiddlewareType(mqType.getType());<NEW_LINE>entity.setTopic(topic);<NEW_LINE>entity.setConsumerGroupId(consumerGroup);<NEW_LINE>entity.setConsumerGroupName(consumerGroup);<NEW_LINE>entity.setInCharges(bizInfo.getInCharges());<NEW_LINE>entity.setFilterEnabled(0);<NEW_LINE>entity.setStatus(ConsumptionStatus.APPROVED.getStatus());<NEW_LINE>entity.setIsDeleted(EntityStatus.UN_DELETED.getCode());<NEW_LINE>entity.<MASK><NEW_LINE>entity.setCreateTime(new Date());<NEW_LINE>consumptionMapper.insert(entity);<NEW_LINE>if (mqType == MQType.PULSAR || mqType == MQType.TDMQ_PULSAR) {<NEW_LINE>ConsumptionPulsarEntity pulsarEntity = new ConsumptionPulsarEntity();<NEW_LINE>pulsarEntity.setConsumptionId(entity.getId());<NEW_LINE>pulsarEntity.setConsumerGroupId(consumerGroup);<NEW_LINE>pulsarEntity.setInlongGroupId(groupId);<NEW_LINE>pulsarEntity.setIsDeleted(EntityStatus.UN_DELETED.getCode());<NEW_LINE>consumptionPulsarMapper.insert(pulsarEntity);<NEW_LINE>}<NEW_LINE>log.debug("success save consumption, groupId={}, topic={}, consumer group={}", groupId, topic, consumerGroup);<NEW_LINE>}
setCreator(bizInfo.getCreator());
1,136,061
public int[] pivotArray(int[] nums, int pivot) {<NEW_LINE>List<Integer> <MASK><NEW_LINE>List<Integer> greater = new ArrayList<>();<NEW_LINE>int count = 0;<NEW_LINE>for (int i = 0; i < nums.length; i++) {<NEW_LINE>if (nums[i] < pivot) {<NEW_LINE>less.add(nums[i]);<NEW_LINE>} else if (nums[i] > pivot) {<NEW_LINE>greater.add(nums[i]);<NEW_LINE>} else {<NEW_LINE>count++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int i = 0; i < nums.length; ) {<NEW_LINE>int j = 0;<NEW_LINE>while (j < less.size()) {<NEW_LINE>nums[i++] = less.get(j++);<NEW_LINE>}<NEW_LINE>j = 0;<NEW_LINE>while (j < count) {<NEW_LINE>nums[i++] = pivot;<NEW_LINE>j++;<NEW_LINE>}<NEW_LINE>j = 0;<NEW_LINE>while (j < greater.size()) {<NEW_LINE>nums[i++] = greater.get(j++);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return nums;<NEW_LINE>}
less = new ArrayList<>();
895,637
private static String buildAutomodFragments(JSONArray fragments) {<NEW_LINE>StringBuilder b = new StringBuilder();<NEW_LINE>for (Object o : fragments) {<NEW_LINE>JSONObject fragment = (JSONObject) o;<NEW_LINE>String text = <MASK><NEW_LINE>if (fragment.containsKey("automod")) {<NEW_LINE>if (b.length() > 0) {<NEW_LINE>b.append(", ");<NEW_LINE>}<NEW_LINE>b.append("\"").append(text).append("\":");<NEW_LINE>JSONObject topics = (JSONObject) ((JSONObject) fragment.get("automod")).get("topics");<NEW_LINE>boolean first = true;<NEW_LINE>for (Object o2 : topics.keySet()) {<NEW_LINE>if (!first) {<NEW_LINE>b.append("/");<NEW_LINE>}<NEW_LINE>first = false;<NEW_LINE>String key = (String) o2;<NEW_LINE>b.append(key).append(topics.get(key));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return b.toString();<NEW_LINE>}
JSONUtil.getString(fragment, "text");
758,879
final DescribeScheduledActionsResult executeDescribeScheduledActions(DescribeScheduledActionsRequest describeScheduledActionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeScheduledActionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeScheduledActionsRequest> request = null;<NEW_LINE>Response<DescribeScheduledActionsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeScheduledActionsRequestMarshaller().marshall(super.beforeMarshalling(describeScheduledActionsRequest));<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, "Redshift");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeScheduledActions");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribeScheduledActionsResult> responseHandler = new StaxResponseHandler<DescribeScheduledActionsResult>(new DescribeScheduledActionsResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
178,848
public boolean isValid(String newNm) {<NEW_LINE>newName = newNm;<NEW_LINE>LocalSymbolMap localSymbolMap = hfunction.getLocalSymbolMap();<NEW_LINE>if (localSymbolMap.containsVariableWithName(newName) || isSymbolInFunction(function, newName)) {<NEW_LINE>errorMsg = "Duplicate name";<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>commitRequired = AbstractDecompilerAction.checkFullCommit(highSymbol, hfunction);<NEW_LINE>if (commitRequired) {<NEW_LINE>// Don't try to split out if we need to commit<NEW_LINE>exactSpot = null;<NEW_LINE>}<NEW_LINE>if (exactSpot != null && !highSymbol.isNameLocked()) {<NEW_LINE>// The user pointed at a particular usage, not just the vardecl<NEW_LINE>try {<NEW_LINE>HighVariable var = hfunction.splitOutMergeGroup(exactSpot.getHigh(), exactSpot);<NEW_LINE>highSymbol = var.getSymbol();<NEW_LINE>} catch (PcodeException e) {<NEW_LINE>errorMsg <MASK><NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (highSymbol == null) {<NEW_LINE>errorMsg = "Rename Failed: No symbol";<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
= "Rename Failed: " + e.getMessage();
403,915
final DeleteHITResult executeDeleteHIT(DeleteHITRequest deleteHITRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteHITRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteHITRequest> request = null;<NEW_LINE>Response<DeleteHITResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new DeleteHITRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteHITRequest));<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, "MTurk");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteHIT");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteHITResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteHITResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);