idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,787,985
public void read(org.apache.thrift.protocol.TProtocol prot, getActiveLogs_result struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet <MASK><NEW_LINE>if (incoming.get(0)) {<NEW_LINE>{<NEW_LINE>org.apache.thrift.protocol.TList _list395 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);<NEW_LINE>struct.success = new java.util.ArrayList<java.lang.String>(_list395.size);<NEW_LINE>@org.apache.thrift.annotation.Nullable<NEW_LINE>java.lang.String _elem396;<NEW_LINE>for (int _i397 = 0; _i397 < _list395.size; ++_i397) {<NEW_LINE>_elem396 = iprot.readString();<NEW_LINE>struct.success.add(_elem396);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>struct.setSuccessIsSet(true);<NEW_LINE>}<NEW_LINE>}
incoming = iprot.readBitSet(1);
94,439
public static JSONObject store(V8Response response) {<NEW_LINE>JSONObject obj = newJSONObject();<NEW_LINE>obj.put(SEQ, response.getSequence());<NEW_LINE>obj.put(<MASK><NEW_LINE>obj.put(TYPE, V8Type.response.toString());<NEW_LINE>V8Command command = response.getCommand();<NEW_LINE>obj.put(COMMAND, command.toString());<NEW_LINE>boolean success = response.isSuccess();<NEW_LINE>obj.put(SUCCESS, success);<NEW_LINE>if (success) {<NEW_LINE>V8Body body = response.getBody();<NEW_LINE>if (body != null) {<NEW_LINE>obj.put(BODY, store(command, body));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>obj.put(MESSAGE, response.getErrorMessage());<NEW_LINE>}<NEW_LINE>ReferencedValue[] referencedValues = response.getReferencedValues();<NEW_LINE>if (referencedValues != null) {<NEW_LINE>obj.put(REFS, store(referencedValues));<NEW_LINE>}<NEW_LINE>obj.put(RUNNING, response.isRunning());<NEW_LINE>return obj;<NEW_LINE>}
SEQ_REQUEST, response.getRequestSequence());
1,135,271
public static DescribeGatewayNFSClientsResponse unmarshall(DescribeGatewayNFSClientsResponse describeGatewayNFSClientsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeGatewayNFSClientsResponse.setRequestId(_ctx.stringValue("DescribeGatewayNFSClientsResponse.RequestId"));<NEW_LINE>describeGatewayNFSClientsResponse.setVersion40Enabled(_ctx.booleanValue("DescribeGatewayNFSClientsResponse.Version40Enabled"));<NEW_LINE>describeGatewayNFSClientsResponse.setVersion41Enabled<MASK><NEW_LINE>describeGatewayNFSClientsResponse.setTotalCount(_ctx.integerValue("DescribeGatewayNFSClientsResponse.TotalCount"));<NEW_LINE>describeGatewayNFSClientsResponse.setMessage(_ctx.stringValue("DescribeGatewayNFSClientsResponse.Message"));<NEW_LINE>describeGatewayNFSClientsResponse.setPageSize(_ctx.integerValue("DescribeGatewayNFSClientsResponse.PageSize"));<NEW_LINE>describeGatewayNFSClientsResponse.setPageNumber(_ctx.integerValue("DescribeGatewayNFSClientsResponse.PageNumber"));<NEW_LINE>describeGatewayNFSClientsResponse.setVersion3Enabled(_ctx.booleanValue("DescribeGatewayNFSClientsResponse.Version3Enabled"));<NEW_LINE>describeGatewayNFSClientsResponse.setCode(_ctx.stringValue("DescribeGatewayNFSClientsResponse.Code"));<NEW_LINE>describeGatewayNFSClientsResponse.setSuccess(_ctx.booleanValue("DescribeGatewayNFSClientsResponse.Success"));<NEW_LINE>List<ClientInfo> clientInfoList = new ArrayList<ClientInfo>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeGatewayNFSClientsResponse.ClientInfoList.Length"); i++) {<NEW_LINE>ClientInfo clientInfo = new ClientInfo();<NEW_LINE>clientInfo.setHasNFSv40(_ctx.booleanValue("DescribeGatewayNFSClientsResponse.ClientInfoList[" + i + "].HasNFSv40"));<NEW_LINE>clientInfo.setHasNFSv41(_ctx.booleanValue("DescribeGatewayNFSClientsResponse.ClientInfoList[" + i + "].HasNFSv41"));<NEW_LINE>clientInfo.setHasNFSv3(_ctx.booleanValue("DescribeGatewayNFSClientsResponse.ClientInfoList[" + i + "].HasNFSv3"));<NEW_LINE>clientInfo.setClientIpAddr(_ctx.stringValue("DescribeGatewayNFSClientsResponse.ClientInfoList[" + i + "].ClientIpAddr"));<NEW_LINE>clientInfoList.add(clientInfo);<NEW_LINE>}<NEW_LINE>describeGatewayNFSClientsResponse.setClientInfoList(clientInfoList);<NEW_LINE>return describeGatewayNFSClientsResponse;<NEW_LINE>}
(_ctx.booleanValue("DescribeGatewayNFSClientsResponse.Version41Enabled"));
666,297
protected void writeClassTargets(TargetsTableAnnotationsImpl targetTable) throws IOException {<NEW_LINE>Map<String, String> i_annotatedClassNames = new IdentityHashMap<String, String>();<NEW_LINE><MASK><NEW_LINE>UtilImpl_BidirectionalMap fieldTargetMap = targetTable.i_getFieldAnnotations();<NEW_LINE>UtilImpl_BidirectionalMap methodTargetMap = targetTable.i_getMethodAnnotations();<NEW_LINE>for (String i_annotationClassName : classTargetMap.getHolderSet()) {<NEW_LINE>i_annotatedClassNames.put(i_annotationClassName, i_annotationClassName);<NEW_LINE>}<NEW_LINE>for (String i_annotationClassName : fieldTargetMap.getHolderSet()) {<NEW_LINE>i_annotatedClassNames.put(i_annotationClassName, i_annotationClassName);<NEW_LINE>}<NEW_LINE>for (String i_annotationClassName : methodTargetMap.getHolderSet()) {<NEW_LINE>i_annotatedClassNames.put(i_annotationClassName, i_annotationClassName);<NEW_LINE>}<NEW_LINE>Set<String> i_classNames = i_annotatedClassNames.keySet();<NEW_LINE>bufOutput.writeLargeInt(i_classNames.size());<NEW_LINE>for (String i_className : i_classNames) {<NEW_LINE>writeCompact(CLASS_BYTE, i_className);<NEW_LINE>Set<String> i_classAnnotations = classTargetMap.selectHeldOf(i_className);<NEW_LINE>Set<String> i_fieldAnnotations = fieldTargetMap.selectHeldOf(i_className);<NEW_LINE>Set<String> i_methodAnnotations = methodTargetMap.selectHeldOf(i_className);<NEW_LINE>bufOutput.writeSmallInt(i_classAnnotations.size() + i_fieldAnnotations.size() + i_methodAnnotations.size());<NEW_LINE>for (String i_annotationClassName : i_classAnnotations) {<NEW_LINE>writeCompact(CLASS_ANNOTATION_BYTE, i_annotationClassName);<NEW_LINE>}<NEW_LINE>for (String i_annotationClassName : i_fieldAnnotations) {<NEW_LINE>writeCompact(FIELD_ANNOTATION_BYTE, i_annotationClassName);<NEW_LINE>}<NEW_LINE>for (String i_annotationClassName : i_methodAnnotations) {<NEW_LINE>writeCompact(METHOD_ANNOTATION_BYTE, i_annotationClassName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
UtilImpl_BidirectionalMap classTargetMap = targetTable.i_getClassAnnotations();
1,579,913
public TubeMQResult cloneBrokersWithTopic(CloneBrokersReq req) throws Exception {<NEW_LINE>int clusterId = req.getClusterId();<NEW_LINE>// 1. query source broker config<NEW_LINE>QueryBrokerCfgReq queryReq = QueryBrokerCfgReq.getReq(req.getSourceBrokerId());<NEW_LINE>MasterEntry masterEntry = masterService.getMasterNode(Long.valueOf(clusterId));<NEW_LINE>// 2. use source broker config to clone brokers<NEW_LINE>AddBrokersReq addBrokersReq = getBatchAddBrokersReq(req, <MASK><NEW_LINE>// 3. request master, return broker ids generated by master<NEW_LINE>AddBrokerResult addBrokerResult = addBrokersToClusterWithId(addBrokersReq, masterEntry);<NEW_LINE>// might have duplicate brokers<NEW_LINE>if (addBrokerResult.getErrCode() != TubeConst.SUCCESS_CODE) {<NEW_LINE>return TubeMQResult.errorResult(addBrokerResult.getErrMsg());<NEW_LINE>}<NEW_LINE>List<Integer> brokerIds = getBrokerIds(addBrokerResult);<NEW_LINE>List<AddTopicReq> addTopicReqs = req.getAddTopicReqs();<NEW_LINE>// 4. add topic to brokers<NEW_LINE>return addTopicsToBrokers(masterEntry, brokerIds, addTopicReqs);<NEW_LINE>}
clusterId, req.getSourceBroker());
1,300,395
protected Parcelable restoreInstanceState(Parcelable state) {<NEW_LINE>if (state instanceof Bundle) {<NEW_LINE>Bundle bundle = (Bundle) state;<NEW_LINE>mViewTransition.showView(bundle.getInt(KEY_SHOWN_VIEW), false);<NEW_LINE>mTipView.setText(bundle.getString(KEY_TIP));<NEW_LINE>mSavedDataId = bundle.getInt(KEY_DATA);<NEW_LINE>ArrayList<E> newData = null;<NEW_LINE>EhApplication app = (EhApplication) getContext().getApplicationContext();<NEW_LINE>if (mSavedDataId != IntIdGenerator.INVALID_ID) {<NEW_LINE>newData = (ArrayList<E>) app.removeGlobalStuff(mSavedDataId);<NEW_LINE>mSavedDataId = IntIdGenerator.INVALID_ID;<NEW_LINE>if (newData != null) {<NEW_LINE>mData = newData;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>mIdGenerator.setNextId(bundle.getInt(KEY_NEXT_ID));<NEW_LINE><MASK><NEW_LINE>mStartPage = bundle.getInt(KEY_START_PAGE);<NEW_LINE>mEndPage = bundle.getInt(KEY_END_PAGE);<NEW_LINE>mPages = bundle.getInt(KEY_PAGES);<NEW_LINE>notifyDataSetChanged();<NEW_LINE>if (newData == null) {<NEW_LINE>mPageDivider.clear();<NEW_LINE>mStartPage = 0;<NEW_LINE>mEndPage = 0;<NEW_LINE>mPages = 0;<NEW_LINE>firstRefresh();<NEW_LINE>}<NEW_LINE>return bundle.getParcelable(KEY_SUPER);<NEW_LINE>} else {<NEW_LINE>return state;<NEW_LINE>}<NEW_LINE>}
mPageDivider = bundle.getParcelable(KEY_PAGE_DIVIDER);
1,289,020
public static void main(final String... args) {<NEW_LINE>LOGGER.info(LINE + LINE + "\n Welcome to Spring Integration Coffee Database! " + NEWLINE + "\n For more information please visit: " + "\n https://www.springsource.org/spring-integration " + NEWLINE + LINE);<NEW_LINE>final AbstractApplicationContext context = new ClassPathXmlApplicationContext("classpath:META-INF/spring/integration/*-context.xml");<NEW_LINE>context.registerShutdownHook();<NEW_LINE>final Scanner scanner <MASK><NEW_LINE>final CoffeeService service = context.getBean(CoffeeService.class);<NEW_LINE>LOGGER.info(LINE + NEWLINE + "\n Please press 'q + Enter' to quit the application. " + NEWLINE + LINE);<NEW_LINE>System.out.print("Please enter 'list' and press <enter> to get a list of coffees.");<NEW_LINE>System.out.print("Enter a coffee id, e.g. '1' and press <enter> to get a description.\n\n");<NEW_LINE>while (!scanner.hasNext("q")) {<NEW_LINE>String input = scanner.nextLine();<NEW_LINE>if ("list".equalsIgnoreCase(input)) {<NEW_LINE>List<CoffeeBeverage> coffeeBeverages = service.findAllCoffeeBeverages();<NEW_LINE>for (CoffeeBeverage coffeeBeverage : coffeeBeverages) {<NEW_LINE>System.out.println(String.format("%s - %s", coffeeBeverage.getId(), coffeeBeverage.getName()));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>System.out.println("Retrieving coffee information...");<NEW_LINE>String coffeeDescription = service.findCoffeeBeverage(Integer.valueOf(input));<NEW_LINE>System.out.println(String.format("Searched for '%s' - Found: '%s'.", input, coffeeDescription));<NEW_LINE>System.out.print("To try again, please enter another coffee beaverage and press <enter>:\n\n");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>LOGGER.info("Exiting application...bye.");<NEW_LINE>scanner.close();<NEW_LINE>context.close();<NEW_LINE>}
= new Scanner(System.in);
1,575,015
private void createRfQ(DefaultMutableTreeNode node) {<NEW_LINE>BOMWrapper bom = (BOMWrapper) node.getUserObject();<NEW_LINE>MPPOrder mo = new MPPOrder(Env.getCtx(), bom.getPP_Order_ID(), null);<NEW_LINE>MResource r = MResource.get(Env.getCtx(), mo.getS_Resource_ID());<NEW_LINE>Calendar cal = Calendar.getInstance();<NEW_LINE>MRfQ rfq = new MRfQ(Env.getCtx(), 0, null);<NEW_LINE>rfq.setName(Msg.translate(Env.getCtx(), "C_RFQ_ID") + ": " + mo.getDocumentNo() + "_" + r.getName() + " (" + bom.getName() + ")");<NEW_LINE>rfq.setC_Currency_ID(Env.getContextAsInt(Env.getCtx(), "$C_Currency_ID"));<NEW_LINE>rfq.setQuoteType(MRfQ.QUOTETYPE_QuoteSelectedLines);<NEW_LINE>rfq.setDateWorkStart(mo.getDateStartSchedule());<NEW_LINE>rfq.<MASK><NEW_LINE>// process parameters<NEW_LINE>rfq.setC_RfQ_Topic_ID(((BigDecimal) getParameterValue("C_RFQ_Topic_ID")).intValue());<NEW_LINE>rfq.setSalesRep_ID(((BigDecimal) getParameterValue("SalesRep_ID")).intValue());<NEW_LINE>savePO(rfq);<NEW_LINE>if (successful()) {<NEW_LINE>createRfQLines(rfq.get_ID(), node);<NEW_LINE>}<NEW_LINE>}
setDateWorkComplete(mo.getDateFinishSchedule());
665,261
private void showMenu() {<NEW_LINE>setPopupPositionAndShow(new PositionCallback() {<NEW_LINE><NEW_LINE>public void setPosition(int offsetWidth, int offsetHeight) {<NEW_LINE>InputEditorPosition position = docDisplay_.createInputEditorPosition(completionPosition_.getPosition());<NEW_LINE>Rectangle bounds = docDisplay_.getPositionBounds(position);<NEW_LINE>int windowBottom = Window.getScrollTop() + Window.getClientHeight();<NEW_LINE><MASK><NEW_LINE>// figure out whether we should show below (do this<NEW_LINE>// only once so that we maintain the menu orientation<NEW_LINE>// while filtering)<NEW_LINE>if (showBelow_ == null)<NEW_LINE>showBelow_ = windowBottom - cursorBottom >= offsetHeight;<NEW_LINE>final int PAD = 3;<NEW_LINE>if (showBelow_)<NEW_LINE>setPopupPosition(bounds.getLeft(), cursorBottom + PAD);<NEW_LINE>else<NEW_LINE>setPopupPosition(bounds.getLeft(), bounds.getTop() - offsetHeight);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
int cursorBottom = bounds.getBottom();
1,395,009
protected Ternary visitSimpleCaseExpression(SimpleCaseExpression node, TranslationContext context) {<NEW_LINE>Ternary c = this.process(node.getOperand(), context);<NEW_LINE>if (c == null)<NEW_LINE>throw new TranslationException("Not supported: ", node.getOperand());<NEW_LINE>for (WhenClause e : node.getWhenClauses()) {<NEW_LINE>Ternary o = this.process(e.getOperand(), context);<NEW_LINE>if (o == null)<NEW_LINE>throw new TranslationException("Not supported: ", node.getOperand());<NEW_LINE>Ternary v = this.process(e.getResult(), context);<NEW_LINE>if (v == null)<NEW_LINE>throw new TranslationException("Not supported: ", node.getOperand());<NEW_LINE>Ternary s = this.combine(e, o, v);<NEW_LINE>c = this.combine(node, c, s);<NEW_LINE>}<NEW_LINE>if (node.getDefaultValue().isPresent()) {<NEW_LINE>Ternary v = this.process(node.getDefaultValue().get(), context);<NEW_LINE>if (v == null)<NEW_LINE>throw new TranslationException(<MASK><NEW_LINE>c = this.combine(node, v, c);<NEW_LINE>}<NEW_LINE>return c;<NEW_LINE>}
"Not supported: ", node.getOperand());
1,306,935
private static void markStackRoots() {<NEW_LINE>Address relocationThreshold = currentChunkPointer.value.toAddress();<NEW_LINE>for (Address stackRoots = ShadowStack.getStackTop(); stackRoots != null; stackRoots = ShadowStack.getNextStackFrame(stackRoots)) {<NEW_LINE>int <MASK><NEW_LINE>Address stackRootsPtr = ShadowStack.getStackRootPointer(stackRoots);<NEW_LINE>while (count-- > 0) {<NEW_LINE>RuntimeObject obj = stackRootsPtr.getAddress().toStructure();<NEW_LINE>if (!obj.toAddress().isLessThan(relocationThreshold)) {<NEW_LINE>if (isFullGC || (obj.classReference & RuntimeObject.GC_OLD_GENERATION) == 0) {<NEW_LINE>obj.classReference |= RuntimeObject.GC_MARKED;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>stackRootsPtr = stackRootsPtr.add(Address.sizeOf());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
count = ShadowStack.getStackRootCount(stackRoots);
1,110,427
private void checkGroupUseTrailingCommas() {<NEW_LINE>if (!lastUseStatementParts.isEmpty()) {<NEW_LINE>BaseDocument document = GsfUtilities.getDocument(fileObject, true);<NEW_LINE>if (document == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>document.readLock();<NEW_LINE>try {<NEW_LINE>TokenSequence<PHPTokenId> ts = LexUtilities.getPHPTokenSequence(document, 0);<NEW_LINE>if (ts == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>lastUseStatementParts.forEach((lastUseStatementPart) -> {<NEW_LINE>if (CancelSupport.getDefault().isCancelled()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ts.<MASK><NEW_LINE>if (ts.moveNext()) {<NEW_LINE>Token<? extends PHPTokenId> token = LexUtilities.findNext(ts, Arrays.asList(PHPTokenId.WHITESPACE));<NEW_LINE>if (token == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (token.id() == PHPTokenId.PHP_TOKEN && TokenUtilities.textEquals(token.text(), ",")) {<NEW_LINE>// NOI18N<NEW_LINE>createError(lastUseStatementPart);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} finally {<NEW_LINE>document.readUnlock();<NEW_LINE>lastUseStatementParts.clear();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
move(lastUseStatementPart.getEndOffset());
1,027,985
public static ListIoTCloudConnectorGroupsResponse unmarshall(ListIoTCloudConnectorGroupsResponse listIoTCloudConnectorGroupsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listIoTCloudConnectorGroupsResponse.setRequestId(_ctx.stringValue("ListIoTCloudConnectorGroupsResponse.RequestId"));<NEW_LINE>listIoTCloudConnectorGroupsResponse.setTotalCount(_ctx.integerValue("ListIoTCloudConnectorGroupsResponse.TotalCount"));<NEW_LINE>listIoTCloudConnectorGroupsResponse.setNextToken<MASK><NEW_LINE>listIoTCloudConnectorGroupsResponse.setMaxResults(_ctx.integerValue("ListIoTCloudConnectorGroupsResponse.MaxResults"));<NEW_LINE>List<IoTCloudConnectorGroupsItem> ioTCloudConnectorGroups = new ArrayList<IoTCloudConnectorGroupsItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListIoTCloudConnectorGroupsResponse.IoTCloudConnectorGroups.Length"); i++) {<NEW_LINE>IoTCloudConnectorGroupsItem ioTCloudConnectorGroupsItem = new IoTCloudConnectorGroupsItem();<NEW_LINE>ioTCloudConnectorGroupsItem.setIoTCloudConnectorGroupId(_ctx.stringValue("ListIoTCloudConnectorGroupsResponse.IoTCloudConnectorGroups[" + i + "].IoTCloudConnectorGroupId"));<NEW_LINE>ioTCloudConnectorGroupsItem.setIoTCloudConnectorGroupStatus(_ctx.stringValue("ListIoTCloudConnectorGroupsResponse.IoTCloudConnectorGroups[" + i + "].IoTCloudConnectorGroupStatus"));<NEW_LINE>ioTCloudConnectorGroupsItem.setName(_ctx.stringValue("ListIoTCloudConnectorGroupsResponse.IoTCloudConnectorGroups[" + i + "].Name"));<NEW_LINE>ioTCloudConnectorGroupsItem.setDescription(_ctx.stringValue("ListIoTCloudConnectorGroupsResponse.IoTCloudConnectorGroups[" + i + "].Description"));<NEW_LINE>ioTCloudConnectorGroupsItem.setCreateTime(_ctx.longValue("ListIoTCloudConnectorGroupsResponse.IoTCloudConnectorGroups[" + i + "].CreateTime"));<NEW_LINE>List<IoTCloudConnectorsItem> ioTCloudConnectors = new ArrayList<IoTCloudConnectorsItem>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("ListIoTCloudConnectorGroupsResponse.IoTCloudConnectorGroups[" + i + "].IoTCloudConnectors.Length"); j++) {<NEW_LINE>IoTCloudConnectorsItem ioTCloudConnectorsItem = new IoTCloudConnectorsItem();<NEW_LINE>ioTCloudConnectorsItem.setIoTCloudConnectorId(_ctx.stringValue("ListIoTCloudConnectorGroupsResponse.IoTCloudConnectorGroups[" + i + "].IoTCloudConnectors[" + j + "].IoTCloudConnectorId"));<NEW_LINE>ioTCloudConnectorsItem.setIoTCloudConnectorStatus(_ctx.stringValue("ListIoTCloudConnectorGroupsResponse.IoTCloudConnectorGroups[" + i + "].IoTCloudConnectors[" + j + "].IoTCloudConnectorStatus"));<NEW_LINE>ioTCloudConnectorsItem.setIoTCloudConnectorName(_ctx.stringValue("ListIoTCloudConnectorGroupsResponse.IoTCloudConnectorGroups[" + i + "].IoTCloudConnectors[" + j + "].IoTCloudConnectorName"));<NEW_LINE>ioTCloudConnectorsItem.setIoTCloudConnectorDescription(_ctx.stringValue("ListIoTCloudConnectorGroupsResponse.IoTCloudConnectorGroups[" + i + "].IoTCloudConnectors[" + j + "].IoTCloudConnectorDescription"));<NEW_LINE>ioTCloudConnectorsItem.setCreateTime(_ctx.longValue("ListIoTCloudConnectorGroupsResponse.IoTCloudConnectorGroups[" + i + "].IoTCloudConnectors[" + j + "].CreateTime"));<NEW_LINE>ioTCloudConnectors.add(ioTCloudConnectorsItem);<NEW_LINE>}<NEW_LINE>ioTCloudConnectorGroupsItem.setIoTCloudConnectors(ioTCloudConnectors);<NEW_LINE>ioTCloudConnectorGroups.add(ioTCloudConnectorGroupsItem);<NEW_LINE>}<NEW_LINE>listIoTCloudConnectorGroupsResponse.setIoTCloudConnectorGroups(ioTCloudConnectorGroups);<NEW_LINE>return listIoTCloudConnectorGroupsResponse;<NEW_LINE>}
(_ctx.stringValue("ListIoTCloudConnectorGroupsResponse.NextToken"));
1,488,351
private Mono<Response<Void>> disableTestEndpointWithResponseAsync(String resourceGroupName, String serviceName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (serviceName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter serviceName 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.disableTestEndpoint(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serviceName, accept, context);<NEW_LINE>}
error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
66,574
protected void encodeFilter(FacesContext context, SelectOneMenu menu) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>String id = menu.getClientId(context) + "_filter";<NEW_LINE>writer.startElement("div", null);<NEW_LINE>writer.<MASK><NEW_LINE>writer.startElement("input", null);<NEW_LINE>writer.writeAttribute("class", "ui-selectonemenu-filter ui-inputfield ui-inputtext ui-widget ui-state-default ui-corner-all", null);<NEW_LINE>writer.writeAttribute("id", id, null);<NEW_LINE>writer.writeAttribute("name", id, null);<NEW_LINE>writer.writeAttribute("type", "text", null);<NEW_LINE>writer.writeAttribute("autocomplete", "off", null);<NEW_LINE>writer.writeAttribute(HTML.ARIA_AUTOCOMPLETE, "list", null);<NEW_LINE>writer.writeAttribute(HTML.ARIA_CONTROLS, menu.getClientId(context) + "_table", null);<NEW_LINE>writer.writeAttribute(HTML.ARIA_LABEL, MessageFactory.getMessage(InputRenderer.ARIA_FILTER), null);<NEW_LINE>if (menu.getFilterPlaceholder() != null) {<NEW_LINE>writer.writeAttribute("placeholder", menu.getFilterPlaceholder(), null);<NEW_LINE>}<NEW_LINE>writer.endElement("input");<NEW_LINE>writer.startElement("span", null);<NEW_LINE>writer.writeAttribute("class", "ui-icon ui-icon-search", id);<NEW_LINE>writer.endElement("span");<NEW_LINE>writer.endElement("div");<NEW_LINE>}
writeAttribute("class", "ui-selectonemenu-filter-container", null);
1,127,662
private static void generateInstrumentedProcessView(ResultSetProcessorFactoryForge forge, CodegenClassScope classScope, CodegenMethod method, CodegenInstanceAux instance) {<NEW_LINE>if (!classScope.isInstrumented()) {<NEW_LINE>forge.processViewResultCodegen(classScope, method, instance);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>CodegenMethod instrumented = method.makeChild(UniformPair.EPTYPE, forge.getClass(), classScope).addParam(EventBean.EPTYPEARRAY, NAME_NEWDATA).addParam(EventBean.EPTYPEARRAY, NAME_OLDDATA).addParam(EPTypePremade.BOOLEANPRIMITIVE.getEPType(), NAME_ISSYNTHESIZE);<NEW_LINE>forge.<MASK><NEW_LINE>method.getBlock().apply(InstrumentationCode.instblock(classScope, "q" + forge.getInstrumentedQName())).declareVar(UniformPair.EPTYPE, "pair", localMethod(instrumented, REF_NEWDATA, REF_OLDDATA, REF_ISSYNTHESIZE)).apply(InstrumentationCode.instblock(classScope, "a" + forge.getInstrumentedQName(), ref("pair"))).methodReturn(ref("pair"));<NEW_LINE>}
processViewResultCodegen(classScope, instrumented, instance);
542,664
static void h1HeadersSplitCookieCrumbs(HttpHeaders h1Headers) {<NEW_LINE>Iterator<? extends CharSequence> cookieItr = h1Headers.valuesIterator(COOKIE);<NEW_LINE>// We want to avoid "concurrent modifications" of the headers while we are iterating. So we insert crumbs<NEW_LINE>// into an intermediate collection and insert them after the split process concludes.<NEW_LINE>List<CharSequence> cookiesToAdd = null;<NEW_LINE>while (cookieItr.hasNext()) {<NEW_LINE>CharSequence nextCookie = cookieItr.next();<NEW_LINE>int i = <MASK><NEW_LINE>if (i > 0) {<NEW_LINE>if (cookiesToAdd == null) {<NEW_LINE>cookiesToAdd = new ArrayList<>(4);<NEW_LINE>}<NEW_LINE>int start = 0;<NEW_LINE>do {<NEW_LINE>cookiesToAdd.add(nextCookie.subSequence(start, i));<NEW_LINE>// skip 2 characters "; " (see https://tools.ietf.org/html/rfc6265#section-4.2.1)<NEW_LINE>start = i + 2;<NEW_LINE>} while (start < nextCookie.length() && (i = indexOf(nextCookie, ';', start)) >= 0);<NEW_LINE>cookiesToAdd.add(nextCookie.subSequence(start, nextCookie.length()));<NEW_LINE>cookieItr.remove();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (cookiesToAdd != null) {<NEW_LINE>for (CharSequence crumb : cookiesToAdd) {<NEW_LINE>h1Headers.add(COOKIE, crumb);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
indexOf(nextCookie, ';', 0);
1,843,594
public DuplexChannel connect(Bootstrap bootstrap) throws InterruptedException {<NEW_LINE>DockerClientConfig dockerClientConfig = getDockerClientConfig();<NEW_LINE>String host = dockerClientConfig.getDockerHost().getHost();<NEW_LINE>int port = dockerClientConfig.getDockerHost().getPort();<NEW_LINE>if (port == -1) {<NEW_LINE>throw new RuntimeException("no port configured for " + host);<NEW_LINE>}<NEW_LINE>final DuplexChannel channel = (DuplexChannel) bootstrap.connect(host, port).sync().channel();<NEW_LINE><MASK><NEW_LINE>if (ssl != null) {<NEW_LINE>channel.pipeline().addFirst(ssl);<NEW_LINE>// https://tools.ietf.org/html/rfc5246#section-7.2.1<NEW_LINE>// TLS has its own special message about connection termination. Because TLS is a<NEW_LINE>// session-level protocol, it can be covered by any transport-level protocol like<NEW_LINE>// TCP, UTP and so on. But we know exactly that data being transferred over TCP and<NEW_LINE>// that other side will never send any byte into this TCP connection, so this<NEW_LINE>// channel should be closed.<NEW_LINE>// RFC says that we must notify opposite side about closing. This could be done only<NEW_LINE>// in sun.security.ssl.SSLEngineImpl and unfortunately it does not send this<NEW_LINE>// message. On the other hand RFC does not enforce the opposite side to wait for<NEW_LINE>// such message.<NEW_LINE>ssl.sslCloseFuture().addListener(future -> channel.eventLoop().execute(channel::close));<NEW_LINE>}<NEW_LINE>return channel;<NEW_LINE>}
final SslHandler ssl = initSsl(dockerClientConfig);
908,093
protected Set<IFileStore> applyFilter(Set<IFileStore> fileStores) {<NEW_LINE>if (CollectionsUtil.isEmpty(_filteredItems) || fileStores == null) {<NEW_LINE>return fileStores;<NEW_LINE>}<NEW_LINE>final IWorkspaceRoot workspaceRoot = ResourcesPlugin<MASK><NEW_LINE>CollectionsUtil.filterInPlace(fileStores, new IFilter<IFileStore>() {<NEW_LINE><NEW_LINE>public boolean include(IFileStore item) {<NEW_LINE>// NOTE: The indexing system creates LocalFiles but filters are based<NEW_LINE>// on WorkspaceFiles. The following tries to convert each LocalFile<NEW_LINE>// in the set to a WorkspaceFile before testing if the item needs to<NEW_LINE>// be filtered.<NEW_LINE>for (IContainer container : workspaceRoot.findContainersForLocationURI(item.toURI())) {<NEW_LINE>IFileStore workspaceFileStore = EFSUtils.getFileStore(container);<NEW_LINE>if (isFilteredItem(workspaceFileStore)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return fileStores;<NEW_LINE>}
.getWorkspace().getRoot();
259,100
private void loadNode1067() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.NamespacesType_AddressSpaceFile_Open_InputArguments, new QualifiedName(0, "InputArguments"), new LocalizedText("en", "InputArguments"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.Argument, 1, new UInteger[] { org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger.valueOf(0) }, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.NamespacesType_AddressSpaceFile_Open_InputArguments, Identifiers.HasTypeDefinition, Identifiers.PropertyType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.NamespacesType_AddressSpaceFile_Open_InputArguments, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.NamespacesType_AddressSpaceFile_Open_InputArguments, Identifiers.HasProperty, Identifiers.NamespacesType_AddressSpaceFile_Open.expanded(), false));<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("<ListOfExtensionObject xmlns=\"http://opcfoundation.org/UA/2008/02/Types.xsd\"><ExtensionObject><TypeId><Identifier>i=297</Identifier> </TypeId><Body><Argument><Name>Mode</Name><DataType><Identifier>i=3</Identifier> </DataType><ValueRank>-1</ValueRank><ArrayDimensions/> </Argument> </Body> </ExtensionObject> </ListOfExtensionObject>");<NEW_LINE>String xml = sb.toString();<NEW_LINE>OpcUaXmlStreamDecoder decoder = new OpcUaXmlStreamDecoder(context.getServer().getSerializationContext()).setInput(new StringReader(xml));<NEW_LINE>Object o = decoder.readVariantValue();<NEW_LINE>DataValue value = new <MASK><NEW_LINE>node.setValue(value);<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
DataValue(new Variant(o));
1,156,903
final DeleteResolverRuleResult executeDeleteResolverRule(DeleteResolverRuleRequest deleteResolverRuleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteResolverRuleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteResolverRuleRequest> request = null;<NEW_LINE>Response<DeleteResolverRuleResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteResolverRuleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteResolverRuleRequest));<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, "Route53Resolver");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteResolverRule");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteResolverRuleResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteResolverRuleResultJsonUnmarshaller());<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,249,665
private // implemented and that all accessed fields are defined somewhere in the type hierarchy<NEW_LINE>List<Mismatch> checkHelperClassMatch(ClassRef helperClass, TypePool typePool) {<NEW_LINE>List<Mismatch> mismatches = emptyList();<NEW_LINE>HelperReferenceWrapper helperWrapper = new HelperReferenceWrapper.Factory(typePool, references, helperClassPredicate).create(helperClass);<NEW_LINE>Set<HelperReferenceWrapper.Field> undeclaredFields = helperClass.getFields().stream().filter(f -> !f.isDeclared()).map(f -> new HelperReferenceWrapper.Field(f.getName(), f.getDescriptor())).collect(Collectors.toSet());<NEW_LINE>// if there are any fields in this helper class that's not declared here, check the type<NEW_LINE>// hierarchy<NEW_LINE>if (!undeclaredFields.isEmpty()) {<NEW_LINE>Set<HelperReferenceWrapper.Field> superClassFields = new HashSet<>();<NEW_LINE>collectFieldsFromTypeHierarchy(helperWrapper, superClassFields);<NEW_LINE>undeclaredFields.removeAll(superClassFields);<NEW_LINE>for (HelperReferenceWrapper.Field missingField : undeclaredFields) {<NEW_LINE>mismatches = add(mismatches, new Mismatch<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>// skip abstract method check if this type does not have super type or is abstract<NEW_LINE>if (!helperWrapper.hasSuperTypes() || helperWrapper.isAbstract()) {<NEW_LINE>return mismatches;<NEW_LINE>}<NEW_LINE>// treat the helper type as a bag of methods: collect all methods defined in the helper class,<NEW_LINE>// all superclasses and interfaces and check if all abstract methods are implemented somewhere<NEW_LINE>Set<HelperReferenceWrapper.Method> abstractMethods = new HashSet<>();<NEW_LINE>Set<HelperReferenceWrapper.Method> plainMethods = new HashSet<>();<NEW_LINE>collectMethodsFromTypeHierarchy(helperWrapper, abstractMethods, plainMethods);<NEW_LINE>abstractMethods.removeAll(plainMethods);<NEW_LINE>for (HelperReferenceWrapper.Method unimplementedMethod : abstractMethods) {<NEW_LINE>mismatches = add(mismatches, new Mismatch.MissingMethod(helperClass, unimplementedMethod));<NEW_LINE>}<NEW_LINE>return mismatches;<NEW_LINE>}
.MissingField(helperClass, missingField));
633,848
protected void run() {<NEW_LINE>threadReference.set(Thread.currentThread());<NEW_LINE>while (isRunning()) {<NEW_LINE>final Queue<TaskStatus> updates = new ArrayDeque<>();<NEW_LINE>try {<NEW_LINE>updates.add(pendingUpdates.take());<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>Thread<MASK><NEW_LINE>break;<NEW_LINE>}<NEW_LINE>// Process all other available updates, up to the limit on batch size.<NEW_LINE>// TODO(bmahler): Expose histogram metrics of the batch sizes.<NEW_LINE>pendingUpdates.drainTo(updates, maxBatchSize - updates.size());<NEW_LINE>try {<NEW_LINE>storage.write((NoResult.Quiet) storeProvider -> {<NEW_LINE>for (TaskStatus status : updates) {<NEW_LINE>ScheduleStatus translatedState = Conversions.convertProtoState(status.getState());<NEW_LINE>StateChangeResult result = stateManager.changeState(storeProvider, status.getTaskId().getValue(), Optional.empty(), translatedState, formatMessage(status));<NEW_LINE>if (status.hasReason()) {<NEW_LINE>counters.get(statName(status, result)).incrementAndGet();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>for (TaskStatus status : updates) {<NEW_LINE>driver.acknowledgeStatusUpdate(status);<NEW_LINE>}<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>LOG.error("Failed to process status update batch " + updates, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.currentThread().interrupt();
62,462
public synchronized void listen() throws IOException {<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>c_logger.traceDebug(this, "listen", "tring to listen on " + m_lp);<NEW_LINE>}<NEW_LINE>InetAddress address = InetAddressCache.getByName(m_lp.getHost());<NEW_LINE>m_sock = (SSLServerSocket) m_serverSocketFactory.createServerSocket(m_lp.getPort(), 0, address);<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>c_logger.traceDebug(this, "listen", "created server socket:" + m_sock);<NEW_LINE>}<NEW_LINE>// if the port was 0 , we will get a listenning port by default.<NEW_LINE>// then we should set back the port to the Listenning Point Object.<NEW_LINE>// if the port was not 0 , it will just set the same port<NEW_LINE>m_lp.<MASK><NEW_LINE>Thread thread = new Thread(new ConnectionsListener(this), "TLS Connections Listener on " + m_lp.getPort());<NEW_LINE>isRunning = true;<NEW_LINE>thread.start();<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>StringBuffer buf = new StringBuffer("Thread ");<NEW_LINE>buf.append(thread.getName());<NEW_LINE>buf.append(" Listening on server socket:");<NEW_LINE>buf.append(m_sock);<NEW_LINE>c_logger.traceDebug(this, "listen", buf.toString());<NEW_LINE>}<NEW_LINE>}
setPort(m_sock.getLocalPort());
1,538,784
private void attribute(MessageTextHandler messageTextHandler, Name attributeName, Name elementName, boolean atSentenceStart) throws SAXException {<NEW_LINE>String ns = attributeName.getNamespaceUri();<NEW_LINE>if (html || "".equals(ns)) {<NEW_LINE>messageTextString(messageTextHandler, ATTRIBUTE, atSentenceStart);<NEW_LINE>codeString(<MASK><NEW_LINE>} else if ("http://www.w3.org/XML/1998/namespace".equals(ns)) {<NEW_LINE>messageTextString(messageTextHandler, ATTRIBUTE, atSentenceStart);<NEW_LINE>codeString(messageTextHandler, "xml:" + attributeName.getLocalName());<NEW_LINE>} else {<NEW_LINE>char[] humanReadable = WELL_KNOWN_NAMESPACES.get(ns);<NEW_LINE>if (humanReadable == null) {<NEW_LINE>if (loggingOk) {<NEW_LINE>log4j.info(new StringBuilder().append("UNKNOWN_NS:\t").append(ns));<NEW_LINE>}<NEW_LINE>messageTextString(messageTextHandler, ATTRIBUTE, atSentenceStart);<NEW_LINE>codeString(messageTextHandler, attributeName.getLocalName());<NEW_LINE>messageTextString(messageTextHandler, FROM_NAMESPACE, false);<NEW_LINE>codeString(messageTextHandler, ns);<NEW_LINE>} else {<NEW_LINE>messageTextString(messageTextHandler, humanReadable, atSentenceStart);<NEW_LINE>messageTextString(messageTextHandler, SPACE, false);<NEW_LINE>messageTextString(messageTextHandler, ATTRIBUTE, false);<NEW_LINE>codeString(messageTextHandler, attributeName.getLocalName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
messageTextHandler, attributeName.getLocalName());
1,746,793
public static // todo have the submatrices be from different shaped inputs<NEW_LINE>void checkSubImage(Object testClass, String function, boolean checkEquals, Object... inputParam) {<NEW_LINE>try {<NEW_LINE>ImageBase[] larger = new ImageBase[inputParam.length];<NEW_LINE>ImageBase[] subImg = new ImageBase[inputParam.length];<NEW_LINE>Class<?>[] paramDesc = new Class<?>[inputParam.length];<NEW_LINE>Object[] inputModified = new Object[inputParam.length];<NEW_LINE>for (int i = 0; i < inputParam.length; i++) {<NEW_LINE>if (ImageBase.class.isAssignableFrom(inputParam[i].getClass())) {<NEW_LINE>ImageBase<?> img = (ImageBase<?>) inputParam[i];<NEW_LINE>// copy the original image inside of a larger image<NEW_LINE>larger[i] = img.createNew(img.getWidth() + 10, img.getHeight() + 12);<NEW_LINE>// extract a sub-image and make it equivalent to the original image.<NEW_LINE>subImg[i] = larger[i].subimage(5, 6, 5 + img.getWidth(), 6 + img.getHeight(), null);<NEW_LINE>subImg[i].setTo(img);<NEW_LINE>}<NEW_LINE>// the first time it is called use the original inputs<NEW_LINE>inputModified[i] = inputParam[i];<NEW_LINE>paramDesc[i] = inputParam[i].getClass();<NEW_LINE>}<NEW_LINE>// first try it with the original image<NEW_LINE>Method m = findMethod(testClass.getClass(), function, paramDesc);<NEW_LINE>m.invoke(testClass, inputModified);<NEW_LINE>// now try it with the sub-image<NEW_LINE>for (int i = 0; i < inputModified.length; i++) {<NEW_LINE>if (subImg[i] != null)<NEW_LINE>inputModified[i] = subImg[i];<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>// the result should be the identical<NEW_LINE>if (checkEquals) {<NEW_LINE>for (int i = 0; i < inputParam.length; i++) {<NEW_LINE>if (subImg[i] == null)<NEW_LINE>continue;<NEW_LINE>assertEquals((ImageBase) inputModified[i], subImg[i], 0);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (InvocationTargetException | IllegalAccessException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>}
m.invoke(testClass, inputModified);
1,641,156
public boolean process(Point2D_F64 obs1, Point2D_F64 obs2, Point2D_F64 obs3, double length23, double length13, double length12) {<NEW_LINE>double cos12 = computeCosine(obs1, obs2);<NEW_LINE>double cos13 = computeCosine(obs1, obs3);<NEW_LINE>double cos23 = computeCosine(obs2, obs3);<NEW_LINE>double a = length23<MASK><NEW_LINE>// divide out numbers before multiplying them. less overflow/underflow that way<NEW_LINE>double a2_div_b2 = (a / b) * (a / b);<NEW_LINE>double c2_div_b2 = (c / b) * (c / b);<NEW_LINE>double a2_m_c2_div_b2 = a2_div_b2 - c2_div_b2;<NEW_LINE>double a2_p_c2_div_b2 = a2_div_b2 + c2_div_b2;<NEW_LINE>poly.c[0] = -4 * a2_div_b2 * pow2(cos12) + pow2(a2_m_c2_div_b2 + 1);<NEW_LINE>poly.c[1] = 4 * (-a2_m_c2_div_b2 * (1 + a2_m_c2_div_b2) * cos13 + 2 * a2_div_b2 * pow2(cos12) * cos13 - (1 - a2_p_c2_div_b2) * cos23 * cos12);<NEW_LINE>poly.c[2] = 2 * (pow2(a2_m_c2_div_b2) - 1 + 2 * pow2(a2_m_c2_div_b2) * pow2(cos13) + 2 * (1 - c2_div_b2) * pow2(cos23) - 4 * a2_p_c2_div_b2 * cos12 * cos13 * cos23 + 2 * (1 - a2_div_b2) * pow2(cos12));<NEW_LINE>poly.c[3] = 4 * (a2_m_c2_div_b2 * (1 - a2_m_c2_div_b2) * cos13 - (1 - a2_p_c2_div_b2) * cos23 * cos12 + 2 * c2_div_b2 * pow2(cos23) * cos13);<NEW_LINE>poly.c[4] = -4 * c2_div_b2 * cos23 * cos23 + pow2(a2_m_c2_div_b2 - 1);<NEW_LINE>// solve for real roots<NEW_LINE>solutions.reset();<NEW_LINE>if (!rootFinder.process(poly))<NEW_LINE>return false;<NEW_LINE>List<Complex_F64> roots = rootFinder.getRoots();<NEW_LINE>for (int rootIdx = 0; rootIdx < roots.size(); rootIdx++) {<NEW_LINE>Complex_F64 r = roots.get(rootIdx);<NEW_LINE>if (!r.isReal()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>double v = r.real;<NEW_LINE>double u = ((-1 + a2_div_b2 - c2_div_b2) * v * v - 2 * (a2_div_b2 - c2_div_b2) * cos13 * v + 1 + a2_div_b2 - c2_div_b2) / (2 * (cos12 - v * cos23));<NEW_LINE>// compute the distance of each point<NEW_LINE>PointDistance3 s = solutions.grow();<NEW_LINE>s.dist1 = Math.sqrt(a * a / (u * u + v * v - 2 * u * v * cos23));<NEW_LINE>s.dist2 = s.dist1 * u;<NEW_LINE>s.dist3 = s.dist1 * v;<NEW_LINE>}<NEW_LINE>return solutions.size() != 0;<NEW_LINE>}
, b = length13, c = length12;
1,582,517
public static IndexReader openIndex(String indexPath, String dirImpl) throws Exception {<NEW_LINE>final Path root = FileSystems.getDefault().getPath(Objects.requireNonNull(indexPath));<NEW_LINE>final List<DirectoryReader> readers = new ArrayList<>();<NEW_LINE>// find all valid index directories in this directory<NEW_LINE>Files.walkFileTree(root, new SimpleFileVisitor<Path>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public FileVisitResult preVisitDirectory(Path path, BasicFileAttributes attrs) throws IOException {<NEW_LINE>Directory dir = openDirectory(path, dirImpl);<NEW_LINE>try {<NEW_LINE>DirectoryReader dr = DirectoryReader.open(dir);<NEW_LINE>readers.add(dr);<NEW_LINE>} catch (IOException e) {<NEW_LINE>log.log(<MASK><NEW_LINE>}<NEW_LINE>return FileVisitResult.CONTINUE;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (readers.isEmpty()) {<NEW_LINE>throw new RuntimeException("No valid directory at the location: " + indexPath);<NEW_LINE>}<NEW_LINE>log.info(String.format(Locale.ENGLISH, "IndexReaders (%d leaf readers) successfully opened. Index path=%s", readers.size(), indexPath));<NEW_LINE>if (readers.size() == 1) {<NEW_LINE>return readers.get(0);<NEW_LINE>} else {<NEW_LINE>return new MultiReader(readers.toArray(new IndexReader[readers.size()]));<NEW_LINE>}<NEW_LINE>}
Level.WARNING, "Error opening directory", e);
1,369,815
private void updateUpdateAllButton() {<NEW_LINE>View view = getView();<NEW_LINE>if (view == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>DownloadResources indexes = getMyActivity().getDownloadThread().getIndexes();<NEW_LINE>final List<IndexItem> indexItems = indexes.getItemsToUpdate();<NEW_LINE>final TextView updateAllButton = (TextView) view.findViewById(R.id.updateAllButton);<NEW_LINE>if (indexItems.size() == 0 || indexItems.get(0).getType() == null) {<NEW_LINE>if (!Algorithms.isEmpty(errorMessage)) {<NEW_LINE>updateAllButton.setText(errorMessage);<NEW_LINE>updateAllButton.setEnabled(false);<NEW_LINE>updateAllButton.setVisibility(View.VISIBLE);<NEW_LINE>} else {<NEW_LINE>updateAllButton.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>updateAllButton.setVisibility(View.VISIBLE);<NEW_LINE>updateAllButton.setEnabled(true);<NEW_LINE>long downloadsSize = 0;<NEW_LINE>for (IndexItem indexItem : indexItems) {<NEW_LINE>downloadsSize += indexItem.getSize();<NEW_LINE>}<NEW_LINE>String updateAllText = getString(R.string.update_all, String.valueOf(downloadsSize >> 20));<NEW_LINE>updateAllButton.setText(updateAllText);<NEW_LINE>updateAllButton.setOnClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>final DownloadActivity activity = getMyActivity();<NEW_LINE>if (indexItems.size() > 3) {<NEW_LINE>AlertDialog.Builder dialog = new AlertDialog.Builder(activity);<NEW_LINE>dialog.setTitle(R.string.update_all_maps);<NEW_LINE>dialog.setMessage(getString(R.string.update_all_maps_q, indexItems.size()));<NEW_LINE>dialog.setNegativeButton(R.string.shared_string_cancel, null);<NEW_LINE>dialog.setPositiveButton(R.string.shared_string_update, new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int which) {<NEW_LINE>activity.startDownload(indexItems.toArray(new IndexItem[0]));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>dialog.create().show();<NEW_LINE>} else {<NEW_LINE>activity.startDownload(indexItems.toArray<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
(new IndexItem[0]));
1,617,937
public void validateInstance(ModuleMetaData mmd, ClassLoader loader, Object instance) {<NEW_LINE>// perform BeanValidation function<NEW_LINE>Validator validator = beanValidationSvc.getValidator(mmd, loader);<NEW_LINE>Set<<MASK><NEW_LINE>try {<NEW_LINE>cvSet = validator.validate(instance);<NEW_LINE>} catch (ValidationException ve) {<NEW_LINE>// Method validate() will throw a ValidationException when the validator fails<NEW_LINE>// unexpectedly, not when the bean configuration violates constraints (i.e. fails validation.)<NEW_LINE>Object[] msgArgs = new Object[] { Util.identity(validator), ve, Util.identity(instance) };<NEW_LINE>Tr.error(tc, "BEAN_VALIDATION_VALIDATOR_FAILED_J2CA1008", msgArgs);<NEW_LINE>}<NEW_LINE>if (cvSet != null && !cvSet.isEmpty()) {<NEW_LINE>StringBuilder msg = new StringBuilder();<NEW_LINE>for (ConstraintViolation<?> constraintViolation : cvSet) {<NEW_LINE>msg.append("\n\t" + constraintViolation);<NEW_LINE>}<NEW_LINE>ConstraintViolationException cve = new ConstraintViolationException(msg.toString(), (Set) cvSet);<NEW_LINE>Object[] msgArgs = new Object[] { Util.identity(instance), cve.getMessage() };<NEW_LINE>Tr.error(tc, "BEAN_VALIDATION_FAILED_J2CA0238", msgArgs);<NEW_LINE>throw cve;<NEW_LINE>}<NEW_LINE>}
ConstraintViolation<Object>> cvSet = null;
1,408,500
// prepare<NEW_LINE>protected String doIt() throws Exception {<NEW_LINE>X_AD_HouseKeeping houseKeeping = new X_AD_HouseKeeping(getCtx(), p_AD_HouseKeeping_ID, get_TrxName());<NEW_LINE>int tableID = houseKeeping.getAD_Table_ID();<NEW_LINE>MTable table = new MTable(getCtx(), tableID, get_TrxName());<NEW_LINE>String tableName = table.getTableName();<NEW_LINE>String whereClause = houseKeeping.getWhereClause();<NEW_LINE>int noins = 0;<NEW_LINE>int noexp = 0;<NEW_LINE>int nodel = 0;<NEW_LINE>if (houseKeeping.isSaveInHistoric()) {<NEW_LINE>String sql = "INSERT INTO hst_" + tableName + " SELECT * FROM " + tableName;<NEW_LINE>if (whereClause != null && whereClause.length() > 0)<NEW_LINE>sql = sql + " WHERE " + whereClause;<NEW_LINE>noins = DB.executeUpdate(sql, get_TrxName());<NEW_LINE>if (noins == -1)<NEW_LINE>throw new AdempiereSystemError("Cannot insert into hst_" + tableName);<NEW_LINE>addLog("@Inserted@ " + noins);<NEW_LINE>}<NEW_LINE>// saveInHistoric<NEW_LINE>Date date = new Date();<NEW_LINE>if (houseKeeping.isExportXMLBackup()) {<NEW_LINE>String pathFile = houseKeeping.getBackupFolder();<NEW_LINE>SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");<NEW_LINE>String dateString = dateFormat.format(date);<NEW_LINE>FileWriter file = new FileWriter(pathFile + File.<MASK><NEW_LINE>String sql = "SELECT * FROM " + tableName;<NEW_LINE>if (whereClause != null && whereClause.length() > 0)<NEW_LINE>sql = sql + " WHERE " + whereClause;<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>StringBuilder linexml = null;<NEW_LINE>try {<NEW_LINE>pstmt = DB.prepareStatement(sql, get_TrxName());<NEW_LINE>rs = pstmt.executeQuery();<NEW_LINE>while (rs.next()) {<NEW_LINE>GenericPO po = new GenericPO(tableName, getCtx(), rs, get_TrxName());<NEW_LINE>linexml = po.get_xmlString(linexml);<NEW_LINE>noexp++;<NEW_LINE>}<NEW_LINE>if (linexml != null)<NEW_LINE>file.write(linexml.toString());<NEW_LINE>file.close();<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw e;<NEW_LINE>} finally {<NEW_LINE>DB.close(rs, pstmt);<NEW_LINE>pstmt = null;<NEW_LINE>rs = null;<NEW_LINE>}<NEW_LINE>addLog("@Exported@ " + noexp);<NEW_LINE>}<NEW_LINE>// XmlExport<NEW_LINE>String sql = "DELETE FROM " + tableName;<NEW_LINE>if (whereClause != null && whereClause.length() > 0)<NEW_LINE>sql = sql + " WHERE " + whereClause;<NEW_LINE>nodel = DB.executeUpdate(sql, get_TrxName());<NEW_LINE>if (nodel == -1)<NEW_LINE>throw new AdempiereSystemError("Cannot delete from " + tableName);<NEW_LINE>Timestamp time = new Timestamp(date.getTime());<NEW_LINE>houseKeeping.setLastRun(time);<NEW_LINE>houseKeeping.setLastDeleted(nodel);<NEW_LINE>houseKeeping.saveEx();<NEW_LINE>addLog("@Deleted@ " + nodel);<NEW_LINE>String msg = Msg.translate(getCtx(), tableName + "_ID") + " #" + nodel;<NEW_LINE>return msg;<NEW_LINE>}
separator + tableName + dateString + ".xml");
359,350
private void registerDynamicCapabilities() {<NEW_LINE>registerTextSynchronizationForCustomUriSchemes();<NEW_LINE>DocumentFilter balaFilter = new DocumentFilter();<NEW_LINE>balaFilter.setScheme(CommonUtil.URI_SCHEME_BALA);<NEW_LINE>DocumentFilter fileFilter = new DocumentFilter();<NEW_LINE>fileFilter.setScheme(CommonUtil.URI_SCHEME_FILE);<NEW_LINE>fileFilter.setLanguage(CommonUtil.LANGUAGE_ID_BALLERINA);<NEW_LINE>DocumentFilter fileFilterToml = new DocumentFilter();<NEW_LINE>fileFilterToml.setScheme(CommonUtil.URI_SCHEME_FILE);<NEW_LINE>fileFilterToml.setLanguage(CommonUtil.LANGUAGE_ID_TOML);<NEW_LINE>DocumentFilter exprFilter = new DocumentFilter();<NEW_LINE><MASK><NEW_LINE>exprFilter.setLanguage(CommonUtil.LANGUAGE_ID_BALLERINA);<NEW_LINE>List<DocumentFilter> documentSelectors = List.of(balaFilter, fileFilter);<NEW_LINE>registerDynamicHoverSupport(documentSelectors);<NEW_LINE>registerDynamicDefinitionSupport(documentSelectors);<NEW_LINE>registerDynamicReferencesSupport(documentSelectors);<NEW_LINE>registerDynamicCompletionSupport(List.of(fileFilter, exprFilter, fileFilterToml));<NEW_LINE>registerDynamicCommandsSupport();<NEW_LINE>registerDynamicSemanticTokenSupport();<NEW_LINE>}
exprFilter.setScheme(CommonUtil.URI_SCHEME_EXPR);
1,266,714
public static void build(MeshPartBuilder builder, VertexInfo corner00, VertexInfo corner10, VertexInfo corner11, VertexInfo corner01, int divisionsU, int divisionsV) {<NEW_LINE>if (divisionsU < 1 || divisionsV < 1) {<NEW_LINE>throw new GdxRuntimeException("divisionsU and divisionV must be > 0, u,v: " + divisionsU + ", " + divisionsV);<NEW_LINE>}<NEW_LINE>builder.ensureVertices((divisionsV + 1) * (divisionsU + 1));<NEW_LINE>builder.ensureRectangleIndices(divisionsV * divisionsU);<NEW_LINE>for (int u = 0; u <= divisionsU; u++) {<NEW_LINE>final float alphaU = (<MASK><NEW_LINE>vertTmp5.set(corner00).lerp(corner10, alphaU);<NEW_LINE>vertTmp6.set(corner01).lerp(corner11, alphaU);<NEW_LINE>for (int v = 0; v <= divisionsV; v++) {<NEW_LINE>final short idx = builder.vertex(vertTmp7.set(vertTmp5).lerp(vertTmp6, (float) v / (float) divisionsV));<NEW_LINE>if (u > 0 && v > 0)<NEW_LINE>builder.rect((short) (idx - divisionsV - 2), (short) (idx - 1), idx, (short) (idx - divisionsV - 1));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
float) u / (float) divisionsU;
1,769,807
public void sendEmail(String to, String subject, String body) {<NEW_LINE>if (!isValidEmail(to)) {<NEW_LINE>LOGGER.error(String.format("The destination email address %s is not valid, no email is sent.", to));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (sesClient == null) {<NEW_LINE>String msg = "The email client is not set.";<NEW_LINE>LOGGER.error(msg);<NEW_LINE>throw new RuntimeException(msg);<NEW_LINE>}<NEW_LINE>Destination destination = new Destination().withToAddresses(to)<MASK><NEW_LINE>Content subjectContent = new Content(subject);<NEW_LINE>Content bodyContent = new Content();<NEW_LINE>Body msgBody = new Body(bodyContent);<NEW_LINE>msgBody.setHtml(new Content(body));<NEW_LINE>Message msg = new Message(subjectContent, msgBody);<NEW_LINE>String sourceAddress = getSourceAddress(to);<NEW_LINE>SendEmailRequest request = new SendEmailRequest(sourceAddress, destination, msg);<NEW_LINE>request.setReturnPath(sourceAddress);<NEW_LINE>LOGGER.debug(String.format("Sending email with subject '%s' to %s", subject, to));<NEW_LINE>SendEmailResult result = null;<NEW_LINE>try {<NEW_LINE>result = sesClient.sendEmail(request);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new RuntimeException(String.format("Failed to send email to %s", to), e);<NEW_LINE>}<NEW_LINE>LOGGER.info(String.format("Email to %s, result id is %s, subject is %s", to, result.getMessageId(), subject));<NEW_LINE>}
.withCcAddresses(getCcAddresses(to));
1,605,491
public ContextConfigurator creator(Class<? extends ContextCreator> creatorClazz) {<NEW_LINE>return creator(mc -> {<NEW_LINE>ResultHandle paramsHandle = mc.newInstance(MethodDescriptor.ofConstructor(HashMap.class));<NEW_LINE>for (Entry<String, Object> entry : params.entrySet()) {<NEW_LINE>ResultHandle valHandle = null;<NEW_LINE>if (entry.getValue() instanceof String) {<NEW_LINE>valHandle = mc.load(entry.getValue().toString());<NEW_LINE>} else if (entry.getValue() instanceof Integer) {<NEW_LINE>valHandle = mc.newInstance(MethodDescriptor.ofConstructor(Integer.class, int.class), mc.load(((Integer) entry.getValue()).intValue()));<NEW_LINE>} else if (entry.getValue() instanceof Long) {<NEW_LINE>valHandle = mc.newInstance(MethodDescriptor.ofConstructor(Long.class, long.class), mc.load(((Long) entry.getValue()).longValue()));<NEW_LINE>} else if (entry.getValue() instanceof Double) {<NEW_LINE>valHandle = mc.newInstance(MethodDescriptor.ofConstructor(Double.class, double.class), mc.load(((Double) entry.getValue(<MASK><NEW_LINE>} else if (entry.getValue() instanceof Class) {<NEW_LINE>valHandle = mc.loadClass((Class<?>) entry.getValue());<NEW_LINE>} else if (entry.getValue() instanceof Boolean) {<NEW_LINE>valHandle = mc.load((Boolean) entry.getValue());<NEW_LINE>}<NEW_LINE>mc.invokeInterfaceMethod(MethodDescriptors.MAP_PUT, paramsHandle, mc.load(entry.getKey()), valHandle);<NEW_LINE>}<NEW_LINE>ResultHandle creatorHandle = mc.newInstance(MethodDescriptor.ofConstructor(creatorClazz));<NEW_LINE>ResultHandle ret = mc.invokeInterfaceMethod(MethodDescriptor.ofMethod(ContextCreator.class, "create", InjectableContext.class, Map.class), creatorHandle, paramsHandle);<NEW_LINE>return ret;<NEW_LINE>});<NEW_LINE>}
)).doubleValue()));
182,387
public static Iterator<SqlOperator> lookupSubjectRoutines(SqlOperatorTable opTab, SqlIdentifier funcName, List<RelDataType> argTypes, List<String> argNames, SqlSyntax sqlSyntax, SqlKind sqlKind, SqlFunctionCategory category, SqlNameMatcher nameMatcher, boolean coerce) {<NEW_LINE>// start with all routines matching by name<NEW_LINE>Iterator<SqlOperator> routines = lookupSubjectRoutinesByName(opTab, funcName, sqlSyntax, category);<NEW_LINE>// first pass: eliminate routines which don't accept the given<NEW_LINE>// number of arguments<NEW_LINE><MASK><NEW_LINE>// NOTE: according to SQL99, procedures are NOT overloaded on type,<NEW_LINE>// only on number of arguments.<NEW_LINE>if (category == SqlFunctionCategory.USER_DEFINED_PROCEDURE) {<NEW_LINE>return routines;<NEW_LINE>}<NEW_LINE>// second pass: eliminate routines which don't accept the given<NEW_LINE>// argument types<NEW_LINE>routines = filterRoutinesByParameterType(sqlSyntax, routines, argTypes, argNames, coerce);<NEW_LINE>// see if we can stop now; this is necessary for the case<NEW_LINE>// of builtin functions where we don't have param type info,<NEW_LINE>// or UDF whose operands can make type coercion.<NEW_LINE>final List<SqlOperator> list = Lists.newArrayList(routines);<NEW_LINE>routines = list.iterator();<NEW_LINE>if (list.size() < 2 || coerce) {<NEW_LINE>return routines;<NEW_LINE>}<NEW_LINE>// third pass: for each parameter from left to right, eliminate<NEW_LINE>// all routines except those with the best precedence match for<NEW_LINE>// the given arguments<NEW_LINE>routines = filterRoutinesByTypePrecedence(sqlSyntax, routines, argTypes);<NEW_LINE>// fourth pass: eliminate routines which do not have the same<NEW_LINE>// SqlKind as requested<NEW_LINE>return filterOperatorRoutinesByKind(routines, sqlKind);<NEW_LINE>}
routines = filterRoutinesByParameterCount(routines, argTypes);
1,046,163
public PostingsEnum postings(PostingsEnum reuse, int flags) throws IOException {<NEW_LINE>boolean hasPositions = indexOptions.compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0;<NEW_LINE>if (hasPositions && PostingsEnum.featureRequested(flags, PostingsEnum.POSITIONS)) {<NEW_LINE>SimpleTextPostingsEnum docsAndPositionsEnum;<NEW_LINE>if (reuse != null && reuse instanceof SimpleTextPostingsEnum && ((SimpleTextPostingsEnum) reuse).canReuse(SimpleTextFieldsReader.this.in)) {<NEW_LINE>docsAndPositionsEnum = (SimpleTextPostingsEnum) reuse;<NEW_LINE>} else {<NEW_LINE>docsAndPositionsEnum = new SimpleTextPostingsEnum();<NEW_LINE>}<NEW_LINE>return docsAndPositionsEnum.reset(docsStart, indexOptions, docFreq, skipPointer);<NEW_LINE>}<NEW_LINE>SimpleTextDocsEnum docsEnum;<NEW_LINE>if (reuse != null && reuse instanceof SimpleTextDocsEnum && ((SimpleTextDocsEnum) reuse).canReuse(SimpleTextFieldsReader.this.in)) {<NEW_LINE>docsEnum = (SimpleTextDocsEnum) reuse;<NEW_LINE>} else {<NEW_LINE>docsEnum = new SimpleTextDocsEnum();<NEW_LINE>}<NEW_LINE>return docsEnum.reset(docsStart, indexOptions == <MASK><NEW_LINE>}
IndexOptions.DOCS, docFreq, skipPointer);
291,574
public Flux<NumericResponse<GeoSearchStoreCommand, Long>> geoSearchStore(Publisher<GeoSearchStoreCommand> commands) {<NEW_LINE>return connection.execute(cmd -> Flux.from(commands).flatMap(command -> {<NEW_LINE>Assert.notNull(command.getKey(), "Key must not be null!");<NEW_LINE>Assert.notNull(command.getDestKey(), "Destination key must not be null!");<NEW_LINE>Assert.notNull(command.getReference(), "GeoReference must not be null!");<NEW_LINE>Assert.notNull(command.getShape(), "GeoShape must not be null!");<NEW_LINE>Assert.notNull(command.getArgs(), "Command args must not be null!");<NEW_LINE>GeoArgs geoArgs = command.getArgs().map(LettuceConverters::toGeoArgs).orElseGet(GeoArgs::new);<NEW_LINE>Boolean storeDist = command.getArgs().map(RedisGeoCommands.GeoSearchStoreCommandArgs<MASK><NEW_LINE>GeoSearch.GeoRef<ByteBuffer> ref = LettuceConverters.toGeoRef(command.getReference());<NEW_LINE>GeoSearch.GeoPredicate predicate = LettuceConverters.toGeoPredicate(command.getShape());<NEW_LINE>Mono<Long> result = cmd.geosearchstore(command.getDestKey(), command.getKey(), ref, predicate, geoArgs, storeDist);<NEW_LINE>return result.map(it -> new NumericResponse<>(command, it));<NEW_LINE>}));<NEW_LINE>}
::isStoreDistance).orElse(false);
839,306
public okhttp3.Call readIngressClassCall(String name, String pretty, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/apis/networking.k8s.io/v1/ingressclasses/{name}".replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString()));<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();<NEW_LINE>if (pretty != null) {<NEW_LINE>localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty));<NEW_LINE>}<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, String> localVarCookieParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" };<NEW_LINE>final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>if (localVarAccept != null) {<NEW_LINE>localVarHeaderParams.put("Accept", localVarAccept);<NEW_LINE>}<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>localVarHeaderParams.put("Content-Type", localVarContentType);<NEW_LINE>String[] localVarAuthNames <MASK><NEW_LINE>return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);<NEW_LINE>}
= new String[] { "BearerToken" };
1,702,120
public void pageDialog() {<NEW_LINE>this.pageFormat = getPrinterJob().pageDialog(getPageFormat());<NEW_LINE>Paper paper = pageFormat.getPaper();<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>NumberFormat format = DecimalFormat.getInstance(Locale.US);<NEW_LINE>double paperWidth = paper.getWidth();<NEW_LINE>sb.append(format.format(paperWidth)).append(' ');<NEW_LINE>double paperHeight = paper.getHeight();<NEW_LINE>sb.append(format.format(paperHeight)).append(' ');<NEW_LINE><MASK><NEW_LINE>sb.append(format.format(imageableX)).append(' ');<NEW_LINE>double imageableY = paper.getImageableY();<NEW_LINE>sb.append(format.format(imageableY)).append(' ');<NEW_LINE>double imageableWidth = paper.getImageableWidth();<NEW_LINE>sb.append(format.format(imageableWidth)).append(' ');<NEW_LINE>double imageableHeight = paper.getImageableHeight();<NEW_LINE>sb.append(format.format(imageableHeight)).append(' ');<NEW_LINE>int pageFormatOrientation = pageFormat.getOrientation();<NEW_LINE>sb.append(format.format(pageFormatOrientation)).append(' ');<NEW_LINE>ResourceController.getResourceController().setProperty("pageSettings", sb.toString());<NEW_LINE>}
double imageableX = paper.getImageableX();
462,079
final DescribeDomainConfigResult executeDescribeDomainConfig(DescribeDomainConfigRequest describeDomainConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeDomainConfigRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeDomainConfigRequest> request = null;<NEW_LINE>Response<DescribeDomainConfigResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeDomainConfigRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeDomainConfigRequest));<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, "OpenSearch");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDomainConfig");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeDomainConfigResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new DescribeDomainConfigResultJsonUnmarshaller());
1,027,161
public static void writeRootElement(BpmnModel model, XMLStreamWriter xtw, String encoding) throws Exception {<NEW_LINE>xtw.writeStartDocument(encoding, "1.0");<NEW_LINE>// start definitions root element<NEW_LINE>xtw.writeStartElement(BPMN2_PREFIX, ELEMENT_DEFINITIONS, BPMN2_NAMESPACE);<NEW_LINE>xtw.setDefaultNamespace(BPMN2_NAMESPACE);<NEW_LINE>xtw.writeDefaultNamespace(BPMN2_NAMESPACE);<NEW_LINE>xtw.writeNamespace(BPMN2_PREFIX, BPMN2_NAMESPACE);<NEW_LINE>xtw.writeNamespace(XSI_PREFIX, XSI_NAMESPACE);<NEW_LINE>xtw.writeNamespace(XSD_PREFIX, SCHEMA_NAMESPACE);<NEW_LINE>xtw.writeNamespace(ACTIVITI_EXTENSIONS_PREFIX, ACTIVITI_EXTENSIONS_NAMESPACE);<NEW_LINE>xtw.writeNamespace(BPMNDI_PREFIX, BPMNDI_NAMESPACE);<NEW_LINE>xtw.writeNamespace(OMGDC_PREFIX, OMGDC_NAMESPACE);<NEW_LINE>xtw.writeNamespace(OMGDI_PREFIX, OMGDI_NAMESPACE);<NEW_LINE>for (String prefix : model.getNamespaces().keySet()) {<NEW_LINE>if (!defaultNamespaces.contains(prefix) && StringUtils.isNotEmpty(prefix))<NEW_LINE>xtw.writeNamespace(prefix, model.getNamespaces<MASK><NEW_LINE>}<NEW_LINE>xtw.writeAttribute(TYPE_LANGUAGE_ATTRIBUTE, SCHEMA_NAMESPACE);<NEW_LINE>xtw.writeAttribute(EXPRESSION_LANGUAGE_ATTRIBUTE, XPATH_NAMESPACE);<NEW_LINE>if (StringUtils.isNotEmpty(model.getTargetNamespace())) {<NEW_LINE>xtw.writeAttribute(TARGET_NAMESPACE_ATTRIBUTE, model.getTargetNamespace());<NEW_LINE>} else {<NEW_LINE>xtw.writeAttribute(TARGET_NAMESPACE_ATTRIBUTE, PROCESS_NAMESPACE);<NEW_LINE>}<NEW_LINE>BpmnXMLUtil.writeCustomAttributes(model.getDefinitionsAttributes().values(), xtw, model.getNamespaces(), defaultAttributes);<NEW_LINE>}
().get(prefix));
1,759,830
public static ConnPoolBean createBean(JdbcConnectionPool pool) {<NEW_LINE>ConnPoolBean bean = new ConnPoolBean();<NEW_LINE>bean.setName(pool.getName());<NEW_LINE>bean.setDescription(pool.getDescription());<NEW_LINE>bean.setDsClass(pool.getDatasourceClassname());<NEW_LINE>bean.setResType(pool.getResType());<NEW_LINE>bean.setSteadyPoolSize(pool.getSteadyPoolSize());<NEW_LINE>bean.setMaxPoolSize(pool.getMaxPoolSize());<NEW_LINE>bean.setMaxWaitTimeMilli(pool.getMaxWaitTimeInMillis());<NEW_LINE>bean.setPoolResizeQty(pool.getPoolResizeQuantity());<NEW_LINE>bean.setIdleIimeoutSecond(pool.getIdleTimeoutInSeconds());<NEW_LINE><MASK><NEW_LINE>if (tranxIsolation == null) {<NEW_LINE>// NOI18N<NEW_LINE>tranxIsolation = ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/ide/editors/Bundle").getString("LBL_driver_default");<NEW_LINE>}<NEW_LINE>bean.setTranxIsoLevel(tranxIsolation);<NEW_LINE>bean.setIsIsoLevGuaranteed(pool.getIsIsolationLevelGuaranteed());<NEW_LINE>bean.setIsConnValidReq(pool.getIsConnectionValidationRequired());<NEW_LINE>bean.setConnValidMethod(pool.getConnectionValidationMethod());<NEW_LINE>bean.setValidationTableName(pool.getValidationTableName());<NEW_LINE>bean.setFailAllConns(pool.getFailAllConnections());<NEW_LINE>bean.setNontranxconns(pool.getNonTransactionalConnections());<NEW_LINE>bean.setAllowNonComponentCallers(pool.getAllowNonComponentCallers());<NEW_LINE>PropertyElement[] extraProperties = pool.getPropertyElement();<NEW_LINE>Vector vec = new Vector();<NEW_LINE>for (int i = 0; i < extraProperties.length; i++) {<NEW_LINE>NameValuePair pair = new NameValuePair();<NEW_LINE>pair.setParamName(extraProperties[i].getName());<NEW_LINE>pair.setParamValue(extraProperties[i].getValue());<NEW_LINE>vec.add(pair);<NEW_LINE>}<NEW_LINE>if (vec != null && vec.size() > 0) {<NEW_LINE>NameValuePair[] props = new NameValuePair[vec.size()];<NEW_LINE>bean.setExtraParams((NameValuePair[]) vec.toArray(props));<NEW_LINE>}<NEW_LINE>return bean;<NEW_LINE>}
String tranxIsolation = pool.getTransactionIsolationLevel();
902,659
public void marshall(CreateResponsePlanRequest createResponsePlanRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createResponsePlanRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createResponsePlanRequest.getActions(), ACTIONS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createResponsePlanRequest.getChatChannel(), CHATCHANNEL_BINDING);<NEW_LINE>protocolMarshaller.marshall(createResponsePlanRequest.getClientToken(), CLIENTTOKEN_BINDING);<NEW_LINE>protocolMarshaller.marshall(createResponsePlanRequest.getDisplayName(), DISPLAYNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createResponsePlanRequest.getEngagements(), ENGAGEMENTS_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createResponsePlanRequest.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createResponsePlanRequest.getTags(), TAGS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
createResponsePlanRequest.getIncidentTemplate(), INCIDENTTEMPLATE_BINDING);
1,032,186
public MTreeNode loadNodeInfo(final MTree tree, final ResultSet rs) throws SQLException {<NEW_LINE>final int nodeId = rs.getInt("Node_ID");<NEW_LINE>final String name = rs.getString("Name");<NEW_LINE>final String description = rs.getString("Description");<NEW_LINE>final boolean isAllowChildren = "Y".equals<MASK><NEW_LINE>final Color color = loadPrintColor(tree, rs);<NEW_LINE>final int seqNo = 0;<NEW_LINE>final String imageIndicator = null;<NEW_LINE>final boolean onBar = false;<NEW_LINE>final int parent_ID = 0;<NEW_LINE>final MTreeNode node = new MTreeNode(nodeId, seqNo, name, description, parent_ID, isAllowChildren, imageIndicator, onBar, color);<NEW_LINE>node.setAD_Tree_ID(tree.getAD_Tree_ID());<NEW_LINE>node.setAD_Table_ID(tree.getAD_Table_ID());<NEW_LINE>return node;<NEW_LINE>}
(rs.getString("IsSummary"));
1,290,902
private void paintWindows(Graphics2D g2d, AffineTransform xform) {<NEW_LINE>Font f = g2d.getFont();<NEW_LINE>Font biggerFont = f.deriveFont(40f);<NEW_LINE>g2d.setFont(biggerFont);<NEW_LINE>g2d.setColor(Color.GRAY);<NEW_LINE>Window[] windows = Window.getWindows();<NEW_LINE>int z = 0;<NEW_LINE>Collection<WindowInfo> infos = visibleWindows.values();<NEW_LINE>for (WindowInfo info : infos) {<NEW_LINE>int infoz = info.getZ();<NEW_LINE>z = Math.max(infoz, z);<NEW_LINE>}<NEW_LINE>for (Window w : windows) {<NEW_LINE>if (!w.isShowing()) {<NEW_LINE>visibleWindows.remove(w);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>WindowInfo info = visibleWindows.get(w);<NEW_LINE>if (info == null) {<NEW_LINE>info = new WindowInfo(w, g2d.getTransform(), ++z);<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>// update the transform, in case it has changed since we create the info<NEW_LINE>info.xform = xform;<NEW_LINE>}<NEW_LINE>info.paint(g2d);<NEW_LINE>}<NEW_LINE>}
visibleWindows.put(w, info);
1,299,712
private void showPopup() {<NEW_LINE>if (!isEnabled())<NEW_LINE>return;<NEW_LINE>log.finest("showPopup");<NEW_LINE>popup.setVisible(false);<NEW_LINE>if (textBox.isEnabled() && updateListData() && listBox.getModel().getSize() != 0) {<NEW_LINE>if (!(textBox instanceof JTextField)) {<NEW_LINE>textBox.getDocument().addDocumentListener(documentListener);<NEW_LINE>}<NEW_LINE>textBox.registerKeyboardAction(acceptAction, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), JComponent.WHEN_FOCUSED);<NEW_LINE>int size = listBox<MASK><NEW_LINE>listBox.setVisibleRowCount(size < 10 ? size : 10);<NEW_LINE>int x = 0;<NEW_LINE>try {<NEW_LINE>x = textBox.getUI().modelToView(textBox, 0).x;<NEW_LINE>} catch (BadLocationException e) {<NEW_LINE>// this should never happen!!!<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>popup.setMinimumSize(new Dimension(textBox.getWidth(), 10));<NEW_LINE>popup.show(textBox, x, textBox.getHeight());<NEW_LINE>} else {<NEW_LINE>popup.setVisible(false);<NEW_LINE>}<NEW_LINE>textBox.requestFocus();<NEW_LINE>}
.getModel().getSize();
1,452,732
protected void loadAllFlows(final List<Project> projects) {<NEW_LINE>try {<NEW_LINE>final Map<Project, List<Flow>> projectToFlows = this.projectLoader.fetchAllFlowsForProjects(projects);<NEW_LINE>// Load the flows into the project objects<NEW_LINE>for (final Map.Entry<Project, List<Flow>> entry : projectToFlows.entrySet()) {<NEW_LINE>final Project project = entry.getKey();<NEW_LINE>final List<Flow> flows = entry.getValue();<NEW_LINE>final Map<String, Flow> flowMap = new HashMap<>();<NEW_LINE>for (final Flow flow : flows) {<NEW_LINE>flowMap.put(<MASK><NEW_LINE>}<NEW_LINE>project.setFlows(flowMap);<NEW_LINE>}<NEW_LINE>} catch (final ProjectManagerException e) {<NEW_LINE>logger.error("Could not load projects flows from store.", e);<NEW_LINE>throw new RuntimeException("Could not load projects flows from store.", e);<NEW_LINE>}<NEW_LINE>}
flow.getId(), flow);
381,349
private void sendNodeStatsReport() {<NEW_LINE>final boolean isMiningEnabled;<NEW_LINE>if (miningCoordinator instanceof CliqueMiningCoordinator) {<NEW_LINE>isMiningEnabled = ((<MASK><NEW_LINE>} else {<NEW_LINE>isMiningEnabled = miningCoordinator.isMining();<NEW_LINE>}<NEW_LINE>final boolean isSyncing = syncState.isInSync();<NEW_LINE>final long gasPrice = suggestGasPrice(blockchainQueries.getBlockchain().getChainHeadBlock());<NEW_LINE>final long hashrate = miningCoordinator.hashesPerSecond().orElse(0L);<NEW_LINE>final int peersNumber = protocolManager.ethContext().getEthPeers().peerCount();<NEW_LINE>final NodeStatsReport nodeStatsReport = ImmutableNodeStatsReport.builder().id(enodeURL.getNodeId().toHexString()).stats(true, isMiningEnabled, hashrate, peersNumber, gasPrice, isSyncing, 100).build();<NEW_LINE>sendMessage(webSocket, new EthStatsRequest(STATS, nodeStatsReport));<NEW_LINE>}
CliqueMiningCoordinator) miningCoordinator).isSigner();
1,392,813
public DataSerializableFactory createFactory() {<NEW_LINE>ConstructorFunction<Integer, IdentifiedDataSerializable>[] constructors = new ConstructorFunction[LEN];<NEW_LINE>constructors[PARTITION_RUNTIME_STATE] = arg -> new PartitionRuntimeState();<NEW_LINE>constructors[ASSIGN_PARTITIONS] = arg -> new AssignPartitions();<NEW_LINE>constructors[PARTITION_BACKUP_REPLICA_ANTI_ENTROPY] = arg -> new PartitionBackupReplicaAntiEntropyOperation();<NEW_LINE>constructors[FETCH_PARTITION_STATE] = arg -> new FetchPartitionStateOperation();<NEW_LINE>constructors[HAS_ONGOING_MIGRATION] = arg -> new HasOngoingMigration();<NEW_LINE>constructors[MIGRATION_COMMIT] = arg -> new MigrationCommitOperation();<NEW_LINE>constructors[PARTITION_STATE_OP] = arg -> new PartitionStateOperation();<NEW_LINE>constructors[PROMOTION_COMMIT] = arg -> new PromotionCommitOperation();<NEW_LINE>constructors[REPLICA_SYNC_REQUEST] = arg -> new PartitionReplicaSyncRequest();<NEW_LINE>constructors[REPLICA_SYNC_RESPONSE] = arg -> new PartitionReplicaSyncResponse();<NEW_LINE>constructors[REPLICA_SYNC_RETRY_RESPONSE] = arg -> new PartitionReplicaSyncRetryResponse();<NEW_LINE>constructors[SAFE_STATE_CHECK] = arg -> new SafeStateCheckOperation();<NEW_LINE>constructors[SHUTDOWN_REQUEST] = arg -> new ShutdownRequestOperation();<NEW_LINE>constructors[SHUTDOWN_RESPONSE] = arg -> new ShutdownResponseOperation();<NEW_LINE>constructors[REPLICA_FRAGMENT_MIGRATION_STATE] = arg -> new ReplicaFragmentMigrationState();<NEW_LINE>constructors[MIGRATION] = arg -> new MigrationOperation();<NEW_LINE>constructors[MIGRATION_REQUEST] = arg -> new MigrationRequestOperation();<NEW_LINE>constructors[<MASK><NEW_LINE>constructors[PARTITION_REPLICA] = arg -> new PartitionReplica();<NEW_LINE>constructors[PUBLISH_COMPLETED_MIGRATIONS] = arg -> new PublishCompletedMigrationsOperation();<NEW_LINE>constructors[PARTITION_STATE_CHECK_OP] = arg -> new PartitionStateCheckOperation();<NEW_LINE>constructors[REPLICA_MIGRATION_EVENT] = arg -> new ReplicaMigrationEventImpl();<NEW_LINE>constructors[MIGRATION_EVENT] = arg -> new MigrationStateImpl();<NEW_LINE>constructors[PARTITION_LOST_EVENT] = arg -> new PartitionLostEventImpl();<NEW_LINE>constructors[REPLICA_SYNC_REQUEST_OFFLOADABLE] = arg -> new PartitionReplicaSyncRequestOffloadable();<NEW_LINE>return new ArrayDataSerializableFactory(constructors);<NEW_LINE>}
NON_FRAGMENTED_SERVICE_NAMESPACE] = arg -> NonFragmentedServiceNamespace.INSTANCE;
1,350,788
public static void main(String[] args) throws Throwable {<NEW_LINE>OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);<NEW_LINE>try {<NEW_LINE>// Put object form file with traffic limit<NEW_LINE>InputStream inputStream = new FileInputStream("<yourlocalFile>");<NEW_LINE>PutObjectRequest PutObjectRequest = new <MASK><NEW_LINE>// Set traffic limit speed 100KB/s<NEW_LINE>PutObjectRequest.setTrafficLimit(100 * 1024 * 8);<NEW_LINE>ossClient.putObject(PutObjectRequest);<NEW_LINE>// Get object to local file with traffic limit<NEW_LINE>GetObjectRequest getObjectRequest = new GetObjectRequest(bucketName, key);<NEW_LINE>// Set traffic limit speed 100KB/s<NEW_LINE>getObjectRequest.setTrafficLimit(100 * 1024 * 8);<NEW_LINE>File localFile = new File("<yourLocalFile>");<NEW_LINE>ossClient.getObject(getObjectRequest, localFile);<NEW_LINE>} catch (OSSException oe) {<NEW_LINE>System.out.println("Caught an OSSException, which means your request made it to OSS, " + "but was rejected with an error response for some reason.");<NEW_LINE>System.out.println("Error Message: " + oe.getErrorMessage());<NEW_LINE>System.out.println("Error Code: " + oe.getErrorCode());<NEW_LINE>System.out.println("Request ID: " + oe.getRequestId());<NEW_LINE>System.out.println("Host ID: " + oe.getHostId());<NEW_LINE>} catch (ClientException ce) {<NEW_LINE>System.out.println("Caught an ClientException, which means the client encountered " + "a serious internal problem while trying to communicate with OSS, " + "such as not being able to access the network.");<NEW_LINE>System.out.println("Error Message: " + ce.getMessage());<NEW_LINE>} finally {<NEW_LINE>ossClient.shutdown();<NEW_LINE>}<NEW_LINE>}
PutObjectRequest(bucketName, key, inputStream);
1,709,281
public MouthOpen unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>MouthOpen mouthOpen = new MouthOpen();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("Value", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>mouthOpen.setValue(context.getUnmarshaller(Boolean.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Confidence", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>mouthOpen.setConfidence(context.getUnmarshaller(Float.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return mouthOpen;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
403,125
public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException {<NEW_LINE>if (arguments.length != 1) {<NEW_LINE>throw new UDFArgumentException("Usage : map_key_values( map) ");<NEW_LINE>}<NEW_LINE>if (!arguments[0].getCategory().equals(Category.MAP)) {<NEW_LINE>throw new UDFArgumentException("Usage : map_key_values( map) ");<NEW_LINE>}<NEW_LINE>moi = (MapObjectInspector) arguments[0];<NEW_LINE>// //<NEW_LINE>List<String> structFieldNames = new ArrayList<String>();<NEW_LINE>List<ObjectInspector> structFieldObjectInspectors = new ArrayList<ObjectInspector>();<NEW_LINE>structFieldNames.add("key");<NEW_LINE>structFieldObjectInspectors.add(moi.getMapKeyObjectInspector());<NEW_LINE>structFieldNames.add("value");<NEW_LINE>structFieldObjectInspectors.<MASK><NEW_LINE>ObjectInspector keyOI = ObjectInspectorFactory.getStandardStructObjectInspector(structFieldNames, structFieldObjectInspectors);<NEW_LINE>ObjectInspector arrayOI = ObjectInspectorFactory.getStandardListObjectInspector(keyOI);<NEW_LINE>return arrayOI;<NEW_LINE>}
add(moi.getMapValueObjectInspector());
713,700
protected List<TestSuite> createDerivedSuites(FeatureSpecificTestSuiteBuilder<?, ? extends OneSizeTestContainerGenerator<Collection<E>, E>> parentBuilder) {<NEW_LINE>List<TestSuite> derivedSuites = new ArrayList<>(super.createDerivedSuites(parentBuilder));<NEW_LINE>if (!parentBuilder.getFeatures().contains(SUBSET_VIEW)) {<NEW_LINE>// Other combinations are inherited from SortedSetTestSuiteBuilder.<NEW_LINE>derivedSuites.add(createSubsetSuite(parentBuilder, Bound.NO_BOUND, Bound.INCLUSIVE));<NEW_LINE>derivedSuites.add(createSubsetSuite(parentBuilder, Bound<MASK><NEW_LINE>derivedSuites.add(createSubsetSuite(parentBuilder, Bound.EXCLUSIVE, Bound.EXCLUSIVE));<NEW_LINE>derivedSuites.add(createSubsetSuite(parentBuilder, Bound.EXCLUSIVE, Bound.INCLUSIVE));<NEW_LINE>derivedSuites.add(createSubsetSuite(parentBuilder, Bound.INCLUSIVE, Bound.INCLUSIVE));<NEW_LINE>}<NEW_LINE>if (!parentBuilder.getFeatures().contains(DESCENDING_VIEW)) {<NEW_LINE>derivedSuites.add(createDescendingSuite(parentBuilder));<NEW_LINE>}<NEW_LINE>return derivedSuites;<NEW_LINE>}
.EXCLUSIVE, Bound.NO_BOUND));
203,889
private void statInit() {<NEW_LINE>labelValue.setText(Msg.getMsg(Env.getCtx(), "Value"));<NEW_LINE>fieldValue.setBackground(AdempierePLAF.getInfoBackground());<NEW_LINE>fieldValue.addActionListener(this);<NEW_LINE>labelName.setText(Msg.getMsg(Env.getCtx(), "Name"));<NEW_LINE>fieldName.setBackground(AdempierePLAF.getInfoBackground());<NEW_LINE>fieldName.addActionListener(this);<NEW_LINE>// start: metas: c.ghita@metas.ro : 01436<NEW_LINE>labelName2.setText(Msg.getMsg(Env.getCtx(), "Name2"));<NEW_LINE>fieldName2.setBackground(AdempierePLAF.getInfoBackground());<NEW_LINE>fieldName2.addActionListener(this);<NEW_LINE>// end: metas: c.ghita@metas.ro : 01436<NEW_LINE>labelContact.setText(Msg.getMsg(Env.getCtx(), "Contact"));<NEW_LINE>fieldContact.setBackground(AdempierePLAF.getInfoBackground());<NEW_LINE>fieldContact.addActionListener(this);<NEW_LINE>labelEMail.setText(Msg.getMsg(Env.getCtx(), "EMail"));<NEW_LINE>fieldEMail.setBackground(AdempierePLAF.getInfoBackground());<NEW_LINE>fieldEMail.addActionListener(this);<NEW_LINE>labelPostal.setText(Msg.getMsg(Env.getCtx(), "Postal"));<NEW_LINE>fieldPostal.setBackground(AdempierePLAF.getInfoBackground());<NEW_LINE>fieldPostal.addActionListener(this);<NEW_LINE>labelPhone.setText(Msg.translate(Env.getCtx(), "Phone"));<NEW_LINE>fieldPhone.setBackground(AdempierePLAF.getInfoBackground());<NEW_LINE>fieldPhone.addActionListener(this);<NEW_LINE>labelSearch.setText(Msg.translate(Env.getCtx(), "search"));<NEW_LINE>fieldSearch.setBackground(AdempierePLAF.getInfoBackground());<NEW_LINE>fieldSearch.addActionListener(this);<NEW_LINE>// metas<NEW_LINE>// labelSponsorNo.setText(Msg.translate(Env.getCtx(), "Sponsor"));<NEW_LINE>// fieldSponsorNo.setBackground(AdempierePLAF.getInfoBackground());<NEW_LINE>// fieldSponsorNo.addActionListener(this);<NEW_LINE>// metas end<NEW_LINE>checkAND.setText(Msg.getMsg(Env.getCtx(), "SearchAND"));<NEW_LINE>checkAND.setToolTipText(Msg.getMsg(Env<MASK><NEW_LINE>checkAND.setSelected(true);<NEW_LINE>checkAND.addActionListener(this);<NEW_LINE>if (m_isSOTrx) {<NEW_LINE>checkCustomer.setText(Msg.getMsg(Env.getCtx(), "OnlyCustomers"));<NEW_LINE>} else {<NEW_LINE>checkCustomer.setText(Msg.getMsg(Env.getCtx(), "OnlyVendors"));<NEW_LINE>}<NEW_LINE>checkCustomer.setSelected(true);<NEW_LINE>checkCustomer.setFocusable(false);<NEW_LINE>checkCustomer.setRequestFocusEnabled(false);<NEW_LINE>checkCustomer.addActionListener(this);<NEW_LINE>//<NEW_LINE>parameterPanel.setLayout(new ALayout());<NEW_LINE>parameterPanel.setPreferredSize(new Dimension(1200, 100));<NEW_LINE>//<NEW_LINE>parameterPanel.add(labelValue, new ALayoutConstraint(0, 0));<NEW_LINE>parameterPanel.add(fieldValue, null);<NEW_LINE>parameterPanel.add(labelContact, null);<NEW_LINE>parameterPanel.add(fieldContact, null);<NEW_LINE>parameterPanel.add(labelPhone, null);<NEW_LINE>parameterPanel.add(fieldPhone, null);<NEW_LINE>parameterPanel.add(checkCustomer, null);<NEW_LINE>//<NEW_LINE>parameterPanel.add(labelName, new ALayoutConstraint(1, 0));<NEW_LINE>parameterPanel.add(fieldName, null);<NEW_LINE>// start: metas: c.ghita@metas.ro : 01436<NEW_LINE>parameterPanel.add(labelName2, null);<NEW_LINE>parameterPanel.add(fieldName2, null);<NEW_LINE>// end: metas: c.ghita@metas.ro : 01436<NEW_LINE>parameterPanel.add(labelEMail, null);<NEW_LINE>parameterPanel.add(fieldEMail, null);<NEW_LINE>parameterPanel.add(checkAND, null);<NEW_LINE>// metas-2009_0017_AP1_G42<NEW_LINE>InfoBPartner_RadiusSearch.customize(this);<NEW_LINE>parameterPanel.add(labelPostal, new ALayoutConstraint(3, 0));<NEW_LINE>parameterPanel.add(fieldPostal, null);<NEW_LINE>parameterPanel.add(labelSearch, null);<NEW_LINE>parameterPanel.add(fieldSearch, null);<NEW_LINE>}
.getCtx(), "SearchANDInfo"));
1,370,791
private static EditorTextField createTextField(@Nonnull final Project project, @Nonnull final ProjectSystemId externalSystemId) {<NEW_LINE>ExternalSystemManager<?, ?, ?, ?, ?> manager = ExternalSystemApiUtil.getManager(externalSystemId);<NEW_LINE>assert manager != null;<NEW_LINE>final AbstractExternalSystemLocalSettings settings = manager.getLocalSettingsProvider().fun(project);<NEW_LINE>final ExternalSystemUiAware uiAware = ExternalSystemUiUtil.getUiAware(externalSystemId);<NEW_LINE>TextFieldCompletionProvider provider = new TextFieldCompletionProviderDumbAware() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected void addCompletionVariants(@Nonnull String text, int offset, @Nonnull String prefix, @Nonnull CompletionResultSet result) {<NEW_LINE>for (Map.Entry<ExternalProjectPojo, Collection<ExternalProjectPojo>> entry : settings.getAvailableProjects().entrySet()) {<NEW_LINE>String rootProjectPath = entry.getKey().getPath();<NEW_LINE>String rootProjectName = uiAware.getProjectRepresentationName(rootProjectPath, null);<NEW_LINE>ExternalProjectPathLookupElement rootProjectElement = new ExternalProjectPathLookupElement(rootProjectName, rootProjectPath);<NEW_LINE>result.addElement(rootProjectElement);<NEW_LINE>for (ExternalProjectPojo subProject : entry.getValue()) {<NEW_LINE>String p = subProject.getPath();<NEW_LINE>if (rootProjectPath.equals(p)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String subProjectName = uiAware.getProjectRepresentationName(p, rootProjectPath);<NEW_LINE>ExternalProjectPathLookupElement subProjectElement = new ExternalProjectPathLookupElement(subProjectName, p);<NEW_LINE>result.addElement(subProjectElement);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>result.stopHere();<NEW_LINE>}<NEW_LINE>};<NEW_LINE>EditorTextField result = provider.createEditor(project, false, new Consumer<Editor>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void consume(Editor editor) {<NEW_LINE><MASK><NEW_LINE>editor.getSettings().setShowIntentionBulb(false);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>result.setBorder(UIUtil.getTextFieldBorder());<NEW_LINE>result.setOneLineMode(true);<NEW_LINE>result.setOpaque(true);<NEW_LINE>result.setBackground(UIUtil.getTextFieldBackground());<NEW_LINE>return result;<NEW_LINE>}
collapseIfPossible(editor, externalSystemId, project);
1,596,686
public Mono<Response<Void>> generateNewSitePublishingPasswordWithResponseAsync(String resourceGroupName, String name) {<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 (resourceGroupName == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (name == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));<NEW_LINE>}<NEW_LINE>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>return FluxUtil.withContext(context -> service.generateNewSitePublishingPassword(this.client.getEndpoint(), resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), context)).contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));<NEW_LINE>}
error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
448,925
final DeleteResourceResult executeDeleteResource(DeleteResourceRequest deleteResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteResourceRequest> request = null;<NEW_LINE>Response<DeleteResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteResourceRequest));<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, "CloudControl");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteResourceResultJsonUnmarshaller());<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,266,271
public void run() {<NEW_LINE>SelectionManager manager = VizController.getInstance().getSelectionManager();<NEW_LINE>if (manager.isSelectionEnabled()) {<NEW_LINE>if (manager.isRectangleSelection()) {<NEW_LINE>configureLink.setVisible(false);<NEW_LINE>statusLabel.setText(NbBundle.getMessage(SelectionBar.class, "SelectionBar.statusLabel.rectangleSelection"));<NEW_LINE>} else if (manager.isDirectMouseSelection()) {<NEW_LINE>configureLink.setVisible(true);<NEW_LINE>statusLabel.setText(NbBundle.getMessage(SelectionBar.class, "SelectionBar.statusLabel.mouseSelection"));<NEW_LINE>} else if (manager.isDraggingEnabled()) {<NEW_LINE>configureLink.setVisible(true);<NEW_LINE>statusLabel.setText(NbBundle.getMessage(SelectionBar.class, "SelectionBar.statusLabel.dragging"));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>configureLink.setVisible(false);<NEW_LINE>statusLabel.setText(NbBundle.getMessage<MASK><NEW_LINE>}<NEW_LINE>}
(SelectionBar.class, "SelectionBar.statusLabel.noSelection"));
1,260,613
protected void configure() {<NEW_LINE>if (options.enablePreemptor) {<NEW_LINE>LOG.info("Preemptor Enabled.");<NEW_LINE>bind(PreemptorMetrics.class).in(Singleton.class);<NEW_LINE>bind(Preemptor.class).to(Preemptor.PreemptorImpl.class);<NEW_LINE>bind(Preemptor.PreemptorImpl.class).in(Singleton.class);<NEW_LINE>bind(new TypeLiteral<Amount<Long, Time>>() {<NEW_LINE>}).annotatedWith(PendingTaskProcessor.PreemptionDelay.class).toInstance(options.preemptionDelay);<NEW_LINE>bind(BiCacheSettings.class).toInstance(new BiCacheSettings<MASK><NEW_LINE>bind(new TypeLiteral<BiCache<PreemptionProposal, TaskGroupKey>>() {<NEW_LINE>}).in(Singleton.class);<NEW_LINE>bind(new TypeLiteral<Integer>() {<NEW_LINE>}).annotatedWith(PendingTaskProcessor.ReservationBatchSize.class).toInstance(options.reservationMaxBatchSize);<NEW_LINE>for (Module module : MoreModules.instantiateAll(options.slotFinderModules, cliOptions)) {<NEW_LINE>install(module);<NEW_LINE>}<NEW_LINE>// We need to convert the initial delay time unit to be the same as the search interval<NEW_LINE>long preemptionSlotSearchInitialDelay = options.preemptionSlotSearchInitialDelay.as(options.preemptionSlotSearchInterval.getUnit());<NEW_LINE>bind(PreemptorService.class).in(Singleton.class);<NEW_LINE>bind(AbstractScheduledService.Scheduler.class).toInstance(AbstractScheduledService.Scheduler.newFixedRateSchedule(preemptionSlotSearchInitialDelay, options.preemptionSlotSearchInterval.getValue(), options.preemptionSlotSearchInterval.getUnit().getTimeUnit()));<NEW_LINE>expose(PreemptorService.class);<NEW_LINE>expose(Runnable.class).annotatedWith(PreemptionSlotFinder.class);<NEW_LINE>} else {<NEW_LINE>bind(Preemptor.class).toInstance(NULL_PREEMPTOR);<NEW_LINE>LOG.warn("Preemptor Disabled.");<NEW_LINE>}<NEW_LINE>expose(Preemptor.class);<NEW_LINE>}
(options.preemptionSlotHoldTime, "preemption_slot"));
1,257,378
public DoubleDataStore computeAverageDistInSet() {<NEW_LINE>WritableDoubleDataStore davg = DataStoreUtil.makeDoubleStorage(points.getDBIDs(), DataStoreFactory.HINT_HOT);<NEW_LINE>WritableIntegerDataStore nDists = DataStoreUtil.makeIntegerStorage(points.getDBIDs(), DataStoreFactory.HINT_HOT | DataStoreFactory.HINT_TEMP);<NEW_LINE>FiniteProgress splitp = LOG.isVerbose() ? new FiniteProgress("Processing splits for density estimation", splitsets.<MASK><NEW_LINE>DBIDVar v = DBIDUtil.newVar();<NEW_LINE>for (Iterator<ArrayDBIDs> it1 = splitsets.iterator(); it1.hasNext(); ) {<NEW_LINE>ArrayDBIDs pinSet = it1.next();<NEW_LINE>final int len = pinSet.size();<NEW_LINE>final int indoff = len >> 1;<NEW_LINE>pinSet.assignVar(indoff, v);<NEW_LINE>NumberVector midpoint = points.get(v);<NEW_LINE>for (DBIDArrayIter it = pinSet.iter(); it.getOffset() < len; it.advance()) {<NEW_LINE>if (DBIDUtil.equal(it, v)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>double dist = EuclideanDistance.STATIC.distance(points.get(it), midpoint);<NEW_LINE>++distanceComputations;<NEW_LINE>davg.increment(v, dist);<NEW_LINE>nDists.increment(v, 1);<NEW_LINE>davg.increment(it, dist);<NEW_LINE>nDists.increment(it, 1);<NEW_LINE>}<NEW_LINE>LOG.incrementProcessed(splitp);<NEW_LINE>}<NEW_LINE>LOG.ensureCompleted(splitp);<NEW_LINE>for (DBIDIter it = points.getDBIDs().iter(); it.valid(); it.advance()) {<NEW_LINE>// it might be that a point does not occur for a certain size of a<NEW_LINE>// projection (likely if do few projections, in this case there is no avg<NEW_LINE>// distance)<NEW_LINE>int count = nDists.intValue(it);<NEW_LINE>double val = (count == 0) ? FastOPTICS.UNDEFINED_DISTANCE : (davg.doubleValue(it) / count);<NEW_LINE>davg.put(it, val);<NEW_LINE>}<NEW_LINE>// No longer needed after normalization<NEW_LINE>nDists.destroy();<NEW_LINE>return davg;<NEW_LINE>}
size(), LOG) : null;
1,529,195
public void addEdge(int threadId, WritableComparable srcId, WritableComparable dstId, Writable value) throws IOException {<NEW_LINE>int bytesEdgeSrcOffset = 0, bytesEdgeDstOffset = 0, bytesDataOffsets = 0;<NEW_LINE>bytesEdgeSrcOffset = (int) -<MASK><NEW_LINE>srcId.write(edgeSrcIdOutputStream[threadId]);<NEW_LINE>bytesEdgeSrcOffset += edgeSrcIdOutputStream[threadId].bytesWriten();<NEW_LINE>edgeSrcIdOffsetArr[threadId].push_back(bytesEdgeSrcOffset);<NEW_LINE>bytesEdgeDstOffset = (int) -edgeDstOutputStream[threadId].bytesWriten();<NEW_LINE>dstId.write(edgeDstOutputStream[threadId]);<NEW_LINE>bytesEdgeDstOffset += edgeDstOutputStream[threadId].bytesWriten();<NEW_LINE>edgeDstIdOffsetArr[threadId].push_back(bytesEdgeDstOffset);<NEW_LINE>bytesDataOffsets = (int) -edgeDataOutStream[threadId].bytesWriten();<NEW_LINE>value.write(edgeDataOutStream[threadId]);<NEW_LINE>bytesDataOffsets += edgeDataOutStream[threadId].bytesWriten();<NEW_LINE>edgeDataOffsetsArr[threadId].push_back(bytesDataOffsets);<NEW_LINE>// logger.debug("worker [{}] adding edge [{}]->[{}], value {}", workerId, srcId,<NEW_LINE>// dstId, value);<NEW_LINE>}
edgeSrcIdOutputStream[threadId].bytesWriten();
321,670
public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.advanceTime(0);<NEW_LINE>env.compileDeploy("@public create context Ctx " + "context C0 initiated by SupportBean as criteria terminated by SupportBean(theString='x'), " + "context C1 start @now end (*,*,*,*,*,*/5)", path);<NEW_LINE>env.compileDeploy("@name('s0') context Ctx select context.C0.criteria as c0, event, count(*) as cnt from SupportBean_S0(p00=context.C0.criteria.theString) as event", path);<NEW_LINE>env.addListener("s0");<NEW_LINE>SupportBean criteriaA = new SupportBean("A", 0);<NEW_LINE>env.sendEventBean(criteriaA);<NEW_LINE>env.sendEventBean(<MASK><NEW_LINE>env.sendEventBean(new SupportBean("B", 0));<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>env.milestone(0);<NEW_LINE>SupportBean_S0 s0 = new SupportBean_S0(2, "A");<NEW_LINE>env.sendEventBean(s0);<NEW_LINE>env.assertPropsNew("s0", "c0,event,cnt".split(","), new Object[] { criteriaA, s0, 1L });<NEW_LINE>env.sendEventBean(new SupportBean_S0(3, "A"));<NEW_LINE>env.assertPropsNew("s0", "c0,cnt".split(","), new Object[] { criteriaA, 2L });<NEW_LINE>env.milestone(1);<NEW_LINE>env.advanceTime(5000000);<NEW_LINE>env.sendEventBean(new SupportBean_S0(4, "A"));<NEW_LINE>env.assertPropsNew("s0", "c0,cnt".split(","), new Object[] { criteriaA, 1L });<NEW_LINE>env.undeployAll();<NEW_LINE>}
new SupportBean_S0(1, "B"));
1,702,854
protected Class<?> findClass(String name, boolean returnNull) throws ClassNotFoundException {<NEW_LINE>String resourceName = Util.convertClassNameToResourceName(name);<NEW_LINE>final ByteResourceInformation classBytesResourceInformation = shadowedLoader.findClassBytes(name, resourceName);<NEW_LINE>if (classBytesResourceInformation == null) {<NEW_LINE>if (returnNull) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>throw new ClassNotFoundException(name);<NEW_LINE>}<NEW_LINE>// Now define a package for this class if it has one<NEW_LINE>int <MASK><NEW_LINE>if (lastDotIndex != -1) {<NEW_LINE>String packageName = name.substring(0, lastDotIndex);<NEW_LINE>// Try to avoid defining a package twice<NEW_LINE>if (this.getPackage(packageName) == null) {<NEW_LINE>definePackage(classBytesResourceInformation, packageName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>byte[] bytes = classBytesResourceInformation.getBytes();<NEW_LINE>return defineClass(name, bytes, 0, bytes.length);<NEW_LINE>}
lastDotIndex = name.lastIndexOf('.');
1,292,441
public void actionPerformed(final ActionEvent evt, final JTextComponent target) {<NEW_LINE>if (target != null) {<NEW_LINE>final Caret caret = target.getCaret();<NEW_LINE>final BaseDocument doc = (BaseDocument) target.getDocument();<NEW_LINE>doc.render(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>DocumentUtilities.setTypingModification(doc, true);<NEW_LINE>try {<NEW_LINE>int dotPos = caret.getDot();<NEW_LINE>int bolPos = Utilities.getRowStart(target, dotPos);<NEW_LINE>int eolPos = <MASK><NEW_LINE>// include '\n'<NEW_LINE>eolPos = Math.min(eolPos + 1, doc.getLength());<NEW_LINE>caret.setDot(bolPos);<NEW_LINE>caret.moveDot(eolPos);<NEW_LINE>} catch (BadLocationException e) {<NEW_LINE>target.getToolkit().beep();<NEW_LINE>} finally {<NEW_LINE>DocumentUtilities.setTypingModification(doc, false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
Utilities.getRowEnd(target, dotPos);
753,207
static public void loadDefaultProperties(SipPropertiesMap properties) {<NEW_LINE>if (c_logger.isTraceEntryExitEnabled()) {<NEW_LINE>c_logger.traceEntry(HAProperties.class.getName(), "loadDefaultProperties");<NEW_LINE>}<NEW_LINE>properties.setBoolean(ENABLE_FAILOVER_OPERATION_MEASUREMENTS, ENABLE_FAILOVER_OPERATION_MEASUREMENTS_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setBoolean(ENABLE_BACKGROUND_ACTIVATION_PROCESS, ENABLE_BACKGROUND_ACTIVATION_PROCESS_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setBoolean(ENABLE_ON_DEMAND_ACTIVATION_PROCESS, ENABLE_ON_DEMAND_ACTIVATION_PROCESS_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setBoolean(ENABLE_FAILOVER, ENABLE_FAILOVER_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setBoolean(ENABLE_REPLICATION, ENABLE_REPLICATION_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setBoolean(LOG_CALL_ID, LOG_CALL_ID_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setBoolean(ENABLE_REPLICATION_DEBUG_MODE, ENABLE_REPLICATION_DEBUG_MODE_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setBoolean(ENABLE_LOAD_BALANCING_DYNAMIC_WEIGHTS, ENABLE_LOAD_BALANCING_DYNAMIC_WEIGHTS_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setBoolean(HEARTBEAT_ENABLED, HEARTBEAT_ENABLED_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setShort(NUMBER_OF_LOGICAL_NAME, NUMBER_OF_LOGICAL_NAME_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setInt(REPLICA_TIMER_PERIOD_PRORP, REPLICA_TIMER_PERIOD_PRORP_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setInt(REPLICATOR_POOL_SIZE, REPLICATOR_POOL_SIZE_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setInt(REPLICATOR_INITIAL_BUFFER_SIZE, REPLICATOR_INITIAL_BUFFER_SIZE_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setInt(REPLICATOR_MAX_BUFFER_SIZE, REPLICATOR_MAX_BUFFER_SIZE_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(CACHE_TYPE, CACHE_TYPE_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(DATA_SOURCE_JNDI_NAME, DATA_SOURCE_JNDI_NAME_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(REPLICATOR_TYPE, REPLICATOR_TYPE_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(REPLICATION_DOMAIN_NAME, REPLICATION_DOMAIN_NAME_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setInt(DB_REPLICATOR_WORKERS_NUMBER, DB_REPLICATOR_WORKERS_NUMBER_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setLong(TASK_DELAY_PROP, TASK_DELAY_PROP_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(HACALLBACK_OBJGRID_PROP, HACALLBACK_OBJECTGRID_PROP_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(OBJGRID_ALG_CACHE_PROP, OBJGRID_ALG_CACHE_PROP_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(OBJGRID_REPLICATOR_PROP, OBJGRID_REPLICATOR_PROP_DEFAULT, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(SAS_ATTR_OGv2_NAME, SASATTROG_className, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(SAS_ATTR_JDBC_NAME, SASATTRJDBC_className, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(SAS_OGv2_NAME, SASOG_className, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(SAS_JDBC_NAME, SASJDBC_className, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(SS_ATTR_OGv2_NAME, SSATTROG_className, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(SS_ATTR_JDBC_NAME, SSATTRJDBC_className, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(SS_OGv2_NAME, SSOG_className, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(SS_JDBC_NAME, SSJDBC_className, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(<MASK><NEW_LINE>properties.setString(TIMERS_JDBC_NAME, TIMERS_JDBC_className, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(TUB_OGv2_NAME, TUB_OGv2_className, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(TUB_JDBC_NAME, TUB_JDBC_className, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(TUI_OGv2_NAME, TUI_OGv2_className, CustPropSource.DEFAULT);<NEW_LINE>properties.setString(TUI_JDBC_NAME, TUI_JDBC_className, CustPropSource.DEFAULT);<NEW_LINE>}
TIMERS_OGv2_NAME, TIMERS_OGv2_className, CustPropSource.DEFAULT);
797,308
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {<NEW_LINE>tag++;<NEW_LINE>if (i == SPACER) {<NEW_LINE>View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.<MASK><NEW_LINE>return new SpacerViewHolder(v);<NEW_LINE>} else if (i == LOADING_SPINNER) {<NEW_LINE>View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.loadingmore, viewGroup, false);<NEW_LINE>return new SubmissionFooterViewHolder(v);<NEW_LINE>} else if (i == NO_MORE) {<NEW_LINE>View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.nomoreposts, viewGroup, false);<NEW_LINE>return new SubmissionFooterViewHolder(v);<NEW_LINE>} else if (i == ERROR) {<NEW_LINE>View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.errorloadingcontent, viewGroup, false);<NEW_LINE>v.findViewById(R.id.retry).setOnClickListener(new OnSingleClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onSingleClick(View v) {<NEW_LINE>dataSet.loadMore(v.getContext(), displayer, false, dataSet.subreddit);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return new SubmissionFooterViewHolder(v);<NEW_LINE>} else {<NEW_LINE>View v = CreateCardView.CreateView(viewGroup);<NEW_LINE>return new SubmissionViewHolder(v);<NEW_LINE>}<NEW_LINE>}
layout.spacer, viewGroup, false);
1,400,585
public static Collection<RegressionExecution> executions() {<NEW_LINE>ArrayList<RegressionExecution> execs = new ArrayList<>();<NEW_LINE>execs.add(new ContextKeySegmentedTermByFilter(false));<NEW_LINE>execs.add(new ContextKeySegmentedTermByFilter(true));<NEW_LINE>execs.add(new ContextKeySegmentedTermByFilterWSubtype());<NEW_LINE>execs.add(new ContextKeySegmentedTermByFilterWSecondType());<NEW_LINE>execs.add(new ContextKeySegmentedTermByAfter());<NEW_LINE>execs.add(new ContextKeySegmentedTermByCrontabOutputWhenTerminated());<NEW_LINE>execs.add(new ContextKeySegmentedTermByPatternTwoFilters());<NEW_LINE>execs.add(new ContextKeySegmentedTermByUnrelated());<NEW_LINE>execs.add(new ContextKeySegmentedTermByFilter2Keys());<NEW_LINE>execs.add(new ContextKeySegmentedFilterExprTermByFilterWExpr());<NEW_LINE>execs.add(new ContextKeySegmentedFilterExprTermByFilter());<NEW_LINE>execs.add(new ContextKeySegmentedTermByPattern3Partition());<NEW_LINE>execs.add(new ContextKeySegmentedInitTermNoPartitionFilter());<NEW_LINE>execs.add(new ContextKeySegmentedInitTermWithPartitionFilter());<NEW_LINE>execs.add(new ContextKeySegmentedInitTermWithTwoInit(true));<NEW_LINE>execs.add(new ContextKeySegmentedInitTermWithTwoInit(false));<NEW_LINE>execs.add(new ContextKeySegmentedInitNoTerm(true));<NEW_LINE>execs.<MASK><NEW_LINE>execs.add(new ContextKeySegmentedInitWCorrelatedTermFilter());<NEW_LINE>execs.add(new ContextKeySegmentedInitWCorrelatedTermPattern());<NEW_LINE>execs.add(new ContextKeySegmentedWithCorrelatedTermFilter(true));<NEW_LINE>execs.add(new ContextKeySegmentedWithCorrelatedTermFilter(false));<NEW_LINE>execs.add(new ContextKeySegmentedInvalid());<NEW_LINE>return execs;<NEW_LINE>}
add(new ContextKeySegmentedInitNoTerm(false));
1,141,489
private void updateItemsForEvent() {<NEW_LINE>if (calDavLoader == null) {<NEW_LINE>logger.debug("calDavLoader not available. Unable to update items for event.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>CalDavBindingProvider bindingProvider = null;<NEW_LINE>for (CalDavBindingProvider bindingProvider_ : this.providers) {<NEW_LINE>bindingProvider = bindingProvider_;<NEW_LINE>}<NEW_LINE>if (bindingProvider == null) {<NEW_LINE>logger.warn("No binding provider found");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<Integer, List<CalDavEvent>> eventCache = new HashMap<Integer, List<CalDavEvent>>();<NEW_LINE>for (String item : bindingProvider.getItemNames()) {<NEW_LINE>CalDavConfig config = bindingProvider.getConfig(item);<NEW_LINE>List<CalDavEvent> events = eventCache.get(config.getUniqueEventListKey());<NEW_LINE>if (events == null) {<NEW_LINE>logger.debug("No events found in event cache for item '{}'. Attempting to load from calendar.", item);<NEW_LINE>CalDavQuery query = getQueryForConfig(config);<NEW_LINE><MASK><NEW_LINE>eventCache.put(config.getUniqueEventListKey(), events);<NEW_LINE>}<NEW_LINE>if (events == null) {<NEW_LINE>logger.debug("No events found for item '{}'. Nothing to update.", item);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>this.updateItem(item, config, events);<NEW_LINE>}<NEW_LINE>}
events = calDavLoader.getEvents(query);
1,746,341
public void proposeJingleRtpSession(final Account account, final Jid with, final Set<Media> media) {<NEW_LINE>synchronized (this.rtpSessionProposals) {<NEW_LINE>for (Map.Entry<RtpSessionProposal, DeviceDiscoveryState> entry : this.rtpSessionProposals.entrySet()) {<NEW_LINE>RtpSessionProposal proposal = entry.getKey();<NEW_LINE>if (proposal.account == account && with.asBareJid().equals(proposal.with)) {<NEW_LINE>final DeviceDiscoveryState preexistingState = entry.getValue();<NEW_LINE>if (preexistingState != null && preexistingState != DeviceDiscoveryState.FAILED) {<NEW_LINE>final RtpEndUserState endUserState = preexistingState.toEndUserState();<NEW_LINE>toneManager.transition(endUserState, media);<NEW_LINE>mXmppConnectionService.notifyJingleRtpConnectionUpdate(account, <MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (isBusy()) {<NEW_LINE>if (hasMatchingRtpSession(account, with, media)) {<NEW_LINE>Log.d(Config.LOGTAG, "ignoring request to propose jingle session because the other party already created one for us");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>throw new IllegalStateException("There is already a running RTP session. This should have been caught by the UI");<NEW_LINE>}<NEW_LINE>final RtpSessionProposal proposal = RtpSessionProposal.of(account, with.asBareJid(), media);<NEW_LINE>this.rtpSessionProposals.put(proposal, DeviceDiscoveryState.SEARCHING);<NEW_LINE>mXmppConnectionService.notifyJingleRtpConnectionUpdate(account, proposal.with, proposal.sessionId, RtpEndUserState.FINDING_DEVICE);<NEW_LINE>final MessagePacket messagePacket = mXmppConnectionService.getMessageGenerator().sessionProposal(proposal);<NEW_LINE>mXmppConnectionService.sendMessagePacket(account, messagePacket);<NEW_LINE>}<NEW_LINE>}
with, proposal.sessionId, endUserState);
1,126,470
private void moveIntoFragment(String name, Address start, Address end, String fileName) {<NEW_LINE>if (fileName != null) {<NEW_LINE>ProgramModule module = null;<NEW_LINE>int index = rootModule.getIndex(fileName);<NEW_LINE>if (index == -1) {<NEW_LINE>try {<NEW_LINE>module = rootModule.createModule(fileName);<NEW_LINE>} catch (DuplicateNameException e) {<NEW_LINE>Msg.error(this, "Error while moving fragment " + name + " from " + start + " to " + end, e);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// TODO add a getChildAt(index) method...<NEW_LINE>Group[] children = rootModule.getChildren();<NEW_LINE>module = (ProgramModule) children[index];<NEW_LINE>}<NEW_LINE>if (module != null) {<NEW_LINE>try {<NEW_LINE>ProgramFragment frag = null;<NEW_LINE><MASK><NEW_LINE>if (index == -1) {<NEW_LINE>frag = module.createFragment(name);<NEW_LINE>} else {<NEW_LINE>// TODO add a getChildAt(index) method...<NEW_LINE>Group[] children = module.getChildren();<NEW_LINE>frag = (ProgramFragment) children[index];<NEW_LINE>}<NEW_LINE>frag.move(start, end);<NEW_LINE>} catch (NotFoundException e) {<NEW_LINE>Msg.error(this, "Error moving fragment from " + start + " to " + end, e);<NEW_LINE>return;<NEW_LINE>} catch (DuplicateNameException e) {<NEW_LINE>// TODO: Thrown by createFragment if fragment name exists in any other module<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
index = module.getIndex(name);
421,089
static ZTFilePermissions fromPosixFileMode(int mode) {<NEW_LINE>ZTFilePermissions permissions = new ZTFilePermissions();<NEW_LINE>permissions.setOwnerCanExecute((mode & OWNER_EXECUTE_FLAG) > 0);<NEW_LINE>permissions.setGroupCanExecute((mode & GROUP_EXECUTE_FLAG) > 0);<NEW_LINE>permissions.setOthersCanExecute((mode & OTHERS_EXECUTE_FLAG) > 0);<NEW_LINE>permissions.setOwnerCanWrite((mode & OWNER_WRITE_FLAG) > 0);<NEW_LINE>permissions.setGroupCanWrite((mode & GROUP_WRITE_FLAG) > 0);<NEW_LINE>permissions.setOthersCanWrite(<MASK><NEW_LINE>permissions.setOwnerCanRead((mode & OWNER_READ_FLAG) > 0);<NEW_LINE>permissions.setGroupCanRead((mode & GROUP_READ_FLAG) > 0);<NEW_LINE>permissions.setOthersCanRead((mode & OTHERS_READ_FLAG) > 0);<NEW_LINE>return permissions;<NEW_LINE>}
(mode & OTHERS_WRITE_FLAG) > 0);
1,680,925
public MChangeLog changeLog(String TrxName, int AD_ChangeLog_ID, int AD_Table_ID, int AD_Column_ID, int Record_ID, int AD_Client_ID, int AD_Org_ID, Object OldValue, Object NewValue, String event) {<NEW_LINE>// Null handling<NEW_LINE>if (OldValue == null && NewValue == null)<NEW_LINE>return null;<NEW_LINE>// Equal Value<NEW_LINE>if (OldValue != null && NewValue != null && OldValue.equals(NewValue))<NEW_LINE>return null;<NEW_LINE>// Role Logging<NEW_LINE>MRole role = MRole.getDefault(getCtx(), false);<NEW_LINE>// Do we need to log<NEW_LINE>if (// log if WebStore<NEW_LINE>// im/explicit log<NEW_LINE>m_webStoreSession || // Role Logging<NEW_LINE>MChangeLog.isLogged(AD_Table_ID) || (role != null && role.isChangeLog()))<NEW_LINE>;<NEW_LINE>else<NEW_LINE>return null;<NEW_LINE>//<NEW_LINE>log.finest("AD_ChangeLog_ID=" + AD_ChangeLog_ID + ", AD_Session_ID=" + getAD_Session_ID() + ", AD_Table_ID=" + AD_Table_ID + ", AD_Column_ID=" + AD_Column_ID + ": " + OldValue + " -> " + NewValue);<NEW_LINE>try {<NEW_LINE>MChangeLog cl = new MChangeLog(getCtx(), AD_ChangeLog_ID, TrxName, getAD_Session_ID(), AD_Table_ID, AD_Column_ID, Record_ID, AD_Client_ID, <MASK><NEW_LINE>if (cl.save())<NEW_LINE>return cl;<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.log(Level.SEVERE, "AD_ChangeLog_ID=" + AD_ChangeLog_ID + ", AD_Session_ID=" + getAD_Session_ID() + ", AD_Table_ID=" + AD_Table_ID + ", AD_Column_ID=" + AD_Column_ID, e);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>log.log(Level.SEVERE, "AD_ChangeLog_ID=" + AD_ChangeLog_ID + ", AD_Session_ID=" + getAD_Session_ID() + ", AD_Table_ID=" + AD_Table_ID + ", AD_Column_ID=" + AD_Column_ID);<NEW_LINE>return null;<NEW_LINE>}
AD_Org_ID, OldValue, NewValue, event);
1,168,533
private static boolean refresh(@Nonnull VirtualFile file) throws IOException {<NEW_LINE>Long loadedTimeStamp = file.getUserData(TIMESTAMP_KEY);<NEW_LINE>SoftReference<BufferedImage> imageRef = file.getUserData(BUFFERED_IMAGE_REF_KEY);<NEW_LINE>if (loadedTimeStamp == null || loadedTimeStamp < file.getTimeStamp() || SoftReference.dereference(imageRef) == null) {<NEW_LINE>try {<NEW_LINE>final byte[] content = file.contentsToByteArray();<NEW_LINE>InputStream inputStream = new ByteArrayInputStream(content, 0, content.length);<NEW_LINE>ImageInputStream imageInputStream = ImageIO.createImageInputStream(inputStream);<NEW_LINE>try {<NEW_LINE>Iterator<ImageReader> imageReaders = ImageIO.getImageReaders(imageInputStream);<NEW_LINE>if (imageReaders.hasNext()) {<NEW_LINE>ImageReader imageReader = imageReaders.next();<NEW_LINE>try {<NEW_LINE>file.putUserData(FORMAT_KEY, imageReader.getFormatName());<NEW_LINE>ImageReadParam param = imageReader.getDefaultReadParam();<NEW_LINE>imageReader.<MASK><NEW_LINE>int minIndex = imageReader.getMinIndex();<NEW_LINE>BufferedImage image = imageReader.read(minIndex, param);<NEW_LINE>file.putUserData(BUFFERED_IMAGE_REF_KEY, new SoftReference<BufferedImage>(image));<NEW_LINE>return true;<NEW_LINE>} finally {<NEW_LINE>imageReader.dispose();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>imageInputStream.close();<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>// We perform loading no more needed<NEW_LINE>file.putUserData(TIMESTAMP_KEY, System.currentTimeMillis());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
setInput(imageInputStream, true, true);
370,446
public void inform(final Event e) {<NEW_LINE>if (e instanceof VulnDbAnalysisEvent) {<NEW_LINE>if (!super.isEnabled(ConfigPropertyConstants.SCANNER_VULNDB_ENABLED)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try (QueryManager qm = new QueryManager()) {<NEW_LINE>final ConfigProperty apiConsumerKey = qm.getConfigProperty(ConfigPropertyConstants.SCANNER_VULNDB_OAUTH1_CONSUMER_KEY.getGroupName(), <MASK><NEW_LINE>final ConfigProperty apiConsumerSecret = qm.getConfigProperty(ConfigPropertyConstants.SCANNER_VULNDB_OAUTH1_CONSUMER_SECRET.getGroupName(), ConfigPropertyConstants.SCANNER_VULNDB_OAUTH1_CONSUMER_SECRET.getPropertyName());<NEW_LINE>if (apiConsumerKey == null || apiConsumerKey.getPropertyValue() == null) {<NEW_LINE>LOGGER.warn("An OAuth 1.0a consumer key has not been specified for use with VulnDB. Skipping");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (apiConsumerSecret == null || apiConsumerSecret.getPropertyValue() == null) {<NEW_LINE>LOGGER.warn("An OAuth 1.0a consumer secret has not been specified for use with VulnDB. Skipping");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>this.apiConsumerKey = apiConsumerKey.getPropertyValue();<NEW_LINE>try {<NEW_LINE>this.apiConsumerSecret = DataEncryption.decryptAsString(apiConsumerSecret.getPropertyValue());<NEW_LINE>} catch (Exception ex) {<NEW_LINE>LOGGER.error("An error occurred decrypting the VulnDB consumer secret. Skipping", ex);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final VulnDbAnalysisEvent event = (VulnDbAnalysisEvent) e;<NEW_LINE>LOGGER.info("Starting VulnDB analysis task");<NEW_LINE>if (event.getComponents().size() > 0) {<NEW_LINE>analyze(event.getComponents());<NEW_LINE>}<NEW_LINE>LOGGER.info("VulnDB analysis complete");<NEW_LINE>}<NEW_LINE>}
ConfigPropertyConstants.SCANNER_VULNDB_OAUTH1_CONSUMER_KEY.getPropertyName());
178,216
public int vote(Authentication authentication, FilterInvocation filterInvocation, Collection<ConfigAttribute> attributes) {<NEW_LINE>Assert.notNull(authentication, "authentication must not be null");<NEW_LINE>Assert.notNull(filterInvocation, "filterInvocation must not be null");<NEW_LINE><MASK><NEW_LINE>WebExpressionConfigAttribute webExpressionConfigAttribute = findConfigAttribute(attributes);<NEW_LINE>if (webExpressionConfigAttribute == null) {<NEW_LINE>this.logger.trace("Abstained since did not find a config attribute of instance WebExpressionConfigAttribute");<NEW_LINE>return ACCESS_ABSTAIN;<NEW_LINE>}<NEW_LINE>EvaluationContext ctx = webExpressionConfigAttribute.postProcess(this.expressionHandler.createEvaluationContext(authentication, filterInvocation), filterInvocation);<NEW_LINE>boolean granted = ExpressionUtils.evaluateAsBoolean(webExpressionConfigAttribute.getAuthorizeExpression(), ctx);<NEW_LINE>if (granted) {<NEW_LINE>return ACCESS_GRANTED;<NEW_LINE>}<NEW_LINE>this.logger.trace("Voted to deny authorization");<NEW_LINE>return ACCESS_DENIED;<NEW_LINE>}
Assert.notNull(attributes, "attributes must not be null");
645,538
public Optional<PickingOrderConfig> extractPickingOrderConfig(@NonNull final I_PP_Product_Planning productPlanning) {<NEW_LINE>if (!StringUtils.toBoolean(productPlanning.getIsManufactured())) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>if (!productPlanning.isPickingOrder()) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>final ResourceId plantId = ResourceId.ofRepoIdOrNull(productPlanning.getS_Resource_ID());<NEW_LINE>if (plantId == null) {<NEW_LINE>throw new FillMandatoryException("PP_Plant_ID").setParameter("productPlanning", productPlanning).appendParametersToMessage();<NEW_LINE>}<NEW_LINE>final ProductBOMVersionsId bomVersionsId = ProductBOMVersionsId.ofRepoIdOrNull(productPlanning.getPP_Product_BOMVersions_ID());<NEW_LINE>if (bomVersionsId == null) {<NEW_LINE>throw new FillMandatoryException("PP_Product_BOMVersions_ID").setParameter(<MASK><NEW_LINE>}<NEW_LINE>final ProductBOMId bomId = bomsRepo.getLatestBOMByVersion(bomVersionsId).orElseThrow(() -> new MrpException("@FillMandatory@ @PP_Product_BOM_ID@ ( @M_Product_ID@=" + productPlanning.getM_Product_ID() + ")"));<NEW_LINE>return Optional.of(PickingOrderConfig.builder().productPlanningId(ProductPlanningId.ofRepoId(productPlanning.getPP_Product_Planning_ID())).plantId(plantId).bomId(bomId).plannerId(UserId.ofRepoIdOrNull(productPlanning.getPlanner_ID())).build());<NEW_LINE>}
"productPlanning", productPlanning).appendParametersToMessage();
1,292,987
public static BArray slice(BArray arr, long startIndex, long endIndex) {<NEW_LINE>int size = arr.size();<NEW_LINE>if (startIndex < 0) {<NEW_LINE>throw BLangExceptionHelper.getRuntimeException(RuntimeErrors.ARRAY_INDEX_OUT_OF_RANGE, startIndex, size);<NEW_LINE>}<NEW_LINE>if (endIndex > size) {<NEW_LINE>throw BLangExceptionHelper.getRuntimeException(RuntimeErrors.ARRAY_INDEX_OUT_OF_RANGE, endIndex, size);<NEW_LINE>}<NEW_LINE>long sliceSize = endIndex - startIndex;<NEW_LINE>if (sliceSize < 0) {<NEW_LINE>throw BLangExceptionHelper.getRuntimeException(RuntimeErrors.ARRAY_INDEX_OUT_OF_RANGE, sliceSize, size);<NEW_LINE>}<NEW_LINE>Type arrType = arr.getType();<NEW_LINE>BArray slicedArr;<NEW_LINE>switch(arrType.getTag()) {<NEW_LINE>case TypeTags.ARRAY_TAG:<NEW_LINE>slicedArr = arr.slice(startIndex, endIndex);<NEW_LINE>break;<NEW_LINE>case TypeTags.TUPLE_TAG:<NEW_LINE>TupleType tupleType = (TupleType) arrType;<NEW_LINE>List<Type> memTypes = new ArrayList<>(tupleType.getTupleTypes());<NEW_LINE>Type restType = tupleType.getRestType();<NEW_LINE>if (restType != null) {<NEW_LINE>memTypes.add(restType);<NEW_LINE>}<NEW_LINE>UnionType unionType = TypeCreator.createUnionType(memTypes);<NEW_LINE>ArrayType slicedArrType = TypeCreator.createArrayType(unionType);<NEW_LINE><MASK><NEW_LINE>for (long i = startIndex, j = 0; i < endIndex; i++, j++) {<NEW_LINE>slicedArr.add(j, arr.getRefValue(i));<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw createOpNotSupportedError(arrType, "slice()");<NEW_LINE>}<NEW_LINE>return slicedArr;<NEW_LINE>}
slicedArr = ValueCreator.createArrayValue(slicedArrType);
750,131
protected void selectHorizontalAutoTickUnit(Graphics2D g2, Rectangle2D dataArea, RectangleEdge edge) {<NEW_LINE>TickUnit unit = getTickUnit();<NEW_LINE>TickUnitSource tickUnitSource = getStandardTickUnits();<NEW_LINE>// we should start with the current tick unit if it gives a count in<NEW_LINE>// the range 3 to 40 otherwise estimate one that will give a count <= 10<NEW_LINE>double length = getRange().getLength();<NEW_LINE>int count = (int) (length / unit.getSize());<NEW_LINE>if (count < 3 || count > 40) {<NEW_LINE>unit = tickUnitSource.getCeilingTickUnit(length / 10);<NEW_LINE>}<NEW_LINE>// now consider the label size relative to the width of the tick unit<NEW_LINE>// and make a guess at the ideal size<NEW_LINE>TickUnit unit1 = tickUnitSource.getCeilingTickUnit(unit);<NEW_LINE>double tickLabelWidth = estimateMaximumTickLabelWidth(g2, unit1);<NEW_LINE>double unit1Width = lengthToJava2D(unit1.getSize(), dataArea, edge);<NEW_LINE>NumberTickUnit unit2 = (NumberTickUnit) unit1;<NEW_LINE>double guess = (tickLabelWidth / unit1Width) * unit1.getSize();<NEW_LINE>// due to limitations of double precision, when you zoom very far into<NEW_LINE>// a chart, eventually the visible axis range will get reported as<NEW_LINE>// having length 0, and then 'guess' above will be infinite ... in that<NEW_LINE>// case we'll just stick with the tick unit we have, it's better than<NEW_LINE>// throwing an exception<NEW_LINE>// https://github.com/jfree/jfreechart/issues/64<NEW_LINE>if (Double.isFinite(guess)) {<NEW_LINE>unit2 = (<MASK><NEW_LINE>double unit2Width = lengthToJava2D(unit2.getSize(), dataArea, edge);<NEW_LINE>tickLabelWidth = estimateMaximumTickLabelWidth(g2, unit2);<NEW_LINE>if (tickLabelWidth > unit2Width) {<NEW_LINE>unit2 = (NumberTickUnit) tickUnitSource.getLargerTickUnit(unit2);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setTickUnit(unit2, false, false);<NEW_LINE>}
NumberTickUnit) tickUnitSource.getCeilingTickUnit(guess);
1,390,876
public void traceExecution(final MessageFrame messageFrame, final ExecuteOperation executeOperation) {<NEW_LINE>final Operation currentOp = messageFrame.getCurrentOperation();<NEW_LINE>int pc = messageFrame.getPC();<NEW_LINE>int opcode = currentOp.getOpcode();<NEW_LINE>String remainingGas = shortNumber(messageFrame.getRemainingGas().asUInt256());<NEW_LINE>List<String> stack = new ArrayList<>(messageFrame.stackSize());<NEW_LINE>for (int i = messageFrame.stackSize() - 1; i >= 0; i--) {<NEW_LINE>stack.add("\"" + shortBytes(messageFrame.getStackItem(i)) + "\"");<NEW_LINE>}<NEW_LINE>Bytes returnData = messageFrame.getReturnData();<NEW_LINE>int depth = messageFrame.getMessageStackDepth() + 1;<NEW_LINE>final Operation.OperationResult executeResult = executeOperation.execute();<NEW_LINE>StringBuilder sb = new StringBuilder(1024);<NEW_LINE>sb.append("{");<NEW_LINE>sb.append("\"pc\":").append(pc).append(",");<NEW_LINE>sb.append("\"op\":").append(opcode).append(",");<NEW_LINE>sb.append("\"gas\":\"").append(remainingGas).append("\",");<NEW_LINE>sb.append("\"gasCost\":\"").append(executeResult.getGasCost().map(gas -> shortNumber(gas.asUInt256())).orElse(<MASK><NEW_LINE>if (showMemory) {<NEW_LINE>Bytes memory = messageFrame.readMemory(0, messageFrame.memoryWordSize() * 32L);<NEW_LINE>sb.append("\"memory\":\"").append(memory.toHexString()).append("\",");<NEW_LINE>sb.append("\"memSize\":").append(memory.size()).append(",");<NEW_LINE>} else {<NEW_LINE>sb.append("\"memory\":\"0x\",");<NEW_LINE>sb.append("\"memSize\":").append(messageFrame.memoryByteSize()).append(",");<NEW_LINE>}<NEW_LINE>sb.append("\"stack\":[").append(commaJoiner.join(stack)).append("],");<NEW_LINE>sb.append("\"returnData\":").append(returnData.size() > 0 ? '"' + returnData.toHexString() + '"' : "null").append(",");<NEW_LINE>sb.append("\"depth\":").append(depth).append(",");<NEW_LINE>sb.append("\"refund\":").append(messageFrame.getGasRefund().toLong()).append(",");<NEW_LINE>sb.append("\"opName\":\"").append(currentOp.getName()).append("\",");<NEW_LINE>sb.append("\"error\":\"").append(executeResult.getHaltReason().map(ExceptionalHaltReason::getDescription).orElse(messageFrame.getRevertReason().map(StandardJsonTracer::quoteEscape).orElse(""))).append("\"}");<NEW_LINE>out.println(sb);<NEW_LINE>}
"")).append("\",");
1,264,686
public static ListModulePublishVersionsResponse unmarshall(ListModulePublishVersionsResponse listModulePublishVersionsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listModulePublishVersionsResponse.setRequestId(_ctx.stringValue("ListModulePublishVersionsResponse.RequestId"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setPageNumber(_ctx.integerValue("ListModulePublishVersionsResponse.Data.PageNumber"));<NEW_LINE>data.setPageSize(_ctx.integerValue("ListModulePublishVersionsResponse.Data.PageSize"));<NEW_LINE>data.setTotalCount(_ctx.integerValue("ListModulePublishVersionsResponse.Data.TotalCount"));<NEW_LINE>List<PublishItem> items = new ArrayList<PublishItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListModulePublishVersionsResponse.Data.Items.Length"); i++) {<NEW_LINE>PublishItem publishItem = new PublishItem();<NEW_LINE>publishItem.setCommitId(_ctx.stringValue("ListModulePublishVersionsResponse.Data.Items[" + i + "].CommitId"));<NEW_LINE>publishItem.setDescription(_ctx.stringValue("ListModulePublishVersionsResponse.Data.Items[" + i + "].Description"));<NEW_LINE>publishItem.setCreateTime(_ctx.stringValue("ListModulePublishVersionsResponse.Data.Items[" + i + "].CreateTime"));<NEW_LINE>publishItem.setModifiedTime(_ctx.stringValue("ListModulePublishVersionsResponse.Data.Items[" + i + "].ModifiedTime"));<NEW_LINE>publishItem.setModuleId(_ctx.stringValue<MASK><NEW_LINE>publishItem.setPublishId(_ctx.stringValue("ListModulePublishVersionsResponse.Data.Items[" + i + "].PublishId"));<NEW_LINE>publishItem.setVersion(_ctx.stringValue("ListModulePublishVersionsResponse.Data.Items[" + i + "].Version"));<NEW_LINE>items.add(publishItem);<NEW_LINE>}<NEW_LINE>data.setItems(items);<NEW_LINE>listModulePublishVersionsResponse.setData(data);<NEW_LINE>return listModulePublishVersionsResponse;<NEW_LINE>}
("ListModulePublishVersionsResponse.Data.Items[" + i + "].ModuleId"));
490,280
private void markupProgramHeaders(TaskMonitor monitor) {<NEW_LINE>int headerCount = elf.getProgramHeaderCount();<NEW_LINE>int size = elf.e_phentsize() * headerCount;<NEW_LINE>if (size == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>monitor.setMessage("Markup Program Headers ...");<NEW_LINE>Structure phStructDt = (Structure) elf.getProgramHeaders()[0].toDataType();<NEW_LINE>phStructDt = phStructDt.clone(program.getDataTypeManager());<NEW_LINE>Array arrayDt = new ArrayDataType(phStructDt, headerCount, size);<NEW_LINE>Address headerAddr = findLoadAddress(elf.e_phoff(), size);<NEW_LINE>// Create block for header if failed to locate load<NEW_LINE>try {<NEW_LINE>if (headerAddr == null) {<NEW_LINE>if (!ElfLoaderOptionsFactory.includeOtherBlocks(options)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>headerAddr = AddressSpace.OTHER_SPACE.getAddress(0);<NEW_LINE>MemoryBlock block = createInitializedBlock(null, true, ELF_PROGRAM_HEADERS_BLOCK_NAME, headerAddr, elf.e_phoff(), arrayDt.getLength(), "Elf Program Headers", false, false, false, monitor);<NEW_LINE>headerAddr = block.getStart();<NEW_LINE>}<NEW_LINE>addElfHeaderReferenceMarkup(elf.getPhoffComponentOrdinal(), headerAddr);<NEW_LINE>Data array = createData(headerAddr, program.getDataTypeManager().resolve(arrayDt, null));<NEW_LINE>if (array == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ElfProgramHeader[] programHeaders = elf.getProgramHeaders();<NEW_LINE>monitor.setMaximum(programHeaders.length);<NEW_LINE>// p_vaddr structure element index<NEW_LINE>int vaddrFieldIndex = elf.is64Bit() ? 3 : 2;<NEW_LINE>for (int i = 0; i < programHeaders.length; i++) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>monitor.incrementProgress(1);<NEW_LINE>Data d = array.getComponent(i);<NEW_LINE>d.setComment(CodeUnit.EOL_COMMENT, programHeaders[i].getComment());<NEW_LINE>if (programHeaders[i].getType() == ElfProgramHeaderConstants.PT_NULL) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (programHeaders[i].getOffset() == 0) {<NEW_LINE>// has been stripped<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Address segmentAddr = findLoadAddress(programHeaders[i], 0);<NEW_LINE>if (segmentAddr != null) {<NEW_LINE>// add reference to p_vaddr component<NEW_LINE>Data component = d.getComponent(vaddrFieldIndex);<NEW_LINE>component.addOperandReference(0, segmentAddr, <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>log("Failed to markup Elf program/segment headers: " + getMessage(e));<NEW_LINE>}<NEW_LINE>}
RefType.DATA, SourceType.IMPORTED);
1,294,345
static ImmutablePair<String, String> illuminaLeftShift(final String fivePrimeSeq, final String indelSeq, final String threePrimeSeq) {<NEW_LINE>String modifiedFivePrimeSeq = fivePrimeSeq;<NEW_LINE>StringBuilder modifiedThreePrimeSeq = new StringBuilder(threePrimeSeq);<NEW_LINE>final int indelLength = indelSeq.length();<NEW_LINE>while (modifiedFivePrimeSeq.endsWith(indelSeq)) {<NEW_LINE>modifiedFivePrimeSeq = modifiedFivePrimeSeq.substring(0, modifiedFivePrimeSeq.length() - indelLength);<NEW_LINE>modifiedThreePrimeSeq.insert(0, indelSeq);<NEW_LINE>}<NEW_LINE>// May have not fully shifted homopolymer<NEW_LINE>while (Strings.repeat(modifiedFivePrimeSeq.charAt(modifiedFivePrimeSeq.length() - 1), indelLength).equals(indelSeq)) {<NEW_LINE>modifiedThreePrimeSeq.insert(0, modifiedFivePrimeSeq.substring(modifiedFivePrimeSeq<MASK><NEW_LINE>modifiedFivePrimeSeq = modifiedFivePrimeSeq.substring(0, modifiedFivePrimeSeq.length() - 1);<NEW_LINE>}<NEW_LINE>return new ImmutablePair<>(modifiedFivePrimeSeq, modifiedThreePrimeSeq.toString());<NEW_LINE>}
.length() - 1));
903,885
final CreateRepositoryResult executeCreateRepository(CreateRepositoryRequest createRepositoryRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createRepositoryRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateRepositoryRequest> request = null;<NEW_LINE>Response<CreateRepositoryResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateRepositoryRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createRepositoryRequest));<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, "ECR PUBLIC");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateRepositoryResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateRepositoryResultJsonUnmarshaller());<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.OPERATION_NAME, "CreateRepository");
1,172,739
public void savePlot(FileSystemItem targetPath, boolean overwrite, ServerRequestCallback<Bool> requestCallback) {<NEW_LINE>PaperSize paperSize = paperSizeEditor_.selectedPaperSize();<NEW_LINE>double width = paperSize.getWidth();<NEW_LINE><MASK><NEW_LINE>// This is more intuitive for the user to get an aspect ratio based on<NEW_LINE>// portrait/landscape selection regardless of the paper size's aspect ratio<NEW_LINE>width = isPortraitOrientation() ? Math.min(paperSize.getHeight(), paperSize.getWidth()) : Math.max(paperSize.getHeight(), paperSize.getWidth());<NEW_LINE>height = isPortraitOrientation() ? Math.max(paperSize.getHeight(), paperSize.getWidth()) : Math.min(paperSize.getHeight(), paperSize.getWidth());<NEW_LINE>server_.savePlotAsPdf(targetPath, width, height, chkCairoPdf_.getValue(), overwrite, requestCallback);<NEW_LINE>}
double height = paperSize.getHeight();
413,324
public J visitTry(J.Try tryable, P p) {<NEW_LINE>J.Try t = tryable;<NEW_LINE>t = t.withPrefix(visitSpace(t.getPrefix(), Space<MASK><NEW_LINE>t = t.withMarkers(visitMarkers(t.getMarkers(), p));<NEW_LINE>Statement temp = (Statement) visitStatement(t, p);<NEW_LINE>if (!(temp instanceof J.Try)) {<NEW_LINE>return temp;<NEW_LINE>} else {<NEW_LINE>t = (J.Try) temp;<NEW_LINE>}<NEW_LINE>if (t.getPadding().getResources() != null) {<NEW_LINE>t = t.getPadding().withResources(visitContainer(t.getPadding().getResources(), JContainer.Location.TRY_RESOURCES, p));<NEW_LINE>}<NEW_LINE>t = t.withBody(visitAndCast(t.getBody(), p));<NEW_LINE>t = t.withCatches(ListUtils.map(t.getCatches(), c -> visitAndCast(c, p)));<NEW_LINE>if (t.getPadding().getFinally() != null) {<NEW_LINE>t = t.getPadding().withFinally(visitLeftPadded(t.getPadding().getFinally(), JLeftPadded.Location.TRY_FINALLY, p));<NEW_LINE>}<NEW_LINE>return t;<NEW_LINE>}
.Location.TRY_PREFIX, p));
1,460,364
@SuppressWarnings("PMD.AvoidCatchingGenericException")<NEW_LINE>public Worker.Result doWork() {<NEW_LINE>DaggerAppComponent.<MASK><NEW_LINE>Timber.d("Running attendee checkin work");<NEW_LINE>Iterable<Attendee> attendees = attendeeRepository.getPendingCheckIns().blockingIterable();<NEW_LINE>for (Attendee attendee : attendees) {<NEW_LINE>Timber.d("Trying to toggle attendee status -> %s", attendee);<NEW_LINE>try {<NEW_LINE>Attendee toggled = attendeeRepository.toggleAttendeeCheckStatus(attendee).blockingFirst();<NEW_LINE>Timber.d("Attendee check in work succeeded for attendee: %s", toggled);<NEW_LINE>} catch (Exception exception) {<NEW_LINE>Timber.e("Attendee Check In Work Failed for attendee status -> %ss\n" + "With error: %s\n" + "The work is rescheduled", attendee, exception.getMessage());<NEW_LINE>return Worker.Result.retry();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return Worker.Result.success();<NEW_LINE>}
create().inject(this);
1,074,535
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>response.setContentType("text/html;charset=UTF-8");<NEW_LINE>try (PrintWriter out = response.getWriter()) {<NEW_LINE>out.println("<!DOCTYPE html>");<NEW_LINE>out.println("<html>");<NEW_LINE>out.println("<head>");<NEW_LINE>out.println("<title>Schedule at fixed rate</title>");<NEW_LINE>out.println("</head>");<NEW_LINE>out.println("<body>");<NEW_LINE>out.println("<h1>Schedule at fixed rate</h1>");<NEW_LINE>ScheduledFuture<?> f = executor.scheduleAtFixedRate(new MyRunnableTask(5), 2, 3, TimeUnit.SECONDS);<NEW_LINE>// // try {<NEW_LINE>// // Thread.sleep(1000);<NEW_LINE>// // } catch (InterruptedException ex) {<NEW_LINE>// // Logger.getLogger(TestScheduleFixedRateServlet.class.getName()).log(Level.SEVERE, null, ex);<NEW_LINE>// // }<NEW_LINE>// // f.cancel(true);<NEW_LINE>//<NEW_LINE>// executor.scheduleWithFixedDelay(new MyRunnableTask(5), 2, 3, TimeUnit.SECONDS);<NEW_LINE><MASK><NEW_LINE>out.println("<br><br>Check server.log for output");<NEW_LINE>out.println("</body>");<NEW_LINE>out.println("</html>");<NEW_LINE>}<NEW_LINE>}
System.out.println("Runnable Task completed");
1,728,145
final GetEmailIdentityResult executeGetEmailIdentity(GetEmailIdentityRequest getEmailIdentityRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getEmailIdentityRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetEmailIdentityRequest> request = null;<NEW_LINE>Response<GetEmailIdentityResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetEmailIdentityRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getEmailIdentityRequest));<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, "SESv2");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetEmailIdentityResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetEmailIdentityResultJsonUnmarshaller());<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.OPERATION_NAME, "GetEmailIdentity");
710,500
public void exitMergeMatchedItem(EsperEPL2GrammarParser.MergeMatchedItemContext ctx) {<NEW_LINE>if (mergeActions == null) {<NEW_LINE>mergeActions = new ArrayList<>();<NEW_LINE>}<NEW_LINE>ExprNode whereCond = null;<NEW_LINE>if (ctx.whereClause() != null) {<NEW_LINE>whereCond = ASTExprHelper.exprCollectSubNodes(ctx.whereClause(), 0, astExprNodeMap).get(0);<NEW_LINE>}<NEW_LINE>if (ctx.d != null) {<NEW_LINE>mergeActions.<MASK><NEW_LINE>}<NEW_LINE>if (ctx.u != null) {<NEW_LINE>List<OnTriggerSetAssignment> sets = ASTExprHelper.getOnTriggerSetAssignments(ctx.onSetAssignmentList(), astExprNodeMap);<NEW_LINE>mergeActions.add(new OnTriggerMergeActionUpdate(whereCond, sets));<NEW_LINE>}<NEW_LINE>if (ctx.mergeInsert() != null) {<NEW_LINE>handleMergeInsert(ctx.mergeInsert());<NEW_LINE>}<NEW_LINE>}
add(new OnTriggerMergeActionDelete(whereCond));
673,908
public void loadGeometry() throws QueryException, ServerException, UserException, PublicInterfaceNotFoundException, IOException, GeometryException, IfcModelInterfaceException {<NEW_LINE>if (includeGeometry) {<NEW_LINE>if (modelState == ModelState.FULLY_LOADED) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Query query = new Query("test", getPackageMetaData());<NEW_LINE>ObjectNode settings = new ObjectMapper().createObjectNode();<NEW_LINE>query.setGeometrySettings(settings);<NEW_LINE>query.getGeometrySettings().put("useSmallInts", false);<NEW_LINE>query.getGeometrySettings(<MASK><NEW_LINE>query.getGeometrySettings().put("quantizeColors", true);<NEW_LINE>QueryPart queryPart = query.createQueryPart();<NEW_LINE>EClass ifcProductClass = getPackageMetaData().getEClass("IfcProduct");<NEW_LINE>EStructuralFeature geometryFeature = ifcProductClass.getEStructuralFeature("geometry");<NEW_LINE>List<IdEObject> allWithSubTypes = new ArrayList<>(super.getAllWithSubTypes(ifcProductClass));<NEW_LINE>for (IdEObject ifcProduct : allWithSubTypes) {<NEW_LINE>GeometryInfo geometry = (GeometryInfo) ifcProduct.eGet(geometryFeature);<NEW_LINE>if (geometry != null) {<NEW_LINE>if (!geometryTried.contains(geometry.getOid())) {<NEW_LINE>queryPart.addOid(geometry.getOid());<NEW_LINE>geometryTried.add(geometry.getOid());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (queryPart.getOids() == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>LOGGER.info("Loading geometry for " + queryPart.getOids().size() + " objects");<NEW_LINE>EClass geometryInfoClass = getPackageMetaData().getEClassIncludingDependencies("GeometryInfo");<NEW_LINE>Include include = queryPart.createInclude();<NEW_LINE>include.addType(geometryInfoClass, false);<NEW_LINE>include.addField("data");<NEW_LINE>Include geometryData = include.createInclude();<NEW_LINE>geometryData.addType(getPackageMetaData().getEClassIncludingDependencies("GeometryData"), false);<NEW_LINE>geometryData.addFieldDirect("indices");<NEW_LINE>geometryData.addFieldDirect("normals");<NEW_LINE>geometryData.addFieldDirect("vertices");<NEW_LINE>geometryData.addFieldDirect("colorsQuantized");<NEW_LINE>long serializerOid = bimServerClient.getBinaryGeometryMessagingStreamingSerializerOid();<NEW_LINE>long topicId = bimServerClient.query(query, roid, serializerOid);<NEW_LINE>// TODO use websocket notifications<NEW_LINE>bimServerClient.waitForDonePreparing(topicId);<NEW_LINE>try (InputStream inputStream = bimServerClient.getDownloadData(topicId)) {<NEW_LINE>clientDebugInfo.incrementGeometryGetDownloadData();<NEW_LINE>try {<NEW_LINE>processGeometryInputStream(inputStream);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>} finally {<NEW_LINE>bimServerClient.getServiceInterface().cleanupLongAction(topicId);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
).put("splitGeometry", false);
10,424
public PlanFragment visitPhysicalJDBCScan(OptExpression optExpression, ExecPlan context) {<NEW_LINE>PhysicalJDBCScanOperator node = (PhysicalJDBCScanOperator) optExpression.getOp();<NEW_LINE>context.getDescTbl().addReferencedTable(node.getTable());<NEW_LINE>TupleDescriptor tupleDescriptor = context.getDescTbl().createTupleDescriptor();<NEW_LINE>tupleDescriptor.<MASK><NEW_LINE>for (Map.Entry<ColumnRefOperator, Column> entry : node.getColRefToColumnMetaMap().entrySet()) {<NEW_LINE>SlotDescriptor slotDescriptor = context.getDescTbl().addSlotDescriptor(tupleDescriptor, new SlotId(entry.getKey().getId()));<NEW_LINE>slotDescriptor.setColumn(entry.getValue());<NEW_LINE>slotDescriptor.setIsNullable(entry.getValue().isAllowNull());<NEW_LINE>slotDescriptor.setIsMaterialized(true);<NEW_LINE>context.getColRefToExpr().put(entry.getKey(), new SlotRef(entry.getKey().getName(), slotDescriptor));<NEW_LINE>}<NEW_LINE>tupleDescriptor.computeMemLayout();<NEW_LINE>JDBCScanNode scanNode = new JDBCScanNode(context.getNextNodeId(), tupleDescriptor, (JDBCTable) node.getTable());<NEW_LINE>// set predicate<NEW_LINE>List<ScalarOperator> predicates = Utils.extractConjuncts(node.getPredicate());<NEW_LINE>ScalarOperatorToExpr.FormatterContext formatterContext = new ScalarOperatorToExpr.FormatterContext(context.getColRefToExpr());<NEW_LINE>formatterContext.setImplicitCast(true);<NEW_LINE>for (ScalarOperator predicate : predicates) {<NEW_LINE>scanNode.getConjuncts().add(ScalarOperatorToExpr.buildExecExpression(predicate, formatterContext));<NEW_LINE>}<NEW_LINE>scanNode.setLimit(node.getLimit());<NEW_LINE>scanNode.computeColumnsAndFilters();<NEW_LINE>scanNode.computeStatistics(optExpression.getStatistics());<NEW_LINE>context.getScanNodes().add(scanNode);<NEW_LINE>PlanFragment fragment = new PlanFragment(context.getNextFragmentId(), scanNode, DataPartition.UNPARTITIONED);<NEW_LINE>context.getFragments().add(fragment);<NEW_LINE>return fragment;<NEW_LINE>}
setTable(node.getTable());
799,814
public static void main(String[] args) throws IOException {<NEW_LINE>// This DslJson is initialized with code created by DSL Platform compiler and thus needs .NET/Mono on path<NEW_LINE>// ServiceLoader.load will load Model since it will be registered into META-INF/services during annotation processing<NEW_LINE>DslJson<Object> dslJson = new DslJson<Object>();<NEW_LINE>// writer should be reused. For per thread reuse use ThreadLocal pattern<NEW_LINE>JsonWriter writer = dslJson.newWriter();<NEW_LINE>Model instance = new Model();<NEW_LINE>instance.string = "Hello World!";<NEW_LINE>instance.number = 42;<NEW_LINE>instance.integers = Arrays.asList(1, 2, 3);<NEW_LINE>instance.decimals = new HashSet<BigDecimal>(Arrays.asList(BigDecimal.ONE, BigDecimal.ZERO));<NEW_LINE>instance.uuids = new UUID[] { new UUID(1L, 2L), new UUID(3L, 4L) };<NEW_LINE>instance.longs = new Vector<Long>(Arrays.asList(1L, 2L));<NEW_LINE>instance.nested = Arrays.asList(new Model.Nested(), null);<NEW_LINE>instance.inheritance = new Model.ParentClass();<NEW_LINE>instance.inheritance.a = 5;<NEW_LINE>instance.inheritance.b = 6;<NEW_LINE>instance.person = new ImmutablePerson("first name", "last name", 35);<NEW_LINE>instance.states = Arrays.asList(Model.State.HI, Model.State.LOW);<NEW_LINE>instance.jsonObject = new Model.JsonObjectReference(43, "abcd");<NEW_LINE>instance.jsonObjects = Collections.singletonList(new Model.JsonObjectReference(34, "dcba"));<NEW_LINE>instance.date = new Date();<NEW_LINE>instance.dates = Arrays.asList(<MASK><NEW_LINE>Model.Concrete concrete = new Model.Concrete();<NEW_LINE>concrete.x = 11;<NEW_LINE>concrete.y = 23;<NEW_LINE>instance.abs = concrete;<NEW_LINE>instance.absList = Arrays.<Model.Abstract>asList(concrete, null, concrete);<NEW_LINE>instance.decimal2 = BigDecimal.TEN;<NEW_LINE>instance.intList = new ArrayList<Integer>(Arrays.asList(123, 456));<NEW_LINE>instance.map = new HashMap<String, Object>();<NEW_LINE>instance.map.put("abc", 678);<NEW_LINE>instance.map.put("array", new int[] { 2, 4, 8 });<NEW_LINE>dslJson.serialize(writer, instance);<NEW_LINE>// resulting buffer with JSON<NEW_LINE>byte[] buffer = writer.getByteBuffer();<NEW_LINE>// end of buffer<NEW_LINE>int size = writer.size();<NEW_LINE>System.out.println(writer);<NEW_LINE>// deserialization using byte[] API<NEW_LINE>Model deser = dslJson.deserialize(Model.class, buffer, size);<NEW_LINE>System.out.println(deser.string);<NEW_LINE>}
null, new Date(0));
1,311,019
private void createRemoteUser(ScaleUser scaleUser) {<NEW_LINE>Timber.d("Create user: %s", scaleUser.getUserName());<NEW_LINE>Calendar cal = Calendar.getInstance();<NEW_LINE>cal.setTime(scaleUser.getBirthday());<NEW_LINE>// We can only use up to 3 characters (padding with 0 if needed)<NEW_LINE>byte[] nick = Arrays.copyOf(convertUserNameToScale(scaleUser).getBytes(), 3);<NEW_LINE>byte year = (byte) (cal.get(Calendar.YEAR) - 1900);<NEW_LINE>byte month = (byte) cal.get(Calendar.MONTH);<NEW_LINE>byte day = (byte) cal.get(Calendar.DAY_OF_MONTH);<NEW_LINE>byte height = (byte) scaleUser.getBodyHeight();<NEW_LINE>byte sex = scaleUser.getGender().isMale() ? (byte) 0x80 : 0;<NEW_LINE>// activity level: 1 - 5<NEW_LINE>byte activity = (byte) (scaleUser.getActivityLevel().toInt() + 1);<NEW_LINE>long maxUserId = remoteUsers.isEmpty() ? 100 : 0;<NEW_LINE>for (RemoteUser remoteUser : remoteUsers) {<NEW_LINE>maxUserId = Math.max(maxUserId, remoteUser.remoteUserId);<NEW_LINE>}<NEW_LINE>currentRemoteUser = new RemoteUser(maxUserId + 1, new String<MASK><NEW_LINE>currentRemoteUser.localUserId = scaleUser.getId();<NEW_LINE>currentRemoteUser.isNew = true;<NEW_LINE>byte[] uid = encodeUserId(currentRemoteUser);<NEW_LINE>Timber.d("Sending command: CMD_USER_ADD");<NEW_LINE>sendCommand(CMD_USER_ADD, uid[0], uid[1], uid[2], uid[3], uid[4], uid[5], uid[6], uid[7], nick[0], nick[1], nick[2], year, month, day, height, (byte) (sex | activity));<NEW_LINE>}
(nick), 1900 + year);
408,209
public void init(int N, boolean isPixels, boolean planar) {<NEW_LINE>this.isPixels = isPixels;<NEW_LINE>// define the camera's motion<NEW_LINE>motion = new Se3_F64();<NEW_LINE>motion.getR().setTo(ConvertRotation3D_F64.eulerToMatrix(EulerType.XYZ, 0.5, -0.2, 0.15, null));<NEW_LINE>motion.getT().setTo(0.1, -0.2, 5);<NEW_LINE>// randomly generate points in space<NEW_LINE>if (planar)<NEW_LINE>worldPoints = createPlanarScene(N);<NEW_LINE>else<NEW_LINE>worldPoints = GeoTestingOps.randomPoints_F64(-1, 1, -1, 1, -0.5, 1.5, N, rand);<NEW_LINE>// transform points into second camera's reference frame<NEW_LINE>pairs = new ArrayList<>();<NEW_LINE>observationCurrent = new ArrayList<>();<NEW_LINE>observationPose = new ArrayList<>();<NEW_LINE>for (Point3D_F64 p1 : worldPoints) {<NEW_LINE>Point3D_F64 p2 = SePointOps_F64.transform(motion, p1, null);<NEW_LINE>AssociatedPair pair = new AssociatedPair();<NEW_LINE>pair.p1.setTo(p1.x / p1.z, p1.y / p1.z);<NEW_LINE>pair.p2.setTo(p2.x / p2.z, p2.y / p2.z);<NEW_LINE>pairs.add(pair);<NEW_LINE><MASK><NEW_LINE>observationPose.add(new Point2D3D(pair.p2, p1));<NEW_LINE>if (isPixels) {<NEW_LINE>PerspectiveOps.convertNormToPixel(K, pair.p1, pair.p1);<NEW_LINE>PerspectiveOps.convertNormToPixel(K, pair.p2, pair.p2);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
observationCurrent.add(pair.p2);
1,397,751
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_flexiblespacewithimagelistview);<NEW_LINE>mFlexibleSpaceImageHeight = getResources().getDimensionPixelSize(R.dimen.flexible_space_image_height);<NEW_LINE>mFlexibleSpaceShowFabOffset = getResources().getDimensionPixelSize(R.dimen.flexible_space_show_fab_offset);<NEW_LINE>mActionBarSize = getActionBarSize();<NEW_LINE>mImageView = findViewById(R.id.image);<NEW_LINE>mOverlayView = <MASK><NEW_LINE>ObservableListView listView = (ObservableListView) findViewById(R.id.list);<NEW_LINE>listView.setScrollViewCallbacks(this);<NEW_LINE>// Set padding view for ListView. This is the flexible space.<NEW_LINE>View paddingView = new View(this);<NEW_LINE>AbsListView.LayoutParams lp = new AbsListView.LayoutParams(AbsListView.LayoutParams.MATCH_PARENT, mFlexibleSpaceImageHeight);<NEW_LINE>paddingView.setLayoutParams(lp);<NEW_LINE>// This is required to disable header's list selector effect<NEW_LINE>paddingView.setClickable(true);<NEW_LINE>listView.addHeaderView(paddingView);<NEW_LINE>setDummyData(listView);<NEW_LINE>mTitleView = (TextView) findViewById(R.id.title);<NEW_LINE>mTitleView.setText(getTitle());<NEW_LINE>setTitle(null);<NEW_LINE>mFab = findViewById(R.id.fab);<NEW_LINE>mFab.setOnClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>Toast.makeText(FlexibleSpaceWithImageListViewActivity.this, "FAB is clicked", Toast.LENGTH_SHORT).show();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>mFabMargin = getResources().getDimensionPixelSize(R.dimen.margin_standard);<NEW_LINE>ViewHelper.setScaleX(mFab, 0);<NEW_LINE>ViewHelper.setScaleY(mFab, 0);<NEW_LINE>// mListBackgroundView makes ListView's background except header view.<NEW_LINE>mListBackgroundView = findViewById(R.id.list_background);<NEW_LINE>}
findViewById(R.id.overlay);
1,718,005
public DeleteVMSnapshotAnswer execute(VmwareHostService hostService, DeleteVMSnapshotCommand cmd) {<NEW_LINE>List<VolumeObjectTO> listVolumeTo = cmd.getVolumeTOs();<NEW_LINE>VirtualMachineMO vmMo = null;<NEW_LINE>VmwareContext context = hostService.getServiceContext(cmd);<NEW_LINE>String vmName = cmd.getVmName();<NEW_LINE>String vmSnapshotName = cmd<MASK><NEW_LINE>try {<NEW_LINE>VmwareHypervisorHost hyperHost = hostService.getHyperHost(context, cmd);<NEW_LINE>vmMo = hyperHost.findVmOnHyperHost(vmName);<NEW_LINE>if (vmMo == null) {<NEW_LINE>vmMo = hyperHost.findVmOnPeerHyperHost(vmName);<NEW_LINE>}<NEW_LINE>if (vmMo == null) {<NEW_LINE>String msg = "Unable to find VM for RevertToVMSnapshotCommand";<NEW_LINE>s_logger.debug(msg);<NEW_LINE>return new DeleteVMSnapshotAnswer(cmd, false, msg);<NEW_LINE>} else {<NEW_LINE>if (vmMo.getSnapshotMor(vmSnapshotName) == null) {<NEW_LINE>s_logger.debug("can not find the snapshot " + vmSnapshotName + ", assume it is already removed");<NEW_LINE>} else {<NEW_LINE>if (!vmMo.removeSnapshot(vmSnapshotName, false)) {<NEW_LINE>String msg = "delete vm snapshot " + vmSnapshotName + " due to error occurred in vmware";<NEW_LINE>s_logger.error(msg);<NEW_LINE>return new DeleteVMSnapshotAnswer(cmd, false, msg);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>s_logger.debug("snapshot: " + vmSnapshotName + " is removed");<NEW_LINE>// after removed snapshot, the volumes' paths have been changed for the VM, needs to report new paths to manager<NEW_LINE>Map<String, String> mapNewDisk = getNewDiskMap(vmMo);<NEW_LINE>setVolumeToPathAndSize(listVolumeTo, mapNewDisk, context, hyperHost, cmd.getVmName());<NEW_LINE>return new DeleteVMSnapshotAnswer(cmd, listVolumeTo);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>String msg = e.getMessage();<NEW_LINE>s_logger.error("failed to delete vm snapshot " + vmSnapshotName + " of vm " + vmName + " due to " + msg);<NEW_LINE>return new DeleteVMSnapshotAnswer(cmd, false, msg);<NEW_LINE>}<NEW_LINE>}
.getTarget().getSnapshotName();
269,647
private boolean registerGlassFish(File nbLocation, File gfLocation) throws IOException {<NEW_LINE>File javaExe = JavaUtils.getExecutable(new File(System.getProperty("java.home")));<NEW_LINE>String[] cp = { "platform/core/core.jar", "platform/core/core-base.jar", "platform/lib/boot.jar", "platform/lib/org-openide-modules.jar", "platform/core/org-openide-filesystems.jar", "platform/lib/org-openide-util.jar", "platform/lib/org-openide-util-lookup.jar", "platform/lib/org-openide-util-ui.jar", "enterprise/modules/org-netbeans-modules-j2eeapis.jar", "enterprise/modules/org-netbeans-modules-j2eeserver.jar", "enterprise/modules/org-netbeans-modules-glassfish-common.jar", "enterprise/modules/org-netbeans-modules-glassfish-tooling.jar" };<NEW_LINE>for (String c : cp) {<NEW_LINE>File f = new File(nbLocation, c);<NEW_LINE>if (!FileUtils.exists(f)) {<NEW_LINE>LogManager.log("... cannot find jar required for GlassFish integration: " + f);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String mainClass = "org.netbeans.modules.glassfish.common.registration.AutomaticRegistration";<NEW_LINE>List<String> commands = new ArrayList<String>();<NEW_LINE>File nbCluster = new File(nbLocation, "nb");<NEW_LINE>commands.<MASK><NEW_LINE>commands.add("-cp");<NEW_LINE>commands.add(StringUtils.asString(cp, File.pathSeparator));<NEW_LINE>commands.add(mainClass);<NEW_LINE>commands.add(nbCluster.getAbsolutePath());<NEW_LINE>commands.add(new File(gfLocation, "glassfish").getAbsolutePath());<NEW_LINE>return SystemUtils.executeCommand(nbLocation, commands.toArray(new String[] {})).getErrorCode() == 0;<NEW_LINE>}
add(javaExe.getAbsolutePath());
552,728
public static DescribeDomainBasicConfigsResponse unmarshall(DescribeDomainBasicConfigsResponse describeDomainBasicConfigsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDomainBasicConfigsResponse.setRequestId(_ctx.stringValue("DescribeDomainBasicConfigsResponse.RequestId"));<NEW_LINE>describeDomainBasicConfigsResponse.setTotalCount(_ctx.integerValue("DescribeDomainBasicConfigsResponse.TotalCount"));<NEW_LINE>List<DomainConfig> domainConfigs = new ArrayList<DomainConfig>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeDomainBasicConfigsResponse.DomainConfigs.Length"); i++) {<NEW_LINE>DomainConfig domainConfig = new DomainConfig();<NEW_LINE>domainConfig.setStatus(_ctx.integerValue<MASK><NEW_LINE>domainConfig.setDomain(_ctx.stringValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].Domain"));<NEW_LINE>domainConfig.setOwner(_ctx.stringValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].Owner"));<NEW_LINE>domainConfig.setCcMode(_ctx.integerValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].CcMode"));<NEW_LINE>domainConfig.setCcStatus(_ctx.integerValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].CcStatus"));<NEW_LINE>domainConfig.setAccessType(_ctx.stringValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].AccessType"));<NEW_LINE>domainConfig.setVersion(_ctx.longValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].Version"));<NEW_LINE>domainConfig.setAclStatus(_ctx.integerValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].AclStatus"));<NEW_LINE>domainConfig.setWafStatus(_ctx.integerValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].WafStatus"));<NEW_LINE>domainConfig.setWafMode(_ctx.integerValue("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].WafMode"));<NEW_LINE>domainConfigs.add(domainConfig);<NEW_LINE>}<NEW_LINE>describeDomainBasicConfigsResponse.setDomainConfigs(domainConfigs);<NEW_LINE>return describeDomainBasicConfigsResponse;<NEW_LINE>}
("DescribeDomainBasicConfigsResponse.DomainConfigs[" + i + "].Status"));
1,317,854
void deleteStreams(Transaction t, final Set<Long> streamIds) {<NEW_LINE>if (streamIds.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Set<HotspottyDataStreamMetadataTable.HotspottyDataStreamMetadataRow> smRows = new HashSet<>();<NEW_LINE>Multimap<HotspottyDataStreamHashAidxTable.HotspottyDataStreamHashAidxRow, HotspottyDataStreamHashAidxTable.HotspottyDataStreamHashAidxColumn> shToDelete = HashMultimap.create();<NEW_LINE>for (Long streamId : streamIds) {<NEW_LINE>smRows.add(HotspottyDataStreamMetadataTable.HotspottyDataStreamMetadataRow.of(streamId));<NEW_LINE>}<NEW_LINE>HotspottyDataStreamMetadataTable table = tables.getHotspottyDataStreamMetadataTable(t);<NEW_LINE>Map<HotspottyDataStreamMetadataTable.HotspottyDataStreamMetadataRow, StreamMetadata> <MASK><NEW_LINE>Set<HotspottyDataStreamValueTable.HotspottyDataStreamValueRow> streamValueToDelete = new HashSet<>();<NEW_LINE>for (Entry<HotspottyDataStreamMetadataTable.HotspottyDataStreamMetadataRow, StreamMetadata> e : metadatas.entrySet()) {<NEW_LINE>Long streamId = e.getKey().getId();<NEW_LINE>long blocks = getNumberOfBlocksFromMetadata(e.getValue());<NEW_LINE>for (long i = 0; i < blocks; i++) {<NEW_LINE>streamValueToDelete.add(HotspottyDataStreamValueTable.HotspottyDataStreamValueRow.of(streamId, i));<NEW_LINE>}<NEW_LINE>ByteString streamHash = e.getValue().getHash();<NEW_LINE>Sha256Hash hash = Sha256Hash.EMPTY;<NEW_LINE>if (!ByteString.EMPTY.equals(streamHash)) {<NEW_LINE>hash = new Sha256Hash(streamHash.toByteArray());<NEW_LINE>} else {<NEW_LINE>log.error("Empty hash for stream {}", SafeArg.of("id", streamId));<NEW_LINE>}<NEW_LINE>HotspottyDataStreamHashAidxTable.HotspottyDataStreamHashAidxRow hashRow = HotspottyDataStreamHashAidxTable.HotspottyDataStreamHashAidxRow.of(hash);<NEW_LINE>HotspottyDataStreamHashAidxTable.HotspottyDataStreamHashAidxColumn column = HotspottyDataStreamHashAidxTable.HotspottyDataStreamHashAidxColumn.of(streamId);<NEW_LINE>shToDelete.put(hashRow, column);<NEW_LINE>}<NEW_LINE>tables.getHotspottyDataStreamHashAidxTable(t).delete(shToDelete);<NEW_LINE>tables.getHotspottyDataStreamValueTable(t).delete(streamValueToDelete);<NEW_LINE>table.delete(smRows);<NEW_LINE>}
metadatas = table.getMetadatas(smRows);