idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
403,514
final ListPagesByContactResult executeListPagesByContact(ListPagesByContactRequest listPagesByContactRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listPagesByContactRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListPagesByContactRequest> request = null;<NEW_LINE>Response<ListPagesByContactResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListPagesByContactRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listPagesByContactRequest));<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, "SSM Contacts");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPagesByContact");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListPagesByContactResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPagesByContactResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
755,546
public void startBlock(String block) {<NEW_LINE>if (block.equals("paging")) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Object node;<NEW_LINE>if (stack.size() == 0) {<NEW_LINE>if (root == null) {<NEW_LINE>root = "entry";<NEW_LINE>}<NEW_LINE>node = new Vector() {<NEW_LINE><NEW_LINE>public synchronized void addElement(Object obj) {<NEW_LINE>if (responseDestination != null) {<NEW_LINE>if (responseOffset == -1) {<NEW_LINE>responseDestination.addItem(obj);<NEW_LINE>} else {<NEW_LINE>Hashtable h = (<MASK><NEW_LINE>h.putAll((Hashtable) obj);<NEW_LINE>responseDestination.setItem(responseOffset, h);<NEW_LINE>responseOffset++;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>super.addElement(obj);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>stack.addElement(node);<NEW_LINE>if (connectionType.length() > 0 || getUrl().indexOf("search") > 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>node = stack.elementAt(stack.size() - 1);<NEW_LINE>}<NEW_LINE>Hashtable data = new Hashtable();<NEW_LINE>if (node instanceof Hashtable) {<NEW_LINE>((Hashtable) node).put(block, data);<NEW_LINE>} else {<NEW_LINE>((Vector) node).addElement(data);<NEW_LINE>}<NEW_LINE>stack.addElement(data);<NEW_LINE>currentData = data;<NEW_LINE>}
Hashtable) responseDestination.getItemAt(responseOffset);
493,170
public void remove(Entity entity) {<NEW_LINE>if (entity instanceof Player) {<NEW_LINE>MobEffectPacket pk = new MobEffectPacket();<NEW_LINE>pk.eid = entity.getId();<NEW_LINE>pk<MASK><NEW_LINE>pk.eventId = MobEffectPacket.EVENT_REMOVE;<NEW_LINE>((Player) entity).dataPacket(pk);<NEW_LINE>if (this.id == Effect.SPEED) {<NEW_LINE>((Player) entity).setMovementSpeed(((Player) entity).getMovementSpeed() / (1 + 0.2f * (this.amplifier + 1)));<NEW_LINE>}<NEW_LINE>if (this.id == Effect.SLOWNESS) {<NEW_LINE>((Player) entity).setMovementSpeed(((Player) entity).getMovementSpeed() / (1 - 0.15f * (this.amplifier + 1)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (this.id == Effect.INVISIBILITY) {<NEW_LINE>entity.setDataFlag(Entity.DATA_FLAGS, Entity.DATA_FLAG_INVISIBLE, false);<NEW_LINE>entity.setNameTagVisible(true);<NEW_LINE>}<NEW_LINE>if (this.id == Effect.ABSORPTION) {<NEW_LINE>entity.setAbsorption(0);<NEW_LINE>}<NEW_LINE>}
.effectId = this.getId();
1,298,816
final PutPolicyResult executePutPolicy(PutPolicyRequest putPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PutPolicyRequest> request = null;<NEW_LINE>Response<PutPolicyResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new PutPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putPolicyRequest));<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, "MediaConvert");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutPolicy");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<PutPolicyResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutPolicyResultJsonUnmarshaller());<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.endEvent(Field.RequestMarshallTime);
1,796,604
private void addBufferPoints(List<Coordinate> points, Quadtree tree, double lon0, double lat0, double lon1, double lat1, boolean addLast, boolean checkNeighbours, double bufferSize) {<NEW_LINE><MASK><NEW_LINE>double dy = (lat0 - lat1);<NEW_LINE>double normLength = Math.sqrt((dx * dx) + (dy * dy));<NEW_LINE>double scale = bufferSize / normLength;<NEW_LINE>double dx2 = -dy * scale;<NEW_LINE>double dy2 = dx * scale;<NEW_LINE>addPoint(points, tree, lon0 + dx2, lat0 + dy2, checkNeighbours);<NEW_LINE>addPoint(points, tree, lon0 - dx2, lat0 - dy2, checkNeighbours);<NEW_LINE>// add a middle point if two points are too far from each other<NEW_LINE>if (normLength > 2 * bufferSize) {<NEW_LINE>addPoint(points, tree, (lon0 + lon1) / 2.0 + dx2, (lat0 + lat1) / 2.0 + dy2, checkNeighbours);<NEW_LINE>addPoint(points, tree, (lon0 + lon1) / 2.0 - dx2, (lat0 + lat1) / 2.0 - dy2, checkNeighbours);<NEW_LINE>}<NEW_LINE>if (addLast) {<NEW_LINE>addPoint(points, tree, lon1 + dx2, lat1 + dy2, checkNeighbours);<NEW_LINE>addPoint(points, tree, lon1 - dx2, lat1 - dy2, checkNeighbours);<NEW_LINE>}<NEW_LINE>}
double dx = (lon0 - lon1);
666,042
private JPanel createEmptyPanel() {<NEW_LINE>JPanel panelWithText = <MASK><NEW_LINE>String helpText = "<html>\n" + "<body>" + "</div>" + "<div style=\"text-align:center\"><b>Not Yet Configured</b>" + "<br>Authorization has not been set for protected services." + "<br>Use the <i>Authorization</i> drop down to configure." + "</div>" + "</body>" + "</html>";<NEW_LINE>JLabel label = new JLabel(helpText);<NEW_LINE>label.setHorizontalAlignment(SwingConstants.CENTER);<NEW_LINE>panelWithText.add(label, BorderLayout.CENTER);<NEW_LINE>panelWithText.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(AbstractAuthenticationForm.CARD_BORDER_COLOR), BorderFactory.createEmptyBorder(10, 10, 10, 10)));<NEW_LINE>panelWithText.setBackground(AbstractAuthenticationForm.CARD_BACKGROUND_COLOR);<NEW_LINE>return panelWithText;<NEW_LINE>}
new JPanel(new BorderLayout());
310,502
protected void runJobLogic(ExternalWorkerJobEntity externalWorkerJob, CommandContext commandContext) {<NEW_LINE>externalWorkerJob.setJobHandlerConfiguration("terminate:");<NEW_LINE>if (variables != null && !variables.isEmpty()) {<NEW_LINE>CmmnEngineConfiguration cmmnEngineConfiguration = CommandContextUtil.getCmmnEngineConfiguration(commandContext);<NEW_LINE>VariableServiceConfiguration variableServiceConfiguration = cmmnEngineConfiguration.getVariableServiceConfiguration();<NEW_LINE>VariableService variableService = variableServiceConfiguration.getVariableService();<NEW_LINE>VariableTypes variableTypes = variableServiceConfiguration.getVariableTypes();<NEW_LINE>for (Map.Entry<String, Object> variableEntry : variables.entrySet()) {<NEW_LINE>String varName = variableEntry.getKey();<NEW_LINE>Object varValue = variableEntry.getValue();<NEW_LINE>VariableType <MASK><NEW_LINE>VariableInstanceEntity variableInstance = variableService.createVariableInstance(varName, variableType, varValue);<NEW_LINE>variableInstance.setScopeId(externalWorkerJob.getScopeId());<NEW_LINE>variableInstance.setSubScopeId(externalWorkerJob.getSubScopeId());<NEW_LINE>variableInstance.setScopeType(ScopeTypes.CMMN_EXTERNAL_WORKER);<NEW_LINE>variableService.insertVariableInstance(variableInstance);<NEW_LINE>}<NEW_LINE>PlanItemInstanceEntity planItemInstanceEntity = cmmnEngineConfiguration.getPlanItemInstanceEntityManager().findById(externalWorkerJob.getSubScopeId());<NEW_LINE>if (planItemInstanceEntity instanceof CountingPlanItemInstanceEntity) {<NEW_LINE>((CountingPlanItemInstanceEntity) planItemInstanceEntity).setVariableCount(((CountingPlanItemInstanceEntity) planItemInstanceEntity).getVariableCount() + variables.size());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>moveExternalWorkerJobToExecutableJob(externalWorkerJob, commandContext);<NEW_LINE>}
variableType = variableTypes.findVariableType(varValue);
839,898
public void decode(CodeDecodeState state) {<NEW_LINE>DataReader reader = state.reader();<NEW_LINE>JavaInsnData insn = state.insn();<NEW_LINE>int opcode = reader.readU1();<NEW_LINE>if (opcode == IINC) {<NEW_LINE>int varNum = reader.readU2();<NEW_LINE>int constValue = reader.readS2();<NEW_LINE>state.local(0, varNum).local(1, varNum).lit(constValue);<NEW_LINE>insn.setPayloadSize(5);<NEW_LINE>insn.setRegsCount(2);<NEW_LINE>insn.setOpcode(Opcode.ADD_INT_LIT);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int index = reader.readU2();<NEW_LINE>switch(opcode) {<NEW_LINE>// iload,<NEW_LINE>case 0x15:<NEW_LINE>// fload<NEW_LINE>case 0x17:<NEW_LINE>case // aload<NEW_LINE>0x19:<NEW_LINE>state.local(1, index).push(0);<NEW_LINE>break;<NEW_LINE>// lload<NEW_LINE>case 0x16:<NEW_LINE>case // dload<NEW_LINE>0x18:<NEW_LINE>state.local(1, index).pushWide(0);<NEW_LINE>break;<NEW_LINE>case 0x36:<NEW_LINE>case 0x37:<NEW_LINE>case 0x38:<NEW_LINE>case 0x39:<NEW_LINE>case 0x3a:<NEW_LINE>// *store<NEW_LINE>state.pop(1).local(0, index);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new JavaClassParseException("Unexpected opcode in 'wide': 0x" <MASK><NEW_LINE>}<NEW_LINE>insn.setPayloadSize(3);<NEW_LINE>insn.setRegsCount(2);<NEW_LINE>insn.setOpcode(Opcode.MOVE);<NEW_LINE>}
+ Integer.toHexString(opcode));
1,356,386
private void downloadArabicSearchDb() {<NEW_LINE>if (downloadReceiver == null) {<NEW_LINE>downloadReceiver = new DefaultDownloadReceiver(this, QuranDownloadService.DOWNLOAD_TYPE_ARABIC_SEARCH_DB);<NEW_LINE>LocalBroadcastManager.getInstance(this).registerReceiver(downloadReceiver, new IntentFilter(QuranDownloadNotifier.ProgressIntent.INTENT_NAME));<NEW_LINE>}<NEW_LINE>downloadReceiver.setListener(this);<NEW_LINE>String url = quranFileUtils.getArabicSearchDatabaseUrl();<NEW_LINE>String notificationTitle = getString(R.string.search_data);<NEW_LINE>Intent intent = ServiceIntentHelper.getDownloadIntent(this, url, quranFileUtils.getQuranDatabaseDirectory(this), notificationTitle, SEARCH_INFO_DOWNLOAD_KEY, QuranDownloadService.DOWNLOAD_TYPE_ARABIC_SEARCH_DB);<NEW_LINE>final String extension = url.endsWith(".zip") ? ".zip" : "";<NEW_LINE>intent.putExtra(QuranDownloadService.<MASK><NEW_LINE>startService(intent);<NEW_LINE>}
EXTRA_OUTPUT_FILE_NAME, QuranDataProvider.QURAN_ARABIC_DATABASE + extension);
488,321
public void visit(ClassDeclaration node) {<NEW_LINE>String name = node.getName().getName();<NEW_LINE>ClassElementAttribute ce = (ClassElementAttribute) global.enterWrite(name, Kind.CLASS, node);<NEW_LINE>node2Element.put(node, ce);<NEW_LINE>Identifier superClsName = (node.getSuperClass() != null) ? CodeUtils.extractUnqualifiedIdentifier(node.getSuperClass()) : null;<NEW_LINE>if (superClsName != null) {<NEW_LINE>ce.superClass = (ClassElementAttribute) lookup(superClsName.<MASK><NEW_LINE>}<NEW_LINE>List<Expression> interfaes = node.getInterfaes();<NEW_LINE>for (Expression identifier : interfaes) {<NEW_LINE>ClassElementAttribute iface = (ClassElementAttribute) lookup(CodeUtils.extractUnqualifiedName(identifier), Kind.IFACE);<NEW_LINE>ce.ifaces.add(iface);<NEW_LINE>node2Element.put(identifier, iface);<NEW_LINE>}<NEW_LINE>scopes.push(ce.enclosedElements);<NEW_LINE>if (node.getBody() != null) {<NEW_LINE>performEnterPass(ce.enclosedElements, node.getBody().getStatements());<NEW_LINE>}<NEW_LINE>super.visit(node);<NEW_LINE>scopes.pop();<NEW_LINE>}
getName(), Kind.CLASS);
992,652
protected void encodeList(FacesContext context, SelectOneListbox listbox, List<SelectItem> selectItems) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>Converter converter = listbox.getConverter();<NEW_LINE>Object values = getValues(listbox);<NEW_LINE>Object submittedValues = getSubmittedValues(listbox);<NEW_LINE>boolean customContent = listbox.getVar() != null;<NEW_LINE>writer.startElement("div", listbox);<NEW_LINE>writer.writeAttribute("class", SelectOneListbox.LIST_CONTAINER_CLASS, null);<NEW_LINE>writer.writeAttribute("style", "height:" + calculateWrapperHeight(listbox, countSelectItems(selectItems)), null);<NEW_LINE>if (customContent) {<NEW_LINE>writer.startElement("table", null);<NEW_LINE>writer.writeAttribute("class", SelectOneListbox.LIST_CLASS, null);<NEW_LINE>writer.startElement("tbody", null);<NEW_LINE>for (int i = 0; i < selectItems.size(); i++) {<NEW_LINE>SelectItem <MASK><NEW_LINE>encodeItem(context, listbox, selectItem, values, submittedValues, converter, customContent);<NEW_LINE>}<NEW_LINE>writer.endElement("tbody");<NEW_LINE>writer.endElement("table");<NEW_LINE>} else {<NEW_LINE>writer.startElement("ul", null);<NEW_LINE>writer.writeAttribute("class", SelectOneListbox.LIST_CLASS, null);<NEW_LINE>for (int i = 0; i < selectItems.size(); i++) {<NEW_LINE>SelectItem selectItem = selectItems.get(i);<NEW_LINE>encodeItem(context, listbox, selectItem, values, submittedValues, converter, customContent);<NEW_LINE>}<NEW_LINE>writer.endElement("ul");<NEW_LINE>}<NEW_LINE>writer.endElement("div");<NEW_LINE>}
selectItem = selectItems.get(i);
800,405
public Boolean doWithAnnotations(Object requiredType, int aggregateIndex, @Nullable Object source, Annotation[] annotations) {<NEW_LINE>for (Annotation annotation : annotations) {<NEW_LINE>if (annotation != null) {<NEW_LINE>Class<? extends Annotation> type = annotation.annotationType();<NEW_LINE>if (type != null && !this.annotationFilter.matches(type)) {<NEW_LINE>if (type == requiredType || type.getName().equals(requiredType)) {<NEW_LINE>return Boolean.TRUE;<NEW_LINE>}<NEW_LINE>Annotation[] repeatedAnnotations = this.repeatableContainers.findRepeatedAnnotations(annotation);<NEW_LINE>if (repeatedAnnotations != null) {<NEW_LINE>Boolean result = doWithAnnotations(<MASK><NEW_LINE>if (result != null) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!this.directOnly) {<NEW_LINE>AnnotationTypeMappings mappings = AnnotationTypeMappings.forAnnotationType(type);<NEW_LINE>for (int i = 0; i < mappings.size(); i++) {<NEW_LINE>AnnotationTypeMapping mapping = mappings.get(i);<NEW_LINE>if (isMappingForType(mapping, this.annotationFilter, requiredType)) {<NEW_LINE>return Boolean.TRUE;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
requiredType, aggregateIndex, source, repeatedAnnotations);
1,323,372
public ImmutableMap<String, IModelTranslation> retriveAllById(final POTrlInfo trlInfo, final int recordId) {<NEW_LINE>final String sql = trlInfo.getSqlSelectTrlById().get();<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>final Object[] params = new Object[] { recordId };<NEW_LINE>try {<NEW_LINE>// retrieve them out of trx; we might have to retrieve an error message related to an already failed trx<NEW_LINE>pstmt = DB.prepareStatement(sql, ITrx.TRXNAME_None);<NEW_LINE>DB.setParameters(pstmt, params);<NEW_LINE>rs = pstmt.executeQuery();<NEW_LINE>final ImmutableMap.Builder<String, IModelTranslation> translations = ImmutableMap.builder();<NEW_LINE>while (rs.next()) {<NEW_LINE>final IModelTranslation trl = retrieveTrl(rs, trlInfo);<NEW_LINE>if (NullModelTranslation.isNull(trl)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final String adLanguage = trl.getAD_Language();<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>return translations.build();<NEW_LINE>} catch (final SQLException e) {<NEW_LINE>throw new DBException(e, sql, params);<NEW_LINE>} finally {<NEW_LINE>DB.close(rs, pstmt);<NEW_LINE>}<NEW_LINE>}
translations.put(adLanguage, trl);
1,197,924
public int compareTo(compactionFailed_args other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetTinfo(), other.isSetTinfo());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetTinfo()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinfo, other.tinfo);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetCredentials(), other.isSetCredentials());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetCredentials()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentials, other.credentials);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetExternalCompactionId(), other.isSetExternalCompactionId());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetExternalCompactionId()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.externalCompactionId, other.externalCompactionId);<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetExtent(), other.isSetExtent());<NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>if (isSetExtent()) {<NEW_LINE>lastComparison = org.apache.thrift.TBaseHelper.compareTo(<MASK><NEW_LINE>if (lastComparison != 0) {<NEW_LINE>return lastComparison;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
this.extent, other.extent);
642,155
private void registerButtonBinds(ModuleEnvironment environment) {<NEW_LINE>Iterable<Class<?>> classes = environment.getTypesAnnotatedWith(RegisterBindButton.class);<NEW_LINE>for (Class<?> registerBindClass : classes) {<NEW_LINE>RegisterBindButton info = registerBindClass.getAnnotation(RegisterBindButton.class);<NEW_LINE>SimpleUri bindUri = new SimpleUri(environment.getModuleProviding(registerBindClass), info.id());<NEW_LINE>if (BindButtonEvent.class.isAssignableFrom(registerBindClass)) {<NEW_LINE>try {<NEW_LINE>BindableButton bindButton = registerBindButton(bindUri, info.description(), (BindButtonEvent) registerBindClass.newInstance());<NEW_LINE>bindButton.setMode(info.mode());<NEW_LINE>bindButton.setRepeating(info.repeating());<NEW_LINE>bindsConfiguration.getBinds(bindUri).stream().filter(input -> input != null).forEach(input -> linkBindButtonToInput(input, bindUri));<NEW_LINE>logger.debug("Registered button bind: {}", bindUri);<NEW_LINE>} catch (InstantiationException | IllegalAccessException e) {<NEW_LINE>logger.error("Failed to register button bind \"{}\"", e);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
logger.error("Failed to register button bind \"{}\", does not extend BindButtonEvent", bindUri);
501,030
final ListTagsForResourceOutput executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListTagsForResourceRequest> request = null;<NEW_LINE>Response<ListTagsForResourceOutput> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListTagsForResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTagsForResourceRequest));<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, "SWF");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTagsForResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListTagsForResourceOutput>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTagsForResourceOutputJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
299,939
private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String configStoreName, String privateEndpointConnectionName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (configStoreName == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (privateEndpointConnectionName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter privateEndpointConnectionName 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, configStoreName, this.client.getApiVersion(), privateEndpointConnectionName, accept, context);<NEW_LINE>}
error(new IllegalArgumentException("Parameter configStoreName is required and cannot be null."));
260,103
public void menuDetected(MenuDetectEvent e) {<NEW_LINE>Composite comp = tv.getTableComposite();<NEW_LINE>Point mapped = comp.getDisplay().map(null, comp, new Point(e.x, e.y));<NEW_LINE>TableColumnCore tc = tv.getTableColumnByOffset(mapped.x);<NEW_LINE>TableCellCore cell = tv.getTableCell(mapped.x, mapped.y);<NEW_LINE>if (tc != null && cell instanceof TableCellSWT) {<NEW_LINE>TableCellMenuEvent event = new TableCellMenuEvent(cell, e);<NEW_LINE>Rectangle clientArea = tv.getClientArea();<NEW_LINE>event.x <MASK><NEW_LINE>event.y = mapped.y;<NEW_LINE>tc.invokeCellMenuListeners(event);<NEW_LINE>if (!event.skipCoreFunctionality) {<NEW_LINE>cell.invokeMenuListeners(event);<NEW_LINE>}<NEW_LINE>if (event.skipCoreFunctionality) {<NEW_LINE>e.doit = false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
= clientArea.x + mapped.x;
1,206,013
protected Void doInBackground(Void... params) {<NEW_LINE>JSONObject requestBody = new JSONObject();<NEW_LINE>JSONObject data = new JSONObject();<NEW_LINE>try {<NEW_LINE>data.put("url", streamUrl);<NEW_LINE>data.put("position", streamPosition);<NEW_LINE>data.put("stream_duration", streamDuration);<NEW_LINE>// data.put("duration", bufferDuration);<NEW_LINE>requestBody.put("device", "android");<NEW_LINE>requestBody.put("type", "buffering");<NEW_LINE>requestBody.put("client", userIdHash);<NEW_LINE>requestBody.put("data", data);<NEW_LINE>RequestBody body = RequestBody.create(requestBody.toString(), Helper.JSON_MEDIA_TYPE);<NEW_LINE>Request request = new Request.Builder().url(ENDPOINT).post(body).build();<NEW_LINE>OkHttpClient client = new OkHttpClient.Builder().writeTimeout(60, TimeUnit.SECONDS).readTimeout(60, TimeUnit.SECONDS).build();<NEW_LINE>Response response = client.newCall(request).execute();<NEW_LINE><MASK><NEW_LINE>String responseString = "";<NEW_LINE>if (resBody != null) {<NEW_LINE>responseString = response.body().string();<NEW_LINE>}<NEW_LINE>Log.d(TAG, String.format("buffer event sent: %s", responseString));<NEW_LINE>} catch (Exception ex) {<NEW_LINE>// we don't want to fail if a buffer event fails to register<NEW_LINE>Log.d(TAG, String.format("buffer event log failed: %s", ex.getMessage()), ex);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
ResponseBody resBody = response.body();
712,886
public Object apply(final ActionContext ctx, final Object caller, final Object[] sources) throws FrameworkException {<NEW_LINE>try {<NEW_LINE>assertArrayHasMinLengthAndAllElementsNotNull(sources, 1);<NEW_LINE>if (sources[0] instanceof File) {<NEW_LINE>final File file <MASK><NEW_LINE>if (file.getSize() == 0) {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>final String encoding = (sources.length == 2 && sources[1] != null) ? sources[1].toString() : "UTF-8";<NEW_LINE>try (final InputStream is = file.getInputStream()) {<NEW_LINE>return new Scanner(is, encoding).useDelimiter("\\A").next();<NEW_LINE>} catch (IOException e) {<NEW_LINE>logParameterError(caller, sources, ctx.isJavaScriptContext());<NEW_LINE>return usage(ctx.isJavaScriptContext());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (ArgumentNullException pe) {<NEW_LINE>// silently ignore null arguments<NEW_LINE>} catch (ArgumentCountException pe) {<NEW_LINE>logParameterError(caller, sources, pe.getMessage(), ctx.isJavaScriptContext());<NEW_LINE>return usage(ctx.isJavaScriptContext());<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
= (File) sources[0];
649,795
public void remove(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException {<NEW_LINE>Entity entity = persistencePackage.getEntity();<NEW_LINE>String idValue = entity.findProperty("id").getValue();<NEW_LINE>String userLoginToRemove = entity.findProperty("login") == null ? null : entity.findProperty("login").getValue();<NEW_LINE><MASK><NEW_LINE>if (persistentAdminUser != null && persistentAdminUser.getLogin() != null && userLoginToRemove != null) {<NEW_LINE>if (persistentAdminUser.getLogin().equals(userLoginToRemove)) {<NEW_LINE>throw new ValidationException(entity, "admin.cantDeleteCurrentUserError");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (idValue != null) {<NEW_LINE>Long id = Long.parseLong(idValue);<NEW_LINE>AdminUser adminInstance = adminSecurityService.readAdminUserById(id);<NEW_LINE>// Check if Status was Weaved in<NEW_LINE>if (Status.class.isAssignableFrom(adminInstance.getClass())) {<NEW_LINE>((Status) adminInstance).setArchived('Y');<NEW_LINE>adminSecurityService.saveAdminUser(adminInstance);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>OperationType removeType = persistencePackage.getPersistencePerspective().getOperationTypes().getRemoveType();<NEW_LINE>helper.getCompatibleModule(removeType).remove(persistencePackage);<NEW_LINE>}
AdminUser persistentAdminUser = adminRemoteSecurityService.getPersistentAdminUser();
642,088
final StartIncidentResult executeStartIncident(StartIncidentRequest startIncidentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startIncidentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<StartIncidentRequest> request = null;<NEW_LINE>Response<StartIncidentResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new StartIncidentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startIncidentRequest));<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, "SSM Incidents");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartIncident");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<StartIncidentResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartIncidentResultJsonUnmarshaller());<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);
764,224
T join() {<NEW_LINE>if (uniq.contains(zeroValue)) {<NEW_LINE>return zeroValue;<NEW_LINE>}<NEW_LINE>if (requireSpecialJoining != null) {<NEW_LINE>Iterator<Map.Entry<JoinStrategy<SJ>, Set<SJ>>> entryIterator = requireSpecialJoining.entrySet().iterator();<NEW_LINE>while (entryIterator.hasNext()) {<NEW_LINE>Map.Entry<JoinStrategy<SJ>, Set<SJ>> e = entryIterator.next();<NEW_LINE>JoinStrategy<SJ> strategy = e.getKey();<NEW_LINE>Set<SJ<MASK><NEW_LINE>entryIterator.remove();<NEW_LINE>SJ joined = toJoin.size() == 1 ? toJoin.iterator().next() : strategy.join(toJoin);<NEW_LINE>uniq.add(Preconditions.checkNotNull(baseType.cast(joined)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>uniq.remove(identityValue);<NEW_LINE>switch(uniq.size()) {<NEW_LINE>case 0:<NEW_LINE>return identityValue;<NEW_LINE>case 1:<NEW_LINE>return uniq.iterator().next();<NEW_LINE>default:<NEW_LINE>return rejoin(uniq);<NEW_LINE>}<NEW_LINE>}
> toJoin = e.getValue();
1,289,205
private boolean putMarker(IResource resource, TextLocation location, MethodReference method, String text, TeaVMProfile profile, boolean force) throws CoreException {<NEW_LINE>Integer lineNumber = location != null ? location.getLine() : null;<NEW_LINE>if (lineNumber == null) {<NEW_LINE>lineNumber = findMethodLocation(method, resource);<NEW_LINE>}<NEW_LINE>if (lineNumber == null) {<NEW_LINE>if (!force) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>lineNumber = 1;<NEW_LINE>}<NEW_LINE>IMarker marker = resource.createMarker(TeaVMEclipsePlugin.PROBLEM_MARKER_ID);<NEW_LINE>marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);<NEW_LINE>marker.setAttribute(IMarker.MESSAGE, text);<NEW_LINE>marker.setAttribute(TeaVMEclipsePlugin.PROBLEM_MARKER_PROJECT_ATTRIBUTE, getProject().getName());<NEW_LINE>marker.setAttribute(TeaVMEclipsePlugin.PROBLEM_MARKER_PROFILE_ATTRIBUTE, profile.getName());<NEW_LINE>marker.<MASK><NEW_LINE>return true;<NEW_LINE>}
setAttribute(IMarker.LINE_NUMBER, lineNumber);
595,654
public void visitAfter(JavaClass obj) {<NEW_LINE>for (MethodDescriptor method : fieldsModifyingMethods) {<NEW_LINE>List<MethodCall> calls = callGraph.get(method);<NEW_LINE>SideEffectStatus prevStatus = statusMap.get(method);<NEW_LINE>status = prevStatus.toSure();<NEW_LINE>calledMethods = new ArrayList<>();<NEW_LINE>for (MethodCall methodCall : calls) {<NEW_LINE>FieldDescriptor target = methodCall.getTarget();<NEW_LINE>if (target != TARGET_NEW && target != TARGET_OTHER && target != TARGET_THIS) {<NEW_LINE>if (allowedFields.contains(target)) {<NEW_LINE>methodCall = new MethodCall(methodCall.getMethod(), TARGET_THIS);<NEW_LINE>} else {<NEW_LINE>methodCall = new MethodCall(methodCall.getMethod(), TARGET_OTHER);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>sawCall(methodCall, false);<NEW_LINE>if (status == SideEffectStatus.SIDE_EFFECT) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (status != prevStatus) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (status.unsure()) {<NEW_LINE>calledMethods.trimToSize();<NEW_LINE>callGraph.put(method, calledMethods);<NEW_LINE>} else {<NEW_LINE>callGraph.remove(method);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>MethodDescriptor clinit = new MethodDescriptor(getClassName(), Const.STATIC_INITIALIZER_NAME, "()V", true);<NEW_LINE>if (!statusMap.containsKey(clinit)) {<NEW_LINE>status = SideEffectStatus.NO_SIDE_EFFECT;<NEW_LINE>calledMethods = new ArrayList<>();<NEW_LINE>superClinitCall();<NEW_LINE>statusMap.put(clinit, status);<NEW_LINE>if (status == SideEffectStatus.UNSURE || status == SideEffectStatus.UNSURE_OBJECT_ONLY) {<NEW_LINE>calledMethods.trimToSize();<NEW_LINE>callGraph.put(clinit, calledMethods);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
statusMap.put(method, status);
1,410,873
public void parseDetail(ByteBuffer bb) throws IOException {<NEW_LINE>objectTypeIndication = IsoTypeReader.readUInt8(bb);<NEW_LINE>int data = IsoTypeReader.readUInt8(bb);<NEW_LINE>streamType = data >>> 2;<NEW_LINE>upStream = (data >> 1) & 0x1;<NEW_LINE>bufferSizeDB = IsoTypeReader.readUInt24(bb);<NEW_LINE>maxBitRate = IsoTypeReader.readUInt32(bb);<NEW_LINE>avgBitRate = IsoTypeReader.readUInt32(bb);<NEW_LINE>BaseDescriptor descriptor;<NEW_LINE>while (bb.remaining() > 2) {<NEW_LINE>// 1byte tag + at least 1byte size<NEW_LINE>final int begin = bb.position();<NEW_LINE>descriptor = ObjectDescriptorFactory.createFrom(objectTypeIndication, bb);<NEW_LINE>final int read = bb.position() - begin;<NEW_LINE>LOG.trace("{} - DecoderConfigDescr1 read: {}, size: {}", descriptor, read, descriptor != null ? <MASK><NEW_LINE>if (descriptor != null) {<NEW_LINE>final int size = descriptor.getSize();<NEW_LINE>if (read < size) {<NEW_LINE>// skip<NEW_LINE>configDescriptorDeadBytes = new byte[size - read];<NEW_LINE>bb.get(configDescriptorDeadBytes);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (descriptor instanceof DecoderSpecificInfo) {<NEW_LINE>decoderSpecificInfo = (DecoderSpecificInfo) descriptor;<NEW_LINE>} else if (descriptor instanceof AudioSpecificConfig) {<NEW_LINE>audioSpecificInfo = (AudioSpecificConfig) descriptor;<NEW_LINE>} else if (descriptor instanceof ProfileLevelIndicationDescriptor) {<NEW_LINE>profileLevelIndicationDescriptors.add((ProfileLevelIndicationDescriptor) descriptor);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
descriptor.getSize() : null);
1,031,600
public BlockDocIdIterator iterator() {<NEW_LINE>int numDocIdSets = _docIdSets.size();<NEW_LINE>BlockDocIdIterator[] allDocIdIterators = new BlockDocIdIterator[numDocIdSets];<NEW_LINE>List<SortedDocIdIterator> sortedDocIdIterators = new ArrayList<>();<NEW_LINE>List<BitmapBasedDocIdIterator> bitmapBasedDocIdIterators = new ArrayList<>();<NEW_LINE>List<BlockDocIdIterator> remainingDocIdIterators = new ArrayList<>();<NEW_LINE>for (int i = 0; i < numDocIdSets; i++) {<NEW_LINE>BlockDocIdIterator docIdIterator = _docIdSets.get(i).iterator();<NEW_LINE>allDocIdIterators[i] = docIdIterator;<NEW_LINE>if (docIdIterator instanceof SortedDocIdIterator) {<NEW_LINE>sortedDocIdIterators.add((SortedDocIdIterator) docIdIterator);<NEW_LINE>} else if (docIdIterator instanceof BitmapBasedDocIdIterator) {<NEW_LINE>bitmapBasedDocIdIterators.add((BitmapBasedDocIdIterator) docIdIterator);<NEW_LINE>} else {<NEW_LINE>remainingDocIdIterators.add(docIdIterator);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int numSortedDocIdIterators = sortedDocIdIterators.size();<NEW_LINE>int numBitmapBasedDocIdIterators = bitmapBasedDocIdIterators.size();<NEW_LINE>if (numSortedDocIdIterators + numBitmapBasedDocIdIterators > 1) {<NEW_LINE>// When there are more than one index-base BlockDocIdIterator (SortedDocIdIterator or BitmapBasedDocIdIterator),<NEW_LINE>// merge them and construct a BitmapDocIdIterator from the merged document ids. If there is no remaining<NEW_LINE>// BlockDocIdIterator, directly return the merged BitmapDocIdIterator; otherwise, construct and return an<NEW_LINE>// OrDocIdIterator with the merged BitmapDocIdIterator and the remaining BlockDocIdIterators.<NEW_LINE>MutableRoaringBitmap docIds = new MutableRoaringBitmap();<NEW_LINE>for (SortedDocIdIterator sortedDocIdIterator : sortedDocIdIterators) {<NEW_LINE>for (Pairs.IntPair docIdRange : sortedDocIdIterator.getDocIdRanges()) {<NEW_LINE>// NOTE: docIdRange has inclusive start and end.<NEW_LINE>docIds.add(docIdRange.getLeft(), docIdRange.getRight() + 1L);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (BitmapBasedDocIdIterator bitmapBasedDocIdIterator : bitmapBasedDocIdIterators) {<NEW_LINE>docIds.or(bitmapBasedDocIdIterator.getDocIds());<NEW_LINE>}<NEW_LINE>BitmapDocIdIterator bitmapDocIdIterator = new BitmapDocIdIterator(docIds, _numDocs);<NEW_LINE><MASK><NEW_LINE>if (numRemainingDocIdIterators == 0) {<NEW_LINE>return bitmapDocIdIterator;<NEW_LINE>} else {<NEW_LINE>BlockDocIdIterator[] docIdIterators = new BlockDocIdIterator[numRemainingDocIdIterators + 1];<NEW_LINE>docIdIterators[0] = bitmapDocIdIterator;<NEW_LINE>for (int i = 0; i < numRemainingDocIdIterators; i++) {<NEW_LINE>docIdIterators[i + 1] = remainingDocIdIterators.get(i);<NEW_LINE>}<NEW_LINE>return new OrDocIdIterator(docIdIterators);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// Otherwise, construct and return an OrDocIdIterator with all BlockDocIdIterators.<NEW_LINE>return new OrDocIdIterator(allDocIdIterators);<NEW_LINE>}<NEW_LINE>}
int numRemainingDocIdIterators = remainingDocIdIterators.size();
148,071
public Request<DeleteResourcePolicyRequest> marshall(DeleteResourcePolicyRequest deleteResourcePolicyRequest) {<NEW_LINE>if (deleteResourcePolicyRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DeleteResourcePolicyRequest)");<NEW_LINE>}<NEW_LINE>Request<DeleteResourcePolicyRequest> request = new DefaultRequest<MASK><NEW_LINE>String target = "Logs_20140328.DeleteResourcePolicy";<NEW_LINE>request.addHeader("X-Amz-Target", target);<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 (deleteResourcePolicyRequest.getPolicyName() != null) {<NEW_LINE>String policyName = deleteResourcePolicyRequest.getPolicyName();<NEW_LINE>jsonWriter.name("policyName");<NEW_LINE>jsonWriter.value(policyName);<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>}
<DeleteResourcePolicyRequest>(deleteResourcePolicyRequest, "AmazonCloudWatchLogs");
1,274,921
public Comment createNodeComment(CreateNodeCommentRequest body, Long nodeId, String xSdsDateFormat, String xSdsAuthToken) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>// verify the required parameter 'nodeId' is set<NEW_LINE>if (nodeId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'nodeId' when calling createNodeComment");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/v4/nodes/{node_id}/comments".replaceAll("\\{" + "node_id" + "\\}", apiClient.escapeString(nodeId.toString()));<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>if (xSdsDateFormat != null)<NEW_LINE>localVarHeaderParams.put("X-Sds-Date-Format", apiClient.parameterToString(xSdsDateFormat));<NEW_LINE>if (xSdsAuthToken != null)<NEW_LINE>localVarHeaderParams.put("X-Sds-Auth-Token", apiClient.parameterToString(xSdsAuthToken));<NEW_LINE>final String[] localVarAccepts = { "application/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = { "application/json" };<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] { "oauth2" };<NEW_LINE>GenericType<Comment> localVarReturnType = new GenericType<Comment>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
throw new ApiException(400, "Missing the required parameter 'body' when calling createNodeComment");
193,941
protected void buildActionMapping() {<NEW_LINE>mapping.clear();<NEW_LINE>Class<?> dc;<NEW_LINE>InterceptorManager interMan = InterceptorManager.me();<NEW_LINE>for (Routes routes : getRoutesList()) {<NEW_LINE>for (Route route : routes.getRouteItemList()) {<NEW_LINE>Class<? extends Controller> controllerClass = route.getControllerClass();<NEW_LINE>Interceptor[] controllerInters = interMan.createControllerInterceptor(controllerClass);<NEW_LINE>boolean declaredMethods = routes.getMappingSuperClass() ? controllerClass.getSuperclass() == Controller.class : true;<NEW_LINE>Method[] methods = (declaredMethods ? controllerClass.getDeclaredMethods() : controllerClass.getMethods());<NEW_LINE>for (Method method : methods) {<NEW_LINE>if (declaredMethods) {<NEW_LINE>if (!Modifier.isPublic(method.getModifiers()))<NEW_LINE>continue;<NEW_LINE>} else {<NEW_LINE>dc = method.getDeclaringClass();<NEW_LINE>if (dc == Controller.class || dc == Object.class)<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (method.getAnnotation(NotAction.class) != null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Interceptor[] actionInters = interMan.buildControllerActionInterceptor(routes.getInterceptors(), controllerInters, controllerClass, method);<NEW_LINE>String controllerPath = route.getControllerPath();<NEW_LINE>String methodName = method.getName();<NEW_LINE>ActionKey ak = method.getAnnotation(ActionKey.class);<NEW_LINE>String actionKey;<NEW_LINE>if (ak != null) {<NEW_LINE>actionKey = ak.value().trim();<NEW_LINE>if ("".equals(actionKey))<NEW_LINE>throw new IllegalArgumentException(controllerClass.getName(<MASK><NEW_LINE>if (!actionKey.startsWith(SLASH))<NEW_LINE>actionKey = SLASH + actionKey;<NEW_LINE>} else if (methodName.equals("index")) {<NEW_LINE>actionKey = controllerPath;<NEW_LINE>} else {<NEW_LINE>actionKey = controllerPath.equals(SLASH) ? SLASH + methodName : controllerPath + SLASH + methodName;<NEW_LINE>}<NEW_LINE>Action action = new Action(controllerPath, actionKey, controllerClass, method, methodName, actionInters, route.getFinalViewPath(routes.getBaseViewPath()));<NEW_LINE>if (mapping.put(actionKey, action) != null) {<NEW_LINE>throw new RuntimeException(buildMsg(actionKey, controllerClass, method));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>routes.clear();<NEW_LINE>// support url = controllerPath + urlParas with "/" of controllerPath<NEW_LINE>Action action = mapping.get("/");<NEW_LINE>if (action != null) {<NEW_LINE>mapping.put("", action);<NEW_LINE>}<NEW_LINE>}
) + "." + methodName + "(): The argument of ActionKey can not be blank.");
108,545
private void commitModel(final ModuleModelImpl moduleModel, final Runnable runnable) {<NEW_LINE>myModuleModel.myModulesCache = null;<NEW_LINE>myModificationCount++;<NEW_LINE>ApplicationManager.getApplication().assertWriteAccessAllowed();<NEW_LINE>final Collection<Module> oldModules = myModuleModel.myModules;<NEW_LINE>final Collection<Module> newModules = moduleModel.myModules;<NEW_LINE>final List<Module> removedModules = new ArrayList<>(oldModules);<NEW_LINE>removedModules.removeAll(newModules);<NEW_LINE>final List<Module> addedModules = new ArrayList<>(newModules);<NEW_LINE>addedModules.removeAll(oldModules);<NEW_LINE>ProjectRootManagerEx.getInstanceEx(myProject).makeRootsChange(() -> {<NEW_LINE>for (Module removedModule : removedModules) {<NEW_LINE>fireBeforeModuleRemoved(removedModule);<NEW_LINE>cleanCachedStuff();<NEW_LINE>}<NEW_LINE>List<Module> neverAddedModules = new ArrayList<>(moduleModel.myModulesToDispose);<NEW_LINE>neverAddedModules.removeAll(myModuleModel.myModules);<NEW_LINE>for (final Module neverAddedModule : neverAddedModules) {<NEW_LINE>neverAddedModule.putUserData(DISPOSED_MODULE_NAME, neverAddedModule.getName());<NEW_LINE>Disposer.dispose(neverAddedModule);<NEW_LINE>}<NEW_LINE>if (runnable != null) {<NEW_LINE>runnable.run();<NEW_LINE>}<NEW_LINE>final Map<Module<MASK><NEW_LINE>final Set<Module> modulesToBeRenamed = modulesToNewNamesMap.keySet();<NEW_LINE>modulesToBeRenamed.removeAll(moduleModel.myModulesToDispose);<NEW_LINE>final List<Module> modules = new ArrayList<>();<NEW_LINE>for (final Module moduleToBeRenamed : modulesToBeRenamed) {<NEW_LINE>ModuleEx module = (ModuleEx) moduleToBeRenamed;<NEW_LINE>moduleModel.myModules.remove(moduleToBeRenamed);<NEW_LINE>modules.add(moduleToBeRenamed);<NEW_LINE>module.rename(modulesToNewNamesMap.get(moduleToBeRenamed));<NEW_LINE>moduleModel.myModules.add(module);<NEW_LINE>}<NEW_LINE>moduleModel.myIsWritable = false;<NEW_LINE>myModuleModel = moduleModel;<NEW_LINE>for (Module module : removedModules) {<NEW_LINE>fireModuleRemoved(module);<NEW_LINE>cleanCachedStuff();<NEW_LINE>Disposer.dispose(module);<NEW_LINE>cleanCachedStuff();<NEW_LINE>}<NEW_LINE>for (Module addedModule : addedModules) {<NEW_LINE>((ModuleEx) addedModule).moduleAdded();<NEW_LINE>cleanCachedStuff();<NEW_LINE>fireModuleAdded(addedModule);<NEW_LINE>cleanCachedStuff();<NEW_LINE>}<NEW_LINE>cleanCachedStuff();<NEW_LINE>fireModulesRenamed(modules);<NEW_LINE>cleanCachedStuff();<NEW_LINE>}, false, true);<NEW_LINE>}
, String> modulesToNewNamesMap = moduleModel.myModuleToNewName;
1,657,184
public GetPredictiveScalingForecastResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>GetPredictiveScalingForecastResult getPredictiveScalingForecastResult = new GetPredictiveScalingForecastResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 2;<NEW_LINE>while (true) {<NEW_LINE><MASK><NEW_LINE>if (xmlEvent.isEndDocument())<NEW_LINE>return getPredictiveScalingForecastResult;<NEW_LINE>if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {<NEW_LINE>if (context.testExpression("LoadForecast", targetDepth)) {<NEW_LINE>getPredictiveScalingForecastResult.withLoadForecast(new ArrayList<LoadForecast>());<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("LoadForecast/member", targetDepth)) {<NEW_LINE>getPredictiveScalingForecastResult.withLoadForecast(LoadForecastStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("CapacityForecast", targetDepth)) {<NEW_LINE>getPredictiveScalingForecastResult.setCapacityForecast(CapacityForecastStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("UpdateTime", targetDepth)) {<NEW_LINE>getPredictiveScalingForecastResult.setUpdateTime(DateStaxUnmarshallerFactory.getInstance("iso8601").unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>} else if (xmlEvent.isEndElement()) {<NEW_LINE>if (context.getCurrentDepth() < originalDepth) {<NEW_LINE>return getPredictiveScalingForecastResult;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
XMLEvent xmlEvent = context.nextEvent();
1,771,646
public void insertControlContents(Control control, String contents, int cursorPosition) {<NEW_LINE>Text text = (Text) control;<NEW_LINE>String curValue = text.getText().toUpperCase();<NEW_LINE>Point selection = text.getSelection();<NEW_LINE>if (selection.x == selection.y) {<NEW_LINE>// Try to replace text under cursor contents starts with<NEW_LINE>String contentsUC = contents.toUpperCase();<NEW_LINE>for (int i = selection.x - 1; i >= 0; i--) {<NEW_LINE>String prefix = curValue.substring(i, selection.x);<NEW_LINE>if (contentsUC.startsWith(prefix) && selection.x >= i && selection.x < i + contents.length()) {<NEW_LINE>text.setSelection(i, selection.x);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>char <MASK><NEW_LINE>if (!Character.isLetterOrDigit(ch) && contentsUC.indexOf(ch) == -1) {<NEW_LINE>// Work break<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>text.insert(contents);<NEW_LINE>// Insert will leave the cursor at the end of the inserted text. If this<NEW_LINE>// is not what we wanted, reset the selection.<NEW_LINE>if (cursorPosition < contents.length()) {<NEW_LINE>text.setSelection(selection.x + cursorPosition, selection.x + cursorPosition);<NEW_LINE>}<NEW_LINE>}
ch = curValue.charAt(i);
1,248,993
protected RestLiResponseException buildPreRoutingError(Throwable throwable, Request request) {<NEW_LINE>Map<String, String> requestHeaders = request.getHeaders();<NEW_LINE>Map<String, String> headers = new <MASK><NEW_LINE>headers.put(RestConstants.HEADER_RESTLI_PROTOCOL_VERSION, ProtocolVersionUtil.extractProtocolVersion(requestHeaders).toString());<NEW_LINE>headers.put(HeaderUtil.getErrorResponseHeaderName(requestHeaders), RestConstants.HEADER_VALUE_ERROR);<NEW_LINE>RestLiServiceException restLiServiceException = RestLiServiceException.fromThrowable(throwable);<NEW_LINE>ErrorResponse errorResponse = _errorResponseBuilder.buildErrorResponse(restLiServiceException);<NEW_LINE>RestLiResponse restLiResponse = new RestLiResponse.Builder().status(restLiServiceException.getStatus()).entity(errorResponse).headers(headers).cookies(Collections.emptyList()).build();<NEW_LINE>return new RestLiResponseException(throwable, restLiResponse);<NEW_LINE>}
TreeMap<>(String.CASE_INSENSITIVE_ORDER);
884,541
public void transformJson(HistoryJobEntity job, ObjectNode historicalData, CommandContext commandContext) {<NEW_LINE>HistoricActivityInstanceEntityManager historicActivityInstanceEntityManager = processEngineConfiguration.getHistoricActivityInstanceEntityManager();<NEW_LINE>HistoricActivityInstanceEntity historicActivityInstanceEntity = createHistoricActivityInstanceEntity(historicalData, commandContext, historicActivityInstanceEntityManager);<NEW_LINE>historicActivityInstanceEntity.setProcessDefinitionId(getStringFromJson(historicalData, HistoryJsonConstants.PROCESS_DEFINITION_ID));<NEW_LINE>historicActivityInstanceEntity.setProcessInstanceId(getStringFromJson(historicalData, HistoryJsonConstants.PROCESS_INSTANCE_ID));<NEW_LINE>historicActivityInstanceEntity.setExecutionId(getStringFromJson(historicalData, HistoryJsonConstants.EXECUTION_ID));<NEW_LINE>historicActivityInstanceEntity.setActivityId(getStringFromJson(historicalData, HistoryJsonConstants.ACTIVITY_ID));<NEW_LINE>historicActivityInstanceEntity.setActivityName(getStringFromJson(historicalData, HistoryJsonConstants.ACTIVITY_NAME));<NEW_LINE>historicActivityInstanceEntity.setActivityType(getStringFromJson(historicalData, HistoryJsonConstants.ACTIVITY_TYPE));<NEW_LINE>historicActivityInstanceEntity.setStartTime(getDateFromJson(historicalData, HistoryJsonConstants.START_TIME));<NEW_LINE>historicActivityInstanceEntity.setTenantId(getStringFromJson(historicalData, HistoryJsonConstants.TENANT_ID));<NEW_LINE>historicActivityInstanceEntity.setTransactionOrder(getIntegerFromJson(historicalData, HistoryJsonConstants.TRANSACTION_ORDER));<NEW_LINE>Date endTime = getDateFromJson(historicalData, HistoryJsonConstants.END_TIME);<NEW_LINE>historicActivityInstanceEntity.setEndTime(endTime);<NEW_LINE>historicActivityInstanceEntity.setDeleteReason(getStringFromJson(historicalData, HistoryJsonConstants.DELETE_REASON));<NEW_LINE>Date startTime = historicActivityInstanceEntity.getStartTime();<NEW_LINE>if (startTime != null && endTime != null) {<NEW_LINE>historicActivityInstanceEntity.setDurationInMillis(endTime.getTime() - startTime.getTime());<NEW_LINE>}<NEW_LINE>historicActivityInstanceEntityManager.insert(historicActivityInstanceEntity);<NEW_LINE>dispatchEvent(commandContext, FlowableEventBuilder.createEntityEvent<MASK><NEW_LINE>dispatchEvent(commandContext, FlowableEventBuilder.createEntityEvent(FlowableEngineEventType.HISTORIC_ACTIVITY_INSTANCE_ENDED, historicActivityInstanceEntity));<NEW_LINE>}
(FlowableEngineEventType.HISTORIC_ACTIVITY_INSTANCE_CREATED, historicActivityInstanceEntity));
377,359
public Boolean isVulnerable() {<NEW_LINE>Config tlsConfig = getTlsConfig();<NEW_LINE>WorkflowTrace trace = new WorkflowConfigurationFactory(tlsConfig).createWorkflowTrace(WorkflowTraceType.HELLO, RunningModeType.CLIENT);<NEW_LINE>trace.addTlsAction(new SendDynamicClientKeyExchangeAction());<NEW_LINE>trace.addTlsAction(new SendAction(new ChangeCipherSpecMessage(), new FinishedMessage()));<NEW_LINE>trace.addTlsAction(new ReceiveAction(new ChangeCipherSpecMessage(), new FinishedMessage()));<NEW_LINE><MASK><NEW_LINE>trace.addTlsAction(new SendAction(message));<NEW_LINE>trace.addTlsAction(new ReceiveAction(new HeartbeatMessage()));<NEW_LINE>State state = new State(tlsConfig, trace);<NEW_LINE>ModifiableByte heartbeatMessageType = new ModifiableByte();<NEW_LINE>ModifiableInteger payloadLength = new ModifiableInteger();<NEW_LINE>payloadLength.setModification(IntegerModificationFactory.explicitValue(config.getPayloadLength()));<NEW_LINE>ModifiableByteArray payload = new ModifiableByteArray();<NEW_LINE>payload.setModification(ByteArrayModificationFactory.explicitValue(new byte[] { 1, 3 }));<NEW_LINE>message.setHeartbeatMessageType(heartbeatMessageType);<NEW_LINE>message.setPayload(payload);<NEW_LINE>message.setPayloadLength(payloadLength);<NEW_LINE>try {<NEW_LINE>WorkflowExecutor workflowExecutor = WorkflowExecutorFactory.createWorkflowExecutor(tlsConfig.getWorkflowExecutorType(), state);<NEW_LINE>workflowExecutor.executeWorkflow();<NEW_LINE>} catch (WorkflowExecutionException ex) {<NEW_LINE>LOGGER.info("The TLS protocol flow was not executed completely, follow the debug messages for more information.");<NEW_LINE>LOGGER.debug(ex);<NEW_LINE>}<NEW_LINE>if (WorkflowTraceUtil.didReceiveMessage(ProtocolMessageType.HEARTBEAT, trace)) {<NEW_LINE>LOGGER.info("Vulnerable. The server responds with a heartbeat message, although the client heartbeat message contains an invalid Length value");<NEW_LINE>return true;<NEW_LINE>} else if (!WorkflowTraceUtil.didReceiveMessage(HandshakeMessageType.FINISHED, trace)) {<NEW_LINE>return null;<NEW_LINE>} else {<NEW_LINE>LOGGER.info("(Most probably) Not vulnerable. The server does not respond with a heartbeat message, it is not vulnerable");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
HeartbeatMessage message = new HeartbeatMessage(tlsConfig);
1,826,130
void resolveDependencies(DependencyResolution dependencyResolution) {<NEW_LINE>Set<ModuleDependency> moduleDependencies = new HashSet<>();<NEW_LINE>if (this.project.kind() == ProjectKind.BALA_PROJECT) {<NEW_LINE>for (ModuleDescriptor dependencyModDesc : moduleDescDependencies) {<NEW_LINE>// Dependencies loaded from cache should not contain test dependencies<NEW_LINE>addModuleDependency(dependencyModDesc.org(), dependencyModDesc.packageName(), dependencyModDesc.name(), PackageDependencyScope.DEFAULT, moduleDependencies, dependencyResolution);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>Set<ModuleLoadRequest> moduleLoadRequests = new OverwritableLinkedHashSet();<NEW_LINE>moduleLoadRequests.addAll(this.allModuleLoadRequests);<NEW_LINE>moduleLoadRequests.addAll(this.allTestModuleLoadRequests);<NEW_LINE>for (ModuleLoadRequest modLoadRequest : moduleLoadRequests) {<NEW_LINE>PackageOrg packageOrg;<NEW_LINE>if (modLoadRequest.orgName().isEmpty()) {<NEW_LINE>if (project.kind() == ProjectKind.SINGLE_FILE_PROJECT) {<NEW_LINE>// This is an invalid import in a single file project.<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>packageOrg = descriptor().org();<NEW_LINE>} else {<NEW_LINE>packageOrg = modLoadRequest<MASK><NEW_LINE>}<NEW_LINE>addModuleDependency(packageOrg, modLoadRequest.moduleName(), modLoadRequest.scope(), moduleDependencies, dependencyResolution);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.moduleDependencies = Collections.unmodifiableSet(moduleDependencies);<NEW_LINE>}
.orgName().get();
610,809
public RowData toInternal(Map<String, Object> input) throws Exception {<NEW_LINE>if (fieldConfList.size() == 1 && StringUtils.equals(ConstantValue.STAR_SYMBOL, fieldConfList.get(0).getName())) {<NEW_LINE>ColumnRowData result = new ColumnRowData(fieldNameList.size());<NEW_LINE>for (int i = 0; i < fieldNameList.size(); i++) {<NEW_LINE>Object field = input.get(fieldNameList.get(i));<NEW_LINE>AbstractBaseColumn baseColumn = (AbstractBaseColumn) toInternalConverters.get(i).deserialize(field);<NEW_LINE>result.addField(baseColumn);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>ColumnRowData result = new <MASK><NEW_LINE>int converterIndex = 0;<NEW_LINE>for (FieldConf fieldConf : fieldConfList) {<NEW_LINE>AbstractBaseColumn baseColumn = null;<NEW_LINE>if (StringUtils.isBlank(fieldConf.getValue())) {<NEW_LINE>Object field = input.get(fieldConf.getName());<NEW_LINE>baseColumn = (AbstractBaseColumn) toInternalConverters.get(converterIndex).deserialize(field);<NEW_LINE>converterIndex++;<NEW_LINE>}<NEW_LINE>result.addField(assembleFieldProps(fieldConf, baseColumn));<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
ColumnRowData(fieldConfList.size());
1,172,053
final PutFunctionCodeSigningConfigResult executePutFunctionCodeSigningConfig(PutFunctionCodeSigningConfigRequest putFunctionCodeSigningConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putFunctionCodeSigningConfigRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PutFunctionCodeSigningConfigRequest> request = null;<NEW_LINE>Response<PutFunctionCodeSigningConfigResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new PutFunctionCodeSigningConfigRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putFunctionCodeSigningConfigRequest));<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, "Lambda");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutFunctionCodeSigningConfig");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<PutFunctionCodeSigningConfigResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutFunctionCodeSigningConfigResultJsonUnmarshaller());<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);
1,509,294
public static PGPKeyPair lookupKeyPair(PGPPublicKeyRingCollection publics, PGPSecretKeyRingCollection privates, String query, KeyRequirement want) {<NEW_LINE>PGPPublicKey publicKey = lookupPublicKey(publics, query, want);<NEW_LINE>PGPPrivateKey privateKey;<NEW_LINE>try {<NEW_LINE>PGPSecretKey secret = verifyNotNull(privates.getSecretKey(publicKey.getKeyID()), "Keyring missing private key associated with public key id: %x (query '%s')", <MASK><NEW_LINE>// We do not support putting a password on the private key so we're just going to<NEW_LINE>// put char[0] here.<NEW_LINE>privateKey = secret.extractPrivateKey(new BcPBESecretKeyDecryptorBuilder(new BcPGPDigestCalculatorProvider()).build(new char[0]));<NEW_LINE>} catch (PGPException e) {<NEW_LINE>throw new VerifyException(String.format("Could not load PGP private key for: %s", query), e);<NEW_LINE>}<NEW_LINE>return new PGPKeyPair(publicKey, privateKey);<NEW_LINE>}
publicKey.getKeyID(), query);
117,779
private void collectOptionalGroups(final GraphPatternGroup<IGroupMemberNode> group, final Collection<JoinGroupNode> optionalGroups) {<NEW_LINE>if (group instanceof JoinGroupNode && group.isOptional() && group.getParent() != null) {<NEW_LINE>optionalGroups<MASK><NEW_LINE>}<NEW_LINE>for (IGroupMemberNode child : group) {<NEW_LINE>if (child instanceof ServiceNode) {<NEW_LINE>final ServiceNode serviceNode = ((ServiceNode) child);<NEW_LINE>final IVariableOrConstant<?> serviceRef = serviceNode.getServiceRef().getValueExpression();<NEW_LINE>if (serviceRef.isVar()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final BigdataURI serviceURI = ServiceCallUtility.getConstantServiceURI(serviceRef);<NEW_LINE>if (!BDS.SEARCH.equals(serviceURI)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final GraphPatternGroup<IGroupMemberNode> graphPattern = serviceNode.getGraphPattern();<NEW_LINE>collectOptionalGroups(graphPattern, optionalGroups);<NEW_LINE>}<NEW_LINE>if (!(child instanceof GraphPatternGroup<?>))<NEW_LINE>continue;<NEW_LINE>collectOptionalGroups((GraphPatternGroup<IGroupMemberNode>) child, optionalGroups);<NEW_LINE>}<NEW_LINE>}
.add((JoinGroupNode) group);
190,209
private ModuleLayer synthesizeRuntimeBootLayer(ImageClassLoader cl, Set<String> reachableModules, Set<Module> syntheticModules) {<NEW_LINE>NativeImageClassLoaderSupport classLoaderSupport = cl.classLoaderSupport;<NEW_LINE>ModuleFinder beforeFinder = classLoaderSupport.modulepathModuleFinder;<NEW_LINE>ModuleFinder afterFinder = classLoaderSupport.upgradeAndSystemModuleFinder;<NEW_LINE>Configuration cf = synthesizeRuntimeBootLayerConfiguration(beforeFinder, afterFinder, reachableModules);<NEW_LINE>try {<NEW_LINE>ModuleLayer runtimeBootLayer = moduleLayerConstructor.newInstance(cf, List.of(), null);<NEW_LINE>Map<String, Module> nameToModule = moduleLayerFeatureUtils.synthesizeNameToModule(runtimeBootLayer);<NEW_LINE>for (Module syntheticModule : syntheticModules) {<NEW_LINE>Module runtimeSyntheticModule = moduleLayerFeatureUtils.getOrCreateRuntimeModuleForHostedModule(syntheticModule.getName(), syntheticModule.getDescriptor());<NEW_LINE>nameToModule.putIfAbsent(runtimeSyntheticModule.getName(), runtimeSyntheticModule);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>patchRuntimeBootLayer(runtimeBootLayer, nameToModule);<NEW_LINE>return runtimeBootLayer;<NEW_LINE>} catch (InstantiationException | IllegalAccessException | InvocationTargetException ex) {<NEW_LINE>throw VMError.shouldNotReachHere("Failed to synthesize the runtime boot module layer.", ex);<NEW_LINE>}<NEW_LINE>}
moduleLayerFeatureUtils.patchModuleLayerField(runtimeSyntheticModule, runtimeBootLayer);
247,771
public static boolean intersectSegmentCircle(Vector2 start, Vector2 end, Circle circle, MinimumTranslationVector mtv) {<NEW_LINE>v2a.set(end).sub(start);<NEW_LINE>v2b.set(circle.x - start.x, circle.y - start.y);<NEW_LINE><MASK><NEW_LINE>float u = v2b.dot(v2a.nor());<NEW_LINE>if (u <= 0) {<NEW_LINE>v2c.set(start);<NEW_LINE>} else if (u >= len) {<NEW_LINE>v2c.set(end);<NEW_LINE>} else {<NEW_LINE>// remember v2a is already normalized<NEW_LINE>v2d.set(v2a.scl(u));<NEW_LINE>v2c.set(v2d).add(start);<NEW_LINE>}<NEW_LINE>v2a.set(v2c.x - circle.x, v2c.y - circle.y);<NEW_LINE>if (mtv != null) {<NEW_LINE>// Handle special case of segment containing circle center<NEW_LINE>if (v2a.equals(Vector2.Zero)) {<NEW_LINE>v2d.set(end.y - start.y, start.x - end.x);<NEW_LINE>mtv.normal.set(v2d).nor();<NEW_LINE>mtv.depth = circle.radius;<NEW_LINE>} else {<NEW_LINE>mtv.normal.set(v2a).nor();<NEW_LINE>mtv.depth = circle.radius - v2a.len();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return v2a.len2() <= circle.radius * circle.radius;<NEW_LINE>}
float len = v2a.len();
427,463
public void doRun(String testId, BuildExperimentSpec experiment, MeasuredOperationList results) {<NEW_LINE>InvocationSpec invocationSpec = experiment.getInvocation();<NEW_LINE>File workingDirectory = invocationSpec.getWorkingDirectory();<NEW_LINE>if (!(invocationSpec instanceof GradleInvocationSpec)) {<NEW_LINE>throw new IllegalArgumentException("Can only run Gradle invocations with Gradle profiler");<NEW_LINE>}<NEW_LINE>GradleInvocationSpec invocation = (GradleInvocationSpec) invocationSpec;<NEW_LINE>List<String> additionalJvmOpts = new ArrayList<>();<NEW_LINE>List<String> additionalArgs = new ArrayList<>();<NEW_LINE>additionalArgs.add("-PbuildExperimentDisplayName=" + experiment.getDisplayName());<NEW_LINE>GradleInvocationSpec buildSpec = invocation.withAdditionalJvmOpts(additionalJvmOpts).withAdditionalArgs(additionalArgs);<NEW_LINE>GradleBuildExperimentSpec gradleExperiment = (GradleBuildExperimentSpec) experiment;<NEW_LINE>InvocationSettings invocationSettings = <MASK><NEW_LINE>GradleScenarioDefinition scenarioDefinition = createScenarioDefinition(gradleExperiment, invocationSettings, invocation);<NEW_LINE>try {<NEW_LINE>GradleScenarioInvoker scenarioInvoker = createScenarioInvoker(invocationSettings.getGradleUserHome());<NEW_LINE>Logging.setupLogging(workingDirectory);<NEW_LINE>if (buildSpec.isUseAndroidStudio()) {<NEW_LINE>StudioGradleScenarioDefinition studioScenarioDefinition = new StudioGradleScenarioDefinition(scenarioDefinition, buildSpec.getStudioJvmArgs());<NEW_LINE>StudioGradleScenarioInvoker studioScenarioInvoker = new StudioGradleScenarioInvoker(scenarioInvoker);<NEW_LINE>doRunScenario(studioScenarioDefinition, studioScenarioInvoker, invocationSettings, results);<NEW_LINE>} else {<NEW_LINE>if (gradleExperiment.getInvocation().isUseToolingApi()) {<NEW_LINE>initializeNativeServicesForTapiClient(buildSpec, scenarioDefinition);<NEW_LINE>}<NEW_LINE>doRunScenario(scenarioDefinition, scenarioInvoker, invocationSettings, results);<NEW_LINE>}<NEW_LINE>} catch (IOException | InterruptedException e) {<NEW_LINE>throw UncheckedException.throwAsUncheckedException(e);<NEW_LINE>} finally {<NEW_LINE>try {<NEW_LINE>Logging.resetLogging();<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>ConnectorServices.reset();<NEW_LINE>}<NEW_LINE>}
createInvocationSettings(testId, buildSpec, gradleExperiment);
226,432
private Expression findLeafNode(final Expression expression) {<NEW_LINE>if (expression instanceof BinaryExpression) {<NEW_LINE>Token operator = ((BinaryExpression) expression).getOperation();<NEW_LINE>if (operator.isA(Types.MATH_OPERATOR) && !operator.isA(Types.LOGICAL_OPERATOR))<NEW_LINE>return findLeafNode(((BinaryExpression) expression).getLeftExpression());<NEW_LINE>} else if (expression instanceof TernaryExpression) {<NEW_LINE>return findLeafNode(((TernaryExpression) expression).getFalseExpression());<NEW_LINE>} else if (expression instanceof UnaryMinusExpression) {<NEW_LINE>return findLeafNode(((UnaryMinusExpression) expression).getExpression());<NEW_LINE>} else if (expression instanceof UnaryPlusExpression) {<NEW_LINE>return findLeafNode(((UnaryPlusExpression<MASK><NEW_LINE>} else if (expression instanceof PostfixExpression) {<NEW_LINE>return findLeafNode(((PostfixExpression) expression).getExpression());<NEW_LINE>} else if (expression instanceof PrefixExpression) {<NEW_LINE>return findLeafNode(((PrefixExpression) expression).getExpression());<NEW_LINE>}<NEW_LINE>return expression;<NEW_LINE>}
) expression).getExpression());
1,182,492
private WorkflowTrace createFalseStartWorkflow(AliasedConnection connection) {<NEW_LINE>if (config.getHighestProtocolVersion().isTLS13()) {<NEW_LINE>throw new ConfigurationException("The false start workflow is not implemented for TLS 1.3");<NEW_LINE>}<NEW_LINE>WorkflowTrace workflowTrace = this.createHandshakeWorkflow(connection);<NEW_LINE>MessageAction appData = MessageActionFactory.createAction(config, connection, ConnectionEndType.CLIENT, new ApplicationMessage(config));<NEW_LINE>// Client CKE, CCS, Fin<NEW_LINE>// TODO weired<NEW_LINE>TlsAction lastClientAction;<NEW_LINE>if (connection.getLocalConnectionEndType() == ConnectionEndType.CLIENT) {<NEW_LINE>lastClientAction = <MASK><NEW_LINE>} else {<NEW_LINE>lastClientAction = (TlsAction) workflowTrace.getLastReceivingAction();<NEW_LINE>}<NEW_LINE>int i = workflowTrace.getTlsActions().indexOf(lastClientAction);<NEW_LINE>workflowTrace.addTlsAction(i + 1, appData);<NEW_LINE>return workflowTrace;<NEW_LINE>}
(TlsAction) workflowTrace.getLastSendingAction();
1,761,409
public void validate() throws org.apache.thrift.TException {<NEW_LINE>// check for required fields<NEW_LINE>if (!is_set_topology()) {<NEW_LINE>throw new org.apache.thrift.protocol.TProtocolException("Required field 'topology' is unset! Struct:" + toString());<NEW_LINE>}<NEW_LINE>if (!is_set_components()) {<NEW_LINE>throw new org.apache.thrift.protocol.TProtocolException("Required field 'components' is unset! Struct:" + toString());<NEW_LINE>}<NEW_LINE>if (!is_set_tasks()) {<NEW_LINE>throw new org.apache.thrift.protocol.TProtocolException("Required field 'tasks' is unset! Struct:" + toString());<NEW_LINE>}<NEW_LINE>if (!is_set_metrics()) {<NEW_LINE>throw new org.apache.thrift.protocol.<MASK><NEW_LINE>}<NEW_LINE>// check for sub-struct validity<NEW_LINE>if (topology != null) {<NEW_LINE>topology.validate();<NEW_LINE>}<NEW_LINE>if (metrics != null) {<NEW_LINE>metrics.validate();<NEW_LINE>}<NEW_LINE>}
TProtocolException("Required field 'metrics' is unset! Struct:" + toString());
224,599
public AudioInputStream synthesizeUsingImposedF0(int sourceIndex, int targetIndex, AudioFileFormat aft) throws SynthesisException {<NEW_LINE>if (!f0ContourImposeSupport) {<NEW_LINE>throw new SynthesisException("Mary configuration of this voice doesn't support intonation contour imposition");<NEW_LINE>}<NEW_LINE>int numberOfUnits = vHNMFeaturesReader.getNumberOfUnits();<NEW_LINE>if (sourceIndex >= numberOfUnits || targetIndex >= numberOfUnits) {<NEW_LINE>throw new IllegalArgumentException("sourceIndex(" + sourceIndex + ") and targetIndex(" + targetIndex + ") are should be less than number of available units (" + numberOfUnits + ")");<NEW_LINE>}<NEW_LINE>double[] sourceF0 = this.vIntonationReader.getContour(sourceIndex);<NEW_LINE>double[] targetF0coeffs = this.vIntonationReader.getIntonationCoeffs(targetIndex);<NEW_LINE>double[] sourceF0coeffs = this.vIntonationReader.getIntonationCoeffs(sourceIndex);<NEW_LINE>if (targetF0coeffs == null || sourceF0coeffs == null) {<NEW_LINE>return reSynthesize(sourceIndex, aft);<NEW_LINE>}<NEW_LINE>if (targetF0coeffs.length == 0 || sourceF0coeffs.length == 0) {<NEW_LINE>return reSynthesize(sourceIndex, aft);<NEW_LINE>}<NEW_LINE>double[] targetF0 = Polynomial.generatePolynomialValues(targetF0coeffs, sourceF0.length, 0, 1);<NEW_LINE>sourceF0 = Polynomial.generatePolynomialValues(sourceF0coeffs, sourceF0.length, 0, 1);<NEW_LINE>assert targetF0.length == sourceF0.length;<NEW_LINE>float[] tScalesArray = { 1.0f };<NEW_LINE>float[] tScalesTimes = { 1.0f };<NEW_LINE>float[] pScalesArray = new float[targetF0.length];<NEW_LINE>float[] pScalesTimes = new float[targetF0.length];<NEW_LINE>double skipSizeInSeconds <MASK><NEW_LINE>double windowSizeInSeconds = this.vIntonationReader.getWindowSizeInSeconds();<NEW_LINE>for (int i = 0; i < targetF0.length; i++) {<NEW_LINE>pScalesArray[i] = (float) (targetF0[i] / sourceF0[i]);<NEW_LINE>pScalesTimes[i] = (float) (i * skipSizeInSeconds + 0.5 * windowSizeInSeconds);<NEW_LINE>}<NEW_LINE>return synthesizeUsingF0Modification(sourceIndex, pScalesArray, pScalesTimes, tScalesArray, tScalesTimes, aft);<NEW_LINE>}
= this.vIntonationReader.getSkipSizeInSeconds();
1,144,321
private void create(Properties ctx, TransformerHandler document, PO entity, boolean includeParents, List<String> excludedParentList, boolean isFromParent) throws SAXException {<NEW_LINE>int tableId = 0;<NEW_LINE>String tableName = null;<NEW_LINE>int recordId = 0;<NEW_LINE>if (entity != null) {<NEW_LINE>tableId = entity.get_Table_ID();<NEW_LINE>tableName = entity.get_TableName();<NEW_LINE>recordId = entity.get_ID();<NEW_LINE>} else {<NEW_LINE>tableId = Env.getContextAsInt(ctx, TABLE_ID_TAG);<NEW_LINE>recordId = Env.getContextAsInt(ctx, RECORD_ID_TAG);<NEW_LINE>}<NEW_LINE>if (tableId <= 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Instance PO<NEW_LINE>if (entity == null) {<NEW_LINE>entity = getCreatePO(<MASK><NEW_LINE>}<NEW_LINE>if (entity == null) {<NEW_LINE>entity = getCreatePO(ctx, tableName, recordId, null);<NEW_LINE>}<NEW_LINE>if (entity == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Validate if was processed<NEW_LINE>String key = entity.get_UUID();<NEW_LINE>if (list.contains(key)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>list.add(key);<NEW_LINE>// Create parents<NEW_LINE>if (includeParents) {<NEW_LINE>createParent(ctx, document, entity, excludedParentList);<NEW_LINE>}<NEW_LINE>AttributesImpl defaultAttributes = customValues.getAttributes();<NEW_LINE>AttributesImpl atts = createBinding(ctx, entity, defaultAttributes);<NEW_LINE>if (atts != null) {<NEW_LINE>document.startElement("", "", getTagName(entity), atts);<NEW_LINE>document.endElement("", "", getTagName(entity));<NEW_LINE>}<NEW_LINE>// Create translation<NEW_LINE>createTranslation(ctx, document, entity);<NEW_LINE>// Create Node<NEW_LINE>createTreeNode(ctx, document, entity);<NEW_LINE>if (!isFromParent) {<NEW_LINE>customValues.cleanValues();<NEW_LINE>}<NEW_LINE>}
ctx, tableId, recordId, null);
624,775
public synchronized boolean start(Context context) {<NEW_LINE>if (refreshInProgress) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (!SkyTubeApp.isConnected(context)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>SkyTubeApp.getSettings().setRefreshSubsFeedFull(false);<NEW_LINE>refreshInProgress = true;<NEW_LINE>compositeDisposable.add(YouTubeTasks.refreshAllSubscriptions(context, this::processChannelIds, newVideosFound -> {<NEW_LINE>numChannelsFetched++;<NEW_LINE>numVideosFetched += newVideosFound;<NEW_LINE>showNotification();<NEW_LINE>}).observeOn(AndroidSchedulers.mainThread()).doOnSuccess(newVideos -> {<NEW_LINE>SkyTubeApp.uiThread();<NEW_LINE>Log.i("SkyTubeApp", "Found new videos: " + newVideos);<NEW_LINE>EventBus.getInstance(<MASK><NEW_LINE>if (newVideos > 0) {<NEW_LINE>Toast.makeText(context, String.format(SkyTubeApp.getStr(R.string.notification_new_videos_found), numVideosFetched), Toast.LENGTH_LONG).show();<NEW_LINE>} else {<NEW_LINE>Toast.makeText(context, R.string.no_new_videos_found, Toast.LENGTH_LONG).show();<NEW_LINE>}<NEW_LINE>}).doOnTerminate(() -> {<NEW_LINE>refreshInProgress = false;<NEW_LINE>ContextCompat.getSystemService(context, NotificationManager.class).cancel(NOTIFICATION_ID);<NEW_LINE>EventBus.getInstance().notifySubscriptionRefreshFinished();<NEW_LINE>}).subscribe());<NEW_LINE>return true;<NEW_LINE>}
).notifyChannelVideoFetchingFinished(newVideos > 0);
1,445,665
final DeregisterFromWorkMailResult executeDeregisterFromWorkMail(DeregisterFromWorkMailRequest deregisterFromWorkMailRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deregisterFromWorkMailRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeregisterFromWorkMailRequest> request = null;<NEW_LINE>Response<DeregisterFromWorkMailResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeregisterFromWorkMailRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deregisterFromWorkMailRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "WorkMail");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeregisterFromWorkMail");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeregisterFromWorkMailResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeregisterFromWorkMailResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
1,385,740
public void marshall(Workspace workspace, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (workspace == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(workspace.getWorkspaceId(), WORKSPACEID_BINDING);<NEW_LINE>protocolMarshaller.marshall(workspace.getDirectoryId(), DIRECTORYID_BINDING);<NEW_LINE>protocolMarshaller.marshall(workspace.getUserName(), USERNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(workspace.getIpAddress(), IPADDRESS_BINDING);<NEW_LINE>protocolMarshaller.marshall(workspace.getState(), STATE_BINDING);<NEW_LINE>protocolMarshaller.marshall(workspace.getBundleId(), BUNDLEID_BINDING);<NEW_LINE>protocolMarshaller.marshall(workspace.getSubnetId(), SUBNETID_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(workspace.getErrorCode(), ERRORCODE_BINDING);<NEW_LINE>protocolMarshaller.marshall(workspace.getComputerName(), COMPUTERNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(workspace.getVolumeEncryptionKey(), VOLUMEENCRYPTIONKEY_BINDING);<NEW_LINE>protocolMarshaller.marshall(workspace.getUserVolumeEncryptionEnabled(), USERVOLUMEENCRYPTIONENABLED_BINDING);<NEW_LINE>protocolMarshaller.marshall(workspace.getRootVolumeEncryptionEnabled(), ROOTVOLUMEENCRYPTIONENABLED_BINDING);<NEW_LINE>protocolMarshaller.marshall(workspace.getWorkspaceProperties(), WORKSPACEPROPERTIES_BINDING);<NEW_LINE>protocolMarshaller.marshall(workspace.getModificationStates(), MODIFICATIONSTATES_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
workspace.getErrorMessage(), ERRORMESSAGE_BINDING);
1,395,162
public DataFrame limit(final int numRows) {<NEW_LINE>if (numRows < 0 || numRows >= this.numRows) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>final DataFrame result = new DataFrame();<NEW_LINE>result.schema = this.schema.copy();<NEW_LINE>result.indexToTypeIndex = new ArrayList<>(this.indexToTypeIndex);<NEW_LINE>result.numRows = numRows;<NEW_LINE>final int numColumns = this.schema.getNumColumns();<NEW_LINE>for (int colIdx = 0; colIdx < numColumns; colIdx++) {<NEW_LINE>Schema.ColType t = result.schema.getColumnType(colIdx);<NEW_LINE>if (t == Schema.ColType.STRING) {<NEW_LINE>final String[] col = this.getStringColumn(colIdx);<NEW_LINE>final String[] newCol = new String[numRows];<NEW_LINE>for (int i = 0; i < numRows; ++i) {<NEW_LINE>newCol[i] = col[i];<NEW_LINE>}<NEW_LINE>result.stringCols.add(newCol);<NEW_LINE>} else if (t == Schema.ColType.DOUBLE) {<NEW_LINE>final double[] col = this.getDoubleColumn(colIdx);<NEW_LINE>final double[<MASK><NEW_LINE>for (int i = 0; i < numRows; ++i) {<NEW_LINE>newCol[i] = col[i];<NEW_LINE>}<NEW_LINE>result.doubleCols.add(newCol);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
] newCol = new double[numRows];
1,359,074
private <T extends HttpMessage> String registerWebSocketClient(ExpectationCallback<T> expectationCallback, ExpectationForwardAndResponseCallback expectationForwardResponseCallback) {<NEW_LINE>try {<NEW_LINE>String clientId = UUIDService.getUUID();<NEW_LINE><MASK><NEW_LINE>LocalCallbackRegistry.registerCallback(clientId, expectationForwardResponseCallback);<NEW_LINE>final WebSocketClient<T> webSocketClient = new WebSocketClient<>(new NioEventLoopGroup(configuration.webSocketClientEventLoopThreadCount(), new Scheduler.SchedulerThreadFactory(WebSocketClient.class.getSimpleName() + "-eventLoop")), clientId, mockServerLogger);<NEW_LINE>final Future<String> register = webSocketClient.registerExpectationCallback(expectationCallback, expectationForwardResponseCallback, mockServerClient.remoteAddress(), mockServerClient.contextPath(), mockServerClient.isSecure());<NEW_LINE>mockServerEventBus.subscribe(webSocketClient::stopClient, EventType.STOP, EventType.RESET);<NEW_LINE>return register.get(configuration.maxFutureTimeoutInMillis(), MILLISECONDS);<NEW_LINE>} catch (Exception e) {<NEW_LINE>if (e.getCause() instanceof WebSocketException) {<NEW_LINE>throw new ClientException(e.getCause().getMessage(), e);<NEW_LINE>} else {<NEW_LINE>throw new ClientException("Unable to retrieve client registration id", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
LocalCallbackRegistry.registerCallback(clientId, expectationCallback);
74,122
protected Object[] convertValuesToKeyType(Object[] values) {<NEW_LINE>if (values == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Object[] res = new Object[values.length];<NEW_LINE>for (int i = 0; i < values.length; i++) {<NEW_LINE>Object v = values[i];<NEW_LINE>if (v instanceof String) {<NEW_LINE>res[i] = keyConverter.fromStringSafe((String) v);<NEW_LINE>} else if (v instanceof Stream) {<NEW_LINE>res[i] = ((Stream<?>) v).map(o -> (o instanceof String) ? keyConverter.fromStringSafe((String) o) : o);<NEW_LINE>} else if (v instanceof Collection) {<NEW_LINE>res[i] = ((List<?>) v).stream().map(o -> (o instanceof String) ? keyConverter.fromStringSafe((String) o) : o).<MASK><NEW_LINE>} else if (v == null) {<NEW_LINE>res[i] = null;<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("Unknown type: " + v);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return res;<NEW_LINE>}
collect(Collectors.toList());
677,845
public void process(final Context ctx) throws Exception {<NEW_LINE>final FileObject file = ctx.file();<NEW_LINE>if (!file.getPath().startsWith(PANELS_FOLDER)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Object instanceCreate = ctx.instanceAttribute(file);<NEW_LINE>if (instanceCreate != null) {<NEW_LINE>ctx.addStandardAnnotationHint(new Callable<Void>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Void call() throws Exception {<NEW_LINE>if (!ctx.canAccess(REGISTRATION_BINARY)) {<NEW_LINE>DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(NavigatorHinter_missing_dep(), NotifyDescriptor.WARNING_MESSAGE));<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ctx.findAndModifyDeclaration(instanceCreate, new Context.ModifyDeclarationTask() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run(WorkingCopy wc, Element declaration, ModifiersTree modifiers) throws Exception {<NEW_LINE>Map<String, Object> params = new LinkedHashMap<String, Object>();<NEW_LINE>params.put("mimeType", file.getParent().getPath().substring(PANELS_FOLDER.length()));<NEW_LINE>params.put("position", file.getAttribute("position"));<NEW_LINE>params.put("displayName", "#TODO");<NEW_LINE>String canon = REGISTRATION_BINARY.replace('$', '.');<NEW_LINE>ModifiersTree nue = ctx.addAnnotation(wc, modifiers, <MASK><NEW_LINE>ctx.delete(file);<NEW_LINE>wc.rewrite(modifiers, GeneratorUtilities.get(wc).importFQNs(nue));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
canon, canon + "s", params);
260,032
public void run() throws IOException {<NEW_LINE>// h[0] = createProject(dirFO, name, "src", "test", preloaderClassName, // NOI18N<NEW_LINE>// JavaFXProjectWizardIterator.MANIFEST_FILE, librariesDefinition,<NEW_LINE>// platformName, null, WizardType.PRELOADER);<NEW_LINE>// NOI18N<NEW_LINE>h[0] = // NOI18N<NEW_LINE>createProject(// NOI18N<NEW_LINE>dirFO, // NOI18N<NEW_LINE>name, // NOI18N<NEW_LINE>"src", // NOI18N<NEW_LINE>"test", preloaderClassName, JavaFXProjectWizardIterator.MANIFEST_FILE, librariesDefinition, platformName, null, WizardType.PRELOADER);<NEW_LINE>final Project p = ProjectManager.getDefault().findProject(dirFO);<NEW_LINE>JFXProjectUtils.createJfxExtension(p, dirFO, WizardType.PRELOADER);<NEW_LINE>ProjectManager.getDefault().saveProject(p);<NEW_LINE>// NOI18N<NEW_LINE>JFXGeneratedFilesHelper.// NOI18N<NEW_LINE>generateBuildScriptFromStylesheet(// NOI18N<NEW_LINE>h[0], // NOI18N<NEW_LINE>GeneratedFilesHelper.BUILD_XML_PATH, JFXProjectGenerator.class.getResource("resources/build.xsl"));<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>ProjectManager.mutex().writeAccess(new Mutex.ExceptionAction<Void>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Void run() throws Exception {<NEW_LINE>copyRequiredLibraries(h[0], refHelper);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (MutexException ex) {<NEW_LINE>Exceptions.printStackTrace(ex.getException());<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>srcFolder[0] = dirFO.createFolder("src");<NEW_LINE>}
final ReferenceHelper refHelper = getReferenceHelper(p);
733,412
public static ListDpiConfigErrorResponse unmarshall(ListDpiConfigErrorResponse listDpiConfigErrorResponse, UnmarshallerContext _ctx) {<NEW_LINE>listDpiConfigErrorResponse.setRequestId(_ctx.stringValue("ListDpiConfigErrorResponse.RequestId"));<NEW_LINE>listDpiConfigErrorResponse.setNextToken(_ctx.stringValue("ListDpiConfigErrorResponse.NextToken"));<NEW_LINE>listDpiConfigErrorResponse.setTotal(_ctx.integerValue("ListDpiConfigErrorResponse.Total"));<NEW_LINE>listDpiConfigErrorResponse.setMaxResults(_ctx.integerValue("ListDpiConfigErrorResponse.MaxResults"));<NEW_LINE>List<DpiConfigErrorItem> dpiConfigError = new ArrayList<DpiConfigErrorItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListDpiConfigErrorResponse.DpiConfigError.Length"); i++) {<NEW_LINE>DpiConfigErrorItem dpiConfigErrorItem = new DpiConfigErrorItem();<NEW_LINE>dpiConfigErrorItem.setSN(_ctx.stringValue("ListDpiConfigErrorResponse.DpiConfigError[" + i + "].SN"));<NEW_LINE>dpiConfigErrorItem.setSmartAGId(_ctx.stringValue("ListDpiConfigErrorResponse.DpiConfigError[" + i + "].SmartAGId"));<NEW_LINE>dpiConfigErrorItem.setErrorType(_ctx.stringValue("ListDpiConfigErrorResponse.DpiConfigError[" + i + "].ErrorType"));<NEW_LINE>List<RuleConfigErrorListItem> ruleConfigErrorList = new ArrayList<RuleConfigErrorListItem>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("ListDpiConfigErrorResponse.DpiConfigError[" + i + "].RuleConfigErrorList.Length"); j++) {<NEW_LINE>RuleConfigErrorListItem ruleConfigErrorListItem = new RuleConfigErrorListItem();<NEW_LINE>ruleConfigErrorListItem.setRuleId(_ctx.stringValue("ListDpiConfigErrorResponse.DpiConfigError[" + i + "].RuleConfigErrorList[" + j + "].RuleId"));<NEW_LINE>List<String> dpiSignatureIds = new ArrayList<String>();<NEW_LINE>for (int k = 0; k < _ctx.lengthValue("ListDpiConfigErrorResponse.DpiConfigError[" + i + "].RuleConfigErrorList[" + j + "].DpiSignatureIds.Length"); k++) {<NEW_LINE>dpiSignatureIds.add(_ctx.stringValue("ListDpiConfigErrorResponse.DpiConfigError[" + i + "].RuleConfigErrorList[" + j + "].DpiSignatureIds[" + k + "]"));<NEW_LINE>}<NEW_LINE>ruleConfigErrorListItem.setDpiSignatureIds(dpiSignatureIds);<NEW_LINE>List<String> dpiGroupIds = new ArrayList<String>();<NEW_LINE>for (int k = 0; k < _ctx.lengthValue("ListDpiConfigErrorResponse.DpiConfigError[" + i + "].RuleConfigErrorList[" + j + "].DpiGroupIds.Length"); k++) {<NEW_LINE>dpiGroupIds.add(_ctx.stringValue("ListDpiConfigErrorResponse.DpiConfigError[" + i + "].RuleConfigErrorList[" + j <MASK><NEW_LINE>}<NEW_LINE>ruleConfigErrorListItem.setDpiGroupIds(dpiGroupIds);<NEW_LINE>ruleConfigErrorList.add(ruleConfigErrorListItem);<NEW_LINE>}<NEW_LINE>dpiConfigErrorItem.setRuleConfigErrorList(ruleConfigErrorList);<NEW_LINE>dpiConfigError.add(dpiConfigErrorItem);<NEW_LINE>}<NEW_LINE>listDpiConfigErrorResponse.setDpiConfigError(dpiConfigError);<NEW_LINE>return listDpiConfigErrorResponse;<NEW_LINE>}
+ "].DpiGroupIds[" + k + "]"));
22,196
public boolean consumed(final MessageExt msg, final String group) throws RemotingException, MQClientException, InterruptedException, MQBrokerException {<NEW_LINE>ConsumeStats <MASK><NEW_LINE>ClusterInfo ci = this.examineBrokerClusterInfo();<NEW_LINE>Iterator<Entry<MessageQueue, OffsetWrapper>> it = cstats.getOffsetTable().entrySet().iterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>Entry<MessageQueue, OffsetWrapper> next = it.next();<NEW_LINE>MessageQueue mq = next.getKey();<NEW_LINE>if (mq.getTopic().equals(msg.getTopic()) && mq.getQueueId() == msg.getQueueId()) {<NEW_LINE>BrokerData brokerData = ci.getBrokerAddrTable().get(mq.getBrokerName());<NEW_LINE>if (brokerData != null) {<NEW_LINE>String addr = RemotingUtil.convert2IpString(brokerData.getBrokerAddrs().get(MixAll.MASTER_ID));<NEW_LINE>if (RemotingUtil.socketAddress2String(msg.getStoreHost()).equals(addr)) {<NEW_LINE>if (next.getValue().getConsumerOffset() > msg.getQueueOffset()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
cstats = this.examineConsumeStats(group);
614,038
protected void onCreate(final Bundle b) {<NEW_LINE>super.onCreate(b);<NEW_LINE>if (Build.VERSION.SDK_INT >= 26) {<NEW_LINE>API26Wrapper.startForegroundService(this, new Intent(this, SensorListener.class));<NEW_LINE>} else {<NEW_LINE>startService(new Intent(this, SensorListener.class));<NEW_LINE>}<NEW_LINE>if (b == null) {<NEW_LINE>// Create new fragment and transaction<NEW_LINE>Fragment newFragment = new Fragment_Overview();<NEW_LINE>FragmentTransaction transaction = getFragmentManager().beginTransaction();<NEW_LINE>// Replace whatever is in the fragment_container view with this<NEW_LINE>// fragment,<NEW_LINE>// and add the transaction to the back stack<NEW_LINE>transaction.replace(android.R.id.content, newFragment);<NEW_LINE>// Commit the transaction<NEW_LINE>transaction.commit();<NEW_LINE>}<NEW_LINE>GoogleApiClient.Builder builder = new GoogleApiClient.Builder(this, this, this);<NEW_LINE>builder.addApi(Games.API, Games.GamesOptions.builder().build());<NEW_LINE>builder.addScope(Games.SCOPE_GAMES);<NEW_LINE>builder.addApi(Fitness.HISTORY_API);<NEW_LINE>builder.addApi(Fitness.RECORDING_API);<NEW_LINE>builder.addScope(new Scope(Scopes.FITNESS_ACTIVITY_READ_WRITE));<NEW_LINE>mGoogleApiClient = builder.build();<NEW_LINE>if (BuildConfig.DEBUG && Build.VERSION.SDK_INT >= 23 && PermissionChecker.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PermissionChecker.PERMISSION_GRANTED) {<NEW_LINE>requestPermissions(new String[] { Manifest<MASK><NEW_LINE>}<NEW_LINE>}
.permission.WRITE_EXTERNAL_STORAGE }, 0);
1,578,977
private static void updatePresentation(@Nullable ExecutionTarget target, @Nullable RunnerAndConfigurationSettings settings, @Nullable Project project, @Nonnull Presentation presentation) {<NEW_LINE>if (project != null && target != null && settings != null) {<NEW_LINE>String name = settings.getName();<NEW_LINE>if (target != DefaultExecutionTarget.INSTANCE) {<NEW_LINE>name <MASK><NEW_LINE>} else {<NEW_LINE>if (!settings.canRunOn(target)) {<NEW_LINE>name += " | Nothing to run on";<NEW_LINE>}<NEW_LINE>}<NEW_LINE>presentation.setText(name, false);<NEW_LINE>presentation.putClientProperty(ComboBoxButton.LIKE_BUTTON, null);<NEW_LINE>setConfigurationIcon(presentation, settings, project);<NEW_LINE>} else {<NEW_LINE>presentation.setTextValue(ExecutionLocalize.runComboBoxAddConfiguration());<NEW_LINE>presentation.putClientProperty(ComboBoxButton.LIKE_BUTTON, (Runnable) () -> {<NEW_LINE>ActionManager.getInstance().getAction(IdeActions.ACTION_EDIT_RUN_CONFIGURATIONS).actionPerformed(AnActionEvent.createFromDataContext("", null, DataManager.getInstance().getDataContext()));<NEW_LINE>});<NEW_LINE>presentation.setDescription(ActionsBundle.actionDescription(IdeActions.ACTION_EDIT_RUN_CONFIGURATIONS));<NEW_LINE>presentation.setIcon(null);<NEW_LINE>}<NEW_LINE>}
+= " | " + target.getDisplayName();
1,125,040
private static List<String> unzipFile(final ZipFile zipFile, File targetDirectory) throws IOException {<NEW_LINE>List<String> files = new ArrayList<>();<NEW_LINE>try {<NEW_LINE>// Zip Slip fix courtesy of snyk.io/research/zip-slip-vulnerability.<NEW_LINE>String canonicalDirPath = targetDirectory.getCanonicalPath() + File.separator;<NEW_LINE>for (ZipEntry entry : entries(zipFile)) {<NEW_LINE>File targetFile = new File(targetDirectory, entry.getName());<NEW_LINE>String canonicalFilePath = targetFile.getCanonicalPath();<NEW_LINE>if (!canonicalFilePath.startsWith(canonicalDirPath)) {<NEW_LINE>throw new IllegalArgumentException("Zip archive trying to write file outside of target dir: " + canonicalFilePath);<NEW_LINE>}<NEW_LINE>if (entry.isDirectory()) {<NEW_LINE>if (!targetFile.isDirectory() && !targetFile.mkdirs()) {<NEW_LINE>throw new IOException("Failed to create directory: " + targetFile.getAbsolutePath());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>File parentFile = targetFile.getParentFile();<NEW_LINE>if (!parentFile.isDirectory()) {<NEW_LINE>if (!parentFile.mkdirs()) {<NEW_LINE>throw new IOException("Failed to create directory: " + parentFile.getAbsolutePath());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Write the file to the destination.<NEW_LINE>new ByteSource() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public InputStream openStream() throws IOException {<NEW_LINE>return zipFile.getInputStream(entry);<NEW_LINE>}<NEW_LINE>}.copyTo(MoreFiles.asByteSink(targetFile.toPath()));<NEW_LINE>files.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>zipFile.close();<NEW_LINE>}<NEW_LINE>return files;<NEW_LINE>}
add(targetFile.getAbsolutePath());
74,461
public void marshall(BehaviorCriteria behaviorCriteria, AwsJsonWriter jsonWriter) throws Exception {<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (behaviorCriteria.getComparisonOperator() != null) {<NEW_LINE>String comparisonOperator = behaviorCriteria.getComparisonOperator();<NEW_LINE>jsonWriter.name("comparisonOperator");<NEW_LINE>jsonWriter.value(comparisonOperator);<NEW_LINE>}<NEW_LINE>if (behaviorCriteria.getValue() != null) {<NEW_LINE>MetricValue value = behaviorCriteria.getValue();<NEW_LINE>jsonWriter.name("value");<NEW_LINE>MetricValueJsonMarshaller.getInstance().marshall(value, jsonWriter);<NEW_LINE>}<NEW_LINE>if (behaviorCriteria.getDurationSeconds() != null) {<NEW_LINE>Integer durationSeconds = behaviorCriteria.getDurationSeconds();<NEW_LINE>jsonWriter.name("durationSeconds");<NEW_LINE>jsonWriter.value(durationSeconds);<NEW_LINE>}<NEW_LINE>if (behaviorCriteria.getConsecutiveDatapointsToAlarm() != null) {<NEW_LINE>Integer consecutiveDatapointsToAlarm = behaviorCriteria.getConsecutiveDatapointsToAlarm();<NEW_LINE>jsonWriter.name("consecutiveDatapointsToAlarm");<NEW_LINE>jsonWriter.value(consecutiveDatapointsToAlarm);<NEW_LINE>}<NEW_LINE>if (behaviorCriteria.getConsecutiveDatapointsToClear() != null) {<NEW_LINE>Integer consecutiveDatapointsToClear = behaviorCriteria.getConsecutiveDatapointsToClear();<NEW_LINE>jsonWriter.name("consecutiveDatapointsToClear");<NEW_LINE>jsonWriter.value(consecutiveDatapointsToClear);<NEW_LINE>}<NEW_LINE>if (behaviorCriteria.getStatisticalThreshold() != null) {<NEW_LINE>StatisticalThreshold statisticalThreshold = behaviorCriteria.getStatisticalThreshold();<NEW_LINE>jsonWriter.name("statisticalThreshold");<NEW_LINE>StatisticalThresholdJsonMarshaller.getInstance().marshall(statisticalThreshold, jsonWriter);<NEW_LINE>}<NEW_LINE>if (behaviorCriteria.getMlDetectionConfig() != null) {<NEW_LINE>MachineLearningDetectionConfig mlDetectionConfig = behaviorCriteria.getMlDetectionConfig();<NEW_LINE>jsonWriter.name("mlDetectionConfig");<NEW_LINE>MachineLearningDetectionConfigJsonMarshaller.getInstance(<MASK><NEW_LINE>}<NEW_LINE>jsonWriter.endObject();<NEW_LINE>}
).marshall(mlDetectionConfig, jsonWriter);
464,643
public int handleBasePlanEvent(final DefaultSubscriptionBase subscription, final SubscriptionBaseEvent event, final SubscriptionCatalog catalog, final CallContext context) throws CatalogApiException {<NEW_LINE>final InternalCallContext internalCallContext = createCallContextFromBundleId(subscription.getBundleId(), context);<NEW_LINE>if (((ApiEvent) event).getApiEventType() == ApiEventType.CANCEL || ((ApiEvent) event).getApiEventType() == ApiEventType.CHANGE) {<NEW_LINE>final Product baseProduct = (subscription.getState() == EntitlementState.CANCELLED) ? null : subscription.getCurrentPlan().getProduct();<NEW_LINE>final List<SubscriptionBaseEvent> cancelEvents <MASK><NEW_LINE>final List<DefaultSubscriptionBase> subscriptionsToBeCancelled = computeAddOnsToCancel(cancelEvents, baseProduct, subscription.getBundleId(), event.getEffectiveDate(), catalog, internalCallContext);<NEW_LINE>dao.cancelSubscriptionsOnBasePlanEvent(subscription, event, subscriptionsToBeCancelled, cancelEvents, catalog, internalCallContext);<NEW_LINE>return subscriptionsToBeCancelled.size();<NEW_LINE>} else {<NEW_LINE>dao.notifyOnBasePlanEvent(subscription, event, catalog, internalCallContext);<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>}
= new LinkedList<SubscriptionBaseEvent>();
1,670,448
final BatchStopUpdateActionResult executeBatchStopUpdateAction(BatchStopUpdateActionRequest batchStopUpdateActionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchStopUpdateActionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<BatchStopUpdateActionRequest> request = null;<NEW_LINE>Response<BatchStopUpdateActionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new BatchStopUpdateActionRequestMarshaller().marshall(super.beforeMarshalling(batchStopUpdateActionRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ElastiCache");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchStopUpdateAction");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<BatchStopUpdateActionResult> responseHandler = new StaxResponseHandler<BatchStopUpdateActionResult>(new BatchStopUpdateActionResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
535,708
public int transform(UserConnection user, CompoundTag tag) {<NEW_LINE>BlockStorage storage = user.get(BlockStorage.class);<NEW_LINE>Position position = new Position((int) getLong(tag.get("x")), (short) getLong(tag.get("y")), (int) getLong(<MASK><NEW_LINE>if (!storage.contains(position)) {<NEW_LINE>Via.getPlatform().getLogger().warning("Received an head update packet, but there is no head! O_o " + tag);<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>int id = storage.get(position).getOriginal();<NEW_LINE>if (id >= SKULL_WALL_START && id <= SKULL_END) {<NEW_LINE>Tag skullType = tag.get("SkullType");<NEW_LINE>if (skullType != null) {<NEW_LINE>id += ((NumberTag) tag.get("SkullType")).asInt() * 20;<NEW_LINE>}<NEW_LINE>if (tag.contains("Rot")) {<NEW_LINE>id += ((NumberTag) tag.get("Rot")).asInt();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>Via.getPlatform().getLogger().warning("Why does this block have the skull block entity? " + tag);<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>return id;<NEW_LINE>}
tag.get("z")));
1,731,861
final CompleteLifecycleActionResult executeCompleteLifecycleAction(CompleteLifecycleActionRequest completeLifecycleActionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(completeLifecycleActionRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CompleteLifecycleActionRequest> request = null;<NEW_LINE>Response<CompleteLifecycleActionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CompleteLifecycleActionRequestMarshaller().marshall(super.beforeMarshalling(completeLifecycleActionRequest));<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, "Auto Scaling");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CompleteLifecycleAction");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<CompleteLifecycleActionResult> responseHandler = new StaxResponseHandler<CompleteLifecycleActionResult>(new CompleteLifecycleActionResultStaxUnmarshaller());<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,693,442
public void writeExternal(Element rootElement) {<NEW_LINE>checkDisposed();<NEW_LINE><MASK><NEW_LINE>if (myName != null) {<NEW_LINE>element.setAttribute(LIBRARY_NAME_ATTR, myName);<NEW_LINE>}<NEW_LINE>if (myKind != null) {<NEW_LINE>element.setAttribute(LIBRARY_TYPE_ATTR, myKind.getKindId());<NEW_LINE>LOG.assertTrue(myProperties != null, "Properties is 'null' in library with kind " + myKind);<NEW_LINE>final Object state = myProperties.getState();<NEW_LINE>if (state != null) {<NEW_LINE>final Element propertiesElement = XmlSerializer.serialize(state);<NEW_LINE>if (propertiesElement != null) {<NEW_LINE>element.addContent(propertiesElement.setName(PROPERTIES_ELEMENT));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (OrderRootType rootType : OrderRootType.getSortedRootTypes()) {<NEW_LINE>VirtualFilePointerContainer roots = myRoots.get(rootType);<NEW_LINE>if (roots == null || roots.isEmpty()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final Element rootTypeElement = new Element(rootType.name());<NEW_LINE>if (roots != null) {<NEW_LINE>roots.writeExternal(rootTypeElement, ROOT_PATH_ELEMENT, false);<NEW_LINE>}<NEW_LINE>element.addContent(rootTypeElement);<NEW_LINE>}<NEW_LINE>if (myExcludedRoots != null && !myExcludedRoots.isEmpty()) {<NEW_LINE>Element excluded = new Element(EXCLUDED_ROOTS_TAG);<NEW_LINE>myExcludedRoots.writeExternal(excluded, ROOT_PATH_ELEMENT, false);<NEW_LINE>element.addContent(excluded);<NEW_LINE>}<NEW_LINE>writeJarDirectories(element);<NEW_LINE>rootElement.addContent(element);<NEW_LINE>}
Element element = new Element(ELEMENT);
677,318
public static void main(final String[] args) throws Exception {<NEW_LINE>final String s = "\nPGRpdiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94aHRtbCI+V2UncmUgcHJvcG9zaW5nIDxhIGhy\n" + "ZWY9Imh0dHA6Ly93d3cuZ29vZ2xlLmNvbS9jb3Jwb3JhdGUvc29mdHdhcmVfcHJpbmNpcGxlcy5odG1sIj5z\n" + "b21lIGd1aWRlbGluZXMgPC9hPnRvIGhlbHAgY3VyYiB0aGUgcHJvYmxlbSBvZiBJbnRlcm5ldCBzb2Z0d2Fy\n" + "ZSB0aGF0IGluc3RhbGxzIGl0c2VsZiB3aXRob3V0IHRlbGxpbmcgeW91LCBvciBiZWhhdmVzIGJhZGx5IG9u\n" + "Y2UgaXQgZ2V0cyBvbiB5b3VyIGNvbXB1dGVyLiBXZSd2ZSBiZWVuIGhlYXJpbmcgYSBsb3Qgb2YgY29tcGxh\n" + "aW50cyBhYm91dCB0aGlzIGxhdGVseSBhbmQgaXQgc2VlbXMgdG8gYmUgZ2V0dGluZyB3b3JzZS4gV2UgdGhp\n" + "bmsgaXQncyBpbXBvcnRhbnQgdGhhdCB5b3UgcmV0YWluIGNvbnRyb2wgb2YgeW91ciBjb21wdXRlciBhbmQg\n" <MASK><NEW_LINE>System.out.println(decode(s));<NEW_LINE>}
+ "dGhhdCB0aGVyZSBiZSBzb21lIGNsZWFyIHN0YW5kYXJkcyBpbiBvdXIgaW5kdXN0cnkuIExldCB1cyBrbm93\n" + "IGlmIHlvdSB0aGluayB0aGVzZSBndWlkZWxpbmVzIGFyZSB1c2VmdWwgb3IgaWYgeW91IGhhdmUgc3VnZ2Vz\n" + "dGlvbnMgdG8gaW1wcm92ZSB0aGVtLgo8YnIgLz4KPGJyIC8+Sm9uYXRoYW4gUm9zZW5iZXJnCjxiciAvPgo8\n" + "L2Rpdj4K\n";
91,168
protected void consumeNormalAnnotation(boolean isTypeAnnotation) {<NEW_LINE>// NormalTypeAnnotation ::= TypeAnnotationName '(' MemberValuePairsopt ')'<NEW_LINE>// NormalAnnotation ::= AnnotationName '(' MemberValuePairsopt ')'<NEW_LINE>NormalAnnotation normalAnnotation = null;<NEW_LINE>int oldIndex = this.identifierPtr;<NEW_LINE>TypeReference typeReference = getAnnotationType();<NEW_LINE>normalAnnotation = new NormalAnnotation(typeReference, this.intStack[this.intPtr--]);<NEW_LINE>int length;<NEW_LINE>if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {<NEW_LINE>System.arraycopy(this.astStack, (this.astPtr -= length) + 1, normalAnnotation.memberValuePairs = new MemberValuePair[length], 0, length);<NEW_LINE>}<NEW_LINE>normalAnnotation.declarationSourceEnd = this.rParenPos;<NEW_LINE>if (isTypeAnnotation) {<NEW_LINE>pushOnTypeAnnotationStack(normalAnnotation);<NEW_LINE>} else {<NEW_LINE>pushOnExpressionStack(normalAnnotation);<NEW_LINE>}<NEW_LINE>if (this.currentElement != null) {<NEW_LINE>annotationRecoveryCheckPoint(normalAnnotation.sourceStart, normalAnnotation.declarationSourceEnd);<NEW_LINE>if (this.currentElement instanceof RecoveredAnnotation) {<NEW_LINE>this.currentElement = ((RecoveredAnnotation) this.currentElement<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!this.statementRecoveryActivated && this.options.sourceLevel < ClassFileConstants.JDK1_5 && this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {<NEW_LINE>problemReporter().invalidUsageOfAnnotation(normalAnnotation);<NEW_LINE>}<NEW_LINE>this.recordStringLiterals = true;<NEW_LINE>}
).addAnnotation(normalAnnotation, oldIndex);
1,122,798
public synchronized void addTLCOutputSource(ITLCOutputSource source) {<NEW_LINE>Assert.isNotNull(source);<NEW_LINE>// TLCUIActivator.getDefault().logDebug("adding source " + source.getSourceName() + " " + source.getSourcePrio());<NEW_LINE>ITLCOutputSource existingSource = this.sources.get(source.getModel());<NEW_LINE>// a new source for a given name arrives which has a higher priority<NEW_LINE>// re-register the listeners<NEW_LINE>if (existingSource != null && source.getSourcePrio() >= existingSource.getSourcePrio()) {<NEW_LINE>ITLCOutputListener[] registered = existingSource.getListeners();<NEW_LINE>for (int i = 0; i < registered.length; i++) {<NEW_LINE>existingSource.removeTLCOutputListener(registered[i]);<NEW_LINE>source.addTLCOutputListener(registered[i]);<NEW_LINE>registered[i].onNewSource();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (existingSource == null) {<NEW_LINE>// the source didn't exist, but there is a data provider interested in this source<NEW_LINE>TLCModelLaunchDataProvider provider = providers.get(source.getModel());<NEW_LINE>if (provider != null) {<NEW_LINE>source.addTLCOutputListener(provider);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.sources.put(<MASK><NEW_LINE>printStats();<NEW_LINE>}
source.getModel(), source);
1,752,892
private static void printManagamentStatistic() {<NEW_LINE>OperatingSystemMXBean osMxBean = ManagementFactory.getOperatingSystemMXBean();<NEW_LINE>int processors = osMxBean.getAvailableProcessors();<NEW_LINE><MASK><NEW_LINE>Logger logger = STATISTIC_LOGGER;<NEW_LINE>logger.info("{} processors, started {}, up {}", processors, start, formatTime(runtimeMXBean.getUptime()));<NEW_LINE>ThreadMXBean threadMxBean = ManagementFactory.getThreadMXBean();<NEW_LINE>if (threadMxBean.isThreadCpuTimeSupported() && threadMxBean.isThreadCpuTimeEnabled()) {<NEW_LINE>long alltime = 0;<NEW_LINE>long[] ids = threadMxBean.getAllThreadIds();<NEW_LINE>for (long id : ids) {<NEW_LINE>long time = threadMxBean.getThreadCpuTime(id);<NEW_LINE>if (0 < time) {<NEW_LINE>alltime += time;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>long pTime = alltime / processors;<NEW_LINE>logger.info("cpu-time: {} ms (per-processor: {} ms)", TimeUnit.NANOSECONDS.toMillis(alltime), TimeUnit.NANOSECONDS.toMillis(pTime));<NEW_LINE>}<NEW_LINE>long gcCount = 0;<NEW_LINE>long gcTime = 0;<NEW_LINE>for (GarbageCollectorMXBean gcMxBean : ManagementFactory.getGarbageCollectorMXBeans()) {<NEW_LINE>long count = gcMxBean.getCollectionCount();<NEW_LINE>if (0 < count) {<NEW_LINE>gcCount += count;<NEW_LINE>}<NEW_LINE>long time = gcMxBean.getCollectionTime();<NEW_LINE>if (0 < time) {<NEW_LINE>gcTime += time;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>logger.info("gc: {} ms, {} calls", gcTime, gcCount);<NEW_LINE>double loadAverage = osMxBean.getSystemLoadAverage();<NEW_LINE>if (!(loadAverage < 0.0d)) {<NEW_LINE>logger.info("average load: {}", String.format("%.2f", loadAverage));<NEW_LINE>}<NEW_LINE>}
RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean();
1,700,668
byte[] toArray() {<NEW_LINE>ByteBuffer buffer = ByteBuffer.allocate(MAX_POSSIBLE_NODE_DATA_SIZE);<NEW_LINE>// Write data (compatible with version 0)<NEW_LINE>buffer.putInt(this.processingStatus);<NEW_LINE>buffer.putInt(this.priority);<NEW_LINE>buffer.putInt(this.numberOfCrashes);<NEW_LINE>buffer.putLong(this.completedDate);<NEW_LINE>buffer.putInt(this.errorsOccurred ? 1 : 0);<NEW_LINE>if (this.version >= 1) {<NEW_LINE>// Write version<NEW_LINE>buffer.putInt(this.version);<NEW_LINE>// Write data<NEW_LINE>putStringIntoBuffer(deviceId, buffer, TypeKind.BYTE);<NEW_LINE>putStringIntoBuffer(caseName, buffer, TypeKind.BYTE);<NEW_LINE>putStringIntoBuffer(caseDirectoryPath, buffer, TypeKind.SHORT);<NEW_LINE>buffer.putLong(this.manifestFileDate);<NEW_LINE>putStringIntoBuffer(manifestFilePath, buffer, TypeKind.SHORT);<NEW_LINE>putStringIntoBuffer(dataSourcePath, buffer, TypeKind.SHORT);<NEW_LINE>buffer.put(this.processingStage);<NEW_LINE>buffer.putLong(this.processingStageStartDate);<NEW_LINE>putStringIntoBuffer(this.<MASK><NEW_LINE>buffer.putLong(this.processingStageDetailsStartDate);<NEW_LINE>putStringIntoBuffer(processingHostName, buffer, TypeKind.SHORT);<NEW_LINE>if (this.version >= 2) {<NEW_LINE>buffer.putLong(this.dataSourceSize);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Prepare the array<NEW_LINE>byte[] array = new byte[buffer.position()];<NEW_LINE>buffer.rewind();<NEW_LINE>buffer.get(array, 0, array.length);<NEW_LINE>return array;<NEW_LINE>}
processingStageDetailsDescription, buffer, TypeKind.BYTE);
621,595
private InetSocketAddress slowSearchClientIP(final RegionClient client) {<NEW_LINE>String hostport = null;<NEW_LINE>synchronized (ip2client) {<NEW_LINE>for (final Map.Entry<String, RegionClient> e : ip2client.entrySet()) {<NEW_LINE>if (e.getValue() == client) {<NEW_LINE>hostport = e.getKey();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (hostport == null) {<NEW_LINE>HashMap<String, RegionClient> copy;<NEW_LINE>synchronized (ip2client) {<NEW_LINE>copy = new HashMap<String, RegionClient>(ip2client);<NEW_LINE>}<NEW_LINE>LOG.error(<MASK><NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>LOG.warn("Couldn't connect to the RegionServer @ " + hostport);<NEW_LINE>final int lastColon = hostport.lastIndexOf(':');<NEW_LINE>if (lastColon < 1) {<NEW_LINE>LOG.error("WTF? Should never happen! No `:' found in " + hostport);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final String host = getIP(hostport.substring(0, lastColon));<NEW_LINE>int port;<NEW_LINE>try {<NEW_LINE>port = parsePortNumber(hostport.substring(lastColon + 1, hostport.length()));<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>LOG.error("WTF? Should never happen! Bad port in " + hostport, e);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return new InetSocketAddress(host, port);<NEW_LINE>}
"WTF? Should never happen! Couldn't find " + client + " in " + copy);
1,065,377
private static int createEmptyBPT(BPTStateMgr stateMgr, BPTreeNodeMgr nodeManager, BPTreeRecordsMgr recordsMgr) {<NEW_LINE>// Create an empty records block.<NEW_LINE>nodeManager.startUpdate();<NEW_LINE>recordsMgr.startUpdate();<NEW_LINE>// Empty tree.<NEW_LINE>stateMgr.setState(0, 0, 0);<NEW_LINE>try {<NEW_LINE>BPTreeRecords recordsPage = recordsMgr.create();<NEW_LINE>if (recordsPage.getId() != BPlusTreeParams.RootId)<NEW_LINE>throw new DBOpEnvException("Root blocks must be at position zero (got " + recordsPage.getId() + ")");<NEW_LINE>// Empty data block.<NEW_LINE>recordsMgr.write(recordsPage);<NEW_LINE>recordsMgr.release(recordsPage);<NEW_LINE>// Not this - we haven't full initialized and the BPTreeRecords has null BPTreeRecordsMgr<NEW_LINE>// recordsPage.write();<NEW_LINE>// recordsPage.release();<NEW_LINE>BPTreeNode n = <MASK><NEW_LINE>// n.ptrs is currently invalid. count was 0 so thinks it has a pointer.<NEW_LINE>// Force to right layout.<NEW_LINE>// No pointers<NEW_LINE>n.ptrs.setSize(0);<NEW_LINE>// Add the page below<NEW_LINE>n.ptrs.add(recordsPage.getId());<NEW_LINE>// n.ptrs.set(0, page.getId()); // This is the same as the size is one.<NEW_LINE>n.setIsLeaf(true);<NEW_LINE>// Count is count of records.<NEW_LINE>n.setCount(0);<NEW_LINE>int rootId = n.getId();<NEW_LINE>nodeManager.write(n);<NEW_LINE>nodeManager.release(n);<NEW_LINE>// This makes the next blocks alocated 1 and 1 - just like a transaction.<NEW_LINE>// Blocks 0/0 are always an empty tree unless the bulk loader built the tree.<NEW_LINE>stateMgr.setState(0, 1, 1);<NEW_LINE>return rootId;<NEW_LINE>} finally {<NEW_LINE>recordsMgr.finishUpdate();<NEW_LINE>nodeManager.finishUpdate();<NEW_LINE>}<NEW_LINE>// stateMgr.setState(0, 1, 1);<NEW_LINE>}
nodeManager.createNode(BPlusTreeParams.RootParent);
266,276
private void prepareForUpdate(DeploymentExtendedInner inner) {<NEW_LINE>deploymentCreateUpdateParameters = new DeploymentInner();<NEW_LINE>deploymentCreateUpdateParameters.withLocation(inner.location());<NEW_LINE>deploymentCreateUpdateParameters.withTags(inner.tags());<NEW_LINE>if (inner.properties() != null) {<NEW_LINE>deploymentCreateUpdateParameters.withProperties(new DeploymentProperties());<NEW_LINE>deploymentCreateUpdateParameters.properties().withDebugSetting(inner.properties().debugSetting());<NEW_LINE>deploymentCreateUpdateParameters.properties().withMode(inner.<MASK><NEW_LINE>deploymentCreateUpdateParameters.properties().withParameters(inner.properties().parameters());<NEW_LINE>deploymentCreateUpdateParameters.properties().withParametersLink(inner.properties().parametersLink());<NEW_LINE>deploymentCreateUpdateParameters.properties().withTemplateLink(inner.properties().templateLink());<NEW_LINE>if (inner.properties().onErrorDeployment() != null) {<NEW_LINE>deploymentCreateUpdateParameters.properties().withOnErrorDeployment(new OnErrorDeployment());<NEW_LINE>deploymentCreateUpdateParameters.properties().onErrorDeployment().withDeploymentName(inner.properties().onErrorDeployment().deploymentName());<NEW_LINE>deploymentCreateUpdateParameters.properties().onErrorDeployment().withType(inner.properties().onErrorDeployment().type());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
properties().mode());
50,261
// RA-Lifecycle ///////////////////////////////////////////////////<NEW_LINE>public void start(BootstrapContext ctx) throws ResourceAdapterInternalException {<NEW_LINE>try {<NEW_LINE>Class.forName(ORG_CAMUNDA_BPM_ENGINE_PROCESS_ENGINE);<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.info("ProcessEngine classes not found in shared libraries. Not initializing camunda Platform JobExecutor Resource Adapter.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// initialize the ExecutorService (CommonJ or JCA, depending on configuration)<NEW_LINE>if (isUseCommonJWorkManager) {<NEW_LINE>if (commonJWorkManagerName != null & commonJWorkManagerName.length() > 0) {<NEW_LINE>executorServiceWrapper.setExecutorService(new CommonJWorkManagerExecutorService(this, commonJWorkManagerName));<NEW_LINE>} else {<NEW_LINE>throw new RuntimeException("Resource Adapter configuration property 'isUseCommonJWorkManager' is set to true but 'commonJWorkManagerName' is not provided.");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>executorServiceWrapper.setExecutorService(new JcaWorkManagerExecutorService(this, ctx.getWorkManager()));<NEW_LINE>}<NEW_LINE>log.<MASK><NEW_LINE>}
log(Level.INFO, "Camunda Platform executor service started.");
1,363,256
public static int compareEventDates(Event one, Event two) {<NEW_LINE><MASK><NEW_LINE>ZonedDateTime startDate = DateUtils.getDate(one.getStartsAt());<NEW_LINE>ZonedDateTime endDate = DateUtils.getDate(one.getEndsAt());<NEW_LINE>ZonedDateTime otherStartDate = DateUtils.getDate(two.getStartsAt());<NEW_LINE>ZonedDateTime otherEndDate = DateUtils.getDate(two.getEndsAt());<NEW_LINE>if (endDate.isBefore(now) || otherEndDate.isBefore(now)) {<NEW_LINE>// one of them is past and other can be past or live or upcoming<NEW_LINE>return endDate.isAfter(otherEndDate) ? -1 : 1;<NEW_LINE>} else {<NEW_LINE>if (startDate.isAfter(now) || otherStartDate.isAfter(now)) {<NEW_LINE>// one of them is upcoming other can be upcoming or live<NEW_LINE>return startDate.isBefore(otherStartDate) ? -1 : 1;<NEW_LINE>} else {<NEW_LINE>// both are live<NEW_LINE>return startDate.isAfter(otherStartDate) ? -1 : 1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
ZonedDateTime now = ZonedDateTime.now();
606,400
private JPanel createScrollPanes() {<NEW_LINE>final JPanel panel = new JPanel();<NEW_LINE>panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));<NEW_LINE>panel.setOpaque(false);<NEW_LINE>for (final Map.Entry<String, List<ProcessInformations>> entry : processInformationsByTitle.entrySet()) {<NEW_LINE>final String title;<NEW_LINE>if (processInformationsByTitle.size() == 1) {<NEW_LINE>title = getString("Processus");<NEW_LINE>} else {<NEW_LINE>title = entry.getKey();<NEW_LINE>}<NEW_LINE>final List<ProcessInformations> processInformationsList = entry.getValue();<NEW_LINE>final boolean windows = HtmlProcessInformationsReport.isWindowsProcessList(processInformationsList);<NEW_LINE>final MTableScrollPane<ProcessInformations> tableScrollPane = new MTableScrollPane<>();<NEW_LINE>final MTable<ProcessInformations> table = tableScrollPane.getTable();<NEW_LINE>table.addColumn<MASK><NEW_LINE>table.addColumn("pid", getString("PID"));<NEW_LINE>if (!windows) {<NEW_LINE>table.addColumn("cpuPercentage", getString("cpu"));<NEW_LINE>table.addColumn("memPercentage", getString("mem"));<NEW_LINE>}<NEW_LINE>table.addColumn("vsz", getString("vsz"));<NEW_LINE>if (!windows) {<NEW_LINE>table.addColumn("rss", getString("rss"));<NEW_LINE>table.addColumn("tty", getString("tty"));<NEW_LINE>table.addColumn("stat", getString("stat"));<NEW_LINE>table.addColumn("start", getString("start"));<NEW_LINE>}<NEW_LINE>table.addColumn("cpuTime", getString("cpuTime"));<NEW_LINE>table.addColumn("command", getString("command"));<NEW_LINE>table.setList(processInformationsList);<NEW_LINE>final JLabel titleLabel = Utilities.createParagraphTitle(title, "processes.png");<NEW_LINE>panel.add(titleLabel);<NEW_LINE>panel.add(tableScrollPane);<NEW_LINE>if (!windows) {<NEW_LINE>final MHyperLink hyperLink = new MHyperLink(" ps command reference", "http://en.wikipedia.org/wiki/Ps_(Unix)");<NEW_LINE>panel.add(hyperLink);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (final Component component : panel.getComponents()) {<NEW_LINE>((JComponent) component).setAlignmentX(Component.LEFT_ALIGNMENT);<NEW_LINE>}<NEW_LINE>return panel;<NEW_LINE>}
("user", getString("Utilisateur"));
1,237,445
public ListOperationsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListOperationsResult listOperationsResult = new ListOperationsResult();<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 listOperationsResult;<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("Operations", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listOperationsResult.setOperations(new ListUnmarshaller<OperationSummary>(OperationSummaryJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("NextPageMarker", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listOperationsResult.setNextPageMarker(context.getUnmarshaller(String.<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 listOperationsResult;<NEW_LINE>}
class).unmarshall(context));
500,798
private void declareConfigMethods() {<NEW_LINE>supervisor.addMethod(JRTMethods.createConfigV3GetConfigMethod(this::getConfigV3));<NEW_LINE>supervisor.addMethod(new Method("ping", "", "i", this::ping).methodDesc("ping").returnDesc(0, "ret code", "return code, 0 is OK"));<NEW_LINE>supervisor.addMethod(new Method("listCachedConfig", "", "S", this::listCachedConfig).methodDesc("list cached configs)").returnDesc(0, "data", "string array of configs"));<NEW_LINE>supervisor.addMethod(new Method("listCachedConfigFull", "", "S", this::listCachedConfigFull).methodDesc("list cached configs with cache content)").returnDesc(0, "data", "string array of configs"));<NEW_LINE>supervisor.addMethod(new Method("listSourceConnections", "", "S", this::listSourceConnections).methodDesc("list config source connections)").returnDesc(0, "data", "string array of source connections"));<NEW_LINE>supervisor.addMethod(new Method("invalidateCache", "", "S", this::invalidateCache).methodDesc("list config source connections)").returnDesc<MASK><NEW_LINE>supervisor.addMethod(new Method("updateSources", "s", "s", this::updateSources).methodDesc("update list of config sources").returnDesc(0, "ret", "list of updated config sources"));<NEW_LINE>supervisor.addMethod(new Method("setMode", "s", "S", this::setMode).methodDesc("Set config proxy mode { default | memorycache }").returnDesc(0, "ret", "0 if success, 1 otherwise as first element, description as second element"));<NEW_LINE>supervisor.addMethod(new Method("getMode", "", "s", this::getMode).methodDesc("What serving mode the config proxy is in (default, memorycache)").returnDesc(0, "ret", "mode as a string"));<NEW_LINE>supervisor.addMethod(new Method("dumpCache", "s", "s", this::dumpCache).methodDesc("Dump cache to disk").paramDesc(0, "path", "path to write cache contents to").returnDesc(0, "ret", "Empty string or error message"));<NEW_LINE>}
(0, "data", "0 if success, 1 otherwise"));
1,174,947
private static Map<TypeAlias, jnr.ffi.NativeType> buildTypeMap() {<NEW_LINE>Map<TypeAlias, jnr.ffi.NativeType> m = new EnumMap<TypeAlias, jnr.ffi.NativeType>(TypeAlias.class);<NEW_LINE>m.put(TypeAlias.int8_t, NativeType.SCHAR);<NEW_LINE>m.put(TypeAlias.u_int8_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.int16_t, NativeType.SSHORT);<NEW_LINE>m.put(TypeAlias.u_int16_t, NativeType.USHORT);<NEW_LINE>m.put(<MASK><NEW_LINE>m.put(TypeAlias.u_int32_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.int64_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.u_int64_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.intptr_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.uintptr_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.caddr_t, NativeType.ADDRESS);<NEW_LINE>m.put(TypeAlias.dev_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.blkcnt_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.blksize_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.gid_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.in_addr_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.in_port_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.ino_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.ino64_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.key_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.mode_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.nlink_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.id_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.pid_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.off_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.swblk_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.uid_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.clock_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.size_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.ssize_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.time_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.fsblkcnt_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.fsfilcnt_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.sa_family_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.socklen_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.rlim_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.cc_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.speed_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.tcflag_t, NativeType.UINT);<NEW_LINE>return m;<NEW_LINE>}
TypeAlias.int32_t, NativeType.SINT);
446,290
public static List<ErrorDescription> computeWarning(HintContext ctx) {<NEW_LINE>Result tags = TagParser.parseTags(ctx.getInfo());<NEW_LINE>List<ErrorDescription> result = new ArrayList<>();<NEW_LINE>for (Tag tag : tags.getTags()) {<NEW_LINE>if (!"compile".equals(tag.getName())) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String[] params = tag.getValue().split("[\\s]+");<NEW_LINE>boolean hasEnablePreview = Arrays.stream(params).anyMatch(s -> "--enable-preview".equals(s));<NEW_LINE>if (hasEnablePreview) {<NEW_LINE>for (int i = 0; i < params.length; i++) {<NEW_LINE>if ((params[i].equals("-source") || params[i].equals("--source")) && i + 1 < params.length) {<NEW_LINE>try {<NEW_LINE>Integer.parseInt(params[i + 1]);<NEW_LINE>int pos = tag.getValue().indexOf(params[i]);<NEW_LINE>int start = tag.getValue().indexOf(params[i + 1], pos) + tag.getTagEnd();<NEW_LINE>int end = start + params[i + 1].length();<NEW_LINE>ErrorDescription idealED = ErrorDescriptionFactory.forName(ctx, ctx.getPath(), Bundle.ERR_HardcodedSource(), new UseJdkSource(ctx.getInfo(), ctx.getPath(), start<MASK><NEW_LINE>result.add(org.netbeans.spi.editor.hints.ErrorDescriptionFactory.createErrorDescription(idealED.getSeverity(), idealED.getDescription(), idealED.getFixes(), ctx.getInfo().getFileObject(), start, end));<NEW_LINE>} catch (NumberFormatException ex) {<NEW_LINE>// OK<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
, end).toEditorFix());
1,136,252
public FixResult fix() {<NEW_LINE>Position errorPosition = err.getErrorPosition();<NEW_LINE>Pair<IToken, IToken> tokens = queryTokenProcessor.getNearbyTokens(query, errorPosition.getRow(), errorPosition.getColumn());<NEW_LINE>// Find the similar keywords that can replace the right token.<NEW_LINE>List<String> rightTokenKeywords = findSimilarKeywords(tokens.getRight());<NEW_LINE>List<FixOption> options = filterKeywordsAndToFixOptions(tokens.getRight(), rightTokenKeywords, /*offsetErrorPosition=*/<NEW_LINE>false);<NEW_LINE>// Find the similar keywords that can replace the left token.<NEW_LINE>List<String> leftTokenKeywords = findSimilarKeywords(tokens.getLeft());<NEW_LINE>List<FixOption> leftTokenOptions = filterKeywordsAndToFixOptions(tokens.getLeft(), leftTokenKeywords, /*offsetErrorPosition=*/<NEW_LINE>true);<NEW_LINE>options.addAll(leftTokenOptions);<NEW_LINE>if (options.isEmpty()) {<NEW_LINE>return FixResult.failure(query, err);<NEW_LINE>}<NEW_LINE>String approach = String.format("Replace `%s` or `%s`", tokens.getLeft(<MASK><NEW_LINE>return FixResult.success(query, approach, options, err, /*isConfident=*/<NEW_LINE>false);<NEW_LINE>}
), tokens.getRight());
359,803
public void updateCells() {<NEW_LINE>int rowIndex = getSkinnable().getIndex();<NEW_LINE>if (rowIndex >= 0) {<NEW_LINE>GridView<T> gridView = getSkinnable().getGridView();<NEW_LINE>int maxCellsInRow = ((GridViewSkin<?>) gridView.getSkin()).computeMaxCellsInRow();<NEW_LINE>int totalCellsInGrid = gridView.getItems().size();<NEW_LINE>int startCellIndex = rowIndex * maxCellsInRow;<NEW_LINE>int endCellIndex = startCellIndex + maxCellsInRow - 1;<NEW_LINE>int cacheIndex = 0;<NEW_LINE>for (int cellIndex = startCellIndex; cellIndex <= endCellIndex; cellIndex++, cacheIndex++) {<NEW_LINE>if (cellIndex < totalCellsInGrid) {<NEW_LINE>// Check if we can re-use a cell at this index or create a new one<NEW_LINE>GridCell<<MASK><NEW_LINE>if (cell == null) {<NEW_LINE>cell = createCell();<NEW_LINE>getChildren().add(cell);<NEW_LINE>}<NEW_LINE>cell.updateIndex(-1);<NEW_LINE>cell.updateIndex(cellIndex);<NEW_LINE>} else // we are going out of bounds -> exist the loop<NEW_LINE>{<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// In case we are re-using a row that previously had more cells than<NEW_LINE>// this one, we need to remove the extra cells that remain<NEW_LINE>getChildren().remove(cacheIndex, getChildren().size());<NEW_LINE>}<NEW_LINE>}
T> cell = getCellAtIndex(cacheIndex);
528,720
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {<NEW_LINE>super.onLayout(changed, left, top, right, bottom);<NEW_LINE>final float density = getContext().getResources().getDisplayMetrics().density;<NEW_LINE>mDiameter = Math.min(getMeasuredWidth(), getMeasuredHeight());<NEW_LINE>if (mDiameter <= 0) {<NEW_LINE>mDiameter = (int) density * DEFAULT_CIRCLE_DIAMETER;<NEW_LINE>}<NEW_LINE>if (getBackground() == null && mCircleBackgroundEnabled) {<NEW_LINE>final int shadowYOffset = (int) (density * Y_OFFSET);<NEW_LINE>final int shadowXOffset = <MASK><NEW_LINE>mShadowRadius = (int) (density * SHADOW_RADIUS);<NEW_LINE>if (elevationSupported()) {<NEW_LINE>if (mBgCircle == null) {<NEW_LINE>mBgCircle = new ShapeDrawable(new OvalShape());<NEW_LINE>}<NEW_LINE>ViewCompat.setElevation(this, SHADOW_ELEVATION * density);<NEW_LINE>} else {<NEW_LINE>if (!(mBgCircle != null && mBgCircle.getShape() instanceof OvalShadow && ((OvalShadow) mBgCircle.getShape()).mCircleDiameter == (mDiameter - mShadowRadius * 2) && ((OvalShadow) mBgCircle.getShape()).mShadowRadius == mShadowRadius)) {<NEW_LINE>OvalShape oval = new OvalShadow(mShadowRadius, mDiameter - mShadowRadius * 2);<NEW_LINE>mBgCircle = new ShapeDrawable(oval);<NEW_LINE>}<NEW_LINE>ViewCompat.setLayerType(this, ViewCompat.LAYER_TYPE_SOFTWARE, mBgCircle.getPaint());<NEW_LINE>mBgCircle.getPaint().setShadowLayer(mShadowRadius, shadowXOffset, shadowYOffset, KEY_SHADOW_COLOR);<NEW_LINE>final int padding = (int) mShadowRadius;<NEW_LINE>// set padding so the inner image sits correctly within the shadow.<NEW_LINE>setPadding(padding, padding, padding, padding);<NEW_LINE>}<NEW_LINE>mBgCircle.getPaint().setColor(mBackGroundColor);<NEW_LINE>setBackgroundDrawable(mBgCircle);<NEW_LINE>}<NEW_LINE>mProgressDrawable.setBackgroundColor(mBackGroundColor);<NEW_LINE>mProgressDrawable.setColorSchemeColors(mColors);<NEW_LINE>if (isShowArrow()) {<NEW_LINE>mProgressDrawable.setArrowScale(1f);<NEW_LINE>mProgressDrawable.showArrow(true);<NEW_LINE>}<NEW_LINE>super.setImageDrawable(null);<NEW_LINE>super.setImageDrawable(mProgressDrawable);<NEW_LINE>mProgressDrawable.setAlpha(255);<NEW_LINE>if (getVisibility() == VISIBLE) {<NEW_LINE>mProgressDrawable.setStartEndTrim(0, (float) 0.8);<NEW_LINE>}<NEW_LINE>}
(int) (density * X_OFFSET);
1,211,694
protected void renderAsyncOutput(HttpServletRequest request, HttpServletResponse response, App app, RenderContext renderContext, DOMNode rootElement, final long requestStartTime) throws IOException {<NEW_LINE>final AsyncContext async = request.startAsync();<NEW_LINE>final ServletOutputStream out = async<MASK><NEW_LINE>final AtomicBoolean finished = new AtomicBoolean(false);<NEW_LINE>final DOMNode rootNode = rootElement;<NEW_LINE>setCustomResponseHeaders(response);<NEW_LINE>response.setContentType("application/pdf");<NEW_LINE>response.setHeader("Content-Disposition", "attachment;filename=\"FileName.pdf\"");<NEW_LINE>threadPool.submit(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try (final Tx tx = app.tx()) {<NEW_LINE>// render<NEW_LINE>rootNode.render(renderContext, 0);<NEW_LINE>finished.set(true);<NEW_LINE>tx.success();<NEW_LINE>} catch (Throwable t) {<NEW_LINE>logger.warn("Error while rendering page {}: {}", rootNode.getName(), t.getMessage());<NEW_LINE>logger.warn(ExceptionUtils.getStackTrace(t));<NEW_LINE>try {<NEW_LINE>response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);<NEW_LINE>finished.set(true);<NEW_LINE>} catch (IOException ex) {<NEW_LINE>logger.warn("", ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// start output write listener<NEW_LINE>out.setWriteListener(new WriteListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onWritePossible() throws IOException {<NEW_LINE>try {<NEW_LINE>final Queue<String> queue = renderContext.getBuffer().getQueue();<NEW_LINE>String pageContent = "";<NEW_LINE>while (out.isReady()) {<NEW_LINE>String buffer = null;<NEW_LINE>synchronized (queue) {<NEW_LINE>buffer = queue.poll();<NEW_LINE>}<NEW_LINE>if (buffer != null) {<NEW_LINE>pageContent += buffer;<NEW_LINE>} else {<NEW_LINE>if (finished.get()) {<NEW_LINE>// TODO: implement parameters for wkhtmltopdf in settings<NEW_LINE>Pdf pdf = new Pdf();<NEW_LINE>pdf.addPageFromString(pageContent);<NEW_LINE>out.write(pdf.getPDF());<NEW_LINE>async.complete();<NEW_LINE>// prevent this block from being called again<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>Thread.sleep(1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (EofException ee) {<NEW_LINE>logger.warn("Could not flush the response body content to the client, probably because the network connection was terminated.");<NEW_LINE>} catch (IOException | InterruptedException t) {<NEW_LINE>logger.warn("Unexpected exception", t);<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onError(Throwable t) {<NEW_LINE>if (t instanceof EofException) {<NEW_LINE>logger.warn("Could not flush the response body content to the client, probably because the network connection was terminated.");<NEW_LINE>} else {<NEW_LINE>logger.warn("Unexpected exception", t);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
.getResponse().getOutputStream();
942,475
public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@name('s0') select 1 in (longBoxed, intArr, longMap, intCol) as resOne, 1 not in (longBoxed, intArr, longMap, intCol) as resTwo from SupportBeanArrayCollMap";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>String[] fields = "resOne, resTwo".split(",");<NEW_LINE>sendArrayCollMap(env, new SupportBeanArrayCollMap(1L, new int[0], new Long[0], new int[0]));<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { true, false });<NEW_LINE>sendArrayCollMap(env, new SupportBeanArrayCollMap(2L, null, new Long[0], new int[0]));<NEW_LINE>env.assertPropsNew("s0", fields, new Object<MASK><NEW_LINE>sendArrayCollMap(env, new SupportBeanArrayCollMap(null, null, null, new int[] { 3, 4, 5, 6, 7, 7, 7, 8, 8, 8, 1 }));<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { true, false });<NEW_LINE>sendArrayCollMap(env, new SupportBeanArrayCollMap(-1L, null, new Long[] { 1L }, new int[] { 3, 4, 5, 6, 7, 7, 7, 8, 8 }));<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { false, true });<NEW_LINE>sendArrayCollMap(env, new SupportBeanArrayCollMap(-1L, new int[] { 1 }, null, new int[] {}));<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { true, false });<NEW_LINE>env.undeployAll();<NEW_LINE>}
[] { false, true });
680,076
// DELETE /api/admin/elevateword/setting/{id}<NEW_LINE>@Execute<NEW_LINE>public JsonResponse<ApiResult> delete$setting(final String id) {<NEW_LINE>try {<NEW_LINE>elevateWordService.getElevateWord(id).ifPresent(entity -> {<NEW_LINE>try {<NEW_LINE>elevateWordService.delete(entity);<NEW_LINE>suggestHelper.deleteElevateWord(entity.getSuggestWord(), false);<NEW_LINE>saveInfo(messages -> messages.addSuccessCrudDeleteCrudTable(GLOBAL));<NEW_LINE>} catch (final Exception e) {<NEW_LINE>throwValidationErrorApi(messages -> messages.addErrorsCrudFailedToDeleteCrudTable(GLOBAL, buildThrowableMessage(e)));<NEW_LINE>}<NEW_LINE>}).orElse(() -> {<NEW_LINE>throwValidationErrorApi(messages -> messages<MASK><NEW_LINE>});<NEW_LINE>} catch (final Exception e) {<NEW_LINE>throwValidationErrorApi(messages -> messages.addErrorsCrudFailedToDeleteCrudTable(GLOBAL, buildThrowableMessage(e)));<NEW_LINE>}<NEW_LINE>return asJson(new ApiResult.ApiUpdateResponse().id(id).created(false).status(ApiResult.Status.OK).result());<NEW_LINE>}
.addErrorsCrudCouldNotFindCrudTable(GLOBAL, id));
448,214
public Object initHtmlComponent(JComponent c, Consumer<String> titleDisplayer) {<NEW_LINE>JFXPanel p = (JFXPanel) c;<NEW_LINE>Platform.setImplicitExit(false);<NEW_LINE>WebView webView = new WebView();<NEW_LINE>BorderPane bp = new BorderPane();<NEW_LINE>Scene scene = new <MASK><NEW_LINE>class X implements ChangeListener<String>, Runnable {<NEW_LINE><NEW_LINE>private String title;<NEW_LINE><NEW_LINE>public X() {<NEW_LINE>super();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void changed(ObservableValue<? extends String> ov, String t, String t1) {<NEW_LINE>title = webView.getEngine().getTitle();<NEW_LINE>EventQueue.invokeLater(this);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>if (title != null) {<NEW_LINE>titleDisplayer.accept(title);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final X x = new X();<NEW_LINE>webView.getEngine().titleProperty().addListener(x);<NEW_LINE>HtmlToolkit.getDefault().execute(x);<NEW_LINE>bp.setCenter(webView);<NEW_LINE>p.setScene(scene);<NEW_LINE>return webView;<NEW_LINE>}
Scene(bp, Color.ALICEBLUE);
1,583,140
public Request<UpdateScalingParametersRequest> marshall(UpdateScalingParametersRequest updateScalingParametersRequest) {<NEW_LINE>if (updateScalingParametersRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<UpdateScalingParametersRequest> request = new DefaultRequest<UpdateScalingParametersRequest>(updateScalingParametersRequest, "AmazonCloudSearchv2");<NEW_LINE>request.addParameter("Action", "UpdateScalingParameters");<NEW_LINE>request.addParameter("Version", "2013-01-01");<NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>if (updateScalingParametersRequest.getDomainName() != null) {<NEW_LINE>request.addParameter("DomainName", StringUtils.fromString(updateScalingParametersRequest.getDomainName()));<NEW_LINE>}<NEW_LINE>{<NEW_LINE><MASK><NEW_LINE>if (scalingParameters != null) {<NEW_LINE>if (scalingParameters.getDesiredInstanceType() != null) {<NEW_LINE>request.addParameter("ScalingParameters.DesiredInstanceType", StringUtils.fromString(scalingParameters.getDesiredInstanceType()));<NEW_LINE>}<NEW_LINE>if (scalingParameters.getDesiredReplicationCount() != null) {<NEW_LINE>request.addParameter("ScalingParameters.DesiredReplicationCount", StringUtils.fromInteger(scalingParameters.getDesiredReplicationCount()));<NEW_LINE>}<NEW_LINE>if (scalingParameters.getDesiredPartitionCount() != null) {<NEW_LINE>request.addParameter("ScalingParameters.DesiredPartitionCount", StringUtils.fromInteger(scalingParameters.getDesiredPartitionCount()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
ScalingParameters scalingParameters = updateScalingParametersRequest.getScalingParameters();
1,021,367
boolean isACloudstackUser(final LdapUserResponse ldapUser) {<NEW_LINE>if (s_logger.isTraceEnabled()) {<NEW_LINE>s_logger.trace("checking response : " + ldapUser.toString());<NEW_LINE>}<NEW_LINE>final List<UserResponse> cloudstackUsers = getCloudstackUsers();<NEW_LINE>if (cloudstackUsers != null && cloudstackUsers.size() != 0) {<NEW_LINE>for (final UserResponse cloudstackUser : cloudstackUsers) {<NEW_LINE>if (ldapUser.getUsername().equals(cloudstackUser.getUsername())) {<NEW_LINE>if (s_logger.isTraceEnabled()) {<NEW_LINE>s_logger.trace(String.format("found user %s in cloudstack user %s", ldapUser.getUsername(), cloudstackUser.getUsername()));<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>if (s_logger.isTraceEnabled()) {<NEW_LINE>s_logger.trace(String.format("ldap user %s does not match cloudstack user %s", ldapUser.getUsername()<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
, cloudstackUser.getUsername()));
1,181,492
protected void activateChannel(@Nullable BluetoothCharacteristic characteristic, ChannelTypeUID channelTypeUID, @Nullable String name) {<NEW_LINE>if (characteristic != null) {<NEW_LINE>String channelId = name != null ? name : characteristic.getGattCharacteristic().name();<NEW_LINE>if (channelId == null) {<NEW_LINE>// use the type id as a fallback<NEW_LINE>channelId = channelTypeUID.getId();<NEW_LINE>}<NEW_LINE>if (getThing().getChannel(channelId) == null) {<NEW_LINE>// the channel does not exist yet, so let's add it<NEW_LINE>ThingBuilder updatedThing = editThing();<NEW_LINE>Channel channel = ChannelBuilder.create(new ChannelUID(getThing().getUID(), channelId), "Number").<MASK><NEW_LINE>updatedThing.withChannel(channel);<NEW_LINE>updateThing(updatedThing.build());<NEW_LINE>logger.debug("Added channel '{}' to Thing '{}'", channelId, getThing().getUID());<NEW_LINE>}<NEW_LINE>deviceCharacteristics.add(characteristic);<NEW_LINE>device.enableNotifications(characteristic);<NEW_LINE>if (isLinked(channelId)) {<NEW_LINE>device.readCharacteristic(characteristic);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>logger.debug("Characteristic is null - not activating any channel.");<NEW_LINE>}<NEW_LINE>}
withType(channelTypeUID).build();
559,044
private Properties loadConfig() {<NEW_LINE>Properties properties = defaultProperties();<NEW_LINE>Iterator<String> it = Config.getKeys();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>final String key = it.next();<NEW_LINE>if (key == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (key.startsWith("felix.")) {<NEW_LINE>final String value = (UtilMethods.isSet(Config.getStringProperty(key, null))) ? Config.getStringProperty(key) : null;<NEW_LINE>String felixKey = key.substring(6);<NEW_LINE>properties.put(felixKey, value);<NEW_LINE>Logger.info(OSGIUtil.class, () -> "Found property " + felixKey + "=" + value);<NEW_LINE>}<NEW_LINE>if (key.startsWith("DOT_FELIX_FELIX")) {<NEW_LINE>final String felixKey = key.replace("DOT_FELIX_FELIX", "FELIX").replace("_", ".").toLowerCase();<NEW_LINE>String value = (UtilMethods.isSet(Config.getStringProperty(key, null))) ? Config.getStringProperty(key) : null;<NEW_LINE>properties.put(felixKey, value);<NEW_LINE>Logger.info(OSGIUtil.class, () -> "Found property " + felixKey + "=" + value);<NEW_LINE>}<NEW_LINE>if (key.startsWith("DOT_FELIX_OSGI")) {<NEW_LINE>final String felixKey = key.replace("DOT_FELIX_OSGI", "OSGI").replace("_", ".").toLowerCase();<NEW_LINE>String value = (UtilMethods.isSet(Config.getStringProperty(key, null))) ? Config.getStringProperty(key) : null;<NEW_LINE>properties.put(felixKey, value);<NEW_LINE>Logger.info(OSGIUtil.class, () -> <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return properties;<NEW_LINE>}
"Found property " + felixKey + "=" + value);
1,713,823
public ComponentPreset extractTubeCoupler() {<NEW_LINE>TypedPropertyMap props = new TypedPropertyMap();<NEW_LINE>try {<NEW_LINE>props.put(ComponentPreset.TYPE, ComponentPreset.Type.TUBE_COUPLER);<NEW_LINE>props.put(ComponentPreset.OUTER_DIAMETER, tcOuterDia.getValue());<NEW_LINE>props.put(ComponentPreset.INNER_DIAMETER, tcInnerDia.getValue());<NEW_LINE>props.put(ComponentPreset.DESCRIPTION, tcDescTextField.getText());<NEW_LINE>props.put(ComponentPreset.PARTNO, tcPartNoTextField.getText());<NEW_LINE>props.put(ComponentPreset.MANUFACTURER, Manufacturer.getManufacturer(mfgTextField.getText()));<NEW_LINE>props.put(ComponentPreset.<MASK><NEW_LINE>final Material material = (Material) materialChooser.getSelectedItem();<NEW_LINE>if (material != null) {<NEW_LINE>props.put(ComponentPreset.MATERIAL, material);<NEW_LINE>} else {<NEW_LINE>JOptionPane.showMessageDialog(null, "A material must be selected.", "Error", JOptionPane.ERROR_MESSAGE);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>props.put(ComponentPreset.MASS, tcMass.getValue());<NEW_LINE>if (tcImage != null) {<NEW_LINE>props.put(ComponentPreset.IMAGE, imageToByteArray(tcImage.getImage()));<NEW_LINE>}<NEW_LINE>return ComponentPresetFactory.create(props);<NEW_LINE>} catch (NumberFormatException nfe) {<NEW_LINE>JOptionPane.showMessageDialog(null, "Could not convert tube coupler attribute.", "Error", JOptionPane.ERROR_MESSAGE);<NEW_LINE>} catch (InvalidComponentPresetException e) {<NEW_LINE>JOptionPane.showMessageDialog(null, craftErrorMessage(e, "Mandatory tube coupler attribute not set."), "Error", JOptionPane.ERROR_MESSAGE);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
LENGTH, tcLength.getValue());
1,440,934
public static PairOrientation of(final SAMRecord sam) {<NEW_LINE>final ReadOrdinality ordinality = ReadOrdinality.of(sam);<NEW_LINE>final ReadDirection direction = ReadDirection.of(sam);<NEW_LINE>// Make sure that the read is paired<NEW_LINE>if (!sam.getReadPairedFlag()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// if read is unmapped, read isn't mapped, or mate is unmapped, return null<NEW_LINE>if (direction == null || sam.getReadUnmappedFlag() || sam.getMateUnmappedFlag()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final boolean <MASK><NEW_LINE>if (ordinality == ReadOrdinality.FIRST) {<NEW_LINE>return PairOrientation.ofExplicit(direction == ReadDirection.POSITIVE, matePositiveStrand);<NEW_LINE>} else {<NEW_LINE>return PairOrientation.ofExplicit(matePositiveStrand, direction == ReadDirection.POSITIVE);<NEW_LINE>}<NEW_LINE>}
matePositiveStrand = !sam.getMateNegativeStrandFlag();
152,592
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {<NEW_LINE>boolean cookieExists = false;<NEW_LINE>String cookieValue = null;<NEW_LINE>Cookie[] cookies = req.getCookies();<NEW_LINE>if (null != cookies) {<NEW_LINE>// Iterate over cookies until we find one named evercookie_png<NEW_LINE>for (Cookie cookie : cookies) {<NEW_LINE>if (cookie.getName().equals("evercookie_png")) {<NEW_LINE>cookieExists = true;<NEW_LINE>cookieValue = cookie.getValue();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// If the cookie doesn't exist, send 304 Not Modified and exit.<NEW_LINE>if (!cookieExists) {<NEW_LINE>resp.setStatus(304);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Generate a PNG image from the cookie value.<NEW_LINE>BufferedImage image = new BufferedImage(<MASK><NEW_LINE>image.createGraphics().setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);<NEW_LINE>int x = 0;<NEW_LINE>for (int i = 0; i < cookieValue.length(); i += 3) {<NEW_LINE>// Treat every 3 chars of the cookie value as an {R,G,B} triplet.<NEW_LINE>Color c = new Color(cookieValue.charAt(i), cookieValue.charAt(i + 1), cookieValue.charAt(i + 2));<NEW_LINE>image.setRGB(x++, 0, c.getRGB());<NEW_LINE>}<NEW_LINE>// The cookie was present; set up the response headers.<NEW_LINE>resp.setContentType("image/png");<NEW_LINE>resp.addHeader("Last-Modified", "Wed, 30 Jun 2010 21:36:48 GMT");<NEW_LINE>resp.addHeader("Expires", "Tue, 31 Dec 2033 23:30:45 GMT");<NEW_LINE>resp.addHeader("Cache-Control", "private, max-age=630720000");<NEW_LINE>// Send the generate image data as the response body.<NEW_LINE>OutputStream body = resp.getOutputStream();<NEW_LINE>try {<NEW_LINE>ImageIO.write(image, "png", body);<NEW_LINE>} finally {<NEW_LINE>body.close();<NEW_LINE>}<NEW_LINE>// And we're done.<NEW_LINE>resp.setStatus(200);<NEW_LINE>resp.flushBuffer();<NEW_LINE>}
200, 1, BufferedImage.TYPE_INT_ARGB);
503,483
public Response<Void> deleteByIdWithResponse(String id, String ifMatch, Context context) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));<NEW_LINE>}<NEW_LINE>String serviceName = Utils.getValueFromIdByName(id, "service");<NEW_LINE>if (serviceName == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'service'.", id)));<NEW_LINE>}<NEW_LINE>String namedValueId = Utils.getValueFromIdByName(id, "namedValues");<NEW_LINE>if (namedValueId == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.<MASK><NEW_LINE>}<NEW_LINE>return this.deleteWithResponse(resourceGroupName, serviceName, namedValueId, ifMatch, context);<NEW_LINE>}
format("The resource ID '%s' is not valid. Missing path segment 'namedValues'.", id)));
572,244
private void findProposals(CharSequence pattern, int maxDistance, int node, StringBuffer word, ProposalAcceptor result) {<NEW_LINE>int entries = readInt(node + 1);<NEW_LINE>for (int currentEntry = 0; currentEntry < entries; currentEntry++) {<NEW_LINE>char ac = readChar(node + 5 + currentEntry * 6);<NEW_LINE>word.append(ac);<NEW_LINE>int distance = distance(pattern, word);<NEW_LINE>int targetNode = node + readInt(node + <MASK><NEW_LINE>if (distance < maxDistance) {<NEW_LINE>if (readByte(targetNode) == 0x01) {<NEW_LINE>result.add(word.toString());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if ((distance - (pattern.length() - word.length())) < maxDistance) {<NEW_LINE>findProposals(pattern, maxDistance, targetNode, word, result);<NEW_LINE>}<NEW_LINE>word.deleteCharAt(word.length() - 1);<NEW_LINE>}<NEW_LINE>}
5 + currentEntry * 6 + 2);
561,536
private void passThrough(ImageMessage msg) {<NEW_LINE>ImageVO vo = dbf.findByUuid(msg.getImageUuid(), ImageVO.class);<NEW_LINE>if (vo == null && allowedMessageAfterDeletion.contains(msg.getClass())) {<NEW_LINE>ImageEO eo = dbf.findByUuid(msg.getImageUuid(), ImageEO.class);<NEW_LINE>vo = ObjectUtils.newAndCopy(eo, ImageVO.class);<NEW_LINE>}<NEW_LINE>if (vo == null) {<NEW_LINE>ErrorCode err = err(SysErrors.RESOURCE_NOT_FOUND, "Cannot find image[uuid:%s], it may have been deleted", msg.getImageUuid());<NEW_LINE>logger.warn(err.getDetails());<NEW_LINE>bus.replyErrorByMessageType((Message) msg, err);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ImageFactory factory = getImageFacotry(ImageType.valueOf(vo.getType()));<NEW_LINE>Image img = factory.getImage(vo);<NEW_LINE>img<MASK><NEW_LINE>}
.handleMessage((Message) msg);