idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
363,854
public void updateMessageWithNewAttachments(final String messageId, final List<File> files) {<NEW_LINE>Realm realm = MessageDatabaseManager.getInstance().getNewBackgroundRealm();<NEW_LINE>realm.executeTransaction(new Realm.Transaction() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void execute(Realm realm) {<NEW_LINE>MessageItem messageItem = realm.where(MessageItem.class).equalTo(MessageItem.Fields.UNIQUE_ID, messageId).findFirst();<NEW_LINE>if (messageItem != null) {<NEW_LINE>RealmList<Attachment> attachments = messageItem.getAttachments();<NEW_LINE>// remove temporary attachments created from uri<NEW_LINE>// to replace it with attachments created from files<NEW_LINE>attachments.deleteAllFromRealm();<NEW_LINE>for (File file : files) {<NEW_LINE>Attachment attachment = new Attachment();<NEW_LINE>attachment.setFilePath(file.getPath());<NEW_LINE>attachment.setFileSize(file.length());<NEW_LINE>attachment.<MASK><NEW_LINE>attachment.setIsImage(FileManager.fileIsImage(file));<NEW_LINE>attachment.setMimeType(HttpFileUploadManager.getMimeType(file.getPath()));<NEW_LINE>attachment.setDuration((long) 0);<NEW_LINE>if (attachment.isImage()) {<NEW_LINE>HttpFileUploadManager.ImageSize imageSize = HttpFileUploadManager.getImageSizes(file.getPath());<NEW_LINE>attachment.setImageHeight(imageSize.getHeight());<NEW_LINE>attachment.setImageWidth(imageSize.getWidth());<NEW_LINE>}<NEW_LINE>attachments.add(attachment);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
setTitle(file.getName());
888,726
public TrxLookupSet fetchTransInfo(String db) {<NEW_LINE><MASK><NEW_LINE>final List<List<Map<String, Object>>> results = SyncManagerHelper.sync(new FetchTransForDeadlockDetectionSyncAction(db), db);<NEW_LINE>for (List<Map<String, Object>> result : results) {<NEW_LINE>if (result == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>for (Map<String, Object> row : result) {<NEW_LINE>final Long transId = (Long) row.get("TRANS_ID");<NEW_LINE>final String group = (String) row.get("GROUP");<NEW_LINE>final long connId = (Long) row.get("CONN_ID");<NEW_LINE>final long frontendConnId = (Long) row.get("FRONTEND_CONN_ID");<NEW_LINE>final Long startTime = (Long) row.get("START_TIME");<NEW_LINE>final String sql = (String) row.get("SQL");<NEW_LINE>final GroupConnPair entry = new GroupConnPair(group, connId);<NEW_LINE>lookupSet.addNewTransaction(entry, transId);<NEW_LINE>lookupSet.updateTransaction(transId, frontendConnId, sql, startTime);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return lookupSet;<NEW_LINE>}
final TrxLookupSet lookupSet = new TrxLookupSet();
1,572,813
public CostCategorySplitChargeRuleParameter unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CostCategorySplitChargeRuleParameter costCategorySplitChargeRuleParameter = new CostCategorySplitChargeRuleParameter();<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>if (context.testExpression("Type", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>costCategorySplitChargeRuleParameter.setType(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Values", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>costCategorySplitChargeRuleParameter.setValues(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return costCategorySplitChargeRuleParameter;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
346,837
final DeleteImagePipelineResult executeDeleteImagePipeline(DeleteImagePipelineRequest deleteImagePipelineRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteImagePipelineRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteImagePipelineRequest> request = null;<NEW_LINE>Response<DeleteImagePipelineResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteImagePipelineRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteImagePipelineRequest));<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, "imagebuilder");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteImagePipeline");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteImagePipelineResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteImagePipelineResultJsonUnmarshaller());<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,443,737
private void loadNode121() {<NEW_LINE>ShelvedStateMachineTypeNode node = new ShelvedStateMachineTypeNode(this.context, Identifiers.AlarmConditionType_ShelvingState, new QualifiedName(0, "ShelvingState"), new LocalizedText("en", "ShelvingState"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), UByte.valueOf(0));<NEW_LINE>node.addReference(new Reference(Identifiers.AlarmConditionType_ShelvingState, Identifiers.HasComponent, Identifiers.AlarmConditionType_ShelvingState_CurrentState.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.AlarmConditionType_ShelvingState, Identifiers.HasComponent, Identifiers.AlarmConditionType_ShelvingState_LastTransition.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.AlarmConditionType_ShelvingState, Identifiers.HasProperty, Identifiers.AlarmConditionType_ShelvingState_UnshelveTime.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.AlarmConditionType_ShelvingState, Identifiers.HasComponent, Identifiers.AlarmConditionType_ShelvingState_Unshelve.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.AlarmConditionType_ShelvingState, Identifiers.HasComponent, Identifiers.AlarmConditionType_ShelvingState_OneShotShelve.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.AlarmConditionType_ShelvingState, Identifiers.HasComponent, Identifiers.AlarmConditionType_ShelvingState_TimedShelve<MASK><NEW_LINE>node.addReference(new Reference(Identifiers.AlarmConditionType_ShelvingState, Identifiers.HasTrueSubState, Identifiers.AlarmConditionType_EnabledState.expanded(), false));<NEW_LINE>node.addReference(new Reference(Identifiers.AlarmConditionType_ShelvingState, Identifiers.HasTypeDefinition, Identifiers.ShelvedStateMachineType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.AlarmConditionType_ShelvingState, Identifiers.HasModellingRule, Identifiers.ModellingRule_Optional.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.AlarmConditionType_ShelvingState, Identifiers.HasComponent, Identifiers.AlarmConditionType.expanded(), false));<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
.expanded(), true));
954,641
private IBaseResource loadAndAddConfDstu3(HttpServletRequest theServletRequest, final HomeRequest theRequest, final ModelMap theModel) {<NEW_LINE>CaptureInterceptor interceptor = new CaptureInterceptor();<NEW_LINE>GenericClient client = theRequest.newClient(theServletRequest, getContext(theRequest), myConfig, interceptor);<NEW_LINE>org.hl7.fhir.dstu3.model<MASK><NEW_LINE>try {<NEW_LINE>capabilityStatement = client.fetchConformance().ofType(org.hl7.fhir.dstu3.model.CapabilityStatement.class).execute();<NEW_LINE>} catch (Exception ex) {<NEW_LINE>ourLog.warn("Failed to load conformance statement, error was: {}", ex.toString());<NEW_LINE>theModel.put("errorMsg", toDisplayError("Failed to load conformance statement, error was: " + ex.toString(), ex));<NEW_LINE>}<NEW_LINE>theModel.put("jsonEncodedConf", getContext(theRequest).newJsonParser().encodeResourceToString(capabilityStatement));<NEW_LINE>Map<String, Number> resourceCounts = new HashMap<>();<NEW_LINE>long total = 0;<NEW_LINE>for (CapabilityStatementRestComponent nextRest : capabilityStatement.getRest()) {<NEW_LINE>for (CapabilityStatementRestResourceComponent nextResource : nextRest.getResource()) {<NEW_LINE>List<Extension> exts = nextResource.getExtensionsByUrl(RESOURCE_COUNT_EXT_URL);<NEW_LINE>if (exts != null && exts.size() > 0) {<NEW_LINE>Number nextCount = ((DecimalType) (exts.get(0).getValue())).getValueAsNumber();<NEW_LINE>resourceCounts.put(nextResource.getTypeElement().getValue(), nextCount);<NEW_LINE>total += nextCount.longValue();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>theModel.put("resourceCounts", resourceCounts);<NEW_LINE>if (total > 0) {<NEW_LINE>for (CapabilityStatementRestComponent nextRest : capabilityStatement.getRest()) {<NEW_LINE>Collections.sort(nextRest.getResource(), new Comparator<CapabilityStatementRestResourceComponent>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public int compare(CapabilityStatementRestResourceComponent theO1, CapabilityStatementRestResourceComponent theO2) {<NEW_LINE>DecimalType count1 = new DecimalType();<NEW_LINE>List<Extension> count1exts = theO1.getExtensionsByUrl(RESOURCE_COUNT_EXT_URL);<NEW_LINE>if (count1exts != null && count1exts.size() > 0) {<NEW_LINE>count1 = (DecimalType) count1exts.get(0).getValue();<NEW_LINE>}<NEW_LINE>DecimalType count2 = new DecimalType();<NEW_LINE>List<Extension> count2exts = theO2.getExtensionsByUrl(RESOURCE_COUNT_EXT_URL);<NEW_LINE>if (count2exts != null && count2exts.size() > 0) {<NEW_LINE>count2 = (DecimalType) count2exts.get(0).getValue();<NEW_LINE>}<NEW_LINE>int retVal = count2.compareTo(count1);<NEW_LINE>if (retVal == 0) {<NEW_LINE>retVal = theO1.getTypeElement().getValue().compareTo(theO2.getTypeElement().getValue());<NEW_LINE>}<NEW_LINE>return retVal;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}<NEW_LINE>theModel.put("requiredParamExtension", ExtensionConstants.PARAM_IS_REQUIRED);<NEW_LINE>theModel.put("conf", capabilityStatement);<NEW_LINE>return capabilityStatement;<NEW_LINE>}
.CapabilityStatement capabilityStatement = new CapabilityStatement();
69,373
boolean showDialog() {<NEW_LINE>okButton = new JButton(LBL_CherryPick_OKButton_text());<NEW_LINE>org.openide.awt.Mnemonics.setLocalizedText(okButton, okButton.getText());<NEW_LINE>dd = new // NOI18N<NEW_LINE>DialogDescriptor(// NOI18N<NEW_LINE>panel, // NOI18N<NEW_LINE>Bundle.LBL_CherryPick_title(repository), // NOI18N<NEW_LINE>true, // NOI18N<NEW_LINE>new Object[] { okButton, DialogDescriptor.CANCEL_OPTION }, // NOI18N<NEW_LINE>okButton, // NOI18N<NEW_LINE>DialogDescriptor.DEFAULT_ALIGN, // NOI18N<NEW_LINE>new HelpCtx("org.netbeans.modules.git.ui.branch.CherryPick"), null);<NEW_LINE>enableRevisionPanel();<NEW_LINE>revisionPicker.addPropertyChangeListener(new PropertyChangeListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void propertyChange(PropertyChangeEvent evt) {<NEW_LINE>mergedIntoTask.cancel();<NEW_LINE>if (evt.getPropertyName() == RevisionDialogController.PROP_VALID) {<NEW_LINE>boolean v = Boolean.TRUE.<MASK><NEW_LINE>setValid(v);<NEW_LINE>if (v) {<NEW_LINE>revision = getRevision();<NEW_LINE>mergedIntoTask.schedule(500);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>Dialog d = DialogDisplayer.getDefault().createDialog(dd);<NEW_LINE>d.setVisible(true);<NEW_LINE>return okButton == dd.getValue();<NEW_LINE>}
equals(evt.getNewValue());
1,822,286
private void fixLibraryItemsLocation(HashMap<String, JsonValue> libraryItems) {<NEW_LINE>if (libraryItems.size() == 0)<NEW_LINE>return;<NEW_LINE>// creating libraryArrayJsonString<NEW_LINE>String libraryArrayJsonString = "{";<NEW_LINE>for (JsonValue entry : libraryItems.values()) {<NEW_LINE>libraryArrayJsonString += "\"" + entry.name + "\": " + entry.prettyPrint(JsonWriter.OutputType.json, 1) + ", ";<NEW_LINE>}<NEW_LINE>libraryArrayJsonString = libraryArrayJsonString.substring(0, libraryArrayJsonString.length() - 2) + "}";<NEW_LINE>// ProjectInfo data<NEW_LINE>String prjInfoFilePath = projectPath + "/project.dt";<NEW_LINE>FileHandle projectInfoFile = Gdx.files.internal(prjInfoFilePath);<NEW_LINE>try {<NEW_LINE>String projectInfoContents = FileUtils.readFileToString(projectInfoFile.file());<NEW_LINE>JsonValue value = jsonReader.parse(projectInfoContents);<NEW_LINE>JsonValue newVal = jsonReader.parse(libraryArrayJsonString);<NEW_LINE>newVal.name = "libraryItems";<NEW_LINE>newVal.<MASK><NEW_LINE>newVal.next = newVal.prev.next;<NEW_LINE>newVal.prev.next = newVal;<NEW_LINE>String content = value.prettyPrint(JsonWriter.OutputType.json, 1);<NEW_LINE>FileUtils.writeStringToFile(new File(prjInfoFilePath), content, "utf-8");<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}
prev = value.get("scenes");
976,717
public SearchResultCollection addSearchResults(List<SearchResult> sr, boolean resortAll, boolean removeDuplicates) {<NEW_LINE>if (SearchUICore.isDebugMode()) {<NEW_LINE>LOG.info("Add search results resortAll=" + (resortAll ? "true" : "false") + " removeDuplicates=" + (removeDuplicates ? "true" : "false") + " Results=" + sr.size() + " Current results=" + this.searchResults.size());<NEW_LINE>}<NEW_LINE>if (resortAll) {<NEW_LINE>this.searchResults.addAll(sr);<NEW_LINE>sortSearchResults();<NEW_LINE>if (removeDuplicates) {<NEW_LINE>filterSearchDuplicateResults();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (!removeDuplicates) {<NEW_LINE>this.searchResults.addAll(sr);<NEW_LINE>} else {<NEW_LINE>ArrayList<SearchResult> addedResults = new ArrayList<>(sr);<NEW_LINE>SearchResultComparator cmp = new SearchResultComparator(phrase);<NEW_LINE>Collections.sort(addedResults, cmp);<NEW_LINE>filterSearchDuplicateResults(addedResults);<NEW_LINE>int i = 0;<NEW_LINE>int j = 0;<NEW_LINE>while (j < addedResults.size()) {<NEW_LINE>SearchResult addedResult = addedResults.get(j);<NEW_LINE>if (i >= searchResults.size()) {<NEW_LINE>int k = 0;<NEW_LINE>boolean same = false;<NEW_LINE>while (searchResults.size() > k && k < DEPTH_TO_CHECK_SAME_SEARCH_RESULTS) {<NEW_LINE>if (sameSearchResult(addedResult, searchResults.get(searchResults.size() - k - 1))) {<NEW_LINE>same = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>k++;<NEW_LINE>}<NEW_LINE>if (!same) {<NEW_LINE>searchResults.add(addedResult);<NEW_LINE>}<NEW_LINE>j++;<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>SearchResult existingResult = searchResults.get(i);<NEW_LINE>if (sameSearchResult(addedResult, existingResult)) {<NEW_LINE>j++;<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>int compare = cmp.compare(existingResult, addedResult);<NEW_LINE>if (compare == 0) {<NEW_LINE>// existingResult == addedResult<NEW_LINE>j++;<NEW_LINE>} else if (compare > 0) {<NEW_LINE>// existingResult > addedResult<NEW_LINE>this.searchResults.add<MASK><NEW_LINE>j++;<NEW_LINE>} else {<NEW_LINE>// existingResult < addedResult<NEW_LINE>i++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (SearchUICore.isDebugMode()) {<NEW_LINE>LOG.info("Search results added. Current results=" + this.searchResults.size());<NEW_LINE>}<NEW_LINE>return this;<NEW_LINE>}
(addedResults.get(j));
957,735
public com.amazonaws.services.pinpointemail.model.SendingPausedException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.pinpointemail.model.SendingPausedException sendingPausedException = new com.amazonaws.services.pinpointemail.model.SendingPausedException(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 sendingPausedException;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
249,592
private static boolean checkTryCatchRelation(List<TryCatchBlockAttr> tryBlocks, TryCatchBlockAttr outerTryBlock, TryCatchBlockAttr innerTryBlock) {<NEW_LINE>if (outerTryBlock.getBlocks().equals(innerTryBlock.getBlocks())) {<NEW_LINE>// same try blocks -> merge handlers<NEW_LINE>List<ExceptionHandler> handlers = Utils.concatDistinct(outerTryBlock.getHandlers(), innerTryBlock.getHandlers());<NEW_LINE>tryBlocks.add(new TryCatchBlockAttr(tryBlocks.size(), handlers, outerTryBlock.getBlocks()));<NEW_LINE>tryBlocks.remove(outerTryBlock);<NEW_LINE>tryBlocks.remove(innerTryBlock);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>Set<BlockNode> handlerBlocks = innerTryBlock.getHandlers().stream().flatMap(eh -> eh.getBlocks().stream()).collect(Collectors.toSet());<NEW_LINE>boolean catchInHandler = handlerBlocks.stream().anyMatch(isHandlersIntersects(outerTryBlock));<NEW_LINE>boolean catchInTry = innerTryBlock.getBlocks().stream()<MASK><NEW_LINE>boolean blocksOutsideHandler = outerTryBlock.getBlocks().stream().anyMatch(b -> !handlerBlocks.contains(b));<NEW_LINE>boolean makeInner = catchInHandler && (catchInTry || blocksOutsideHandler);<NEW_LINE>if (makeInner && innerTryBlock.isAllHandler()) {<NEW_LINE>// inner try block can't have catch-all handler<NEW_LINE>outerTryBlock.setBlocks(Utils.concatDistinct(outerTryBlock.getBlocks(), innerTryBlock.getBlocks()));<NEW_LINE>innerTryBlock.clear();<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (makeInner) {<NEW_LINE>// convert to inner<NEW_LINE>List<BlockNode> mergedBlocks = Utils.concatDistinct(outerTryBlock.getBlocks(), innerTryBlock.getBlocks());<NEW_LINE>innerTryBlock.getHandlers().removeAll(outerTryBlock.getHandlers());<NEW_LINE>innerTryBlock.setOuterTryBlock(outerTryBlock);<NEW_LINE>outerTryBlock.addInnerTryBlock(innerTryBlock);<NEW_LINE>outerTryBlock.setBlocks(mergedBlocks);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (innerTryBlock.getHandlers().containsAll(outerTryBlock.getHandlers())) {<NEW_LINE>// merge<NEW_LINE>List<BlockNode> mergedBlocks = Utils.concatDistinct(outerTryBlock.getBlocks(), innerTryBlock.getBlocks());<NEW_LINE>List<ExceptionHandler> handlers = Utils.concatDistinct(outerTryBlock.getHandlers(), innerTryBlock.getHandlers());<NEW_LINE>tryBlocks.add(new TryCatchBlockAttr(tryBlocks.size(), handlers, mergedBlocks));<NEW_LINE>tryBlocks.remove(outerTryBlock);<NEW_LINE>tryBlocks.remove(innerTryBlock);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
.anyMatch(isHandlersIntersects(outerTryBlock));
218,999
private boolean togglePermissionSettings(final boolean stop) {<NEW_LINE>this.window().endEditingFor(null);<NEW_LINE>final Credentials credentials = session.getHost().getCredentials();<NEW_LINE>boolean enable = !credentials.isAnonymousLogin() && session.getFeature(UnixPermission.class) != null;<NEW_LINE>recursiveButton.setEnabled(stop && enable);<NEW_LINE>for (Path next : files) {<NEW_LINE>if (next.isFile()) {<NEW_LINE>recursiveButton.setEnabled(false);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>octalField.setEnabled(stop && enable);<NEW_LINE>ownerr.setEnabled(stop && enable);<NEW_LINE>ownerw.setEnabled(stop && enable);<NEW_LINE>ownerx.setEnabled(stop && enable);<NEW_LINE><MASK><NEW_LINE>groupw.setEnabled(stop && enable);<NEW_LINE>groupx.setEnabled(stop && enable);<NEW_LINE>otherr.setEnabled(stop && enable);<NEW_LINE>otherw.setEnabled(stop && enable);<NEW_LINE>otherx.setEnabled(stop && enable);<NEW_LINE>if (stop) {<NEW_LINE>permissionProgress.stopAnimation(null);<NEW_LINE>} else if (enable) {<NEW_LINE>permissionProgress.startAnimation(null);<NEW_LINE>}<NEW_LINE>return enable;<NEW_LINE>}
groupr.setEnabled(stop && enable);
545,452
public static final <E extends Collection<? super String>> E addNeighbors(String geohash, int length, E neighbors) {<NEW_LINE>String north = neighbor(geohash, length, 0, +1);<NEW_LINE>if (north != null) {<NEW_LINE>neighbors.add(neighbor(north, length, -1, 0));<NEW_LINE>neighbors.add(north);<NEW_LINE>neighbors.add(neighbor(north, length, +1, 0));<NEW_LINE>}<NEW_LINE>neighbors.add(neighbor(geohash, <MASK><NEW_LINE>neighbors.add(neighbor(geohash, length, +1, 0));<NEW_LINE>String south = neighbor(geohash, length, 0, -1);<NEW_LINE>if (south != null) {<NEW_LINE>neighbors.add(neighbor(south, length, -1, 0));<NEW_LINE>neighbors.add(south);<NEW_LINE>neighbors.add(neighbor(south, length, +1, 0));<NEW_LINE>}<NEW_LINE>return neighbors;<NEW_LINE>}
length, -1, 0));
1,683,779
public Action unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Action action = new Action();<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>if (context.testExpression("SNSConfiguration", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>action.setSNSConfiguration(SNSConfigurationJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("LambdaConfiguration", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>action.setLambdaConfiguration(LambdaConfigurationJsonUnmarshaller.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 action;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
650,227
public void onAddReferences(ServiceRequest service) {<NEW_LINE>OpcUaServer server = service.attr(ServiceAttributes.SERVER_KEY).get();<NEW_LINE>Session session = service.attr(ServiceAttributes.SESSION_KEY).get();<NEW_LINE>AddReferencesRequest request = (AddReferencesRequest) service.getRequest();<NEW_LINE>List<AddReferencesItem> referencesToAdd = l(request.getReferencesToAdd());<NEW_LINE>if (referencesToAdd.isEmpty()) {<NEW_LINE>service.setServiceFault(StatusCodes.Bad_NothingToDo);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (referencesToAdd.size() > server.getConfig().getLimits().getMaxNodesPerNodeManagement().longValue()) {<NEW_LINE>service.setServiceFault(StatusCodes.Bad_TooManyOperations);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>AddReferencesContext context = new AddReferencesContext(server, session, new DiagnosticsContext<>());<NEW_LINE>server.getAddressSpaceManager().addReferences(context, referencesToAdd);<NEW_LINE>context.getFuture().thenAccept(results -> {<NEW_LINE><MASK><NEW_LINE>AddReferencesResponse response = new AddReferencesResponse(header, a(results, StatusCode.class), new DiagnosticInfo[0]);<NEW_LINE>service.setResponse(response);<NEW_LINE>});<NEW_LINE>}
ResponseHeader header = service.createResponseHeader();
710,025
// =========================<NEW_LINE>// CHOLESKY DECOMP<NEW_LINE>@Override<NEW_LINE>public void spotrf(byte uplo, int N, INDArray A, INDArray INFO) {<NEW_LINE>int status = LAPACKE_spotrf(getColumnOrder(A), uplo, N, (FloatPointer) A.data().addressPointer(), getLda(A));<NEW_LINE>if (status != 0) {<NEW_LINE>throw new BlasException("Failed to execute spotrf", status);<NEW_LINE>}<NEW_LINE>if (uplo == 'U') {<NEW_LINE>INDArrayIndex[] ix = new INDArrayIndex[2];<NEW_LINE>for (int i = 1; i < Math.min(A.rows(), A.columns()); i++) {<NEW_LINE>ix[0] = NDArrayIndex.point(i);<NEW_LINE>ix[1] = NDArrayIndex.interval(0, i);<NEW_LINE>A.put(ix, 0);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>INDArrayIndex[<MASK><NEW_LINE>for (int i = 0; i < Math.min(A.rows(), A.columns() - 1); i++) {<NEW_LINE>ix[0] = NDArrayIndex.point(i);<NEW_LINE>ix[1] = NDArrayIndex.interval(i + 1, A.columns());<NEW_LINE>A.put(ix, 0);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
] ix = new INDArrayIndex[2];
1,439,256
private net.minecraft.loot.context.LootContext convertContext(LootContext context) {<NEW_LINE>Location loc = context.getLocation();<NEW_LINE>ServerWorld handle = ((WorldImpl) Objects.requireNonNull(loc.getWorld())).getHandle();<NEW_LINE>net.minecraft.loot.context.LootContext.Builder builder = new net.minecraft.loot.context.LootContext.Builder(handle);<NEW_LINE>if (getHandle() != LootTable.EMPTY) {<NEW_LINE>// builder.luck(context.getLuck());<NEW_LINE>if (context.getLootedEntity() != null) {<NEW_LINE>Entity nmsLootedEntity = ((CraftEntity) context.getLootedEntity()).getHandle();<NEW_LINE>builder.parameter(LootContextParameters.THIS_ENTITY, nmsLootedEntity);<NEW_LINE>builder.parameter(LootContextParameters.DAMAGE_SOURCE, DamageSource.GENERIC);<NEW_LINE>builder.parameter(LootContextParameters.ORIGIN, nmsLootedEntity.getPos());<NEW_LINE>}<NEW_LINE>if (context.getKiller() != null) {<NEW_LINE>PlayerEntity nmsKiller = ((CraftHumanEntity) context.getKiller()).getHandle();<NEW_LINE>builder.parameter(LootContextParameters.KILLER_ENTITY, nmsKiller);<NEW_LINE>// If there is a player killer, damage source should reflect that in case loot tables use that information<NEW_LINE>builder.parameter(LootContextParameters.DAMAGE_SOURCE, DamageSource.player(nmsKiller));<NEW_LINE>// SPIGOT-5603 - Set minecraft:killed_by_player<NEW_LINE>builder.parameter(LootContextParameters.LAST_DAMAGE_PLAYER, nmsKiller);<NEW_LINE>}<NEW_LINE>// SPIGOT-5603 - Use LootContext#lootingModifier<NEW_LINE>if (context.getLootingModifier() != LootContext.DEFAULT_LOOT_MODIFIER) {<NEW_LINE>builder.parameter(IMixinLootContextParameters.LOOTING_MOD, context.getLootingModifier());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// SPIGOT-5603 - Avoid IllegalArgumentException in LootTableInfo#build()<NEW_LINE>LootContextType.Builder nmsBuilder = new LootContextType.Builder();<NEW_LINE>for (LootContextParameter<?> param : getHandle().getType().getRequired()) nmsBuilder.require(param);<NEW_LINE>for (LootContextParameter<?> param : getHandle().getType().getAllowed()) if (!getHandle().getType().getRequired().contains(param))<NEW_LINE>nmsBuilder.allow(param);<NEW_LINE><MASK><NEW_LINE>return builder.build(nmsBuilder.build());<NEW_LINE>}
nmsBuilder.allow(IMixinLootContextParameters.LOOTING_MOD);
502,175
public Dialog onCreateDialog(Bundle savedInstanceState) {<NEW_LINE>final AlertDialog.Builder builder = new <MASK><NEW_LINE>builder.setTitle(R.string.join_public_channel);<NEW_LINE>DialogJoinConferenceBinding binding = DataBindingUtil.inflate(getActivity().getLayoutInflater(), R.layout.dialog_join_conference, null, false);<NEW_LINE>DelayedHintHelper.setHint(R.string.channel_full_jid_example, binding.jid);<NEW_LINE>this.knownHostsAdapter = new KnownHostsAdapter(getActivity(), R.layout.simple_list_item);<NEW_LINE>binding.jid.setAdapter(knownHostsAdapter);<NEW_LINE>String prefilledJid = getArguments().getString(PREFILLED_JID_KEY);<NEW_LINE>if (prefilledJid != null) {<NEW_LINE>binding.jid.append(prefilledJid);<NEW_LINE>}<NEW_LINE>StartConversationActivity.populateAccountSpinner(getActivity(), getArguments().getStringArrayList(ACCOUNTS_LIST_KEY), binding.account);<NEW_LINE>builder.setView(binding.getRoot());<NEW_LINE>builder.setPositiveButton(R.string.join, null);<NEW_LINE>builder.setNegativeButton(R.string.cancel, null);<NEW_LINE>AlertDialog dialog = builder.create();<NEW_LINE>dialog.show();<NEW_LINE>dialog.getButton(DialogInterface.BUTTON_POSITIVE).setOnClickListener(view -> mListener.onJoinDialogPositiveClick(dialog, binding.account, binding.accountJidLayout, binding.jid, binding.bookmark.isChecked()));<NEW_LINE>binding.jid.setOnEditorActionListener((v, actionId, event) -> {<NEW_LINE>mListener.onJoinDialogPositiveClick(dialog, binding.account, binding.accountJidLayout, binding.jid, binding.bookmark.isChecked());<NEW_LINE>return true;<NEW_LINE>});<NEW_LINE>return dialog;<NEW_LINE>}
AlertDialog.Builder(getActivity());
179,807
public void removeAllRoleActorsByNameAndType(java.lang.String in0, java.lang.String in1, java.lang.String in2) throws java.rmi.RemoteException, com.atlassian.jira.rpc.exception.RemoteException {<NEW_LINE>if (super.cachedEndpoint == null) {<NEW_LINE>throw new org.apache.axis.NoEndPointException();<NEW_LINE>}<NEW_LINE>org.apache.axis.client.Call _call = createCall();<NEW_LINE>_call.setOperation(_operations[25]);<NEW_LINE>_call.setUseSOAPAction(true);<NEW_LINE>_call.setSOAPActionURI("");<NEW_LINE>_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);<NEW_LINE>_call.setOperationName(new javax.xml.namespace<MASK><NEW_LINE>setRequestHeaders(_call);<NEW_LINE>setAttachments(_call);<NEW_LINE>try {<NEW_LINE>java.lang.Object _resp = _call.invoke(new java.lang.Object[] { in0, in1, in2 });<NEW_LINE>if (_resp instanceof java.rmi.RemoteException) {<NEW_LINE>throw (java.rmi.RemoteException) _resp;<NEW_LINE>}<NEW_LINE>extractAttachments(_call);<NEW_LINE>} catch (org.apache.axis.AxisFault axisFaultException) {<NEW_LINE>if (axisFaultException.detail != null) {<NEW_LINE>if (axisFaultException.detail instanceof java.rmi.RemoteException) {<NEW_LINE>throw (java.rmi.RemoteException) axisFaultException.detail;<NEW_LINE>}<NEW_LINE>if (axisFaultException.detail instanceof com.atlassian.jira.rpc.exception.RemoteException) {<NEW_LINE>throw (com.atlassian.jira.rpc.exception.RemoteException) axisFaultException.detail;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw axisFaultException;<NEW_LINE>}<NEW_LINE>}
.QName("http://soap.rpc.jira.atlassian.com", "removeAllRoleActorsByNameAndType"));
185,782
// Code adapted from HTSJDK's BlockCompressedInputStream class<NEW_LINE>private BGZFBlockMetadata processNextBlock(InputStream stream, String streamSource) throws IOException {<NEW_LINE>final byte[] buffer <MASK><NEW_LINE>long blockAddress = streamOffset;<NEW_LINE>final int headerByteCount = readBytes(stream, buffer, 0, BlockCompressedStreamConstants.BLOCK_HEADER_LENGTH);<NEW_LINE>// Return null when we hit EOF<NEW_LINE>if (headerByteCount <= 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (headerByteCount != BlockCompressedStreamConstants.BLOCK_HEADER_LENGTH) {<NEW_LINE>throw new IOException("Incorrect header size for file: " + streamSource);<NEW_LINE>}<NEW_LINE>streamOffset += headerByteCount;<NEW_LINE>final int blockLength = unpackInt16(buffer, BlockCompressedStreamConstants.BLOCK_LENGTH_OFFSET) + 1;<NEW_LINE>if (blockLength < BlockCompressedStreamConstants.BLOCK_HEADER_LENGTH || blockLength > buffer.length) {<NEW_LINE>throw new IOException("Unexpected compressed block length: " + blockLength + " for " + streamSource);<NEW_LINE>}<NEW_LINE>final int remaining = blockLength - BlockCompressedStreamConstants.BLOCK_HEADER_LENGTH;<NEW_LINE>final int dataByteCount = readBytes(stream, buffer, BlockCompressedStreamConstants.BLOCK_HEADER_LENGTH, remaining);<NEW_LINE>if (dataByteCount != remaining) {<NEW_LINE>throw new IOException("Premature end of file: " + streamSource);<NEW_LINE>}<NEW_LINE>streamOffset += dataByteCount;<NEW_LINE>final int uncompressedLength = unpackInt32(buffer, blockLength - 4);<NEW_LINE>if (uncompressedLength < 0) {<NEW_LINE>throw new IOException(streamSource + " has invalid uncompressed length: " + uncompressedLength);<NEW_LINE>}<NEW_LINE>return new BGZFBlockMetadata(blockAddress, blockLength, uncompressedLength);<NEW_LINE>}
= new byte[BlockCompressedStreamConstants.MAX_COMPRESSED_BLOCK_SIZE];
918,145
private String decrypt(String text) throws DingTalkEncryptException {<NEW_LINE>byte[] originalArr;<NEW_LINE>byte[] networkOrder;<NEW_LINE>try {<NEW_LINE>Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");<NEW_LINE>SecretKeySpec keySpec = new SecretKeySpec(this.aesKey, "AES");<NEW_LINE>IvParameterSpec iv = new IvParameterSpec(Arrays.copyOfRange(this.aesKey, 0, 16));<NEW_LINE>cipher.init(2, keySpec, iv);<NEW_LINE>networkOrder = Base64.decodeBase64(text);<NEW_LINE><MASK><NEW_LINE>} catch (Exception var9) {<NEW_LINE>throw new DingTalkEncryptException(900008);<NEW_LINE>}<NEW_LINE>String plainText;<NEW_LINE>String fromCorpid;<NEW_LINE>try {<NEW_LINE>byte[] bytes = PKCS7Padding.removePaddingBytes(originalArr);<NEW_LINE>networkOrder = Arrays.copyOfRange(bytes, 16, 20);<NEW_LINE>int plainTextLegth = Utils.bytes2int(networkOrder);<NEW_LINE>plainText = new String(Arrays.copyOfRange(bytes, 20, 20 + plainTextLegth), CHARSET);<NEW_LINE>fromCorpid = new String(Arrays.copyOfRange(bytes, 20 + plainTextLegth, bytes.length), CHARSET);<NEW_LINE>} catch (Exception var8) {<NEW_LINE>throw new DingTalkEncryptException(900009);<NEW_LINE>}<NEW_LINE>if (!fromCorpid.equals(this.corpId)) {<NEW_LINE>throw new DingTalkEncryptException(900010);<NEW_LINE>} else {<NEW_LINE>return plainText;<NEW_LINE>}<NEW_LINE>}
originalArr = cipher.doFinal(networkOrder);
197,984
protected void executeTasksOnWorker(Id server) {<NEW_LINE>String page = this.supportsPaging() ? PageInfo.PAGE_NONE : null;<NEW_LINE>do {<NEW_LINE>Iterator<HugeTask<Object>> tasks = this.tasks(TaskStatus.SCHEDULED, PAGE_SIZE, page);<NEW_LINE>while (tasks.hasNext()) {<NEW_LINE>HugeTask<?> task = tasks.next();<NEW_LINE>this.initTaskCallable(task);<NEW_LINE><MASK><NEW_LINE>if (taskServer == null) {<NEW_LINE>LOG.warn("Task '{}' may not be scheduled", task.id());<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>HugeTask<?> memTask = this.tasks.get(task.id());<NEW_LINE>if (memTask != null) {<NEW_LINE>assert memTask.status().code() > task.status().code();<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (taskServer.equals(server)) {<NEW_LINE>task.status(TaskStatus.QUEUED);<NEW_LINE>this.save(task);<NEW_LINE>this.submitTask(task);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (page != null) {<NEW_LINE>page = PageInfo.pageInfo(tasks);<NEW_LINE>}<NEW_LINE>} while (page != null);<NEW_LINE>}
Id taskServer = task.server();
663,543
public static InFlightShardSnapshotStates forEntries(List<SnapshotsInProgress.Entry> snapshots) {<NEW_LINE>if (snapshots.isEmpty()) {<NEW_LINE>return EMPTY;<NEW_LINE>}<NEW_LINE>final Map<String, Map<Integer, ShardGeneration>> generations = new HashMap<>();<NEW_LINE>final Map<String, Set<Integer>> busyIds = new HashMap<>();<NEW_LINE>assert snapshots.stream().map(SnapshotsInProgress.Entry::repository).distinct().count() == 1 : "snapshots must either be an empty list or all belong to the same repository but saw " + snapshots;<NEW_LINE>for (SnapshotsInProgress.Entry runningSnapshot : snapshots) {<NEW_LINE>for (Map.Entry<RepositoryShardId, SnapshotsInProgress.ShardSnapshotStatus> shard : runningSnapshot.shardsByRepoShardId().entrySet()) {<NEW_LINE>final RepositoryShardId sid = shard.getKey();<NEW_LINE>addStateInformation(generations, busyIds, shard.getValue(), sid.shardId(), sid.indexName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}
return new InFlightShardSnapshotStates(generations, busyIds);
1,608,900
public static Varnode findVarnode(PcodeSyntaxTree fd, Address addr, long h) {<NEW_LINE>DynamicHash dhash = new DynamicHash();<NEW_LINE>int method = getMethodFromHash(h);<NEW_LINE>int total = getTotalFromHash(h);<NEW_LINE>int pos = getPositionFromHash(h);<NEW_LINE>h = clearTotalPosition(h);<NEW_LINE>ArrayList<Varnode> vnlist = new ArrayList<>();<NEW_LINE>ArrayList<Varnode> vnlist2 = new ArrayList<>();<NEW_LINE>gatherFirstLevelVars(<MASK><NEW_LINE>for (int i = 0; i < vnlist.size(); ++i) {<NEW_LINE>Varnode tmpvn = vnlist.get(i);<NEW_LINE>dhash.clear();<NEW_LINE>dhash.calcHash(tmpvn, method);<NEW_LINE>if (dhash.getHash() == h) {<NEW_LINE>vnlist2.add(tmpvn);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (total != vnlist2.size()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return vnlist2.get(pos);<NEW_LINE>}
vnlist, fd, addr, h);
1,435,539
public void handleApplicationCommandRequest(SerialMessage serialMessage, int offset, int endpoint) {<NEW_LINE>logger.debug("NODE {}: Received Switch Multi Level Request", this.<MASK><NEW_LINE>int command = serialMessage.getMessagePayloadByte(offset);<NEW_LINE>switch(command) {<NEW_LINE>case SWITCH_MULTILEVEL_SET:<NEW_LINE>case SWITCH_MULTILEVEL_GET:<NEW_LINE>case SWITCH_MULTILEVEL_SUPPORTED_GET:<NEW_LINE>case SWITCH_MULTILEVEL_SUPPORTED_REPORT:<NEW_LINE>logger.warn("Command {} not implemented.", command);<NEW_LINE>case SWITCH_MULTILEVEL_START_LEVEL_CHANGE:<NEW_LINE>return;<NEW_LINE>case SWITCH_MULTILEVEL_STOP_LEVEL_CHANGE:<NEW_LINE>logger.debug("NODE {}: Process Switch Multi Level Stop Level Change", this.getNode().getNodeId());<NEW_LINE>// request level after dimming<NEW_LINE>logger.debug("NODE {}: Requesting level from endpoint {}", this.getNode().getNodeId(), endpoint);<NEW_LINE>this.getController().sendData(this.getNode().encapsulate(this.getValueMessage(), this, endpoint));<NEW_LINE>break;<NEW_LINE>case SWITCH_MULTILEVEL_REPORT:<NEW_LINE>logger.trace("Process Switch Multi Level Report");<NEW_LINE>int value = serialMessage.getMessagePayloadByte(offset + 1);<NEW_LINE>logger.debug("NODE {}: Switch Multi Level report, value = {}", this.getNode().getNodeId(), value);<NEW_LINE>ZWaveCommandClassValueEvent zEvent = new ZWaveCommandClassValueEvent(this.getNode().getNodeId(), endpoint, this.getCommandClass(), value);<NEW_LINE>this.getController().notifyEventListeners(zEvent);<NEW_LINE>dynamicDone = true;<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>logger.warn(String.format("Unsupported Command 0x%02X for command class %s (0x%02X).", command, this.getCommandClass().getLabel(), this.getCommandClass().getKey()));<NEW_LINE>}<NEW_LINE>}
getNode().getNodeId());
73,733
public void decodeComplete(final CodecPage codecPage, final BitmapRef bitmap, final Rect bitmapBounds, final RectF croppedPageBounds) {<NEW_LINE>try {<NEW_LINE>if (bitmap == null || bitmapBounds == null) {<NEW_LINE>page.base.getActivity().runOnUiThread(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>stopDecodingThisNode(null);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Bitmaps bitmaps = holder.reuse(fullId, bitmap, bitmapBounds);<NEW_LINE>final Runnable r = new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>// long t0 = System.currentTimeMillis();<NEW_LINE>holder.setBitmap(bitmaps);<NEW_LINE>stopDecodingThisNode(null);<NEW_LINE>final IViewController dc <MASK><NEW_LINE>if (dc instanceof AbstractViewController) {<NEW_LINE>EventPool.newEventChildLoaded((AbstractViewController) dc, PageTreeNode.this, bitmapBounds).process();<NEW_LINE>}<NEW_LINE>// System.out.println("decodeComplete(): " + (System.currentTimeMillis() - t0) + " ms");<NEW_LINE>}<NEW_LINE>};<NEW_LINE>page.base.getActivity().runOnUiThread(r);<NEW_LINE>} catch (final OutOfMemoryError ex) {<NEW_LINE>ex.printStackTrace();<NEW_LINE>// BitmapManager.clear("PageTreeNode OutOfMemoryError: ");<NEW_LINE>page.base.getActivity().runOnUiThread(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>stopDecodingThisNode(null);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} finally {<NEW_LINE>BitmapManager.release(bitmap);<NEW_LINE>}<NEW_LINE>}
= page.base.getDocumentController();
650,920
public Request<DescribeEventsRequest> marshall(DescribeEventsRequest describeEventsRequest) {<NEW_LINE>if (describeEventsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DescribeEventsRequest> request = new DefaultRequest<DescribeEventsRequest>(describeEventsRequest, "AmazonElastiCache");<NEW_LINE>request.addParameter("Action", "DescribeEvents");<NEW_LINE>request.addParameter("Version", "2015-02-02");<NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>if (describeEventsRequest.getSourceIdentifier() != null) {<NEW_LINE>request.addParameter("SourceIdentifier", StringUtils.fromString(describeEventsRequest.getSourceIdentifier()));<NEW_LINE>}<NEW_LINE>if (describeEventsRequest.getSourceType() != null) {<NEW_LINE>request.addParameter("SourceType", StringUtils.fromString(describeEventsRequest.getSourceType()));<NEW_LINE>}<NEW_LINE>if (describeEventsRequest.getStartTime() != null) {<NEW_LINE>request.addParameter("StartTime", StringUtils.fromDate(describeEventsRequest.getStartTime()));<NEW_LINE>}<NEW_LINE>if (describeEventsRequest.getEndTime() != null) {<NEW_LINE>request.addParameter("EndTime", StringUtils.fromDate<MASK><NEW_LINE>}<NEW_LINE>if (describeEventsRequest.getDuration() != null) {<NEW_LINE>request.addParameter("Duration", StringUtils.fromInteger(describeEventsRequest.getDuration()));<NEW_LINE>}<NEW_LINE>if (describeEventsRequest.getMaxRecords() != null) {<NEW_LINE>request.addParameter("MaxRecords", StringUtils.fromInteger(describeEventsRequest.getMaxRecords()));<NEW_LINE>}<NEW_LINE>if (describeEventsRequest.getMarker() != null) {<NEW_LINE>request.addParameter("Marker", StringUtils.fromString(describeEventsRequest.getMarker()));<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
(describeEventsRequest.getEndTime()));
826,365
public StepTimeline unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>StepTimeline stepTimeline = new StepTimeline();<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>if (context.testExpression("CreationDateTime", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>stepTimeline.setCreationDateTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("StartDateTime", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>stepTimeline.setStartDateTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("EndDateTime", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>stepTimeline.setEndDateTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").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 stepTimeline;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
968,240
public static void main(String[] args) {<NEW_LINE>// First example: Reverse op. This op reverses the values along a specified dimension<NEW_LINE>// c++ code: https://github.com/eclipse/deeplearning4j/blob/master/libnd4j/include/ops/declarable/generic/transforms/reverse.cpp<NEW_LINE>INDArray input = Nd4j.linspace(1, 50, 50).reshape(5, 10);<NEW_LINE>INDArray output = Nd4j.create(input.shape());<NEW_LINE>CustomOp op = // Reverse along dimension 0<NEW_LINE>DynamicCustomOp.builder("reverse").addInputs(input).addOutputs(output).// Reverse along dimension 0<NEW_LINE>addIntegerArguments(0).build();<NEW_LINE>Nd4j.getExecutioner().exec(op);<NEW_LINE>System.out.println(input);<NEW_LINE>System.out.println();<NEW_LINE>System.out.println(output);<NEW_LINE>System.out.println("-------------");<NEW_LINE>// Another example: meshgrid<NEW_LINE>// c++ code: https://github.com/eclipse/deeplearning4j/blob/master/libnd4j/include/ops/declarable/generic/broadcastable/meshgrid.cpp<NEW_LINE>INDArray input1 = Nd4j.linspace(0, 1, 4);<NEW_LINE>INDArray input2 = Nd4j.linspace(0, 1, 5);<NEW_LINE>INDArray output1 = Nd4j.create(5, 4);<NEW_LINE>INDArray output2 = Nd4j.create(5, 4);<NEW_LINE>op = DynamicCustomOp.builder("meshgrid").addInputs(input1, input2).addOutputs(<MASK><NEW_LINE>Nd4j.getExecutioner().exec(op);<NEW_LINE>System.out.println(output1 + "\n\n" + output2);<NEW_LINE>}
output1, output2).build();
1,503,993
private void cleanParameterAnnotationsAttribute(Clazz clazz, Member member, ParameterAnnotationsAttribute attribute, String attributeName) {<NEW_LINE>// Delete marked annotations.<NEW_LINE>ParameterAnnotationsAttributeEditor annotationsAttributeEditor = new ParameterAnnotationsAttributeEditor(attribute);<NEW_LINE>boolean allEmpty = true;<NEW_LINE>for (int parameterIndex = 0; parameterIndex < attribute.u1parametersCount; parameterIndex++) {<NEW_LINE>int <MASK><NEW_LINE>Annotation[] annotations = attribute.parameterAnnotations[parameterIndex];<NEW_LINE>for (int annotationIndex = 0; annotationIndex < annotationsCount; annotationIndex++) {<NEW_LINE>Annotation annotation = annotations[annotationIndex];<NEW_LINE>if (annotation.getVisitorInfo() == mark) {<NEW_LINE>annotationsAttributeEditor.deleteAnnotation(parameterIndex, annotationIndex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (attribute.u2parameterAnnotationsCount[parameterIndex] != 0) {<NEW_LINE>allEmpty = false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Delete attribute if all parameters have no annotations left.<NEW_LINE>if (allEmpty) {<NEW_LINE>AttributesEditor attributesEditor = new AttributesEditor((ProgramClass) clazz, (ProgramMember) member, false);<NEW_LINE>attributesEditor.deleteAttribute(attributeName);<NEW_LINE>}<NEW_LINE>}
annotationsCount = attribute.u2parameterAnnotationsCount[parameterIndex];
1,794,989
final ListAvailableManagementCidrRangesResult executeListAvailableManagementCidrRanges(ListAvailableManagementCidrRangesRequest listAvailableManagementCidrRangesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listAvailableManagementCidrRangesRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListAvailableManagementCidrRangesRequest> request = null;<NEW_LINE>Response<ListAvailableManagementCidrRangesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListAvailableManagementCidrRangesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listAvailableManagementCidrRangesRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "WorkSpaces");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAvailableManagementCidrRanges");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListAvailableManagementCidrRangesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListAvailableManagementCidrRangesResultJsonUnmarshaller());<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,021,292
public void configure(TestElement el) {<NEW_LINE>super.configure(el);<NEW_LINE>if (!(el instanceof JMSSampler)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>JMSSampler sampler = (JMSSampler) el;<NEW_LINE>queueConnectionFactory.setText(sampler.getQueueConnectionFactory());<NEW_LINE>sendQueue.setText(sampler.getSendQueue());<NEW_LINE>receiveQueue.setText(sampler.getReceiveQueue());<NEW_LINE>@SuppressWarnings("deprecation")<NEW_LINE>String isOneWay = JMSSampler.IS_ONE_WAY;<NEW_LINE>// NOSONAR<NEW_LINE>JMeterProperty oneWay = el.getProperty(isOneWay);<NEW_LINE>if (oneWay instanceof NullProperty) {<NEW_LINE>jmsCommunicationStyle.setSelectedIndex(el.getPropertyAsInt(JMSSampler.JMS_COMMUNICATION_STYLE));<NEW_LINE>} else {<NEW_LINE>jmsCommunicationStyle.setSelectedIndex(((BooleanProperty) oneWay).getBooleanValue() ? JMSSampler.COMMUNICATION_STYLE.ONE_WAY.getValue() : JMSSampler.COMMUNICATION_STYLE.REQUEST_REPLY.getValue());<NEW_LINE>}<NEW_LINE>useNonPersistentDelivery.setSelected(sampler.isNonPersistent());<NEW_LINE>useReqMsgIdAsCorrelId.setSelected(sampler.isUseReqMsgIdAsCorrelId());<NEW_LINE>useResMsgIdAsCorrelId.setSelected(sampler.isUseResMsgIdAsCorrelId());<NEW_LINE>timeout.setText(sampler.getTimeout());<NEW_LINE>expiration.setText(sampler.getExpiration());<NEW_LINE>priority.setText(sampler.getPriority());<NEW_LINE>jmsSelector.setText(sampler.getJMSSelector());<NEW_LINE>numberOfSamplesToAggregate.setText(sampler.getNumberOfSamplesToAggregate());<NEW_LINE>messageContent.<MASK><NEW_LINE>initialContextFactory.setText(sampler.getInitialContextFactory());<NEW_LINE>providerUrl.setText(sampler.getContextProvider());<NEW_LINE>jmsPropertiesPanel.configure(sampler.getJMSProperties());<NEW_LINE>jndiPropertiesPanel.configure(sampler.getJNDIProperties());<NEW_LINE>}
setInitialText(sampler.getContent());
982,879
public void scan(UploadedFile file) {<NEW_LINE>try {<NEW_LINE>final ClamDaemonClient client = this.getClamAvClient();<NEW_LINE>final InputStream inputStream = new ByteArrayInputStream(file.getContent());<NEW_LINE>final byte[] <MASK><NEW_LINE>final String message = new String(reply, StandardCharsets.US_ASCII).trim();<NEW_LINE>if (LOGGER.isLoggable(Level.INFO)) {<NEW_LINE>LOGGER.log(Level.INFO, "Scanner replied with message:" + message);<NEW_LINE>}<NEW_LINE>if (!ClamDaemonClient.isCleanReply(reply)) {<NEW_LINE>String error = createErrorMessage(file, message);<NEW_LINE>if (LOGGER.isLoggable(Level.WARNING)) {<NEW_LINE>LOGGER.log(Level.WARNING, "ClamAV Error:" + error);<NEW_LINE>}<NEW_LINE>throw new VirusException(error);<NEW_LINE>}<NEW_LINE>} catch (final VirusException ex) {<NEW_LINE>throw ex;<NEW_LINE>} catch (final RuntimeException | IOException ex) {<NEW_LINE>final String error = String.format("Unexpected error scanning file - %s", ex.getMessage());<NEW_LINE>throw new VirusException(error);<NEW_LINE>}<NEW_LINE>}
reply = client.scan(inputStream);
1,029,585
public void fetchAvatar(Account account, final Avatar avatar, final UiCallback<Avatar> callback) {<NEW_LINE>final String KEY = generateFetchKey(account, avatar);<NEW_LINE>synchronized (this.mInProgressAvatarFetches) {<NEW_LINE>if (mInProgressAvatarFetches.add(KEY)) {<NEW_LINE>switch(avatar.origin) {<NEW_LINE>case PEP:<NEW_LINE>this.mInProgressAvatarFetches.add(KEY);<NEW_LINE>fetchAvatarPep(account, avatar, callback);<NEW_LINE>break;<NEW_LINE>case VCARD:<NEW_LINE><MASK><NEW_LINE>fetchAvatarVcard(account, avatar, callback);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>} else if (avatar.origin == Avatar.Origin.PEP) {<NEW_LINE>mOmittedPepAvatarFetches.add(KEY);<NEW_LINE>} else {<NEW_LINE>Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": already fetching " + avatar.origin + " avatar for " + avatar.owner);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
this.mInProgressAvatarFetches.add(KEY);
565,826
public void onClientDisconnect(SessionDisconnectEvent event) {<NEW_LINE>final String simpSessionId = (String) event.getMessage().getHeaders().get("simpSessionId");<NEW_LINE>if (connectedSessionIds.contains(simpSessionId)) {<NEW_LINE>logger.debug(<MASK><NEW_LINE>connectedSessionIds.remove(simpSessionId);<NEW_LINE>if (connectedSessionIds.isEmpty()) {<NEW_LINE>if (scheduledFuture != null) {<NEW_LINE>logger.debug(LoggingMarkers.DOWNLOADER_STATUS_UPDATE, "Cancelling update schedule because no connections left");<NEW_LINE>scheduledFuture.cancel(true);<NEW_LINE>scheduledFuture = null;<NEW_LINE>} else {<NEW_LINE>logger.debug(LoggingMarkers.DOWNLOADER_STATUS_UPDATE, "No connections found but update was also not scheduled");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>logger.debug(LoggingMarkers.DOWNLOADER_STATUS_UPDATE, "Not cancelling schedule because still connections left");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
LoggingMarkers.DOWNLOADER_STATUS_UPDATE, "Registered disconnect with session ID {}", simpSessionId);
515,788
public void querySourceFeatures(String callbackID, @Nullable Expression filter) {<NEW_LINE>if (mSource == null) {<NEW_LINE>WritableMap payload = new WritableNativeMap();<NEW_LINE>payload.putString("error", "source is not yet loaded");<NEW_LINE>AndroidCallbackEvent event = new AndroidCallbackEvent(this, callbackID, payload);<NEW_LINE>mManager.handleEvent(event);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>RCTMGLShapeSource _this = this;<NEW_LINE>mMap.querySourceFeatures(mID, new // v10todo<NEW_LINE>SourceQueryOptions(null, filter), new QueryFeaturesCallback() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run(@NonNull Expected<String, List<QueriedFeature>> features) {<NEW_LINE>if (features.isError()) {<NEW_LINE>Logger.e("RCTMGLShapeSource", String.format("Error: %s", features.getError()));<NEW_LINE>} else {<NEW_LINE>WritableMap payload = new WritableNativeMap();<NEW_LINE>List<Feature> result = new ArrayList<>(features.getValue().size());<NEW_LINE>for (QueriedFeature i : features.getValue()) {<NEW_LINE>result.<MASK><NEW_LINE>}<NEW_LINE>payload.putString("data", FeatureCollection.fromFeatures(result).toJson());<NEW_LINE>AndroidCallbackEvent event = new AndroidCallbackEvent(_this, callbackID, payload);<NEW_LINE>mManager.handleEvent(event);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
add(i.getFeature());
656,687
private void init() {<NEW_LINE>this.setLayout(new BorderLayout());<NEW_LINE>// HEADER<NEW_LINE>Box boxV = Box.createVerticalBox();<NEW_LINE>// DIALS/HTML+Bars<NEW_LINE>Box boxH = Box.createHorizontalBox();<NEW_LINE>// DIALS<NEW_LINE>Box boxV1 = Box.createVerticalBox();<NEW_LINE>// HTML/Bars<NEW_LINE>Box boxV2 = Box.createVerticalBox();<NEW_LINE>// barChart<NEW_LINE>Box boxH1 = Box.createHorizontalBox();<NEW_LINE>// boxH_V.setPreferredSize(new Dimension(180, 1500));<NEW_LINE>// boxH1.setPreferredSize(new Dimension(400, 180));<NEW_LINE>boxV2.setPreferredSize(new Dimension(120, 120));<NEW_LINE>// DIALS below HEADER, LEFT<NEW_LINE>for (int i = 0; i < m_goals.length; i++) {<NEW_LINE>PerformanceIndicator pi = new PerformanceIndicator(m_goals[i]);<NEW_LINE>pi.addActionListener(this);<NEW_LINE>boxV1.add(pi, BorderLayout.NORTH);<NEW_LINE>}<NEW_LINE>boxV1.add(Box.createVerticalGlue(), BorderLayout.CENTER);<NEW_LINE>JScrollPane scrollPane = new JScrollPane();<NEW_LINE>scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);<NEW_LINE>scrollPane.getViewport().add(boxV1, BorderLayout.CENTER);<NEW_LINE>scrollPane.setMinimumSize(new Dimension(190, 180));<NEW_LINE>// RIGHT, HTML + Bars<NEW_LINE>HtmlDashboard contentHtml = new HtmlDashboard("http:///local/home", m_goals, true);<NEW_LINE>boxV2.add(contentHtml, BorderLayout.CENTER);<NEW_LINE>for (int i = 0; i < java.lang.Math.min(2, m_goals.length); i++) {<NEW_LINE>if (// MGoal goal = pi.getGoal();<NEW_LINE>m_goals[i].getMeasure() != null || m_goals[i].getAD_Chart_ID() > 0)<NEW_LINE>boxH1.add(new Graph(m_goals[i]), BorderLayout.SOUTH);<NEW_LINE>}<NEW_LINE>boxV2.add(boxH1, BorderLayout.SOUTH);<NEW_LINE>// below HEADER<NEW_LINE>boxH.add(scrollPane, BorderLayout.WEST);<NEW_LINE>// space<NEW_LINE>boxH.add(Box.createHorizontalStrut(5));<NEW_LINE>boxH.<MASK><NEW_LINE>// HEADER + below<NEW_LINE>HtmlDashboard t = new HtmlDashboard("http:///local/logo", null, false);<NEW_LINE>t.setMaximumSize(new Dimension(2000, 80));<NEW_LINE>// t.setPreferredSize(new Dimension(200,10));<NEW_LINE>// t.setMaximumSize(new Dimension(2000,10));<NEW_LINE>boxV.add(t, BorderLayout.NORTH);<NEW_LINE>// space<NEW_LINE>boxV.add(Box.createVerticalStrut(5));<NEW_LINE>boxV.add(boxH, BorderLayout.CENTER);<NEW_LINE>boxV.add(Box.createVerticalGlue());<NEW_LINE>// WINDOW<NEW_LINE>add(boxV, BorderLayout.CENTER);<NEW_LINE>}
add(boxV2, BorderLayout.CENTER);
573,461
public Request<GetCallAnalyticsJobRequest> marshall(GetCallAnalyticsJobRequest getCallAnalyticsJobRequest) {<NEW_LINE>if (getCallAnalyticsJobRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(GetCallAnalyticsJobRequest)");<NEW_LINE>}<NEW_LINE>Request<GetCallAnalyticsJobRequest> request = new DefaultRequest<GetCallAnalyticsJobRequest>(getCallAnalyticsJobRequest, "AmazonTranscribe");<NEW_LINE>String target = "Transcribe.GetCallAnalyticsJob";<NEW_LINE><MASK><NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>String uriResourcePath = "/";<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>try {<NEW_LINE>StringWriter stringWriter = new StringWriter();<NEW_LINE>AwsJsonWriter jsonWriter = JsonUtils.getJsonWriter(stringWriter);<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (getCallAnalyticsJobRequest.getCallAnalyticsJobName() != null) {<NEW_LINE>String callAnalyticsJobName = getCallAnalyticsJobRequest.getCallAnalyticsJobName();<NEW_LINE>jsonWriter.name("CallAnalyticsJobName");<NEW_LINE>jsonWriter.value(callAnalyticsJobName);<NEW_LINE>}<NEW_LINE>jsonWriter.endObject();<NEW_LINE>jsonWriter.close();<NEW_LINE>String snippet = stringWriter.toString();<NEW_LINE>byte[] content = snippet.getBytes(UTF8);<NEW_LINE>request.setContent(new StringInputStream(snippet));<NEW_LINE>request.addHeader("Content-Length", Integer.toString(content.length));<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t);<NEW_LINE>}<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE>request.addHeader("Content-Type", "application/x-amz-json-1.1");<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
request.addHeader("X-Amz-Target", target);
1,026,637
private void initDatabases() throws Exception {<NEW_LINE>Properties p = new Properties();<NEW_LINE>FileInputStream fis = new FileInputStream("sources.properties");<NEW_LINE>p.load(fis);<NEW_LINE>fis.close();<NEW_LINE>fis = null;<NEW_LINE>Iterator<Map.Entry<Object, Object>> iterator = p<MASK><NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>Map.Entry<Object, Object> next = iterator.next();<NEW_LINE>String source = (String) next.getKey();<NEW_LINE>String filename = (String) next.getValue();<NEW_LINE>File db = new File(filename);<NEW_LINE>if (!db.exists()) {<NEW_LINE>throw new FileNotFoundException("can't find the db " + filename + " current dir is " + new File(".").getAbsolutePath());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Connection conn1 = DriverManager.getConnection("jdbc:sqlite:" + filename);<NEW_LINE>Statement stat = conn1.createStatement();<NEW_LINE>stat.executeUpdate("CREATE TABLE IF NOT EXISTS tiles (key INTEGER PRIMARY KEY, provider TEXT, tile BLOB)");<NEW_LINE>stat.close();<NEW_LINE>System.out.println("adding " + source + " from file " + filename);<NEW_LINE>connections.put(source, conn1);<NEW_LINE>} catch (SQLException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>// throw new Exception("unable to initialize db", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.entrySet().iterator();
278,921
public void writeDataset(JRDataset dataset) throws IOException {<NEW_LINE>writer.startElement(JRXmlConstants.ELEMENT_subDataset, getNamespace());<NEW_LINE>writer.addEncodedAttribute(JRXmlConstants.ATTRIBUTE_name, dataset.getName());<NEW_LINE>writer.addAttribute(JRXmlConstants.<MASK><NEW_LINE>writer.addEncodedAttribute(JRXmlConstants.ATTRIBUTE_resourceBundle, dataset.getResourceBundle());<NEW_LINE>writer.addAttribute(JRXmlConstants.ATTRIBUTE_whenResourceMissingType, dataset.getWhenResourceMissingTypeValue(), WhenResourceMissingTypeEnum.NULL);<NEW_LINE>if (isNewerVersionOrEqual(JRConstants.VERSION_4_6_0) && !isExcludeUuids()) {<NEW_LINE>writer.addAttribute(JRXmlConstants.ATTRIBUTE_uuid, dataset.getUUID().toString());<NEW_LINE>}<NEW_LINE>writeProperties(dataset);<NEW_LINE>if (isNewerVersionOrEqual(JRConstants.VERSION_6_3_1)) {<NEW_LINE>writePropertyExpressions(dataset.getPropertyExpressions());<NEW_LINE>}<NEW_LINE>writeDatasetContents(dataset);<NEW_LINE>writer.closeElement();<NEW_LINE>}
ATTRIBUTE_scriptletClass, dataset.getScriptletClass());
113,719
public CategoricalResults classify(DataPoint data) {<NEW_LINE>Vec x = data.getNumericalValues();<NEW_LINE>double pos_score = Wp.multiply(x).add(bp).max();<NEW_LINE>double neg_score = Wn.multiply(x).add(bn).max();<NEW_LINE>CategoricalResults cr = new CategoricalResults(2);<NEW_LINE>if (// ambigious case, lets go with larger magnitude<NEW_LINE>neg_score > 0 && pos_score > 0) {<NEW_LINE>if (neg_score > pos_score)<NEW_LINE>cr.setProb(0, 1.0);<NEW_LINE>else<NEW_LINE>cr.setProb(1, 1.0);<NEW_LINE>} else if (neg_score > 0)<NEW_LINE><MASK><NEW_LINE>else if (pos_score > 0)<NEW_LINE>cr.setProb(1, 1.0);<NEW_LINE>else if (// not actually how describes in paper, but its ambigious - so lets use larger to tie break<NEW_LINE>neg_score > pos_score)<NEW_LINE>// ambig b/c if no model claims ownership, we get a score of 0<NEW_LINE>cr.setProb(0, 1.0);<NEW_LINE>else<NEW_LINE>cr.setProb(1, 1.0);<NEW_LINE>return cr;<NEW_LINE>}
cr.setProb(0, 1.0);
469,524
public File resolve(String name, boolean isModule) {<NEW_LINE>// Strip off one NEWLINE and anything after it, if it is there<NEW_LINE>int n;<NEW_LINE>n = name.indexOf('\n');<NEW_LINE>if (n >= 0) {<NEW_LINE>// SZ Feb 20, 2009: the message adjusted to what is actually done<NEW_LINE>ToolIO.out.println("*** Warning: module name '" + name + "' contained NEWLINE; " + "Only the part before NEWLINE is considered.");<NEW_LINE>// Strip off the newline<NEW_LINE>name = name.substring(0, n);<NEW_LINE>}<NEW_LINE>String sourceFileName = null;<NEW_LINE>// SZ Feb 20, 2009:<NEW_LINE>// if the name is a name of the module<NEW_LINE>if (isModule) {<NEW_LINE>// SZ Feb 20, 2009:<NEW_LINE>// Make sure the file name ends with ".tla".<NEW_LINE>if (name.toLowerCase().endsWith(TLAConstants.Files.TLA_EXTENSION)) {<NEW_LINE>name = name.substring(0, (name.length() - TLAConstants.Files<MASK><NEW_LINE>}<NEW_LINE>sourceFileName = name + TLAConstants.Files.TLA_EXTENSION;<NEW_LINE>} else {<NEW_LINE>// SZ Feb 20, 2009: for other files<NEW_LINE>// leave the name untouched<NEW_LINE>sourceFileName = name;<NEW_LINE>}<NEW_LINE>// identify the library property<NEW_LINE>// extract substrings with getProperty("path.separator");<NEW_LINE>// repeat search for each substring until found.<NEW_LINE>// locate() the file corresponding to the sourceFileName<NEW_LINE>return locate(sourceFileName);<NEW_LINE>}
.TLA_EXTENSION.length()));
668,775
public IViewRow retrieveById(final ViewEvaluationCtx viewEvalCtx, final ViewId viewId, final DocumentId rowId) {<NEW_LINE>final SqlAndParams sqlAndParams = sqlViewSelect.selectById().viewEvalCtx(viewEvalCtx).viewId(viewId).rowId(rowId).build();<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>try {<NEW_LINE>final int limit = 2;<NEW_LINE>pstmt = DB.prepareStatement(sqlAndParams.getSql(), ITrx.TRXNAME_ThreadInherited);<NEW_LINE>pstmt.setMaxRows(limit);<NEW_LINE>DB.setParameters(pstmt, sqlAndParams.getSqlParams());<NEW_LINE>rs = pstmt.executeQuery();<NEW_LINE>final List<IViewRow> documents = loadViewRows(rs, viewEvalCtx, viewId, limit);<NEW_LINE>if (documents.isEmpty()) {<NEW_LINE>throw new EntityNotFoundException("No document found for rowId=" + rowId + " in viewId=" + viewId);<NEW_LINE>} else if (documents.size() > 1) {<NEW_LINE>logger.warn(<MASK><NEW_LINE>return documents.get(0);<NEW_LINE>} else {<NEW_LINE>return documents.get(0);<NEW_LINE>}<NEW_LINE>} catch (final SQLException | DBException e) {<NEW_LINE>throw DBException.wrapIfNeeded(e).setSqlIfAbsent(sqlAndParams.getSql(), sqlAndParams.getSqlParams());<NEW_LINE>} finally {<NEW_LINE>DB.close(rs, pstmt);<NEW_LINE>}<NEW_LINE>}
"More than one document found for rowId={} in {}. Returning only the first one from: {}", rowId, this, documents);
1,246,627
public void copy(TraceProgramView from, AddressRange fromRange, Program into, Address intoAddress, TaskMonitor monitor) throws Exception {<NEW_LINE>BookmarkManager intoBookmarks = into.getBookmarkManager();<NEW_LINE>Iterator<Bookmark> bit = from.getBookmarkManager().getBookmarksIterator(fromRange.getMinAddress(), true);<NEW_LINE>while (bit.hasNext()) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>Bookmark bm = bit.next();<NEW_LINE>if (bm.getAddress().compareTo(fromRange.getMaxAddress()) > 0) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>BookmarkType type = bm.getType();<NEW_LINE>long off = bm.getAddress().<MASK><NEW_LINE>Address dest = intoAddress.add(off);<NEW_LINE>BookmarkType destType = intoBookmarks.getBookmarkType(type.getTypeString());<NEW_LINE>if (destType == null) {<NEW_LINE>destType = intoBookmarks.defineType(type.getTypeString(), type.getIcon(), type.getMarkerColor(), type.getMarkerPriority());<NEW_LINE>}<NEW_LINE>intoBookmarks.setBookmark(dest, destType.getTypeString(), bm.getCategory(), bm.getComment());<NEW_LINE>}<NEW_LINE>}
subtract(fromRange.getMinAddress());
680,527
protected Object createSingletonInstance(Class<?> cls, ServletConfig sc) throws ServletException {<NEW_LINE>Constructor<?> c = ResourceUtils.findResourceConstructor(cls, false);<NEW_LINE>if (c == null) {<NEW_LINE>throw new ServletException("No valid constructor found for " + cls.getName());<NEW_LINE>}<NEW_LINE>boolean isDefault = c.getParameterTypes().length == 0;<NEW_LINE>if (!isDefault && (c.getParameterTypes().length != 1 || c.getParameterTypes()[0] != ServletConfig.class && c.getParameterTypes()[0] != ServletContext.class)) {<NEW_LINE>throw new ServletException("Resource classes with singleton scope can only have " + "ServletConfig or ServletContext instances injected through their constructors");<NEW_LINE>}<NEW_LINE>Object[] values = isDefault ? new Object[] {} : new Object[] { c.getParameterTypes()[0] == ServletConfig.class ? sc : sc.getServletContext() };<NEW_LINE>try {<NEW_LINE>Object instance = c.newInstance(values);<NEW_LINE>return instance;<NEW_LINE>} catch (InstantiationException ex) {<NEW_LINE>throw new ServletException("Resource class " + <MASK><NEW_LINE>} catch (IllegalAccessException ex) {<NEW_LINE>throw new ServletException("Resource class " + cls.getName() + " can not be instantiated due to IllegalAccessException");<NEW_LINE>} catch (InvocationTargetException ex) {<NEW_LINE>throw new ServletException("Resource class " + cls.getName() + " can not be instantiated due to InvocationTargetException");<NEW_LINE>}<NEW_LINE>}
cls.getName() + " can not be instantiated");
374,887
public void contributeParameters(Map<String, Object> parameters) throws JRException {<NEW_LINE>HibernateDataAdapter hbmDA = getHibernateDataAdapter();<NEW_LINE>if (hbmDA != null) {<NEW_LINE>ClassLoader oldThreadClassLoader = Thread.currentThread().getContextClassLoader();<NEW_LINE>try {<NEW_LINE>Thread.currentThread().setContextClassLoader(getClassLoader(oldThreadClassLoader));<NEW_LINE>Class<?> clazz = null;<NEW_LINE>if (!hbmDA.isUseAnnotation()) {<NEW_LINE>clazz = JRClassLoader.loadClassForRealName("org.hibernate.cfg.Configuration");<NEW_LINE>} else {<NEW_LINE>clazz = JRClassLoader.loadClassForRealName("org.hibernate.cfg.AnnotationConfiguration");<NEW_LINE>}<NEW_LINE>if (clazz != null) {<NEW_LINE>Object configure = clazz.getDeclaredConstructor().newInstance();<NEW_LINE>if (configure != null) {<NEW_LINE>String xmlFileName = hbmDA.getXMLFileName();<NEW_LINE>if (xmlFileName != null && !xmlFileName.isEmpty()) {<NEW_LINE>File file = new File(xmlFileName);<NEW_LINE>clazz.getMethod("configure", file.getClass()<MASK><NEW_LINE>} else {<NEW_LINE>clazz.getMethod("configure", new Class[] {}).invoke(configure, new Object[] {});<NEW_LINE>}<NEW_LINE>String pFileName = hbmDA.getPropertiesFileName();<NEW_LINE>if (pFileName != null && !pFileName.isEmpty()) {<NEW_LINE>Properties propHibernate = new Properties();<NEW_LINE>propHibernate.load(new FileInputStream(pFileName));<NEW_LINE>clazz.getMethod("setProperties", propHibernate.getClass()).invoke(configure, propHibernate);<NEW_LINE>}<NEW_LINE>Object bsf = clazz.getMethod("buildSessionFactory", new Class[] {}).invoke(configure, new Object[] {});<NEW_LINE>session = bsf.getClass().getMethod("openSession", new Class[] {}).invoke(bsf, new Object[] {});<NEW_LINE>session.getClass().getMethod("beginTransaction", new Class[] {}).invoke(session, new Object[] {});<NEW_LINE>parameters.put(JRHibernateQueryExecuterFactory.PARAMETER_HIBERNATE_SESSION, session);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (IOException | ClassNotFoundException | InstantiationException | IllegalAccessException | IllegalArgumentException | SecurityException | InvocationTargetException | NoSuchMethodException e) {<NEW_LINE>throw new JRException(e);<NEW_LINE>} finally {<NEW_LINE>Thread.currentThread().setContextClassLoader(oldThreadClassLoader);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
).invoke(configure, file);
1,616,739
private ResponseSpec fakeOuterNumberSerializeRequestCreation(BigDecimal body) throws WebClientResponseException {<NEW_LINE>Object postBody = body;<NEW_LINE>// create path and map variables<NEW_LINE>final Map<String, Object> pathParams = new HashMap<String, Object>();<NEW_LINE>final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();<NEW_LINE>final HttpHeaders headerParams = new HttpHeaders();<NEW_LINE>final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<String, String>();<NEW_LINE>final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "*/*" };<NEW_LINE>final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = { "application/json" };<NEW_LINE>final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>ParameterizedTypeReference<BigDecimal> localVarReturnType = new ParameterizedTypeReference<BigDecimal>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI("/fake/outer/number", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, <MASK><NEW_LINE>}
localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
1,201,461
private void applyTypeValues(Destination dest, Name type) {<NEW_LINE>if (Destination.TYPE_XYZ.equals(type)) {<NEW_LINE>leftTextField.setText(getDestCoordinate(dest.getLeft()));<NEW_LINE>topTextField.setText(getDestCoordinate(dest.getTop()));<NEW_LINE>zoomTextField.setText(getDestCoordinate<MASK><NEW_LINE>} else if (Destination.TYPE_FIT.equals(type)) {<NEW_LINE>// nothing to do<NEW_LINE>} else if (Destination.TYPE_FITH.equals(type)) {<NEW_LINE>// get top value<NEW_LINE>topTextField.setText(getDestCoordinate(dest.getTop()));<NEW_LINE>} else if (Destination.TYPE_FITV.equals(type)) {<NEW_LINE>// get left value<NEW_LINE>leftTextField.setText(getDestCoordinate(dest.getLeft()));<NEW_LINE>} else if (Destination.TYPE_FITR.equals(type)) {<NEW_LINE>// left, bottom right and top.<NEW_LINE>leftTextField.setText(getDestCoordinate(dest.getLeft()));<NEW_LINE>rightTextField.setText(getDestCoordinate(dest.getRight()));<NEW_LINE>topTextField.setText(getDestCoordinate(dest.getTop()));<NEW_LINE>bottomTextField.setText(getDestCoordinate(dest.getBottom()));<NEW_LINE>} else if (Destination.TYPE_FITB.equals(type)) {<NEW_LINE>// nothing to do.<NEW_LINE>} else if (Destination.TYPE_FITH.equals(type)) {<NEW_LINE>// get the top<NEW_LINE>topTextField.setText(getDestCoordinate(dest.getTop()));<NEW_LINE>} else if (Destination.TYPE_FITBV.equals(type)) {<NEW_LINE>// get the left<NEW_LINE>leftTextField.setText(getDestCoordinate(dest.getLeft()));<NEW_LINE>}<NEW_LINE>}
(dest.getZoom()));
1,589,903
private static void printData(PrintStream writer, String title, ResultTable results) {<NEW_LINE>writer.println("Report: " + title);<NEW_LINE>if (results.getRows() == null || results.getRows().isEmpty()) {<NEW_LINE>writer.println("No results Found.");<NEW_LINE>} else {<NEW_LINE>// Print column headers.<NEW_LINE>for (ColumnHeaders header : results.getColumnHeaders()) {<NEW_LINE>writer.printf(<MASK><NEW_LINE>}<NEW_LINE>writer.println();<NEW_LINE>// Print actual data.<NEW_LINE>for (List<Object> row : results.getRows()) {<NEW_LINE>for (int colNum = 0; colNum < results.getColumnHeaders().size(); colNum++) {<NEW_LINE>ColumnHeaders header = results.getColumnHeaders().get(colNum);<NEW_LINE>Object column = row.get(colNum);<NEW_LINE>if ("INTEGER".equals(header.getUnknownKeys().get("dataType"))) {<NEW_LINE>long l = ((BigDecimal) column).longValue();<NEW_LINE>writer.printf("%30d", l);<NEW_LINE>} else if ("FLOAT".equals(header.getUnknownKeys().get("dataType"))) {<NEW_LINE>writer.printf("%30f", column);<NEW_LINE>} else if ("STRING".equals(header.getUnknownKeys().get("dataType"))) {<NEW_LINE>writer.printf("%30s", column);<NEW_LINE>} else {<NEW_LINE>// default output.<NEW_LINE>writer.printf("%30s", column);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>writer.println();<NEW_LINE>}<NEW_LINE>writer.println();<NEW_LINE>}<NEW_LINE>}
"%30s", header.getName());
763,862
protected void onSaveInstanceState(@NonNull Bundle outState) {<NEW_LINE>// Log_OC.e(TAG, "onSaveInstanceState init" );<NEW_LINE>super.onSaveInstanceState(outState);<NEW_LINE>// / global state<NEW_LINE>outState.putLong(KEY_WAITING_FOR_OP_ID, mWaitingForOpId);<NEW_LINE>outState.putBoolean(KEY_IS_SSL_CONN, mServerInfo.mIsSslConn);<NEW_LINE>outState.putString(KEY_HOST_URL_TEXT, mServerInfo.mBaseUrl);<NEW_LINE>if (mServerInfo.mVersion != null) {<NEW_LINE>outState.putString(KEY_OC_VERSION, mServerInfo.mVersion.getVersion());<NEW_LINE>}<NEW_LINE>outState.putString(KEY_SERVER_AUTH_METHOD, mServerInfo.mAuthMethod.name());<NEW_LINE>// / authentication<NEW_LINE>outState.putBoolean(KEY_AUTH_IS_FIRST_ATTEMPT_TAG, mIsFirstAuthAttempt);<NEW_LINE>// / AsyncTask (User and password)<NEW_LINE>if (mAsyncTask != null) {<NEW_LINE>mAsyncTask.cancel(true);<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>outState.putBoolean(KEY_ASYNC_TASK_IN_PROGRESS, false);<NEW_LINE>}<NEW_LINE>mAsyncTask = null;<NEW_LINE>}
outState.putBoolean(KEY_ASYNC_TASK_IN_PROGRESS, true);
1,481,818
private static void prepareCSS(HTMLEditorKit editorKit) {<NEW_LINE>boolean newLayout = Registry.is("editor.new.mouse.hover.popups");<NEW_LINE>Color borderColor = newLayout ? UIUtil.getTooltipSeparatorColor() : ColorUtil.mix(DOCUMENTATION_COLOR, BORDER_COLOR, 0.5);<NEW_LINE>int leftPadding = newLayout ? 8 : 7;<NEW_LINE>int definitionTopPadding = newLayout ? 4 : 3;<NEW_LINE>int htmlBottomPadding = newLayout ? 8 : 5;<NEW_LINE>String editorFontName = StringUtil.escapeQuotes(EditorColorsManager.getInstance().getGlobalScheme().getEditorFontName());<NEW_LINE>editorKit.getStyleSheet().addRule("code {font-family:\"" + editorFontName + "\"}");<NEW_LINE>editorKit.getStyleSheet().addRule("pre {font-family:\"" + editorFontName + "\"}");<NEW_LINE>editorKit.getStyleSheet().addRule(".pre {font-family:\"" + editorFontName + "\"}");<NEW_LINE>editorKit.getStyleSheet().addRule("html { padding-bottom: " + htmlBottomPadding + "px; }");<NEW_LINE>editorKit.getStyleSheet().addRule("h1, h2, h3, h4, h5, h6 { margin-top: 0; padding-top: 1px; }");<NEW_LINE>editorKit.getStyleSheet().addRule("a { color: #" + ColorUtil.toHex<MASK><NEW_LINE>editorKit.getStyleSheet().addRule(".definition { padding: " + definitionTopPadding + "px 17px 1px " + leftPadding + "px; border-bottom: thin solid #" + ColorUtil.toHex(borderColor) + "; }");<NEW_LINE>editorKit.getStyleSheet().addRule(".definition-only { padding: " + definitionTopPadding + "px 17px 0 " + leftPadding + "px; }");<NEW_LINE>if (newLayout) {<NEW_LINE>editorKit.getStyleSheet().addRule(".definition-only pre { margin-bottom: 0 }");<NEW_LINE>}<NEW_LINE>editorKit.getStyleSheet().addRule(".content { padding: 5px 16px 0 " + leftPadding + "px; max-width: 100% }");<NEW_LINE>editorKit.getStyleSheet().addRule(".content-only { padding: 8px 16px 0 " + leftPadding + "px; max-width: 100% }");<NEW_LINE>editorKit.getStyleSheet().addRule(".bottom { padding: 3px 16px 0 " + leftPadding + "px; }");<NEW_LINE>editorKit.getStyleSheet().addRule(".bottom-no-content { padding: 5px 16px 0 " + leftPadding + "px; }");<NEW_LINE>editorKit.getStyleSheet().addRule("p { padding: 1px 0 2px 0; }");<NEW_LINE>editorKit.getStyleSheet().addRule("ol { padding: 0 16px 0 0; }");<NEW_LINE>editorKit.getStyleSheet().addRule("ul { padding: 0 16px 0 0; }");<NEW_LINE>editorKit.getStyleSheet().addRule("li { padding: 1px 0 2px 0; }");<NEW_LINE>editorKit.getStyleSheet().addRule(".grayed { color: #909090; display: inline;}");<NEW_LINE>editorKit.getStyleSheet().addRule(".centered { text-align: center}");<NEW_LINE>// sections table<NEW_LINE>editorKit.getStyleSheet().addRule(".sections { padding: 0 16px 0 " + leftPadding + "; border-spacing: 0; }");<NEW_LINE>editorKit.getStyleSheet().addRule("tr { margin: 0 0 0 0; padding: 0 0 0 0; }");<NEW_LINE>if (newLayout) {<NEW_LINE>editorKit.getStyleSheet().addRule("table p { padding-bottom: 0}");<NEW_LINE>editorKit.getStyleSheet().addRule("td { margin: 4px 0 0 0; padding: 0 0 0 0; }");<NEW_LINE>} else {<NEW_LINE>editorKit.getStyleSheet().addRule("td { margin: 2px 0 3.5px 0; padding: 0 0 0 0; }");<NEW_LINE>}<NEW_LINE>editorKit.getStyleSheet().addRule("th { text-align: left; }");<NEW_LINE>editorKit.getStyleSheet().addRule(".section { color: " + ColorUtil.toHtmlColor(SECTION_COLOR) + "; padding-right: 4px}");<NEW_LINE>}
(getLinkColor()) + "; text-decoration: none;}");
618,208
static void markupClassHeaderData(Program program, Symbol oatDataSymbol, Address address, OatHeader oatHeader, OatClass oatClassHeader, MessageLog log, TaskMonitor monitor) throws Exception {<NEW_LINE>SymbolTable symbolTable = program.getSymbolTable();<NEW_LINE>ReferenceManager referenceManager = program.getReferenceManager();<NEW_LINE>Listing listing = program.getListing();<NEW_LINE>listing.clearCodeUnits(address, address, false, monitor);<NEW_LINE>Data oatClassHeaderData = listing.createData(address, oatClassHeader.toDataType());<NEW_LINE>for (int j = 0; j < oatClassHeaderData.getNumComponents(); ++j) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>Data component = oatClassHeaderData.getComponent(j);<NEW_LINE>if (component.getFieldName().startsWith("methods_pointer_")) {<NEW_LINE>Data methodOffsetData = component.getComponent(0);<NEW_LINE>Scalar scalar = methodOffsetData.getScalar(0);<NEW_LINE>if (scalar.getUnsignedValue() == 0) {<NEW_LINE>// undefined address<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Address toAddr = oatDataSymbol.getAddress().add(scalar.getUnsignedValue());<NEW_LINE>toAddr = OatUtilities.adjustForThumbAsNeeded(oatHeader, program, toAddr, log);<NEW_LINE>referenceManager.addMemoryReference(component.getMinAddress(), toAddr, RefType.<MASK><NEW_LINE>symbolTable.addExternalEntryPoint(toAddr);<NEW_LINE>// Lays down quick header in listing right before the method<NEW_LINE>Address quickHeaderAddress = toAddr.subtract(OatQuickMethodHeaderFactory.getOatQuickMethodHeaderSize(oatHeader.getVersion()));<NEW_LINE>if (listing.isUndefined(quickHeaderAddress, quickHeaderAddress)) {<NEW_LINE>ByteProvider oqmhProvider = new MemoryByteProvider(program.getMemory(), quickHeaderAddress);<NEW_LINE>BinaryReader oqmhReader = new BinaryReader(oqmhProvider, !program.getLanguage().isBigEndian());<NEW_LINE>OatQuickMethodHeader quickHeader = OatQuickMethodHeaderFactory.getOatQuickMethodHeader(oqmhReader, oatHeader.getVersion());<NEW_LINE>DataType dataType = quickHeader.toDataType();<NEW_LINE>try {<NEW_LINE>listing.createData(quickHeaderAddress, dataType);<NEW_LINE>} catch (CodeUnitInsertionException e) {<NEW_LINE>log.appendMsg(e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
READ, SourceType.ANALYSIS, 0);
1,466,979
private String text(final boolean complete, final boolean close) {<NEW_LINE>StringBuilder buffer = new StringBuilder();<NEW_LINE>buffer.append(startDelimiter).append<MASK><NEW_LINE>String params = paramsToString(this.params);<NEW_LINE>if (params.length() > 0) {<NEW_LINE>buffer.append(" ").append(params);<NEW_LINE>}<NEW_LINE>String hash = hashToString();<NEW_LINE>if (hash.length() > 0) {<NEW_LINE>buffer.append(" ").append(hash);<NEW_LINE>}<NEW_LINE>if (blockParams.size() > 0) {<NEW_LINE>buffer.append(" as |").append(paramsToString(this.blockParams)).append("|");<NEW_LINE>}<NEW_LINE>buffer.append(endDelimiter);<NEW_LINE>if (complete) {<NEW_LINE>buffer.append(body == null ? "" : body.text());<NEW_LINE>if (inverse != EMPTY) {<NEW_LINE>if (inverse instanceof Block) {<NEW_LINE>String elseif = ((Block) inverse).text(true, false);<NEW_LINE>buffer.append(elseif);<NEW_LINE>} else {<NEW_LINE>buffer.append(startDelimiter).append(inverseLabel).append(endDelimiter).append(inverse.text());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>buffer.append("\n...\n");<NEW_LINE>}<NEW_LINE>if (close) {<NEW_LINE>buffer.append(startDelimiter);<NEW_LINE>if (type.equals("{{")) {<NEW_LINE>buffer.append("{{");<NEW_LINE>}<NEW_LINE>buffer.append('/').append(name).append(endDelimiter);<NEW_LINE>}<NEW_LINE>return buffer.toString();<NEW_LINE>}
(type).append(name);
1,091,855
private void initComponents() {<NEW_LINE>// NOI18N<NEW_LINE>dialog = new JDialog(parentFrame, NbBundle.getMessage(AboutDialog.class, "LBL_About"), true);<NEW_LINE>dialog.addWindowListener(new WindowAdapter() {<NEW_LINE><NEW_LINE>public void windowClosed(WindowEvent e) {<NEW_LINE>cleanup();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>JComponent contentPane = <MASK><NEW_LINE>contentPane.setLayout(new BorderLayout());<NEW_LINE>// NOI18N<NEW_LINE>contentPane.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).// NOI18N<NEW_LINE>put(// NOI18N<NEW_LINE>KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "CLOSE_ACTION");<NEW_LINE>contentPane.getActionMap().put("CLOSE_ACTION", new // NOI18N<NEW_LINE>AbstractAction() {<NEW_LINE><NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>close();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>aboutDialogPanel = new AboutDialogPanel();<NEW_LINE>aboutDialogControls = new AboutDialogControls();<NEW_LINE>contentPane.add(aboutDialogPanel, BorderLayout.CENTER);<NEW_LINE>contentPane.add(aboutDialogControls, BorderLayout.SOUTH);<NEW_LINE>dialog.getRootPane().setDefaultButton(aboutDialogControls.getDefaultButton());<NEW_LINE>dialog.setResizable(false);<NEW_LINE>dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);<NEW_LINE>}
(JComponent) dialog.getContentPane();
589,485
public void onAction(String name, boolean pressed, float tpf) {<NEW_LINE>if (name.equals("wireframe") && !pressed) {<NEW_LINE>wireframe = !wireframe;<NEW_LINE>if (wireframe) {<NEW_LINE>terrain.setMaterial(matWire);<NEW_LINE>} else {<NEW_LINE>terrain.setMaterial(matRock);<NEW_LINE>}<NEW_LINE>} else if (name.equals("triPlanar") && !pressed) {<NEW_LINE>triPlanar = !triPlanar;<NEW_LINE>if (triPlanar) {<NEW_LINE>matRock.setBoolean("useTriPlanarMapping", true);<NEW_LINE>// Planar textures don't use the mesh's texture coordinates but real-world coordinates,<NEW_LINE>// so we need to convert these texture-coordinate scales into real-world scales so it looks<NEW_LINE>// the same when we switch to tri-planar mode.<NEW_LINE>matRock.setFloat("Tex1Scale", 1f / (512f / grassScale));<NEW_LINE>matRock.setFloat("Tex2Scale", 1f / (512f / dirtScale));<NEW_LINE>matRock.setFloat("Tex3Scale", <MASK><NEW_LINE>} else {<NEW_LINE>matRock.setBoolean("useTriPlanarMapping", false);<NEW_LINE>matRock.setFloat("Tex1Scale", grassScale);<NEW_LINE>matRock.setFloat("Tex2Scale", dirtScale);<NEW_LINE>matRock.setFloat("Tex3Scale", rockScale);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
1f / (512f / rockScale));
1,200,562
final StartQueryResult executeStartQuery(StartQueryRequest startQueryRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startQueryRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<StartQueryRequest> request = null;<NEW_LINE>Response<StartQueryResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new StartQueryRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startQueryRequest));<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, "CloudTrail");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartQuery");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<StartQueryResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartQueryResultJsonUnmarshaller());<NEW_LINE>response = <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
invoke(request, responseHandler, executionContext);
680,466
private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String accountName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (accountName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, this.client.getApiVersion(), accept, context);<NEW_LINE>}
error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
1,393,102
final EnableClientAuthenticationResult executeEnableClientAuthentication(EnableClientAuthenticationRequest enableClientAuthenticationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(enableClientAuthenticationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<EnableClientAuthenticationRequest> request = null;<NEW_LINE>Response<EnableClientAuthenticationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new EnableClientAuthenticationRequestProtocolMarshaller(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, "Directory Service");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "EnableClientAuthentication");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<EnableClientAuthenticationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new EnableClientAuthenticationResultJsonUnmarshaller());<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(enableClientAuthenticationRequest));
685,690
public JobDependency unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>JobDependency jobDependency = new JobDependency();<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("jobId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>jobDependency.setJobId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("type", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>jobDependency.setType(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return jobDependency;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
968,010
public void postInit() {<NEW_LINE>mainFrame.getWorkbench().addPanel(getOutputPanel(<MASK><NEW_LINE>refreshTabViewMenus();<NEW_LINE>// Add the 'tab' menu items<NEW_LINE>JMenuItem showAllMenu = new JMenuItem(Constant.messages.getString("menu.view.tabs.show"));<NEW_LINE>showAllMenu.addActionListener(new ActionListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>showAllTabs();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>mainFrame.getMainMenuBar().getMenuView().add(showAllMenu);<NEW_LINE>JMenuItem hideAllMenu = new JMenuItem(Constant.messages.getString("menu.view.tabs.hide"));<NEW_LINE>hideAllMenu.addActionListener(new ActionListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>hideAllTabs();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>mainFrame.getMainMenuBar().getMenuView().add(hideAllMenu);<NEW_LINE>JMenuItem pinAllMenu = new JMenuItem(Constant.messages.getString("menu.view.tabs.pin"));<NEW_LINE>pinAllMenu.addActionListener(new ActionListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>pinAllTabs();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>mainFrame.getMainMenuBar().getMenuView().add(pinAllMenu);<NEW_LINE>JMenuItem unpinAllMenu = new JMenuItem(Constant.messages.getString("menu.view.tabs.unpin"));<NEW_LINE>unpinAllMenu.addActionListener(new ActionListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>unpinAllTabs();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>mainFrame.getMainMenuBar().getMenuView().add(unpinAllMenu);<NEW_LINE>postInitialisation = true;<NEW_LINE>}
), WorkbenchPanel.PanelType.STATUS);
156,234
public int parseFiles(File directory, File[] pathedFiles, final Parser parser) {<NEW_LINE>final StandardJavaFileManager fileManager = javac.getStandardFileManager(null, null, StandardCharsets.UTF_8);<NEW_LINE>DiagnosticCollector<? super JavaFileObject> diagListen = new DiagnosticCollector<>();<NEW_LINE>final JavaCompiler.CompilationTask task = javac.getTask(null, fileManager, diagListen, null, null, fileManager.getJavaFileObjects(pathedFiles));<NEW_LINE>Iterable<? extends CompilationUnitTree> asts = Collections.emptyList();<NEW_LINE>try {<NEW_LINE>asts = ((JavacTask) task).parse();<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>final Trees trees = Trees.instance(task);<NEW_LINE>final SourcePositions positions = trees.getSourcePositions();<NEW_LINE>for (final CompilationUnitTree ast : asts) {<NEW_LINE>final String filename;<NEW_LINE>if (directory == null)<NEW_LINE>filename = ast.getSourceFile().getName();<NEW_LINE>else {<NEW_LINE>filename = Paths.get(directory.toURI()).relativize(Paths.get(ast.getSourceFile().toUri())).toString();<NEW_LINE>}<NEW_LINE>final <MASK><NEW_LINE>ast.accept(new TokenGeneratingTreeScanner(filename, parser, map, positions, ast), null);<NEW_LINE>parser.add(JavaTokenConstants.FILE_END, filename, 1, -1, -1);<NEW_LINE>}<NEW_LINE>int errors = 0;<NEW_LINE>for (Diagnostic<?> diagItem : diagListen.getDiagnostics()) {<NEW_LINE>if (diagItem.getKind() == javax.tools.Diagnostic.Kind.ERROR) {<NEW_LINE>parser.getErrorConsumer().addError(diagItem.toString());<NEW_LINE>errors++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return errors;<NEW_LINE>}
LineMap map = ast.getLineMap();
46,251
public OIdentifiable beforeCreateOperations(OIdentifiable id, String iClusterName) {<NEW_LINE>checkSecurity(ORole.PERMISSION_CREATE, id, iClusterName);<NEW_LINE>ORecordHook.RESULT triggerChanged = null;<NEW_LINE>boolean changed = false;<NEW_LINE>if (id instanceof ODocument) {<NEW_LINE>ODocument doc = (ODocument) id;<NEW_LINE>if (!getSharedContext().getSecurity().canCreate(this, doc)) {<NEW_LINE>throw new OSecurityException("Cannot update record " + doc + ": the resource has restricted access due to security policies");<NEW_LINE>}<NEW_LINE>OImmutableClass clazz = ODocumentInternal.getImmutableSchemaClass(this, doc);<NEW_LINE>if (clazz != null) {<NEW_LINE>checkSecurity(ORule.ResourceGeneric.CLASS, ORole.PERMISSION_CREATE, clazz.getName());<NEW_LINE>if (clazz.isScheduler()) {<NEW_LINE>getSharedContext().getScheduler().initScheduleRecord(doc);<NEW_LINE>changed = true;<NEW_LINE>}<NEW_LINE>if (clazz.isOuser()) {<NEW_LINE>changed = OUser.encodePassword(this, doc);<NEW_LINE>}<NEW_LINE>if (clazz.isTriggered()) {<NEW_LINE>triggerChanged = OClassTrigger.onRecordBeforeCreate(doc, this);<NEW_LINE>}<NEW_LINE>if (clazz.isRestricted()) {<NEW_LINE>changed = ORestrictedAccessHook.onRecordBeforeCreate(doc, this);<NEW_LINE>}<NEW_LINE>if (clazz.isFunction()) {<NEW_LINE>OFunctionLibraryImpl.validateFunctionRecord(doc);<NEW_LINE>}<NEW_LINE>ODocumentInternal.setPropertyEncryption(doc, OPropertyEncryptionNone.instance());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ORecordHook.RESULT res = callbackHooks(ORecordHook.TYPE.BEFORE_CREATE, id);<NEW_LINE>if (changed || res == ORecordHook.RESULT.RECORD_CHANGED || triggerChanged == ORecordHook.RESULT.RECORD_CHANGED) {<NEW_LINE>if (id instanceof ODocument) {<NEW_LINE>((<MASK><NEW_LINE>}<NEW_LINE>return id;<NEW_LINE>} else if (res == ORecordHook.RESULT.RECORD_REPLACED || triggerChanged == ORecordHook.RESULT.RECORD_REPLACED) {<NEW_LINE>ORecord replaced = OHookReplacedRecordThreadLocal.INSTANCE.get();<NEW_LINE>if (replaced instanceof ODocument) {<NEW_LINE>((ODocument) replaced).validate();<NEW_LINE>}<NEW_LINE>return replaced;<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
ODocument) id).validate();
203,522
protected void initializeDefaults() {<NEW_LINE>setDefaultVertexShape(ELLIPSE);<NEW_LINE>setDefaultVertexColor(WebColors.RED);<NEW_LINE>setDefaultEdgeColor(WebColors.RED);<NEW_LINE>setFavoredEdgeType(FALL_THROUGH);<NEW_LINE>configureVertexType(BODY, RECTANGLE, WebColors.BLUE);<NEW_LINE>configureVertexType(ENTRY, TRIANGLE_DOWN, WebColors.DARK_ORANGE);<NEW_LINE>configureVertexType(EXIT, TRIANGLE_UP, WebColors.DARK_MAGENTA);<NEW_LINE>configureVertexType(SWITCH, DIAMOND, WebColors.DARK_CYAN);<NEW_LINE>configureVertexType(EXTERNAL, RECTANGLE, WebColors.DARK_GREEN);<NEW_LINE>configureVertexType(BAD, ELLIPSE, WebColors.RED);<NEW_LINE>configureVertexType(DATA, ELLIPSE, WebColors.PINK);<NEW_LINE>configureVertexType(ENTRY_NEXUS, ELLIPSE, WebColors.WHEAT);<NEW_LINE>configureVertexType(INSTRUCTION, VertexShape.HEXAGON, WebColors.BLUE);<NEW_LINE>configureVertexType(STACK, RECTANGLE, WebColors.GREEN);<NEW_LINE>configureEdgeType(ENTRY_EDGE, WebColors.GRAY);<NEW_LINE>configureEdgeType(FALL_THROUGH, WebColors.BLUE);<NEW_LINE>configureEdgeType(UNCONDITIONAL_JUMP, WebColors.DARK_GREEN);<NEW_LINE>configureEdgeType(UNCONDITIONAL_CALL, WebColors.DARK_ORANGE);<NEW_LINE>configureEdgeType(TERMINATOR, WebColors.PURPLE);<NEW_LINE>configureEdgeType(JUMP_TERMINATOR, WebColors.PURPLE);<NEW_LINE>configureEdgeType(INDIRECTION, WebColors.PINK);<NEW_LINE>configureEdgeType(CONDITIONAL_JUMP, WebColors.DARK_GOLDENROD);<NEW_LINE>configureEdgeType(CONDITIONAL_CALL, WebColors.DARK_ORANGE);<NEW_LINE>configureEdgeType(CONDITIONAL_TERMINATOR, WebColors.PURPLE);<NEW_LINE>configureEdgeType(CONDITIONAL_CALL_TERMINATOR, WebColors.PURPLE);<NEW_LINE>configureEdgeType(COMPUTED_JUMP, WebColors.CYAN);<NEW_LINE>configureEdgeType(COMPUTED_CALL, WebColors.CYAN);<NEW_LINE>configureEdgeType(COMPUTED_CALL_TERMINATOR, WebColors.PURPLE);<NEW_LINE>configureEdgeType(CONDITIONAL_COMPUTED_CALL, WebColors.CYAN);<NEW_LINE><MASK><NEW_LINE>configureEdgeType(CALL_OVERRIDE_UNCONDITIONAL, WebColors.RED);<NEW_LINE>configureEdgeType(JUMP_OVERRIDE_UNCONDITIONAL, WebColors.RED);<NEW_LINE>configureEdgeType(CALLOTHER_OVERRIDE_CALL, WebColors.RED);<NEW_LINE>configureEdgeType(CALLOTHER_OVERRIDE_JUMP, WebColors.RED);<NEW_LINE>configureEdgeType(READ, WebColors.GREEN);<NEW_LINE>configureEdgeType(WRITE, WebColors.RED);<NEW_LINE>configureEdgeType(READ_WRITE, WebColors.DARK_GOLDENROD);<NEW_LINE>configureEdgeType(UNKNOWN_DATA, WebColors.BLACK);<NEW_LINE>configureEdgeType(EXTERNAL_REF, WebColors.PURPLE);<NEW_LINE>configureEdgeType(READ_INDIRECT, WebColors.DARK_GREEN);<NEW_LINE>configureEdgeType(WRITE_INDIRECT, WebColors.DARK_RED);<NEW_LINE>configureEdgeType(READ_WRITE_INDIRECT, WebColors.BROWN);<NEW_LINE>configureEdgeType(DATA_INDIRECT, WebColors.DARK_ORANGE);<NEW_LINE>configureEdgeType(PARAM, WebColors.CYAN);<NEW_LINE>configureEdgeType(THUNK, WebColors.BLUE);<NEW_LINE>}
configureEdgeType(CONDITIONAL_COMPUTED_JUMP, WebColors.CYAN);
42,702
public ApiResponse<ShareContents> fileSharesGetWithHttpInfo(Integer pageIndex, Integer pageSize, String sortExpression) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'pageIndex' is set<NEW_LINE>if (pageIndex == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'pageIndex' when calling fileSharesGet");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'pageSize' is set<NEW_LINE>if (pageSize == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'pageSize' when calling fileSharesGet");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'sortExpression' is set<NEW_LINE>if (sortExpression == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'sortExpression' when calling fileSharesGet");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/v4/fileshares";<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "pageIndex", pageIndex));<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "pageSize", pageSize));<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "sortExpression", sortExpression));<NEW_LINE>final String[] localVarAccepts = { "application/json", "text/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames <MASK><NEW_LINE>GenericType<ShareContents> localVarReturnType = new GenericType<ShareContents>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
= new String[] { "oauth2" };
1,289,655
public void simulate(double limit, double hertz) {<NEW_LINE>priorityQueue = new PriorityQueueResize<>(PriorityQueueResize.Orientation.MIN);<NEW_LINE>for (int i = 0; i < particles.length; i++) {<NEW_LINE>predictCollisions(particles[i], limit);<NEW_LINE>}<NEW_LINE>// Add redraw event<NEW_LINE>priorityQueue.insert(new Event(0, null, null));<NEW_LINE>StdOut.println("Testing and showing velocities histogram for temperature: " + temperature());<NEW_LINE>while (!priorityQueue.isEmpty()) {<NEW_LINE><MASK><NEW_LINE>if (!event.isValid()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// Update particle positions<NEW_LINE>for (int i = 0; i < particles.length; i++) {<NEW_LINE>particles[i].move(event.time - time);<NEW_LINE>}<NEW_LINE>// Update time<NEW_LINE>time = event.time;<NEW_LINE>ParticleInterface particleA = event.particleA;<NEW_LINE>ParticleInterface particleB = event.particleB;<NEW_LINE>if (particleA != null && particleB != null) {<NEW_LINE>particleA.bounceOff(particleB);<NEW_LINE>} else if (particleA != null && particleB == null) {<NEW_LINE>particleA.bounceOffVerticalWall();<NEW_LINE>} else if (particleA == null && particleB != null) {<NEW_LINE>particleB.bounceOffHorizontalWall();<NEW_LINE>} else if (particleA == null && particleB == null) {<NEW_LINE>redraw(limit, hertz);<NEW_LINE>}<NEW_LINE>predictCollisions(particleA, limit);<NEW_LINE>predictCollisions(particleB, limit);<NEW_LINE>}<NEW_LINE>computeVelocitiesHistogram();<NEW_LINE>}
Event event = priorityQueue.deleteTop();
1,625,822
public HLSTimestampRange unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>HLSTimestampRange hLSTimestampRange = new HLSTimestampRange();<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>if (context.testExpression("StartTimestamp", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>hLSTimestampRange.setStartTimestamp(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("EndTimestamp", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>hLSTimestampRange.setEndTimestamp(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").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 hLSTimestampRange;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
1,658,816
private void unregisterApplication(SystemApplicationKey app, FileExtensionKey key, Properties props) throws NativeException {<NEW_LINE><MASK><NEW_LINE>String property = getExtProperty(props, name, EXT_HKCR_APPLICATIONS_PROPERTY);<NEW_LINE>if (property != null) {<NEW_LINE>String appKey = app.getKey();<NEW_LINE>if (registry.keyExists(clSection, clKey + APPLICATIONS_KEY_NAME, appKey)) {<NEW_LINE>String[] openCommandKey = SHELL_OPEN_COMMAND.split(SEP + SEP);<NEW_LINE>for (int i = openCommandKey.length - 1; i >= 0; i--) {<NEW_LINE>String str = EMPTY_STRING;<NEW_LINE>for (int j = i - 1; j >= 0; j--) {<NEW_LINE>str = str + SEP + openCommandKey[i - j];<NEW_LINE>}<NEW_LINE>if (registry.keyExists(clSection, clKey + APPLICATIONS_KEY_NAME + SEP + appKey + str)) {<NEW_LINE>if (registry.getSubKeys(clSection, clKey + APPLICATIONS_KEY_NAME + SEP + appKey + str).length == 0) {<NEW_LINE>registry.deleteKey(clSection, clKey + APPLICATIONS_KEY_NAME + SEP + appKey + str);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>property = getExtProperty(props, name, EXT_HKCU_MUICACHE_PROPERTY);<NEW_LINE>if (property != null) {<NEW_LINE>if (registry.valueExists(HKCU, CURRENT_USER_MUI_CACHE_KEY, app.getLocation())) {<NEW_LINE>if (property.equals(CREATED)) {<NEW_LINE>registry.deleteValue(HKCU, CURRENT_USER_MUI_CACHE_KEY, app.getLocation());<NEW_LINE>} else {<NEW_LINE>registry.setStringValue(HKCU, CURRENT_USER_MUI_CACHE_KEY, app.getLocation(), property);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
String name = key.getDotName();
443,253
private void runExecutableNode(final ExecutableNode node) throws IOException {<NEW_LINE>// Collect output props from the job's dependencies.<NEW_LINE>prepareJobProperties(node);<NEW_LINE>node.setStatus(Status.QUEUED);<NEW_LINE>// Attach Ramp Props if there is any desired properties<NEW_LINE>final String jobId = node.getId();<NEW_LINE>final String jobType = Optional.ofNullable(node.getInputProps()).map(props -> props.getString("type")).orElse(null);<NEW_LINE>if (jobType != null && jobId != null) {<NEW_LINE>final Props rampProps = this.flow.getRampPropsForJob(jobId, jobType);<NEW_LINE>if (rampProps != null) {<NEW_LINE>this.flowIsRamping = true;<NEW_LINE>this.logger.info(String.format("RAMP_FLOW_ATTACH_PROPS_FOR_JOB : (flow.ExecId = %d, flow.Id = %s, flow.flowName = %s, job.id = %s, job.type = %s, props = %s)", this.flow.getExecutionId(), this.flow.getId(), this.flow.getFlowName(), jobId, jobType, rampProps.toString()));<NEW_LINE>node.setRampProps(rampProps);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>this.logger.warn(String.format("RAMP_FLOW_ATTACH_PROPS_FOR_JOB : (flow.ExecId = %d, flow.Id = %s, flow.flowName = %s) does not have Job Type or Id", this.flow.getExecutionId(), this.flow.getId(), this.flow.getFlowName()));<NEW_LINE>}<NEW_LINE>final JobRunner runner = createJobRunner(node);<NEW_LINE>this.logger.info("Submitting job '" + node.getNestedId() + "' to run.");<NEW_LINE>try {<NEW_LINE>// Job starts to queue<NEW_LINE>runner.<MASK><NEW_LINE>this.executorService.submit(runner);<NEW_LINE>this.activeJobRunners.add(runner);<NEW_LINE>} catch (final RejectedExecutionException e) {<NEW_LINE>this.logger.error(e);<NEW_LINE>}<NEW_LINE>}
setTimeInQueue(System.currentTimeMillis());
334,212
private void initAssets() {<NEW_LINE>ModuleEnvironment environment = context.get(ModuleManager.class).getEnvironment();<NEW_LINE>BlockFamilyLibrary library = new BlockFamilyLibrary(environment, context);<NEW_LINE>// cast lambdas explicitly to avoid inconsistent compiler behavior wrt. type inference<NEW_LINE>assetTypeManager.createAssetType(Prefab.class, PojoPrefab::new, "prefabs");<NEW_LINE>assetTypeManager.createAssetType(BlockShape.class, BlockShapeImpl::new, "shapes");<NEW_LINE>assetTypeManager.createAssetType(BlockSounds.class, BlockSounds::new, "blockSounds");<NEW_LINE>assetTypeManager.createAssetType(BlockTile.class, BlockTile::new, "blockTiles");<NEW_LINE>AssetType<BlockFamilyDefinition, BlockFamilyDefinitionData> blockFamilyDefinitionDataAssetType = assetTypeManager.createAssetType(BlockFamilyDefinition.class, BlockFamilyDefinition::new, "blocks");<NEW_LINE>assetTypeManager.getAssetFileDataProducer(blockFamilyDefinitionDataAssetType).addAssetFormat(new BlockFamilyDefinitionFormat<MASK><NEW_LINE>assetTypeManager.createAssetType(UISkinAsset.class, UISkinAsset::new, "skins");<NEW_LINE>assetTypeManager.createAssetType(BehaviorTree.class, BehaviorTree::new, "behaviors");<NEW_LINE>assetTypeManager.createAssetType(UIElement.class, UIElement::new, "ui");<NEW_LINE>}
(assetTypeManager.getAssetManager()));
1,124,078
private List<ArgType> makePossibleTypesList(ArgType type, @Nullable SSAVar var) {<NEW_LINE>if (type.isArray()) {<NEW_LINE>List<ArgType> list = new ArrayList<>();<NEW_LINE>for (ArgType arrElemType : makePossibleTypesList(type.getArrayElement(), null)) {<NEW_LINE>list.add(ArgType.array(arrElemType));<NEW_LINE>}<NEW_LINE>return list;<NEW_LINE>}<NEW_LINE>if (var != null) {<NEW_LINE>for (ITypeBound b : var.getTypeInfo().getBounds()) {<NEW_LINE>ArgType boundType = b.getType();<NEW_LINE>if (boundType.isObject() || boundType.isArray()) {<NEW_LINE>// don't add primitive types<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>List<ArgType> <MASK><NEW_LINE>for (PrimitiveType possibleType : type.getPossibleTypes()) {<NEW_LINE>if (possibleType == PrimitiveType.VOID) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>list.add(ArgType.convertFromPrimitiveType(possibleType));<NEW_LINE>}<NEW_LINE>return list;<NEW_LINE>}
list = new ArrayList<>();
1,559,557
public Message unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Message message = new Message();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("messageId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>message.setMessageId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("payload", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>message.setPayload(context.getUnmarshaller(java.nio.ByteBuffer.<MASK><NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return message;<NEW_LINE>}
class).unmarshall(context));
208,513
private int putInDynamicCacheIfAbsent(int bootstrapIndex, final char[] selector, final char[] descriptor, final int value) {<NEW_LINE>int index;<NEW_LINE>HashtableOfObject key1Value = (HashtableOfObject) this.dynamicCache.get(bootstrapIndex);<NEW_LINE>if (key1Value == null) {<NEW_LINE>key1Value = new HashtableOfObject();<NEW_LINE>this.dynamicCache.put(bootstrapIndex, key1Value);<NEW_LINE>CachedIndexEntry cachedIndexEntry = new CachedIndexEntry(descriptor, value);<NEW_LINE>index = -value;<NEW_LINE>key1Value.put(selector, cachedIndexEntry);<NEW_LINE>} else {<NEW_LINE>Object key2Value = key1Value.get(selector);<NEW_LINE>if (key2Value == null) {<NEW_LINE>CachedIndexEntry cachedIndexEntry = new CachedIndexEntry(descriptor, value);<NEW_LINE>index = -value;<NEW_LINE>key1Value.put(selector, cachedIndexEntry);<NEW_LINE>} else if (key2Value instanceof CachedIndexEntry) {<NEW_LINE>// adding a second entry<NEW_LINE>CachedIndexEntry entry = (CachedIndexEntry) key2Value;<NEW_LINE>if (CharOperation.equals(descriptor, entry.signature)) {<NEW_LINE>index = entry.index;<NEW_LINE>} else {<NEW_LINE>CharArrayCache charArrayCache = new CharArrayCache();<NEW_LINE>charArrayCache.putIfAbsent(<MASK><NEW_LINE>index = charArrayCache.putIfAbsent(descriptor, value);<NEW_LINE>key1Value.put(selector, charArrayCache);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>CharArrayCache charArrayCache = (CharArrayCache) key2Value;<NEW_LINE>index = charArrayCache.putIfAbsent(descriptor, value);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return index;<NEW_LINE>}
entry.signature, entry.index);
994,510
public void placeCursor(StickyColumnPolicy stickyColumnPolicy) {<NEW_LINE>if (isEnabled) {<NEW_LINE>int selectionLength = editorAdaptor.getNativeSelection().getViewLength();<NEW_LINE>Position pos = editorAdaptor.getPosition();<NEW_LINE>int offset = pos.getViewOffset();<NEW_LINE>LineInformation line = editorAdaptor.getViewContent().getLineInformationOfOffset(offset);<NEW_LINE>// Don't fiddle with the caret type when we are in operator mode<NEW_LINE>if (currentState == initialState) {<NEW_LINE>if (selectionLength == 0) {<NEW_LINE>editorAdaptor.getCursorService(<MASK><NEW_LINE>} else {<NEW_LINE>// Use special cursor to signal "selection conflict" - this isn't Visual mode!<NEW_LINE>editorAdaptor.getCursorService().setCaret(CaretType.OVERLINE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Change position when we hit the line end and no selection exists (we don't clear it)<NEW_LINE>if (line.getEndOffset() == offset && line.getLength() > 0 && selectionLength <= 0) {<NEW_LINE>editorAdaptor.setPosition(pos.addViewOffset(-1), stickyColumnPolicy);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
).setCaret(CaretType.RECTANGULAR);
1,015,783
private static void executeIndexRequestOnPrimary(BulkPrimaryExecutionContext context, MappingUpdatePerformer mappingUpdater, ClusterService clusterService) throws Exception {<NEW_LINE>final IndexRequest request = context.getRequestToExecute();<NEW_LINE>final IndexShard primary = context.getPrimary();<NEW_LINE>final SourceToParse sourceToParse = SourceToParse.source(request.index(), request.type(), request.id(), request.source(), request.getContentType()).routing(request.routing()).parent(request.parent());<NEW_LINE>executeOnPrimaryWhileHandlingMappingUpdates(context, (CheckedSupplier<Engine.IndexResult, IOException>) () -> {<NEW_LINE>// primary.applyIndexOperationOnPrimary(request.version(), request.versionType(), sourceToParse,<NEW_LINE>// request.ifSeqNo(), request.ifPrimaryTerm(), request.getAutoGeneratedTimestamp(), request.isRetry())<NEW_LINE>return clusterService.getQueryManager().insertDocument(primary, <MASK><NEW_LINE>}, e -> primary.getFailedIndexResult(e, request.version()), context::markOperationAsExecuted, mapping -> mappingUpdater.updateMappings(mapping, primary.shardId(), request.type()));<NEW_LINE>}
request, context.getIndexMetaData());
1,099,343
public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {<NEW_LINE>InstrumentClass target = instrumentor.getInstrumentClass(loader, className, classfileBuffer);<NEW_LINE>if (!target.isInterceptable()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>target.addField(DatabaseInfoAccessor.class);<NEW_LINE><MASK><NEW_LINE>target.addField(BindValueAccessor.class);<NEW_LINE>final Class<? extends Interceptor> callableStatementInterceptor = CallableStatementRegisterOutParameterInterceptor.class;<NEW_LINE>InstrumentUtils.findMethod(target, "registerOutParameter", "int", "int").addScopedInterceptor(callableStatementInterceptor, MSSQL_SCOPE);<NEW_LINE>InstrumentUtils.findMethod(target, "registerOutParameter", "int", "int", "int").addScopedInterceptor(callableStatementInterceptor, MSSQL_SCOPE);<NEW_LINE>InstrumentUtils.findMethod(target, "registerOutParameter", "int", "int", "java.lang.String").addScopedInterceptor(callableStatementInterceptor, MSSQL_SCOPE);<NEW_LINE>return target.toBytecode();<NEW_LINE>}
target.addField(ParsingResultAccessor.class);
260,600
public static ErrorResponse decodeFromChannelBuffer(ChannelBuffer buffer) {<NEW_LINE>if (buffer.readableBytes() < 1 + 4 + 2 + 2)<NEW_LINE>return null;<NEW_LINE>byte opcode = buffer.readByte();<NEW_LINE>int responseLen = buffer.readInt();<NEW_LINE>if (responseLen <= 0)<NEW_LINE>throw new IllegalArgumentException("responseLen=" + responseLen);<NEW_LINE>if (buffer.readableBytes() < responseLen)<NEW_LINE>return null;<NEW_LINE>short errorClassLen = buffer.readShort();<NEW_LINE>if (errorClassLen <= 0)<NEW_LINE>throw new IllegalArgumentException("errorClassLen=" + errorClassLen);<NEW_LINE>byte[] classNameBytes = new byte[errorClassLen];<NEW_LINE>buffer.readBytes(classNameBytes);<NEW_LINE><MASK><NEW_LINE>if (errorMessageLen < 0)<NEW_LINE>throw new IllegalArgumentException("errorMessageLen=" + errorMessageLen);<NEW_LINE>byte[] errorMessageBytes = (errorMessageLen > 0) ? new byte[errorMessageLen] : null;<NEW_LINE>if (errorMessageLen > 0)<NEW_LINE>buffer.readBytes(errorMessageBytes);<NEW_LINE>ErrorResponse result = new ErrorResponse(opcode, new String(classNameBytes), null != errorMessageBytes ? new String(errorMessageBytes) : null);<NEW_LINE>return result;<NEW_LINE>}
short errorMessageLen = buffer.readShort();
1,653,824
public void render(SheetmetalTankTileEntity tile, float partialTicks, PoseStack matrixStack, MultiBufferSource bufferIn, int combinedLightIn, int combinedOverlayIn) {<NEW_LINE>if (!tile.formed || tile.isDummy() || !tile.getWorldNonnull().hasChunkAt(tile.getBlockPos()))<NEW_LINE>return;<NEW_LINE>matrixStack.pushPose();<NEW_LINE>matrixStack.translate(.5, 0, .5);<NEW_LINE>FluidStack fs = tile.tank.getFluid();<NEW_LINE>matrixStack.translate(0, 3.5f, 0);<NEW_LINE>float baseScale = .0625f;<NEW_LINE>matrixStack.scale(baseScale, -baseScale, baseScale);<NEW_LINE>float xx = -.5f;<NEW_LINE>float zz = 1.5f - .004f;<NEW_LINE>xx /= baseScale;<NEW_LINE>zz /= baseScale;<NEW_LINE>for (int i = 0; i < 4; i++) {<NEW_LINE>matrixStack.pushPose();<NEW_LINE>matrixStack.translate(xx, 0, zz);<NEW_LINE>Matrix4f mat = matrixStack.last().pose();<NEW_LINE>final VertexConsumer builder = bufferIn.getBuffer(IERenderTypes.TRANSLUCENT_POSITION_COLOR);<NEW_LINE>builder.vertex(mat, -4, -4, 0).color(0x22, 0x22, <MASK><NEW_LINE>builder.vertex(mat, -4, 20, 0).color(0x22, 0x22, 0x22, 0xff).endVertex();<NEW_LINE>builder.vertex(mat, 20, 20, 0).color(0x22, 0x22, 0x22, 0xff).endVertex();<NEW_LINE>builder.vertex(mat, 20, -4, 0).color(0x22, 0x22, 0x22, 0xff).endVertex();<NEW_LINE>if (!fs.isEmpty()) {<NEW_LINE>float h = fs.getAmount() / (float) tile.tank.getCapacity();<NEW_LINE>matrixStack.translate(0, 0, .004f);<NEW_LINE>GuiHelper.drawRepeatedFluidSprite(bufferIn.getBuffer(RenderType.solid()), matrixStack, fs, 0, 0 + (1 - h) * 16, 16, h * 16);<NEW_LINE>}<NEW_LINE>matrixStack.popPose();<NEW_LINE>matrixStack.mulPose(new Quaternion(new Vector3f(0, 1, 0), 90, true));<NEW_LINE>}<NEW_LINE>matrixStack.popPose();<NEW_LINE>}
0x22, 0xff).endVertex();
1,042,298
public void addRecord(@NonNull Transaction transaction, UpdateMethod updateMethod) {<NEW_LINE>Log.d(LOG_TAG, "Adding transaction to the db via " + updateMethod.name());<NEW_LINE>mDb.beginTransaction();<NEW_LINE>try {<NEW_LINE>Split imbalanceSplit = transaction.createAutoBalanceSplit();<NEW_LINE>if (imbalanceSplit != null) {<NEW_LINE>String imbalanceAccountUID = new AccountsDbAdapter(mDb, this).getOrCreateImbalanceAccountUID(transaction.getCommodity());<NEW_LINE>imbalanceSplit.setAccountUID(imbalanceAccountUID);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>Log.d(LOG_TAG, "Adding splits for transaction");<NEW_LINE>ArrayList<String> splitUIDs = new ArrayList<>(transaction.getSplits().size());<NEW_LINE>for (Split split : transaction.getSplits()) {<NEW_LINE>Log.d(LOG_TAG, "Replace transaction split in db");<NEW_LINE>if (imbalanceSplit == split) {<NEW_LINE>mSplitsDbAdapter.addRecord(split, UpdateMethod.insert);<NEW_LINE>} else {<NEW_LINE>mSplitsDbAdapter.addRecord(split, updateMethod);<NEW_LINE>}<NEW_LINE>splitUIDs.add(split.getUID());<NEW_LINE>}<NEW_LINE>Log.d(LOG_TAG, transaction.getSplits().size() + " splits added");<NEW_LINE>long deleted = mDb.delete(SplitEntry.TABLE_NAME, SplitEntry.COLUMN_TRANSACTION_UID + " = ? AND " + SplitEntry.COLUMN_UID + " NOT IN ('" + TextUtils.join("' , '", splitUIDs) + "')", new String[] { transaction.getUID() });<NEW_LINE>Log.d(LOG_TAG, deleted + " splits deleted");<NEW_LINE>mDb.setTransactionSuccessful();<NEW_LINE>} catch (SQLException sqlEx) {<NEW_LINE>Log.e(LOG_TAG, sqlEx.getMessage());<NEW_LINE>Crashlytics.logException(sqlEx);<NEW_LINE>} finally {<NEW_LINE>mDb.endTransaction();<NEW_LINE>}<NEW_LINE>}
super.addRecord(transaction, updateMethod);
1,132,641
private void paintBackgroundStack(RenderingContext c, Rectangle bounds) {<NEW_LINE>Rectangle imageContainer;<NEW_LINE>BorderPropertySet border = getStyle().getBorder(c);<NEW_LINE>TableColumn column = getTable().colElement(getCol());<NEW_LINE>if (column != null) {<NEW_LINE>c.getOutputDevice().paintBackground(c, column.getStyle(), bounds, getTable().getColumnBounds(c, getCol()), border);<NEW_LINE>}<NEW_LINE>Box row = getParent();<NEW_LINE>Box section = row.getParent();<NEW_LINE>CalculatedStyle tableStyle = getTable().getStyle();<NEW_LINE>CalculatedStyle sectionStyle = section.getStyle();<NEW_LINE>imageContainer = section.getPaintingBorderEdge(c);<NEW_LINE>imageContainer.y += tableStyle.getBorderVSpacing(c);<NEW_LINE>imageContainer.height -= tableStyle.getBorderVSpacing(c);<NEW_LINE>imageContainer.<MASK><NEW_LINE>imageContainer.width -= 2 * tableStyle.getBorderHSpacing(c);<NEW_LINE>c.getOutputDevice().paintBackground(c, sectionStyle, bounds, imageContainer, border);<NEW_LINE>CalculatedStyle rowStyle = row.getStyle();<NEW_LINE>imageContainer = row.getPaintingBorderEdge(c);<NEW_LINE>imageContainer.x += tableStyle.getBorderHSpacing(c);<NEW_LINE>imageContainer.width -= 2 * tableStyle.getBorderHSpacing(c);<NEW_LINE>c.getOutputDevice().paintBackground(c, rowStyle, bounds, imageContainer, border);<NEW_LINE>BorderPropertySet cellBorder = _collapsedLayoutBorder != null ? _collapsedLayoutBorder : border;<NEW_LINE>c.getOutputDevice().paintBackground(c, getStyle(), bounds, getPaintingBorderEdge(c), cellBorder);<NEW_LINE>}
x += tableStyle.getBorderHSpacing(c);
402,307
public boolean onOptionsItemSelected(@NonNull MenuItem item) {<NEW_LINE>if (super.onOptionsItemSelected(item)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>final int itemId = item.getItemId();<NEW_LINE>if (itemId == R.id.refresh_item) {<NEW_LINE>AutoUpdateManager.runImmediate(requireContext());<NEW_LINE>return true;<NEW_LINE>} else if (itemId == R.id.mark_all_read_item) {<NEW_LINE>ConfirmationDialog markAllReadConfirmationDialog = new ConfirmationDialog(getActivity(), R.string.mark_all_read_label, R.string.mark_all_read_confirmation_msg) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onConfirmButtonPressed(DialogInterface dialog) {<NEW_LINE>dialog.dismiss();<NEW_LINE>DBWriter.markAllItemsRead();<NEW_LINE>((MainActivity) getActivity()).showSnackbarAbovePlayer(R.string.mark_all_read_msg, Toast.LENGTH_SHORT);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>markAllReadConfirmationDialog.createNewDialog().show();<NEW_LINE>return true;<NEW_LINE>} else if (itemId == R.id.remove_all_new_flags_item) {<NEW_LINE>ConfirmationDialog removeAllNewFlagsConfirmationDialog = new ConfirmationDialog(getActivity(), R.string.remove_all_new_flags_label, R.string.remove_all_new_flags_confirmation_msg) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onConfirmButtonPressed(DialogInterface dialog) {<NEW_LINE>dialog.dismiss();<NEW_LINE>DBWriter.removeAllNewFlags();<NEW_LINE>((MainActivity) getActivity()).showSnackbarAbovePlayer(R.<MASK><NEW_LINE>}<NEW_LINE>};<NEW_LINE>removeAllNewFlagsConfirmationDialog.createNewDialog().show();<NEW_LINE>return true;<NEW_LINE>} else if (itemId == R.id.action_search) {<NEW_LINE>((MainActivity) getActivity()).loadChildFragment(SearchFragment.newInstance());<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
string.removed_all_new_flags_msg, Toast.LENGTH_SHORT);
1,595,989
public void test1XSLEnvEntry_Short_InvalidValue() throws Exception {<NEW_LINE>try {<NEW_LINE>// The test case looks for a environment variable named "envShortInvalid".<NEW_LINE>Short tempShort = fejb1.getShortEnvVar("envShortBlankValue");<NEW_LINE>fail("Get environment invalid short lookup should have failed, instead got " + tempShort);<NEW_LINE>} catch (NamingException ne) {<NEW_LINE>svLogger.info("Caught expected " + ne.getClass().getName());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>// The test case looks for a environment variable named "envShortInvalid".<NEW_LINE>Short tempShort = fejb1.getShortEnvVar("envShortInvalid");<NEW_LINE>fail("Get environment invalid short lookup should have failed, instead got " + tempShort);<NEW_LINE>} catch (NamingException ne) {<NEW_LINE>svLogger.info("Caught expected " + ne.getClass().getName());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>// The test case looks for a environment variable named "envShortInvalid".<NEW_LINE>Short <MASK><NEW_LINE>fail("Get environment invalid short lookup should have failed, instead got " + tempShort);<NEW_LINE>} catch (NamingException ne) {<NEW_LINE>svLogger.info("Caught expected " + ne.getClass().getName());<NEW_LINE>}<NEW_LINE>}
tempShort = fejb1.getShortEnvVar("envShortGT16bit");
56,871
private void doPopulatePerson(PersonAccount personObject, Map<String, Object> userInfoProps, Set<String> requestPropNames) {<NEW_LINE>System.out.println(CLASS_NAME + " <doPopulatePerson>, entry, personObject: \n" + personObject.toString());<NEW_LINE>System.out.println(" userInfoProps: " + userInfoProps.toString());<NEW_LINE>System.out.println(" requestPropNames: " + requestPropNames.toString());<NEW_LINE>for (String propName : requestPropNames) {<NEW_LINE>Object propValue = userInfoProps.get(propName);<NEW_LINE>if (propValue != null) {<NEW_LINE>if (propValue instanceof String) {<NEW_LINE>personObject.set(propName, propValue);<NEW_LINE>} else if (propValue instanceof List<?> && !((List<?>) propValue).isEmpty()) {<NEW_LINE>personObject.set(propName, propValue);<NEW_LINE>} else {<NEW_LINE>System.out.println(CLASS_NAME + " un-supported property value type: " + requestPropNames.toString());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>System.out.println(CLASS_NAME + <MASK><NEW_LINE>}
" <doPopulatePerson>, exit, personObject: \n" + personObject.toString());
1,431,240
public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>ChooseFriendsAndFoes choice = new ChooseFriendsAndFoes();<NEW_LINE>choice.chooseFriendOrFoe(controller, source, game);<NEW_LINE>for (Player player : choice.getFriends()) {<NEW_LINE>if (player == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control");<NEW_LINE>filter.add(new ControllerIdPredicate(player.getId()));<NEW_LINE>TargetCreaturePermanent target = new TargetCreaturePermanent(filter);<NEW_LINE>if (!player.choose(Outcome.Copy, target, source, game)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Effect effect = new <MASK><NEW_LINE>effect.setTargetPointer(new FixedTarget(target.getFirstTarget(), game));<NEW_LINE>effect.apply(game, source);<NEW_LINE>}<NEW_LINE>for (Player player : choice.getFoes()) {<NEW_LINE>FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control");<NEW_LINE>filter.add(new ControllerIdPredicate(player.getId()));<NEW_LINE>TargetCreaturePermanent target = new TargetCreaturePermanent(filter);<NEW_LINE>if (!player.choose(Outcome.ReturnToHand, target, source, game)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Effect effect = new ReturnToHandTargetEffect();<NEW_LINE>effect.setTargetPointer(new FixedTarget(target.getFirstTarget(), game));<NEW_LINE>effect.apply(game, source);<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
CreateTokenCopyTargetEffect(player.getId());
887,424
public List<IWorker<ITestNGMethod>> createWorkers(Arguments arguments) {<NEW_LINE>List<IWorker<ITestNGMethod>> result = Lists.newArrayList();<NEW_LINE>// Methods that belong to classes with a sequential=true or parallel=classes<NEW_LINE>// attribute must all be run in the same worker<NEW_LINE>Set<Class<?>> sequentialClasses = gatherClassesThatShouldRunSequentially(arguments);<NEW_LINE>List<IMethodInstance> methodInstances = Lists.newArrayList();<NEW_LINE>for (ITestNGMethod tm : arguments.getMethods()) {<NEW_LINE>methodInstances.addAll(methodsToMultipleMethodInstances(tm));<NEW_LINE>}<NEW_LINE>Set<Class<?><MASK><NEW_LINE>Map<String, String> params = null;<NEW_LINE>Class<?> prevClass = null;<NEW_LINE>for (IMethodInstance im : methodInstances) {<NEW_LINE>Class<?> c = im.getMethod().getTestClass().getRealClass();<NEW_LINE>if (!c.equals(prevClass)) {<NEW_LINE>// Calculate the parameters to be injected only once per Class and NOT for every iteration.<NEW_LINE>params = getParameters(im);<NEW_LINE>prevClass = c;<NEW_LINE>}<NEW_LINE>if (shouldRunSequentially(c, sequentialClasses)) {<NEW_LINE>if (!processedClasses.contains(c)) {<NEW_LINE>processedClasses.add(c);<NEW_LINE>// Sequential class: all methods in one worker<NEW_LINE>TestMethodWorker worker = createTestMethodWorker(arguments, methodInstances, params, c);<NEW_LINE>result.add(worker);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// Parallel class: each method in its own worker<NEW_LINE>TestMethodWorker worker = createTestMethodWorker(arguments, Collections.singletonList(im), params, c);<NEW_LINE>result.add(worker);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
> processedClasses = Sets.newHashSet();
351,436
ActionResult<Wo> execute(EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wo wo = new Wo();<NEW_LINE>Wi wi = this.convertToWrapIn(jsonElement, Wi.class);<NEW_LINE>EntityManager em = emc.get(KeyLock.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<KeyLock> cq = <MASK><NEW_LINE>Root<KeyLock> root = cq.from(KeyLock.class);<NEW_LINE>Predicate p = cb.equal(root.get(KeyLock_.key), wi.getKey());<NEW_LINE>p = cb.and(p, cb.notEqual(root.get(KeyLock_.person), effectivePerson.getDistinguishedName()));<NEW_LINE>List<KeyLock> os = em.createQuery(cq.where(p).orderBy(cb.desc(root.get(KeyLock_.createTime)))).setMaxResults(1).getResultList();<NEW_LINE>if (os.isEmpty()) {<NEW_LINE>emc.beginTransaction(KeyLock.class);<NEW_LINE>KeyLock o = new KeyLock(wi.getKey(), effectivePerson.getDistinguishedName());<NEW_LINE>emc.persist(o, CheckPersistType.all);<NEW_LINE>emc.commit();<NEW_LINE>wo.setSuccess(true);<NEW_LINE>wo.setPerson(o.getPerson());<NEW_LINE>} else {<NEW_LINE>wo.setSuccess(false);<NEW_LINE>wo.setPerson(os.get(0).getPerson());<NEW_LINE>}<NEW_LINE>result.setData(wo);<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}
cb.createQuery(KeyLock.class);
554,787
protected void onDetachedFromWindow() {<NEW_LINE>super.onDetachedFromWindow();<NEW_LINE>updateTaskStackListenerState();<NEW_LINE>mModel.getThumbnailCache().getHighResLoadingState().removeCallback(this);<NEW_LINE>mActivity.removeMultiWindowModeChangedListener(mMultiWindowModeChangedListener);<NEW_LINE>if (LawnchairApp.isRecentsEnabled()) {<NEW_LINE>TaskStackChangeListeners.getInstance().unregisterTaskStackListener(mTaskStackListener);<NEW_LINE>mSyncTransactionApplier = null;<NEW_LINE>}<NEW_LINE>mLiveTileParams.setSyncTransactionApplier(null);<NEW_LINE>executeSideTaskLaunchCallback();<NEW_LINE>RecentsModel.INSTANCE.get(getContext<MASK><NEW_LINE>SystemUiProxy.INSTANCE.get(getContext()).setPinnedStackAnimationListener(null);<NEW_LINE>SplitScreenBounds.INSTANCE.removeOnChangeListener(this);<NEW_LINE>mIPipAnimationListener.setActivityAndRecentsView(null, null);<NEW_LINE>mOrientationState.destroyListeners();<NEW_LINE>mTaskOverlayFactory.removeListeners();<NEW_LINE>}
()).removeThumbnailChangeListener(this);
1,248,571
protected HookStatus hook(Emulator<?> emulator) {<NEW_LINE>EditableArm64RegisterContext context = emulator.getContext();<NEW_LINE>int identifier = context.getIntArg(0);<NEW_LINE>int <MASK><NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("dispatch_get_global_queue identifier=0x" + Integer.toHexString(identifier) + ", flags=0x" + Integer.toHexString(flags));<NEW_LINE>}<NEW_LINE>int QOS_CLASS_USER_INTERACTIVE = 0x21;<NEW_LINE>int QOS_CLASS_USER_INITIATED = 0x19;<NEW_LINE>int QOS_CLASS_DEFAULT = 0x15;<NEW_LINE>int QOS_CLASS_UTILITY = 0x11;<NEW_LINE>int QOS_CLASS_BACKGROUND = 0x9;<NEW_LINE>int DISPATCH_QUEUE_PRIORITY_DEFAULT = 0x0;<NEW_LINE>if (identifier == QOS_CLASS_BACKGROUND || identifier == QOS_CLASS_DEFAULT || identifier == QOS_CLASS_USER_INITIATED || identifier == QOS_CLASS_UTILITY || identifier == QOS_CLASS_USER_INTERACTIVE) {<NEW_LINE>context.setXLong(0, DISPATCH_QUEUE_PRIORITY_DEFAULT);<NEW_LINE>}<NEW_LINE>return HookStatus.RET(emulator, old);<NEW_LINE>}
flags = context.getIntArg(1);
1,242,527
public void generateSasWithContext() {<NEW_LINE>// BEGIN: com.azure.storage.file.datalake.DataLakePathClient.generateSas#DataLakeServiceSasSignatureValues-Context<NEW_LINE>OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1);<NEW_LINE>PathSasPermission permission = new PathSasPermission().setReadPermission(true);<NEW_LINE>DataLakeServiceSasSignatureValues values = new DataLakeServiceSasSignatureValues(expiryTime, permission).setStartTime(OffsetDateTime.now());<NEW_LINE>// Client must be authenticated via StorageSharedKeyCredential<NEW_LINE>client.generateSas(values, new Context("key", "value"));<NEW_LINE>// END: com.azure.storage.file.datalake.DataLakePathClient.generateSas#DataLakeServiceSasSignatureValues-Context<NEW_LINE>// BEGIN: com.azure.storage.file.datalake.DataLakePathClient.generateUserDelegationSas#DataLakeServiceSasSignatureValues-UserDelegationKey-String-Context<NEW_LINE>OffsetDateTime myExpiryTime = OffsetDateTime.<MASK><NEW_LINE>PathSasPermission myPermission = new PathSasPermission().setReadPermission(true);<NEW_LINE>DataLakeServiceSasSignatureValues myValues = new DataLakeServiceSasSignatureValues(expiryTime, permission).setStartTime(OffsetDateTime.now());<NEW_LINE>client.generateUserDelegationSas(values, userDelegationKey, accountName, new Context("key", "value"));<NEW_LINE>// END: com.azure.storage.file.datalake.DataLakePathClient.generateUserDelegationSas#DataLakeServiceSasSignatureValues-UserDelegationKey-String-Context<NEW_LINE>}
now().plusDays(1);
1,041,945
TypecheckingResult findInstance(Expression classifyingExpression, Expression expectedType, InstanceSearchParameters parameters, Concrete.SourceNode sourceNode, Definition currentDef, FieldSearchParameters fieldSearch) {<NEW_LINE>Expression result = findInstance(classifyingExpression, parameters, currentDef, fieldSearch);<NEW_LINE>if (result == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (expectedType == null) {<NEW_LINE>return new TypecheckingResult(result, null);<NEW_LINE>}<NEW_LINE>Expression actualType = result.getType();<NEW_LINE>if (actualType == null) {<NEW_LINE>TypecheckingError error = new TypecheckingError("Cannot infer the type of the instance", sourceNode);<NEW_LINE>myTypechecker.getErrorReporter().report(error);<NEW_LINE>ErrorExpression errorExpr = new ErrorExpression(error);<NEW_LINE>return new TypecheckingResult(errorExpr, errorExpr);<NEW_LINE>}<NEW_LINE>if (!CompareVisitor.compare(myTypechecker.getEquations(), CMP.LE, actualType, expectedType, Type.OMEGA, sourceNode)) {<NEW_LINE>TypecheckingError error = new TypeMismatchError(expectedType, actualType, sourceNode);<NEW_LINE>myTypechecker.getErrorReporter().report(error);<NEW_LINE>ErrorExpression errorExpr = new ErrorExpression(error);<NEW_LINE>return new TypecheckingResult(errorExpr, errorExpr);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}
return new TypecheckingResult(result, actualType);
1,346,809
public Observable<ServiceResponse<ImageCreateSummary>> createImagesFromDataWithServiceResponseAsync(UUID projectId, byte[] imageData, List<UUID> tagIds) {<NEW_LINE>if (this.client.endpoint() == null) {<NEW_LINE>throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");<NEW_LINE>}<NEW_LINE>if (projectId == null) {<NEW_LINE>throw new IllegalArgumentException("Parameter projectId is required and cannot be null.");<NEW_LINE>}<NEW_LINE>if (imageData == null) {<NEW_LINE>throw new IllegalArgumentException("Parameter imageData is required and cannot be null.");<NEW_LINE>}<NEW_LINE>if (this.client.apiKey() == null) {<NEW_LINE>throw new IllegalArgumentException("Parameter this.client.apiKey() is required and cannot be null.");<NEW_LINE>}<NEW_LINE>Validator.validate(tagIds);<NEW_LINE>String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());<NEW_LINE>String tagIdsConverted = this.client.serializerAdapter().serializeList(tagIds, CollectionFormat.CSV);<NEW_LINE>RequestBody imageDataConverted = RequestBody.create(MediaType<MASK><NEW_LINE>return service.createImagesFromData(projectId, tagIdsConverted, imageDataConverted, this.client.apiKey(), this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()).flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ImageCreateSummary>>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Observable<ServiceResponse<ImageCreateSummary>> call(Response<ResponseBody> response) {<NEW_LINE>try {<NEW_LINE>ServiceResponse<ImageCreateSummary> clientResponse = createImagesFromDataDelegate(response);<NEW_LINE>return Observable.just(clientResponse);<NEW_LINE>} catch (Throwable t) {<NEW_LINE>return Observable.error(t);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
.parse("multipart/form-data"), imageData);
69,533
public PeeringTgwInfo unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>PeeringTgwInfo peeringTgwInfo = new PeeringTgwInfo();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_LINE>while (true) {<NEW_LINE>XMLEvent xmlEvent = context.nextEvent();<NEW_LINE>if (xmlEvent.isEndDocument())<NEW_LINE>return peeringTgwInfo;<NEW_LINE>if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {<NEW_LINE>if (context.testExpression("transitGatewayId", targetDepth)) {<NEW_LINE>peeringTgwInfo.setTransitGatewayId(StringStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("ownerId", targetDepth)) {<NEW_LINE>peeringTgwInfo.setOwnerId(StringStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("region", targetDepth)) {<NEW_LINE>peeringTgwInfo.setRegion(StringStaxUnmarshaller.getInstance<MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>} else if (xmlEvent.isEndElement()) {<NEW_LINE>if (context.getCurrentDepth() < originalDepth) {<NEW_LINE>return peeringTgwInfo;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
().unmarshall(context));
1,422,635
private Mono<OAuth2LoginAuthenticationToken> authenticationResult(OAuth2AuthorizationCodeAuthenticationToken authorizationCodeAuthentication, OAuth2AccessTokenResponse accessTokenResponse) {<NEW_LINE><MASK><NEW_LINE>ClientRegistration clientRegistration = authorizationCodeAuthentication.getClientRegistration();<NEW_LINE>Map<String, Object> additionalParameters = accessTokenResponse.getAdditionalParameters();<NEW_LINE>if (!additionalParameters.containsKey(OidcParameterNames.ID_TOKEN)) {<NEW_LINE>OAuth2Error invalidIdTokenError = new OAuth2Error(INVALID_ID_TOKEN_ERROR_CODE, "Missing (required) ID Token in Token Response for Client Registration: " + clientRegistration.getRegistrationId(), null);<NEW_LINE>return Mono.error(new OAuth2AuthenticationException(invalidIdTokenError, invalidIdTokenError.toString()));<NEW_LINE>}<NEW_LINE>// @formatter:off<NEW_LINE>return createOidcToken(clientRegistration, accessTokenResponse).doOnNext((idToken) -> validateNonce(authorizationCodeAuthentication, idToken)).map((idToken) -> new OidcUserRequest(clientRegistration, accessToken, idToken, additionalParameters)).flatMap(this.userService::loadUser).map((oauth2User) -> {<NEW_LINE>Collection<? extends GrantedAuthority> mappedAuthorities = this.authoritiesMapper.mapAuthorities(oauth2User.getAuthorities());<NEW_LINE>return new OAuth2LoginAuthenticationToken(authorizationCodeAuthentication.getClientRegistration(), authorizationCodeAuthentication.getAuthorizationExchange(), oauth2User, mappedAuthorities, accessToken, accessTokenResponse.getRefreshToken());<NEW_LINE>});<NEW_LINE>// @formatter:on<NEW_LINE>}
OAuth2AccessToken accessToken = accessTokenResponse.getAccessToken();
1,809,409
public static DescribeMonitorValuesResponse unmarshall(DescribeMonitorValuesResponse describeMonitorValuesResponse, UnmarshallerContext context) {<NEW_LINE>describeMonitorValuesResponse.setRequestId(context.stringValue("DescribeMonitorValuesResponse.RequestId"));<NEW_LINE>describeMonitorValuesResponse.setDate(context.stringValue("DescribeMonitorValuesResponse.Date"));<NEW_LINE>List<OcsInstanceMonitor> instanceIds = new ArrayList<OcsInstanceMonitor>();<NEW_LINE>for (int i = 0; i < context.lengthValue("DescribeMonitorValuesResponse.InstanceIds.Length"); i++) {<NEW_LINE>OcsInstanceMonitor ocsInstanceMonitor = new OcsInstanceMonitor();<NEW_LINE>ocsInstanceMonitor.setInstanceId(context.stringValue("DescribeMonitorValuesResponse.InstanceIds[" + i + "].InstanceId"));<NEW_LINE>List<OcsMonitorKey> monitorKeys = new ArrayList<OcsMonitorKey>();<NEW_LINE>for (int j = 0; j < context.lengthValue("DescribeMonitorValuesResponse.InstanceIds[" + i + "].MonitorKeys.Length"); j++) {<NEW_LINE>OcsMonitorKey ocsMonitorKey = new OcsMonitorKey();<NEW_LINE>ocsMonitorKey.setMonitorKey(context.stringValue("DescribeMonitorValuesResponse.InstanceIds[" + i + "].MonitorKeys[" + j + "].MonitorKey"));<NEW_LINE>ocsMonitorKey.setValue(context.stringValue("DescribeMonitorValuesResponse.InstanceIds[" + i <MASK><NEW_LINE>ocsMonitorKey.setUnit(context.stringValue("DescribeMonitorValuesResponse.InstanceIds[" + i + "].MonitorKeys[" + j + "].Unit"));<NEW_LINE>monitorKeys.add(ocsMonitorKey);<NEW_LINE>}<NEW_LINE>ocsInstanceMonitor.setMonitorKeys(monitorKeys);<NEW_LINE>instanceIds.add(ocsInstanceMonitor);<NEW_LINE>}<NEW_LINE>describeMonitorValuesResponse.setInstanceIds(instanceIds);<NEW_LINE>return describeMonitorValuesResponse;<NEW_LINE>}
+ "].MonitorKeys[" + j + "].Value"));
1,729,781
AlphaClusterDiscovery alphaClusterAddress(@Value("${alpha.cluster.serviceId:servicecomb-alpha-server}") String serviceId, @Value("${alpha.cluster.address:0.0.0.0:8080}") String[] addresses) {<NEW_LINE>StringBuffer serviceUrls = new StringBuffer();<NEW_LINE>String[] <MASK><NEW_LINE>LOG.info("alphaAddress = {}", Arrays.toString(alphaAddresses));<NEW_LINE>if (alphaAddresses.length > 0) {<NEW_LINE>AlphaClusterDiscovery alphaClusterDiscovery = AlphaClusterDiscovery.builder().discoveryType(AlphaClusterDiscovery.DiscoveryType.NACOS).discoveryInfo(serviceUrls.toString()).addresses(alphaAddresses).build();<NEW_LINE>return alphaClusterDiscovery;<NEW_LINE>} else {<NEW_LINE>AlphaClusterDiscovery alphaClusterDiscovery = AlphaClusterDiscovery.builder().discoveryType(AlphaClusterDiscovery.DiscoveryType.DEFAULT).addresses(addresses).build();<NEW_LINE>return alphaClusterDiscovery;<NEW_LINE>}<NEW_LINE>}
alphaAddresses = this.getAlphaAddress(serviceId);
219,957
public static <E> BarData buildStatisticChart(@NonNull OsmandApplication app, @NonNull HorizontalBarChart mChart, @NonNull RouteStatisticsHelper.RouteStatistics routeStatistics, @NonNull GPXTrackAnalysis analysis, boolean useRightAxis, boolean nightMode) {<NEW_LINE>XAxis xAxis = mChart.getXAxis();<NEW_LINE>xAxis.setEnabled(false);<NEW_LINE>YAxis yAxis;<NEW_LINE>if (useRightAxis) {<NEW_LINE>yAxis = mChart.getAxisRight();<NEW_LINE>yAxis.setEnabled(true);<NEW_LINE>} else {<NEW_LINE>yAxis = mChart.getAxisLeft();<NEW_LINE>}<NEW_LINE>float divX = setupAxisDistance(app, yAxis, analysis.totalDistance);<NEW_LINE>List<RouteSegmentAttribute> segments = routeStatistics.elements;<NEW_LINE>List<BarEntry> entries = new ArrayList<>();<NEW_LINE>float[] stacks = new float[segments.size()];<NEW_LINE>int[] colors = new <MASK><NEW_LINE>for (int i = 0; i < stacks.length; i++) {<NEW_LINE>RouteSegmentAttribute segment = segments.get(i);<NEW_LINE>stacks[i] = segment.getDistance() / divX;<NEW_LINE>colors[i] = segment.getColor();<NEW_LINE>}<NEW_LINE>entries.add(new BarEntry(0, stacks));<NEW_LINE>BarDataSet barDataSet = new BarDataSet(entries, "");<NEW_LINE>barDataSet.setColors(colors);<NEW_LINE>barDataSet.setHighLightColor(ColorUtilities.getSecondaryTextColor(app, nightMode));<NEW_LINE>BarData dataSet = new BarData(barDataSet);<NEW_LINE>dataSet.setDrawValues(false);<NEW_LINE>dataSet.setBarWidth(1);<NEW_LINE>mChart.getAxisRight().setAxisMaximum(dataSet.getYMax());<NEW_LINE>mChart.getAxisLeft().setAxisMaximum(dataSet.getYMax());<NEW_LINE>return dataSet;<NEW_LINE>}
int[segments.size()];
979,713
public static String encode(final String input) {<NEW_LINE>try {<NEW_LINE>final StringBuilder b = new StringBuilder();<NEW_LINE>final StringTokenizer t = new StringTokenizer(input, "/");<NEW_LINE>if (!t.hasMoreTokens()) {<NEW_LINE>return input;<NEW_LINE>}<NEW_LINE>if (StringUtils.startsWith(input, String.valueOf(Path.DELIMITER))) {<NEW_LINE>b.append(Path.DELIMITER);<NEW_LINE>}<NEW_LINE>while (t.hasMoreTokens()) {<NEW_LINE>b.append(URLEncoder.encode(t.nextToken(), StandardCharsets.UTF_8.name()));<NEW_LINE>if (t.hasMoreTokens()) {<NEW_LINE>b.append(Path.DELIMITER);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (StringUtils.endsWith(input, String.valueOf(Path.DELIMITER))) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>// Because URLEncoder uses <code>application/x-www-form-urlencoded</code> we have to replace these<NEW_LINE>// for proper URI percented encoding.<NEW_LINE>return StringUtils.replaceEach(b.toString(), new String[] { "+", "*", "%7E", "%40" }, new String[] { "%20", "%2A", "~", "@" });<NEW_LINE>} catch (UnsupportedEncodingException e) {<NEW_LINE>log.warn(String.format("Failure %s encoding input %s", e, input));<NEW_LINE>return input;<NEW_LINE>}<NEW_LINE>}
b.append(Path.DELIMITER);
564,351
protected void execGetGSP(HttpAction action) {<NEW_LINE>ActionLib.setCommonHeaders(action);<NEW_LINE>MediaType <MASK><NEW_LINE>OutputStream output;<NEW_LINE>try {<NEW_LINE>output = action.getResponseOutputStream();<NEW_LINE>} catch (IOException ex) {<NEW_LINE>ServletOps.errorOccurred(ex);<NEW_LINE>output = null;<NEW_LINE>}<NEW_LINE>Lang lang = RDFLanguages.contentTypeToLang(mediaType.getContentTypeStr());<NEW_LINE>if (lang == null)<NEW_LINE>lang = RDFLanguages.TURTLE;<NEW_LINE>action.beginRead();<NEW_LINE>if (action.verbose)<NEW_LINE>action.log.info(format("[%d] Get: Content-Type=%s, Charset=%s => %s", action.id, mediaType.getContentTypeStr(), mediaType.getCharset(), lang.getName()));<NEW_LINE>try {<NEW_LINE>DatasetGraph dsg = decideDataset(action);<NEW_LINE>GraphTarget target = determineTargetGSP(dsg, action);<NEW_LINE>if (action.log.isDebugEnabled())<NEW_LINE>action.log.debug("GET->" + target);<NEW_LINE>boolean exists = target.exists();<NEW_LINE>if (!exists)<NEW_LINE>ServletOps.errorNotFound("No such graph: " + target.label());<NEW_LINE>Graph graph = target.graph();<NEW_LINE>// Special case RDF/XML to be the plain (faster, less readable) form<NEW_LINE>try {<NEW_LINE>// Use the preferred MIME type.<NEW_LINE>ActionLib.graphResponse(action, graph, lang);<NEW_LINE>ServletOps.success(action);<NEW_LINE>} catch (OperationDeniedException ex) {<NEW_LINE>throw ex;<NEW_LINE>} catch (JenaException ex) {<NEW_LINE>// ActionLib.graphResponse has special handling for RDF/XML but for<NEW_LINE>// other syntax forms unexpected errors mean we may or may not have<NEW_LINE>// written some output because of output buffering.<NEW_LINE>// Attempt to send an error - which may not work.<NEW_LINE>// "406 Not Acceptable" - Accept header issue; target is fine.<NEW_LINE>ServletOps.error(HttpSC.NOT_ACCEPTABLE_406, "Failed to write output: " + ex.getMessage());<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>action.endRead();<NEW_LINE>}<NEW_LINE>}
mediaType = ActionLib.contentNegotationRDF(action);
1,257,659
public MenuItem createMenuItem(Menu menu) {<NEW_LINE>if (!createMenuItem) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final ToolItem toolItem = (ToolItem) getToolItemFromDecorator();<NEW_LINE>MenuItem item;<NEW_LINE>if (isCheckable()) {<NEW_LINE>item = new MenuItem(menu, SWT.CHECK);<NEW_LINE>if (!StringUtil.isEmpty(preferencesKey)) {<NEW_LINE>IPreferenceStore preferenceStore = FindBarPlugin<MASK><NEW_LINE>item.setSelection(preferenceStore.getBoolean(preferencesKey));<NEW_LINE>} else {<NEW_LINE>item.setSelection(toolItem.getSelection());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>item = new MenuItem(menu, SWT.PUSH);<NEW_LINE>}<NEW_LINE>item.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>public void widgetSelected(SelectionEvent e) {<NEW_LINE>if (isCheckable()) {<NEW_LINE>if (!StringUtil.isEmpty(preferencesKey)) {<NEW_LINE>FindBarDecorator.findBarConfiguration.toggle(preferencesKey);<NEW_LINE>} else // Search Selection is a checkable but does not store the selection<NEW_LINE>// in the preferences<NEW_LINE>{<NEW_LINE>toolItem.setSelection(!(toolItem.getSelection()));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>execute();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>item.setImage(FindBarPlugin.getImage(this.image));<NEW_LINE>// $NON-NLS-1$<NEW_LINE>item.setText(" " + toolItem.getToolTipText());<NEW_LINE>return item;<NEW_LINE>}
.getDefault().getPreferenceStore();
485,923
private void generateJaxRs20Filter(JavaSource javaSource) throws IOException {<NEW_LINE>javaSource.runModificationTask(new Task<WorkingCopy>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run(WorkingCopy copy) throws Exception {<NEW_LINE>copy.toPhase(Phase.ELEMENTS_RESOLVED);<NEW_LINE>ClassTree classTree = JavaSourceHelper.getTopLevelClassTree(copy);<NEW_LINE>ClassTree newTree = classTree;<NEW_LINE>TreeMaker treeMaker = copy.getTreeMaker();<NEW_LINE>GenerationUtils genUtils = GenerationUtils.newInstance(copy);<NEW_LINE>AnnotationTree provider = genUtils.createAnnotation("javax.ws.rs.ext.Provider");<NEW_LINE>newTree = genUtils.addAnnotation(newTree, provider);<NEW_LINE>LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();<NEW_LINE>// NOI18N<NEW_LINE>params.// NOI18N<NEW_LINE>put(// NOI18N<NEW_LINE>"requestContext", "javax.ws.rs.container.ContainerRequestContext");<NEW_LINE>// NOI18N<NEW_LINE>params.// NOI18N<NEW_LINE>put(// NOI18N<NEW_LINE>"response", "javax.ws.rs.container.ContainerResponseContext");<NEW_LINE>newTree = // NOI18N<NEW_LINE>genUtils.// NOI18N<NEW_LINE>addImplementsClause(// NOI18N<NEW_LINE>newTree, "javax.ws.rs.container.ContainerResponseFilter");<NEW_LINE>MethodTree method = AbstractJaxRsFeatureIterator.createMethod(genUtils, treeMaker, "filter"<MASK><NEW_LINE>newTree = treeMaker.addClassMember(newTree, method);<NEW_LINE>copy.rewrite(classTree, newTree);<NEW_LINE>}<NEW_LINE>}).commit();<NEW_LINE>}
, params, getFilterBody(false));
1,287,870
private void processLibraryPIDs(List<ContainerInfo> sharedLibContainers, String[] libraryPIDs) throws InvalidSyntaxException {<NEW_LINE>if (libraryPIDs != null) {<NEW_LINE>for (String pid : libraryPIDs) {<NEW_LINE>String libraryFilter = FilterUtils.createPropertyFilter(Constants.SERVICE_PID, pid);<NEW_LINE>Collection<ServiceReference<Library>> libraryRefs = bundleContext.getServiceReferences(Library.class, libraryFilter);<NEW_LINE>for (ServiceReference<Library> libraryRef : libraryRefs) {<NEW_LINE>Library library = bundleContext.getService(libraryRef);<NEW_LINE>if (library != null) {<NEW_LINE><MASK><NEW_LINE>Collection<File> files = library.getFiles();<NEW_LINE>addContainers(sharedLibContainers, pid, id, files);<NEW_LINE>Collection<File> folders = library.getFolders();<NEW_LINE>addContainers(sharedLibContainers, pid, id, folders);<NEW_LINE>Collection<Fileset> filesets = library.getFilesets();<NEW_LINE>for (Fileset fileset : filesets) {<NEW_LINE>addContainers(sharedLibContainers, pid, id, fileset.getFileset());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
String id = library.id();