idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,311,582
@Path("{name}")<NEW_LINE>@POST<NEW_LINE>@Consumes(APPLICATION_JSON)<NEW_LINE>public Response createOrUpdateSecret(@Auth AutomationClient automationClient, @PathParam("name") String name, @Valid CreateOrUpdateSecretRequestV2 request) {<NEW_LINE>SecretBuilder builder = secretController.builder(name, request.content(), automationClient.getName(), request.expiry()).withDescription(request.description()).withMetadata(request.metadata()).withType(request.type());<NEW_LINE>builder.createOrUpdate();<NEW_LINE>Map<String, String> extraInfo = new HashMap<>();<NEW_LINE>if (request.description() != null) {<NEW_LINE>extraInfo.put("description", request.description());<NEW_LINE>}<NEW_LINE>if (request.metadata() != null) {<NEW_LINE>extraInfo.put("metadata", request.metadata().toString());<NEW_LINE>}<NEW_LINE>extraInfo.put("expiry", Long.toString(request.expiry()));<NEW_LINE>auditLog.recordEvent(new Event(Instant.now(), EventTag.SECRET_CREATEORUPDATE, automationClient.getName<MASK><NEW_LINE>UriBuilder uriBuilder = UriBuilder.fromResource(SecretResource.class).path(name);<NEW_LINE>return Response.created(uriBuilder.build()).build();<NEW_LINE>}
(), name, extraInfo));
53,324
private int topoOperationPolylinePolylineOrPolygon_(int geometry_dominant) {<NEW_LINE>EditShape shape = m_topo_graph.getShape();<NEW_LINE>int newGeometry = shape.createGeometry(Geometry.Type.Polyline);<NEW_LINE>int visitedEdges = m_topo_graph.createUserIndexForHalfEdges();<NEW_LINE>for (int cluster = m_topo_graph.getFirstCluster(); cluster != -1; cluster = m_topo_graph.getNextCluster(cluster)) {<NEW_LINE>int firstClusterHalfEdge = m_topo_graph.getClusterHalfEdge(cluster);<NEW_LINE>int clusterHalfEdge = firstClusterHalfEdge;<NEW_LINE>do {<NEW_LINE>int visited = <MASK><NEW_LINE>if (visited != 1) {<NEW_LINE>int parentage = getCombinedHalfEdgeParentage_(clusterHalfEdge);<NEW_LINE>if (isGoodParentage(parentage)) {<NEW_LINE>restorePolylineParts_(clusterHalfEdge, newGeometry, visitedEdges, -1, geometry_dominant);<NEW_LINE>} else {<NEW_LINE>//<NEW_LINE>}<NEW_LINE>}<NEW_LINE>clusterHalfEdge = m_topo_graph.getHalfEdgeNext(m_topo_graph.getHalfEdgeTwin(clusterHalfEdge));<NEW_LINE>} while (clusterHalfEdge != firstClusterHalfEdge);<NEW_LINE>}<NEW_LINE>m_topo_graph.deleteUserIndexForHalfEdges(visitedEdges);<NEW_LINE>return newGeometry;<NEW_LINE>}
m_topo_graph.getHalfEdgeUserIndex(clusterHalfEdge, visitedEdges);
1,098,145
public static QueryDeviceGroupListResponse unmarshall(QueryDeviceGroupListResponse queryDeviceGroupListResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryDeviceGroupListResponse.setRequestId(_ctx.stringValue("QueryDeviceGroupListResponse.RequestId"));<NEW_LINE>queryDeviceGroupListResponse.setSuccess(_ctx.booleanValue("QueryDeviceGroupListResponse.Success"));<NEW_LINE>queryDeviceGroupListResponse.setCode(_ctx.stringValue("QueryDeviceGroupListResponse.Code"));<NEW_LINE>queryDeviceGroupListResponse.setErrorMessage(_ctx.stringValue("QueryDeviceGroupListResponse.ErrorMessage"));<NEW_LINE>queryDeviceGroupListResponse.setCurrentPage(_ctx.integerValue("QueryDeviceGroupListResponse.CurrentPage"));<NEW_LINE>queryDeviceGroupListResponse.setPageCount(_ctx.integerValue("QueryDeviceGroupListResponse.PageCount"));<NEW_LINE>queryDeviceGroupListResponse.setPageSize(_ctx.integerValue("QueryDeviceGroupListResponse.PageSize"));<NEW_LINE>queryDeviceGroupListResponse.setTotal(_ctx.integerValue("QueryDeviceGroupListResponse.Total"));<NEW_LINE>List<GroupInfo> data = new ArrayList<GroupInfo>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("QueryDeviceGroupListResponse.Data.Length"); i++) {<NEW_LINE>GroupInfo groupInfo = new GroupInfo();<NEW_LINE>groupInfo.setGroupId(_ctx.stringValue("QueryDeviceGroupListResponse.Data[" + i + "].GroupId"));<NEW_LINE>groupInfo.setUtcCreate(_ctx.stringValue<MASK><NEW_LINE>groupInfo.setGroupName(_ctx.stringValue("QueryDeviceGroupListResponse.Data[" + i + "].GroupName"));<NEW_LINE>groupInfo.setGroupDesc(_ctx.stringValue("QueryDeviceGroupListResponse.Data[" + i + "].GroupDesc"));<NEW_LINE>groupInfo.setGroupType(_ctx.stringValue("QueryDeviceGroupListResponse.Data[" + i + "].GroupType"));<NEW_LINE>data.add(groupInfo);<NEW_LINE>}<NEW_LINE>queryDeviceGroupListResponse.setData(data);<NEW_LINE>return queryDeviceGroupListResponse;<NEW_LINE>}
("QueryDeviceGroupListResponse.Data[" + i + "].UtcCreate"));
1,154,807
public static void triggerRebirth(Context context) {<NEW_LINE>sp = PreferenceManager.getDefaultSharedPreferences(context);<NEW_LINE>sp.edit().putInt("restart_changed", 0).apply();<NEW_LINE>sp.edit().putBoolean("restoreOnRestart", true).apply();<NEW_LINE>MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(context);<NEW_LINE>builder.setTitle(R.string.menu_restart);<NEW_LINE>builder.setIcon(R.drawable.icon_alert);<NEW_LINE>builder.setMessage(R.string.toast_restart);<NEW_LINE>builder.setPositiveButton(R.string.app_ok, (dialog, whichButton) -> {<NEW_LINE>PackageManager packageManager = context.getPackageManager();<NEW_LINE>Intent intent = packageManager.getLaunchIntentForPackage(context.getPackageName());<NEW_LINE>assert intent != null;<NEW_LINE><MASK><NEW_LINE>Intent mainIntent = Intent.makeRestartActivityTask(componentName);<NEW_LINE>context.startActivity(mainIntent);<NEW_LINE>System.exit(0);<NEW_LINE>});<NEW_LINE>builder.setNegativeButton(R.string.app_cancel, (dialog, whichButton) -> dialog.cancel());<NEW_LINE>AlertDialog dialog = builder.create();<NEW_LINE>dialog.show();<NEW_LINE>HelperUnit.setupDialog(context, dialog);<NEW_LINE>}
ComponentName componentName = intent.getComponent();
418,152
public void postInitialize(Python3Core core) {<NEW_LINE>super.postInitialize(core);<NEW_LINE>PythonObjectFactory factory = core.factory();<NEW_LINE>PythonModule <MASK><NEW_LINE>ctypesModule.setAttribute("_string_at_addr", factory.createNativeVoidPtr(StringAtFunction.create()));<NEW_LINE>ctypesModule.setAttribute("_cast_addr", factory.createNativeVoidPtr(CastFunction.create()));<NEW_LINE>ctypesModule.setAttribute("_wstring_at_addr", factory.createNativeVoidPtr(WStringAtFunction.create()));<NEW_LINE>int rtldLocal = RTLD_LOCAL.getValueIfDefined();<NEW_LINE>ctypesModule.setAttribute("RTLD_LOCAL", rtldLocal);<NEW_LINE>ctypesModule.setAttribute("RTLD_GLOBAL", RTLD_GLOBAL.getValueIfDefined());<NEW_LINE>DLHandler handle = DlOpenNode.loadNFILibrary(core.getContext(), NFIBackend.NATIVE, "", rtldLocal);<NEW_LINE>setCtypeNFIHelpers(this, core.getContext(), handle);<NEW_LINE>NativeFunction memmove = MemMoveFunction.create(handle, core.getContext());<NEW_LINE>ctypesModule.setAttribute("_memmove_addr", factory.createNativeVoidPtr(memmove, memmove.adr));<NEW_LINE>NativeFunction memset = MemSetFunction.create(handle, core.getContext());<NEW_LINE>ctypesModule.setAttribute("_memset_addr", factory.createNativeVoidPtr(memset, memset.adr));<NEW_LINE>}
ctypesModule = core.lookupBuiltinModule("_ctypes");
8,488
public void generateIndexForJar(String pathToJar, String pathToIndexFile) throws IOException {<NEW_LINE><MASK><NEW_LINE>if (!f.exists()) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>throw new FileNotFoundException(pathToJar + " not found");<NEW_LINE>}<NEW_LINE>IndexLocation indexLocation = new FileIndexLocation(new File(pathToIndexFile));<NEW_LINE>Index index = new Index(indexLocation, pathToJar, false);<NEW_LINE>SearchParticipant participant = SearchEngine.getDefaultSearchParticipant();<NEW_LINE>index.separator = JAR_SEPARATOR;<NEW_LINE>ZipFile zip = new ZipFile(pathToJar);<NEW_LINE>try {<NEW_LINE>for (Enumeration e = zip.entries(); e.hasMoreElements(); ) {<NEW_LINE>// iterate each entry to index it<NEW_LINE>ZipEntry ze = (ZipEntry) e.nextElement();<NEW_LINE>String zipEntryName = ze.getName();<NEW_LINE>if (Util.isClassFileName(zipEntryName)) {<NEW_LINE>final byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getZipEntryByteContent(ze, zip);<NEW_LINE>JavaSearchDocument entryDocument = new JavaSearchDocument(ze, new Path(pathToJar), classFileBytes, participant);<NEW_LINE>entryDocument.setIndex(index);<NEW_LINE>new BinaryIndexer(entryDocument).indexDocument();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>index.save();<NEW_LINE>} finally {<NEW_LINE>zip.close();<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}
File f = new File(pathToJar);
238,802
private AnchorPane createBisqDAOContent() {<NEW_LINE>AnchorPane anchorPane = new AnchorPane();<NEW_LINE>anchorPane.setMinWidth(373);<NEW_LINE>GridPane bisqDAOPane = new GridPane();<NEW_LINE><MASK><NEW_LINE>bisqDAOPane.setVgap(5);<NEW_LINE>bisqDAOPane.setMaxWidth(373);<NEW_LINE>int rowIndex = 0;<NEW_LINE>TitledGroupBg theBisqDaoTitledGroup = addTitledGroupBg(bisqDAOPane, rowIndex, 3, Res.get("dao.news.bisqDAO.title"));<NEW_LINE>theBisqDaoTitledGroup.getStyleClass().addAll("last", "dao-news-titled-group");<NEW_LINE>Label daoTeaserContent = addMultilineLabel(bisqDAOPane, ++rowIndex, Res.get("dao.news.bisqDAO.description"));<NEW_LINE>daoTeaserContent.getStyleClass().add("dao-news-teaser");<NEW_LINE>Hyperlink hyperlink = addHyperlinkWithIcon(bisqDAOPane, ++rowIndex, Res.get("dao.news.bisqDAO.readMoreLink"), "https://bisq.network/docs/dao");<NEW_LINE>hyperlink.getStyleClass().add("dao-news-link");<NEW_LINE>anchorPane.getChildren().add(bisqDAOPane);<NEW_LINE>return anchorPane;<NEW_LINE>}
AnchorPane.setTopAnchor(bisqDAOPane, 0d);
73,974
public KafkaStreamsBinderConfigurationProperties binderConfigurationProperties(KafkaProperties kafkaProperties, ConfigurableEnvironment environment, BindingServiceProperties properties, ConfigurableApplicationContext context) throws Exception {<NEW_LINE>final Map<String, BinderConfiguration> binderConfigurations = getBinderConfigurations(properties);<NEW_LINE>for (Map.Entry<String, BinderConfiguration> entry : binderConfigurations.entrySet()) {<NEW_LINE>final <MASK><NEW_LINE>final String binderType = binderConfiguration.getBinderType();<NEW_LINE>if (binderType != null && (binderType.equals(KSTREAM_BINDER_TYPE) || binderType.equals(KTABLE_BINDER_TYPE) || binderType.equals(GLOBALKTABLE_BINDER_TYPE))) {<NEW_LINE>Map<String, Object> binderProperties = new HashMap<>();<NEW_LINE>this.flatten(null, binderConfiguration.getProperties(), binderProperties);<NEW_LINE>environment.getPropertySources().addFirst(new MapPropertySource(entry.getKey() + "-kafkaStreamsBinderEnv", binderProperties));<NEW_LINE>Binder binder = new Binder(ConfigurationPropertySources.get(environment), new PropertySourcesPlaceholdersResolver(environment), IntegrationUtils.getConversionService(context.getBeanFactory()), null);<NEW_LINE>final Constructor<KafkaStreamsBinderConfigurationProperties> kafkaStreamsBinderConfigurationPropertiesConstructor = ReflectionUtils.accessibleConstructor(KafkaStreamsBinderConfigurationProperties.class, KafkaProperties.class);<NEW_LINE>final KafkaStreamsBinderConfigurationProperties kafkaStreamsBinderConfigurationProperties = BeanUtils.instantiateClass(kafkaStreamsBinderConfigurationPropertiesConstructor, kafkaProperties);<NEW_LINE>final BindResult<KafkaStreamsBinderConfigurationProperties> bind = binder.bind("spring.cloud.stream.kafka.streams.binder", Bindable.ofInstance(kafkaStreamsBinderConfigurationProperties));<NEW_LINE>context.getBeanFactory().registerSingleton(entry.getKey() + "-KafkaStreamsBinderConfigurationProperties", bind.get());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new KafkaStreamsBinderConfigurationProperties(kafkaProperties);<NEW_LINE>}
BinderConfiguration binderConfiguration = entry.getValue();
1,356,603
static List<String> createRenameIndexSql(DriverTypeEnum.ConnectionProperties theConnectionProperties, String theTableName, String theOldIndexName, String theNewIndexName, DriverTypeEnum theDriverType) throws SQLException {<NEW_LINE>Validate.notBlank(theOldIndexName, "theOldIndexName must not be blank");<NEW_LINE>Validate.notBlank(theNewIndexName, "theNewIndexName must not be blank");<NEW_LINE>Validate.notBlank(theTableName, "theTableName must not be blank");<NEW_LINE>if (!JdbcUtils.getIndexNames(theConnectionProperties, theTableName).contains(theOldIndexName)) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>List<String> sql = new ArrayList<>();<NEW_LINE>// Drop constraint<NEW_LINE>switch(theDriverType) {<NEW_LINE>case MYSQL_5_7:<NEW_LINE>case MARIADB_10_1:<NEW_LINE>// Quote the index names as "PRIMARY" is a reserved word in MySQL<NEW_LINE>sql.add("rename index `" + <MASK><NEW_LINE>break;<NEW_LINE>case DERBY_EMBEDDED:<NEW_LINE>sql.add("rename index " + theOldIndexName + " to " + theNewIndexName);<NEW_LINE>break;<NEW_LINE>case H2_EMBEDDED:<NEW_LINE>case POSTGRES_9_4:<NEW_LINE>case ORACLE_12C:<NEW_LINE>sql.add("alter index " + theOldIndexName + " rename to " + theNewIndexName);<NEW_LINE>break;<NEW_LINE>case MSSQL_2012:<NEW_LINE>sql.add("EXEC sp_rename '" + theTableName + "." + theOldIndexName + "', '" + theNewIndexName + "'");<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>return sql;<NEW_LINE>}
theOldIndexName + "` to `" + theNewIndexName + "`");
847,848
private void createTree(TreeNode root) throws MissingResourceException {<NEW_LINE>if (tree == null) {<NEW_LINE>// add panel with appropriate content<NEW_LINE>tree = new JTree(root);<NEW_LINE>if ("Aqua".equals(UIManager.getLookAndFeel().getID())) {<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>tree.setBackground<MASK><NEW_LINE>}<NEW_LINE>ToolTipManager.sharedInstance().registerComponent(tree);<NEW_LINE>tree.setCellRenderer(new CheckRenderer(isQuery, tree.getBackground()));<NEW_LINE>// NOI18N<NEW_LINE>String s = NbBundle.getMessage(RefactoringPanel.class, "ACSD_usagesTree");<NEW_LINE>tree.getAccessibleContext().setAccessibleDescription(s);<NEW_LINE>tree.getAccessibleContext().setAccessibleName(s);<NEW_LINE>CheckNodeListener l = new CheckNodeListener(isQuery);<NEW_LINE>tree.addMouseListener(l);<NEW_LINE>tree.addKeyListener(l);<NEW_LINE>tree.setToggleClickCount(0);<NEW_LINE>tree.setTransferHandler(new TransferHandlerImpl());<NEW_LINE>scrollPane = new JScrollPane(tree);<NEW_LINE>scrollPane.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createMatteBorder(0, 1, 1, 1, javax.swing.UIManager.getDefaults().getColor("Separator.background")), javax.swing.BorderFactory.createMatteBorder(0, 1, 1, 1, javax.swing.UIManager.getDefaults().getColor("Separator.foreground"))));<NEW_LINE>RefactoringPanel.this.left.add(scrollPane, BorderLayout.CENTER);<NEW_LINE>RefactoringPanel.this.validate();<NEW_LINE>} else {<NEW_LINE>tree.setModel(new DefaultTreeModel(root));<NEW_LINE>}<NEW_LINE>tree.setRowHeight((int) ((CheckRenderer) tree.getCellRenderer()).getPreferredSize().getHeight());<NEW_LINE>this.tree.addTreeWillExpandListener(new TreeWillExpandListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {<NEW_LINE>Object last = event.getPath().getLastPathComponent();<NEW_LINE>if (last instanceof CheckNode) {<NEW_LINE>((CheckNode) last).ensureChildrenFilled((DefaultTreeModel) RefactoringPanel.this.tree.getModel());<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void treeWillCollapse(TreeExpansionEvent event) throws ExpandVetoException {<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
(UIManager.getColor("NbExplorerView.background"));
552,235
public void menuShown(MenuEvent e) {<NEW_LINE>Utils.clearMenu(friends_menu);<NEW_LINE>boolean enabled = plugin.isClassicEnabled();<NEW_LINE>if (enabled) {<NEW_LINE>MenuItem mi = new MenuItem(friends_menu, SWT.PUSH);<NEW_LINE>mi.setText(MessageText.getString("azbuddy.insert.friend.key"));<NEW_LINE>mi.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent event) {<NEW_LINE>String uri = getFriendURI(!chat.isAnonymous());<NEW_LINE>input_area.append(uri);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>mi.setEnabled(!chat.isReadOnly());<NEW_LINE>new MenuItem(friends_menu, SWT.SEPARATOR);<NEW_LINE>mi = new MenuItem(friends_menu, SWT.PUSH);<NEW_LINE>mi.setText(MessageText.getString("azbuddy.view.friends"));<NEW_LINE>mi.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent event) {<NEW_LINE>view.selectClassicTab();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>MenuItem mi = new <MASK><NEW_LINE>mi.setText(MessageText.getString("label.enable"));<NEW_LINE>mi.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent event) {<NEW_LINE>plugin.setClassicEnabled(true, false);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
MenuItem(friends_menu, SWT.PUSH);
1,300,293
private Optional<ResolvedField> resolveField(Expression node, QualifiedName name, boolean local) {<NEW_LINE>List<Field> matches = relation.resolveFields(name);<NEW_LINE>if (matches.size() > 1) {<NEW_LINE>throw ambiguousAttributeException(node, name);<NEW_LINE>} else if (matches.size() == 1) {<NEW_LINE>int parentFieldCount = getLocalParent().map(Scope::getLocalScopeFieldCount).orElse(0);<NEW_LINE>Field field = getOnlyElement(matches);<NEW_LINE>return Optional.of(asResolvedField(field, parentFieldCount, local));<NEW_LINE>} else {<NEW_LINE>if (isColumnReference(name, relation)) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>if (parent.isPresent()) {<NEW_LINE>if (queryBoundary) {<NEW_LINE>return parent.get().resolveField(node, name, false);<NEW_LINE>}<NEW_LINE>return parent.get().<MASK><NEW_LINE>}<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>}
resolveField(node, name, local);
1,608,952
private static double apply(CompLongFloatVector v1, LongFloatVector v2) {<NEW_LINE>double dotValue = 0.0;<NEW_LINE>if (v2.isSparse() && v1.size() > v2.size()) {<NEW_LINE>ObjectIterator<Long2FloatMap.Entry> iter = v2.getStorage().entryIterator();<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>Long2FloatMap.Entry entry = iter.next();<NEW_LINE>long idx = entry.getLongKey();<NEW_LINE>dotValue += v1.get(<MASK><NEW_LINE>}<NEW_LINE>} else if (v2.isSorted() && v1.size() > v2.size()) {<NEW_LINE>// v2 is sorted<NEW_LINE>long[] v2Indices = v2.getStorage().getIndices();<NEW_LINE>float[] v2Values = v2.getStorage().getValues();<NEW_LINE>for (int i = 0; i < v2Indices.length; i++) {<NEW_LINE>long idx = v2Indices[i];<NEW_LINE>dotValue += v1.get(idx) * v2Values[i];<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>long base = 0;<NEW_LINE>for (LongFloatVector part : v1.getPartitions()) {<NEW_LINE>if (part.isDense()) {<NEW_LINE>float[] partValues = part.getStorage().getValues();<NEW_LINE>for (int i = 0; i < partValues.length; i++) {<NEW_LINE>long idx = base + i;<NEW_LINE>dotValue += partValues[i] * v2.get(idx);<NEW_LINE>}<NEW_LINE>} else if (part.isSparse()) {<NEW_LINE>ObjectIterator<Long2FloatMap.Entry> iter = part.getStorage().entryIterator();<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>Long2FloatMap.Entry entry = iter.next();<NEW_LINE>long idx = base + entry.getLongKey();<NEW_LINE>dotValue += entry.getFloatValue() * v2.get(idx);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// isSorted<NEW_LINE>long[] partIndices = part.getStorage().getIndices();<NEW_LINE>float[] partValues = part.getStorage().getValues();<NEW_LINE>for (int i = 0; i < partIndices.length; i++) {<NEW_LINE>long idx = base + partIndices[i];<NEW_LINE>dotValue += partValues[i] * v2.get(idx);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>base += part.getDim();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return dotValue;<NEW_LINE>}
idx) * entry.getFloatValue();
888,312
private void migrateImage() {<NEW_LINE>addLog("@AD_Image_ID@");<NEW_LINE>KeyNamePair[] imageArray = DB.getKeyNamePairs("SELECT AD_Image_ID, Name " + "FROM AD_Image " + "WHERE AD_Client_ID = ? " + "AND NOT EXISTS(SELECT 1 FROM AD_AttachmentReference ar WHERE ar.AD_Image_ID = AD_Image.AD_Image_ID AND ar.FileHandler_ID = ?)", false, getAD_Client_ID(), getAppSupportId());<NEW_LINE>Arrays.asList(imageArray).forEach(imagePair -> {<NEW_LINE>Trx.run(new TrxRunnable() {<NEW_LINE><NEW_LINE>public void run(String trxName) {<NEW_LINE>MImage image = MImage.get(getCtx(), imagePair.getKey());<NEW_LINE>try {<NEW_LINE>AttachmentUtil.getInstance(getCtx()).withData(image.getData()).withImageId(image.getAD_Image_ID()).withFileName(image.getName()).withDescription(Msg.getMsg(getCtx(), "CreatedFromSetupExternalStorage")).withFileHandlerId(getFileHandlerId()).saveAttachment();<NEW_LINE>addLog(image.getName() + ": @Ok@");<NEW_LINE>processed.incrementAndGet();<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.warning("Error: " + e.getLocalizedMessage());<NEW_LINE>addLog("@ErrorProcessingFile@ " + image.getName() + <MASK><NEW_LINE>errors.incrementAndGet();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>});<NEW_LINE>}
": " + e.getLocalizedMessage());
1,368,948
public List<VolumeJoinVO> searchByIds(Long... volIds) {<NEW_LINE>// set detail batch query size<NEW_LINE>int DETAILS_BATCH_SIZE = 2000;<NEW_LINE>String batchCfg = _configDao.getValue("detail.batch.query.size");<NEW_LINE>if (batchCfg != null) {<NEW_LINE>DETAILS_BATCH_SIZE = Integer.parseInt(batchCfg);<NEW_LINE>}<NEW_LINE>// query details by batches<NEW_LINE>List<VolumeJoinVO> uvList = new ArrayList<VolumeJoinVO>();<NEW_LINE>// query details by batches<NEW_LINE>int curr_index = 0;<NEW_LINE>if (volIds.length > DETAILS_BATCH_SIZE) {<NEW_LINE>while ((curr_index + DETAILS_BATCH_SIZE) <= volIds.length) {<NEW_LINE>Long[] ids = new Long[DETAILS_BATCH_SIZE];<NEW_LINE>for (int k = 0, j = curr_index; j < curr_index + DETAILS_BATCH_SIZE; j++, k++) {<NEW_LINE>ids[k] = volIds[j];<NEW_LINE>}<NEW_LINE>SearchCriteria<VolumeJoinVO> sc = volSearch.create();<NEW_LINE>sc.setParameters("idIN", ids);<NEW_LINE>List<VolumeJoinVO> vms = searchIncludingRemoved(sc, null, null, false);<NEW_LINE>if (vms != null) {<NEW_LINE>uvList.addAll(vms);<NEW_LINE>}<NEW_LINE>curr_index += DETAILS_BATCH_SIZE;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (curr_index < volIds.length) {<NEW_LINE>int batch_size = (volIds.length - curr_index);<NEW_LINE>// set the ids value<NEW_LINE>Long[] ids = new Long[batch_size];<NEW_LINE>for (int k = 0, j = curr_index; j < curr_index + batch_size; j++, k++) {<NEW_LINE>ids[k] = volIds[j];<NEW_LINE>}<NEW_LINE>SearchCriteria<VolumeJoinVO<MASK><NEW_LINE>sc.setParameters("idIN", ids);<NEW_LINE>List<VolumeJoinVO> vms = searchIncludingRemoved(sc, null, null, false);<NEW_LINE>if (vms != null) {<NEW_LINE>uvList.addAll(vms);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return uvList;<NEW_LINE>}
> sc = volSearch.create();
1,694,175
public R invoke(Object... arguments) {<NEW_LINE>ConversionService<?> conversionService = this.conversionService;<NEW_LINE>Argument[] targetArguments = getArguments();<NEW_LINE>if (targetArguments.length == 0) {<NEW_LINE>return executableMethod.invoke();<NEW_LINE>} else {<NEW_LINE>List<Object> argumentList = new ArrayList<>(arguments.length);<NEW_LINE>Map<String, Object> variables = getVariableValues();<NEW_LINE>Iterator<Object> valueIterator = variables.values().iterator();<NEW_LINE>int i = 0;<NEW_LINE>for (Argument<?> targetArgument : targetArguments) {<NEW_LINE>String name = targetArgument.getName();<NEW_LINE>Object value = variables.get(name);<NEW_LINE>if (value != null) {<NEW_LINE>Optional<?> result = conversionService.convert(value, targetArgument.getType());<NEW_LINE>argumentList.add(result.orElseThrow(() -> new <MASK><NEW_LINE>} else if (valueIterator.hasNext()) {<NEW_LINE>Optional<?> result = conversionService.convert(valueIterator.next(), targetArgument.getType());<NEW_LINE>argumentList.add(result.orElseThrow(() -> new IllegalArgumentException("Wrong argument types to method: " + executableMethod)));<NEW_LINE>} else if (i < arguments.length) {<NEW_LINE>Optional<?> result = conversionService.convert(arguments[i++], targetArgument.getType());<NEW_LINE>argumentList.add(result.orElseThrow(() -> new IllegalArgumentException("Wrong argument types to method: " + executableMethod)));<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("Wrong number of arguments to method: " + executableMethod);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return executableMethod.invoke(argumentList.toArray());<NEW_LINE>}<NEW_LINE>}
IllegalArgumentException("Wrong argument types to method: " + executableMethod)));
462,623
public String[] xmlBeansFoldersToScan() {<NEW_LINE>String foldersStr = settings.getString("boot-java", "support-spring-xml-config", "scan-folders");<NEW_LINE>if (foldersStr != null) {<NEW_LINE>foldersStr = foldersStr.trim();<NEW_LINE>}<NEW_LINE>String[] folders = foldersStr == null || foldersStr.isEmpty() ? new String[0] : foldersStr.split("\\s*,\\s*");<NEW_LINE>List<String> cleanedFolders = new ArrayList<>(folders.length);<NEW_LINE>for (String folder : folders) {<NEW_LINE>int startIndex = 0;<NEW_LINE>int endIndex = folder.length();<NEW_LINE>if (folder.startsWith(File.separator)) {<NEW_LINE>startIndex <MASK><NEW_LINE>}<NEW_LINE>if (folder.endsWith(File.separator)) {<NEW_LINE>endIndex -= File.separator.length();<NEW_LINE>}<NEW_LINE>if (startIndex > 0 || endIndex < folder.length()) {<NEW_LINE>if (startIndex < endIndex) {<NEW_LINE>cleanedFolders.add(folder.substring(startIndex, endIndex));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>cleanedFolders.add(folder);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return cleanedFolders.toArray(new String[cleanedFolders.size()]);<NEW_LINE>}
+= File.separator.length();
928,792
private void notifySensorStatusListeners(final FullSensor fullSensor, final String type) {<NEW_LINE>if (sensorStatusListeners.isEmpty()) {<NEW_LINE>logger.debug("No sensor status listeners to notify of sensor change for sensor '{}'", fullSensor.getId());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (SensorStatusListener sensorStatusListener : sensorStatusListeners) {<NEW_LINE>try {<NEW_LINE>switch(type) {<NEW_LINE>case STATE_ADDED:<NEW_LINE>logger.debug("Sending sensorAdded for sensor '{}'", fullSensor.getId());<NEW_LINE>sensorStatusListener.onSensorAdded(hueBridge, fullSensor);<NEW_LINE>break;<NEW_LINE>case STATE_CHANGED:<NEW_LINE>logger.debug(<MASK><NEW_LINE>sensorStatusListener.onSensorStateChanged(hueBridge, fullSensor);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new IllegalArgumentException("Could not notify sensorStatusListeners for unknown event type " + type);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error("An exception occurred while calling the Sensor Listeners", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
"Sending sensorStateChanged for sensor '{}'", fullSensor.getId());
439,087
private static void highlightRefIfNeeded(@NotNull GoReferenceExpressionBase o, @Nullable PsiElement resolve, @NotNull AnnotationHolder holder) {<NEW_LINE>if (resolve instanceof GoTypeSpec) {<NEW_LINE>TextAttributesKey key = GoPsiImplUtil.builtin(resolve) ? BUILTIN_TYPE_REFERENCE : getColor((GoTypeSpec) resolve);<NEW_LINE>if (o.getParent() instanceof GoType) {<NEW_LINE>GoType topmostType = PsiTreeUtil.getTopmostParentOfType(o, GoType.class);<NEW_LINE>if (topmostType != null && topmostType.getParent() instanceof GoReceiver) {<NEW_LINE>key = TYPE_REFERENCE;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setHighlighting(o.getIdentifier(), holder, key);<NEW_LINE>} else if (resolve instanceof GoConstDefinition) {<NEW_LINE>TextAttributesKey color = GoPsiImplUtil.builtin(resolve) ? BUILTIN_TYPE_REFERENCE <MASK><NEW_LINE>setHighlighting(o.getIdentifier(), holder, color);<NEW_LINE>} else if (resolve instanceof GoVarDefinition) {<NEW_LINE>TextAttributesKey color = GoPsiImplUtil.builtin(resolve) ? BUILTIN_TYPE_REFERENCE : getColor((GoVarDefinition) resolve);<NEW_LINE>setHighlighting(o.getIdentifier(), holder, color);<NEW_LINE>} else if (resolve instanceof GoFieldDefinition) {<NEW_LINE>setHighlighting(o.getIdentifier(), holder, getColor((GoFieldDefinition) resolve));<NEW_LINE>} else if (resolve instanceof GoFunctionOrMethodDeclaration || resolve instanceof GoMethodSpec) {<NEW_LINE>setHighlighting(o.getIdentifier(), holder, getColor((GoNamedSignatureOwner) resolve));<NEW_LINE>} else if (resolve instanceof GoReceiver) {<NEW_LINE>setHighlighting(o.getIdentifier(), holder, METHOD_RECEIVER);<NEW_LINE>} else if (resolve instanceof GoParamDefinition) {<NEW_LINE>setHighlighting(o.getIdentifier(), holder, FUNCTION_PARAMETER);<NEW_LINE>}<NEW_LINE>}
: getColor((GoConstDefinition) resolve);
1,445,856
private Object JSONMerge(List<Object> parameters) throws ParserException {<NEW_LINE>Object json = asJSON(parameters.get<MASK><NEW_LINE>if (json instanceof JSONArray) {<NEW_LINE>// Create a new JSON Array to preserve immutability for the macro script.<NEW_LINE>JSONArray jarr = JSONArray.fromObject(json);<NEW_LINE>for (int i = 1; i < parameters.size(); i++) {<NEW_LINE>Object o2 = asJSON(parameters.get(i).toString());<NEW_LINE>if (!(o2 instanceof JSONArray)) {<NEW_LINE>throw new ParserException(I18N.getText("macro.function.json.onlyJSON", o2 == null ? "NULL" : o2.toString(), "json.merge"));<NEW_LINE>}<NEW_LINE>jarr.addAll((JSONArray) o2);<NEW_LINE>}<NEW_LINE>return jarr;<NEW_LINE>} else if (json instanceof JSONObject) {<NEW_LINE>// Create a new JSON Array to preserve immutability for the macro script.<NEW_LINE>JSONObject jobj = JSONObject.fromObject(json);<NEW_LINE>for (int i = 1; i < parameters.size(); i++) {<NEW_LINE>Object o2 = asJSON(parameters.get(i).toString());<NEW_LINE>if (!(o2 instanceof JSONObject)) {<NEW_LINE>throw new ParserException(I18N.getText("macro.function.json.onlyJSON", o2 == null ? "NULL" : o2.toString(), "json.merge"));<NEW_LINE>}<NEW_LINE>jobj.putAll((JSONObject) o2);<NEW_LINE>}<NEW_LINE>return jobj;<NEW_LINE>} else {<NEW_LINE>throw new ParserException(I18N.getText("macro.function.json.onlyJSON", json == null ? "NULL" : json.toString(), "json.merge"));<NEW_LINE>}<NEW_LINE>}
(0).toString());
344,726
protected FormInstanceInfo resolveFormInstanceModel(FormDefinitionCacheEntry formCacheEntry, FormInstance formInstance, CommandContext commandContext) {<NEW_LINE>FormDefinitionEntity formDefinitionEntity = formCacheEntry.getFormDefinitionEntity();<NEW_LINE>FormJsonConverter formJsonConverter = CommandContextUtil.getFormEngineConfiguration().getFormJsonConverter();<NEW_LINE>SimpleFormModel formModel = formJsonConverter.convertToFormModel(formCacheEntry.getFormDefinitionJson());<NEW_LINE>FormInstanceInfo formInstanceModel = new FormInstanceInfo();<NEW_LINE>formInstanceModel.setId(formDefinitionEntity.getId());<NEW_LINE>formInstanceModel.setName(formDefinitionEntity.getName());<NEW_LINE>formInstanceModel.setVersion(formDefinitionEntity.getVersion());<NEW_LINE>formInstanceModel.setKey(formDefinitionEntity.getKey());<NEW_LINE>formInstanceModel.setTenantId(formDefinitionEntity.getTenantId());<NEW_LINE>formInstanceModel.setFormModel(formModel);<NEW_LINE>if (formInstance != null) {<NEW_LINE>formInstanceModel.setFormInstanceId(formInstance.getId());<NEW_LINE>formInstanceModel.setTaskId(formInstance.getTaskId());<NEW_LINE>formInstanceModel.setProcessInstanceId(formInstance.getProcessInstanceId());<NEW_LINE>formInstanceModel.setProcessDefinitionId(formInstance.getProcessDefinitionId());<NEW_LINE>formInstanceModel.<MASK><NEW_LINE>formInstanceModel.setScopeType(formInstance.getScopeType());<NEW_LINE>formInstanceModel.setScopeDefinitionId(formInstance.getScopeDefinitionId());<NEW_LINE>formInstanceModel.setSubmittedBy(formInstance.getSubmittedBy());<NEW_LINE>formInstanceModel.setSubmittedDate(formInstance.getSubmittedDate());<NEW_LINE>}<NEW_LINE>return formInstanceModel;<NEW_LINE>}
setScopeId(formInstance.getScopeId());
936,992
public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {<NEW_LINE>final InstrumentClass target = instrumentor.getInstrumentClass(loader, className, classfileBuffer);<NEW_LINE>// Async Object<NEW_LINE>target.addField(AsyncContextAccessor.class);<NEW_LINE>target.addField(ReactorContextAccessor.class);<NEW_LINE>for (InstrumentMethod constructorMethod : target.getDeclaredConstructors()) {<NEW_LINE>final String[] parameterTypes = constructorMethod.getParameterTypes();<NEW_LINE>if (parameterTypes != null || parameterTypes.length > 0) {<NEW_LINE>constructorMethod.addInterceptor(ConnectableFluxConstructorInterceptor.class);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final InstrumentMethod subscribeMethod = target.getDeclaredMethod("subscribe", "reactor.core.CoreSubscriber");<NEW_LINE>if (subscribeMethod != null) {<NEW_LINE>subscribeMethod.addInterceptor(ConnectableFluxSubscribeInterceptor.class, va(ReactorConstants.REACTOR_NETTY));<NEW_LINE>}<NEW_LINE>// since 3.3.0<NEW_LINE>final InstrumentMethod subscribeOrReturnMethod = target.getDeclaredMethod("subscribeOrReturn", "reactor.core.CoreSubscriber");<NEW_LINE>if (subscribeOrReturnMethod != null) {<NEW_LINE>subscribeOrReturnMethod.addInterceptor(ConnectableFluxSubscribeInterceptor.class, va(ReactorConstants.REACTOR_NETTY));<NEW_LINE>}<NEW_LINE>final InstrumentMethod connectMethod = <MASK><NEW_LINE>if (connectMethod != null) {<NEW_LINE>connectMethod.addInterceptor(ConnectableFluxSubscribeInterceptor.class, va(ReactorConstants.REACTOR_NETTY));<NEW_LINE>}<NEW_LINE>return target.toBytecode();<NEW_LINE>}
target.getDeclaredMethod("connect", "java.util.function.Consumer");
556,210
private void calculateVisibleArea(PlayerView view) {<NEW_LINE>if (visibleAreaMap.get(view) != null && visibleAreaMap.get(view).visibleArea.getBounds().getCenterX() != 0.0d) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Cache it<NEW_LINE>VisibleAreaMeta meta = new VisibleAreaMeta();<NEW_LINE>meta.visibleArea = new Area();<NEW_LINE>visibleAreaMap.put(view, meta);<NEW_LINE>// Calculate it<NEW_LINE>final <MASK><NEW_LINE>final boolean checkOwnership = MapTool.getServerPolicy().isUseIndividualViews() || MapTool.isPersonalServer();<NEW_LINE>List<Token> tokenList = view.isUsingTokenView() ? view.getTokens() : zone.getTokensFiltered(t -> t.isToken() && t.getHasSight() && (isGMview || t.isVisible()));<NEW_LINE>for (Token token : tokenList) {<NEW_LINE>boolean weOwnIt = AppUtil.playerOwns(token);<NEW_LINE>// Permission<NEW_LINE>if (checkOwnership) {<NEW_LINE>if (!weOwnIt) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// If we're viewing the map as a player and the token is not a PC, then skip it.<NEW_LINE>if (!isGMview && token.getType() != Token.Type.PC && !AppUtil.ownedByOnePlayer(token)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// player ownership permission<NEW_LINE>if (token.isVisibleOnlyToOwner() && !weOwnIt) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Area tokenVision = getVisibleArea(token);<NEW_LINE>if (tokenVision != null) {<NEW_LINE>meta.visibleArea.add(tokenVision);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// System.out.println("calculateVisibleArea: " + (System.currentTimeMillis() - startTime) +<NEW_LINE>// "ms");<NEW_LINE>}
boolean isGMview = view.isGMView();
711,387
public static ErrorDescription nestedSynchronized(HintContext ctx) {<NEW_LINE>class Found extends Error {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public synchronized Throwable fillInStackTrace() {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>TreePath up = ctx.getPath().getParentPath();<NEW_LINE>while (up != null && up.getLeaf().getKind() != Kind.METHOD && !TreeUtilities.CLASS_TREE_KINDS.contains(up.getLeaf().getKind())) {<NEW_LINE>if (up.getLeaf().getKind() == Kind.SYNCHRONIZED) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>up = up.getParentPath();<NEW_LINE>}<NEW_LINE>boolean report = false;<NEW_LINE>if (up != null && up.getLeaf().getKind() == Kind.METHOD) {<NEW_LINE>MethodTree mt = (MethodTree) up.getLeaf();<NEW_LINE>report = mt.getModifiers().getFlags().contains(Modifier.SYNCHRONIZED);<NEW_LINE>}<NEW_LINE>if (!report) {<NEW_LINE>try {<NEW_LINE>new ErrorAwareTreeScanner<Void, Void>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Void visitClass(ClassTree node, Void p) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Void visitSynchronized(SynchronizedTree node, Void p) {<NEW_LINE>throw new Found();<NEW_LINE>}<NEW_LINE>}.scan(ctx.getVariables().get("$block").getLeaf(), null);<NEW_LINE>return null;<NEW_LINE>} catch (Found f) {<NEW_LINE>// OK:<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String displayName = NbBundle.<MASK><NEW_LINE>return ErrorDescriptionFactory.forName(ctx, ctx.getPath(), displayName);<NEW_LINE>}
getMessage(Tiny.class, "ERR_NestedSynchronized");
682,361
public String intToRoman(int num) {<NEW_LINE>Map<Integer, String> map = new HashMap();<NEW_LINE>map.put(1, "I");<NEW_LINE>map.put(5, "V");<NEW_LINE>map.put(10, "X");<NEW_LINE>map.put(50, "L");<NEW_LINE>map.put(100, "C");<NEW_LINE>map.put(500, "D");<NEW_LINE>map.put(1000, "M");<NEW_LINE><MASK><NEW_LINE>map.put(9, "IX");<NEW_LINE>map.put(40, "XL");<NEW_LINE>map.put(90, "XC");<NEW_LINE>map.put(400, "CD");<NEW_LINE>map.put(900, "CM");<NEW_LINE>int[] sequence = { 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1 };<NEW_LINE>StringBuffer sb = new StringBuffer();<NEW_LINE>for (int i = 0; i < sequence.length; i++) {<NEW_LINE>int base = sequence[i];<NEW_LINE>while (num >= base) {<NEW_LINE>sb.append(map.get(base));<NEW_LINE>num -= base;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return sb.toString();<NEW_LINE>}
map.put(4, "IV");
579,108
public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {<NEW_LINE>super.readExternal(in);<NEW_LINE>final <MASK><NEW_LINE>final String namespace;<NEW_LINE>final String valueFactoryClass;<NEW_LINE>switch(version) {<NEW_LINE>case VERSION0:<NEW_LINE>namespace = in.readUTF();<NEW_LINE>valueFactoryClass = in.readUTF();<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new IOException("unknown version=" + version);<NEW_LINE>}<NEW_LINE>// set the namespace field.<NEW_LINE>this.namespace = namespace;<NEW_LINE>// resolve the valueSerializer from the value factory class.<NEW_LINE>try {<NEW_LINE>final Class<?> vfc = Class.forName(valueFactoryClass);<NEW_LINE>if (!BigdataValueFactory.class.isAssignableFrom(vfc)) {<NEW_LINE>throw new RuntimeException(AbstractTripleStore.Options.VALUE_FACTORY_CLASS + ": Must extend: " + BigdataValueFactory.class.getName());<NEW_LINE>}<NEW_LINE>final Method gi = vfc.getMethod("getInstance", String.class);<NEW_LINE>this.valueFactory = (BigdataValueFactory) gi.invoke(null, namespace);<NEW_LINE>} catch (NoSuchMethodException e) {<NEW_LINE>throw new IOException(e);<NEW_LINE>} catch (InvocationTargetException e) {<NEW_LINE>throw new IOException(e);<NEW_LINE>} catch (IllegalAccessException e) {<NEW_LINE>throw new IOException(e);<NEW_LINE>}<NEW_LINE>valueSer = this.valueFactory.getValueSerializer();<NEW_LINE>}
byte version = in.readByte();
220,966
private void insertBreakInMLC(ActionEvent e, RSyntaxTextArea textArea, int line) {<NEW_LINE>Matcher m;<NEW_LINE>int start;<NEW_LINE>int end;<NEW_LINE>String text;<NEW_LINE>try {<NEW_LINE>start = textArea.getLineStartOffset(line);<NEW_LINE>end = textArea.getLineEndOffset(line);<NEW_LINE>text = textArea.getText(start, end - start);<NEW_LINE>m = MLC_PATTERN.matcher(text);<NEW_LINE>} catch (BadLocationException ble) {<NEW_LINE>// Never happens<NEW_LINE>UIManager.getLookAndFeel().provideErrorFeedback(textArea);<NEW_LINE>ble.printStackTrace();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (m.lookingAt()) {<NEW_LINE>String leadingWS = m.group(1);<NEW_LINE>String mlcMarker = m.group(2);<NEW_LINE>// If the caret is "inside" any leading whitespace or MLC<NEW_LINE>// marker, move it to the end of the line.<NEW_LINE>int dot = textArea.getCaretPosition();<NEW_LINE>if (dot >= start && dot < start + leadingWS.length() + mlcMarker.length()) {<NEW_LINE>// If we're in the whitespace before the very start of the<NEW_LINE>// MLC though, just insert a normal newline<NEW_LINE>if (mlcMarker.charAt(0) == '/') {<NEW_LINE>handleInsertBreak(textArea, true);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>textArea.setCaretPosition(end - 1);<NEW_LINE>} else {<NEW_LINE>// Ensure caret is at the "end" of any whitespace<NEW_LINE>// immediately after the '*', but before any possible<NEW_LINE>// non-whitespace chars.<NEW_LINE>boolean moved = false;<NEW_LINE>while (dot < end - 1 && Character.isWhitespace(text.charAt(dot - start))) {<NEW_LINE>moved = true;<NEW_LINE>dot++;<NEW_LINE>}<NEW_LINE>if (moved) {<NEW_LINE>textArea.setCaretPosition(dot);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>boolean firstMlcLine = mlcMarker.charAt(0) == '/';<NEW_LINE>boolean nested = appearsNested(textArea, line, start + <MASK><NEW_LINE>String header = leadingWS + (firstMlcLine ? " * " : "*") + m.group(3);<NEW_LINE>textArea.replaceSelection("\n" + header);<NEW_LINE>if (nested) {<NEW_LINE>// Has changed<NEW_LINE>dot = textArea.getCaretPosition();<NEW_LINE>textArea.insert("\n" + leadingWS + " */", dot);<NEW_LINE>textArea.setCaretPosition(dot);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>handleInsertBreak(textArea, true);<NEW_LINE>}<NEW_LINE>}
leadingWS.length() + 2);
476,451
Iterator<Entry<Cut<C>, Range<C>>> descendingEntryIterator() {<NEW_LINE>if (restriction.isEmpty()) {<NEW_LINE>return Iterators.emptyIterator();<NEW_LINE>}<NEW_LINE>Cut<Cut<C>> upperBoundOnLowerBounds = Ordering.natural().min(lowerBoundWindow.upperBound, Cut.belowValue(restriction.upperBound));<NEW_LINE>Iterator<Range<C>> completeRangeItr = rangesByLowerBound.headMap(upperBoundOnLowerBounds.endpoint(), upperBoundOnLowerBounds.typeAsUpperBound() == BoundType.CLOSED).descendingMap()<MASK><NEW_LINE>return new AbstractIterator<Entry<Cut<C>, Range<C>>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>@CheckForNull<NEW_LINE>protected Entry<Cut<C>, Range<C>> computeNext() {<NEW_LINE>if (!completeRangeItr.hasNext()) {<NEW_LINE>return endOfData();<NEW_LINE>}<NEW_LINE>Range<C> nextRange = completeRangeItr.next();<NEW_LINE>if (restriction.lowerBound.compareTo(nextRange.upperBound) >= 0) {<NEW_LINE>return endOfData();<NEW_LINE>}<NEW_LINE>nextRange = nextRange.intersection(restriction);<NEW_LINE>if (lowerBoundWindow.contains(nextRange.lowerBound)) {<NEW_LINE>return Maps.immutableEntry(nextRange.lowerBound, nextRange);<NEW_LINE>} else {<NEW_LINE>return endOfData();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
.values().iterator();
1,357,049
public void start(Stage mainStage) {<NEW_LINE>try {<NEW_LINE>FallbackExceptionHandler.installExceptionHandler();<NEW_LINE>// Init preferences<NEW_LINE>final JabRefPreferences preferences = JabRefPreferences.getInstance();<NEW_LINE>Globals.prefs = preferences;<NEW_LINE>// Perform migrations<NEW_LINE>PreferencesMigrations.runMigrations();<NEW_LINE><MASK><NEW_LINE>configureSSL(preferences.getSSLPreferences());<NEW_LINE>Globals.startBackgroundTasks();<NEW_LINE>applyPreferences(preferences);<NEW_LINE>clearOldSearchIndices();<NEW_LINE>try {<NEW_LINE>// Process arguments<NEW_LINE>ArgumentProcessor argumentProcessor = new ArgumentProcessor(arguments, ArgumentProcessor.Mode.INITIAL_START, preferences);<NEW_LINE>// Check for running JabRef<NEW_LINE>if (!handleMultipleAppInstances(arguments, preferences) || argumentProcessor.shouldShutDown()) {<NEW_LINE>Platform.exit();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// If not, start GUI<NEW_LINE>new JabRefGUI(mainStage, argumentProcessor.getParserResults(), argumentProcessor.isBlank(), preferences);<NEW_LINE>} catch (ParseException e) {<NEW_LINE>LOGGER.error("Problem parsing arguments", e);<NEW_LINE>JabRefCLI.printUsage();<NEW_LINE>Platform.exit();<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>LOGGER.error("Unexpected exception", ex);<NEW_LINE>Platform.exit();<NEW_LINE>}<NEW_LINE>}
configureProxy(preferences.getProxyPreferences());
143,401
protected void pushOnElementStack(int kind, int info, Object objectInfo) {<NEW_LINE>if (this.elementPtr < -1)<NEW_LINE>return;<NEW_LINE>this.previousKind = 0;<NEW_LINE>this.previousInfo = 0;<NEW_LINE>this.previousObjectInfo = null;<NEW_LINE>int stackLength = this.elementKindStack.length;<NEW_LINE>if (++this.elementPtr >= stackLength) {<NEW_LINE>System.arraycopy(this.elementKindStack, 0, this.elementKindStack = new int[stackLength + StackIncrement], 0, stackLength);<NEW_LINE>System.arraycopy(this.elementInfoStack, 0, this.elementInfoStack = new int[stackLength + StackIncrement], 0, stackLength);<NEW_LINE>System.arraycopy(this.elementObjectInfoStack, 0, this.elementObjectInfoStack = new Object[stackLength + StackIncrement], 0, stackLength);<NEW_LINE>}<NEW_LINE>this.<MASK><NEW_LINE>this.elementInfoStack[this.elementPtr] = info;<NEW_LINE>this.elementObjectInfoStack[this.elementPtr] = objectInfo;<NEW_LINE>}
elementKindStack[this.elementPtr] = kind;
1,757,924
public void uploadFromFileCodeSnippets() {<NEW_LINE>// BEGIN: com.azure.storage.file.datalake.DataLakeFileAsyncClient.uploadFromFile#String<NEW_LINE>client.uploadFromFile(filePath).doOnError(throwable -> System.err.printf("Failed to upload from file %s%n", throwable.getMessage())).subscribe(completion -> System.out.println("Upload from file succeeded"));<NEW_LINE>// END: com.azure.storage.file.datalake.DataLakeFileAsyncClient.uploadFromFile#String<NEW_LINE>// BEGIN: com.azure.storage.file.datalake.DataLakeFileAsyncClient.uploadFromFile#String-boolean<NEW_LINE>// Default behavior<NEW_LINE>boolean overwrite = false;<NEW_LINE>client.uploadFromFile(filePath, overwrite).doOnError(throwable -> System.err.printf("Failed to upload from file %s%n", throwable.getMessage())).subscribe(completion -> System.out.println("Upload from file succeeded"));<NEW_LINE>// END: com.azure.storage.file.datalake.DataLakeFileAsyncClient.uploadFromFile#String-boolean<NEW_LINE>// BEGIN: com.azure.storage.file.datalake.DataLakeFileAsyncClient.uploadFromFile#String-ParallelTransferOptions-PathHttpHeaders-Map-DataLakeRequestConditions<NEW_LINE>PathHttpHeaders headers = new PathHttpHeaders().setContentMd5("data".getBytes(StandardCharsets.UTF_8)).setContentLanguage("en-US").setContentType("binary");<NEW_LINE>Map<String, String> metadata = Collections.singletonMap("metadata", "value");<NEW_LINE>DataLakeRequestConditions requestConditions = new DataLakeRequestConditions().setLeaseId(leaseId).setIfUnmodifiedSince(OffsetDateTime.now<MASK><NEW_LINE>// 100 MB;<NEW_LINE>Long blockSize = 100L * 1024L * 1024L;<NEW_LINE>ParallelTransferOptions parallelTransferOptions = new ParallelTransferOptions().setBlockSizeLong(blockSize);<NEW_LINE>client.uploadFromFile(filePath, parallelTransferOptions, headers, metadata, requestConditions).doOnError(throwable -> System.err.printf("Failed to upload from file %s%n", throwable.getMessage())).subscribe(completion -> System.out.println("Upload from file succeeded"));<NEW_LINE>// END: com.azure.storage.file.datalake.DataLakeFileAsyncClient.uploadFromFile#String-ParallelTransferOptions-PathHttpHeaders-Map-DataLakeRequestConditions<NEW_LINE>}
().minusDays(3));
480,387
final DescribeModelPackageResult executeDescribeModelPackage(DescribeModelPackageRequest describeModelPackageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeModelPackageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeModelPackageRequest> request = null;<NEW_LINE>Response<DescribeModelPackageResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeModelPackageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeModelPackageRequest));<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(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SageMaker");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeModelPackage");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeModelPackageResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeModelPackageResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.SIGNING_REGION, getSigningRegion());
1,505,472
public boolean union(RWSet other) {<NEW_LINE>if (other == null || isFull) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>boolean ret = false;<NEW_LINE>if (other instanceof MethodRWSet) {<NEW_LINE>MethodRWSet o = (MethodRWSet) other;<NEW_LINE>if (o.getCallsNative()) {<NEW_LINE>ret = !getCallsNative() | ret;<NEW_LINE>setCallsNative();<NEW_LINE>}<NEW_LINE>if (o.isFull) {<NEW_LINE>ret = !isFull | ret;<NEW_LINE>isFull = true;<NEW_LINE>if (true) {<NEW_LINE>throw new RuntimeException(<MASK><NEW_LINE>}<NEW_LINE>globals = null;<NEW_LINE>fields = null;<NEW_LINE>return ret;<NEW_LINE>}<NEW_LINE>if (o.globals != null) {<NEW_LINE>if (globals == null) {<NEW_LINE>globals = new HashSet<SootField>();<NEW_LINE>}<NEW_LINE>ret = globals.addAll(o.globals) | ret;<NEW_LINE>if (globals.size() > MAX_SIZE) {<NEW_LINE>globals = null;<NEW_LINE>isFull = true;<NEW_LINE>throw new RuntimeException("attempt to add full set " + o + " into " + this);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (o.fields != null) {<NEW_LINE>for (Object field : o.fields.keySet()) {<NEW_LINE>ret = addFieldRef(o.getBaseForField(field), field) | ret;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (other instanceof StmtRWSet) {<NEW_LINE>StmtRWSet oth = (StmtRWSet) other;<NEW_LINE>if (oth.base != null) {<NEW_LINE>ret = addFieldRef(oth.base, oth.field) | ret;<NEW_LINE>} else if (oth.field != null) {<NEW_LINE>ret = addGlobal((SootField) oth.field) | ret;<NEW_LINE>}<NEW_LINE>} else if (other instanceof SiteRWSet) {<NEW_LINE>SiteRWSet oth = (SiteRWSet) other;<NEW_LINE>for (RWSet set : oth.sets) {<NEW_LINE>this.union(set);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!getCallsNative() && other.getCallsNative()) {<NEW_LINE>setCallsNative();<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return ret;<NEW_LINE>}
"attempt to add full set " + o + " into " + this);
1,171,195
public void start() {<NEW_LINE>int localPort = getLocalPort();<NEW_LINE>listenerCallBack = new SoapMonitorListenerCallBack() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void fireAddMessageExchange(WsdlMonitorMessageExchange messageExchange) {<NEW_LINE>addMessageExchange(messageExchange);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>monitorEngine = new SoapMonitorEngineImpl(sslEndpoint);<NEW_LINE>monitorEngine.setIncludedContentTypes(ContentTypes.of(project.getSettings().getString(SoapMonitorAction.LaunchForm.SET_CONTENT_TYPES, SoapMonitorAction.defaultContentTypes().toString())));<NEW_LINE>monitorEngine.start(this.getProject(), localPort, listenerCallBack);<NEW_LINE>if (monitorEngine.isRunning()) {<NEW_LINE>stopButton.setEnabled(true);<NEW_LINE>startButton.setEnabled(false);<NEW_LINE>optionsButton.setEnabled(false);<NEW_LINE>infoLabel.setText((monitorEngine.isProxy() ? "HTTP Proxy " : "SSL Tunnel ") + "on port " + localPort);<NEW_LINE>progressBar.setIndeterminate(true);<NEW_LINE>if (setAsProxy) {<NEW_LINE>oldProxyHost = SoapUI.getSettings().getString(ProxySettings.HOST, "");<NEW_LINE>oldProxyPort = SoapUI.getSettings().getString(ProxySettings.PORT, "");<NEW_LINE>oldProxyEnabled = SoapUI.getSettings().getBoolean(ProxySettings.ENABLE_PROXY);<NEW_LINE>oldProxyAuto = SoapUI.getSettings().getBoolean(ProxySettings.AUTO_PROXY);<NEW_LINE>SoapUI.getSettings().setString(ProxySettings.HOST, "127.0.0.1");<NEW_LINE>SoapUI.getSettings().setString(ProxySettings.PORT<MASK><NEW_LINE>SoapUI.getSettings().setBoolean(ProxySettings.ENABLE_PROXY, true);<NEW_LINE>SoapUI.getSettings().setBoolean(ProxySettings.AUTO_PROXY, false);<NEW_LINE>SoapUI.updateProxyFromSettings();<NEW_LINE>}<NEW_LINE>SoapUI.log.info("Started HTTP Monitor on local port " + localPort);<NEW_LINE>} else {<NEW_LINE>stopButton.setEnabled(false);<NEW_LINE>startButton.setEnabled(true);<NEW_LINE>optionsButton.setEnabled(true);<NEW_LINE>infoLabel.setText("Stopped");<NEW_LINE>progressBar.setIndeterminate(false);<NEW_LINE>SoapUI.log.info("Could not start HTTP Monitor on local port " + localPort);<NEW_LINE>}<NEW_LINE>}
, String.valueOf(localPort));
580,423
private static void pointAddPrecomp(PointPrecomp p, PointExt r) {<NEW_LINE>int[] b = F.create();<NEW_LINE>int[] c = F.create();<NEW_LINE>int[] d = F.create();<NEW_LINE>int[] e = F.create();<NEW_LINE>int[] f = F.create();<NEW_LINE>int[] g = F.create();<NEW_LINE>int[] h = F.create();<NEW_LINE>F.sqr(r.z, b);<NEW_LINE>F.mul(p.x, r.x, c);<NEW_LINE>F.mul(p.y, r.y, d);<NEW_LINE>F.mul(c, d, e);<NEW_LINE>F.mul(e, -C_d, e);<NEW_LINE>// F.apm(b, e, f, g);<NEW_LINE>F.add(b, e, f);<NEW_LINE>F.sub(b, e, g);<NEW_LINE>F.add(p.x, p.y, b);<NEW_LINE>F.add(r.x, r.y, e);<NEW_LINE>F.mul(b, e, h);<NEW_LINE>// F.apm(d, c, b, e);<NEW_LINE>F.add(d, c, b);<NEW_LINE>F.sub(d, c, e);<NEW_LINE>F.carry(b);<NEW_LINE>F.sub(h, b, h);<NEW_LINE>F.mul(h, r.z, h);<NEW_LINE>F.mul(<MASK><NEW_LINE>F.mul(f, h, r.x);<NEW_LINE>F.mul(e, g, r.y);<NEW_LINE>F.mul(f, g, r.z);<NEW_LINE>}
e, r.z, e);
1,824,432
public static IPartitionList createFilter(AEKeyFilter filter, Collection<ItemStack> list) {<NEW_LINE>IPartitionList myPartitionList = null;<NEW_LINE>final MergedPriorityList myMergedList = new MergedPriorityList();<NEW_LINE>for (var currentViewCell : list) {<NEW_LINE>if (currentViewCell == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (currentViewCell.getItem() instanceof ViewCellItem) {<NEW_LINE>var priorityList = new KeyCounter();<NEW_LINE>var vc = (ICellWorkbenchItem) currentViewCell.getItem();<NEW_LINE>var config = vc.getConfigInventory(currentViewCell);<NEW_LINE>var fzMode = vc.getFuzzyMode(currentViewCell);<NEW_LINE>for (int i = 0; i < config.size(); i++) {<NEW_LINE>var what = config.getKey(i);<NEW_LINE>if (what != null && filter.matches(what)) {<NEW_LINE>priorityList.add(what, 1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!priorityList.isEmpty()) {<NEW_LINE>var upgrades = vc.getUpgrades(currentViewCell);<NEW_LINE>var hasInverter = <MASK><NEW_LINE>if (upgrades.isInstalled(AEItems.FUZZY_CARD)) {<NEW_LINE>myMergedList.addNewList(new FuzzyPriorityList(priorityList, fzMode), !hasInverter);<NEW_LINE>} else {<NEW_LINE>myMergedList.addNewList(new PrecisePriorityList(priorityList), !hasInverter);<NEW_LINE>}<NEW_LINE>myPartitionList = myMergedList;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return myPartitionList;<NEW_LINE>}
upgrades.isInstalled(AEItems.INVERTER_CARD);
4,389
public Composite createControl(Composite parent, DashboardResources resources) {<NEW_LINE>Composite container = new Composite(parent, SWT.NONE);<NEW_LINE>container.setBackground(parent.getBackground());<NEW_LINE>GridLayoutFactory.fillDefaults().numColumns(1).margins(5, 5).applyTo(container);<NEW_LINE>title = new Label(container, SWT.NONE);<NEW_LINE>title.setText(TextUtil.tooltip(getWidget().getLabel()));<NEW_LINE>title.setBackground(container.getBackground());<NEW_LINE>GridDataFactory.fillDefaults().grab(true, false).applyTo(title);<NEW_LINE>indicator = new Label(container, SWT.NONE);<NEW_LINE>indicator.setData(UIConstants.CSS.CLASS_NAME, UIConstants.CSS.KPI);<NEW_LINE>indicator.setBackground(container.getBackground());<NEW_LINE>// $NON-NLS-1$<NEW_LINE>indicator.setText("");<NEW_LINE>GridDataFactory.fillDefaults().grab(true, false).applyTo(indicator);<NEW_LINE>InfoToolTip.attach(indicator, () -> {<NEW_LINE>ReportingPeriod period = get(ReportingPeriodConfig.class).getReportingPeriod();<NEW_LINE>ExchangeRateTimeSeries series = get(ExchangeRateSeriesConfig.class).getSeries();<NEW_LINE>Optional<ExchangeRate> rate = series.lookupRate(period.toInterval(LocalDate.now<MASK><NEW_LINE>return // $NON-NLS-1$<NEW_LINE>rate.isPresent() ? // $NON-NLS-1$<NEW_LINE>MessageFormat.format(Messages.TooltipDateOfExchangeRate, formatter.format(rate.get().getTime())) : "";<NEW_LINE>});<NEW_LINE>update(null);<NEW_LINE>return container;<NEW_LINE>}
()).getEnd());
1,362,152
public <T> CompletionStage<ReadResultSet<T>> readFromEventJournal(long startSequence, int minSize, int maxSize, int partitionId, java.util.function.Predicate<? super EventJournalMapEvent<K, V>> predicate, java.util.function.Function<? super EventJournalMapEvent<K, V>, ? extends T> projection) {<NEW_LINE>if (maxSize < minSize) {<NEW_LINE>throw new IllegalArgumentException("maxSize " + maxSize + " must be greater or equal to minSize " + minSize);<NEW_LINE>}<NEW_LINE>final ManagedContext context = serializationService.getManagedContext();<NEW_LINE>predicate = (java.util.function.Predicate<? super EventJournalMapEvent<K, V><MASK><NEW_LINE>projection = (java.util.function.Function<? super EventJournalMapEvent<K, V>, ? extends T>) context.initialize(projection);<NEW_LINE>final MapEventJournalReadOperation<K, V, T> op = new MapEventJournalReadOperation<>(name, startSequence, minSize, maxSize, predicate, projection);<NEW_LINE>op.setPartitionId(partitionId);<NEW_LINE>return operationService.invokeOnPartition(op);<NEW_LINE>}
>) context.initialize(predicate);
1,350,020
public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) {<NEW_LINE>FieldsType ft = cit.getFields();<NEW_LINE>if (ft == null) {<NEW_LINE>ft = new FieldsType();<NEW_LINE>cit.setFields(ft);<NEW_LINE>}<NEW_LINE>final List<FieldInfoType> fieldList = ft.getField();<NEW_LINE><MASK><NEW_LINE>fieldList.add(fit);<NEW_LINE>// Field Name<NEW_LINE>fit.setName(name);<NEW_LINE>if (desc != null) {<NEW_LINE>// Field Type<NEW_LINE>Type type = Type.getType(desc);<NEW_LINE>fit.setType(AsmHelper.normalizeClassName(type.getClassName()));<NEW_LINE>}<NEW_LINE>// Field Modifiers<NEW_LINE>ModifiersType modTypes = new ModifiersType();<NEW_LINE>modTypes.getModifier().addAll(AsmHelper.resolveAsmOpcode(AsmHelper.RoleFilter.FIELD, (access)));<NEW_LINE>fit.setModifiers(modTypes);<NEW_LINE>fit.setIsSynthetic((access & Opcodes.ACC_SYNTHETIC) != 0);<NEW_LINE>return new CAFieldVisitor(fit);<NEW_LINE>}
final FieldInfoType fit = new FieldInfoType();
1,246,140
public void executeStreamQuery(final ServerWebSocket webSocket, final MultiMap requestParams, final KsqlSecurityContext ksqlSecurityContext, final Context context) {<NEW_LINE>try {<NEW_LINE>final long startTimeNanos = Time.SYSTEM.nanoseconds();<NEW_LINE>activenessRegistrar.updateLastRequestTime();<NEW_LINE>validateVersion(requestParams);<NEW_LINE>final KsqlRequest request = parseRequest(requestParams);<NEW_LINE>try {<NEW_LINE>CommandStoreUtil.waitForCommandSequenceNumber(commandQueue, request, commandQueueCatchupTimeout);<NEW_LINE>} catch (final InterruptedException e) {<NEW_LINE>log.debug("Interrupted while waiting for command queue " + "to reach specified command sequence number", e);<NEW_LINE>SessionUtil.closeSilently(webSocket, INTERNAL_SERVER_ERROR.code(), e.getMessage());<NEW_LINE>return;<NEW_LINE>} catch (final TimeoutException e) {<NEW_LINE>log.debug("Timeout while processing request", e);<NEW_LINE>SessionUtil.closeSilently(webSocket, TRY_AGAIN_LATER.code(), e.getMessage());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final PreparedStatement<?> preparedStatement = parseStatement(request);<NEW_LINE>final Statement statement = preparedStatement.getStatement();<NEW_LINE>authorizationValidator.ifPresent(validator -> validator.checkAuthorization(ksqlSecurityContext, ksqlEngine<MASK><NEW_LINE>final RequestContext requestContext = new RequestContext(webSocket, request, ksqlSecurityContext);<NEW_LINE>if (statement instanceof Query) {<NEW_LINE>handleQuery(requestContext, (Query) statement, startTimeNanos, context);<NEW_LINE>} else if (statement instanceof PrintTopic) {<NEW_LINE>handlePrintTopic(requestContext, (PrintTopic) statement);<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("Unexpected statement type " + statement);<NEW_LINE>}<NEW_LINE>} catch (final TopicAuthorizationException e) {<NEW_LINE>log.debug("Error processing request", e);<NEW_LINE>SessionUtil.closeSilently(webSocket, INVALID_MESSAGE_TYPE.code(), errorHandler.kafkaAuthorizationErrorMessage(e));<NEW_LINE>} catch (final Exception e) {<NEW_LINE>log.debug("Error processing request", e);<NEW_LINE>SessionUtil.closeSilently(webSocket, INVALID_MESSAGE_TYPE.code(), e.getMessage());<NEW_LINE>}<NEW_LINE>}
.getMetaStore(), statement));
1,325,806
private <T> T doSaveVersioned(AdaptibleEntity<T> source, String collectionName) {<NEW_LINE>if (source.isNew()) {<NEW_LINE>return (T) doInsert(collectionName, source.getBean(), this.mongoConverter);<NEW_LINE>}<NEW_LINE>// Create query for entity with the id and old version<NEW_LINE>Query query = source.getQueryForVersion();<NEW_LINE>// Bump version number<NEW_LINE>T toSave = source.incrementVersion();<NEW_LINE>toSave = maybeEmitEvent(new BeforeConvertEvent<T>(toSave, collectionName)).getSource();<NEW_LINE>toSave = maybeCallBeforeConvert(toSave, collectionName);<NEW_LINE>if (source.getBean() != toSave) {<NEW_LINE>source = operations.forEntity(toSave, mongoConverter.getConversionService());<NEW_LINE>}<NEW_LINE>source.assertUpdateableIdIfNotSet();<NEW_LINE>MappedDocument mapped = source.toMappedDocument(mongoConverter);<NEW_LINE>maybeEmitEvent(new BeforeSaveEvent<>(toSave, mapped<MASK><NEW_LINE>toSave = maybeCallBeforeSave(toSave, mapped.getDocument(), collectionName);<NEW_LINE>UpdateDefinition update = mapped.updateWithoutId();<NEW_LINE>UpdateResult result = doUpdate(collectionName, query, update, toSave.getClass(), false, false);<NEW_LINE>if (result.getModifiedCount() == 0) {<NEW_LINE>throw new OptimisticLockingFailureException(String.format("Cannot save entity %s with version %s to collection %s. Has it been modified meanwhile?", source.getId(), source.getVersion(), collectionName));<NEW_LINE>}<NEW_LINE>maybeEmitEvent(new AfterSaveEvent<>(toSave, mapped.getDocument(), collectionName));<NEW_LINE>return maybeCallAfterSave(toSave, mapped.getDocument(), collectionName);<NEW_LINE>}
.getDocument(), collectionName));
677,808
private void writeChart(JRChart chart, String chartName) {<NEW_LINE>if (chart != null) {<NEW_LINE>write(chartName + ".setShowLegend({0});\n", getBooleanText(chart.getShowLegend()));<NEW_LINE>write(chartName + ".setEvaluationTime({0});\n", chart.getEvaluationTimeValue(), EvaluationTimeEnum.NOW);<NEW_LINE>write(chartName + ".setEvaluationGroup({0});\n", getGroupName(chart.getEvaluationGroup()));<NEW_LINE>if (chart.getLinkType() != null) {<NEW_LINE>write(chartName + ".setLinkType(\"{0}\");\n", JRStringUtil.escapeJavaStringLiteral(chart.getLinkType()), HyperlinkTypeEnum.NONE.getName());<NEW_LINE>}<NEW_LINE>if (chart.getLinkTarget() != null) {<NEW_LINE>write(chartName + ".setLinkTarget(\"{0}\");\n", JRStringUtil.escapeJavaStringLiteral(chart.getLinkTarget()), HyperlinkTargetEnum.SELF.getName());<NEW_LINE>}<NEW_LINE>write(chartName + ".setBookmarkLevel({0, number, #});\n", chart.getBookmarkLevel(), JRAnchor.NO_BOOKMARK);<NEW_LINE>if (chart.getCustomizerClass() != null) {<NEW_LINE>write(chartName + ".setCustomizerClass(\"{0}\");\n", JRStringUtil.escapeJavaStringLiteral(chart.getCustomizerClass()));<NEW_LINE>}<NEW_LINE>write(chartName + ".setRenderType(\"{0}\");\n", JRStringUtil.escapeJavaStringLiteral(chart.getRenderType()));<NEW_LINE>write(chartName + ".setTheme(\"{0}\");\n", JRStringUtil.escapeJavaStringLiteral(chart.getTheme()));<NEW_LINE>writeReportElement(chart, chartName);<NEW_LINE>writeBox(chart.getLineBox(), chartName + ".getLineBox()");<NEW_LINE>write(chartName + ".setTitlePosition({0});\n", chart.getTitlePositionValue());<NEW_LINE>write(chartName + ".setTitleColor({0});\n", chart.getOwnTitleColor());<NEW_LINE>if (chart.getTitleFont() != null) {<NEW_LINE>write(chartName + ".setTitleFont(new JRBaseFont());\n");<NEW_LINE>writeFont(chart.getTitleFont(), chartName + ".getTitleFont()");<NEW_LINE>}<NEW_LINE>writeExpression(chart.getTitleExpression(), chartName, "TitleExpression");<NEW_LINE>write(chartName + ".setSubtitleColor({0});\n", chart.getOwnSubtitleColor());<NEW_LINE>if (chart.getSubtitleFont() != null) {<NEW_LINE>write(chartName + ".setSubtitleFont(new JRBaseFont());\n");<NEW_LINE>writeFont(chart.<MASK><NEW_LINE>}<NEW_LINE>writeExpression(chart.getSubtitleExpression(), chartName, "SubtitleExpression");<NEW_LINE>write(chartName + ".setLegendColor({0});\n", chart.getOwnLegendColor());<NEW_LINE>write(chartName + ".setLegendBackgroundColor({0});\n", chart.getOwnLegendBackgroundColor());<NEW_LINE>write(chartName + ".setLegendPosition({0});\n", chart.getLegendPositionValue());<NEW_LINE>if (chart.getLegendFont() != null) {<NEW_LINE>write(chartName + ".setLegendFont(new JRBaseFont());\n");<NEW_LINE>writeFont(chart.getLegendFont(), chartName + ".getLegendFont()");<NEW_LINE>}<NEW_LINE>writeExpression(chart.getBookmarkLevelExpression(), chartName, "BookmarkLevelExpression");<NEW_LINE>writeExpression(chart.getAnchorNameExpression(), chartName, "AnchorNameExpression");<NEW_LINE>writeExpression(chart.getHyperlinkReferenceExpression(), chartName, "HyperlinkReferenceExpression");<NEW_LINE>// FIXMENOW can we reuse hyperlink write method?<NEW_LINE>writeExpression(chart.getHyperlinkWhenExpression(), chartName, "HyperlinkWhenExpression");<NEW_LINE>writeExpression(chart.getHyperlinkAnchorExpression(), chartName, "HyperlinkAnchorExpression");<NEW_LINE>writeExpression(chart.getHyperlinkPageExpression(), chartName, "HyperlinkPageExpression");<NEW_LINE>writeExpression(chart.getHyperlinkTooltipExpression(), chartName, "HyperlinkTooltipExpression");<NEW_LINE>writeHyperlinkParameters(chart.getHyperlinkParameters(), chartName);<NEW_LINE>flush();<NEW_LINE>}<NEW_LINE>}
getSubtitleFont(), chartName + ".getSubtitleFont()");
912,697
default String[][] toStrings(final int numRows, final boolean truncate) {<NEW_LINE>String[] names = names();<NEW_LINE>int numCols = names.length;<NEW_LINE>int maxColWidth = numCols == 1 ? 78 : (numCols == 2 ? 38 : 20);<NEW_LINE>// For array values, replace Seq and Array with square brackets<NEW_LINE>// For cells that are beyond maxColumnWidth characters, truncate it with "..."<NEW_LINE>return stream().limit(numRows).map(row -> {<NEW_LINE>String[] cells = new String[numCols];<NEW_LINE>for (int i = 0; i < numCols; i++) {<NEW_LINE>String str = row.toString(i);<NEW_LINE>cells[i] = (truncate && str.length() > maxColWidth) ? str.substring(0, maxColWidth - 3) + "..." : str;<NEW_LINE>}<NEW_LINE>return cells;<NEW_LINE>}).toArray(<MASK><NEW_LINE>}
String[][]::new);
1,502,570
final CreateServiceLinkedRoleResult executeCreateServiceLinkedRole(CreateServiceLinkedRoleRequest createServiceLinkedRoleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createServiceLinkedRoleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateServiceLinkedRoleRequest> request = null;<NEW_LINE>Response<CreateServiceLinkedRoleResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateServiceLinkedRoleRequestMarshaller().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, "IAM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateServiceLinkedRole");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<CreateServiceLinkedRoleResult> responseHandler = new StaxResponseHandler<CreateServiceLinkedRoleResult>(new CreateServiceLinkedRoleResultStaxUnmarshaller());<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(createServiceLinkedRoleRequest));
49,789
private static void assertPrevCount(RegressionEnvironment env) {<NEW_LINE>sendTimer(env, 0);<NEW_LINE>sendMarketEvent(env, "IBM", 75);<NEW_LINE>assertCountAndPrice(env, 1L, 75D);<NEW_LINE>sendMarketEvent(env, "IBM", 76);<NEW_LINE>assertCountAndPrice(env, 2L, 75D);<NEW_LINE>sendTimer(env, 10000);<NEW_LINE>sendMarketEvent(env, "IBM", 77);<NEW_LINE><MASK><NEW_LINE>sendTimer(env, 20000);<NEW_LINE>sendMarketEvent(env, "IBM", 78);<NEW_LINE>assertCountAndPrice(env, 4L, 75D);<NEW_LINE>sendTimer(env, 50000);<NEW_LINE>sendMarketEvent(env, "IBM", 79);<NEW_LINE>assertCountAndPrice(env, 5L, 75D);<NEW_LINE>sendTimer(env, 60000);<NEW_LINE>env.assertListener("s0", listener -> {<NEW_LINE>assertEquals(1, listener.getOldDataList().size());<NEW_LINE>EventBean[] oldData = listener.getLastOldData();<NEW_LINE>assertEquals(2, oldData.length);<NEW_LINE>assertCountAndPrice(oldData[0], 3L, null);<NEW_LINE>listener.reset();<NEW_LINE>});<NEW_LINE>sendMarketEvent(env, "IBM", 80);<NEW_LINE>assertCountAndPrice(env, 4L, 77D);<NEW_LINE>sendTimer(env, 65000);<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>sendTimer(env, 70000);<NEW_LINE>env.assertListener("s0", listener -> {<NEW_LINE>assertEquals(1, listener.getOldDataList().size());<NEW_LINE>EventBean[] oldData = listener.getLastOldData();<NEW_LINE>assertEquals(1, oldData.length);<NEW_LINE>assertCountAndPrice(oldData[0], 3L, null);<NEW_LINE>listener.reset();<NEW_LINE>});<NEW_LINE>sendTimer(env, 80000);<NEW_LINE>env.listenerReset("s0");<NEW_LINE>sendMarketEvent(env, "IBM", 81);<NEW_LINE>assertCountAndPrice(env, 3L, 79D);<NEW_LINE>sendTimer(env, 120000);<NEW_LINE>env.listenerReset("s0");<NEW_LINE>sendMarketEvent(env, "IBM", 82);<NEW_LINE>assertCountAndPrice(env, 2L, 81D);<NEW_LINE>sendTimer(env, 300000);<NEW_LINE>env.listenerReset("s0");<NEW_LINE>sendMarketEvent(env, "IBM", 83);<NEW_LINE>assertCountAndPrice(env, 1L, 83D);<NEW_LINE>}
assertCountAndPrice(env, 3L, 75D);
301,244
protected void doWriteSymbolMap(TreeLogger logger, CompilationResult result, PrintWriter pw) throws UnableToCompleteException {<NEW_LINE>pw.println("# { " + result.getPermutationId() + " }");<NEW_LINE>for (SortedMap<SelectionProperty, String> map : result.getPropertyMap()) {<NEW_LINE>pw.print("# { ");<NEW_LINE>printPropertyMap(pw, map);<NEW_LINE>pw.println(" }");<NEW_LINE>}<NEW_LINE>pw.println("# jsName, jsniIdent, className, memberName, sourceUri, sourceLine, fragmentNumber");<NEW_LINE>StringBuilder sb = new StringBuilder(1024);<NEW_LINE>char[] buf = new char[1024];<NEW_LINE>for (SymbolData symbol : result.getSymbolMap()) {<NEW_LINE>sb.append(symbol.getSymbolName());<NEW_LINE>sb.append(',');<NEW_LINE>String jsniIdent = symbol.getJsniIdent();<NEW_LINE>if (jsniIdent != null) {<NEW_LINE>sb.append(jsniIdent);<NEW_LINE>}<NEW_LINE>sb.append(',');<NEW_LINE>sb.append(symbol.getClassName());<NEW_LINE>sb.append(',');<NEW_LINE>String memberName = symbol.getMemberName();<NEW_LINE>if (memberName != null) {<NEW_LINE>sb.append(memberName);<NEW_LINE>}<NEW_LINE>sb.append(',');<NEW_LINE>String sourceUri = symbol.getSourceUri();<NEW_LINE>if (sourceUri != null) {<NEW_LINE>sb.append(sourceUri);<NEW_LINE>}<NEW_LINE>sb.append(',');<NEW_LINE>sb.append(symbol.getSourceLine());<NEW_LINE>sb.append(',');<NEW_LINE>sb.append(symbol.getFragmentNumber());<NEW_LINE>sb.append('\n');<NEW_LINE>int sbLen = sb.length();<NEW_LINE>if (buf.length < sbLen) {<NEW_LINE>int bufLen = buf.length;<NEW_LINE>while (bufLen < sbLen) {<NEW_LINE>bufLen <<= 1;<NEW_LINE>}<NEW_LINE>buf = new char[bufLen];<NEW_LINE>}<NEW_LINE>sb.getChars(0, sbLen, buf, 0);<NEW_LINE>pw.<MASK><NEW_LINE>sb.setLength(0);<NEW_LINE>}<NEW_LINE>}
write(buf, 0, sbLen);
293,712
private void loadNode367() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.CertificateGroupType_TrustList_GetPosition_OutputArguments, new QualifiedName(0, "OutputArguments"), new LocalizedText("en", "OutputArguments"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.Argument, 1, new UInteger[] { org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger.valueOf(0) }, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.CertificateGroupType_TrustList_GetPosition_OutputArguments, Identifiers.HasTypeDefinition, Identifiers.PropertyType<MASK><NEW_LINE>node.addReference(new Reference(Identifiers.CertificateGroupType_TrustList_GetPosition_OutputArguments, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.CertificateGroupType_TrustList_GetPosition_OutputArguments, Identifiers.HasProperty, Identifiers.CertificateGroupType_TrustList_GetPosition.expanded(), false));<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("<ListOfExtensionObject xmlns=\"http://opcfoundation.org/UA/2008/02/Types.xsd\"><ExtensionObject><TypeId><Identifier>i=297</Identifier> </TypeId><Body><Argument><Name>Position</Name><DataType><Identifier>i=9</Identifier> </DataType><ValueRank>-1</ValueRank><ArrayDimensions/> </Argument> </Body> </ExtensionObject> </ListOfExtensionObject>");<NEW_LINE>String xml = sb.toString();<NEW_LINE>OpcUaXmlStreamDecoder decoder = new OpcUaXmlStreamDecoder(context.getServer().getSerializationContext()).setInput(new StringReader(xml));<NEW_LINE>Object o = decoder.readVariantValue();<NEW_LINE>DataValue value = new DataValue(new Variant(o));<NEW_LINE>node.setValue(value);<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
.expanded(), true));
236,737
public void modifyTestElement(TestElement extractor) {<NEW_LINE>super.configureTestElement(extractor);<NEW_LINE>if (extractor instanceof HtmlExtractor) {<NEW_LINE>HtmlExtractor htmlExtractor = (HtmlExtractor) extractor;<NEW_LINE>saveScopeSettings(htmlExtractor);<NEW_LINE>htmlExtractor.setRefName(refNameField.getText());<NEW_LINE>htmlExtractor.<MASK><NEW_LINE>htmlExtractor.setAttribute(attributeField.getText());<NEW_LINE>htmlExtractor.setDefaultValue(defaultField.getText());<NEW_LINE>htmlExtractor.setDefaultEmptyValue(emptyDefaultValue.isSelected());<NEW_LINE>htmlExtractor.setMatchNumber(matchNumberField.getText());<NEW_LINE>if (extractorImplName.getSelectedIndex() < HtmlExtractor.getImplementations().length) {<NEW_LINE>htmlExtractor.setExtractor(HtmlExtractor.getImplementations()[extractorImplName.getSelectedIndex()]);<NEW_LINE>} else {<NEW_LINE>htmlExtractor.setExtractor(USE_DEFAULT_EXTRACTOR_IMPL);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
setExpression(expressionField.getText());
850,755
private void addButton(Cocos2dxActivity context, RelativeLayout layout) {<NEW_LINE>mButton = new Button(context);<NEW_LINE>mButtonParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);<NEW_LINE><MASK><NEW_LINE>mButton.setBackground(getRoundRectShape());<NEW_LINE>mButtonLayout = new RelativeLayout(Cocos2dxHelper.getActivity());<NEW_LINE>mButtonLayout.setVisibility(View.INVISIBLE);<NEW_LINE>mButtonLayout.setBackgroundColor(Color.WHITE);<NEW_LINE>RelativeLayout.LayoutParams buttonLayoutParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);<NEW_LINE>buttonLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);<NEW_LINE>buttonLayoutParams.addRule(RelativeLayout.ALIGN_BOTTOM, mEditTextID);<NEW_LINE>buttonLayoutParams.addRule(RelativeLayout.ALIGN_TOP, mEditTextID);<NEW_LINE>mButtonLayout.addView(mButton, mButtonParams);<NEW_LINE>mButtonLayout.setId(mButtonLayoutID);<NEW_LINE>layout.addView(mButtonLayout, buttonLayoutParams);<NEW_LINE>mButton.setOnClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>Cocos2dxEditBox.this.onKeyboardConfirm(mEditText.getText().toString());<NEW_LINE>if (!Cocos2dxEditBox.this.mConfirmHold)<NEW_LINE>Cocos2dxEditBox.this.hide();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
mButton.setTextColor(Color.WHITE);
428,862
public static void generateStoplist(SimpleTokenizer prunedTokenizer) throws IOException {<NEW_LINE>CsvIterator reader = new CsvIterator(new FileReader(inputFile.value), lineRegex.value, dataGroup.value, labelGroup.value, nameGroup.value);<NEW_LINE>ArrayList<Pipe> pipes = new ArrayList<Pipe>();<NEW_LINE>Alphabet alphabet = new Alphabet();<NEW_LINE>CharSequenceLowercase csl = new CharSequenceLowercase();<NEW_LINE>SimpleTokenizer st = prunedTokenizer.deepClone();<NEW_LINE><MASK><NEW_LINE>FeatureCountPipe featureCounter = new FeatureCountPipe(alphabet, null);<NEW_LINE>FeatureDocFreqPipe docCounter = new FeatureDocFreqPipe(alphabet, null);<NEW_LINE>if (!preserveCase.value) {<NEW_LINE>pipes.add(csl);<NEW_LINE>}<NEW_LINE>pipes.add(st);<NEW_LINE>pipes.add(sl2fs);<NEW_LINE>if (pruneCount.value > 0) {<NEW_LINE>pipes.add(featureCounter);<NEW_LINE>}<NEW_LINE>if (docProportionCutoff.value < 1.0) {<NEW_LINE>pipes.add(docCounter);<NEW_LINE>}<NEW_LINE>Pipe serialPipe = new SerialPipes(pipes);<NEW_LINE>Iterator<Instance> iterator = serialPipe.newIteratorFrom(reader);<NEW_LINE>int count = 0;<NEW_LINE>// We aren't really interested in the instance itself,<NEW_LINE>// just the total feature counts.<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>count++;<NEW_LINE>if (count % 100000 == 0) {<NEW_LINE>System.out.println(count);<NEW_LINE>}<NEW_LINE>iterator.next();<NEW_LINE>}<NEW_LINE>if (pruneCount.value > 0) {<NEW_LINE>featureCounter.addPrunedWordsToStoplist(prunedTokenizer, pruneCount.value);<NEW_LINE>}<NEW_LINE>if (docProportionCutoff.value < 1.0) {<NEW_LINE>docCounter.addPrunedWordsToStoplist(prunedTokenizer, docProportionCutoff.value);<NEW_LINE>}<NEW_LINE>}
StringList2FeatureSequence sl2fs = new StringList2FeatureSequence(alphabet);
1,266,877
public ReportItem validate(ValidationContext vCxt, Node n) {<NEW_LINE>if (n.isLiteral() && dtURI.equals(n.getLiteralDatatypeURI())) {<NEW_LINE>// Must be valid for the type<NEW_LINE>if (!rdfDatatype.isValid(n.getLiteralLexicalForm())) {<NEW_LINE>String errMsg = toString() + " : Not valid value : Node " + displayStr(n);<NEW_LINE>return new ReportItem(errMsg, n);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (!n.isLiteral())<NEW_LINE>return new ReportItem(toString() + " : Not a literal", n);<NEW_LINE>String dtStr = vCxt.getShapesGraph().getPrefixMapping().qnameFor(dtURI);<NEW_LINE>if (dtStr == null) {<NEW_LINE>Node dt = NodeFactory.createURI(n.getLiteralDatatypeURI());<NEW_LINE>dtStr = ShLib.displayStr(dt);<NEW_LINE>}<NEW_LINE>String errMsg = toString() + " : Got datatype " + dtStr + " : Node " + displayStr(n);<NEW_LINE><MASK><NEW_LINE>}
return new ReportItem(errMsg, n);
1,243,334
public void visitListener(WebAppContext context, Descriptor descriptor, XmlParser.Node node) {<NEW_LINE>String className = node.getString("listener-class", false, true);<NEW_LINE>try {<NEW_LINE>if (className != null && className.length() > 0) {<NEW_LINE>// Servlet Spec 3.0 p 74<NEW_LINE>// Duplicate listener declarations don't result in duplicate listener instances<NEW_LINE>for (ListenerHolder holder : context.getServletHandler().getListeners()) {<NEW_LINE>if (holder.getClassName().equals(className))<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>((WebDescriptor<MASK><NEW_LINE>ListenerHolder h = context.getServletHandler().newListenerHolder(new Source(Source.Origin.DESCRIPTOR, descriptor.getResource().toString()));<NEW_LINE>h.setClassName(className);<NEW_LINE>context.getServletHandler().addListener(h);<NEW_LINE>context.getMetaData().setOrigin(className + ".listener", descriptor);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.warn("Could not instantiate listener {}", className, e);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}
) descriptor).addClassName(className);
449,190
public static IRubyObject load(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block unusedBlock) {<NEW_LINE>Ruby runtime = context.runtime;<NEW_LINE>IRubyObject in = args[0];<NEW_LINE>boolean freeze = false;<NEW_LINE>IRubyObject proc = null;<NEW_LINE>if (args.length > 1) {<NEW_LINE>RubyHash kwargs = ArgsUtil.extractKeywords(args<MASK><NEW_LINE>if (kwargs != null) {<NEW_LINE>IRubyObject[] options = ArgsUtil.extractKeywordArgs(context, kwargs, "freeze");<NEW_LINE>freeze = options[0] != null ? options[0].isTrue() : false;<NEW_LINE>if (args.length > 2)<NEW_LINE>proc = args[1];<NEW_LINE>} else {<NEW_LINE>proc = args[1];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final IRubyObject str = in.checkStringType();<NEW_LINE>try {<NEW_LINE>InputStream rawInput;<NEW_LINE>if (str != context.nil) {<NEW_LINE>ByteList bytes = ((RubyString) str).getByteList();<NEW_LINE>rawInput = new ByteArrayInputStream(bytes.getUnsafeBytes(), bytes.begin(), bytes.length());<NEW_LINE>} else if (sites(context).respond_to_getc.respondsTo(context, in, in) && sites(context).respond_to_read.respondsTo(context, in, in)) {<NEW_LINE>rawInput = inputStream(context, in);<NEW_LINE>} else {<NEW_LINE>throw runtime.newTypeError("instance of IO needed");<NEW_LINE>}<NEW_LINE>return new UnmarshalStream(runtime, rawInput, freeze, proc).unmarshalObject();<NEW_LINE>} catch (EOFException e) {<NEW_LINE>if (str != context.nil)<NEW_LINE>throw runtime.newArgumentError("marshal data too short");<NEW_LINE>throw runtime.newEOFError();<NEW_LINE>} catch (IOException ioe) {<NEW_LINE>throw runtime.newIOErrorFromException(ioe);<NEW_LINE>}<NEW_LINE>}
[args.length - 1]);
101,616
private static PartialCopyStats copyInternal(final Transaction transaction, final TableReference srcTable, final TableReference dstTable, RangeRequest request, final MutableRange range) {<NEW_LINE>final PartialCopyStats stats = new PartialCopyStats();<NEW_LINE>boolean isEmpty = transaction.getRange(srcTable, request).batchAccept(range.getBatchSize(), batch -> {<NEW_LINE>Map<Cell, byte[]> entries = Maps.newHashMapWithExpectedSize(batch.size());<NEW_LINE>for (RowResult<byte[]> result : batch) {<NEW_LINE>for (Map.Entry<Cell, byte[]> entry : result.getCells()) {<NEW_LINE>entries.put(entry.getKey(), entry.getValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (batch.size() < range.getBatchSize()) {<NEW_LINE>range.setStartRow(null);<NEW_LINE>} else {<NEW_LINE>byte[] lastRow = batch.get(batch.size(<MASK><NEW_LINE>range.setStartRow(RangeRequests.nextLexicographicName(lastRow));<NEW_LINE>}<NEW_LINE>transaction.put(dstTable, entries);<NEW_LINE>stats.rowsCopied = batch.size();<NEW_LINE>stats.cellsCopied = entries.size();<NEW_LINE>return false;<NEW_LINE>});<NEW_LINE>if (isEmpty) {<NEW_LINE>range.setStartRow(null);<NEW_LINE>}<NEW_LINE>return stats;<NEW_LINE>}
) - 1).getRowName();
1,764,989
public static <ENTITY> List<FieldPredicate<?>> andPredicates(FilterAction<ENTITY> action) {<NEW_LINE>requireNonNull(action);<NEW_LINE>final List<FieldPredicate<?>> <MASK><NEW_LINE>final Predicate<? super ENTITY> predicate = action.getPredicate();<NEW_LINE>final Optional<FieldPredicate> oPredicateBuilder = Cast.cast(predicate, FieldPredicate.class);<NEW_LINE>if (oPredicateBuilder.isPresent()) {<NEW_LINE>// Just a top level predicate builder<NEW_LINE>andPredicateBuilders.add(oPredicateBuilder.get());<NEW_LINE>} else {<NEW_LINE>final Optional<CombinedPredicate> oCombinedBasePredicate = Cast.cast(predicate, CombinedPredicate.class);<NEW_LINE>if (oCombinedBasePredicate.isPresent()) {<NEW_LINE>final CombinedPredicate<ENTITY> combinedBasePredicate = oCombinedBasePredicate.get();<NEW_LINE>if (combinedBasePredicate.getType() == CombinedPredicate.Type.AND) {<NEW_LINE>combinedBasePredicate.stream().map(p -> Cast.cast(p, FieldPredicate.class)).filter(Optional::isPresent).map(Optional::get).forEachOrdered(andPredicateBuilders::add);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return andPredicateBuilders;<NEW_LINE>}
andPredicateBuilders = new ArrayList<>();
563,529
public Files postFilesContent(FilescontentAttributes attributes, File file, String contentMd5, List<String> fields) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/files/content";<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "fields", fields));<NEW_LINE>if (contentMd5 != null)<NEW_LINE>localVarHeaderParams.put("content-md5", apiClient.parameterToString(contentMd5));<NEW_LINE>if (attributes != null)<NEW_LINE>localVarFormParams.put("attributes", attributes);<NEW_LINE>if (file != null)<NEW_LINE>localVarFormParams.put("file", file);<NEW_LINE>final String[] localVarAccepts = { "application/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = { "multipart/form-data" };<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] <MASK><NEW_LINE>GenericType<Files> localVarReturnType = new GenericType<Files>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
localVarAuthNames = new String[] {};
289,336
public void exitDoubleArray(ExprParser.DoubleArrayContext ctx) {<NEW_LINE>Object[] values = new Object[ctx.numericElement().size()];<NEW_LINE>for (int i = 0; i < values.length; i++) {<NEW_LINE>if (ctx.numericElement(i).NULL() != null) {<NEW_LINE>values[i] = null;<NEW_LINE>} else if (ctx.numericElement(i).LONG() != null) {<NEW_LINE>values[i] = Numbers.parseDoubleObject(ctx.numericElement(i).LONG().getText());<NEW_LINE>} else if (ctx.numericElement(i).DOUBLE() != null) {<NEW_LINE>values[i] = Numbers.parseDoubleObject(ctx.numericElement(i).<MASK><NEW_LINE>} else {<NEW_LINE>throw new RE("Failed to parse array element %s as a double", ctx.numericElement(i).getText());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>nodes.put(ctx, new ArrayExpr(ExpressionType.DOUBLE_ARRAY, values));<NEW_LINE>}
DOUBLE().getText());
761,708
static void handleOptions(HttpServletResponse response, KafkaCruiseControlConfig config) {<NEW_LINE>response.setStatus(SC_OK);<NEW_LINE>if (config.getBoolean(WebServerConfig.WEBSERVER_HTTP_CORS_ENABLED_CONFIG)) {<NEW_LINE>response.setHeader(ACCESS_CONTROL_ALLOW_ORIGIN, config.getString(WebServerConfig.WEBSERVER_HTTP_CORS_ORIGIN_CONFIG));<NEW_LINE>// This is required only as part of pre-flight response<NEW_LINE>response.setHeader(ACCESS_CONTROL_ALLOW_METHODS, config.getString(WebServerConfig.WEBSERVER_HTTP_CORS_ALLOWMETHODS_CONFIG));<NEW_LINE>response.setHeader(ACCESS_CONTROL_ALLOW_HEADERS, config.getString(WebServerConfig.WEBSERVER_HTTP_CORS_EXPOSEHEADERS_CONFIG));<NEW_LINE><MASK><NEW_LINE>response.setHeader(ACCESS_CONTROL_MAX_AGE, ACCESS_CONTROL_MAX_AGE_IN_SEC);<NEW_LINE>}<NEW_LINE>}
response.setHeader(ACCESS_CONTROL_ALLOW_CREDENTIALS, "true");
1,265,900
// F49213<NEW_LINE>@Override<NEW_LINE>public void formatTo(IncidentStream is) {<NEW_LINE>// -----------------------------------------------------------------------<NEW_LINE>// Indicate the start of the dump, and include the identity<NEW_LINE>// of InjectionBinding, so this can easily be matched to a trace.<NEW_LINE>// -----------------------------------------------------------------------<NEW_LINE>is.writeLine("", ">--- Start InjectionBinding Dump ---> " + Util.identity(this));<NEW_LINE>is.writeLine("", "JndiName = " + ivJndiName);<NEW_LINE>is.<MASK><NEW_LINE>is.writeLine("", "Scope = " + ivInjectionScope);<NEW_LINE>is.writeLine("", "NameSpace = " + ivJavaNameSpaceName);<NEW_LINE>is.writeLine("", "Type = " + ((ivInjectionClassType != null) ? ivInjectionClassType.getName() : ivInjectionClassTypeName));<NEW_LINE>is.writeLine("", "Resolved = " + (ivNameSpaceConfig == null));<NEW_LINE>is.writeLine("", "");<NEW_LINE>is.writeLine("", "InjectedObject = " + Util.identity(ivInjectedObject));<NEW_LINE>is.writeLine("", "BindingObject = " + Util.identity(ivBindingObject));<NEW_LINE>is.writeLine("", "ObjectFactory = " + Util.identity(ivObjectFactory) + ", " + ivObjectFactoryClass + ", " + ivObjectFactoryClassName);<NEW_LINE>if (ivInjectionTargets != null) {<NEW_LINE>is.writeLine("", "");<NEW_LINE>is.writeLine("", "Injection Targets : " + ivInjectionTargets.size());<NEW_LINE>for (InjectionTarget target : ivInjectionTargets) {<NEW_LINE>is.writeLine("", " " + target);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>is.writeLine("", "");<NEW_LINE>is.writeLine("", ivNameSpaceConfig != null ? ivNameSpaceConfig.toString() : "ivNameSpaceConfig = null");<NEW_LINE>is.writeLine("", "<--- InjectionBinding Dump Complete---< ");<NEW_LINE>}
writeLine("", "Annotation = " + ivAnnotation);
975,251
private void loadNode116() {<NEW_LINE>DataTypeEncodingTypeNode node = new DataTypeEncodingTypeNode(this.context, Identifiers.HistoryEventFieldList_Encoding_DefaultBinary, new QualifiedName(0, "Default Binary"), new LocalizedText("en", "Default Binary"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0)<MASK><NEW_LINE>node.addReference(new Reference(Identifiers.HistoryEventFieldList_Encoding_DefaultBinary, Identifiers.HasEncoding, Identifiers.HistoryEventFieldList.expanded(), false));<NEW_LINE>node.addReference(new Reference(Identifiers.HistoryEventFieldList_Encoding_DefaultBinary, Identifiers.HasDescription, Identifiers.OpcUa_BinarySchema_HistoryEventFieldList.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.HistoryEventFieldList_Encoding_DefaultBinary, Identifiers.HasTypeDefinition, Identifiers.DataTypeEncodingType.expanded(), true));<NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
, UByte.valueOf(0));
1,539,052
public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>ChooseFriendsAndFoes choice = new ChooseFriendsAndFoes();<NEW_LINE>if (controller != null && !choice.chooseFriendOrFoe(controller, source, game)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Map<UUID, Card> getBackMap = new HashMap<>();<NEW_LINE>for (Player player : choice.getFriends()) {<NEW_LINE>if (player == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>FilterCard filter = new FilterCreatureCard("creature card in your graveyard");<NEW_LINE>filter.add(new OwnerIdPredicate(player.getId()));<NEW_LINE>TargetCardInGraveyard target = new TargetCardInGraveyard(filter);<NEW_LINE>getBackMap.put(player.getId(), null);<NEW_LINE>if (player.choose(Outcome.ReturnToHand, target, source, game)) {<NEW_LINE>getBackMap.put(player.getId(), game.getCard(target.getFirstTarget()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (Player player : choice.getFriends()) {<NEW_LINE>if (player == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Card card = getBackMap.getOrDefault(player.getId(), null);<NEW_LINE>if (card == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>player.moveCards(card, Zone.HAND, source, game);<NEW_LINE>}<NEW_LINE>List<UUID> perms = new ArrayList<>();<NEW_LINE>for (Player player : choice.getFoes()) {<NEW_LINE>if (player == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>TargetControlledPermanent target = new TargetControlledPermanent(1, 1, StaticFilters.FILTER_CONTROLLED_A_CREATURE, true);<NEW_LINE>player.choose(Outcome.Sacrifice, target, source, game);<NEW_LINE>perms.addAll(target.getTargets());<NEW_LINE>}<NEW_LINE>for (UUID permID : perms) {<NEW_LINE>Permanent <MASK><NEW_LINE>if (permanent != null) {<NEW_LINE>permanent.sacrifice(source, game);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
permanent = game.getPermanent(permID);
896,915
protected void processPreterminal(Tree node) {<NEW_LINE>String rawTag = node.value();<NEW_LINE>if (rawTag.equals("-NONE-"))<NEW_LINE>return;<NEW_LINE>String rawWord = node.firstChild().value().trim();<NEW_LINE>Matcher left = leftClitic.matcher(rawWord);<NEW_LINE>boolean hasLeft = left.find();<NEW_LINE>Matcher right = rightClitic.matcher(rawWord);<NEW_LINE>boolean hasRight = right.find();<NEW_LINE>if (rawTag.equals("PUNC") || !(hasRight || hasLeft)) {<NEW_LINE>node.firstChild().setValue("XSEG");<NEW_LINE>} else if (hasRight && hasLeft) {<NEW_LINE>node.<MASK><NEW_LINE>} else if (hasRight) {<NEW_LINE>node.firstChild().setValue("SEGL");<NEW_LINE>} else if (hasLeft) {<NEW_LINE>node.firstChild().setValue("SEGR");<NEW_LINE>} else {<NEW_LINE>throw new RuntimeException("Messy token: " + rawWord);<NEW_LINE>}<NEW_LINE>}
firstChild().setValue("SEGC");
1,493,474
public CreateAppResult createApp(CreateAppRequest createAppRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createAppRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateAppRequest> request = null;<NEW_LINE>Response<CreateAppResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new CreateAppRequestMarshaller().marshall(createAppRequest);<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>Unmarshaller<CreateAppResult, JsonUnmarshallerContext> unmarshaller = new CreateAppResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<CreateAppResult> responseHandler = new JsonResponseHandler<CreateAppResult>(unmarshaller);<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
871,418
public Object translateQueryParametersIntoServerArgument(RequestDetails theRequest, BaseMethodBinding<?> theMethodBinding) throws InternalErrorException, InvalidRequestException {<NEW_LINE>String ctValue = defaultString(theRequest.getHeader(Constants.HEADER_CONTENT_TYPE));<NEW_LINE>Reader requestReader = createRequestReader(theRequest);<NEW_LINE>// Trim off "; charset=FOO" from the content-type header<NEW_LINE>int semicolonIdx = ctValue.indexOf(';');<NEW_LINE>if (semicolonIdx != -1) {<NEW_LINE>ctValue = <MASK><NEW_LINE>}<NEW_LINE>ctValue = trim(ctValue);<NEW_LINE>if (CT_JSON.equals(ctValue)) {<NEW_LINE>try {<NEW_LINE>ObjectMapper mapper = new ObjectMapper();<NEW_LINE>JsonNode jsonNode = mapper.readTree(requestReader);<NEW_LINE>if (jsonNode != null && jsonNode.get("query") != null) {<NEW_LINE>return jsonNode.get("query").asText();<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new InternalErrorException(Msg.code(356) + e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (CT_GRAPHQL.equals(ctValue)) {<NEW_LINE>try {<NEW_LINE>return IOUtils.toString(requestReader);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new InternalErrorException(Msg.code(357) + e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
ctValue.substring(0, semicolonIdx);
369,016
// TODO [wait should be stored separately in future versions]<NEW_LINE>protected void addFlatProfTimeForNode(int dataOfs) {<NEW_LINE>int methodId = getMethodIdForNodeOfs(dataOfs);<NEW_LINE>Integer methodIdInt = methodId;<NEW_LINE>boolean isRecursiveCall = methodsOnStack.contains(methodIdInt);<NEW_LINE>if (methodId >= invPerMethodId.length) {<NEW_LINE>LOGGER.log(Level.WARNING, "Method ID ({0}) out of bounds ({1})", new Object[] { methodId, invPerMethodId.length });<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int nChildren = getNChildrenForNodeOfs(dataOfs);<NEW_LINE>if (nChildren > 0) {<NEW_LINE>if (!isRecursiveCall) {<NEW_LINE>methodsOnStack.add(methodIdInt);<NEW_LINE>}<NEW_LINE>for (int i = 0; i < nChildren; i++) {<NEW_LINE>int childOfs = getChildOfsForNodeOfs(dataOfs, i);<NEW_LINE>addFlatProfTimeForNode(childOfs);<NEW_LINE>}<NEW_LINE>if (!isRecursiveCall) {<NEW_LINE>methodsOnStack.remove(methodIdInt);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>timePerMethodId0[methodId] += getSelfTime0ForNodeOfs(dataOfs);<NEW_LINE>if (!isRecursiveCall) {<NEW_LINE>totalTimePerMethodId0[methodId] += getTotalTime0ForNodeOfs(dataOfs);<NEW_LINE>}<NEW_LINE>if (collectingTwoTimeStamps) {<NEW_LINE>timePerMethodId1[methodId] += getSelfTime1ForNodeOfs(dataOfs);<NEW_LINE>if (!isRecursiveCall) {<NEW_LINE>totalTimePerMethodId1<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>invPerMethodId[methodId] += getNCallsForNodeOfs(dataOfs);<NEW_LINE>}
[methodId] += getTotalTime1ForNodeOfs(dataOfs);
450,444
final DescribeImagesResult executeDescribeImages(DescribeImagesRequest describeImagesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeImagesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeImagesRequest> request = null;<NEW_LINE>Response<DescribeImagesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeImagesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeImagesRequest));<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, "AppStream");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeImages");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeImagesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeImagesResultJsonUnmarshaller());<NEW_LINE>response = <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
invoke(request, responseHandler, executionContext);
1,146,156
public void open() {<NEW_LINE>if (disposed.get()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>LOG.<MASK><NEW_LINE>if (size == null) {<NEW_LINE>size = getResolutions()[0];<NEW_LINE>}<NEW_LINE>if (size == null) {<NEW_LINE>throw new RuntimeException("The resolution size cannot be null");<NEW_LINE>}<NEW_LINE>LOG.debug("Webcam device {} starting session, size {}", device.getIdentifierStr(), size);<NEW_LINE>grabber = new OpenIMAJGrabber();<NEW_LINE>// NOTE!<NEW_LINE>// Following the note from OpenIMAJ code - it seams like there is some<NEW_LINE>// issue on 32-bit systems which prevents grabber to find devices.<NEW_LINE>// According to the mentioned note this for loop shall fix the problem.<NEW_LINE>DeviceList list = grabber.getVideoDevices().get();<NEW_LINE>for (Device d : list.asArrayList()) {<NEW_LINE>d.getNameStr();<NEW_LINE>d.getIdentifierStr();<NEW_LINE>}<NEW_LINE>boolean started = grabber.startSession(size.width, size.height, 50, Pointer.pointerTo(device));<NEW_LINE>if (!started) {<NEW_LINE>throw new WebcamException("Cannot start native grabber!");<NEW_LINE>}<NEW_LINE>// set timeout, this MUST be done after grabber is open and before it's closed, otherwise it<NEW_LINE>// will result as crash<NEW_LINE>grabber.setTimeout(timeout);<NEW_LINE>LOG.debug("Webcam device session started");<NEW_LINE>Dimension size2 = new Dimension(grabber.getWidth(), grabber.getHeight());<NEW_LINE>int w1 = size.width;<NEW_LINE>int w2 = size2.width;<NEW_LINE>int h1 = size.height;<NEW_LINE>int h2 = size2.height;<NEW_LINE>if (w1 != w2 || h1 != h2) {<NEW_LINE>if (failOnSizeMismatch) {<NEW_LINE>throw new WebcamException(String.format("Different size obtained vs requested - [%dx%d] vs [%dx%d]", w1, h1, w2, h2));<NEW_LINE>}<NEW_LINE>Object[] args = new Object[] { w1, h1, w2, h2, w2, h2 };<NEW_LINE>LOG.warn("Different size obtained vs requested - [{}x{}] vs [{}x{}]. Setting correct one. New size is [{}x{}]", args);<NEW_LINE>size = new Dimension(w2, h2);<NEW_LINE>}<NEW_LINE>smodel = new ComponentSampleModel(DATA_TYPE, size.width, size.height, 3, size.width * 3, BAND_OFFSETS);<NEW_LINE>cmodel = new ComponentColorModel(COLOR_SPACE, BITS, false, false, Transparency.OPAQUE, DATA_TYPE);<NEW_LINE>// clear device memory buffer<NEW_LINE>LOG.debug("Clear memory buffer");<NEW_LINE>clearMemoryBuffer();<NEW_LINE>// set device to open<NEW_LINE>LOG.debug("Webcam device {} is now open", this);<NEW_LINE>open.set(true);<NEW_LINE>// start underlying frames refresher<NEW_LINE>refresher = startFramesRefresher();<NEW_LINE>}
debug("Opening webcam device {}", getName());
982,160
public void valid(ActionRequest request, ActionResponse response) throws AxelorException {<NEW_LINE>try {<NEW_LINE>Timesheet timesheet = request.getContext().asType(Timesheet.class);<NEW_LINE>timesheet = Beans.get(TimesheetRepository.class).find(timesheet.getId());<NEW_LINE>TimesheetService timesheetService = Beans.get(TimesheetService.class);<NEW_LINE>timesheetService.checkEmptyPeriod(timesheet);<NEW_LINE>computeTimeSpent(request, response);<NEW_LINE>Message message = timesheetService.validateAndSendValidationEmail(timesheet);<NEW_LINE>if (message != null && message.getStatusSelect() == MessageRepository.STATUS_SENT) {<NEW_LINE>response.setFlash(String.format(I18n.get("Email sent to %s"), Beans.get(MessageServiceBaseImpl.class).getToRecipients(message)));<NEW_LINE>}<NEW_LINE>Beans.get(PeriodService.class).checkPeriod(timesheet.getCompany(), timesheet.getToDate(<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>TraceBackService.trace(response, e);<NEW_LINE>} finally {<NEW_LINE>response.setReload(true);<NEW_LINE>}<NEW_LINE>}
), timesheet.getFromDate());
271,473
public static String createCriticalNotificationJSON(String caption, String message, String details, String url) {<NEW_LINE>String returnString = "";<NEW_LINE>try {<NEW_LINE>JsonObject appError = Json.createObject();<NEW_LINE>putValueOrJsonNull(appError, "caption", caption);<NEW_LINE>putValueOrJsonNull(appError, "url", url);<NEW_LINE>putValueOrJsonNull(appError, "message", message);<NEW_LINE>putValueOrJsonNull(appError, "details", details);<NEW_LINE>JsonObject meta = Json.createObject();<NEW_LINE>meta.put("appError", appError);<NEW_LINE>JsonObject json = Json.createObject();<NEW_LINE>json.put("changes", Json.createObject());<NEW_LINE>json.put("resources", Json.createObject());<NEW_LINE>json.put("locales", Json.createObject());<NEW_LINE>json.put("meta", meta);<NEW_LINE>json.put<MASK><NEW_LINE>returnString = JsonUtil.stringify(json);<NEW_LINE>} catch (JsonException e) {<NEW_LINE>getLogger().log(Level.WARNING, "Error creating critical notification JSON message", e);<NEW_LINE>}<NEW_LINE>return "for(;;);[" + returnString + "]";<NEW_LINE>}
(ApplicationConstants.SERVER_SYNC_ID, -1);
1,777,109
public static HashMap<Integer, ArrayList<IComment>> loadMultipleCommentsById(final SQLProvider provider, final Collection<Integer> commentIds) throws CouldntLoadDataException {<NEW_LINE>Preconditions.checkNotNull(provider, "IE00480: provider argument can not be null");<NEW_LINE>Preconditions.checkNotNull(commentIds, "IE00481: commentIds argument can not be null");<NEW_LINE>final String query = "SELECT * FROM get_all_comment_ancestors_multiple(?)";<NEW_LINE>final HashMap<Integer, IComment> commentIdToComment = new HashMap<>();<NEW_LINE>final Object[] commentIdsArray = commentIds.toArray();<NEW_LINE>final HashMap<Integer, ArrayList<IComment>> commentIdToComments = new HashMap<>();<NEW_LINE>try (PreparedStatement statement = provider.getConnection().getConnection().prepareCall(query)) {<NEW_LINE>statement.setArray(1, provider.getConnection().getConnection().createArrayOf("int4", commentIdsArray));<NEW_LINE>final ResultSet resultSet = statement.executeQuery();<NEW_LINE>while (resultSet.next()) {<NEW_LINE>final int rootComment = resultSet.getInt("commentid");<NEW_LINE>resultSet.getInt("level");<NEW_LINE>final int commentId = resultSet.getInt("id");<NEW_LINE>final int <MASK><NEW_LINE>final int userId = resultSet.getInt("user_id");<NEW_LINE>final String commentText = resultSet.getString("comment");<NEW_LINE>final IUser user = CUserManager.get(provider).getUserById(userId);<NEW_LINE>final CComment comment = new CComment(commentId, user, commentIdToComment.get(parentId), commentText);<NEW_LINE>commentIdToComment.put(commentId, comment);<NEW_LINE>if (commentIdToComments.containsKey(rootComment)) {<NEW_LINE>commentIdToComments.get(rootComment).add(comment);<NEW_LINE>} else {<NEW_LINE>commentIdToComments.put(rootComment, Lists.<IComment>newArrayList(comment));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (final SQLException exception) {<NEW_LINE>throw new CouldntLoadDataException(exception);<NEW_LINE>}<NEW_LINE>return commentIdToComments;<NEW_LINE>}
parentId = resultSet.getInt("parent_id");
660,463
protected TransactionReceipt waitForTx(byte[] txHash) throws InterruptedException {<NEW_LINE>ByteArrayWrapper txHashW = new ByteArrayWrapper(txHash);<NEW_LINE>txWaiters.put(txHashW, null);<NEW_LINE>long startBlock = ethereum.getBlockchain().getBestBlock().getNumber();<NEW_LINE>while (true) {<NEW_LINE>TransactionReceipt receipt = txWaiters.get(txHashW);<NEW_LINE>if (receipt != null) {<NEW_LINE>return receipt;<NEW_LINE>} else {<NEW_LINE>long curBlock = ethereum.getBlockchain()<MASK><NEW_LINE>if (curBlock > startBlock + 16) {<NEW_LINE>throw new RuntimeException("The transaction was not included during last 16 blocks: " + txHashW.toString().substring(0, 8));<NEW_LINE>} else {<NEW_LINE>logger.info("Waiting for block with transaction 0x" + txHashW.toString().substring(0, 8) + " included (" + (curBlock - startBlock) + " blocks received so far) ...");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>synchronized (this) {<NEW_LINE>wait(20000);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.getBestBlock().getNumber();
959,406
public ExportEBSVolumeRecommendationsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ExportEBSVolumeRecommendationsResult exportEBSVolumeRecommendationsResult = new ExportEBSVolumeRecommendationsResult();<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 exportEBSVolumeRecommendationsResult;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("jobId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>exportEBSVolumeRecommendationsResult.setJobId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("s3Destination", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>exportEBSVolumeRecommendationsResult.setS3Destination(S3DestinationJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return exportEBSVolumeRecommendationsResult;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
1,460,786
public ImageData create(int height, HSB backgroundColor, boolean embossed, boolean rotated) {<NEW_LINE>ImageData source = null;<NEW_LINE>if (embossed) {<NEW_LINE>if (rotated) {<NEW_LINE>source = CoreImages.getImageDescriptor(CoreImages.HANDLE_EMBOSSED_ROTATED).getImageData();<NEW_LINE>} else {<NEW_LINE>source = CoreImages.getImageDescriptor(CoreImages.HANDLE_EMBOSSED).getImageData();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (rotated) {<NEW_LINE>source = CoreImages.getImageDescriptor(CoreImages.HANDLE_ROTATED).getImageData();<NEW_LINE>} else {<NEW_LINE>source = CoreImages.getImageDescriptor(CoreImages.HANDLE).getImageData();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ImageData result = new ImageData(source.width, height, source.depth, source.palette);<NEW_LINE>int offset = (result.height - source.height) / 2;<NEW_LINE>for (int x = 0; x < result.width; x++) {<NEW_LINE>for (int y = 0; y < result.height; y++) {<NEW_LINE>if (y >= offset && y < offset + source.height) {<NEW_LINE>result.setPixel(x, y, source.getPixel(x, y - offset));<NEW_LINE>} else {<NEW_LINE>result.setPixel(x, y, source.transparentPixel);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>result.transparentPixel = source.transparentPixel;<NEW_LINE>List<RGB> newRGBs <MASK><NEW_LINE>for (RGB each : result.palette.colors) {<NEW_LINE>try {<NEW_LINE>HSB hsb = backgroundColor.getCopy();<NEW_LINE>hsb.brightness = new HSB(each).brightness;<NEW_LINE>hsb = hsb.mixWith(backgroundColor, 0.7f);<NEW_LINE>newRGBs.add(hsb.toRGB());<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>result.palette.colors = newRGBs.toArray(new RGB[newRGBs.size()]);<NEW_LINE>return result;<NEW_LINE>}
= new ArrayList<RGB>();
1,011,797
public void displayProcessOutputs(final Process child, String displayName, String initialMessage) throws IOException, InterruptedException {<NEW_LINE>// Get a tab on the output window. If this client has been<NEW_LINE>// executed before, the same tab will be returned.<NEW_LINE>InputOutput io = org.openide.windows.IOProvider.getDefault().getIO(displayName, false);<NEW_LINE>OutputWriter ow = io.getOut();<NEW_LINE>try {<NEW_LINE>io.getOut().reset();<NEW_LINE>} catch (IOException e) {<NEW_LINE>// not a critical error, continue<NEW_LINE>ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);<NEW_LINE>}<NEW_LINE>// io.select();<NEW_LINE>ow.println(initialMessage);<NEW_LINE>final Thread[] copyMakers = new Thread[3];<NEW_LINE>(copyMakers[0] = new OutputCopier(new InputStreamReader(child.getInputStream()), ow, true)).start();<NEW_LINE>(copyMakers[1] = new OutputCopier(new InputStreamReader(child.getErrorStream()), io.getErr(), true)).start();<NEW_LINE>(copyMakers[2] = new OutputCopier(io.getIn(), new OutputStreamWriter(child.getOutputStream()), true)).start();<NEW_LINE>new Thread() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>child.waitFor();<NEW_LINE>// time for copymakers<NEW_LINE>Thread.sleep(2000);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>} finally {<NEW_LINE>try {<NEW_LINE>copyMakers[0].interrupt();<NEW_LINE>copyMakers[1].interrupt();<NEW_LINE><MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}.start();<NEW_LINE>}
copyMakers[2].interrupt();
1,170,476
private String commonPrepareSubscription(Participant participant, String senderPublicId, boolean reconnect, WebrtcDebugEventOperation operation) {<NEW_LINE>String sdpOffer = null;<NEW_LINE>Session session = null;<NEW_LINE>log.debug("Request [SUBSCRIBE] remoteParticipant={} sdpOffer={} ({})", senderPublicId, sdpOffer, participant.getParticipantPublicId());<NEW_LINE>KurentoParticipant kParticipant = (KurentoParticipant) participant;<NEW_LINE>session = ((KurentoParticipant) participant).getSession();<NEW_LINE>Participant senderParticipant = session.getParticipantByPublicId(senderPublicId);<NEW_LINE>if (senderParticipant == null) {<NEW_LINE>log.warn("PARTICIPANT {}: Requesting to recv media from user {} " + "in session {} but user could not be found", participant.getParticipantPublicId(), senderPublicId, session.getSessionId());<NEW_LINE>throw new OpenViduException(Code.USER_NOT_FOUND_ERROR_CODE, "User '" + senderPublicId + " not found in session '" + session.getSessionId() + "'");<NEW_LINE>}<NEW_LINE>if (!senderParticipant.isStreaming()) {<NEW_LINE>log.warn("PARTICIPANT {}: Requesting to recv media from user {} " + "in session {} but user is not streaming media", participant.getParticipantPublicId(), senderPublicId, session.getSessionId());<NEW_LINE>throw new OpenViduException(Code.USER_NOT_STREAMING_ERROR_CODE, "User '" + senderPublicId + " not streaming media in session '" + session.getSessionId() + "'");<NEW_LINE>}<NEW_LINE>if (reconnect) {<NEW_LINE>kParticipant.cancelReceivingMedia(((KurentoParticipant) senderParticipant), null, true);<NEW_LINE>}<NEW_LINE>sdpOffer = kParticipant.prepareReceiveMediaFrom(senderParticipant);<NEW_LINE>final String <MASK><NEW_LINE>CDR.log(new WebrtcDebugEvent(participant, subscriberEndpointName, WebrtcDebugEventIssuer.server, operation, WebrtcDebugEventType.sdpOffer, sdpOffer));<NEW_LINE>boolean isTranscodingAllowed = session.getSessionProperties().isTranscodingAllowed();<NEW_LINE>VideoCodec forcedVideoCodec = session.getSessionProperties().forcedVideoCodecResolved();<NEW_LINE>// Modify server's SDPOffer if forced codec is defined<NEW_LINE>if (forcedVideoCodec != VideoCodec.NONE && !participant.isIpcam()) {<NEW_LINE>sdpOffer = sdpMunging.forceCodec(sdpOffer, participant, false, false, isTranscodingAllowed, forcedVideoCodec);<NEW_LINE>CDR.log(new WebrtcDebugEvent(participant, subscriberEndpointName, WebrtcDebugEventIssuer.server, operation, WebrtcDebugEventType.sdpOfferMunged, sdpOffer));<NEW_LINE>}<NEW_LINE>if (sdpOffer == null) {<NEW_LINE>throw new OpenViduException(Code.MEDIA_SDP_ERROR_CODE, "Unable to generate SDP offer when subscribing '" + participant.getParticipantPublicId() + "' to '" + senderPublicId + "'");<NEW_LINE>}<NEW_LINE>return sdpOffer;<NEW_LINE>}
subscriberEndpointName = kParticipant.calculateSubscriberEndpointName(senderParticipant);
488,583
public static void generate(final MLDataSet training, final long seed, final int count, final double min, final double max) {<NEW_LINE>LinearCongruentialRandom rand = new LinearCongruentialRandom(seed);<NEW_LINE>int inputCount = training.getInputSize();<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < count; i++) {<NEW_LINE>final MLData inputData = new BasicMLData(inputCount);<NEW_LINE>for (int j = 0; j < inputCount; j++) {<NEW_LINE>inputData.setData(j, rand.nextDouble(min, max));<NEW_LINE>}<NEW_LINE>final MLData idealData = new BasicMLData(idealCount);<NEW_LINE>for (int j = 0; j < idealCount; j++) {<NEW_LINE>idealData.setData(j, rand.nextDouble(min, max));<NEW_LINE>}<NEW_LINE>final BasicMLDataPair pair = new BasicMLDataPair(inputData, idealData);<NEW_LINE>training.add(pair);<NEW_LINE>}<NEW_LINE>}
int idealCount = training.getIdealSize();
826,104
private synchronized void bgOngoingNotification(final BgGraphBuilder bgGraphBuilder) {<NEW_LINE>try {<NEW_LINE>mHandler.post(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>NotificationManagerCompat.from(mContext).notify(ongoingNotificationId<MASK><NEW_LINE>if (iconBitmap != null)<NEW_LINE>iconBitmap.recycle();<NEW_LINE>if (notifiationBitmap != null)<NEW_LINE>notifiationBitmap.recycle();<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>Log.e(TAG, "Got runtime exception in bgOngoingNotification runnable: ", e);<NEW_LINE>Home.toaststaticnext("Problem displaying ongoing notification");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>Log.e(TAG, "Got runtime exception in bgOngoingNotification: ", e);<NEW_LINE>Home.toaststaticnext("Problem displaying ongoing notification");<NEW_LINE>}<NEW_LINE>}
, createOngoingNotification(bgGraphBuilder, mContext));
1,169,027
public void onResponse(final JSONObject response) {<NEW_LINE>List<Note> notes;<NEW_LINE>if (response == null) {<NEW_LINE>// Not sure this could ever happen, but make sure we're catching all response types<NEW_LINE>AppLog.w(AppLog.T.NOTIFS, "Success, but did not receive any notes");<NEW_LINE>EventBus.getDefault().post(new NotificationEvents.NotificationsRefreshCompleted(new ArrayList<Note>(0)));<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>notes = NotificationsActions.parseNotes(response);<NEW_LINE>// if we have a note id, we were started from NotificationsDetailActivity.<NEW_LINE>// That means we need to re-set the *read* flag on this note.<NEW_LINE>if (mIsStartedByTappingOnNotification && mNoteId != null) {<NEW_LINE>setNoteRead(mNoteId, notes);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>EventBus.getDefault().post(new NotificationEvents.NotificationsRefreshCompleted(notes));<NEW_LINE>} catch (JSONException e) {<NEW_LINE>AppLog.e(AppLog.T.NOTIFS, "Success, but can't parse the response", e);<NEW_LINE>EventBus.getDefault().post(new NotificationEvents.NotificationsRefreshError());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>completed();<NEW_LINE>}
NotificationsTable.saveNotes(notes, true);
1,004,910
protected void applyLoadPlan(ArrayList<Task> tasks) {<NEW_LINE>// When quick-switching on 3p-launcher, we add a "stub" tile corresponding to Launcher<NEW_LINE>// as well. This tile is never shown as we have setCurrentTaskHidden, but allows use to<NEW_LINE>// track the index of the next task appropriately, as if we are switching on any other app.<NEW_LINE>if (mHomeTaskInfo != null && mHomeTaskInfo.taskId == mRunningTaskId && !tasks.isEmpty()) {<NEW_LINE>// Check if the task list has running task<NEW_LINE>boolean found = false;<NEW_LINE>for (Task t : tasks) {<NEW_LINE>if (t.key.id == mRunningTaskId) {<NEW_LINE>found = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!found) {<NEW_LINE>ArrayList<Task> newList = new ArrayList<>(tasks.size() + 1);<NEW_LINE>newList.addAll(tasks);<NEW_LINE>newList.add(Task.from(new TaskKey(<MASK><NEW_LINE>tasks = newList;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>super.applyLoadPlan(tasks);<NEW_LINE>}
mHomeTaskInfo), mHomeTaskInfo, false));
630,050
public Flux<CommandResponse<ZRangeCommand, Flux<Tuple>>> zRange(Publisher<ZRangeCommand> commands) {<NEW_LINE>return execute(commands, command -> {<NEW_LINE>Assert.notNull(command.getKey(), "Key must not be null!");<NEW_LINE>Assert.notNull(command.getRange(), "Range must not be null!");<NEW_LINE>byte[] keyBuf = toByteArray(command.getKey());<NEW_LINE>long start = command.getRange().getLowerBound().getValue().orElse(0L);<NEW_LINE>long end = command.getRange().getUpperBound().getValue().get();<NEW_LINE>Flux<Tuple> flux;<NEW_LINE>if (command.getDirection() == Direction.ASC) {<NEW_LINE>if (command.isWithScores()) {<NEW_LINE>Mono<Set<Tuple>> m = read(keyBuf, ByteArrayCodec.INSTANCE, ZRANGE_ENTRY, keyBuf, start, end, "WITHSCORES");<NEW_LINE>flux = m.flatMapMany(e -> Flux.fromIterable(e));<NEW_LINE>} else {<NEW_LINE>Mono<Set<byte[]>> m = read(keyBuf, ByteArrayCodec.INSTANCE, ZRANGE, keyBuf, start, end);<NEW_LINE>flux = m.flatMapMany(e -> Flux.fromIterable(e).map(b -> new DefaultTuple(b, Double.NaN)));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (command.isWithScores()) {<NEW_LINE>Mono<Set<Tuple>> m = read(keyBuf, ByteArrayCodec.INSTANCE, ZREVRANGE_ENTRY, keyBuf, start, end, "WITHSCORES");<NEW_LINE>flux = m.flatMapMany(e -> Flux.fromIterable(e));<NEW_LINE>} else {<NEW_LINE>Mono<Set<byte[]>> m = read(keyBuf, ByteArrayCodec.INSTANCE, ZREVRANGE, keyBuf, start, end);<NEW_LINE>flux = m.flatMapMany(e -> Flux.fromIterable(e).map(b -> new DefaultTuple(b, Double.NaN)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return Mono.just(new CommandResponse<MASK><NEW_LINE>});<NEW_LINE>}
<>(command, flux));
1,438,711
final CreateRealtimeLogConfigResult executeCreateRealtimeLogConfig(CreateRealtimeLogConfigRequest createRealtimeLogConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createRealtimeLogConfigRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateRealtimeLogConfigRequest> request = null;<NEW_LINE>Response<CreateRealtimeLogConfigResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateRealtimeLogConfigRequestMarshaller().marshall(super.beforeMarshalling(createRealtimeLogConfigRequest));<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, "CloudFront");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateRealtimeLogConfig");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<CreateRealtimeLogConfigResult> responseHandler = new StaxResponseHandler<CreateRealtimeLogConfigResult>(new CreateRealtimeLogConfigResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
1,741,793
public void renderParticle(@Nonnull BufferBuilder worldRendererIn, @Nonnull Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ) {<NEW_LINE>GlStateManager.pushMatrix();<NEW_LINE>GlStateManager.enableLighting();<NEW_LINE>GlStateManager.disableLighting();<NEW_LINE>GlStateManager.disableCull();<NEW_LINE>GlStateManager.enableBlend();<NEW_LINE>GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);<NEW_LINE>OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240, 240);<NEW_LINE>RenderUtil.bindBlockTexture();<NEW_LINE>GlStateManager.depthMask(false);<NEW_LINE>float scale = Math.min((age + partialTicks) / INIT_TIME, 1);<NEW_LINE>// Vanilla bug? Particle.interpPosX/Y/Z variables are always one frame behind<NEW_LINE>double x = entityIn.lastTickPosX + (entityIn.<MASK><NEW_LINE>double y = entityIn.lastTickPosY + (entityIn.posY - entityIn.lastTickPosY) * partialTicks;<NEW_LINE>double z = entityIn.lastTickPosZ + (entityIn.posZ - entityIn.lastTickPosZ) * partialTicks;<NEW_LINE>GlStateManager.translate(-x, -y, -z);<NEW_LINE>GlStateManager.color(color.x, color.y, color.z, color.w);<NEW_LINE>RenderUtil.renderBoundingBox(scale(owner.getPos(), getBounds(), scale).expand(0.01, 0.01, 0.01), IconUtil.instance.whiteTexture);<NEW_LINE>GlStateManager.depthMask(true);<NEW_LINE>GlStateManager.disableBlend();<NEW_LINE>GlStateManager.enableCull();<NEW_LINE>GlStateManager.enableLighting();<NEW_LINE>GlStateManager.popMatrix();<NEW_LINE>}
posX - entityIn.lastTickPosX) * partialTicks;
988
// DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static boolean canGetSyntheticAttribute(com.sun.jdi.VirtualMachine a) throws org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper {<NEW_LINE>if (org.netbeans.modules.debugger.jpda.JDIExceptionReporter.isLoggable()) {<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.logCallStart("com.sun.jdi.VirtualMachine", "canGetSyntheticAttribute", "JDI CALL: com.sun.jdi.VirtualMachine({0}).canGetSyntheticAttribute()", new Object[] { a });<NEW_LINE>}<NEW_LINE>Object retValue = null;<NEW_LINE>try {<NEW_LINE>boolean ret;<NEW_LINE>ret = a.canGetSyntheticAttribute();<NEW_LINE>retValue = ret;<NEW_LINE>return ret;<NEW_LINE>} catch (com.sun.jdi.InternalException ex) {<NEW_LINE>retValue = ex;<NEW_LINE>org.netbeans.modules.debugger.<MASK><NEW_LINE>throw new org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper(ex);<NEW_LINE>} catch (com.sun.jdi.VMDisconnectedException ex) {<NEW_LINE>retValue = ex;<NEW_LINE>if (a instanceof com.sun.jdi.Mirror) {<NEW_LINE>com.sun.jdi.VirtualMachine vm = ((com.sun.jdi.Mirror) a).virtualMachine();<NEW_LINE>try {<NEW_LINE>vm.dispose();<NEW_LINE>} catch (com.sun.jdi.VMDisconnectedException vmdex) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw new org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper(ex);<NEW_LINE>} catch (Error err) {<NEW_LINE>retValue = err;<NEW_LINE>throw err;<NEW_LINE>} catch (RuntimeException rex) {<NEW_LINE>retValue = rex;<NEW_LINE>throw rex;<NEW_LINE>} finally {<NEW_LINE>if (org.netbeans.modules.debugger.jpda.JDIExceptionReporter.isLoggable()) {<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.logCallEnd("com.sun.jdi.VirtualMachine", "canGetSyntheticAttribute", retValue);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
jpda.JDIExceptionReporter.report(ex);
750,785
// endregion<NEW_LINE>// region AutoCloseable Implementation<NEW_LINE>@Override<NEW_LINE>public void close() {<NEW_LINE>CompletableReadResultEntry lastEntry = null;<NEW_LINE>synchronized (this) {<NEW_LINE>if (!this.closed) {<NEW_LINE>this.closed = true;<NEW_LINE>lastEntry = this.lastEntry;<NEW_LINE>this.lastEntry = null;<NEW_LINE>log.trace("{}.ReadResult[{}]: Closed.", this.traceObjectId, this.streamSegmentStartOffset);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// If we have already returned a result but it hasn't been consumed yet, cancel it, but make sure we do it<NEW_LINE>// outside of the lock.<NEW_LINE>if (lastEntry != null && !lastEntry.isDone()) {<NEW_LINE>lastEntry.fail(new CancellationException(String.format(<MASK><NEW_LINE>log.trace("{}.ReadResult[{}]: Cancelled last entry '{}'.", this.traceObjectId, this.streamSegmentStartOffset, lastEntry);<NEW_LINE>}<NEW_LINE>}
"ReadResult[%s] closed.", this.traceObjectId)));
1,729,465
public void registerCachedFile(String factoryIdentifier, ClassLoader classLoader, String dirName) {<NEW_LINE>Set<URL> urlSet = PluginUtil.getJarFileDirPath(factoryIdentifier, this.localPluginPath, this.remotePluginPath, dirName);<NEW_LINE>try {<NEW_LINE>Method add = URLClassLoader.class.getDeclaredMethod("addURL", URL.class);<NEW_LINE>add.setAccessible(true);<NEW_LINE>List<String> urlList = new ArrayList<>(urlSet.size());<NEW_LINE>for (URL jarUrl : urlSet) {<NEW_LINE>add.invoke(classLoader, jarUrl);<NEW_LINE>if (!this.classPathSet.contains(jarUrl)) {<NEW_LINE>urlList.add(jarUrl.toString());<NEW_LINE>this.classPathSet.add(jarUrl);<NEW_LINE>String classFileName = String.format(CLASS_FILE_NAME_FMT.defaultValue(), this.classFileNameIndex);<NEW_LINE>this.env.registerCachedFile(jarUrl.<MASK><NEW_LINE>this.classFileNameIndex++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>PluginUtil.setPipelineOptionsToEnvConfig(this.env, urlList, executionMode);<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.warn("can't add jar in {} to cachedFile, e = {}", urlSet, e.getMessage());<NEW_LINE>}<NEW_LINE>}
getPath(), classFileName, true);
1,628,114
protected void performRewrite(TransformationContext tc) throws Exception {<NEW_LINE>WorkingCopy wc = tc.getWorkingCopy();<NEW_LINE>CompilationUnitTree cut = wc.getCompilationUnit();<NEW_LINE>TreePath statementPath = tc.getPath();<NEW_LINE>TreeMaker make = wc.getTreeMaker();<NEW_LINE>if (statementPath.getLeaf().getKind() == Tree.Kind.VARIABLE) {<NEW_LINE>VariableTree oldVariableTree = (VariableTree) statementPath.getLeaf();<NEW_LINE>TypeMirror type = wc.getTrees().getTypeMirror(statementPath);<NEW_LINE>VariableTree newVariableTree = make.Variable(oldVariableTree.getModifiers(), oldVariableTree.getName(), make.Type(type), oldVariableTree.getInitializer());<NEW_LINE>wc.rewrite(oldVariableTree, newVariableTree);<NEW_LINE>} else if (statementPath.getLeaf().getKind() == Tree.Kind.ENHANCED_FOR_LOOP) {<NEW_LINE>EnhancedForLoopTree elfTree = (EnhancedForLoopTree) statementPath.getLeaf();<NEW_LINE>ExpressionTree expTree = elfTree.getExpression();<NEW_LINE>VariableTree vtt = elfTree.getVariable();<NEW_LINE>String elfTreeVariable = elfTree.getVariable().getType().toString();<NEW_LINE>if (expTree == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// VariableTree with null ExpressionTree as no initialization required<NEW_LINE>VariableTree newVariableTree = make.Variable(vtt.getModifiers(), vtt.getName(), make<MASK><NEW_LINE>StatementTree statement = ((EnhancedForLoopTree) statementPath.getLeaf()).getStatement();<NEW_LINE>EnhancedForLoopTree newElfTree = make.EnhancedForLoop(newVariableTree, expTree, statement);<NEW_LINE>wc.rewrite(elfTree, newElfTree);<NEW_LINE>}<NEW_LINE>}
.Type(elfTreeVariable), null);
500,317
public static void drawOutlinedBox(Box bb, BufferBuilder bufferBuilder) {<NEW_LINE>bufferBuilder.vertex(bb.minX, bb.minY, bb.minZ).next();<NEW_LINE>bufferBuilder.vertex(bb.maxX, bb.minY, bb.minZ).next();<NEW_LINE>bufferBuilder.vertex(bb.maxX, bb.minY, bb.minZ).next();<NEW_LINE>bufferBuilder.vertex(bb.maxX, bb.minY, bb.maxZ).next();<NEW_LINE>bufferBuilder.vertex(bb.maxX, bb.minY, bb.maxZ).next();<NEW_LINE>bufferBuilder.vertex(bb.minX, bb.minY, bb.maxZ).next();<NEW_LINE>bufferBuilder.vertex(bb.minX, bb.minY, bb.maxZ).next();<NEW_LINE>bufferBuilder.vertex(bb.minX, bb.minY, bb.minZ).next();<NEW_LINE>bufferBuilder.vertex(bb.minX, bb.minY, <MASK><NEW_LINE>bufferBuilder.vertex(bb.minX, bb.maxY, bb.minZ).next();<NEW_LINE>bufferBuilder.vertex(bb.maxX, bb.minY, bb.minZ).next();<NEW_LINE>bufferBuilder.vertex(bb.maxX, bb.maxY, bb.minZ).next();<NEW_LINE>bufferBuilder.vertex(bb.maxX, bb.minY, bb.maxZ).next();<NEW_LINE>bufferBuilder.vertex(bb.maxX, bb.maxY, bb.maxZ).next();<NEW_LINE>bufferBuilder.vertex(bb.minX, bb.minY, bb.maxZ).next();<NEW_LINE>bufferBuilder.vertex(bb.minX, bb.maxY, bb.maxZ).next();<NEW_LINE>bufferBuilder.vertex(bb.minX, bb.maxY, bb.minZ).next();<NEW_LINE>bufferBuilder.vertex(bb.maxX, bb.maxY, bb.minZ).next();<NEW_LINE>bufferBuilder.vertex(bb.maxX, bb.maxY, bb.minZ).next();<NEW_LINE>bufferBuilder.vertex(bb.maxX, bb.maxY, bb.maxZ).next();<NEW_LINE>bufferBuilder.vertex(bb.maxX, bb.maxY, bb.maxZ).next();<NEW_LINE>bufferBuilder.vertex(bb.minX, bb.maxY, bb.maxZ).next();<NEW_LINE>bufferBuilder.vertex(bb.minX, bb.maxY, bb.maxZ).next();<NEW_LINE>bufferBuilder.vertex(bb.minX, bb.maxY, bb.minZ).next();<NEW_LINE>}
bb.minZ).next();
1,476,300
public VirtualRouterOfferingInventory selectVirtualRouterOffering(L3NetworkInventory l3, List<VirtualRouterOfferingInventory> candidates) {<NEW_LINE>Map<String, List<String>> tags = VirtualRouterSystemTags.VYOS_OFFERING.getTags(candidates.stream().map(VirtualRouterOfferingInventory::getUuid).collect<MASK><NEW_LINE>if (tags.isEmpty()) {<NEW_LINE>Optional p = candidates.stream().filter(VirtualRouterOfferingInventory::isDefault).findAny();<NEW_LINE>return p.isPresent() ? (VirtualRouterOfferingInventory) p.get() : candidates.get(0);<NEW_LINE>} else {<NEW_LINE>List<VirtualRouterOfferingInventory> offerings = candidates.stream().filter(i -> tags.containsKey(i.getUuid())).collect(Collectors.toList());<NEW_LINE>Optional p = offerings.stream().filter(VirtualRouterOfferingInventory::isDefault).findAny();<NEW_LINE>return p.isPresent() ? (VirtualRouterOfferingInventory) p.get() : offerings.get(0);<NEW_LINE>}<NEW_LINE>}
(Collectors.toList()));
813,344
final EnableSecurityHubResult executeEnableSecurityHub(EnableSecurityHubRequest enableSecurityHubRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(enableSecurityHubRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<EnableSecurityHubRequest> request = null;<NEW_LINE>Response<EnableSecurityHubResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new EnableSecurityHubRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(enableSecurityHubRequest));<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, "SecurityHub");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "EnableSecurityHub");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<EnableSecurityHubResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new EnableSecurityHubResultJsonUnmarshaller());
1,475,666
public void init(final FilterConfig filterConfig) throws ServletException {<NEW_LINE>final ServletContext servletContext = filterConfig.getServletContext();<NEW_LINE>madvoc = Madvoc.get(servletContext);<NEW_LINE>if (madvoc != null) {<NEW_LINE>log = LoggerFactory.getLogger(this.getClass());<NEW_LINE>madvocController = madvoc.webapp().madvocContainer().requestComponent(MadvocController.class);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final WebApp <MASK><NEW_LINE>if (webApp != null) {<NEW_LINE>log = LoggerFactory.getLogger(this.getClass());<NEW_LINE>madvocController = webApp.madvocContainer().requestComponent(MadvocController.class);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>throw new ServletException("Neither Madvoc or WebApp found! Use MadvocContextListener to create Madvoc or " + "WebApp#withServletContext() to make it available.");<NEW_LINE>}
webApp = WebApp.get(servletContext);
1,097,615
public void onMatch(RelOptRuleCall call) {<NEW_LINE>LogicalTableLookup logicalTableLookup = call.rel(0);<NEW_LINE>RelNode right = logicalTableLookup.getJoin().getRight();<NEW_LINE>HepProgramBuilder builder = new HepProgramBuilder();<NEW_LINE>builder.addGroupBegin();<NEW_LINE>// push filter<NEW_LINE>builder.addRuleInstance(PushFilterRule.LOGICALVIEW);<NEW_LINE>builder.addRuleInstance(PushFilterRule.MERGE_SORT);<NEW_LINE>builder.addRuleInstance(PushFilterRule.LOGICALUNION);<NEW_LINE>// push project<NEW_LINE>builder.addRuleInstance(PushProjectRule.INSTANCE);<NEW_LINE>builder.addRuleInstance(ProjectMergeRule.INSTANCE);<NEW_LINE>builder.addRuleInstance(ProjectRemoveRule.INSTANCE);<NEW_LINE>builder.addGroupEnd();<NEW_LINE>HepPlanner hepPlanner = new HepPlanner(builder.build(), PlannerContext.getPlannerContext(logicalTableLookup));<NEW_LINE>hepPlanner.stopOptimizerTrace();<NEW_LINE>hepPlanner.setRoot(right);<NEW_LINE><MASK><NEW_LINE>LogicalTableLookup newLogicalTableLookup = logicalTableLookup.copy(logicalTableLookup.getJoin().getJoinType(), logicalTableLookup.getJoin().getCondition(), logicalTableLookup.getProject().getChildExps(), logicalTableLookup.getRowType(), logicalTableLookup.getJoin().getLeft(), newRight, logicalTableLookup.isRelPushedToPrimary());<NEW_LINE>call.transformTo(newLogicalTableLookup);<NEW_LINE>}
RelNode newRight = hepPlanner.findBestExp();
279,099
public void applyTo(CompilationUnit compilationUnit) {<NEW_LINE>compilationUnit.accept(new AbstractVisitor() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void exitIfStatement(IfStatement ifStatement) {<NEW_LINE>Expression conditionExpression = ifStatement.getConditionExpression();<NEW_LINE>if (!(conditionExpression instanceof InstanceOfExpression)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>InstanceOfExpression instanceOfExpression = (InstanceOfExpression) conditionExpression;<NEW_LINE>Expression instanceOfTarget = instanceOfExpression.getExpression();<NEW_LINE>if (!hasNoSideEffects(instanceOfTarget)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>CastExpression castExpression = getCast(thenStatement);<NEW_LINE>if (castExpression == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!castMatchesInstanceOf(castExpression, instanceOfExpression)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Replace the Java cast by a JsDoc cast to preserve the type of the expression.<NEW_LINE>JsDocCastExpression jsDocCast = JsDocCastExpression.newBuilder().setExpression(castExpression.getExpression()).setCastType(castExpression.getTypeDescriptor()).build();<NEW_LINE>replaceIn(thenStatement, castExpression, jsDocCast);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
Statement thenStatement = ifStatement.getThenStatement();
1,595,741
// snippet-start:[iam.java2.list_access_keys.main]<NEW_LINE>public static void listKeys(IamClient iam, String userName) {<NEW_LINE>try {<NEW_LINE>boolean done = false;<NEW_LINE>String newMarker = null;<NEW_LINE>while (!done) {<NEW_LINE>ListAccessKeysResponse response;<NEW_LINE>if (newMarker == null) {<NEW_LINE>ListAccessKeysRequest request = ListAccessKeysRequest.builder().userName(userName).build();<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>ListAccessKeysRequest request = ListAccessKeysRequest.builder().userName(userName).marker(newMarker).build();<NEW_LINE>response = iam.listAccessKeys(request);<NEW_LINE>}<NEW_LINE>for (AccessKeyMetadata metadata : response.accessKeyMetadata()) {<NEW_LINE>System.out.format("Retrieved access key %s", metadata.accessKeyId());<NEW_LINE>}<NEW_LINE>if (!response.isTruncated()) {<NEW_LINE>done = true;<NEW_LINE>} else {<NEW_LINE>newMarker = response.marker();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (IamException e) {<NEW_LINE>System.err.println(e.awsErrorDetails().errorMessage());<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>}
response = iam.listAccessKeys(request);
1,381,853
public OutputSettings unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>OutputSettings outputSettings = new OutputSettings();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("hlsSettings", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>outputSettings.setHlsSettings(HlsSettingsJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return outputSettings;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
6,881
final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UntagResourceRequest> request = null;<NEW_LINE>Response<UntagResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "AppRunner");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UntagResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller());<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(untagResourceRequest));
921,326
public static void startService(Context context, String noteId) {<NEW_LINE>if (context == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {<NEW_LINE>Intent intent = new Intent(context, NotificationsUpdateService.class);<NEW_LINE>if (noteId != null) {<NEW_LINE>intent.putExtra(NotificationsListFragment.NOTE_ID_EXTRA, noteId);<NEW_LINE>intent.putExtra(IS_TAPPED_ON_NOTIFICATION, true);<NEW_LINE>}<NEW_LINE>context.startService(intent);<NEW_LINE>} else {<NEW_LINE>// schedule the JobService here for API >= 26. The JobScheduler is available since API 21, but<NEW_LINE>// it's preferable to use it only since enforcement in API 26 to not break any old behavior<NEW_LINE>ComponentName componentName = new ComponentName(context, NotificationsUpdateJobService.class);<NEW_LINE>PersistableBundle extras = new PersistableBundle();<NEW_LINE>if (noteId != null) {<NEW_LINE>extras.putString(NotificationsListFragment.NOTE_ID_EXTRA, noteId);<NEW_LINE>extras.putBoolean(IS_TAPPED_ON_NOTIFICATION, true);<NEW_LINE>}<NEW_LINE>JobInfo jobInfo = // if possible, try to run right away<NEW_LINE>new JobInfo.Builder(JOB_NOTIFICATIONS_UPDATE_SERVICE_ID, componentName).setRequiresCharging(false).setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY).// if possible, try to run right away<NEW_LINE>setOverrideDeadline(0).setExtras(extras).build();<NEW_LINE>JobScheduler jobScheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);<NEW_LINE>int <MASK><NEW_LINE>if (resultCode == JobScheduler.RESULT_SUCCESS) {<NEW_LINE>AppLog.i(AppLog.T.READER, "notifications update job service > job scheduled");<NEW_LINE>} else {<NEW_LINE>AppLog.e(AppLog.T.READER, "notifications update job service > job could not be scheduled");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
resultCode = jobScheduler.schedule(jobInfo);
790,606
public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception {<NEW_LINE><MASK><NEW_LINE>if (cause instanceof TooLongFrameException) {<NEW_LINE>sendError(ctx, HttpResponseStatus.BAD_REQUEST);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (cause != null) {<NEW_LINE>if (cause.getClass().equals(IOException.class)) {<NEW_LINE>LOGGER.debug("Connection error: " + cause);<NEW_LINE>StartStopListenerDelegate startStopListenerDelegate = (StartStopListenerDelegate) ctx.getAttachment();<NEW_LINE>if (startStopListenerDelegate != null) {<NEW_LINE>LOGGER.debug("Premature end, stopping...");<NEW_LINE>startStopListenerDelegate.stop();<NEW_LINE>}<NEW_LINE>} else if (!cause.getClass().equals(ClosedChannelException.class)) {<NEW_LINE>LOGGER.debug("Caught exception: {}", cause.getMessage());<NEW_LINE>LOGGER.trace("", cause);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Channel ch = e.getChannel();<NEW_LINE>if (ch.isConnected()) {<NEW_LINE>sendError(ctx, HttpResponseStatus.INTERNAL_SERVER_ERROR);<NEW_LINE>}<NEW_LINE>ch.close();<NEW_LINE>}
Throwable cause = e.getCause();
1,154,991
public void eSet(int featureID, Object newValue) {<NEW_LINE>switch(featureID) {<NEW_LINE>case ModelPackage.MBRICKLET_DUAL_BUTTON__LOGGER:<NEW_LINE>setLogger((Logger) newValue);<NEW_LINE>return;<NEW_LINE>case ModelPackage.MBRICKLET_DUAL_BUTTON__UID:<NEW_LINE>setUid((String) newValue);<NEW_LINE>return;<NEW_LINE>case ModelPackage.MBRICKLET_DUAL_BUTTON__POLL:<NEW_LINE>setPoll((Boolean) newValue);<NEW_LINE>return;<NEW_LINE>case ModelPackage.MBRICKLET_DUAL_BUTTON__ENABLED_A:<NEW_LINE>setEnabledA((AtomicBoolean) newValue);<NEW_LINE>return;<NEW_LINE>case ModelPackage.MBRICKLET_DUAL_BUTTON__TINKERFORGE_DEVICE:<NEW_LINE>setTinkerforgeDevice((BrickletDualButton) newValue);<NEW_LINE>return;<NEW_LINE>case ModelPackage.MBRICKLET_DUAL_BUTTON__IP_CONNECTION:<NEW_LINE>setIpConnection((IPConnection) newValue);<NEW_LINE>return;<NEW_LINE>case ModelPackage.MBRICKLET_DUAL_BUTTON__CONNECTED_UID:<NEW_LINE>setConnectedUid((String) newValue);<NEW_LINE>return;<NEW_LINE>case ModelPackage.MBRICKLET_DUAL_BUTTON__POSITION:<NEW_LINE>setPosition((Character) newValue);<NEW_LINE>return;<NEW_LINE>case ModelPackage.MBRICKLET_DUAL_BUTTON__DEVICE_IDENTIFIER:<NEW_LINE>setDeviceIdentifier((Integer) newValue);<NEW_LINE>return;<NEW_LINE>case ModelPackage.MBRICKLET_DUAL_BUTTON__NAME:<NEW_LINE>setName((String) newValue);<NEW_LINE>return;<NEW_LINE>case ModelPackage.MBRICKLET_DUAL_BUTTON__BRICKD:<NEW_LINE>setBrickd((MBrickd) newValue);<NEW_LINE>return;<NEW_LINE>case ModelPackage.MBRICKLET_DUAL_BUTTON__MSUBDEVICES:<NEW_LINE>getMsubdevices().clear();<NEW_LINE>getMsubdevices().addAll((Collection<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>super.eSet(featureID, newValue);<NEW_LINE>}
<? extends DualButtonDevice>) newValue);
861,571
public static CodegenExpression codegen(ExprDotNodeForgeVariable forge, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope classScope) {<NEW_LINE>CodegenExpressionField variableReader = classScope.addOrGetFieldSharable(new VariableReaderCodegenFieldSharable(forge.getVariable()));<NEW_LINE>EPTypeClass variableType;<NEW_LINE>VariableMetaData metaData = forge.getVariable();<NEW_LINE>if (metaData.getEventType() != null) {<NEW_LINE>variableType = EventBean.EPTYPE;<NEW_LINE>} else {<NEW_LINE>variableType = metaData.getType();<NEW_LINE>}<NEW_LINE>CodegenMethod methodNode = codegenMethodScope.makeChild(forge.getEvaluationType(), ExprDotNodeForgeVariableEval.class, classScope);<NEW_LINE>CodegenExpression typeInformation = constantNull();<NEW_LINE>if (classScope.isInstrumented()) {<NEW_LINE>typeInformation = classScope.addOrGetFieldSharable(new EPChainableTypeCodegenSharable(new EPChainableTypeClass(variableType), classScope));<NEW_LINE>}<NEW_LINE>CodegenBlock block = methodNode.getBlock().declareVar(variableType, "result", cast(variableType, exprDotMethod(variableReader, "getValue"))).apply(InstrumentationCode.instblock(classScope, "qExprDotChain", typeInformation, ref("result"), constant(forge.<MASK><NEW_LINE>CodegenExpression chain = ExprDotNodeUtility.evaluateChainCodegen(methodNode, exprSymbol, classScope, ref("result"), variableType, forge.getChainForge(), forge.getResultWrapLambda());<NEW_LINE>if (!JavaClassHelper.isTypeVoid(forge.getEvaluationType().getType())) {<NEW_LINE>block.declareVar(forge.getEvaluationType(), "returned", chain).apply(InstrumentationCode.instblock(classScope, "aExprDotChain")).methodReturn(ref("returned"));<NEW_LINE>} else {<NEW_LINE>block.expression(chain).apply(InstrumentationCode.instblock(classScope, "aExprDotChain"));<NEW_LINE>}<NEW_LINE>return localMethod(methodNode);<NEW_LINE>}
getChainForge().length)));
1,750,851
public void readConfig(final RunConfig config) {<NEW_LINE><MASK><NEW_LINE>if (prj != null) {<NEW_LINE>project = prj.getLookup().lookup(NbMavenProjectImpl.class);<NEW_LINE>}<NEW_LINE>historyMappings.clear();<NEW_LINE>btnNext.setVisible(false);<NEW_LINE>btnPrev.setVisible(false);<NEW_LINE>txtGoals.setText(createSpaceSeparatedList(config.getGoals()));<NEW_LINE>StringBuilder buf = new StringBuilder();<NEW_LINE>for (Map.Entry<? extends String, ? extends String> entry : config.getProperties().entrySet()) {<NEW_LINE>if (buf.length() > 0) {<NEW_LINE>// NOI18N<NEW_LINE>buf.append('\n');<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>buf.append(entry.getKey()).append('=').append(entry.getValue());<NEW_LINE>}<NEW_LINE>epProperties.setText(ActionMappings.createPropertiesList(config.getProperties()));<NEW_LINE>epProperties.setCaretPosition(0);<NEW_LINE>txtProfiles.setText(createSpaceSeparatedList(config.getActivatedProfiles()));<NEW_LINE>setUpdateSnapshots(config.isUpdateSnapshots());<NEW_LINE>setOffline(config.isOffline() != null ? config.isOffline().booleanValue() : false);<NEW_LINE>setRecursive(config.isRecursive());<NEW_LINE>setShowDebug(config.isShowDebug());<NEW_LINE>if (config.getProject() != null) {<NEW_LINE>readProfiles(config.getProject());<NEW_LINE>}<NEW_LINE>}
Project prj = config.getProject();