idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
540,813
public static void reset(boolean isTerminating) {<NEW_LINE>if (_instance == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int result = reset(hotkeys, isTerminating);<NEW_LINE>if (result > 0) {<NEW_LINE>Debug.log(3, "HotkeyManager: reset: removed all user hotkeys.");<NEW_LINE>}<NEW_LINE>if (result < 0 && !isTerminating) {<NEW_LINE>// RunTime.get().terminate(999, "HotkeyManager: reset: did not work");<NEW_LINE>throw new SikuliXception(String.format("fatal: " + "HotkeyManager: reset: did not work"));<NEW_LINE>}<NEW_LINE>if (!isTerminating) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (result > 0) {<NEW_LINE>Debug.log(3, "HotkeyManager: reset: removed all SikuliX hotkeys.");<NEW_LINE>}<NEW_LINE>if (isTerminating) {<NEW_LINE>_instance.cleanUp();<NEW_LINE>}<NEW_LINE>}
result = reset(hotkeysGlobal, isTerminating);
1,294,135
private Optional<String> genericGetResolvedFieldOrAlias(Field field, BibDatabase database, BiFunction<BibEntry, Field, Optional<String>> getFieldOrAlias) {<NEW_LINE>if (InternalField.TYPE_HEADER.equals(field) || InternalField.OBSOLETE_TYPE_HEADER.equals(field)) {<NEW_LINE>return Optional.of(type.get().getDisplayName());<NEW_LINE>}<NEW_LINE>if (InternalField.KEY_FIELD.equals(field)) {<NEW_LINE>return getCitationKey();<NEW_LINE>}<NEW_LINE>Optional<String> result = getFieldOrAlias.apply(this, field);<NEW_LINE>// If this field is not set, and the entry has a crossref, try to look up the<NEW_LINE>// field in the referred entry, following the biblatex rules<NEW_LINE>if (result.isEmpty() && (database != null)) {<NEW_LINE>Optional<BibEntry> referred = database.getReferencedEntry(this);<NEW_LINE>if (referred.isPresent()) {<NEW_LINE>EntryType sourceEntry = referred.get<MASK><NEW_LINE>EntryType targetEntry = type.get();<NEW_LINE>Optional<Field> sourceField = getSourceField(field, targetEntry, sourceEntry);<NEW_LINE>if (sourceField.isPresent()) {<NEW_LINE>result = getFieldOrAlias.apply(referred.get(), sourceField.get());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return (database == null || result.isEmpty()) ? result : Optional.of(database.resolveForStrings(result.get()));<NEW_LINE>}
().type.get();
1,762,333
final UpdateServicePrimaryTaskSetResult executeUpdateServicePrimaryTaskSet(UpdateServicePrimaryTaskSetRequest updateServicePrimaryTaskSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateServicePrimaryTaskSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateServicePrimaryTaskSetRequest> request = null;<NEW_LINE>Response<UpdateServicePrimaryTaskSetResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new UpdateServicePrimaryTaskSetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateServicePrimaryTaskSetRequest));<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, "ECS");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateServicePrimaryTaskSet");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateServicePrimaryTaskSetResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateServicePrimaryTaskSetResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
879,913
public void run() {<NEW_LINE>boolean autoscalePref = NbPreferences.forModule(ReportPanel.class).getBoolean(PREF_AUTOSCALE, containers[0].getUnloader().isAutoScale());<NEW_LINE>boolean selfLoopPref = NbPreferences.forModule(ReportPanel.class).getBoolean(PREF_SELF_LOOP, containers[0].getUnloader().allowSelfLoop());<NEW_LINE>boolean createMissingNodesPref = NbPreferences.forModule(ReportPanel.class).getBoolean(PREF_CREATE_MISSING_NODES, containers[0].getUnloader().allowAutoNode());<NEW_LINE>EdgeMergeStrategy strategyPref = containers[0].getUnloader().getEdgesMergeStrategy();<NEW_LINE>try {<NEW_LINE>strategyPref = EdgeMergeStrategy.valueOf(NbPreferences.forModule(ReportPanel.class).get(PREF_EDGE_MERGE_STRATEGY, strategyPref.name()));<NEW_LINE>} catch (Exception e) {<NEW_LINE>// NOOP<NEW_LINE>}<NEW_LINE>// Create Missing Nodes Checkbox should be disabled if no missing nodes found<NEW_LINE>createMissingNodesCheckbox.setEnabled(containers[0].<MASK><NEW_LINE>// Self-Loop Checkbox should be disabled if no self loops found<NEW_LINE>selfLoopCheckBox.setEnabled(containers[0].hasSelfLoops());<NEW_LINE>autoscaleCheckbox.setSelected(autoscalePref);<NEW_LINE>selfLoopCheckBox.setSelected(selfLoopPref);<NEW_LINE>createMissingNodesCheckbox.setSelected(createMissingNodesPref);<NEW_LINE>edgesMergeStrategyCombo.setSelectedItem(new EdgesMergeStrategyWrapper(strategyPref));<NEW_LINE>}
getUnloader().containsAutoNodes());
1,481,226
Map<String, FeedScopedId> createTripCalendar(Iterable<ServiceJourney> serviceJourneys) {<NEW_LINE>// Create a map to store the result<NEW_LINE>Map<String, FeedScopedId> <MASK><NEW_LINE>for (ServiceJourney sj : serviceJourneys) {<NEW_LINE>Set<ServiceDate> serviceDates;<NEW_LINE>// Add scheduled dayTypes<NEW_LINE>serviceDates = new HashSet<>(getServiceDatesForDayType(sj));<NEW_LINE>// Add DatedServiceJourneys<NEW_LINE>serviceDates.addAll(getDatesForDSJs(sj.getId()));<NEW_LINE>// Add set of service-dates to service calendar. A serviceId for the set of days<NEW_LINE>// is generated or fetched(if set already exist)<NEW_LINE>FeedScopedId serviceId = calendarServiceBuilder.registerDatesAndGetServiceId(serviceDates);<NEW_LINE>// Add service id to result<NEW_LINE>serviceIdsBySJId.put(sj.getId(), serviceId);<NEW_LINE>}<NEW_LINE>return serviceIdsBySJId;<NEW_LINE>}
serviceIdsBySJId = new HashMap<>();
1,198,686
private void addAddresses(VCard vCard) {<NEW_LINE>List<View> addressList = new ArrayList<>();<NEW_LINE>String homeAddress = null;<NEW_LINE>for (AddressProperty property : AddressProperty.values()) {<NEW_LINE>homeAddress = addString(homeAddress, vCard.getAddressFieldHome(property.name()), "\n");<NEW_LINE>}<NEW_LINE>addItem(addressList, contactInfoItems, getString(VcardMaps.getAddressTypeMap().get(<MASK><NEW_LINE>String workAddress = null;<NEW_LINE>for (AddressProperty property : AddressProperty.values()) {<NEW_LINE>workAddress = addString(workAddress, vCard.getAddressFieldWork(property.name()), "\n");<NEW_LINE>}<NEW_LINE>addItem(addressList, contactInfoItems, getString(VcardMaps.getAddressTypeMap().get(AddressType.WORK)), workAddress);<NEW_LINE>addItemGroup(addressList, contactInfoItems, R.drawable.ic_vcard_address_24dp);<NEW_LINE>}
AddressType.HOME)), homeAddress);
1,838,372
public void createFile(AutoTypeImage imageType, int minContinuous) throws FileNotFoundException {<NEW_LINE>className = "ImplFastCorner" + minContinuous + "_" + imageType.getAbbreviatedType();<NEW_LINE>this.imageType = imageType;<NEW_LINE>this.sumType = imageType.getSumType();<NEW_LINE>this.bitwise = imageType.getBitWise();<NEW_LINE>this.dataType = imageType.getDataType();<NEW_LINE>this.minContinuous = minContinuous;<NEW_LINE>initFile();<NEW_LINE>printPreamble();<NEW_LINE>for (int i = 0; i < samples.length; i++) {<NEW_LINE>samples[i].clear();<NEW_LINE>}<NEW_LINE>List<String> codes = new ArrayList<>();<NEW_LINE>List<String> names = new ArrayList<>();<NEW_LINE>// Need to split the code into smaller function to help the JVM optimize the code<NEW_LINE>codes.add(generateSamples());<NEW_LINE>names.add("DUMMY");<NEW_LINE>splitIntoFunctions(codes, names, 0, 0);<NEW_LINE>out.print("\t/**\n" + "\t * @return 1 = positive corner, 0 = no corner, -1 = negative corner\n" + "\t */\n" + "\t@Override public final int checkPixel( int index ) {\n" + "\t\tsetThreshold(index);\n" + "\n");<NEW_LINE>out.println(codes.get(0));<NEW_LINE>out.println("\t}\n");<NEW_LINE>out.println("\t@Override public FastCornerInterface<" + imageType.getSingleBandName() + "> newInstance() {\n" + "\t\treturn new " + className + "(tol);\n" + "\t}\n");<NEW_LINE>for (int i = 1; i < codes.size(); i++) {<NEW_LINE>String inside = codes.get(i);<NEW_LINE>inside = "\tpublic final int " + names.get(i) + "( int index ) {\n" + inside + "\n\t}\n";<NEW_LINE>out.println(inside);<NEW_LINE>}<NEW_LINE>out.println("}");<NEW_LINE><MASK><NEW_LINE>}
System.out.println("Done");
1,288,396
private void buildNearestPoi(ViewGroup viewGroup) {<NEW_LINE>final int position = viewGroup.getChildCount();<NEW_LINE>final WeakReference<ViewGroup> viewGroupRef = new WeakReference<>(viewGroup);<NEW_LINE>buildNearestPoiRow(new SearchAmenitiesListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onFinish(List<Amenity> amenities) {<NEW_LINE>ViewGroup viewGroup = viewGroupRef.get();<NEW_LINE>if (viewGroup == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String title = app.getString(R.string.speak_poi);<NEW_LINE>String type = "\"" + AmenityMenuController.getTypeStr(amenity) + "\"";<NEW_LINE>String count = "(" + amenities.size() + ")";<NEW_LINE>String text = app.getString(R.string.ltr_or_rtl_triple_combine_via_space, title, type, count);<NEW_LINE>Context context = viewGroup.getContext();<NEW_LINE>AmenityInfoRow poiInfo = new AmenityInfoRow(NEAREST_POI_KEY, AmenityMenuController.getRightIconId(amenity), null, text, null, true, getCollapsableView(context, true, amenities, NEAREST_POI_KEY), 0, false, false, false, 1000, null, false, false, false, 0);<NEW_LINE>View wikiRow = viewGroup.findViewWithTag(NEAREST_WIKI_KEY);<NEW_LINE>int insertIndex = wikiRow != null ? viewGroup.indexOfChild(wikiRow) + 1 : position == 0 ? 0 : position + 1;<NEW_LINE>View amenitiesRow = createRowContainer(context, NEAREST_POI_KEY);<NEW_LINE>firstRow = insertIndex == 0 || <MASK><NEW_LINE>buildAmenityRow(amenitiesRow, poiInfo);<NEW_LINE>viewGroup.addView(amenitiesRow, insertIndex);<NEW_LINE>buildNearestRowDividerIfMissing(viewGroup, insertIndex);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
isDividerAtPosition(viewGroup, insertIndex - 1);
577,099
private void init() {<NEW_LINE>dataBlockCount = table.getDataBlockCount();<NEW_LINE>if (fields == null) {<NEW_LINE>fields = table.getColNames();<NEW_LINE>}<NEW_LINE>rowReader = table.getRowReader(true);<NEW_LINE>rowDataReader = new ObjectReader(rowReader, table.groupTable.getBlockSize() - GroupTable.POS_SIZE);<NEW_LINE>segmentReader = table.getSegmentObjectReader();<NEW_LINE>blockSize = table.groupTable.getBlockSize() - GroupTable.POS_SIZE;<NEW_LINE>isPrimaryTable = table.parent == null;<NEW_LINE><MASK><NEW_LINE>String[] fields;<NEW_LINE>if (isPrimaryTable) {<NEW_LINE>len += 2;<NEW_LINE>fields = Arrays.copyOf(this.fields, len);<NEW_LINE>fields[len - 2] = SEQ_FIELDNAME;<NEW_LINE>fields[len - 1] = POS_FIELDNAME;<NEW_LINE>} else {<NEW_LINE>len += 3;<NEW_LINE>fields = Arrays.copyOf(this.fields, len);<NEW_LINE>fields[len - 3] = SEQ_FIELDNAME;<NEW_LINE>fields[len - 2] = POS_FIELDNAME + 0;<NEW_LINE>fields[len - 1] = POS_FIELDNAME + 1;<NEW_LINE>}<NEW_LINE>ds = new DataStruct(fields);<NEW_LINE>if (!isPrimaryTable) {<NEW_LINE>String[] field = Arrays.copyOf(table.parent.getSortedColNames(), 1);<NEW_LINE>parentCursor = new RTableCursor(table.parent, field, ctx, null);<NEW_LINE>Sequence pkeyData = parentCursor.fetch(1);<NEW_LINE>curPkey = (Record) pkeyData.get(1);<NEW_LINE>pseq = (Long) curPkey.getNormalFieldValue(1);<NEW_LINE>}<NEW_LINE>int colCount = this.fields.length;<NEW_LINE>String[] fullFields = table.getAllColNames();<NEW_LINE>fieldsIndex = new int[colCount];<NEW_LINE>needRead = new boolean[fullFields.length];<NEW_LINE>fullDs = new DataStruct(fullFields);<NEW_LINE>for (int i = 0; i < colCount; ++i) {<NEW_LINE>int id = fullDs.getFieldIndex(fields[i]);<NEW_LINE>fieldsIndex[i] = id;<NEW_LINE>if (id >= 0)<NEW_LINE>needRead[id] = true;<NEW_LINE>}<NEW_LINE>if (filter != null) {<NEW_LINE>parseFilter(filter.getHome());<NEW_LINE>}<NEW_LINE>}
int len = this.fields.length;
528,437
private void syncChecked() throws KeeperException {<NEW_LINE>final ZooKeeperClient client = client("sync");<NEW_LINE>final List<String> nodes = client.getChildren(path);<NEW_LINE>final Map<String, byte[]> snapshot = entries.get();<NEW_LINE>// Get new remote state<NEW_LINE>remote = Maps.newHashMap();<NEW_LINE>for (final String node : nodes) {<NEW_LINE>final String nodePath = <MASK><NEW_LINE>final byte[] data = client.getData(nodePath);<NEW_LINE>remote.put(node, data);<NEW_LINE>}<NEW_LINE>// Create and update missing and outdated nodes<NEW_LINE>for (final Map.Entry<String, byte[]> entry : snapshot.entrySet()) {<NEW_LINE>final String node = entry.getKey();<NEW_LINE>final byte[] remoteData = remote.get(node);<NEW_LINE>final byte[] localData = entry.getValue();<NEW_LINE>final String nodePath = ZKPaths.makePath(path, node);<NEW_LINE>if (remoteData == null) {<NEW_LINE>log.debug("sync: creating node {}", nodePath);<NEW_LINE>client.createAndSetData(nodePath, localData);<NEW_LINE>remote.put(node, localData);<NEW_LINE>} else if (!Arrays.equals(remoteData, localData)) {<NEW_LINE>log.debug("sync: updating node {}", nodePath);<NEW_LINE>client.setData(nodePath, localData);<NEW_LINE>remote.put(node, localData);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Remove undesired nodes<NEW_LINE>final ImmutableSet<String> keySet = ImmutableSet.copyOf(remote.keySet());<NEW_LINE>for (final String node : keySet) {<NEW_LINE>if (!snapshot.containsKey(node)) {<NEW_LINE>final String nodePath = ZKPaths.makePath(path, node);<NEW_LINE>log.debug("sync: deleting node {}", nodePath);<NEW_LINE>client.delete(nodePath);<NEW_LINE>remote.remove(node);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
ZKPaths.makePath(path, node);
499,075
public void showPanels(boolean show, boolean showDefaults, boolean saveSettings) {<NEW_LINE>if (!supportsPanels() || show == isPanelsVisible()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>CTabItem activePanelTab = panelFolder.getSelection();<NEW_LINE>if (!show) {<NEW_LINE>viewerSash.setMaximizedControl(viewerSash.getChildren()[0]);<NEW_LINE>if (activePanelTab != null && !activePanelTab.getControl().isDisposed() && UIUtils.hasFocus(activePanelTab.getControl())) {<NEW_LINE>// Set focus to presentation<NEW_LINE>activePresentation.getControl().setFocus();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (showDefaults) {<NEW_LINE>activateDefaultPanels(getPresentationSettings());<NEW_LINE>}<NEW_LINE>viewerSash.setMaximizedControl(null);<NEW_LINE>updatePanelActions();<NEW_LINE>if (showDefaults) {<NEW_LINE>updatePanelsContent(false);<NEW_LINE>}<NEW_LINE>activePresentation.updateValueView();<NEW_LINE>// Set focus to panel<NEW_LINE>if (activePanelTab != null && !activePanelTab.getControl().isDisposed() && UIUtils.hasFocus(activePresentation.getControl())) {<NEW_LINE>activePanelTab<MASK><NEW_LINE>}<NEW_LINE>// Make sure focus cell is visible<NEW_LINE>DBDAttributeBinding currentAttribute = getActivePresentation().getCurrentAttribute();<NEW_LINE>if (currentAttribute != null) {<NEW_LINE>getActivePresentation().showAttribute(currentAttribute);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>getPresentationSettings().panelsVisible = show;<NEW_LINE>if (saveSettings) {<NEW_LINE>savePresentationSettings();<NEW_LINE>}<NEW_LINE>updatePanelsButtons();<NEW_LINE>}
.getControl().setFocus();
1,774,467
protected void exec() {<NEW_LINE>Op op = modAlgebra.getOp();<NEW_LINE>if (op == null) {<NEW_LINE>System.err.println("No query expression to execute");<NEW_LINE>throw new TerminationException(9);<NEW_LINE>}<NEW_LINE>Dataset dataset = modDataset.getDataset();<NEW_LINE>// Check there is a dataset.<NEW_LINE>if (dataset == null)<NEW_LINE>dataset = DatasetFactory.createGeneral();<NEW_LINE>modTime.startTimer();<NEW_LINE>DatasetGraph dsg = dataset.asDatasetGraph();<NEW_LINE>if (printOp || printPlan) {<NEW_LINE>if (printOp) {<NEW_LINE>divider();<NEW_LINE>IndentedWriter out = new IndentedWriter(System.out, true);<NEW_LINE>op.output(out);<NEW_LINE>out.flush();<NEW_LINE>}<NEW_LINE>if (printPlan) {<NEW_LINE>QueryIterator qIter = Algebra.exec(op, dsg);<NEW_LINE>Plan plan = new <MASK><NEW_LINE>divider();<NEW_LINE>IndentedWriter out = new IndentedWriter(System.out, false);<NEW_LINE>plan.output(out);<NEW_LINE>out.flush();<NEW_LINE>}<NEW_LINE>// return ;<NEW_LINE>}<NEW_LINE>// Do not optimize. Execute as-is.<NEW_LINE>QueryExecUtils.execute(op, dsg, modResults.getResultsFormat());<NEW_LINE>long time = modTime.endTimer();<NEW_LINE>if (modTime.timingEnabled())<NEW_LINE>System.out.println("Time: " + modTime.timeStr(time));<NEW_LINE>}
PlanOp(op, null, qIter);
698,754
public HttpClientConnectionManager newConnectionManager(boolean disableSslValidation, int maxTotalConnections, int maxConnectionsPerRoute, long timeToLive, TimeUnit timeUnit, RegistryBuilder registryBuilder) {<NEW_LINE>if (registryBuilder == null) {<NEW_LINE>registryBuilder = RegistryBuilder.<ConnectionSocketFactory>create().register(HTTP_SCHEME, PlainConnectionSocketFactory.INSTANCE);<NEW_LINE>}<NEW_LINE>if (disableSslValidation) {<NEW_LINE>try {<NEW_LINE>final SSLContext sslContext = SSLContext.getInstance("SSL");<NEW_LINE>sslContext.init(null, new TrustManager[] { new DisabledValidationTrustManager() }, new SecureRandom());<NEW_LINE>registryBuilder.register(HTTPS_SCHEME, new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE));<NEW_LINE>} catch (NoSuchAlgorithmException e) {<NEW_LINE>LOG.warn("Error creating SSLContext", e);<NEW_LINE>} catch (KeyManagementException e) {<NEW_LINE>LOG.warn("Error creating SSLContext", e);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>registryBuilder.register("https", SSLConnectionSocketFactory.getSocketFactory());<NEW_LINE>}<NEW_LINE>final Registry<ConnectionSocketFactory<MASK><NEW_LINE>PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(registry, null, null, null, timeToLive, timeUnit);<NEW_LINE>connectionManager.setMaxTotal(maxTotalConnections);<NEW_LINE>connectionManager.setDefaultMaxPerRoute(maxConnectionsPerRoute);<NEW_LINE>return connectionManager;<NEW_LINE>}
> registry = registryBuilder.build();
1,708,037
private void createActions() {<NEW_LINE>searchAction = new NavigatableContextAction("Search Memory", getName(), false) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(NavigatableActionContext context) {<NEW_LINE>setNavigatable(context.getNavigatable());<NEW_LINE>invokeSearchDialog(context);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>searchAction.setHelpLocation(new HelpLocation(HelpTopics.SEARCH, searchAction.getName()));<NEW_LINE>String[] menuPath = new <MASK><NEW_LINE>searchAction.setMenuBarData(new MenuData(menuPath, "search"));<NEW_LINE>searchAction.setKeyBindingData(new KeyBindingData('S', 0));<NEW_LINE>searchAction.setDescription("Search Memory for byte sequence");<NEW_LINE>searchAction.addToWindowWhen(NavigatableActionContext.class);<NEW_LINE>tool.addAction(searchAction);<NEW_LINE>searchAgainAction = new NavigatableContextAction("Repeat Memory Search", getName(), false) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(NavigatableActionContext context) {<NEW_LINE>setNavigatable(context.getNavigatable());<NEW_LINE>performSearch(searchInfo);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected boolean isEnabledForContext(NavigatableActionContext context) {<NEW_LINE>return searchInfo != null && super.isEnabledForContext(context);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>searchAgainAction.setHelpLocation(new HelpLocation(HelpTopics.SEARCH, searchAgainAction.getName()));<NEW_LINE>menuPath = new String[] { "&Search", "Repeat Memory Search" };<NEW_LINE>searchAgainAction.setMenuBarData(new MenuData(menuPath, "search"));<NEW_LINE>searchAgainAction.setKeyBindingData(new KeyBindingData(KeyEvent.VK_F3, 0));<NEW_LINE>searchAgainAction.setDescription("Search Memory for byte sequence");<NEW_LINE>searchAgainAction.addToWindowWhen(NavigatableActionContext.class);<NEW_LINE>tool.addAction(searchAgainAction);<NEW_LINE>}
String[] { "&Search", "&Memory..." };
1,640,557
public MappeableContainer xor(MappeableBitmapContainer value2) {<NEW_LINE>int newCardinality = 0;<NEW_LINE>if (BufferUtil.isBackedBySimpleArray(this.bitmap) && BufferUtil.isBackedBySimpleArray(value2.bitmap)) {<NEW_LINE>long[] b = this.bitmap.array();<NEW_LINE>long[] v2 = value2.bitmap.array();<NEW_LINE>int len <MASK><NEW_LINE>for (int k = 0; k < len; ++k) {<NEW_LINE>newCardinality += Long.bitCount(b[k] ^ v2[k]);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>int len = this.bitmap.limit();<NEW_LINE>for (int k = 0; k < len; ++k) {<NEW_LINE>newCardinality += Long.bitCount(this.bitmap.get(k) ^ value2.bitmap.get(k));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (newCardinality > MappeableArrayContainer.DEFAULT_MAX_SIZE) {<NEW_LINE>final MappeableBitmapContainer answer = new MappeableBitmapContainer();<NEW_LINE>long[] bitArray = answer.bitmap.array();<NEW_LINE>if (BufferUtil.isBackedBySimpleArray(this.bitmap) && BufferUtil.isBackedBySimpleArray(value2.bitmap)) {<NEW_LINE>long[] b = this.bitmap.array();<NEW_LINE>long[] v2 = value2.bitmap.array();<NEW_LINE>int len = answer.bitmap.limit();<NEW_LINE>for (int k = 0; k < len; ++k) {<NEW_LINE>bitArray[k] = b[k] ^ v2[k];<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>int len = answer.bitmap.limit();<NEW_LINE>for (int k = 0; k < len; ++k) {<NEW_LINE>bitArray[k] = this.bitmap.get(k) ^ value2.bitmap.get(k);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>answer.cardinality = newCardinality;<NEW_LINE>return answer;<NEW_LINE>}<NEW_LINE>final MappeableArrayContainer ac = new MappeableArrayContainer(newCardinality);<NEW_LINE>BufferUtil.fillArrayXOR(ac.content.array(), this.bitmap, value2.bitmap);<NEW_LINE>ac.cardinality = newCardinality;<NEW_LINE>return ac;<NEW_LINE>}
= this.bitmap.limit();
1,175,406
private STNode parseMemberRhsInStmtStartWithBrace(STNode identifier, STNode colon, STNode secondIdentifier, STNode secondNameRef) {<NEW_LINE>STNode typedBPOrExpr = parseTypedBindingPatternOrMemberAccess(secondNameRef, <MASK><NEW_LINE>if (isExpression(typedBPOrExpr.kind)) {<NEW_LINE>return parseMemberWithExprInRhs(identifier, colon, secondIdentifier, typedBPOrExpr);<NEW_LINE>}<NEW_LINE>switchContext(ParserRuleContext.BLOCK_STMT);<NEW_LINE>startContext(ParserRuleContext.VAR_DECL_STMT);<NEW_LINE>List<STNode> varDeclQualifiers = new ArrayList<>();<NEW_LINE>STNode annots = STNodeFactory.createEmptyNodeList();<NEW_LINE>// We reach here for something like: "{ foo:bar[". But we started parsing the rhs component<NEW_LINE>// starting with "bar". Hence if its a typed-binding-pattern, then merge the "foo:" with<NEW_LINE>// the rest of the type-desc.<NEW_LINE>STTypedBindingPatternNode typedBP = (STTypedBindingPatternNode) typedBPOrExpr;<NEW_LINE>STNode qualifiedNameRef = createQualifiedNameReferenceNode(identifier, colon, secondIdentifier);<NEW_LINE>STNode newTypeDesc = mergeQualifiedNameWithTypeDesc(qualifiedNameRef, typedBP.typeDescriptor);<NEW_LINE>STNode newTypeBP = STNodeFactory.createTypedBindingPatternNode(newTypeDesc, typedBP.bindingPattern);<NEW_LINE>STNode publicQualifier = STNodeFactory.createEmptyNode();<NEW_LINE>return parseVarDeclRhs(annots, publicQualifier, varDeclQualifiers, newTypeBP, false);<NEW_LINE>}
false, true, ParserRuleContext.AMBIGUOUS_STMT);
357,501
public Info findSplit(Relation<? extends NumberVector> relation, int dims, ArrayModifiableDBIDs sorted, DBIDArrayMIter iter, int left, int right, SortDBIDsBySingleDimension comp) {<NEW_LINE>int bestdim = 0, bestpos = (right - left) >>> 1;<NEW_LINE>double bestscore = Double.NEGATIVE_INFINITY;<NEW_LINE>double[] buf = new double[right - left];<NEW_LINE>for (int dim = 0; dim < dims; dim++) {<NEW_LINE>double sum = 0.;<NEW_LINE>for (iter.seek(left); iter.getOffset() < right; iter.advance()) {<NEW_LINE>sum += buf[iter.getOffset() - left] = relation.get(iter).doubleValue(dim);<NEW_LINE>}<NEW_LINE>// sort the objects by the chosen attribute:<NEW_LINE>Arrays.sort(buf);<NEW_LINE>// Minimizing the SSQs is the same as maximizing the weighted distance<NEW_LINE>// between the centers.<NEW_LINE>double s1 = buf[0];<NEW_LINE>int i = 1, j = right - left - 1;<NEW_LINE>while (j >= 1) {<NEW_LINE>s1 += buf[i];<NEW_LINE>double v2 = s1 / ++i - <MASK><NEW_LINE>double score = v2 * v2 * i * j;<NEW_LINE>if (score > bestscore) {<NEW_LINE>bestscore = score;<NEW_LINE>bestdim = dim;<NEW_LINE>bestpos = i;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (bestscore == 0) {<NEW_LINE>// All duplicate.<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>bestpos += left;<NEW_LINE>comp.setDimension(bestdim);<NEW_LINE>QuickSelectDBIDs.quickSelect(sorted, comp, left, right, bestpos);<NEW_LINE>return new Info(bestdim, bestpos, relation.get(iter.seek(bestpos)).doubleValue(bestdim));<NEW_LINE>}
(sum - s1) / --j;
828,370
protected void prepareSumAggregators(List<ItemSum> functions, List<ItemSum> sumFunctions, List<FieldPacket> packets, boolean isAllPushDown) {<NEW_LINE>LOGGER.debug("prepare_sum_aggregators");<NEW_LINE>for (int i = 0; i < functions.size(); i++) {<NEW_LINE>ItemSum func = functions.get(i);<NEW_LINE>ResultStore store = null;<NEW_LINE>if (func.hasWithDistinct()) {<NEW_LINE>ItemSum selFunc = sumFunctions.get(i);<NEW_LINE>List<Order> orders = HandlerTool.makeOrder(selFunc.arguments());<NEW_LINE>RowDataComparator distinctCmp = new RowDataComparator(packets, orders, isAllPushDown, this.type());<NEW_LINE>store = new DistinctLocalResult(pool, packets.size(), distinctCmp, this.charset).<MASK><NEW_LINE>distinctStores.add(store);<NEW_LINE>}<NEW_LINE>func.setAggregator(func.hasWithDistinct() ? AggregatorType.DISTINCT_AGGREGATOR : AggregatorType.SIMPLE_AGGREGATOR, store);<NEW_LINE>}<NEW_LINE>}
setMemSizeController(session.getOtherBufferMC());
831,381
private static String newTestString(Random random, BitSet bitSet, int percentMatching) {<NEW_LINE>final String allMatchingChars = allMatchingChars(bitSet);<NEW_LINE>final char[<MASK><NEW_LINE>// Fill with matching chars.<NEW_LINE>for (int i = 0; i < result.length; i++) {<NEW_LINE>result[i] = allMatchingChars.charAt(random.nextInt(allMatchingChars.length()));<NEW_LINE>}<NEW_LINE>// Replace some of chars by non-matching.<NEW_LINE>int remaining = (int) ((100 - percentMatching) * result.length / 100.0 + 0.5);<NEW_LINE>while (remaining > 0) {<NEW_LINE>final char c = (char) random.nextInt();<NEW_LINE>if (bitSet.get(c)) {<NEW_LINE>final int pos = random.nextInt(result.length);<NEW_LINE>if (bitSet.get(result[pos])) {<NEW_LINE>result[pos] = c;<NEW_LINE>remaining--;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new String(result);<NEW_LINE>}
] result = new char[STRING_LENGTH];
740,325
public static DescribeGatewaySMBUsersResponse unmarshall(DescribeGatewaySMBUsersResponse describeGatewaySMBUsersResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeGatewaySMBUsersResponse.setRequestId(_ctx.stringValue("DescribeGatewaySMBUsersResponse.RequestId"));<NEW_LINE>describeGatewaySMBUsersResponse.setTotalCount(_ctx.integerValue("DescribeGatewaySMBUsersResponse.TotalCount"));<NEW_LINE>describeGatewaySMBUsersResponse.setMessage(_ctx.stringValue("DescribeGatewaySMBUsersResponse.Message"));<NEW_LINE>describeGatewaySMBUsersResponse.setPageSize(_ctx.integerValue("DescribeGatewaySMBUsersResponse.PageSize"));<NEW_LINE>describeGatewaySMBUsersResponse.setPageNumber(_ctx.integerValue("DescribeGatewaySMBUsersResponse.PageNumber"));<NEW_LINE>describeGatewaySMBUsersResponse.setCode(_ctx.stringValue("DescribeGatewaySMBUsersResponse.Code"));<NEW_LINE>describeGatewaySMBUsersResponse.setSuccess<MASK><NEW_LINE>List<User> users = new ArrayList<User>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeGatewaySMBUsersResponse.Users.Length"); i++) {<NEW_LINE>User user = new User();<NEW_LINE>user.setUsername(_ctx.stringValue("DescribeGatewaySMBUsersResponse.Users[" + i + "].Username"));<NEW_LINE>users.add(user);<NEW_LINE>}<NEW_LINE>describeGatewaySMBUsersResponse.setUsers(users);<NEW_LINE>return describeGatewaySMBUsersResponse;<NEW_LINE>}
(_ctx.booleanValue("DescribeGatewaySMBUsersResponse.Success"));
1,050,328
public void loadIcons(IconPack pack) {<NEW_LINE>_pack = pack;<NEW_LINE>_query = null;<NEW_LINE>_icons = new ArrayList<>(_pack.getIcons());<NEW_LINE>_categories.clear();<NEW_LINE>Comparator<IconPack.Icon> iconCategoryComparator = (i1, i2) -> {<NEW_LINE>String c1 = <MASK><NEW_LINE>String c2 = getCategoryString(i2.getCategory());<NEW_LINE>return c1.compareTo(c2);<NEW_LINE>};<NEW_LINE>Collections.sort(_icons, iconCategoryComparator.thenComparing(IconPack.Icon::getName));<NEW_LINE>long categoryCount = _icons.stream().map(IconPack.Icon::getCategory).filter(Objects::nonNull).distinct().count();<NEW_LINE>List<IconPack.Icon> suggested = pack.getSuggestedIcons(_issuer);<NEW_LINE>suggested.add(0, new DummyIcon(_context.getString(R.string.icon_custom)));<NEW_LINE>if (suggested.size() > 0) {<NEW_LINE>CategoryHeader category = new CategoryHeader(_context.getString(R.string.suggested));<NEW_LINE>category.setIsCollapsed(false);<NEW_LINE>category.getIcons().addAll(suggested);<NEW_LINE>_categories.add(category);<NEW_LINE>}<NEW_LINE>CategoryHeader category = null;<NEW_LINE>for (IconPack.Icon icon : _icons) {<NEW_LINE>String iconCategory = getCategoryString(icon.getCategory());<NEW_LINE>if (category == null || !getCategoryString(category.getCategory()).equals(iconCategory)) {<NEW_LINE>boolean collapsed = !(categoryCount == 0 && category == null);<NEW_LINE>category = new CategoryHeader(iconCategory);<NEW_LINE>category.setIsCollapsed(collapsed);<NEW_LINE>_categories.add(category);<NEW_LINE>}<NEW_LINE>category.getIcons().add(icon);<NEW_LINE>}<NEW_LINE>_icons.addAll(0, suggested);<NEW_LINE>updateCategoryPositions();<NEW_LINE>notifyDataSetChanged();<NEW_LINE>}
getCategoryString(i1.getCategory());
1,631,541
public void execute() {<NEW_LINE>if (helpFlag) {<NEW_LINE>String commandUsageInfo = BLauncherCmd.getCommandUsageInfo(SEARCH_COMMAND);<NEW_LINE>outStream.println(commandUsageInfo);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (null != debugPort) {<NEW_LINE>System.setProperty(SYSTEM_PROP_BAL_DEBUG, debugPort);<NEW_LINE>}<NEW_LINE>if (argList == null || argList.isEmpty()) {<NEW_LINE>CommandUtil.printError(this.errStream, "no keyword given", "bal search [<org>|<package>|<text>] ", false);<NEW_LINE>CommandUtil.exitError(this.exitWhenFinish);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (argList.size() > 1) {<NEW_LINE>CommandUtil.printError(this.errStream, "too many arguments", "bal search [<org>|<package>|<text>] ", false);<NEW_LINE>CommandUtil.exitError(this.exitWhenFinish);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String <MASK><NEW_LINE>searchInCentral(searchArgs);<NEW_LINE>if (this.exitWhenFinish) {<NEW_LINE>Runtime.getRuntime().exit(0);<NEW_LINE>}<NEW_LINE>}
searchArgs = argList.get(0);
61,712
public void clearResponses(final SessionLabel sessionLabel, final UserIdentity userIdentity, final ChaiUser theUser, final String userGUID) throws PwmUnrecoverableException {<NEW_LINE>if (userGUID == null || userGUID.length() < 1) {<NEW_LINE>throw new PwmUnrecoverableException(new ErrorInformation<MASK><NEW_LINE>}<NEW_LINE>if (localDB == null) {<NEW_LINE>final String errorMsg = "LocalDB is not available, unable to write user responses";<NEW_LINE>final ErrorInformation errorInformation = new ErrorInformation(PwmError.ERROR_LOCALDB_UNAVAILABLE, errorMsg);<NEW_LINE>throw new PwmUnrecoverableException(errorInformation);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>localDB.remove(LocalDB.DB.RESPONSE_STORAGE, userGUID);<NEW_LINE>LOGGER.info(sessionLabel, () -> "cleared responses for user " + theUser.getEntryDN() + " in local LocalDB");<NEW_LINE>} catch (final LocalDBException e) {<NEW_LINE>final ErrorInformation errorInfo = new ErrorInformation(PwmError.ERROR_CLEARING_RESPONSES, "unexpected LocalDB error clearing responses: " + e.getMessage());<NEW_LINE>throw new PwmUnrecoverableException(errorInfo, e);<NEW_LINE>}<NEW_LINE>}
(PwmError.ERROR_MISSING_GUID, "cannot clear responses to localDB, user does not have a pwmGUID"));
295,932
private void updateState(FeedResponse<T> response, RxDocumentServiceRequest request) {<NEW_LINE>String transformedContinuation = this.applyServerResponseContinuation(response.getContinuationToken(), request);<NEW_LINE>ModelBridgeInternal.setFeedResponseContinuationToken(transformedContinuation, response);<NEW_LINE>if (top != -1) {<NEW_LINE>top -= response.getResults().size();<NEW_LINE>if (top < 0) {<NEW_LINE>// this shouldn't happen<NEW_LINE>// this means backend retrieved more items than requested<NEW_LINE>logger.warn("Azure Cosmos DB BackEnd Service returned more than requested {} items, Context: {}", maxItemCount, this.operationContextTextProvider.get());<NEW_LINE>top = 0;<NEW_LINE>}<NEW_LINE>maxItemCount = Math.min(maxItemCount, top);<NEW_LINE>}<NEW_LINE>shouldFetchMore = // if top == 0 then done<NEW_LINE>shouldFetchMore && // if fullyDrained then done<NEW_LINE>(top != 0) && !this.isFullyDrained(this.isChangeFeed, response);<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("Fetcher state updated: " + "isChangeFeed = {}, continuation token = {}, max item count = {}, should fetch more = {}, Context: {}", isChangeFeed, this.getContinuationForLogging(), maxItemCount, shouldFetchMore, <MASK><NEW_LINE>}<NEW_LINE>}
this.operationContextTextProvider.get());
678,814
public <U extends IAggregableReduceOp<T, Writable>> void combine(U acc) {<NEW_LINE>if (this.getClass().isAssignableFrom(acc.getClass())) {<NEW_LINE>AggregableVariance<T> accu = (AggregableVariance<T>) acc;<NEW_LINE>Long totalCount = count + accu.getCount();<NEW_LINE>Double totalMean = (accu.getMean() * accu.getCount() + mean * count) / totalCount;<NEW_LINE>// the variance of the union is the sum of variances<NEW_LINE>Double variance = variation / (count - 1);<NEW_LINE>Double otherVariance = accu.getVariation() / (accu.getCount() - 1);<NEW_LINE>Double totalVariation = (variance + <MASK><NEW_LINE>count = totalCount;<NEW_LINE>mean = totalMean;<NEW_LINE>variation = variation;<NEW_LINE>} else<NEW_LINE>throw new UnsupportedOperationException("Tried to combine() incompatible " + acc.getClass().getName() + " operator where " + this.getClass().getName() + " expected");<NEW_LINE>}
otherVariance) * (totalCount - 1);
626,239
private static boolean matchHeader(HeaderMatcher headerMatcher, @Nullable String value) {<NEW_LINE>if (headerMatcher.present() != null) {<NEW_LINE>return (value == null) == headerMatcher.present().equals(headerMatcher.inverted());<NEW_LINE>}<NEW_LINE>if (value == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>boolean baseMatch;<NEW_LINE>if (headerMatcher.exactValue() != null) {<NEW_LINE>baseMatch = headerMatcher.exactValue().equals(value);<NEW_LINE>} else if (headerMatcher.safeRegEx() != null) {<NEW_LINE>baseMatch = headerMatcher.<MASK><NEW_LINE>} else if (headerMatcher.range() != null) {<NEW_LINE>long numValue;<NEW_LINE>try {<NEW_LINE>numValue = Long.parseLong(value);<NEW_LINE>baseMatch = numValue >= headerMatcher.range().start() && numValue <= headerMatcher.range().end();<NEW_LINE>} catch (NumberFormatException ignored) {<NEW_LINE>baseMatch = false;<NEW_LINE>}<NEW_LINE>} else if (headerMatcher.prefix() != null) {<NEW_LINE>baseMatch = value.startsWith(headerMatcher.prefix());<NEW_LINE>} else {<NEW_LINE>baseMatch = value.endsWith(headerMatcher.suffix());<NEW_LINE>}<NEW_LINE>return baseMatch != headerMatcher.inverted();<NEW_LINE>}
safeRegEx().matches(value);
1,807,300
public void generateNamespaceNd4j(NamespaceOps namespace, GeneratorConfig config, File directory, String fileName) throws IOException {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("#include <NDArrayFactory.h>\n\n").append("namespace nd4j {\n");<NEW_LINE>append(4, sb, "namespace " + namespace.getName().toLowerCase());<NEW_LINE>List<Op> ops = new ArrayList<>();<NEW_LINE>for (Op o : namespace.getOps()) {<NEW_LINE>if (o.isAbstract())<NEW_LINE>continue;<NEW_LINE>ops.add(o);<NEW_LINE>}<NEW_LINE>// TODO: handle includes<NEW_LINE>for (Op o : ops) {<NEW_LINE>String s = generateFunction(o);<NEW_LINE>sb.append(GenUtil<MASK><NEW_LINE>sb.append("\n");<NEW_LINE>}<NEW_LINE>append(4, sb, "}");<NEW_LINE>sb.append("}");<NEW_LINE>// TODO generate header also<NEW_LINE>String out = sb.toString();<NEW_LINE>File outFile = new File(directory, GenUtil.ensureFirstIsCap(namespace.getName()) + ".cpp");<NEW_LINE>FileUtils.writeStringToFile(outFile, out, StandardCharsets.UTF_8);<NEW_LINE>}
.addIndent(s, 8));
1,086,336
public Flux<ReactiveRedisConnection.CommandResponse<XInfoCommand, StreamInfo.XInfoStream>> xInfo(Publisher<XInfoCommand> publisher) {<NEW_LINE>return execute(publisher, command -> {<NEW_LINE>Assert.notNull(command.getKey(), "Key must not be null!");<NEW_LINE>byte[] k = <MASK><NEW_LINE>Mono<org.redisson.api.StreamInfo<byte[], byte[]>> m = write(k, ByteArrayCodec.INSTANCE, XINFO_STREAM, k);<NEW_LINE>return m.map(i -> {<NEW_LINE>Map<String, Object> res = new HashMap<>();<NEW_LINE>res.put("length", (long) i.getLength());<NEW_LINE>res.put("first-entry", i.getFirstEntry().getData());<NEW_LINE>res.put("last-entry", i.getLastEntry().getData());<NEW_LINE>res.put("radix-tree-keys", i.getRadixTreeKeys());<NEW_LINE>res.put("radix-tree-nodes", i.getRadixTreeNodes());<NEW_LINE>res.put("groups", (long) i.getGroups());<NEW_LINE>res.put("last-generated-id", i.getLastGeneratedId().toString());<NEW_LINE>List<Object> list = res.entrySet().stream().flatMap(e -> Stream.of(e.getKey(), e.getValue())).collect(Collectors.toList());<NEW_LINE>return new ReactiveRedisConnection.CommandResponse<>(command, StreamInfo.XInfoStream.fromList(list));<NEW_LINE>});<NEW_LINE>});<NEW_LINE>}
toByteArray(command.getKey());
1,329,021
boolean canCloseAll() {<NEW_LINE>Program[] programs = programMgr.getAllOpenPrograms();<NEW_LINE>List<Program> saveList = new ArrayList<>();<NEW_LINE>List<Program> lockList = new ArrayList<>();<NEW_LINE>try {<NEW_LINE>for (Program program : programs) {<NEW_LINE>// if (programs[i].isTemporary()) {<NEW_LINE>// continue;<NEW_LINE>// }<NEW_LINE>if (isOnlyToolConsumer(program)) {<NEW_LINE>if (!acquireSaveLock(program, "Close")) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>lockList.add(program);<NEW_LINE>saveList.add(program);<NEW_LINE>} else if (isAnalysisTool(program)) {<NEW_LINE>if (!acquireSaveLock(program, "Close")) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>lockList.add(program);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return saveChangedPrograms(saveList);<NEW_LINE>} finally {<NEW_LINE>Iterator<Program<MASK><NEW_LINE>while (it.hasNext()) {<NEW_LINE>Program p = it.next();<NEW_LINE>p.unlock();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
> it = lockList.iterator();
1,430,459
public ListResolversByFunctionResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListResolversByFunctionResult listResolversByFunctionResult = new ListResolversByFunctionResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return listResolversByFunctionResult;<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("resolvers", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listResolversByFunctionResult.setResolvers(new ListUnmarshaller<Resolver>(ResolverJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("nextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listResolversByFunctionResult.setNextToken(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return listResolversByFunctionResult;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
1,640,581
protected void paintDisplayerBackground(Graphics g, JComponent c) {<NEW_LINE>int tabCount = getDataModel().size();<NEW_LINE>if (0 == tabCount)<NEW_LINE>return;<NEW_LINE>int x = getLayoutModel(<MASK><NEW_LINE>x += getLayoutModel().getW(tabCount - 1) - 5;<NEW_LINE>int y = 0;<NEW_LINE>int width = c.getWidth() - x;<NEW_LINE>int height = c.getHeight();<NEW_LINE>ColorUtil.paintXpTabHeader(ColorUtil.XP_REGULAR_TAB, g, x, 0, width);<NEW_LINE>Color borderColor = borderC;<NEW_LINE>g.setColor(borderColor);<NEW_LINE>g.drawLine(x + width - 1, 3, x + width - 1, height - 2);<NEW_LINE>g.setColor(bottomBorderC);<NEW_LINE>g.drawLine(x, height - 1, x + width - 1, height - 1);<NEW_LINE>}
).getX(tabCount - 1);
1,332,982
// </editor-fold>//GEN-END:initComponents<NEW_LINE>private void btnStackActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_btnStackActionPerformed<NEW_LINE>StringWriter sw = new StringWriter();<NEW_LINE>exception.printStackTrace(new PrintWriter(sw));<NEW_LINE>JPanel pnl = new JPanel();<NEW_LINE>pnl<MASK><NEW_LINE>pnl.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6));<NEW_LINE>JTextArea ta = new JTextArea();<NEW_LINE>ta.setText(sw.toString());<NEW_LINE>ta.setEditable(false);<NEW_LINE>JScrollPane pane = new JScrollPane(ta);<NEW_LINE>pnl.add(pane);<NEW_LINE>pnl.setMaximumSize(new Dimension(600, 300));<NEW_LINE>pnl.setPreferredSize(new Dimension(600, 300));<NEW_LINE>NotifyDescriptor.Message nd = new NotifyDescriptor.Message(pnl);<NEW_LINE>DialogDisplayer.getDefault().notify(nd);<NEW_LINE>}
.setLayout(new BorderLayout());
141,388
public CreateServiceProfileResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateServiceProfileResult createServiceProfileResult = new CreateServiceProfileResult();<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 createServiceProfileResult;<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("Arn", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createServiceProfileResult.setArn(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Id", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createServiceProfileResult.setId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return createServiceProfileResult;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,792,501
private void readRHS(BufferedReader br) throws IOException {<NEW_LINE>br.reset();<NEW_LINE>String line = br.readLine();<NEW_LINE>if (line == null || !line.startsWith(TAG_RHS)) {<NEW_LINE>throw new ParserException("No tag \"RHS\" found");<NEW_LINE>}<NEW_LINE>line = br.readLine();<NEW_LINE>String[] values;<NEW_LINE>while (line != null && !line.startsWith(TAG_RANGES) && !line.startsWith(TAG_BOUNDS) && !line.startsWith(TAG_ENDATA)) {<NEW_LINE>values = Arrays.stream(line.split(" ")).filter(v -> v.length() > 0).toArray(String[]::new);<NEW_LINE>addRhs(values[<MASK><NEW_LINE>if (values.length == 5) {<NEW_LINE>addRhs(values[3], values[4]);<NEW_LINE>}<NEW_LINE>br.mark(CACHING);<NEW_LINE>line = br.readLine();<NEW_LINE>}<NEW_LINE>}
1], values[2]);
288,660
void computeHints(JsHintsProvider.JsRuleContext context, List<Hint> hints, int offset, HintsProvider.HintsManager manager) throws BadLocationException {<NEW_LINE>if (ecmaEditionProjectBelow(context, ECMA6)) {<NEW_LINE>Snapshot snapshot = context.getJsParserResult().getSnapshot();<NEW_LINE>TokenSequence<? extends JsTokenId> ts = LexUtilities.getJsTokenSequence(snapshot, context.lexOffset);<NEW_LINE>OffsetRange returnOffsetRange;<NEW_LINE>if (ts != null) {<NEW_LINE>while (ts.moveNext()) {<NEW_LINE>org.netbeans.api.lexer.Token<? extends JsTokenId> token = LexUtilities.findNextIncluding(ts, ECMA6LIST);<NEW_LINE>if (token != null && token.length() >= 1 && ECMA6LIST.contains(token.id())) {<NEW_LINE>returnOffsetRange = new OffsetRange(ts.offset(), ts.offset() + token.length());<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Ecma6Visitor visitor = new Ecma6Visitor();<NEW_LINE>visitor.process(context, hints);<NEW_LINE>}<NEW_LINE>}
addHint(context, hints, returnOffsetRange);
1,583,462
static void writeAssemblySAMFile(final String outputAssembliesFile, final List<AlignedAssemblyOrExcuse> alignedAssemblyOrExcuseList, final SAMFileHeader header, final SAMFileHeader.SortOrder assemblyAlnSortOrder) {<NEW_LINE>final String sampleId = SVUtils.getSampleId(header);<NEW_LINE>final SAMReadGroupRecord contigAlignmentsReadGroup <MASK><NEW_LINE>contigAlignmentsReadGroup.setSample(sampleId);<NEW_LINE>final SAMFileHeader cleanHeader = new SAMFileHeader(header.getSequenceDictionary());<NEW_LINE>cleanHeader.addReadGroup(contigAlignmentsReadGroup);<NEW_LINE>cleanHeader.setSortOrder(assemblyAlnSortOrder);<NEW_LINE>final SAMRecordComparator samRecordComparator = SVUtils.getSamRecordComparator(assemblyAlnSortOrder);<NEW_LINE>final List<String> refNames = SequenceDictionaryUtils.getContigNamesList(cleanHeader.getSequenceDictionary());<NEW_LINE>final Stream<SAMRecord> samRecordStream = alignedAssemblyOrExcuseList.stream().filter(AlignedAssemblyOrExcuse::isNotFailure).flatMap(aa -> aa.toSAMStreamForAlignmentsOfThisAssembly(cleanHeader, refNames, contigAlignmentsReadGroup)).sorted(samRecordComparator);<NEW_LINE>SVFileUtils.writeSAMFile(outputAssembliesFile, samRecordStream.iterator(), cleanHeader, true);<NEW_LINE>}
= new SAMReadGroupRecord(SVUtils.GATKSV_CONTIG_ALIGNMENTS_READ_GROUP_ID);
721,467
private void executeIteration(int[] rgb, Mask mask, int width, int height) {<NEW_LINE>Mask.MaskIterator iterator = mask.new MaskIterator();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>int pixelIndex = iterator.next();<NEW_LINE>int x = pixelIndex % width;<NEW_LINE>int y = pixelIndex / width;<NEW_LINE>int r = 0<MASK><NEW_LINE>int count = 0;<NEW_LINE>for (int i = 0, n = offsets.length; i < n; i += 2) {<NEW_LINE>int column = x + offsets[i];<NEW_LINE>int row = y + offsets[i + 1];<NEW_LINE>if (column < 0 || column >= width || row < 0 || row >= height) {<NEW_LINE>column = x;<NEW_LINE>row = y;<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>int currentPixelIndex = getPixelIndex(width, column, row);<NEW_LINE>if (!mask.isBlank(currentPixelIndex)) {<NEW_LINE>int argb = rgb[currentPixelIndex];<NEW_LINE>r += red(argb);<NEW_LINE>g += green(argb);<NEW_LINE>b += blue(argb);<NEW_LINE>count++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (count != 0) {<NEW_LINE>rgb[pixelIndex] = argb(0, r / count, g / count, b / count);<NEW_LINE>iterator.markAsInProgress();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>iterator.reset();<NEW_LINE>}
, g = 0, b = 0;
463,397
public void loadProject(URL file) throws SoapUIException {<NEW_LINE>try {<NEW_LINE>UISupport.setHourglassCursor();<NEW_LINE>UrlWsdlLoader loader = new UrlWsdlLoader(file.toString(), this);<NEW_LINE>loader.setUseWorker(false);<NEW_LINE>InputStream inputStream = loader.load();<NEW_LINE>loadProjectFromInputStream(inputStream);<NEW_LINE>log.info("Loaded project from [" + file.toString() + "]");<NEW_LINE>} catch (Exception e) {<NEW_LINE>if (e instanceof XmlException) {<NEW_LINE>XmlException xe = (XmlException) e;<NEW_LINE><MASK><NEW_LINE>if (error != null) {<NEW_LINE>System.err.println("Error at line " + error.getLine() + ", column " + error.getColumn());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (e instanceof RestConversionException) {<NEW_LINE>log.error("Project file needs to be updated manually, please reload the project.");<NEW_LINE>throw new SoapUIException("Failed to load project from file [" + file.toString() + "]", e);<NEW_LINE>}<NEW_LINE>e.printStackTrace();<NEW_LINE>throw new SoapUIException("Failed to load project from file [" + file.toString() + "]", e);<NEW_LINE>} finally {<NEW_LINE>UISupport.resetCursor();<NEW_LINE>}<NEW_LINE>}
XmlError error = xe.getError();
1,627,890
public void updateDeployment(final String host, final Deployment deployment, final String token) throws HostNotFoundException, JobNotDeployedException, TokenVerificationException {<NEW_LINE>log.<MASK><NEW_LINE>final ZooKeeperClient client = provider.get("updateDeployment");<NEW_LINE>final JobId jobId = deployment.getJobId();<NEW_LINE>final Job job = getJob(client, jobId);<NEW_LINE>final Deployment existingDeployment = getDeployment(host, jobId);<NEW_LINE>if (job == null) {<NEW_LINE>throw new JobNotDeployedException(host, jobId);<NEW_LINE>}<NEW_LINE>verifyToken(token, job);<NEW_LINE>assertHostExists(client, host);<NEW_LINE>assertTaskExists(client, host, deployment.getJobId());<NEW_LINE>final String path = Paths.configHostJob(host, jobId);<NEW_LINE>final Task task = new Task(job, deployment.getGoal(), existingDeployment.getDeployerUser(), existingDeployment.getDeployerMaster(), existingDeployment.getDeploymentGroupName());<NEW_LINE>try {<NEW_LINE>client.setData(path, task.toJsonBytes());<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new HeliosRuntimeException("updating deployment " + deployment + " on host " + host + " failed", e);<NEW_LINE>}<NEW_LINE>}
info("updating deployment {}: {}", deployment, host);
291,736
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {<NEW_LINE>for (String beanName : getBeanNames(beanFactory, DataSource.class)) {<NEW_LINE>if (beanName.startsWith(SOFA_TRACER_DATASOURCE)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>BeanDefinition dataSource = getBeanDefinition(beanName, beanFactory);<NEW_LINE>String beanClassName = resolveBeanClassName(dataSource);<NEW_LINE>if (DataSourceUtils.isDruidDataSource(beanClassName)) {<NEW_LINE>createDataSourceProxy(beanFactory, beanName, dataSource, DataSourceUtils.getDruidJdbcUrlKey());<NEW_LINE>} else if (DataSourceUtils.isC3p0DataSource(beanClassName)) {<NEW_LINE>createDataSourceProxy(beanFactory, beanName, dataSource, DataSourceUtils.getC3p0JdbcUrlKey());<NEW_LINE>} else if (DataSourceUtils.isDbcpDataSource(beanClassName)) {<NEW_LINE>createDataSourceProxy(beanFactory, beanName, dataSource, DataSourceUtils.getDbcpJdbcUrlKey());<NEW_LINE>} else if (DataSourceUtils.isTomcatDataSource(beanClassName)) {<NEW_LINE>createDataSourceProxy(beanFactory, beanName, dataSource, DataSourceUtils.getTomcatJdbcUrlKey());<NEW_LINE>} else if (DataSourceUtils.isHikariDataSource(beanClassName)) {<NEW_LINE>createDataSourceProxy(beanFactory, beanName, <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
dataSource, DataSourceUtils.getHikariJdbcUrlKey());
127,576
public DescribeAnomalyDetectorsResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeAnomalyDetectorsResult describeAnomalyDetectorsResult = new DescribeAnomalyDetectorsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 2;<NEW_LINE>while (true) {<NEW_LINE>XMLEvent xmlEvent = context.nextEvent();<NEW_LINE>if (xmlEvent.isEndDocument())<NEW_LINE>return describeAnomalyDetectorsResult;<NEW_LINE>if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {<NEW_LINE>if (context.testExpression("AnomalyDetectors", targetDepth)) {<NEW_LINE>describeAnomalyDetectorsResult.withAnomalyDetectors(<MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("AnomalyDetectors/member", targetDepth)) {<NEW_LINE>describeAnomalyDetectorsResult.withAnomalyDetectors(AnomalyDetectorStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("NextToken", targetDepth)) {<NEW_LINE>describeAnomalyDetectorsResult.setNextToken(StringStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>} else if (xmlEvent.isEndElement()) {<NEW_LINE>if (context.getCurrentDepth() < originalDepth) {<NEW_LINE>return describeAnomalyDetectorsResult;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
new ArrayList<AnomalyDetector>());
1,019,229
public static void down(GrayF32 input, GrayF32 output) {<NEW_LINE>int maxY = input.height - input.height % 2;<NEW_LINE>int maxX = input.width - input.width % 2;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, maxY, 2, y -> {<NEW_LINE>for (int y = 0; y < maxY; y += 2) {<NEW_LINE>int indexOut = output.startIndex + (y / 2) * output.stride;<NEW_LINE>int indexIn0 = input.startIndex + y * input.stride;<NEW_LINE>int indexIn1 = indexIn0 + input.stride;<NEW_LINE>for (int x = 0; x < maxX; x += 2) {<NEW_LINE>float total <MASK><NEW_LINE>total += input.data[indexIn0++];<NEW_LINE>total += input.data[indexIn1++];<NEW_LINE>total += input.data[indexIn1++];<NEW_LINE>output.data[indexOut++] = (total / 4);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>if (maxX != input.width) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, maxY, 2, y -> {<NEW_LINE>for (int y = 0; y < maxY; y += 2) {<NEW_LINE>int indexOut = output.startIndex + (y / 2) * output.stride + output.width - 1;<NEW_LINE>int indexIn0 = input.startIndex + y * input.stride + maxX;<NEW_LINE>int indexIn1 = indexIn0 + input.stride;<NEW_LINE>float total = input.data[indexIn0];<NEW_LINE>total += input.data[indexIn1];<NEW_LINE>output.data[indexOut] = (total / 2);<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}<NEW_LINE>if (maxY != input.height) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, maxX, 2, x -> {<NEW_LINE>for (int x = 0; x < maxX; x += 2) {<NEW_LINE>int indexOut = output.startIndex + (output.height - 1) * output.stride + x / 2;<NEW_LINE>int indexIn0 = input.startIndex + (input.height - 1) * input.stride + x;<NEW_LINE>float total = input.data[indexIn0++];<NEW_LINE>total += input.data[indexIn0++];<NEW_LINE>output.data[indexOut++] = (total / 2);<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}<NEW_LINE>if (maxX != input.width && maxY != input.height) {<NEW_LINE>int indexOut = output.startIndex + (output.height - 1) * output.stride + output.width - 1;<NEW_LINE>int indexIn = input.startIndex + (input.height - 1) * input.stride + input.width - 1;<NEW_LINE>output.data[indexOut] = input.data[indexIn];<NEW_LINE>}<NEW_LINE>}
= input.data[indexIn0++];
1,443,255
private void cancelMouseMove() {<NEW_LINE>mouseMoveCanceled = true;<NEW_LINE>// reset and remove everything related to the event handling<NEW_LINE>Event.releaseCapture(getElement());<NEW_LINE>setFocus(false);<NEW_LINE>if (moveRegistration != null) {<NEW_LINE>moveRegistration.removeHandler();<NEW_LINE>moveRegistration = null;<NEW_LINE>}<NEW_LINE>mouseMoveStarted = false;<NEW_LINE>removeGlobalResizeStyle();<NEW_LINE>Style s <MASK><NEW_LINE>s.setZIndex(1);<NEW_LINE>// reset the position of the event<NEW_LINE>int dateCellWidth = getDateCellWidth();<NEW_LINE>int dayOffset = startXrelative / dateCellWidth;<NEW_LINE>s.clearLeft();<NEW_LINE>calendarEvent.setStartTime(startDatetimeFrom);<NEW_LINE>calendarEvent.setEndTime(startDatetimeTo);<NEW_LINE>long startFromMinutes = (startDatetimeFrom.getHours() * 60) + startDatetimeFrom.getMinutes();<NEW_LINE>long range = calendarEvent.getRangeInMinutes();<NEW_LINE>startFromMinutes = calculateStartFromMinute(startFromMinutes, startDatetimeFrom, startDatetimeTo, dayOffset);<NEW_LINE>if (startFromMinutes < 0) {<NEW_LINE>range += startFromMinutes;<NEW_LINE>}<NEW_LINE>updatePosition(startFromMinutes, range);<NEW_LINE>startY = -1;<NEW_LINE>startX = -1;<NEW_LINE>// to reset the event width<NEW_LINE>((DateCell) getParent()).recalculateEventWidths();<NEW_LINE>}
= getElement().getStyle();
613,297
private ImportedIdSimple createImportedScalar(BeanPropertyAssoc<?> owner, TableJoinColumn col, BeanProperty[] props, BeanProperty[] others) {<NEW_LINE>String matchColumn = col.getForeignDbColumn();<NEW_LINE>String localColumn = col.getLocalDbColumn();<NEW_LINE>String localSqlFormula = col.getLocalSqlFormula();<NEW_LINE>boolean insertable = col.isInsertable();<NEW_LINE>boolean updateable = col.isUpdateable();<NEW_LINE>for (int j = 0; j < props.length; j++) {<NEW_LINE>if (props[j].dbColumn().equalsIgnoreCase(matchColumn)) {<NEW_LINE>return new ImportedIdSimple(owner, localColumn, localSqlFormula, props[j], j, insertable, updateable);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int j = 0; j < others.length; j++) {<NEW_LINE>if (others[j].dbColumn().equalsIgnoreCase(matchColumn)) {<NEW_LINE>return new ImportedIdSimple(owner, localColumn, localSqlFormula, others[j], j + <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>String msg = // in table["+searchTable+"]?"<NEW_LINE>"Error with the Join on [" + fullName() + "]. Could not find the local match for [" + matchColumn + "] " + " Perhaps an error in a @JoinColumn";<NEW_LINE>throw new PersistenceException(msg);<NEW_LINE>}
props.length, insertable, updateable);
1,286,225
public SortedMap<Integer, Map<String, String>> read(BufferedReader bRdr) throws IOException {<NEW_LINE>SortedMap<Integer, Map<String, String>> map = new TreeMap<>();<NEW_LINE>Map<String, String> fields = new HashMap<>();<NEW_LINE>String number = "";<NEW_LINE>Matcher m;<NEW_LINE>String line;<NEW_LINE>while ((line = bRdr.readLine()) != null) {<NEW_LINE>line = line.trim();<NEW_LINE>if (line.startsWith("<num>") && line.endsWith("</num>")) {<NEW_LINE>m = NUM_PATTERN.matcher(line);<NEW_LINE>if (!m.find()) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>number = m.group(1);<NEW_LINE>}<NEW_LINE>if (line.startsWith("<query>") && line.endsWith("</query>") || line.startsWith("<title>") && line.endsWith("</title>")) {<NEW_LINE>m = TITLE_PATTERN.matcher(line);<NEW_LINE>if (!m.find()) {<NEW_LINE>m = TITLE_PATTERN2.matcher(line);<NEW_LINE>if (!m.find()) {<NEW_LINE>throw new IOException("Error parsing " + line);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>fields.put("title", m.group(1));<NEW_LINE>}<NEW_LINE>if (line.startsWith("<querytweettime>") && line.endsWith("</querytweettime>")) {<NEW_LINE>m = TWEETTIME_PATTERN.matcher(line);<NEW_LINE>if (!m.find()) {<NEW_LINE>throw new IOException("Error parsing " + line);<NEW_LINE>}<NEW_LINE>fields.put("time", m.group(1));<NEW_LINE>}<NEW_LINE>if (line.startsWith("</top>")) {<NEW_LINE>map.put(Integer.valueOf(number), fields);<NEW_LINE>fields = new HashMap<>();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return map;<NEW_LINE>}
throw new IOException("Error parsing " + line);
568,505
public void process(MessageTree tree) {<NEW_LINE>String domain = tree.getDomain();<NEW_LINE>MatrixReport report = m_reportManager.getHourlyReport(getStartTime(), domain, true);<NEW_LINE>Message message = tree.getMessage();<NEW_LINE>if (message instanceof Transaction) {<NEW_LINE>String messageType = message.getType();<NEW_LINE>if (messageType.equals("URL") || messageType.equals("Service") || messageType.equals("PigeonService")) {<NEW_LINE>Matrix matrix = report.<MASK><NEW_LINE>matrix.setType(message.getType());<NEW_LINE>matrix.setName(message.getName());<NEW_LINE>long duration = ((Transaction) message).getDurationInMicros();<NEW_LINE>matrix.incCount();<NEW_LINE>matrix.setTotalTime(matrix.getTotalTime() + duration);<NEW_LINE>Map<String, Ratio> ratios = new HashMap<String, Ratio>();<NEW_LINE>ratios.put("Call", new Ratio());<NEW_LINE>ratios.put("SQL", new Ratio());<NEW_LINE>ratios.put("Cache", new Ratio());<NEW_LINE>processTransaction(tree, (Transaction) message, ratios);<NEW_LINE>for (Entry<String, Ratio> entry : ratios.entrySet()) {<NEW_LINE>String type = entry.getKey();<NEW_LINE>Ratio ratio = entry.getValue();<NEW_LINE>int count = ratio.getTotalCount();<NEW_LINE>long time = ratio.getTotalTime();<NEW_LINE>Ratio real = matrix.findOrCreateRatio(type);<NEW_LINE>if (real.getMin() > count || real.getMin() == 0) {<NEW_LINE>real.setMin(count);<NEW_LINE>}<NEW_LINE>if (real.getMax() < count) {<NEW_LINE>real.setMax(count);<NEW_LINE>real.setUrl(tree.getMessageId());<NEW_LINE>}<NEW_LINE>real.setTotalCount(real.getTotalCount() + count);<NEW_LINE>real.setTotalTime(real.getTotalTime() + time);<NEW_LINE>}<NEW_LINE>if (matrix.getUrl() == null) {<NEW_LINE>matrix.setUrl(tree.getMessageId());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
findOrCreateMatrix(message.getName());
35,165
/*<NEW_LINE>* Resolve the ID into a collection and check to see if its harvesting options are set. If so, return<NEW_LINE>* the collection, if not, bail out.<NEW_LINE>*/<NEW_LINE>private Collection resolveCollection(Context context, String collectionID) {<NEW_LINE>DSpaceObject dso;<NEW_LINE>Collection targetCollection = null;<NEW_LINE>try {<NEW_LINE>// is the ID a handle?<NEW_LINE>if (collectionID != null) {<NEW_LINE>if (collectionID.indexOf('/') != -1) {<NEW_LINE>// string has a / so it must be a handle - try and resolve it<NEW_LINE>dso = HandleServiceFactory.getInstance().getHandleService().resolveToObject(context, collectionID);<NEW_LINE>// resolved, now make sure it's a collection<NEW_LINE>if (dso == null || dso.getType() != Constants.COLLECTION) {<NEW_LINE>targetCollection = null;<NEW_LINE>} else {<NEW_LINE>targetCollection = (Collection) dso;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// not a handle, try and treat it as an collection database UUID<NEW_LINE>handler.logInfo("Looking up by UUID: " + <MASK><NEW_LINE>targetCollection = collectionService.find(context, UUID.fromString(collectionID));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// was the collection valid?<NEW_LINE>if (targetCollection == null) {<NEW_LINE>handler.logError("Cannot resolve " + collectionID + " to collection");<NEW_LINE>throw new UnsupportedOperationException("Cannot resolve " + collectionID + " to collection");<NEW_LINE>}<NEW_LINE>} catch (SQLException se) {<NEW_LINE>se.printStackTrace();<NEW_LINE>}<NEW_LINE>return targetCollection;<NEW_LINE>}
collectionID + ", " + "in context: " + context);
337,513
public <B extends BlockStateHolder<B>> void sendFakeBlock(BlockVector3 pos, B block) {<NEW_LINE>Location loc = new Location(player.getWorld(), pos.getX(), pos.getY(<MASK><NEW_LINE>if (block == null) {<NEW_LINE>player.sendBlockChange(loc, player.getWorld().getBlockAt(loc).getBlockData());<NEW_LINE>} else {<NEW_LINE>player.sendBlockChange(loc, BukkitAdapter.adapt(block));<NEW_LINE>BukkitImplAdapter adapter = WorldEditPlugin.getInstance().getBukkitImplAdapter();<NEW_LINE>if (adapter != null) {<NEW_LINE>if (block.getBlockType() == BlockTypes.STRUCTURE_BLOCK && block instanceof BaseBlock) {<NEW_LINE>CompoundBinaryTag nbt = ((BaseBlock) block).getNbt();<NEW_LINE>if (nbt != null) {<NEW_LINE>adapter.sendFakeNBT(player, pos, nbt);<NEW_LINE>adapter.sendFakeOP(player);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
), pos.getZ());
720,236
public BufferedImage filter(BufferedImage src, BufferedImage dst) {<NEW_LINE>final int width = src.getWidth();<NEW_LINE>final int height = src.getHeight();<NEW_LINE>final BufferedImage image;<NEW_LINE>if (dst == null) {<NEW_LINE>image = createCompatibleDestImage(src, null);<NEW_LINE>} else {<NEW_LINE>image = dst;<NEW_LINE>}<NEW_LINE>final int[] srcPixels = new int[width * height];<NEW_LINE>final int[] dstPixels <MASK><NEW_LINE>getPixels(src, 0, 0, width, height, srcPixels);<NEW_LINE>// horizontal pass<NEW_LINE>blur(srcPixels, dstPixels, width, height, radius);<NEW_LINE>// vertical pass<NEW_LINE>blur(dstPixels, srcPixels, height, width, radius);<NEW_LINE>// the result is now stored in srcPixels due to the 2nd pass<NEW_LINE>setPixels(image, 0, 0, width, height, srcPixels);<NEW_LINE>return image;<NEW_LINE>}
= new int[width * height];
1,303,335
private synchronized void sendSessionAccept(final Set<Media> media, final SessionDescription offer, final List<PeerConnection.IceServer> iceServers) {<NEW_LINE>if (isTerminated()) {<NEW_LINE>Log.w(Config.LOGTAG, id.account.getJid().asBareJid() + ": ICE servers got discovered when session was already terminated. nothing to do.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>setupWebRTC(media, iceServers);<NEW_LINE>} catch (final WebRTCWrapper.InitializationException e) {<NEW_LINE>Log.d(Config.LOGTAG, id.account.getJid(<MASK><NEW_LINE>webRTCWrapper.close();<NEW_LINE>sendSessionTerminate(Reason.FAILED_APPLICATION);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final org.webrtc.SessionDescription sdp = new org.webrtc.SessionDescription(org.webrtc.SessionDescription.Type.OFFER, offer.toString());<NEW_LINE>try {<NEW_LINE>this.webRTCWrapper.setRemoteDescription(sdp).get();<NEW_LINE>addIceCandidatesFromBlackLog();<NEW_LINE>org.webrtc.SessionDescription webRTCSessionDescription = this.webRTCWrapper.setLocalDescription().get();<NEW_LINE>prepareSessionAccept(webRTCSessionDescription);<NEW_LINE>} catch (final Exception e) {<NEW_LINE>failureToAcceptSession(e);<NEW_LINE>}<NEW_LINE>}
).asBareJid() + ": unable to initialize WebRTC");
1,101,040
public CredentialModel createCredential(RealmModel realm, String userId, CredentialModel cred) {<NEW_LINE>createIndex(realm, userId);<NEW_LINE>FederatedUserCredentialEntity entity = new FederatedUserCredentialEntity();<NEW_LINE>String id = cred.getId() == null ? KeycloakModelUtils.generateId() : cred.getId();<NEW_LINE>entity.setId(id);<NEW_LINE>entity.setCreatedDate(cred.getCreatedDate());<NEW_LINE>entity.<MASK><NEW_LINE>entity.setCredentialData(cred.getCredentialData());<NEW_LINE>entity.setSecretData(cred.getSecretData());<NEW_LINE>entity.setUserLabel(cred.getUserLabel());<NEW_LINE>entity.setUserId(userId);<NEW_LINE>entity.setRealmId(realm.getId());<NEW_LINE>entity.setStorageProviderId(new StorageId(userId).getProviderId());<NEW_LINE>// add in linkedlist to last position<NEW_LINE>List<FederatedUserCredentialEntity> credentials = getStoredCredentialEntitiesStream(userId).collect(Collectors.toList());<NEW_LINE>int priority = credentials.isEmpty() ? JpaUserCredentialStore.PRIORITY_DIFFERENCE : credentials.get(credentials.size() - 1).getPriority() + JpaUserCredentialStore.PRIORITY_DIFFERENCE;<NEW_LINE>entity.setPriority(priority);<NEW_LINE>em.persist(entity);<NEW_LINE>return toModel(entity);<NEW_LINE>}
setType(cred.getType());
995,407
public void run() {<NEW_LINE>peers_changed = false;<NEW_LINE>GlobalManager gm = CoreFactory.getSingleton().getGlobalManager();<NEW_LINE>swarm_peers = tv.getDataSources();<NEW_LINE>final Map<PEPeerManager, int[]> done_pms = new HashMap<>();<NEW_LINE>List<DownloadManager> dms = new ArrayList<>();<NEW_LINE>for (PEPeer peer : swarm_peers) {<NEW_LINE>PEPeerManager pm = peer.getManager();<NEW_LINE>int[] count = done_pms.get(pm);<NEW_LINE>if (count == null) {<NEW_LINE>done_pms.put(pm, new int[] { 1 });<NEW_LINE>byte[] hash = pm.getHash();<NEW_LINE>DownloadManager dm = gm.getDownloadManager(new HashWrapper(hash));<NEW_LINE>if (dm != null) {<NEW_LINE>dms.add(dm);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>count[0]++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Collections.sort(dms, new Comparator<DownloadManager>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public int compare(DownloadManager o1, DownloadManager o2) {<NEW_LINE><MASK><NEW_LINE>PEPeerManager pm2 = o2.getPeerManager();<NEW_LINE>int[] c1 = done_pms.get(pm1);<NEW_LINE>int[] c2 = done_pms.get(pm2);<NEW_LINE>int n1 = c1 == null ? 0 : c1[0];<NEW_LINE>int n2 = c2 == null ? 0 : c2[0];<NEW_LINE>return (n2 - n1);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>swarm_view.dataSourceChanged(dms.toArray(new DownloadManager[dms.size()]));<NEW_LINE>}
PEPeerManager pm1 = o1.getPeerManager();
822,844
public static ItemStack create(Type type, OrientedContraptionEntity entity) {<NEW_LINE>ItemStack stack = ItemStack.EMPTY;<NEW_LINE>switch(type) {<NEW_LINE>case RIDEABLE:<NEW_LINE>stack = AllItems.MINECART_CONTRAPTION.asStack();<NEW_LINE>break;<NEW_LINE>case FURNACE:<NEW_LINE>stack = AllItems.FURNACE_MINECART_CONTRAPTION.asStack();<NEW_LINE>break;<NEW_LINE>case CHEST:<NEW_LINE>stack = AllItems.CHEST_MINECART_CONTRAPTION.asStack();<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (stack.isEmpty())<NEW_LINE>return stack;<NEW_LINE>CompoundTag tag = entity.getContraption().writeNBT(false);<NEW_LINE>tag.remove("UUID");<NEW_LINE>tag.remove("Pos");<NEW_LINE>tag.remove("Motion");<NEW_LINE>NBTHelper.writeEnum(tag, "InitialOrientation", entity.getInitialOrientation());<NEW_LINE>stack.getOrCreateTag(<MASK><NEW_LINE>return stack;<NEW_LINE>}
).put("Contraption", tag);
1,768,628
private void checkNotClosed() throws SIConnectionUnavailableException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "checkNotClosed");<NEW_LINE>// Synchronize on the closed object to prevent it being changed while we check it.<NEW_LINE>synchronized (this) {<NEW_LINE>if (_closed) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.<MASK><NEW_LINE>SIMPConnectionUnavailableException e = new SIMPConnectionUnavailableException(// OBJECT_CLOSED_ERROR_CWSIP0091<NEW_LINE>nls_cwsik.// OBJECT_CLOSED_ERROR_CWSIP0091<NEW_LINE>getFormattedMessage("DELIVERY_ERROR_SIRC_22", new Object[] { _messageProcessor.getMessagingEngineName() }, null));<NEW_LINE>e.setExceptionReason(SIRCConstants.SIRC0022_OBJECT_CLOSED_ERROR);<NEW_LINE>e.setExceptionInserts(new String[] { _messageProcessor.getMessagingEngineName() });<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(tc, "checkNotClosed");<NEW_LINE>}
exit(tc, "checkNotClosed", "Connection Closed exception");
1,145,450
private static void initAndCleanUp(Options options) {<NEW_LINE>boolean mustDisableShowTouchesOnCleanUp = false;<NEW_LINE>int restoreStayOn = -1;<NEW_LINE>if (options.getShowTouches() || options.getStayAwake()) {<NEW_LINE><MASK><NEW_LINE>if (options.getShowTouches()) {<NEW_LINE>try {<NEW_LINE>String oldValue = settings.getAndPutValue(Settings.TABLE_SYSTEM, "show_touches", "1");<NEW_LINE>// If "show touches" was disabled, it must be disabled back on clean up<NEW_LINE>mustDisableShowTouchesOnCleanUp = !"1".equals(oldValue);<NEW_LINE>} catch (SettingsException e) {<NEW_LINE>Ln.e("Could not change \"show_touches\"", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (options.getStayAwake()) {<NEW_LINE>int stayOn = BatteryManager.BATTERY_PLUGGED_AC | BatteryManager.BATTERY_PLUGGED_USB | BatteryManager.BATTERY_PLUGGED_WIRELESS;<NEW_LINE>try {<NEW_LINE>String oldValue = settings.getAndPutValue(Settings.TABLE_GLOBAL, "stay_on_while_plugged_in", String.valueOf(stayOn));<NEW_LINE>try {<NEW_LINE>restoreStayOn = Integer.parseInt(oldValue);<NEW_LINE>if (restoreStayOn == stayOn) {<NEW_LINE>// No need to restore<NEW_LINE>restoreStayOn = -1;<NEW_LINE>}<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>restoreStayOn = 0;<NEW_LINE>}<NEW_LINE>} catch (SettingsException e) {<NEW_LINE>Ln.e("Could not change \"stay_on_while_plugged_in\"", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>CleanUp.configure(options.getDisplayId(), restoreStayOn, mustDisableShowTouchesOnCleanUp, true, options.getPowerOffScreenOnClose());<NEW_LINE>} catch (IOException e) {<NEW_LINE>Ln.e("Could not configure cleanup", e);<NEW_LINE>}<NEW_LINE>}
Settings settings = Device.getSettings();
823,294
private static void addRequires(FileObject moduleInfo, List<String> newModules) {<NEW_LINE>final JavaSource src = JavaSource.forFileObject(moduleInfo);<NEW_LINE>if (src == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Set<String> declaredModuleNames = getDeclaredModules(src);<NEW_LINE>Set<String> requiredModuleNames = new LinkedHashSet<>();<NEW_LINE>for (String name : newModules) {<NEW_LINE>if (name != null && !declaredModuleNames.contains(name)) {<NEW_LINE>requiredModuleNames.add(name);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>log("To be addded modules:", requiredModuleNames);<NEW_LINE>if (!requiredModuleNames.isEmpty()) {<NEW_LINE>final Set<String> mNames = requiredModuleNames;<NEW_LINE>try {<NEW_LINE>src.runModificationTask((WorkingCopy copy) -> {<NEW_LINE>copy.toPhase(JavaSource.Phase.RESOLVED);<NEW_LINE><MASK><NEW_LINE>ModuleTree modle = (ModuleTree) copy.getCompilationUnit().getTypeDecls().get(0);<NEW_LINE>ModuleTree newModle = modle;<NEW_LINE>for (String mName : mNames) {<NEW_LINE>newModle = tm.addModuleDirective(newModle, tm.Requires(false, false, tm.QualIdent(mName)));<NEW_LINE>}<NEW_LINE>copy.rewrite(modle, newModle);<NEW_LINE>}).commit();<NEW_LINE>} catch (IOException ex) {<NEW_LINE>LOG.log(Level.WARNING, null, ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
TreeMaker tm = copy.getTreeMaker();
1,170,634
private void createDebugTarget(Document script) {<NEW_LINE>Element target = script.createElement("target");<NEW_LINE>// NOI18N<NEW_LINE>target.setAttribute("name", DEBUG_TARGET);<NEW_LINE>// NOI18N<NEW_LINE>target.setAttribute("depends", INIT_TARGET);<NEW_LINE>// NOI18N<NEW_LINE>target.setAttribute("if", "netbeans.home");<NEW_LINE>// NOI18N<NEW_LINE>Element nbjpdaconnect = script.createElement("nbjpdaconnect");<NEW_LINE>// NOI18N<NEW_LINE>nbjpdaconnect.setAttribute("name", "${" + WebFreeformProperties.JPDA_SESSION_NAME + "}");<NEW_LINE>// NOI18N<NEW_LINE>nbjpdaconnect.setAttribute("host", "${" + WebFreeformProperties.JPDA_HOST + "}");<NEW_LINE>// NOI18N<NEW_LINE>nbjpdaconnect.setAttribute("address", "${" + WebFreeformProperties.JPDA_ADDRESS + "}");<NEW_LINE>// NOI18N<NEW_LINE>nbjpdaconnect.setAttribute("transport", "${" + WebFreeformProperties.JPDA_TRANSPORT + "}");<NEW_LINE>// NOI18N<NEW_LINE>Element <MASK><NEW_LINE>// NOI18N<NEW_LINE>Element path = script.createElement("path");<NEW_LINE>// NOI18N<NEW_LINE>path.setAttribute("path", "${debug.sourcepath}");<NEW_LINE>sourcepath.appendChild(path);<NEW_LINE>nbjpdaconnect.appendChild(sourcepath);<NEW_LINE>target.appendChild(nbjpdaconnect);<NEW_LINE>// NOI18N<NEW_LINE>Element antcall = script.createElement("antcall");<NEW_LINE>// NOI18N<NEW_LINE>antcall.setAttribute("target", DISPLAY_BROWSER);<NEW_LINE>target.appendChild(antcall);<NEW_LINE>script.getDocumentElement().appendChild(target);<NEW_LINE>}
sourcepath = script.createElement("sourcepath");
282,380
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {<NEW_LINE>// listener implementation<NEW_LINE>// Set new summary, when a preference value changes<NEW_LINE>if (key.equals("prefs_displaycategory")) {<NEW_LINE>mDisplayCategoryPreference.setSummary(mDisplayCategoryPreference.getEntry().toString());<NEW_LINE>}<NEW_LINE>if (key.equals("prefs_vectorgraphicsstyle")) {<NEW_LINE>mGraphicsStylePreference.setSummary(mGraphicsStylePreference.getEntry().toString());<NEW_LINE>}<NEW_LINE>if (key.equals("prefs_vectorboundarystyle")) {<NEW_LINE>mBoundaryStylePreference.setSummary(mBoundaryStylePreference.getEntry().toString());<NEW_LINE>}<NEW_LINE>if (key.equals("prefs_vectorchartcolors")) {<NEW_LINE>mColorsPreference.setSummary(mColorsPreference.getEntry().toString());<NEW_LINE>}<NEW_LINE>if (key.equals("prefs_shallowdepth")) {<NEW_LINE>mShallowPreference.setSummary(mShallowPreference.getText());<NEW_LINE>}<NEW_LINE>if (key.equals("prefs_safetydepth")) {<NEW_LINE>mSafetyPreference.setSummary(mSafetyPreference.getText());<NEW_LINE>}<NEW_LINE>if (key.equals("prefs_deepdepth")) {<NEW_LINE>mDeepPreference.<MASK><NEW_LINE>}<NEW_LINE>}
setSummary(mDeepPreference.getText());
1,786,074
public static void queryData(Dataset dataset) {<NEW_LINE>log.info("START");<NEW_LINE>long startTime = System.nanoTime();<NEW_LINE>String pre = StrUtils.strjoinNL("PREFIX : <http://example/>", "PREFIX text: <http://jena.apache.org/text#>", "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>");<NEW_LINE>String qs = StrUtils.strjoinNL("SELECT * ", " { ?s text:query (rdfs:label 'X1') ;", " rdfs:label ?label", " }");<NEW_LINE>dataset.begin(ReadWrite.READ);<NEW_LINE>try {<NEW_LINE>Query q = QueryFactory.create(pre + "\n" + qs);<NEW_LINE>QueryExecution qexec = <MASK><NEW_LINE>QueryExecUtils.executeQuery(q, qexec);<NEW_LINE>} finally {<NEW_LINE>dataset.end();<NEW_LINE>}<NEW_LINE>long finishTime = System.nanoTime();<NEW_LINE>double time = (finishTime - startTime) / 1.0e6;<NEW_LINE>log.info(String.format("FINISH - %.2fms", time));<NEW_LINE>}
QueryExecutionFactory.create(q, dataset);
1,382,662
private String random128BitHex() {<NEW_LINE>try {<NEW_LINE>MessageDigest md = MessageDigest.getInstance("SHA-256");<NEW_LINE>ByteBuffer b = ByteBuffer.allocate(52);<NEW_LINE>b.putInt(getUniqueId());<NEW_LINE>b.putInt(this.hashCode());<NEW_LINE>b.<MASK><NEW_LINE>b.putLong(System.nanoTime());<NEW_LINE>b.putLong(ServerTime.currentTimeMillis());<NEW_LINE>b.putLong(System.currentTimeMillis());<NEW_LINE>b.putLong(SystemClock.uptimeMillis());<NEW_LINE>b.putLong(SystemClock.elapsedRealtime());<NEW_LINE>byte[] data = md.digest(b.array());<NEW_LINE>return String.format("%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7], data[8], data[9], data[10], data[11], data[12], data[13], data[14], data[15]);<NEW_LINE>} catch (NoSuchAlgorithmException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>return "";<NEW_LINE>}
putInt(md.hashCode());
779,581
public long findImageBase() {<NEW_LINE>// FIXME! This needs to be consistent with the getImageBase() method<NEW_LINE>// which currently considers prelink.<NEW_LINE>long minBase = -1;<NEW_LINE>int n = <MASK><NEW_LINE>for (int i = 0; i < n; ++i) {<NEW_LINE>long index = e_phoff + (i * e_phentsize);<NEW_LINE>if (!providerContainsRegion(index, e_phentsize)) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>reader.setPointerIndex(index);<NEW_LINE>try {<NEW_LINE>int headerType = reader.peekNextInt();<NEW_LINE>if (headerType == ElfProgramHeaderConstants.PT_LOAD) {<NEW_LINE>ElfProgramHeader header = new ElfProgramHeader(reader, this);<NEW_LINE>minBase = getMinBase(header.getVirtualAddress(), minBase);<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>// skip<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return minBase == -1 ? 0 : minBase;<NEW_LINE>}
Math.min(e_phnum, MAX_HEADERS_TO_CHECK_FOR_IMAGEBASE);
1,053,863
public String format(LoggingEvent event) {<NEW_LINE>Object obj = event.getMessage();<NEW_LINE>routingKey = null;<NEW_LINE>if (obj instanceof Map) {<NEW_LINE>Map map = (Map) event.getMessage();<NEW_LINE>DateTime now = new DateTime();<NEW_LINE>map.put("ts", now.getMillis());<NEW_LINE>map.put("datetime", fmt.print(now));<NEW_LINE>map.put("logLevel", event.<MASK><NEW_LINE>map.put("class", event.getLoggerName());<NEW_LINE>routingKey = (String) map.get(TagKey.ROUTING_KEY);<NEW_LINE>// Extract exceptions<NEW_LINE>String[] s = event.getThrowableStrRep();<NEW_LINE>if (s != null && s.length > 0) {<NEW_LINE>map.put("Exception", s);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>return jsonMapper.writeValueAsString(map);<NEW_LINE>} catch (JsonProcessingException e) {<NEW_LINE>jsonParsingError.incrementAndGet();<NEW_LINE>return stringFormatter.format(event);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>jsonParsingError.incrementAndGet();<NEW_LINE>return stringFormatter.format(event);<NEW_LINE>}<NEW_LINE>}
getLevel().toString());
1,686,421
public static DescribePerDateDataResponse unmarshall(DescribePerDateDataResponse describePerDateDataResponse, UnmarshallerContext context) {<NEW_LINE>describePerDateDataResponse.setRequestId(context.stringValue("DescribePerDateDataResponse.RequestId"));<NEW_LINE>List<DataViewItem> dataView = new ArrayList<DataViewItem>();<NEW_LINE>for (int i = 0; i < context.lengthValue("DescribePerDateDataResponse.DataView.Length"); i++) {<NEW_LINE>DataViewItem dataViewItem = new DataViewItem();<NEW_LINE>dataViewItem.setDataTime(context.stringValue("DescribePerDateDataResponse.DataView[" + i + "].DataTime"));<NEW_LINE>dataViewItem.setCallTimes(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].CallTimes"));<NEW_LINE>dataViewItem.setTotalHit(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].TotalHit"));<NEW_LINE>dataViewItem.setHitRate(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].HitRate"));<NEW_LINE>dataViewItem.setIsGreyPhone(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsGreyPhone"));<NEW_LINE>dataViewItem.setIsBlackPhone(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsBlackPhone"));<NEW_LINE>dataViewItem.setIsVirtualOperator(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsVirtualOperator"));<NEW_LINE>dataViewItem.setIsOpenCommonPort1d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsOpenCommonPort1d"));<NEW_LINE>dataViewItem.setIsOpenCommonPort7d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsOpenCommonPort7d"));<NEW_LINE>dataViewItem.setIsOpenCommonPort30d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsOpenCommonPort30d"));<NEW_LINE>dataViewItem.setIsCheatFlow1d(context.longValue<MASK><NEW_LINE>dataViewItem.setIsCheatFlow7d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsCheatFlow7d"));<NEW_LINE>dataViewItem.setIsCheatFlow30d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsCheatFlow30d"));<NEW_LINE>dataViewItem.setIsProxy1d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsProxy1d"));<NEW_LINE>dataViewItem.setIsProxy7d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsProxy7d"));<NEW_LINE>dataViewItem.setIsProxy30d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsProxy30d"));<NEW_LINE>dataViewItem.setIsHiJack1d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsHiJack1d"));<NEW_LINE>dataViewItem.setIsHiJack7d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsHiJack7d"));<NEW_LINE>dataViewItem.setIsHiJack30d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsHiJack30d"));<NEW_LINE>dataViewItem.setIsC21d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsC21d"));<NEW_LINE>dataViewItem.setIsC27d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsC27d"));<NEW_LINE>dataViewItem.setIsC230d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsC230d"));<NEW_LINE>dataViewItem.setIsBotnet1d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsBotnet1d"));<NEW_LINE>dataViewItem.setIsBotnet7d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsBotnet7d"));<NEW_LINE>dataViewItem.setIsBotnet30d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsBotnet30d"));<NEW_LINE>dataViewItem.setIsNetAttack1d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsNetAttack1d"));<NEW_LINE>dataViewItem.setIsNetAttack7d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsNetAttack7d"));<NEW_LINE>dataViewItem.setIsNetAttack30d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsNetAttack30d"));<NEW_LINE>dataViewItem.setIsBlackCampaign1d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsBlackCampaign1d"));<NEW_LINE>dataViewItem.setIsBlackCampaign7d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsBlackCampaign7d"));<NEW_LINE>dataViewItem.setIsBlackCampaign30d(context.longValue("DescribePerDateDataResponse.DataView[" + i + "].IsBlackCampaign30d"));<NEW_LINE>dataView.add(dataViewItem);<NEW_LINE>}<NEW_LINE>describePerDateDataResponse.setDataView(dataView);<NEW_LINE>return describePerDateDataResponse;<NEW_LINE>}
("DescribePerDateDataResponse.DataView[" + i + "].IsCheatFlow1d"));
1,475,244
public com.amazonaws.services.licensemanager.model.AccessDeniedException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.licensemanager.model.AccessDeniedException accessDeniedException = new com.amazonaws.services.licensemanager.model.AccessDeniedException(null);<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return accessDeniedException;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
1,514,276
final ListComponentsResult executeListComponents(ListComponentsRequest listComponentsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listComponentsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListComponentsRequest> request = null;<NEW_LINE>Response<ListComponentsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListComponentsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listComponentsRequest));<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, "GreengrassV2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListComponents");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListComponentsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListComponentsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
728,848
public ListCoverageStatisticsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListCoverageStatisticsResult listCoverageStatisticsResult = new ListCoverageStatisticsResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return listCoverageStatisticsResult;<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("countsByGroup", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listCoverageStatisticsResult.setCountsByGroup(new ListUnmarshaller<Counts>(CountsJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("nextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listCoverageStatisticsResult.setNextToken(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("totalCounts", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listCoverageStatisticsResult.setTotalCounts(context.getUnmarshaller(Long.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 listCoverageStatisticsResult;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
1,417,839
public static DescribeSagManagementPortResponse unmarshall(DescribeSagManagementPortResponse describeSagManagementPortResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSagManagementPortResponse.setRequestId(_ctx.stringValue("DescribeSagManagementPortResponse.RequestId"));<NEW_LINE>describeSagManagementPortResponse.setGateway(_ctx.stringValue("DescribeSagManagementPortResponse.Gateway"));<NEW_LINE>describeSagManagementPortResponse.setIP(_ctx.stringValue("DescribeSagManagementPortResponse.IP"));<NEW_LINE>describeSagManagementPortResponse.setMask(_ctx.stringValue("DescribeSagManagementPortResponse.Mask"));<NEW_LINE>List<TaskState> taskStates <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeSagManagementPortResponse.TaskStates.Length"); i++) {<NEW_LINE>TaskState taskState = new TaskState();<NEW_LINE>taskState.setErrorMessage(_ctx.stringValue("DescribeSagManagementPortResponse.TaskStates[" + i + "].ErrorMessage"));<NEW_LINE>taskState.setState(_ctx.stringValue("DescribeSagManagementPortResponse.TaskStates[" + i + "].State"));<NEW_LINE>taskState.setErrorCode(_ctx.stringValue("DescribeSagManagementPortResponse.TaskStates[" + i + "].ErrorCode"));<NEW_LINE>taskState.setCreateTime(_ctx.stringValue("DescribeSagManagementPortResponse.TaskStates[" + i + "].CreateTime"));<NEW_LINE>taskStates.add(taskState);<NEW_LINE>}<NEW_LINE>describeSagManagementPortResponse.setTaskStates(taskStates);<NEW_LINE>return describeSagManagementPortResponse;<NEW_LINE>}
= new ArrayList<TaskState>();
1,240,549
//<NEW_LINE>Reference(//<NEW_LINE>title = "Fast and accurate computation of binomial probabilities", //<NEW_LINE>authors = "C. Loader", //<NEW_LINE>booktitle = "", url = "http://projects.scipy.org/scipy/raw-attachment/ticket/620/loader2000Fast.pdf", bibkey = "web/Loader00")<NEW_LINE>public static double pmf(double x, int n, double p) {<NEW_LINE>// Invalid values<NEW_LINE>if (x < 0 || x > n) {<NEW_LINE>return 0.;<NEW_LINE>}<NEW_LINE>// Extreme probabilities<NEW_LINE>if (p <= 0.) {<NEW_LINE>return x == 0 ? 1. : 0.;<NEW_LINE>}<NEW_LINE>if (p >= 1.) {<NEW_LINE>return x == n ? 1. : 0.;<NEW_LINE>}<NEW_LINE>final double q = 1 - p;<NEW_LINE>// FIXME: check for x to be integer, return 0 otherwise?<NEW_LINE>// Extreme values of x<NEW_LINE>if (x == 0) {<NEW_LINE>if (p < .1) {<NEW_LINE>return FastMath.exp(-devianceTerm(n, n * q) - n * p);<NEW_LINE>} else {<NEW_LINE>return FastMath.exp(n * FastMath.log(q));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (x == n) {<NEW_LINE>if (p > .9) {<NEW_LINE>return FastMath.exp(-devianceTerm(n, n <MASK><NEW_LINE>} else {<NEW_LINE>return FastMath.exp(n * FastMath.log(p));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final double lc = stirlingError(n) - stirlingError(x) - stirlingError(n - x) - devianceTerm(x, n * p) - devianceTerm(n - x, n * q);<NEW_LINE>final double f = (MathUtil.TWOPI * x * (n - x)) / n;<NEW_LINE>return FastMath.exp(lc) / Math.sqrt(f);<NEW_LINE>}
* p) - n * q);
1,251,300
final DeleteRealtimeEndpointResult executeDeleteRealtimeEndpoint(DeleteRealtimeEndpointRequest deleteRealtimeEndpointRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteRealtimeEndpointRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteRealtimeEndpointRequest> request = null;<NEW_LINE>Response<DeleteRealtimeEndpointResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new DeleteRealtimeEndpointRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteRealtimeEndpointRequest));<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, "Machine Learning");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteRealtimeEndpoint");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteRealtimeEndpointResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteRealtimeEndpointResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
720,085
ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {<NEW_LINE>final String job;<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Task task = emc.fetch(id, Task.class, ListTools.toList(Task.job_FIELDNAME));<NEW_LINE>if (null == task) {<NEW_LINE>throw new ExceptionEntityNotExist(id, Task.class);<NEW_LINE>}<NEW_LINE>job = task.getJob();<NEW_LINE>}<NEW_LINE>Callable<ActionResult<Wo>> callable = () -> {<NEW_LINE>ActionResult<Wo> <MASK><NEW_LINE>Wo wo = new Wo();<NEW_LINE>wo.setValue(false);<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Task task = emc.find(id, Task.class);<NEW_LINE>if (null == task) {<NEW_LINE>throw new ExceptionEntityNotExist(id, Task.class);<NEW_LINE>}<NEW_LINE>if (BooleanUtils.isNotTrue(task.getPause())) {<NEW_LINE>emc.beginTransaction(Task.class);<NEW_LINE>task.setPause(true);<NEW_LINE>task.getProperties().setPauseStartTime(new Date());<NEW_LINE>emc.commit();<NEW_LINE>wo.setValue(true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>result.setData(wo);<NEW_LINE>return result;<NEW_LINE>};<NEW_LINE>return ProcessPlatformExecutorFactory.get(job).submit(callable).get(300, TimeUnit.SECONDS);<NEW_LINE>}
result = new ActionResult<>();
1,281,630
public static HttpResult request(String url, List<String> headers, Map<String, String> paramValues, int connectTimeout, int readTimeout, String encoding, String method) {<NEW_LINE>HttpURLConnection conn = null;<NEW_LINE>try {<NEW_LINE>String encodedContent = encodingParams(paramValues, encoding);<NEW_LINE>url += (null == encodedContent) ? "" : ("?" + encodedContent);<NEW_LINE>conn = (HttpURLConnection) new URL(url).openConnection();<NEW_LINE>conn.setConnectTimeout(connectTimeout);<NEW_LINE>conn.setReadTimeout(readTimeout);<NEW_LINE>conn.setRequestMethod(method);<NEW_LINE>conn.addRequestProperty("Client-Version", UtilsAndCommons.SERVER_VERSION);<NEW_LINE>conn.<MASK><NEW_LINE>setHeaders(conn, headers, encoding);<NEW_LINE>conn.connect();<NEW_LINE>return getResult(conn);<NEW_LINE>} catch (Exception e) {<NEW_LINE>Loggers.SRV_LOG.warn("Exception while request: {}, caused: {}", url, e);<NEW_LINE>return new HttpResult(500, e.toString(), Collections.<String, String>emptyMap());<NEW_LINE>} finally {<NEW_LINE>if (conn != null) {<NEW_LINE>conn.disconnect();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
addRequestProperty("User-Agent", UtilsAndCommons.SERVER_VERSION);
9,307
public void publishApi(String designId, NewApiPublication info, String dereference) throws ServerError, NotFoundException {<NEW_LINE>LinkedAccountType type = info.getType();<NEW_LINE>try {<NEW_LINE>// First step - publish the content to the soruce control system<NEW_LINE>ISourceConnector connector = this.sourceConnectorFactory.createConnector(type);<NEW_LINE>String resourceUrl = toResourceUrl(info);<NEW_LINE>String formattedContent = getApiContent(designId, info.getFormat(), "true".equalsIgnoreCase(dereference));<NEW_LINE>try {<NEW_LINE>ResourceContent content = connector.getResourceContent(resourceUrl);<NEW_LINE>content.setContent(formattedContent);<NEW_LINE>connector.updateResourceContent(resourceUrl, info.getCommitMessage(), null, content);<NEW_LINE>} catch (NotFoundException nfe) {<NEW_LINE>connector.createResourceContent(resourceUrl, <MASK><NEW_LINE>}<NEW_LINE>// Followup step - store a row in the api_content table<NEW_LINE>try {<NEW_LINE>String user = this.security.getCurrentUser().getLogin();<NEW_LINE>String publicationData = createPublicationData(info);<NEW_LINE>storage.addContent(user, designId, ApiContentType.Publish, publicationData);<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error("Failed to record API publication in database.", e);<NEW_LINE>}<NEW_LINE>} catch (SourceConnectorException e) {<NEW_LINE>throw new ServerError(e);<NEW_LINE>}<NEW_LINE>}
info.getCommitMessage(), formattedContent);
13,932
public String renameSpace(@RequestParam String space, @RequestParam String newspace, HttpServletRequest req, HttpServletResponse res) {<NEW_LINE>Profile authUser = utils.getAuthUser(req);<NEW_LINE>Sysprop s = pc.read(utils.getSpaceId(space));<NEW_LINE>if (s != null && utils.isAdmin(authUser)) {<NEW_LINE>String origSpace = s.getId() + Para.getConfig().separator() + s.getName();<NEW_LINE>int index = utils.getAllSpaces().indexOf(s);<NEW_LINE>s.setName(newspace);<NEW_LINE>pc.update(s);<NEW_LINE>if (index >= 0) {<NEW_LINE>utils.getAllSpaces().get(index).setName(newspace);<NEW_LINE>}<NEW_LINE>Pager pager = new Pager(1, "_docid", <MASK><NEW_LINE>LinkedList<Map<String, Object>> toUpdate = new LinkedList<>();<NEW_LINE>List<Profile> profiles;<NEW_LINE>do {<NEW_LINE>String query = "properties.spaces:(\"" + origSpace + "\")";<NEW_LINE>profiles = pc.findQuery(Utils.type(Profile.class), query, pager);<NEW_LINE>profiles.stream().forEach(p -> {<NEW_LINE>p.getSpaces().remove(origSpace);<NEW_LINE>p.getSpaces().add(s.getId() + Para.getConfig().separator() + s.getName());<NEW_LINE>Map<String, Object> profile = new HashMap<>();<NEW_LINE>profile.put(Config._ID, p.getId());<NEW_LINE>profile.put("spaces", p.getSpaces());<NEW_LINE>toUpdate.add(profile);<NEW_LINE>});<NEW_LINE>if (!toUpdate.isEmpty()) {<NEW_LINE>pc.invokePatch("_batch", toUpdate, Map.class);<NEW_LINE>}<NEW_LINE>} while (!profiles.isEmpty());<NEW_LINE>}<NEW_LINE>if (utils.isAjaxRequest(req)) {<NEW_LINE>res.setStatus(200);<NEW_LINE>return "space";<NEW_LINE>} else {<NEW_LINE>return "redirect:" + ADMINLINK;<NEW_LINE>}<NEW_LINE>}
false, CONF.maxItemsPerPage());
332,915
public boolean process(NacosTask task) {<NEW_LINE>int rowCount = persistService.configInfoTagCount();<NEW_LINE>int pageCount = (int) Math.<MASK><NEW_LINE>int actualRowCount = 0;<NEW_LINE>for (int pageNo = 1; pageNo <= pageCount; pageNo++) {<NEW_LINE>Page<ConfigInfoTagWrapper> page = persistService.findAllConfigInfoTagForDumpAll(pageNo, PAGE_SIZE);<NEW_LINE>if (page != null) {<NEW_LINE>for (ConfigInfoTagWrapper cf : page.getPageItems()) {<NEW_LINE>boolean result = ConfigCacheService.dumpTag(cf.getDataId(), cf.getGroup(), cf.getTenant(), cf.getTag(), cf.getContent(), cf.getLastModified(), cf.getEncryptedDataKey());<NEW_LINE>LogUtil.DUMP_LOG.info("[dump-all-Tag-ok] result={}, {}, {}, length={}, md5={}", result, GroupKey2.getKey(cf.getDataId(), cf.getGroup()), cf.getLastModified(), cf.getContent().length(), cf.getMd5());<NEW_LINE>}<NEW_LINE>actualRowCount += page.getPageItems().size();<NEW_LINE>DEFAULT_LOG.info("[all-dump-tag] {} / {}", actualRowCount, rowCount);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
ceil(rowCount * 1.0 / PAGE_SIZE);
1,204,713
public static com.liferay.portal.model.Company model(CompanyHBM companyHBM) {<NEW_LINE>com.liferay.portal.model.Company company = CompanyPool.get(companyHBM.getPrimaryKey());<NEW_LINE>if (company == null) {<NEW_LINE>company = new com.liferay.portal.model.Company(companyHBM.getCompanyId(), companyHBM.getKey(), companyHBM.getPortalURL(), companyHBM.getHomeURL(), companyHBM.getMx(), companyHBM.getName(), companyHBM.getShortName(), companyHBM.getType(), companyHBM.getSize(), companyHBM.getStreet(), companyHBM.getCity(), companyHBM.getState(), companyHBM.getZip(), companyHBM.getPhone(), companyHBM.getFax(), companyHBM.getEmailAddress(), companyHBM.getAuthType(), companyHBM.getAutoLogin(<MASK><NEW_LINE>CompanyPool.put(company.getPrimaryKey(), company);<NEW_LINE>}<NEW_LINE>return company;<NEW_LINE>}
), companyHBM.getStrangers());
615,446
public DeleteAnalysisResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DeleteAnalysisResult deleteAnalysisResult = new DeleteAnalysisResult();<NEW_LINE>deleteAnalysisResult.setStatus(context.<MASK><NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return deleteAnalysisResult;<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("Arn", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>deleteAnalysisResult.setArn(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("AnalysisId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>deleteAnalysisResult.setAnalysisId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("DeletionTime", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>deleteAnalysisResult.setDeletionTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("RequestId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>deleteAnalysisResult.setRequestId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return deleteAnalysisResult;<NEW_LINE>}
getHttpResponse().getStatusCode());
872,980
final ProvisionIpamPoolCidrResult executeProvisionIpamPoolCidr(ProvisionIpamPoolCidrRequest provisionIpamPoolCidrRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(provisionIpamPoolCidrRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ProvisionIpamPoolCidrRequest> request = null;<NEW_LINE>Response<ProvisionIpamPoolCidrResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ProvisionIpamPoolCidrRequestMarshaller().marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ProvisionIpamPoolCidr");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<ProvisionIpamPoolCidrResult> responseHandler = new StaxResponseHandler<ProvisionIpamPoolCidrResult>(new ProvisionIpamPoolCidrResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(provisionIpamPoolCidrRequest));
1,779,123
public String originalDigits(String s) {<NEW_LINE>int[] counter = new int[26];<NEW_LINE>for (char c : s.toCharArray()) {<NEW_LINE>++counter[c - 'a'];<NEW_LINE>}<NEW_LINE>int[] cnt = new int[10];<NEW_LINE>cnt[0] = counter['z' - 'a'];<NEW_LINE>cnt[2] = counter['w' - 'a'];<NEW_LINE>cnt[4] = counter['u' - 'a'];<NEW_LINE>cnt[6] = counter['x' - 'a'];<NEW_LINE>cnt[8] = counter['g' - 'a'];<NEW_LINE>cnt[3] = counter['h' <MASK><NEW_LINE>cnt[5] = counter['f' - 'a'] - cnt[4];<NEW_LINE>cnt[7] = counter['s' - 'a'] - cnt[6];<NEW_LINE>cnt[1] = counter['o' - 'a'] - cnt[0] - cnt[2] - cnt[4];<NEW_LINE>cnt[9] = counter['i' - 'a'] - cnt[5] - cnt[6] - cnt[8];<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>for (int i = 0; i < 10; ++i) {<NEW_LINE>for (int j = 0; j < cnt[i]; ++j) {<NEW_LINE>sb.append(i);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return sb.toString();<NEW_LINE>}
- 'a'] - cnt[8];
939,694
private PainelCor criarPainelCor(String name, String tema, JSONObject json) {<NEW_LINE>JLabel nomeVariavel = new JLabel("<html><body width='100px'><div>" + name.replace("_", " ") + "</div></body></html>");<NEW_LINE>nomeVariavel.setForeground(ColorController.COR_LETRA);<NEW_LINE>WebButton botaoColorPicker = new WebButton(" ");<NEW_LINE>Color cor = new Color(Integer.parseInt(json.getString(name), 16));<NEW_LINE>WeblafUtils.configurarBotao(botaoColorPicker, cor, ColorController.COR_LETRA_TITULO, cor.brighter(), ColorController.COR_LETRA_TITULO, 1, true);<NEW_LINE>PainelCor estilo <MASK><NEW_LINE>estilo.setSelectedColor(cor);<NEW_LINE>estilo.setNome(name);<NEW_LINE>estilo.setOpaque(false);<NEW_LINE>estilo.add(botaoColorPicker);<NEW_LINE>estilo.add(nomeVariavel);<NEW_LINE>estilo.setBotaoCor(botaoColorPicker);<NEW_LINE>nomeVariavel.addMouseListener(new MouseAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void mouseClicked(MouseEvent e) {<NEW_LINE>botaoColorPicker.doClick();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>acaoBotaoPickColor(botaoColorPicker, tema, estilo);<NEW_LINE>return estilo;<NEW_LINE>}
= new PainelCor(cor, name);
1,115,790
protected DefaultActionGroup collectToolbarActions(@javax.annotation.Nullable List<AnAction> viewerActions) {<NEW_LINE>DefaultActionGroup group = new DefaultActionGroup();<NEW_LINE>List<AnAction> navigationActions = new ArrayList<AnAction>();<NEW_LINE>navigationActions.addAll(getNavigationActions());<NEW_LINE>navigationActions.add(myOpenInEditorAction);<NEW_LINE>navigationActions.add(new MyChangeDiffToolAction());<NEW_LINE>DiffUtil.addActionBlock(group, navigationActions);<NEW_LINE>DiffUtil.addActionBlock(group, viewerActions);<NEW_LINE>List<AnAction> requestContextActions = myActiveRequest.getUserData(DiffUserDataKeys.CONTEXT_ACTIONS);<NEW_LINE>DiffUtil.addActionBlock(group, requestContextActions);<NEW_LINE>List<AnAction> contextActions = myContext.getUserData(DiffUserDataKeys.CONTEXT_ACTIONS);<NEW_LINE>DiffUtil.addActionBlock(group, contextActions);<NEW_LINE>DiffUtil.addActionBlock(group, new ShowInExternalToolAction(), ActionManager.getInstance()<MASK><NEW_LINE>return group;<NEW_LINE>}
.getAction(IdeActions.ACTION_CONTEXT_HELP));
1,078,350
private static void addMatchingFiles(VirtualFile searchRoot, @NotNull String includeText, @NotNull List<VirtualFile> result) {<NEW_LINE>String[] split = includeText.split("/");<NEW_LINE>if (split.length == 0)<NEW_LINE>return;<NEW_LINE>int joinEndIndex = includeText.endsWith("/") ? split.length : split.length - 1;<NEW_LINE>final String childPrefix = joinEndIndex == split.length ? "" : split[split.length - 1];<NEW_LINE>VirtualFile directory = VfsUtilCore.findRelativeFile(StringUtil.join(split, 0, joinEndIndex, "/"), searchRoot);<NEW_LINE>VirtualFile[] children = directory != null <MASK><NEW_LINE>if (children == null)<NEW_LINE>return;<NEW_LINE>JBIterable.of(children).filter(new Condition<VirtualFile>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean value(VirtualFile child) {<NEW_LINE>return child.getName().startsWith(childPrefix) && (child.isDirectory() || canBeIncluded(child));<NEW_LINE>}<NEW_LINE><NEW_LINE>private boolean canBeIncluded(@NotNull VirtualFile file) {<NEW_LINE>FileType type = file.getFileType();<NEW_LINE>return type == ErlangFileType.HEADER || type == ErlangFileType.MODULE;<NEW_LINE>}<NEW_LINE>}).addAllTo(result);<NEW_LINE>}
? directory.getChildren() : null;
1,418,557
public static void main(String[] args) {<NEW_LINE>java.util.List<PathLabel> <MASK><NEW_LINE>examples.add(new PathLabel("Horses", UtilIO.pathExample("segment/berkeley_horses.jpg")));<NEW_LINE>examples.add(new PathLabel("Human Statue", UtilIO.pathExample("standard/kodim17.jpg")));<NEW_LINE>examples.add(new PathLabel("sunflowers", UtilIO.pathExample("sunflowers.jpg")));<NEW_LINE>examples.add(new PathLabel("Kangaroo", UtilIO.pathExample("segment/berkeley_kangaroo.jpg")));<NEW_LINE>examples.add(new PathLabel("shapes", UtilIO.pathExample("shapes/shapes01.png")));<NEW_LINE>examples.add(new PathLabel("beach", UtilIO.pathExample("scale/beach02.jpg")));<NEW_LINE>examples.add(new PathLabel("Face Paint", UtilIO.pathExample("standard/kodim15.jpg")));<NEW_LINE>SwingUtilities.invokeLater(() -> {<NEW_LINE>ShowImageBlurApp app = new ShowImageBlurApp(examples, GrayU8.class);<NEW_LINE>app.openExample(examples.get(0));<NEW_LINE>app.display("Blur Image Ops");<NEW_LINE>});<NEW_LINE>}
examples = new ArrayList<>();
129,937
public static Tensor asTensor(String text, Embedder embedder, Embedder.Context context, TensorType type) {<NEW_LINE>if (type.dimensions().size() == 1 && type.dimensions().get(0).isIndexed()) {<NEW_LINE>// Build to a list first since we can't reverse a tensor builder<NEW_LINE>List<Integer> values = embedder.embed(text, context);<NEW_LINE>long maxSize = values.size();<NEW_LINE>if (type.dimensions().get(0).size().isPresent())<NEW_LINE>maxSize = Math.min(maxSize, type.dimensions().get(0).size().get());<NEW_LINE>Tensor.Builder builder = Tensor.Builder.of(type);<NEW_LINE>for (int i = 0; i < maxSize; i++) builder.cell(values.get(i), i);<NEW_LINE>return builder.build();<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
throw new IllegalArgumentException("Don't know how to embed into " + type);
199,778
public void unpack(File zipFile, File targetDir, TransformOutputs outputs, boolean asFiletreeOutput) throws IOException {<NEW_LINE>Logging.getLogger(UnzipTransform.class).info("Unpacking " + zipFile.getName() + " using " + UnzipTransform.class.getSimpleName() + ".");<NEW_LINE>Function<String, Path> pathModifier = pathResolver();<NEW_LINE>ZipFile zip = new ZipFile(zipFile);<NEW_LINE>try {<NEW_LINE>Enumeration<ZipEntry<MASK><NEW_LINE>while (entries.hasMoreElements()) {<NEW_LINE>ZipEntry zipEntry = entries.nextElement();<NEW_LINE>Path child = pathModifier.apply(zipEntry.getName());<NEW_LINE>if (child == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Path outputPath = targetDir.toPath().resolve(child);<NEW_LINE>Files.createDirectories(outputPath.getParent());<NEW_LINE>if (zipEntry.isDirectory()) {<NEW_LINE>outputPath.toFile().mkdirs();<NEW_LINE>chmod(outputPath, zipEntry.getUnixMode());<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>try (FileOutputStream outputStream = new FileOutputStream(outputPath.toFile())) {<NEW_LINE>IOUtils.copyLarge(zip.getInputStream(zipEntry), outputStream);<NEW_LINE>}<NEW_LINE>chmod(outputPath, zipEntry.getUnixMode());<NEW_LINE>if (asFiletreeOutput) {<NEW_LINE>outputs.file(outputPath.toFile());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>zip.close();<NEW_LINE>}<NEW_LINE>}
> entries = zip.getEntries();
1,203,141
public void onReceive(Context context, Intent intent) {<NEW_LINE>if (intent != null) {<NEW_LINE>int state = intent.getIntExtra(AudioService.AudioUpdateIntent.STATUS, -1);<NEW_LINE>int repeatCount = intent.getIntExtra(AudioService<MASK><NEW_LINE>AudioRequest request = intent.getParcelableExtra(AudioService.AudioUpdateIntent.REQUEST);<NEW_LINE>if (request != null) {<NEW_LINE>lastAudioRequest = request;<NEW_LINE>}<NEW_LINE>if (state == AudioService.AudioUpdateIntent.PLAYING) {<NEW_LINE>audioStatusBar.switchMode(AudioStatusBar.PLAYING_MODE);<NEW_LINE>if (repeatCount >= -1) {<NEW_LINE>audioStatusBar.setRepeatCount(repeatCount);<NEW_LINE>}<NEW_LINE>} else if (state == AudioService.AudioUpdateIntent.PAUSED) {<NEW_LINE>audioStatusBar.switchMode(AudioStatusBar.PAUSED_MODE);<NEW_LINE>} else if (state == AudioService.AudioUpdateIntent.STOPPED) {<NEW_LINE>audioStatusBar.switchMode(AudioStatusBar.STOPPED_MODE);<NEW_LINE>lastAudioRequest = null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.AudioUpdateIntent.REPEAT_COUNT, -200);
1,443,328
public ProcessStatus processCheckPasswordAction(final PwmRequest pwmRequest) throws IOException, PwmUnrecoverableException, ChaiUnavailableException {<NEW_LINE>final RestCheckPasswordServer.JsonInput jsonInput = JsonFactory.get().deserialize(pwmRequest.readRequestBodyAsString(), RestCheckPasswordServer.JsonInput.class);<NEW_LINE>final UserIdentity userIdentity = UserIdentity.fromKey(pwmRequest.getLabel(), jsonInput.getUsername(), pwmRequest.getPwmApplication());<NEW_LINE>final HelpdeskProfile helpdeskProfile = getHelpdeskProfile(pwmRequest);<NEW_LINE>HelpdeskServletUtil.checkIfUserIdentityViewable(pwmRequest, helpdeskProfile, userIdentity);<NEW_LINE>final ChaiUser chaiUser = HelpdeskServletUtil.getChaiUser(pwmRequest<MASK><NEW_LINE>final UserInfo userInfo = UserInfoFactory.newUserInfo(pwmRequest.getPwmApplication(), pwmRequest.getLabel(), pwmRequest.getLocale(), userIdentity, chaiUser.getChaiProvider());<NEW_LINE>{<NEW_LINE>final HelpdeskUIMode mode = helpdeskProfile.readSettingAsEnum(PwmSetting.HELPDESK_SET_PASSWORD_MODE, HelpdeskUIMode.class);<NEW_LINE>if (mode == HelpdeskUIMode.none) {<NEW_LINE>throw new PwmUnrecoverableException(new ErrorInformation(PwmError.ERROR_SECURITY_VIOLATION, "setting " + PwmSetting.HELPDESK_SET_PASSWORD_MODE.toMenuLocationDebug(helpdeskProfile.getIdentifier(), pwmRequest.getLocale()) + " must not be set to none"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final PasswordUtility.PasswordCheckInfo passwordCheckInfo = PasswordUtility.checkEnteredPassword(pwmRequest.getPwmRequestContext(), chaiUser, userInfo, null, PasswordData.forStringValue(jsonInput.getPassword1()), PasswordData.forStringValue(jsonInput.getPassword2()));<NEW_LINE>final RestCheckPasswordServer.JsonOutput jsonResponse = RestCheckPasswordServer.JsonOutput.fromPasswordCheckInfo(passwordCheckInfo);<NEW_LINE>final RestResultBean restResultBean = RestResultBean.withData(jsonResponse, RestCheckPasswordServer.JsonOutput.class);<NEW_LINE>pwmRequest.outputJsonResult(restResultBean);<NEW_LINE>return ProcessStatus.Halt;<NEW_LINE>}
, getHelpdeskProfile(pwmRequest), userIdentity);
1,646,707
public void updateTile() {<NEW_LINE>super.updateTile();<NEW_LINE>if (bulletLife > 0 && bullet != null) {<NEW_LINE>wasShooting = true;<NEW_LINE>tr.trns(rotation, shootLength, 0f);<NEW_LINE>bullet.rotation(rotation);<NEW_LINE>bullet.set(x + tr.x, y + tr.y);<NEW_LINE>bullet.time(0f);<NEW_LINE>heat = 1f;<NEW_LINE>recoil = recoilAmount;<NEW_LINE>bulletLife -= Time.delta / Math.max(efficiency(), 0.00001f);<NEW_LINE>if (bulletLife <= 0f) {<NEW_LINE>bullet = null;<NEW_LINE>}<NEW_LINE>} else if (reload > 0) {<NEW_LINE>wasShooting = true;<NEW_LINE>Liquid liquid = liquids.current();<NEW_LINE>float maxUsed = consumes.<ConsumeLiquidBase>get(ConsumeType.liquid).amount;<NEW_LINE>float used = (cheating() ? maxUsed : Math.min(liquids.get(liquid), maxUsed)) * Time.delta;<NEW_LINE>reload <MASK><NEW_LINE>liquids.remove(liquid, used);<NEW_LINE>if (Mathf.chance(0.06 * used)) {<NEW_LINE>coolEffect.at(x + Mathf.range(size * tilesize / 2f), y + Mathf.range(size * tilesize / 2f));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
-= used * liquid.heatCapacity * coolantMultiplier;
1,579,728
public void prepareForMigration(VirtualMachineProfile vm, DeployDestination dest) {<NEW_LINE>List<VolumeVO> vols = _volsDao.findUsableVolumesForInstance(vm.getId());<NEW_LINE>if (s_logger.isDebugEnabled()) {<NEW_LINE>s_logger.debug("Preparing " + vols.<MASK><NEW_LINE>}<NEW_LINE>for (VolumeVO vol : vols) {<NEW_LINE>VolumeInfo volumeInfo = volFactory.getVolume(vol.getId());<NEW_LINE>DataTO volTO = volumeInfo.getTO();<NEW_LINE>DiskTO disk = storageMgr.getDiskWithThrottling(volTO, vol.getVolumeType(), vol.getDeviceId(), vol.getPath(), vm.getServiceOfferingId(), vol.getDiskOfferingId());<NEW_LINE>DataStore dataStore = dataStoreMgr.getDataStore(vol.getPoolId(), DataStoreRole.Primary);<NEW_LINE>disk.setDetails(getDetails(volumeInfo, dataStore));<NEW_LINE>PrimaryDataStore primaryDataStore = (PrimaryDataStore) dataStore;<NEW_LINE>// This might impact other managed storages, grant access for PowerFlex storage pool only<NEW_LINE>if (primaryDataStore.isManaged() && primaryDataStore.getPoolType() == Storage.StoragePoolType.PowerFlex) {<NEW_LINE>volService.grantAccess(volFactory.getVolume(vol.getId()), dest.getHost(), dataStore);<NEW_LINE>}<NEW_LINE>vm.addDisk(disk);<NEW_LINE>}<NEW_LINE>// if (vm.getType() == VirtualMachine.Type.User && vm.getTemplate().getFormat() == ImageFormat.ISO) {<NEW_LINE>if (vm.getType() == VirtualMachine.Type.User) {<NEW_LINE>_tmpltMgr.prepareIsoForVmProfile(vm, dest);<NEW_LINE>// DataTO dataTO = tmplFactory.getTemplate(vm.getTemplate().getId(), DataStoreRole.Image, vm.getVirtualMachine().getDataCenterId()).getTO();<NEW_LINE>// DiskTO iso = new DiskTO(dataTO, 3L, null, Volume.Type.ISO);<NEW_LINE>// vm.addDisk(iso);<NEW_LINE>}<NEW_LINE>}
size() + " volumes for " + vm);
285,407
public static JavaPlatform[] findSupportedPlatforms(@NonNull final GlassfishInstance instance) {<NEW_LINE>// Avoid NPEs and troll developer a bit.<NEW_LINE>Parameters.notNull("instance", instance);<NEW_LINE>// Search for supported Java SE platforms.<NEW_LINE>List<JavaPlatform> platformsList = new LinkedList<JavaPlatform>();<NEW_LINE>JavaPlatform[] allPlatforms = getInstalledJavaSEPlatforms();<NEW_LINE>GlassFishJavaSEConfig javaSEConfig = ConfigBuilderProvider.getBuilder(instance).<MASK><NEW_LINE>Set<JavaSEPlatform> supportedPlatforms = javaSEConfig.getPlatforms();<NEW_LINE>// Finish quickly for empty set.<NEW_LINE>if (supportedPlatforms == null || supportedPlatforms.isEmpty()) {<NEW_LINE>return new JavaPlatform[0];<NEW_LINE>}<NEW_LINE>// Processs non-empty set.<NEW_LINE>for (JavaPlatform platform : allPlatforms) {<NEW_LINE>for (FileObject fo : platform.getInstallFolders()) {<NEW_LINE>if (supportedPlatforms.contains(JavaSEPlatform.toValue(platform.getSpecification().getVersion().toString()))) {<NEW_LINE>platformsList.add(platform);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>JavaPlatform[] platforms = new JavaPlatform[platformsList.size()];<NEW_LINE>int i = 0;<NEW_LINE>for (JavaPlatform platform : platformsList) {<NEW_LINE>platforms[i++] = platform;<NEW_LINE>}<NEW_LINE>return platforms;<NEW_LINE>}
getJavaSEConfig(instance.getVersion());
983,664
public static DescribeRegionsResponse unmarshall(DescribeRegionsResponse describeRegionsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeRegionsResponse.setRequestId(_ctx.stringValue("DescribeRegionsResponse.RequestId"));<NEW_LINE>describeRegionsResponse.setMessage(_ctx.stringValue("DescribeRegionsResponse.Message"));<NEW_LINE>describeRegionsResponse.setCode(_ctx.integerValue("DescribeRegionsResponse.Code"));<NEW_LINE>List<Region> regions = new ArrayList<Region>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeRegionsResponse.Regions.Length"); i++) {<NEW_LINE>Region region = new Region();<NEW_LINE>region.setLocalName(_ctx.stringValue("DescribeRegionsResponse.Regions[" + i + "].LocalName"));<NEW_LINE>region.setRegionEndpoint(_ctx.stringValue("DescribeRegionsResponse.Regions[" + i + "].RegionEndpoint"));<NEW_LINE>region.setRegionId(_ctx.stringValue("DescribeRegionsResponse.Regions[" + i + "].RegionId"));<NEW_LINE>List<String> recommendZones = new ArrayList<String>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("DescribeRegionsResponse.Regions[" + i + "].RecommendZones.Length"); j++) {<NEW_LINE>recommendZones.add(_ctx.stringValue("DescribeRegionsResponse.Regions[" + i <MASK><NEW_LINE>}<NEW_LINE>region.setRecommendZones(recommendZones);<NEW_LINE>regions.add(region);<NEW_LINE>}<NEW_LINE>describeRegionsResponse.setRegions(regions);<NEW_LINE>return describeRegionsResponse;<NEW_LINE>}
+ "].RecommendZones[" + j + "]"));
827,277
protected TlsCredentials selectClientCredentials13(Principal[] issuers, byte[] certificateRequestContext) throws IOException {<NEW_LINE>LinkedHashMap<String, SignatureSchemeInfo> keyTypeMap = new LinkedHashMap<String, SignatureSchemeInfo>();<NEW_LINE>for (SignatureSchemeInfo signatureSchemeInfo : jsseSecurityParameters.peerSigSchemes) {<NEW_LINE>if (!signatureSchemeInfo.isSupportedPost13() || !jsseSecurityParameters.localSigSchemes.contains(signatureSchemeInfo)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String keyType = signatureSchemeInfo.getKeyType13();<NEW_LINE>if (keyTypeMap.containsKey(keyType)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>keyTypeMap.put(keyType, signatureSchemeInfo);<NEW_LINE>}<NEW_LINE>if (keyTypeMap.isEmpty()) {<NEW_LINE>LOG.fine("Client (1.3) found no usable signature schemes");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String[] keyTypes = keyTypeMap.keySet(<MASK><NEW_LINE>BCX509Key x509Key = manager.chooseClientKey(keyTypes, issuers);<NEW_LINE>if (null == x509Key) {<NEW_LINE>handleKeyManagerMisses(keyTypeMap, null);<NEW_LINE>LOG.fine("Client (1.3) did not select any credentials");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String selectedKeyType = x509Key.getKeyType();<NEW_LINE>handleKeyManagerMisses(keyTypeMap, selectedKeyType);<NEW_LINE>SignatureSchemeInfo selectedSignatureSchemeInfo = keyTypeMap.get(selectedKeyType);<NEW_LINE>if (null == selectedSignatureSchemeInfo) {<NEW_LINE>throw new TlsFatalAlert(AlertDescription.internal_error, "Key manager returned invalid key type");<NEW_LINE>}<NEW_LINE>if (LOG.isLoggable(Level.FINE)) {<NEW_LINE>LOG.fine("Client (1.3) selected credentials for signature scheme '" + selectedSignatureSchemeInfo + "' (keyType '" + selectedKeyType + "'), with private key algorithm '" + JsseUtils.getPrivateKeyAlgorithm(x509Key.getPrivateKey()) + "'");<NEW_LINE>}<NEW_LINE>return JsseUtils.createCredentialedSigner13(context, getCrypto(), x509Key, selectedSignatureSchemeInfo.getSignatureAndHashAlgorithm(), certificateRequestContext);<NEW_LINE>}
).toArray(TlsUtils.EMPTY_STRINGS);
612,046
protected JsonObject createHeader() {<NEW_LINE>com.google.gson.JsonObject jsonheader = new JsonObject();<NEW_LINE><MASK><NEW_LINE>List<String> critList = header.getCritical();<NEW_LINE>if (critList != null) {<NEW_LINE>JsonArray list = handleList(critList);<NEW_LINE>jsonheader.add("crit", list);<NEW_LINE>}<NEW_LINE>Set<String> keySet = header.keySet();<NEW_LINE>if (!keySet.isEmpty()) {<NEW_LINE>Iterator<String> it = keySet.iterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>String key = it.next();<NEW_LINE>Object value = header.get(key);<NEW_LINE>if (value instanceof List) {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>JsonArray list = handleList((List<String>) value);<NEW_LINE>jsonheader.add(key, list);<NEW_LINE>} else if (value instanceof String) {<NEW_LINE>jsonheader.addProperty(key, (String) value);<NEW_LINE>} else if (value instanceof Number) {<NEW_LINE>jsonheader.addProperty(key, (Number) value);<NEW_LINE>} else {<NEW_LINE>// TODO: handle nested elements<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return jsonheader;<NEW_LINE>}
jsonheader.addProperty(ALGORITHM_HEADER, "none");
646,692
private static void blockHitAir(ServerWorld serverWorld, RayTraceResult rayTraceResult, ElementalAir airInterfaceInstance) {<NEW_LINE>int arrowAirChargeLevel = airInterfaceInstance.getChargeLevel();<NEW_LINE>if (arrowAirChargeLevel == 0)<NEW_LINE>return;<NEW_LINE>if (!(rayTraceResult instanceof BlockRayTraceResult))<NEW_LINE>throw new AssertionError("BlockRayTraceResult expected");<NEW_LINE>BlockRayTraceResult blockRayTraceResult = (BlockRayTraceResult) rayTraceResult;<NEW_LINE>Vector3d hitPosition = blockRayTraceResult.getHitVec();<NEW_LINE>final Vector3d OFFSET_VARIATION = new Vector3d(0.0, 0.0, 0.0);<NEW_LINE>final int SPEED = 0;<NEW_LINE>final int PARTICLE_COUNT = 1;<NEW_LINE>serverWorld.spawnParticle(ParticleTypes.CLOUD, hitPosition.getX(), hitPosition.getY(), hitPosition.getZ(), PARTICLE_COUNT, OFFSET_VARIATION.getX(), OFFSET_VARIATION.getY(), <MASK><NEW_LINE>serverWorld.spawnParticle(ParticleTypes.HAPPY_VILLAGER, hitPosition.getX(), hitPosition.getY(), hitPosition.getZ(), 1, 0, 0, 0, SPEED);<NEW_LINE>}
OFFSET_VARIATION.getZ(), SPEED);
1,270,074
// NOTE: the type of each field of a source type is resolved when needed<NEW_LINE>@Override<NEW_LINE>public FieldBinding[] fields() {<NEW_LINE>if (!isPrototype()) {<NEW_LINE>if ((this.tagBits & TagBits.AreFieldsComplete) != 0)<NEW_LINE>return this.fields;<NEW_LINE>this.tagBits |= TagBits.AreFieldsComplete;<NEW_LINE>return this.fields = this.prototype.fields();<NEW_LINE>}<NEW_LINE>if ((this.tagBits & TagBits.AreFieldsComplete) != 0)<NEW_LINE>return this.fields;<NEW_LINE>// GROOVY add<NEW_LINE>if (!areFieldsInitialized()) {<NEW_LINE>this.scope.buildFields();<NEW_LINE>}<NEW_LINE>// GROOVY end<NEW_LINE>int failed = 0;<NEW_LINE>FieldBinding[] resolvedFields = this.fields;<NEW_LINE>try {<NEW_LINE>// lazily sort fields<NEW_LINE>if ((this.tagBits & TagBits.AreFieldsSorted) == 0) {<NEW_LINE>int length = this.fields.length;<NEW_LINE>if (length > 1)<NEW_LINE>ReferenceBinding.sortFields(<MASK><NEW_LINE>this.tagBits |= TagBits.AreFieldsSorted;<NEW_LINE>}<NEW_LINE>FieldBinding[] fieldsSnapshot = this.fields;<NEW_LINE>for (int i = 0, length = fieldsSnapshot.length; i < length; i++) {<NEW_LINE>if (resolveTypeFor(fieldsSnapshot[i]) == null) {<NEW_LINE>// do not alter original field array until resolution is over, due to reentrance (143259)<NEW_LINE>if (resolvedFields == fieldsSnapshot) {<NEW_LINE>System.arraycopy(fieldsSnapshot, 0, resolvedFields = new FieldBinding[length], 0, length);<NEW_LINE>}<NEW_LINE>resolvedFields[i] = null;<NEW_LINE>failed++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>if (failed > 0) {<NEW_LINE>// ensure fields are consistent reqardless of the error<NEW_LINE>int newSize = resolvedFields.length - failed;<NEW_LINE>if (newSize == 0)<NEW_LINE>return setFields(Binding.NO_FIELDS);<NEW_LINE>FieldBinding[] newFields = new FieldBinding[newSize];<NEW_LINE>for (int i = 0, j = 0, length = resolvedFields.length; i < length; i++) {<NEW_LINE>if (resolvedFields[i] != null)<NEW_LINE>newFields[j++] = resolvedFields[i];<NEW_LINE>}<NEW_LINE>setFields(newFields);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.tagBits |= TagBits.AreFieldsComplete;<NEW_LINE>return this.fields;<NEW_LINE>}
this.fields, 0, length);
1,573,838
private void installClassLiterals(List<JDeclaredType> classLiteralTypesToInstall) {<NEW_LINE>if (!closureCompilerFormatEnabled) {<NEW_LINE>// let createForClass() install them until a follow on CL<NEW_LINE>// TODO(cromwellian) remove after approval from rluble in follow up CL<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (JDeclaredType type : classLiteralTypesToInstall) {<NEW_LINE>if (shouldNotEmitTypeDefinition(type)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>JsNameRef classLiteralRef = createClassLiteralReference(type);<NEW_LINE>if (classLiteralRef == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>SourceInfo sourceInfo = type.getSourceInfo();<NEW_LINE>JsExpression <MASK><NEW_LINE>JsNameRef clazzField = getIndexedFieldJsName(RuntimeConstants.OBJECT_CLAZZ).makeRef(sourceInfo);<NEW_LINE>clazzField.setQualifier(protoRef);<NEW_LINE>JsExprStmt stmt = createAssignment(clazzField, classLiteralRef).makeStmt();<NEW_LINE>addTypeDefinitionStatement(type, stmt);<NEW_LINE>}<NEW_LINE>}
protoRef = getPrototypeQualifierOf(type, sourceInfo);
1,771,891
public TimePolicyRepresentation toRepresentation(Policy policy, AuthorizationProvider authorization) {<NEW_LINE>TimePolicyRepresentation representation = new TimePolicyRepresentation();<NEW_LINE>Map<String, String> config = policy.getConfig();<NEW_LINE>representation.setDayMonth(config.get("dayMonth"));<NEW_LINE>representation.setDayMonthEnd(config.get("dayMonthEnd"));<NEW_LINE>representation.setMonth(config.get("month"));<NEW_LINE>representation.setMonthEnd(config.get("monthEnd"));<NEW_LINE>representation.setYear(config.get("year"));<NEW_LINE>representation.setYearEnd(config.get("yearEnd"));<NEW_LINE>representation.setHour<MASK><NEW_LINE>representation.setHourEnd(config.get("hourEnd"));<NEW_LINE>representation.setMinute(config.get("minute"));<NEW_LINE>representation.setMinuteEnd(config.get("minuteEnd"));<NEW_LINE>representation.setNotBefore(config.get("nbf"));<NEW_LINE>representation.setNotOnOrAfter(config.get("noa"));<NEW_LINE>return representation;<NEW_LINE>}
(config.get("hour"));
505,068
private ContentletRelationships retrieveRelationshipsData(Contentlet currentcontent, User user, ActionRequest req) {<NEW_LINE>Set<String> keys = req.getParameterMap().keySet();<NEW_LINE>ContentletRelationships relationshipsData = new ContentletRelationships(currentcontent);<NEW_LINE>List<ContentletRelationshipRecords> relationshipsRecords = new ArrayList<ContentletRelationshipRecords>();<NEW_LINE>relationshipsData.setRelationshipsRecords(relationshipsRecords);<NEW_LINE>for (String key : keys) {<NEW_LINE>if (key.startsWith("rel_") && key.endsWith("_inodes")) {<NEW_LINE>boolean hasParent = key.contains("_P_");<NEW_LINE>String inodesSt = (String) req.getParameter(key);<NEW_LINE>String[] inodes = inodesSt.split(",");<NEW_LINE>Relationship relationship = APILocator.getRelationshipAPI().byInode(inodes[0]);<NEW_LINE>ContentletRelationshipRecords records = relationshipsData.new ContentletRelationshipRecords(relationship, hasParent);<NEW_LINE>ArrayList<Contentlet> cons <MASK><NEW_LINE>for (String inode : inodes) {<NEW_LINE>String i = "";<NEW_LINE>try {<NEW_LINE>i = inode;<NEW_LINE>} catch (Exception e) {<NEW_LINE>Logger.error(this, "Relationship not a number value : ", e);<NEW_LINE>}<NEW_LINE>if (relationship.getInode().equalsIgnoreCase(i)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>cons.add(conAPI.find(inode, user, false));<NEW_LINE>} catch (Exception e) {<NEW_LINE>Logger.debug(this, "Couldn't look up contentlet. Assuming inode" + inode + "is not content");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>records.setRecords(cons);<NEW_LINE>relationshipsRecords.add(records);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return relationshipsData;<NEW_LINE>}
= new ArrayList<Contentlet>();
1,764,397
public void contributeParameters(Map<String, Object> parameters) throws JRException {<NEW_LINE>DataSourceDataAdapter dsDataAdapter = getDataSourceDataAdapter();<NEW_LINE>if (dsDataAdapter != null) {<NEW_LINE>JRDataSource ds = null;<NEW_LINE>ClassLoader oldThreadClassLoader = Thread.currentThread().getContextClassLoader();<NEW_LINE>try {<NEW_LINE>Thread.currentThread().setContextClassLoader(getClassLoader(oldThreadClassLoader));<NEW_LINE>Class<?> clazz = JRClassLoader.loadClassForRealName(dsDataAdapter.getFactoryClass());<NEW_LINE>Object obj = null;<NEW_LINE>Method method = clazz.getMethod(dsDataAdapter.getMethodToCall(), new Class[0]);<NEW_LINE>if (!Modifier.isStatic(method.getModifiers()))<NEW_LINE>obj = clazz.getDeclaredConstructor().newInstance();<NEW_LINE>if (JRDataSource.class.isAssignableFrom(method.getReturnType())) {<NEW_LINE>ds = (JRDataSource) method.invoke(obj, new Object[0]);<NEW_LINE>} else {<NEW_LINE>throw new JRException(EXCEPTION_MESSAGE_KEY_INVALID_OBJECT_RETURNED, new Object[] { dsDataAdapter.getMethodToCall()<MASK><NEW_LINE>}<NEW_LINE>} catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException | IllegalAccessException | InstantiationException | NoClassDefFoundError e) {<NEW_LINE>throw new JRException(e);<NEW_LINE>} finally {<NEW_LINE>Thread.currentThread().setContextClassLoader(oldThreadClassLoader);<NEW_LINE>}<NEW_LINE>parameters.put(JRParameter.REPORT_DATA_SOURCE, ds);<NEW_LINE>}<NEW_LINE>}
, dsDataAdapter.getFactoryClass() });
1,306,701
public void parse(ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException {<NEW_LINE>ByteBuffer content = ByteBuffer.allocate(CastUtils.l2i(contentSize));<NEW_LINE>dataSource.read(content);<NEW_LINE>((Buffer) content).position(6);<NEW_LINE>dataReferenceIndex = IsoTypeReader.readUInt16(content);<NEW_LINE>displayFlags = content.getInt();<NEW_LINE>textJustification = content.getInt();<NEW_LINE>backgroundR = IsoTypeReader.readUInt16(content);<NEW_LINE>backgroundG = IsoTypeReader.readUInt16(content);<NEW_LINE><MASK><NEW_LINE>defaultTextBox = IsoTypeReader.readUInt64(content);<NEW_LINE>reserved1 = IsoTypeReader.readUInt64(content);<NEW_LINE>fontNumber = content.getShort();<NEW_LINE>fontFace = content.getShort();<NEW_LINE>reserved2 = content.get();<NEW_LINE>reserved3 = content.getShort();<NEW_LINE>foregroundR = IsoTypeReader.readUInt16(content);<NEW_LINE>foregroundG = IsoTypeReader.readUInt16(content);<NEW_LINE>foregroundB = IsoTypeReader.readUInt16(content);<NEW_LINE>if (content.remaining() > 0) {<NEW_LINE>int length = IsoTypeReader.readUInt8(content);<NEW_LINE>byte[] myFontName = new byte[length];<NEW_LINE>content.get(myFontName);<NEW_LINE>fontName = new String(myFontName);<NEW_LINE>} else {<NEW_LINE>fontName = null;<NEW_LINE>}<NEW_LINE>// initContainer(); there are no child boxes!?<NEW_LINE>}
backgroundB = IsoTypeReader.readUInt16(content);
1,092,104
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see com.fasterxml.jackson.databind.JsonDeserializer#deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>@SuppressWarnings("null")<NEW_LINE>public RepresentationModel<?> deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {<NEW_LINE>UberDocument doc = p.getCodec().readValue(p, UberDocument.class);<NEW_LINE>Links links = doc.getUber().getLinks();<NEW_LINE>//<NEW_LINE>RepresentationModel<?> //<NEW_LINE>result = //<NEW_LINE>doc.getUber().getData().stream().//<NEW_LINE>filter(//<NEW_LINE>uberData -> !StringUtils.isEmpty(uberData.getName())).//<NEW_LINE>findFirst().//<NEW_LINE>map(uberData -> convertToResourceSupport(uberData, links)).orElse(null);<NEW_LINE>return result == null ? new RepresentationModel<>(<MASK><NEW_LINE>}
).add(links) : result;