idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
963,457
public static int run(String[] args) {<NEW_LINE>Args parameters = new Args();<NEW_LINE>JCommander jc = JCommander.newBuilder().addObject(parameters).build();<NEW_LINE>jc.parse(args);<NEW_LINE>if (parameters.help) {<NEW_LINE>jc.usage();<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>File dbDirectory = new File(parameters.databaseDirectory);<NEW_LINE>if (!dbDirectory.exists()) {<NEW_LINE>logger.info("Directory {} does not exist.", parameters.databaseDirectory);<NEW_LINE>return 404;<NEW_LINE>}<NEW_LINE>List<File> files = Arrays.stream(Objects.requireNonNull(dbDirectory.listFiles())).filter(File::isDirectory).collect(Collectors.toList());<NEW_LINE>if (files.isEmpty()) {<NEW_LINE>logger.info("Directory {} does not contain any database.", parameters.databaseDirectory);<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>final long time = System.currentTimeMillis();<NEW_LINE>final List<Future<Boolean>> res = new ArrayList<>();<NEW_LINE>final ThreadPoolExecutor executor = new ThreadPoolExecutor(CPUS, 16 * CPUS, 1, TimeUnit.MINUTES, new ArrayBlockingQueue<>(CPUS, true), Executors.defaultThreadFactory(), new ThreadPoolExecutor.CallerRunsPolicy());<NEW_LINE>executor.allowCoreThreadTimeOut(true);<NEW_LINE>files.forEach(f -> res.add(executor.submit(new ArchiveManifest(parameters.databaseDirectory, f.getName(), parameters.maxManifestSize<MASK><NEW_LINE>int fails = res.size();<NEW_LINE>for (Future<Boolean> re : res) {<NEW_LINE>try {<NEW_LINE>if (Boolean.TRUE.equals(re.get())) {<NEW_LINE>fails--;<NEW_LINE>}<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>logger.error("{}", e);<NEW_LINE>Thread.currentThread().interrupt();<NEW_LINE>} catch (ExecutionException e) {<NEW_LINE>logger.error("{}", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>executor.shutdown();<NEW_LINE>logger.info("DatabaseDirectory:{}, maxManifestSize:{}, maxBatchSize:{}," + "database reopen use {} seconds total.", parameters.databaseDirectory, parameters.maxManifestSize, parameters.maxBatchSize, (System.currentTimeMillis() - time) / 1000);<NEW_LINE>if (fails > 0) {<NEW_LINE>logger.error("Failed!!!!!!!!!!!!!!!!!!!!!!!! size:{}", fails);<NEW_LINE>}<NEW_LINE>return fails;<NEW_LINE>}
, parameters.maxBatchSize))));
38,325
public Void execute(CommandContext commandContext) {<NEW_LINE>JobEntity jobToDelete = null;<NEW_LINE>for (String jobId : jobIds) {<NEW_LINE>jobToDelete = commandContext.<MASK><NEW_LINE>if (jobToDelete != null) {<NEW_LINE>if (commandContext.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) {<NEW_LINE>commandContext.getProcessEngineConfiguration().getEventDispatcher().dispatchEvent(ActivitiEventBuilder.createEntityEvent(FlowableEngineEventType.JOB_CANCELED, jobToDelete), EngineConfigurationConstants.KEY_PROCESS_ENGINE_CONFIG);<NEW_LINE>}<NEW_LINE>jobToDelete.delete();<NEW_LINE>} else {<NEW_LINE>TimerJobEntity timerJobToDelete = commandContext.getTimerJobEntityManager().findJobById(jobId);<NEW_LINE>if (timerJobToDelete != null) {<NEW_LINE>if (commandContext.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) {<NEW_LINE>commandContext.getProcessEngineConfiguration().getEventDispatcher().dispatchEvent(ActivitiEventBuilder.createEntityEvent(FlowableEngineEventType.JOB_CANCELED, timerJobToDelete), EngineConfigurationConstants.KEY_PROCESS_ENGINE_CONFIG);<NEW_LINE>}<NEW_LINE>timerJobToDelete.delete();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
getJobEntityManager().findJobById(jobId);
1,764,224
private void save_atHome(final String title, final String url) {<NEW_LINE><MASK><NEW_LINE>faviconHelper.addFavicon(context, ninjaWebView.getUrl(), ninjaWebView.getFavicon());<NEW_LINE>RecordAction action = new RecordAction(context);<NEW_LINE>action.open(true);<NEW_LINE>if (action.checkUrl(url, RecordUnit.TABLE_START))<NEW_LINE>NinjaToast.show(this, R.string.app_error);<NEW_LINE>else {<NEW_LINE>int counter = sp.getInt("counter", 0);<NEW_LINE>counter = counter + 1;<NEW_LINE>sp.edit().putInt("counter", counter).apply();<NEW_LINE>if (action.addStartSite(new Record(title, url, 0, counter, 1, ninjaWebView.isDesktopMode(), ninjaWebView.isNightMode(), 0))) {<NEW_LINE>NinjaToast.show(this, R.string.app_done);<NEW_LINE>} else {<NEW_LINE>NinjaToast.show(this, R.string.app_error);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>action.close();<NEW_LINE>}
FaviconHelper faviconHelper = new FaviconHelper(context);
552,073
final UpdateProvisionedProductPropertiesResult executeUpdateProvisionedProductProperties(UpdateProvisionedProductPropertiesRequest updateProvisionedProductPropertiesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateProvisionedProductPropertiesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateProvisionedProductPropertiesRequest> request = null;<NEW_LINE>Response<UpdateProvisionedProductPropertiesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateProvisionedProductPropertiesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateProvisionedProductPropertiesRequest));<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, "Service Catalog");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateProvisionedProductProperties");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateProvisionedProductPropertiesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateProvisionedProductPropertiesResultJsonUnmarshaller());<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,074,509
public List<Pair<Pair<BinaryName, String>, Object[]>> analyseUnit(@NonNull final CompilationUnitTree cu, @NonNull final JavacTaskImpl jt) throws IOException {<NEW_LINE>if (used) {<NEW_LINE>// NOI18N<NEW_LINE>throw new IllegalStateException("Trying to reuse SimpleAnalyzer");<NEW_LINE>}<NEW_LINE>used = true;<NEW_LINE>try {<NEW_LINE>final Map<Pair<BinaryName, String>, UsagesData<String>> usages = new HashMap<>();<NEW_LINE>final Set<Pair<String, String>> topLevels = new HashSet<>();<NEW_LINE>final JavaFileManager jfm = jt.getContext().get(JavaFileManager.class);<NEW_LINE>final UsagesVisitor uv = new UsagesVisitor(jt, cu, jfm, cu.getSourceFile(), topLevels);<NEW_LINE>uv.scan(cu, usages);<NEW_LINE>for (Map.Entry<Pair<BinaryName, String>, UsagesData<String>> oe : usages.entrySet()) {<NEW_LINE>final Pair<BinaryName, String> key = oe.getKey();<NEW_LINE>final UsagesData<String<MASK><NEW_LINE>addClassReferences(key, data);<NEW_LINE>}<NEW_LINE>// this.writer.deleteEnclosedAndStore(this.references, topLevels);<NEW_LINE>return this.references;<NEW_LINE>} catch (IllegalArgumentException iae) {<NEW_LINE>Exceptions.printStackTrace(iae);<NEW_LINE>return null;<NEW_LINE>} catch (OutputFileManager.InvalidSourcePath e) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
> data = oe.getValue();
1,721,565
public Long[] asLongArray() {<NEW_LINE>if (arrayType.getElementType().is(ExprType.LONG)) {<NEW_LINE>return Arrays.stream(value).map(v -> (Long) v).toArray(Long[]::new);<NEW_LINE>} else if (arrayType.getElementType().is(ExprType.DOUBLE)) {<NEW_LINE>return value == null ? null : Arrays.stream(value).map(v -> ((Double) v).longValue()).toArray(Long[]::new);<NEW_LINE>} else if (arrayType.getElementType().is(ExprType.STRING)) {<NEW_LINE>return Arrays.stream(value).map(v -> {<NEW_LINE>if (v == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Long lv = GuavaUtils.tryParseLong((String) v);<NEW_LINE>if (lv == null) {<NEW_LINE>Double d = Doubles<MASK><NEW_LINE>if (d != null) {<NEW_LINE>lv = d.longValue();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return lv;<NEW_LINE>}).toArray(Long[]::new);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
.tryParse((String) v);
1,821,365
public Repo<Manager> call(long tid, Manager environment) {<NEW_LINE>// directories are intentionally not created.... this is done because directories should be<NEW_LINE>// unique<NEW_LINE>// because they occupy a different namespace than normal tablet directories... also some clones<NEW_LINE>// may never create files.. therefore there is no need to consume namenode space w/ directories<NEW_LINE>// that are not used... tablet will create directories as needed<NEW_LINE>if (cloneInfo.keepOffline) {<NEW_LINE>environment.getTableManager().transitionTableState(cloneInfo.tableId, TableState.OFFLINE);<NEW_LINE>} else {<NEW_LINE>environment.getTableManager().transitionTableState(cloneInfo.tableId, TableState.ONLINE);<NEW_LINE>}<NEW_LINE>Utils.unreserveNamespace(environment, cloneInfo.srcNamespaceId, tid, false);<NEW_LINE>if (!cloneInfo.srcNamespaceId.equals(cloneInfo.namespaceId))<NEW_LINE>Utils.unreserveNamespace(environment, cloneInfo.namespaceId, tid, false);<NEW_LINE>Utils.unreserveTable(environment, cloneInfo.srcTableId, tid, false);<NEW_LINE>Utils.unreserveTable(environment, <MASK><NEW_LINE>environment.getEventCoordinator().event("Cloned table %s from %s", cloneInfo.tableName, cloneInfo.srcTableId);<NEW_LINE>LoggerFactory.getLogger(FinishCloneTable.class).debug("Cloned table " + cloneInfo.srcTableId + " " + cloneInfo.tableId + " " + cloneInfo.tableName);<NEW_LINE>return null;<NEW_LINE>}
cloneInfo.tableId, tid, true);
948,218
protected void onHandleIntent(@Nullable Intent intent) {<NEW_LINE>if (intent == null) {<NEW_LINE>sendResults(Activity.RESULT_CANCELED, null);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>op = intent.getIntExtra(EXTRA_OP, BatchOpsManager.OP_NONE);<NEW_LINE>packages = intent.getStringArrayListExtra(EXTRA_OP_PKG);<NEW_LINE>if (packages == null)<NEW_LINE>return;<NEW_LINE><MASK><NEW_LINE>ArrayList<Integer> userHandles = intent.getIntegerArrayListExtra(EXTRA_OP_USERS);<NEW_LINE>if (userHandles == null) {<NEW_LINE>userHandles = new ArrayList<>(packages.size());<NEW_LINE>for (String ignore : packages) userHandles.add(UserHandleHidden.myUserId());<NEW_LINE>}<NEW_LINE>if (op == BatchOpsManager.OP_NONE || packages == null) {<NEW_LINE>sendResults(Activity.RESULT_CANCELED, null);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>sendStarted();<NEW_LINE>BatchOpsManager batchOpsManager = new BatchOpsManager();<NEW_LINE>batchOpsManager.setArgs(args);<NEW_LINE>BatchOpsManager.Result result = batchOpsManager.performOp(op, packages, userHandles);<NEW_LINE>if (result.isSuccessful()) {<NEW_LINE>sendResults(Activity.RESULT_OK, null);<NEW_LINE>} else {<NEW_LINE>sendResults(Activity.RESULT_FIRST_USER, result);<NEW_LINE>}<NEW_LINE>}
args = intent.getBundleExtra(EXTRA_OP_EXTRA_ARGS);
68,826
public static void zoom(MQuery query) {<NEW_LINE>if (query == null || query.getTableName() == null || query.getTableName().length() == 0)<NEW_LINE>return;<NEW_LINE>String TableName = query.getTableName();<NEW_LINE>int AD_Window_ID = 0;<NEW_LINE>int PO_Window_ID = 0;<NEW_LINE>String sql = "SELECT AD_Window_ID, PO_Window_ID FROM AD_Table WHERE TableName=?";<NEW_LINE>try {<NEW_LINE>PreparedStatement pstmt = DB.prepareStatement(sql, null);<NEW_LINE>pstmt.setString(1, TableName);<NEW_LINE>ResultSet rs = pstmt.executeQuery();<NEW_LINE>if (rs.next()) {<NEW_LINE>AD_Window_ID = rs.getInt(1);<NEW_LINE>PO_Window_ID = rs.getInt(2);<NEW_LINE>}<NEW_LINE>rs.close();<NEW_LINE>pstmt.close();<NEW_LINE>} catch (SQLException e) {<NEW_LINE>log.log(<MASK><NEW_LINE>}<NEW_LINE>// Nothing to Zoom to<NEW_LINE>if (AD_Window_ID == 0)<NEW_LINE>return;<NEW_LINE>// PO Zoom ?<NEW_LINE>boolean isSOTrx = true;<NEW_LINE>if (PO_Window_ID != 0) {<NEW_LINE>isSOTrx = DB.isSOTrx(TableName, query.getWhereClause(false));<NEW_LINE>if (!isSOTrx)<NEW_LINE>AD_Window_ID = PO_Window_ID;<NEW_LINE>}<NEW_LINE>log.config(query + " (IsSOTrx=" + isSOTrx + ")");<NEW_LINE>AWindow frame = new AWindow();<NEW_LINE>if (!frame.initWindow(AD_Window_ID, query))<NEW_LINE>return;<NEW_LINE>addToWindowManager(frame);<NEW_LINE>if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED)) {<NEW_LINE>AEnv.showMaximized(frame);<NEW_LINE>} else {<NEW_LINE>AEnv.showCenterScreen(frame);<NEW_LINE>}<NEW_LINE>frame = null;<NEW_LINE>}
Level.SEVERE, sql, e);
1,199,209
public Builder mergeFrom(cn.wildfirechat.proto.WFCMessage.PullGroupInfoResult other) {<NEW_LINE>if (other == cn.wildfirechat.proto.WFCMessage.PullGroupInfoResult.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (infoBuilder_ == null) {<NEW_LINE>if (!other.info_.isEmpty()) {<NEW_LINE>if (info_.isEmpty()) {<NEW_LINE>info_ = other.info_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000001);<NEW_LINE>} else {<NEW_LINE>ensureInfoIsMutable();<NEW_LINE>info_.addAll(other.info_);<NEW_LINE>}<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (!other.info_.isEmpty()) {<NEW_LINE>if (infoBuilder_.isEmpty()) {<NEW_LINE>infoBuilder_.dispose();<NEW_LINE>infoBuilder_ = null;<NEW_LINE>info_ = other.info_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000001);<NEW_LINE>infoBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getInfoFieldBuilder() : null;<NEW_LINE>} else {<NEW_LINE>infoBuilder_.addAllMessages(other.info_);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.<MASK><NEW_LINE>return this;<NEW_LINE>}
mergeUnknownFields(other.getUnknownFields());
750,717
private static ImmutableMap<String, String> loadUserConfig(CaliperOptions caliperOptions, String suffix) {<NEW_LINE>File mainConfigFile = caliperOptions.caliperConfigFile().getAbsoluteFile();<NEW_LINE>String mainConfigFileBaseName = Files.getNameWithoutExtension(mainConfigFile.getName());<NEW_LINE>String configFileName = mainConfigFileBaseName + suffix + ".properties";<NEW_LINE>File parentDir = mainConfigFile.getParentFile();<NEW_LINE>File configFile;<NEW_LINE>if (parentDir == null) {<NEW_LINE>// unlikely since we got an absolute path, but try using just the file name<NEW_LINE>configFile = new File(configFileName);<NEW_LINE>} else {<NEW_LINE>configFile <MASK><NEW_LINE>}<NEW_LINE>if (configFile.exists()) {<NEW_LINE>try {<NEW_LINE>return Util.loadProperties(Files.asByteSource(configFile));<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new InvalidConfigurationException("Couldn't load config file: " + configFile, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// For device-type specific user config, don't create the file automatically if it doesn't exist<NEW_LINE>return ImmutableMap.of();<NEW_LINE>}
= new File(parentDir, configFileName);
505,210
private void doPrintUsage(boolean force) {<NEW_LINE>if (config.getShouldPrintUsage() || force) {<NEW_LINE>String rubyPager = getRubyPagerEnv();<NEW_LINE>if (rubyPager == null) {<NEW_LINE>config.getOutput().print(OutputStrings.getBasicUsageHelp());<NEW_LINE>config.getOutput().<MASK><NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>ProcessBuilder builder = new ProcessBuilder(rubyPager);<NEW_LINE>builder.environment().put("LESS", "-R");<NEW_LINE>builder.redirectOutput(ProcessBuilder.Redirect.INHERIT);<NEW_LINE>builder.redirectError(ProcessBuilder.Redirect.INHERIT);<NEW_LINE>Process process = builder.start();<NEW_LINE>OutputStream in = process.getOutputStream();<NEW_LINE>String fullHelp = OutputStrings.getBasicUsageHelp() + OutputStrings.getFeaturesHelp();<NEW_LINE>in.write(fullHelp.getBytes(StandardCharsets.UTF_8));<NEW_LINE>in.flush();<NEW_LINE>in.close();<NEW_LINE>process.waitFor();<NEW_LINE>} catch (InterruptedException | IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
print(OutputStrings.getFeaturesHelp());
1,666,515
public static void main(String[] args) {<NEW_LINE>Map mapBefore = new HashMap();<NEW_LINE>byte[] b = { 0, 1, 2 };<NEW_LINE>mapBefore.put("Hi", b);<NEW_LINE>String jsonByteArray = JSONUtils.encodeToJSON(mapBefore);<NEW_LINE>System.out.println(jsonByteArray);<NEW_LINE>Map mapAfter = JSONUtils.decodeJSON(jsonByteArray);<NEW_LINE>b = MapUtils.getMapByteArray(mapAfter, "Hi", null);<NEW_LINE>System.out.println(b.length);<NEW_LINE>for (int i = 0; i < b.length; i++) {<NEW_LINE>byte c = b[i];<NEW_LINE>System.out.println("--" + c);<NEW_LINE>}<NEW_LINE>Map map = new HashMap();<NEW_LINE>map.put("Test", "TestValue");<NEW_LINE>Map map2 = new HashMap();<NEW_LINE>map2.put("Test2", "test2value");<NEW_LINE>map.put("TestMap", map2);<NEW_LINE>List list = new ArrayList();<NEW_LINE>list.add(new Long(5));<NEW_LINE>list.add("five");<NEW_LINE>map2.put("ListTest", list);<NEW_LINE>Map map3 = new HashMap();<NEW_LINE><MASK><NEW_LINE>list.add(map3);<NEW_LINE>System.out.println(encodeToJSON(map));<NEW_LINE>System.out.println(encodeToJSON(list));<NEW_LINE>}
map3.put("Test3", "test3value");
165,896
public static void loadSchedulerInfo(AppResult result, HadoopApplicationData data, Scheduler scheduler) {<NEW_LINE>String appId = data.getAppId();<NEW_LINE>result.scheduler = Utils.truncateField(scheduler.getSchedulerName(), AppResult.SCHEDULER_LIMIT, appId);<NEW_LINE>result.workflowDepth = scheduler.getWorkflowDepth();<NEW_LINE>result.jobName = scheduler.getJobName() != null ? Utils.truncateField(scheduler.getJobName(), <MASK><NEW_LINE>result.jobDefId = Utils.truncateField(scheduler.getJobDefId(), AppResult.URL_LEN_LIMIT, appId);<NEW_LINE>result.jobDefUrl = scheduler.getJobDefUrl() != null ? Utils.truncateField(scheduler.getJobDefUrl(), AppResult.URL_LEN_LIMIT, appId) : "";<NEW_LINE>result.jobExecId = Utils.truncateField(scheduler.getJobExecId(), AppResult.URL_LEN_LIMIT, appId);<NEW_LINE>result.jobExecUrl = scheduler.getJobExecUrl() != null ? Utils.truncateField(scheduler.getJobExecUrl(), AppResult.URL_LEN_LIMIT, appId) : "";<NEW_LINE>result.flowDefId = Utils.truncateField(scheduler.getFlowDefId(), AppResult.URL_LEN_LIMIT, appId);<NEW_LINE>result.flowDefUrl = scheduler.getFlowDefUrl() != null ? Utils.truncateField(scheduler.getFlowDefUrl(), AppResult.URL_LEN_LIMIT, appId) : "";<NEW_LINE>result.flowExecId = Utils.truncateField(scheduler.getFlowExecId(), AppResult.FLOW_EXEC_ID_LIMIT, appId);<NEW_LINE>result.flowExecUrl = scheduler.getFlowExecUrl() != null ? Utils.truncateField(scheduler.getFlowExecUrl(), AppResult.URL_LEN_LIMIT, appId) : "";<NEW_LINE>}
AppResult.JOB_NAME_LIMIT, appId) : "";
302,933
public void expandPlainPath(int row, int maxChildren) {<NEW_LINE>if (tree != null)<NEW_LINE>try {<NEW_LINE>markExpansionTransaction();<NEW_LINE>TreePath tpath = tree.getPathForRow(row);<NEW_LINE>if (tpath == null)<NEW_LINE>return;<NEW_LINE>TreeModel tmodel = tree.getModel();<NEW_LINE>int childCount = tmodel.getChildCount(tpath.getLastPathComponent());<NEW_LINE>while (childCount > 0 && childCount <= maxChildren) {<NEW_LINE>tpath = tpath.pathByAddingChild(tmodel.getChild(tpath.getLastPathComponent(), 0));<NEW_LINE>childCount = tmodel.<MASK><NEW_LINE>}<NEW_LINE>tree.putClientProperty(UIUtils.PROP_AUTO_EXPANDING, Boolean.TRUE);<NEW_LINE>try {<NEW_LINE>tree.expandPath(tpath);<NEW_LINE>selectPath(tpath, true);<NEW_LINE>} finally {<NEW_LINE>tree.putClientProperty(UIUtils.PROP_AUTO_EXPANDING, null);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>clearExpansionTransaction();<NEW_LINE>}<NEW_LINE>}
getChildCount(tpath.getLastPathComponent());
1,564,678
private I_M_HU createHUInstance(final I_M_HU_PI_Version huPIVersion, @Nullable final I_M_HU_Item parentItem) {<NEW_LINE>final IHUContext huContext = getHUContext();<NEW_LINE>final I_M_HU hu = InterfaceWrapperHelper.newInstance(I_M_HU.class, huContext);<NEW_LINE>hu.setM_HU_PI_Version(huPIVersion);<NEW_LINE>//<NEW_LINE>// Get Parent HU (if any)<NEW_LINE>final I_M_HU parentHU;<NEW_LINE>if (parentItem != null) {<NEW_LINE>parentHU = parentItem.getM_HU();<NEW_LINE>} else {<NEW_LINE>parentHU = null;<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Copy HUStatus from parent<NEW_LINE>final String huStatus;<NEW_LINE>if (parentHU != null) {<NEW_LINE>huStatus = parentHU.getHUStatus();<NEW_LINE>} else {<NEW_LINE>// Set configured HUStatus if no parent item/parent item HU found.<NEW_LINE>huStatus = getHUStatus();<NEW_LINE>}<NEW_LINE>huStatusBL.setHUStatus(huContext, hu, huStatus);<NEW_LINE>//<NEW_LINE>// Copy C_BPartner_ID from parent<NEW_LINE>final int parentBPartnerId = parentHU == null ? -1 : parentHU.getC_BPartner_ID();<NEW_LINE>if (parentBPartnerId > 0) {<NEW_LINE>hu.setC_BPartner_ID(parentBPartnerId);<NEW_LINE>hu.<MASK><NEW_LINE>} else {<NEW_LINE>final BPartnerId bpartnerId = getBPartnerId();<NEW_LINE>hu.setC_BPartner_ID(BPartnerId.toRepoId(bpartnerId));<NEW_LINE>final int bpartnerLocationId = getC_BPartner_Location_ID();<NEW_LINE>if (bpartnerId != null && bpartnerLocationId > 0) {<NEW_LINE>hu.setC_BPartner_Location_ID(bpartnerLocationId);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Copy M_Locator from parent or get it from HUBuilder configuration<NEW_LINE>if (parentHU != null) {<NEW_LINE>hu.setM_Locator_ID(parentHU.getM_Locator_ID());<NEW_LINE>} else {<NEW_LINE>final LocatorId locatorId = getLocatorId();<NEW_LINE>hu.setM_Locator_ID(LocatorId.toRepoId(locatorId));<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Set LU/TU configuration reference<NEW_LINE>final I_M_HU_LUTU_Configuration lutuConfig = getM_HU_LUTU_Configuration();<NEW_LINE>hu.setM_HU_LUTU_Configuration(lutuConfig);<NEW_LINE>//<NEW_LINE>// 07970: Set M_HU.M_HU_PI_Item_Product_ID<NEW_LINE>final I_M_HU_PI_Item_Product piip = getM_HU_PI_Item_ProductOrNull(lutuConfig, parentHU);<NEW_LINE>hu.setM_HU_PI_Item_Product_ID(piip != null ? piip.getM_HU_PI_Item_Product_ID() : -1);<NEW_LINE>//<NEW_LINE>// fresh 08162: Set M_HU.HUPlanningReceiptOwnerPM<NEW_LINE>final boolean huPlanningReceiptOwnerPM = isHUPlanningReceiptOwnerPM();<NEW_LINE>hu.setHUPlanningReceiptOwnerPM(huPlanningReceiptOwnerPM);<NEW_LINE>setClearanceStatus(hu, parentHU, getHUClearanceStatus(), getHUClearanceNote());<NEW_LINE>//<NEW_LINE>// Notify Storage and Attributes DAO that a new HU was created<NEW_LINE>// NOTE: depends on their implementation, but they have a chance to do some optimizations<NEW_LINE>huContext.getHUStorageFactory().getHUStorageDAO().initHUStorages(hu);<NEW_LINE>//<NEW_LINE>// Save HU<NEW_LINE>handlingUnitsDAO.saveHU(hu);<NEW_LINE>//<NEW_LINE>// Return<NEW_LINE>return hu;<NEW_LINE>}
setC_BPartner_Location_ID(parentHU.getC_BPartner_Location_ID());
158,558
private Mono<Response<Void>> deleteInSubscriptionWithResponseAsync(String assessmentMetadataName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (assessmentMetadataName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter assessmentMetadataName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>final String apiVersion = "2020-01-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>return FluxUtil.withContext(context -> service.deleteInSubscription(this.client.getEndpoint(), apiVersion, assessmentMetadataName, this.client.getSubscriptionId(), accept, context)).contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));<NEW_LINE>}
error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));
714,958
private static void xmpSample(InputStream imageStream) throws XMPException, ImageProcessingException, IOException {<NEW_LINE>// Extract metadata from the image<NEW_LINE>Metadata metadata = ImageMetadataReader.readMetadata(imageStream);<NEW_LINE>// Iterate through any XMP directories we may have received<NEW_LINE>for (XmpDirectory xmpDirectory : metadata.getDirectoriesOfType(XmpDirectory.class)) {<NEW_LINE>// Usually with metadata-extractor, you iterate a directory's tags. However XMP has<NEW_LINE>// a complex structure with many potentially unknown properties. This doesn't map<NEW_LINE>// well to metadata-extractor's directory-and-tag model.<NEW_LINE>//<NEW_LINE>// If you need to use XMP data, access the XMPMeta object directly.<NEW_LINE><MASK><NEW_LINE>XMPIterator itr = xmpMeta.iterator();<NEW_LINE>// Iterate XMP properties<NEW_LINE>while (itr.hasNext()) {<NEW_LINE>XMPPropertyInfo property = (XMPPropertyInfo) itr.next();<NEW_LINE>// Print details of the property<NEW_LINE>System.out.println(property.getPath() + ": " + property.getValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
XMPMeta xmpMeta = xmpDirectory.getXMPMeta();
459,351
private Result searchMultipleDocumentTypes(Searcher searcher, Query query, Execution execution) {<NEW_LINE>Set<String> docTypes = resolveDocumentTypes(query, execution.context().getIndexFacts());<NEW_LINE>Result invalidRankProfile = checkValidRankProfiles(query, docTypes);<NEW_LINE>if (invalidRankProfile != null)<NEW_LINE>return invalidRankProfile;<NEW_LINE>List<Query> queries = createQueries(query, docTypes);<NEW_LINE>if (queries.size() == 1) {<NEW_LINE>return searcher.search(queries.get(0), execution);<NEW_LINE>} else {<NEW_LINE>Result mergedResult = new Result(query);<NEW_LINE>List<FutureTask<Result>> pending = new ArrayList<>(queries.size());<NEW_LINE>for (Query q : queries) {<NEW_LINE>FutureTask<Result> task = new FutureTask<>(() -> searcher.search(q, execution));<NEW_LINE>try {<NEW_LINE>executor.execute(task);<NEW_LINE>pending.add(task);<NEW_LINE>} catch (RejectedExecutionException rej) {<NEW_LINE>task.run();<NEW_LINE>processResult(query, task, mergedResult);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (FutureTask<Result> task : pending) {<NEW_LINE>processResult(query, task, mergedResult);<NEW_LINE>}<NEW_LINE>// Should we trim the merged result?<NEW_LINE>if (query.getOffset() > 0 || query.getHits() < mergedResult.hits().size()) {<NEW_LINE>if (mergedResult.getHitOrderer() != null) {<NEW_LINE>// Make sure we have the necessary data for sorting<NEW_LINE>searcher.fill(mergedResult, VespaBackEndSearcher.SORTABLE_ATTRIBUTES_SUMMARY_CLASS, execution);<NEW_LINE>}<NEW_LINE>mergedResult.hits().trim(query.getOffset(<MASK><NEW_LINE>// Needed when doing a trim<NEW_LINE>query.setOffset(0);<NEW_LINE>}<NEW_LINE>return mergedResult;<NEW_LINE>}<NEW_LINE>}
), query.getHits());
531,296
public void mapPartition(Iterable<T> values, Collector<Tuple3<Integer, Integer, double[]>> out) throws Exception {<NEW_LINE>ComContext context = new ComContext(sessionId, getIterationRuntimeContext());<NEW_LINE>int taskId = getRuntimeContext().getIndexOfThisSubtask();<NEW_LINE>int numOfSubTasks <MASK><NEW_LINE>int iterNum = getIterationRuntimeContext().getSuperstepNumber();<NEW_LINE>LOG.info("taskId: {}, collect start", taskId);<NEW_LINE>double[] sendBuf = context.getObj(bufferName);<NEW_LINE>int sendLen = lengthName != null ? context.getObj(lengthName) : sendBuf.length;<NEW_LINE>double[] transBuf = null;<NEW_LINE>if (iterNum == 1) {<NEW_LINE>transBuf = new double[TRANSFER_BUFFER_SIZE];<NEW_LINE>context.putObj(transferBufferName, transBuf);<NEW_LINE>} else {<NEW_LINE>transBuf = context.getObj(transferBufferName);<NEW_LINE>}<NEW_LINE>int pieces = pieces(sendLen);<NEW_LINE>LOG.info("taskId: {}, len: {}, pieces: {}", taskId, sendLen, pieces);<NEW_LINE>DistributedInfo distributedInfo = new DefaultDistributedInfo();<NEW_LINE>int agg = 0;<NEW_LINE>for (int i = 0; i < numOfSubTasks; ++i) {<NEW_LINE>int startPos = (int) distributedInfo.startPos(i, numOfSubTasks, pieces);<NEW_LINE>int cnt = (int) distributedInfo.localRowCnt(i, numOfSubTasks, pieces);<NEW_LINE>for (int j = 0; j < cnt; ++j) {<NEW_LINE>int bufStart = (startPos + j) * TRANSFER_BUFFER_SIZE;<NEW_LINE>// the last<NEW_LINE>if (startPos + j == pieces - 1) {<NEW_LINE>System.arraycopy(sendBuf, bufStart, transBuf, 0, lastLen(sendLen));<NEW_LINE>} else {<NEW_LINE>System.arraycopy(sendBuf, bufStart, transBuf, 0, TRANSFER_BUFFER_SIZE);<NEW_LINE>}<NEW_LINE>agg++;<NEW_LINE>out.collect(Tuple3.of(i, startPos + j, transBuf));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>LOG.info("taskId: {}, collect end, agg: {}", taskId, agg);<NEW_LINE>}
= getRuntimeContext().getNumberOfParallelSubtasks();
1,776,369
public void marshall(BatchWriteOperationResponse batchWriteOperationResponse, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (batchWriteOperationResponse == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(batchWriteOperationResponse.getCreateObject(), CREATEOBJECT_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchWriteOperationResponse.getAttachObject(), ATTACHOBJECT_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchWriteOperationResponse.getDetachObject(), DETACHOBJECT_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchWriteOperationResponse.getUpdateObjectAttributes(), UPDATEOBJECTATTRIBUTES_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchWriteOperationResponse.getDeleteObject(), DELETEOBJECT_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchWriteOperationResponse.getAddFacetToObject(), ADDFACETTOOBJECT_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchWriteOperationResponse.getRemoveFacetFromObject(), REMOVEFACETFROMOBJECT_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(batchWriteOperationResponse.getDetachPolicy(), DETACHPOLICY_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchWriteOperationResponse.getCreateIndex(), CREATEINDEX_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchWriteOperationResponse.getAttachToIndex(), ATTACHTOINDEX_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchWriteOperationResponse.getDetachFromIndex(), DETACHFROMINDEX_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchWriteOperationResponse.getAttachTypedLink(), ATTACHTYPEDLINK_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchWriteOperationResponse.getDetachTypedLink(), DETACHTYPEDLINK_BINDING);<NEW_LINE>protocolMarshaller.marshall(batchWriteOperationResponse.getUpdateLinkAttributes(), UPDATELINKATTRIBUTES_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
batchWriteOperationResponse.getAttachPolicy(), ATTACHPOLICY_BINDING);
824,833
private void renameOsgiCache() throws GFLauncherException {<NEW_LINE>if (info.isUpgrade()) {<NEW_LINE>File osgiCacheDir = new File(info.getDomainRootDir(), "osgi-cache");<NEW_LINE>File backupOsgiCacheDir = new File(info.getDomainRootDir(), <MASK><NEW_LINE>if (osgiCacheDir.exists() && !backupOsgiCacheDir.exists()) {<NEW_LINE>if (!FileUtils.renameFile(osgiCacheDir, backupOsgiCacheDir)) {<NEW_LINE>throw new GFLauncherException(STRINGS.get("rename_osgi_cache_failed", osgiCacheDir, backupOsgiCacheDir));<NEW_LINE>} else {<NEW_LINE>GFLauncherLogger.fine("rename_osgi_cache_succeeded", osgiCacheDir, backupOsgiCacheDir);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
"osgi-cache-" + System.currentTimeMillis());
441,723
public static void nailMain(NGContext context) {<NEW_LINE>context.out.println();<NEW_LINE>context.out.println(" context.getCommand(): " + context.getCommand());<NEW_LINE>context.out.println(" context.getInetAddress(): " + context.getInetAddress());<NEW_LINE>context.out.println(" context.getPort(): " + context.getPort());<NEW_LINE>context.out.println("context.getWorkingDirectory(): " + context.getWorkingDirectory());<NEW_LINE>context.out.println(" context.getFileSeparator(): " + context.getFileSeparator());<NEW_LINE>context.out.println(" context.getPathSeparator(): " + context.getPathSeparator());<NEW_LINE>context.out.println("\ncontext.getArgs():");<NEW_LINE>for (int i = 0; i < context.getArgs().length; ++i) {<NEW_LINE>context.out.println(" args[" + i + "]=" + context.getArgs()[i]);<NEW_LINE>}<NEW_LINE>context.out.println("\ncontext.getEnv():");<NEW_LINE>TreeSet keys = new TreeSet(context.<MASK><NEW_LINE>for (Object okey : keys) {<NEW_LINE>String key = (String) okey;<NEW_LINE>context.out.println(" env[\"" + key + "\"]=" + context.getEnv().getProperty(key));<NEW_LINE>}<NEW_LINE>}
getEnv().keySet());
1,512,266
// We can reuse the cachedGroupsFactory even if the new groups factory is different, as long<NEW_LINE>// as the compiledRegex is the same. This can happen if a new RegExp instance is repeatedly<NEW_LINE>// created for the same regular expression.<NEW_LINE>@Specialization(guards = "getGroupsFactory(regExp) == cachedGroupsFactory || getCompiledRegex(regExp) == cachedCompiledRegex")<NEW_LINE>final JSDynamicObject doCachedGroupsFactory(JSContext context, @SuppressWarnings("unused") JSDynamicObject regExp, Object regexResult, TruffleString input, boolean isIndices, @Cached("getCompiledRegex(regExp)") @SuppressWarnings("unused") Object cachedCompiledRegex, @Cached("getGroupsFactory(regExp)") JSObjectFactory cachedGroupsFactory, @Cached("createIsJSRegExpNode()") @SuppressWarnings("unused") IsJSClassNode isJSRegExpNode) {<NEW_LINE>return doIt(context, getRealm(), <MASK><NEW_LINE>}
cachedGroupsFactory, regexResult, input, isIndices);
185,718
public Builder mergeFrom(org.apache.jena.riot.protobuf.wire.PB_RDF.RDF_Graph other) {<NEW_LINE>if (other == org.apache.jena.riot.protobuf.wire.PB_RDF.RDF_Graph.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (tripleBuilder_ == null) {<NEW_LINE>if (!other.triple_.isEmpty()) {<NEW_LINE>if (triple_.isEmpty()) {<NEW_LINE>triple_ = other.triple_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000001);<NEW_LINE>} else {<NEW_LINE>ensureTripleIsMutable();<NEW_LINE>triple_.addAll(other.triple_);<NEW_LINE>}<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (!other.triple_.isEmpty()) {<NEW_LINE>if (tripleBuilder_.isEmpty()) {<NEW_LINE>tripleBuilder_.dispose();<NEW_LINE>tripleBuilder_ = null;<NEW_LINE>triple_ = other.triple_;<NEW_LINE><MASK><NEW_LINE>tripleBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTripleFieldBuilder() : null;<NEW_LINE>} else {<NEW_LINE>tripleBuilder_.addAllMessages(other.triple_);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.mergeUnknownFields(other.unknownFields);<NEW_LINE>onChanged();<NEW_LINE>return this;<NEW_LINE>}
bitField0_ = (bitField0_ & ~0x00000001);
754,642
public void cleanUser(String user) throws AccumuloSecurityException {<NEW_LINE>try {<NEW_LINE>synchronized (zooCache) {<NEW_LINE>zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserSysPerms, NodeMissingPolicy.SKIP);<NEW_LINE>zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserTablePerms, NodeMissingPolicy.SKIP);<NEW_LINE>zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserNamespacePerms, NodeMissingPolicy.SKIP);<NEW_LINE>zooCache.clear(ZKUserPath + "/" + user);<NEW_LINE>}<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>log.error("{}", e.getMessage(), e);<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>} catch (KeeperException e) {<NEW_LINE>log.error("{}", <MASK><NEW_LINE>if (e.code().equals(KeeperException.Code.NONODE))<NEW_LINE>throw new AccumuloSecurityException(user, SecurityErrorCode.USER_DOESNT_EXIST, e);<NEW_LINE>throw new AccumuloSecurityException(user, SecurityErrorCode.CONNECTION_ERROR, e);<NEW_LINE>}<NEW_LINE>}
e.getMessage(), e);
247,256
private String computeServiceName() {<NEW_LINE>final Class<?> httpClientClass = Classes.childClassOf(AmazonWebServiceClient.class, this);<NEW_LINE>final String httpClientName = httpClientClass.getSimpleName();<NEW_LINE>final String <MASK><NEW_LINE>if (service != null) {<NEW_LINE>// only if it is so explicitly configured<NEW_LINE>return service;<NEW_LINE>}<NEW_LINE>// Otherwise, make use of convention over configuration<NEW_LINE>int j = httpClientName.indexOf("JavaClient");<NEW_LINE>if (j == -1) {<NEW_LINE>j = httpClientName.indexOf("Client");<NEW_LINE>if (j == -1) {<NEW_LINE>throw new IllegalStateException("Unrecognized suffix for the AWS http client class name " + httpClientName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int i = httpClientName.indexOf(AMAZON);<NEW_LINE>int len;<NEW_LINE>if (i == -1) {<NEW_LINE>i = httpClientName.indexOf(AWS);<NEW_LINE>if (i == -1) {<NEW_LINE>throw new IllegalStateException("Unrecognized prefix for the AWS http client class name " + httpClientName);<NEW_LINE>}<NEW_LINE>len = AWS.length();<NEW_LINE>} else {<NEW_LINE>len = AMAZON.length();<NEW_LINE>}<NEW_LINE>if (i >= j) {<NEW_LINE>throw new IllegalStateException("Unrecognized AWS http client class name " + httpClientName);<NEW_LINE>}<NEW_LINE>final String serviceName = httpClientName.substring(i + len, j);<NEW_LINE>return StringUtils.lowerCase(serviceName);<NEW_LINE>}
service = ServiceNameFactory.getServiceName(httpClientName);
1,818,347
public <T> T doPreventingRecursion(@Nonnull Key key, boolean memoize, @Nonnull Computable<T> computation) {<NEW_LINE>MyKey realKey = new MyKey(id, key, true);<NEW_LINE>final CalculationStack stack = ourStack.get();<NEW_LINE>if (stack.checkReentrancy(realKey)) {<NEW_LINE>if (ourAssertOnPrevention) {<NEW_LINE>throw new StackOverflowPreventedException("Endless recursion prevention occurred");<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (memoize) {<NEW_LINE>MemoizedValue memoized = stack.getMemoizedValue(realKey);<NEW_LINE>if (memoized != null) {<NEW_LINE>for (MyKey noCacheUntil : memoized.dependencies) {<NEW_LINE>stack.prohibitResultCaching(noCacheUntil);<NEW_LINE>}<NEW_LINE>// noinspection unchecked<NEW_LINE>return (T) memoized.value;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>realKey = new MyKey(id, key, false);<NEW_LINE>final int sizeBefore <MASK><NEW_LINE>stack.beforeComputation(realKey);<NEW_LINE>final int sizeAfter = stack.progressMap.size();<NEW_LINE>Set<MyKey> preventionsBefore = memoize ? new HashSet<>(stack.preventions) : Collections.emptySet();<NEW_LINE>try {<NEW_LINE>T result = computation.compute();<NEW_LINE>if (memoize) {<NEW_LINE>stack.maybeMemoize(realKey, result, preventionsBefore);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>} finally {<NEW_LINE>try {<NEW_LINE>stack.afterComputation(realKey, sizeBefore, sizeAfter);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>// noinspection ThrowFromFinallyBlock<NEW_LINE>throw new RuntimeException("Throwable in afterComputation", e);<NEW_LINE>}<NEW_LINE>stack.checkDepth("4");<NEW_LINE>}<NEW_LINE>}
= stack.progressMap.size();
1,298,898
Map<String, String> determineProviderConfig(ProviderInfo info) {<NEW_LINE>HashMap<String, String> map = new HashMap<String, String>();<NEW_LINE>map.put("name", info.getName());<NEW_LINE>boolean apppw = false;<NEW_LINE>boolean apptok = false;<NEW_LINE>boolean clientadmin = false;<NEW_LINE>OidcBaseClient client = null;<NEW_LINE>OAuth20Provider provider = ProvidersService.getOAuth20Provider(info.getOauthProviderName());<NEW_LINE>// internalClientId has to be defined for the admin center or endpoint ui's to manipulate anything.<NEW_LINE>try {<NEW_LINE>client = provider.getClientProvider().get(provider.getInternalClientId());<NEW_LINE>} catch (OidcServerException e) {<NEW_LINE>// ffdc<NEW_LINE>}<NEW_LINE>// apppw = client != null && client.isAppPasswordAllowed();<NEW_LINE>// apptok = client != null && client.isAppTokenAllowed();<NEW_LINE>clientadmin = !provider.isLocalStoreUsed();<NEW_LINE>// if(apppw || apptok) {<NEW_LINE>if (client != null) {<NEW_LINE>map.put("personalTokenManagement", epPrefix + info.getName() + "/personalTokenManagement");<NEW_LINE>map.put("usersTokenManagement", epPrefix + <MASK><NEW_LINE>}<NEW_LINE>if (clientadmin) {<NEW_LINE>map.put("clientManagement", epPrefix + info.getName() + "/clientManagement");<NEW_LINE>}<NEW_LINE>return map;<NEW_LINE>}
info.getName() + "/usersTokenManagement");
1,066,132
public static void main(String[] args) {<NEW_LINE>Scanner scan = new Scanner(System.in);<NEW_LINE>System.out.println("\n-----------------HILL CIPHER-----------------\n");<NEW_LINE>System.out.println("The length of plaintext must be same as size\n");<NEW_LINE>System.out.println("Current value of size is " + size + "\n");<NEW_LINE>// Taking plaintext as input from the user<NEW_LINE>System.out.print("Enter a plaintext of size " + size + ": ");<NEW_LINE>String plaintext = scan.nextLine();<NEW_LINE>// Checking if proper message is provided or not.<NEW_LINE>if (plaintext.length() != size) {<NEW_LINE>System.out.println("Enter a valid message.");<NEW_LINE>System.exit(0);<NEW_LINE>}<NEW_LINE>// Taking key as input from the user<NEW_LINE>System.out.print("Enter a keyword of size " + size * size + ": ");<NEW_LINE>String key = scan.nextLine();<NEW_LINE>// Checking if proper key is provided or not.<NEW_LINE>if (key.length() != size * size) {<NEW_LINE>System.out.println("Enter a valid key.");<NEW_LINE>System.exit(0);<NEW_LINE>}<NEW_LINE>scan.close();<NEW_LINE>int[][] ciphertextmatrix = new int[size][1];<NEW_LINE><MASK><NEW_LINE>// Calling the method to get the encrypted plaintext<NEW_LINE>ciphertext = generateCiphertextMatrix(plaintext, key, ciphertextmatrix);<NEW_LINE>System.out.println("The encrypted plaintext is: " + ciphertext);<NEW_LINE>}
String ciphertext = new String("");
1,153,759
public void verify(Component component, JRVerifier verifier) {<NEW_LINE>MapComponent map = (MapComponent) component;<NEW_LINE>EvaluationTimeEnum evaluationTime = map.getEvaluationTime();<NEW_LINE>if (evaluationTime == EvaluationTimeEnum.AUTO) {<NEW_LINE>verifier.addBrokenRule("Auto evaluation time is not supported for maps", map);<NEW_LINE>} else if (evaluationTime == EvaluationTimeEnum.GROUP) {<NEW_LINE>String evaluationGroup = map.getEvaluationGroup();<NEW_LINE>if (evaluationGroup == null || evaluationGroup.length() == 0) {<NEW_LINE>verifier.addBrokenRule("No evaluation group set for map", map);<NEW_LINE>} else if (!verifier.getReportDesign().getGroupsMap().containsKey(evaluationGroup)) {<NEW_LINE>verifier.addBrokenRule("Map evaluation group \"" + evaluationGroup + " not found", map);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if ((map.getLatitudeExpression() == null || map.getLongitudeExpression() == null) && map.getAddressExpression() == null) {<NEW_LINE>verifier.addBrokenRule("Missing the latitude and/or the longitude expression for the map center. Try to configure them properly, or configure the equivalent addressExpression for this map.", map);<NEW_LINE>}<NEW_LINE>String[] reqNames = new String[] { MapComponent.ITEM_PROPERTY_latitude, MapComponent.ITEM_PROPERTY_longitude };<NEW_LINE>List<ItemData> markerDataList = map.getMarkerDataList();<NEW_LINE>if (markerDataList != null && markerDataList.size() > 0) {<NEW_LINE>for (ItemData markerData : markerDataList) {<NEW_LINE>ItemCompiler.verifyItemData(verifier, markerData, MapComponent.ELEMENT_MARKER_DATA, reqNames, addressMap);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>List<ItemData> pathStyleList = map.getPathStyleList();<NEW_LINE>if (pathStyleList != null && pathStyleList.size() > 0) {<NEW_LINE>for (ItemData pathStyle : pathStyleList) {<NEW_LINE>ItemCompiler.verifyItemData(verifier, pathStyle, MapComponent.ELEMENT_PATH_STYLE, new String[] <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>List<ItemData> pathDataList = map.getPathDataList();<NEW_LINE>if (pathDataList != null && pathDataList.size() > 0) {<NEW_LINE>for (ItemData pathData : pathDataList) {<NEW_LINE>ItemCompiler.verifyItemData(verifier, pathData, MapComponent.ELEMENT_PATH_DATA, reqNames, addressMap);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
{ MapComponent.ITEM_PROPERTY_name }, null);
1,759,217
public static ListMediasWithPublicResponse unmarshall(ListMediasWithPublicResponse listMediasWithPublicResponse, UnmarshallerContext context) {<NEW_LINE>listMediasWithPublicResponse.setRequestId(context.stringValue("ListMediasWithPublicResponse.RequestId"));<NEW_LINE>listMediasWithPublicResponse.setSuccess(context.booleanValue("ListMediasWithPublicResponse.Success"));<NEW_LINE>listMediasWithPublicResponse.setCode(context.stringValue("ListMediasWithPublicResponse.Code"));<NEW_LINE>listMediasWithPublicResponse.setMessage(context.stringValue("ListMediasWithPublicResponse.Message"));<NEW_LINE>listMediasWithPublicResponse.setHttpStatusCode(context.integerValue("ListMediasWithPublicResponse.HttpStatusCode"));<NEW_LINE>Medias medias = new Medias();<NEW_LINE>medias.setTotalCount(context.integerValue("ListMediasWithPublicResponse.Medias.TotalCount"));<NEW_LINE>medias.setPageNumber(context.integerValue("ListMediasWithPublicResponse.Medias.PageNumber"));<NEW_LINE>medias.setPageSize(context.integerValue("ListMediasWithPublicResponse.Medias.PageSize"));<NEW_LINE>List<Media> list = new ArrayList<Media>();<NEW_LINE>for (int i = 0; i < context.lengthValue("ListMediasWithPublicResponse.Medias.List.Length"); i++) {<NEW_LINE>Media media = new Media();<NEW_LINE>media.setInstance(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].Instance"));<NEW_LINE>media.setName(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].Name"));<NEW_LINE>media.setDescription(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].Description"));<NEW_LINE>media.setType(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].Type"));<NEW_LINE>media.setContent(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].Content"));<NEW_LINE>media.setFilePath(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].FilePath"));<NEW_LINE>media.setFileName(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].FileName"));<NEW_LINE>media.setOssFileName(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].OssFileName"));<NEW_LINE>media.setScope(context.stringValue<MASK><NEW_LINE>media.setStatus(context.stringValue("ListMediasWithPublicResponse.Medias.List[" + i + "].Status"));<NEW_LINE>list.add(media);<NEW_LINE>}<NEW_LINE>medias.setList(list);<NEW_LINE>listMediasWithPublicResponse.setMedias(medias);<NEW_LINE>List<PublicMedia> publicMedias = new ArrayList<PublicMedia>();<NEW_LINE>for (int i = 0; i < context.lengthValue("ListMediasWithPublicResponse.PublicMedias.Length"); i++) {<NEW_LINE>PublicMedia publicMedia = new PublicMedia();<NEW_LINE>publicMedia.setId(context.longValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].Id"));<NEW_LINE>publicMedia.setInstance(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].Instance"));<NEW_LINE>publicMedia.setName(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].Name"));<NEW_LINE>publicMedia.setDescription(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].Description"));<NEW_LINE>publicMedia.setType(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].Type"));<NEW_LINE>publicMedia.setContent(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].Content"));<NEW_LINE>publicMedia.setFilePath(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].FilePath"));<NEW_LINE>publicMedia.setFileName(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].FileName"));<NEW_LINE>publicMedia.setOssFileName(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].OssFileName"));<NEW_LINE>publicMedia.setScope(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].Scope"));<NEW_LINE>publicMedia.setStatus(context.stringValue("ListMediasWithPublicResponse.PublicMedias[" + i + "].Status"));<NEW_LINE>publicMedias.add(publicMedia);<NEW_LINE>}<NEW_LINE>listMediasWithPublicResponse.setPublicMedias(publicMedias);<NEW_LINE>return listMediasWithPublicResponse;<NEW_LINE>}
("ListMediasWithPublicResponse.Medias.List[" + i + "].Scope"));
1,518,210
private Mono<HandlerResult> handleException(Throwable exception, HandlerMethod handlerMethod, BindingContext bindingContext, ServerWebExchange exchange) {<NEW_LINE>Assert.state(this.methodResolver != null, "Not initialized");<NEW_LINE>// Success and error responses may use different content types<NEW_LINE>exchange.getAttributes().remove(HandlerMapping.PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE);<NEW_LINE>exchange.getResponse().getHeaders().clearContentHeaders();<NEW_LINE>InvocableHandlerMethod invocable = this.methodResolver.getExceptionHandlerMethod(exception, handlerMethod);<NEW_LINE>if (invocable != null) {<NEW_LINE>ArrayList<Throwable> exceptions = new ArrayList<>();<NEW_LINE>try {<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug(exchange.getLogPrefix() + "Using @ExceptionHandler " + invocable);<NEW_LINE>}<NEW_LINE>bindingContext.getModel()<MASK><NEW_LINE>// Expose causes as provided arguments as well<NEW_LINE>Throwable exToExpose = exception;<NEW_LINE>while (exToExpose != null) {<NEW_LINE>exceptions.add(exToExpose);<NEW_LINE>Throwable cause = exToExpose.getCause();<NEW_LINE>exToExpose = (cause != exToExpose ? cause : null);<NEW_LINE>}<NEW_LINE>Object[] arguments = new Object[exceptions.size() + 1];<NEW_LINE>// efficient arraycopy call in ArrayList<NEW_LINE>exceptions.toArray(arguments);<NEW_LINE>arguments[arguments.length - 1] = handlerMethod;<NEW_LINE>return invocable.invoke(exchange, bindingContext, arguments);<NEW_LINE>} catch (Throwable invocationEx) {<NEW_LINE>// Any other than the original exception (or a cause) is unintended here,<NEW_LINE>// probably an accident (e.g. failed assertion or the like).<NEW_LINE>if (!exceptions.contains(invocationEx) && logger.isWarnEnabled()) {<NEW_LINE>logger.warn(exchange.getLogPrefix() + "Failure in @ExceptionHandler " + invocable, invocationEx);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return Mono.error(exception);<NEW_LINE>}
.asMap().clear();
1,646,153
final DescribeMultiplexProgramResult executeDescribeMultiplexProgram(DescribeMultiplexProgramRequest describeMultiplexProgramRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeMultiplexProgramRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeMultiplexProgramRequest> request = null;<NEW_LINE>Response<DescribeMultiplexProgramResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeMultiplexProgramRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeMultiplexProgramRequest));<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, "MediaLive");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeMultiplexProgram");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeMultiplexProgramResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeMultiplexProgramResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1,547,666
final StopEventsDetectionJobResult executeStopEventsDetectionJob(StopEventsDetectionJobRequest stopEventsDetectionJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(stopEventsDetectionJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<StopEventsDetectionJobRequest> request = null;<NEW_LINE>Response<StopEventsDetectionJobResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new StopEventsDetectionJobRequestProtocolMarshaller(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, "Comprehend");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopEventsDetectionJob");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<StopEventsDetectionJobResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StopEventsDetectionJobResultJsonUnmarshaller());<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(stopEventsDetectionJobRequest));
24,983
public AudioInputStream synthesize(int backchannelNumber, AudioFileFormat aft) throws SynthesisException {<NEW_LINE>int numberOfBackChannels = unitFileReader.getNumberOfUnits();<NEW_LINE>if (backchannelNumber >= numberOfBackChannels) {<NEW_LINE>throw new IllegalArgumentException("This voice has " + numberOfBackChannels + " backchannels only. so it doesn't support unit number " + backchannelNumber);<NEW_LINE>}<NEW_LINE>VocalizationUnit bUnit = unitFileReader.getUnit(backchannelNumber);<NEW_LINE>long start = bUnit.startTime;<NEW_LINE>int duration = bUnit.duration;<NEW_LINE>Datagram[] frames = null;<NEW_LINE>try {<NEW_LINE>frames = audioTimeline.getDatagrams(start, duration);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new SynthesisException("Can not read data from timeline file " + e);<NEW_LINE>}<NEW_LINE>// Generate audio from frames<NEW_LINE>LinkedList<Datagram> datagrams = new LinkedList<Datagram>();<NEW_LINE>datagrams.addAll(Arrays.asList(frames));<NEW_LINE>DoubleDataSource audioSource = new DatagramDoubleDataSource(datagrams);<NEW_LINE>// audioSource.getAllData();<NEW_LINE>return (new DDSAudioInputStream(new BufferedDoubleDataSource(audioSource)<MASK><NEW_LINE>}
, aft.getFormat()));
914,076
public final ConstantContext constant() throws RecognitionException {<NEW_LINE>ConstantContext _localctx = new ConstantContext(_ctx, getState());<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>setState(3337);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>switch(_input.LA(1)) {<NEW_LINE>case PLUS:<NEW_LINE>case MINUS:<NEW_LINE>case IntegerLiteral:<NEW_LINE>case FloatingPointLiteral:<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(3332);<NEW_LINE>numberconstant();<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case QUOTED_STRING_LITERAL:<NEW_LINE>case STRING_LITERAL:<NEW_LINE>enterOuterAlt(_localctx, 2);<NEW_LINE>{<NEW_LINE>setState(3333);<NEW_LINE>stringconstant();<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case BOOLEAN_TRUE:<NEW_LINE>enterOuterAlt(_localctx, 3);<NEW_LINE>{<NEW_LINE>setState(3334);<NEW_LINE>((ConstantContext) _localctx).t = match(BOOLEAN_TRUE);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case BOOLEAN_FALSE:<NEW_LINE>enterOuterAlt(_localctx, 4);<NEW_LINE>{<NEW_LINE>setState(3335);<NEW_LINE>((ConstantContext) _localctx).f = match(BOOLEAN_FALSE);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case VALUE_NULL:<NEW_LINE>enterOuterAlt(_localctx, 5);<NEW_LINE>{<NEW_LINE>setState(3336);<NEW_LINE>((ConstantContext) _localctx).nu = match(VALUE_NULL);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new NoViableAltException(this);<NEW_LINE>}<NEW_LINE>} catch (RecognitionException re) {<NEW_LINE>_localctx.exception = re;<NEW_LINE>_errHandler.reportError(this, re);<NEW_LINE>_errHandler.recover(this, re);<NEW_LINE>} finally {<NEW_LINE>exitRule();<NEW_LINE>}<NEW_LINE>return _localctx;<NEW_LINE>}
enterRule(_localctx, 508, RULE_constant);
794,854
protected void doExecute(Task task, MultiSearchRequest request, ActionListener<MultiSearchResponse> listener) {<NEW_LINE>final long relativeStartTime = relativeTimeProvider.getAsLong();<NEW_LINE>ClusterState clusterState = clusterService.state();<NEW_LINE>clusterState.blocks().globalBlockedRaiseException(ClusterBlockLevel.READ);<NEW_LINE>int maxConcurrentSearches = request.maxConcurrentSearchRequests();<NEW_LINE>if (maxConcurrentSearches == MultiSearchRequest.MAX_CONCURRENT_SEARCH_REQUESTS_DEFAULT) {<NEW_LINE>maxConcurrentSearches = defaultMaxConcurrentSearches(allocatedProcessors, clusterState);<NEW_LINE>}<NEW_LINE>Queue<SearchRequestSlot> searchRequestSlots = new ConcurrentLinkedQueue<>();<NEW_LINE>for (int i = 0; i < request.requests().size(); i++) {<NEW_LINE>SearchRequest searchRequest = request.requests().get(i);<NEW_LINE>searchRequest.setParentTask(client.getLocalNodeId(), task.getId());<NEW_LINE>searchRequestSlots.add(new SearchRequestSlot(searchRequest, i));<NEW_LINE>}<NEW_LINE>int numRequests = request<MASK><NEW_LINE>final AtomicArray<MultiSearchResponse.Item> responses = new AtomicArray<>(numRequests);<NEW_LINE>final AtomicInteger responseCounter = new AtomicInteger(numRequests);<NEW_LINE>int numConcurrentSearches = Math.min(numRequests, maxConcurrentSearches);<NEW_LINE>for (int i = 0; i < numConcurrentSearches; i++) {<NEW_LINE>executeSearch(searchRequestSlots, responses, responseCounter, listener, relativeStartTime);<NEW_LINE>}<NEW_LINE>}
.requests().size();
370,883
protected void after(XParam param) throws Throwable {<NEW_LINE>String key = (param.args.length > 0 ? (String) param<MASK><NEW_LINE>if (key != null)<NEW_LINE>if (mPropertyName.startsWith("%") ? key.contains(mPropertyName.substring(1)) : key.equals(mPropertyName))<NEW_LINE>if (mMethod == Methods.get) {<NEW_LINE>if (param.getResult() != null && isRestrictedExtra(param, mPropertyName, key))<NEW_LINE>param.setResult(PrivacyManager.getDefacedProp(Binder.getCallingUid(), mPropertyName));<NEW_LINE>} else if (param.args.length > 1) {<NEW_LINE>if (isRestrictedExtra(param, mPropertyName, key))<NEW_LINE>param.setResult(param.args[1]);<NEW_LINE>} else<NEW_LINE>Util.log(this, Log.WARN, "Unknown method=" + param.method.getName());<NEW_LINE>}
.args[0] : null);
543,516
void resolve(String path) {<NEW_LINE>if (path == null)<NEW_LINE>return;<NEW_LINE>path = path.trim();<NEW_LINE>// NOI18N<NEW_LINE>if (path.equals(""))<NEW_LINE>return;<NEW_LINE>if (path.startsWith("[") && path.endsWith("]")) {<NEW_LINE>// NOI18N<NEW_LINE>this.resolveGraph(path.substring(1, path.length() - 1));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Find the proper root<NEW_LINE>if (this.parent == null) {<NEW_LINE>throw new IllegalStateException(Common.getMessage("CantResolveBecauseMissingParent_msg", path));<NEW_LINE>}<NEW_LINE>// Resolve any embeded {} variables<NEW_LINE>if (PathResolver.needResolving(path))<NEW_LINE>path = (new PathResolver(this.parent, path)).toString();<NEW_LINE>BaseBean root = this.parent.getRoot();<NEW_LINE>if (root != null) {<NEW_LINE>DDParser p <MASK><NEW_LINE>if (p.hasNext()) {<NEW_LINE>Object o = p.next();<NEW_LINE>if (o instanceof BaseBean) {<NEW_LINE>this.root = (BaseBean) o;<NEW_LINE>} else {<NEW_LINE>throw new IllegalStateException(Common.getMessage("ParsingPathDoesntResolveToGraphNodeElement_msg", path, o.getClass().getName(), o.toString()));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new IllegalStateException(Common.getMessage("NoElementFoundPath_msg", path));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new IllegalStateException(Common.getMessage("NoRootFoundForPath_msg", path));<NEW_LINE>}<NEW_LINE>}
= new DDParser(root, path);
1,143,170
public static void vertical(Kernel1D_S32 kernel, GrayS16 src, GrayI16 dst) {<NEW_LINE>final short[] dataSrc = src.data;<NEW_LINE>final short[] dataDst = dst.data;<NEW_LINE>final int[] dataKer = kernel.data;<NEW_LINE>final int offset = kernel.getOffset();<NEW_LINE>final int kernelWidth = kernel.getWidth();<NEW_LINE>final int imgWidth = dst.getWidth();<NEW_LINE>final int imgHeight = dst.getHeight();<NEW_LINE>final int yEnd = imgHeight - (kernelWidth - offset - 1);<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(offset, yEnd, y -> {<NEW_LINE>for (int y = offset; y < yEnd; y++) {<NEW_LINE>final int indexDstStart = dst<MASK><NEW_LINE>Arrays.fill(dataDst, indexDstStart, indexDstStart + imgWidth, (short) 0);<NEW_LINE>for (int k = 0; k < kernelWidth; k++) {<NEW_LINE>final int iStart = src.startIndex + (y - offset + k) * src.stride;<NEW_LINE>final int iEnd = iStart + imgWidth;<NEW_LINE>int indexDst = indexDstStart;<NEW_LINE>int kernelValue = dataKer[k];<NEW_LINE>for (int i = iStart; i < iEnd; i++) {<NEW_LINE>dataDst[indexDst++] += (short) ((dataSrc[i]) * kernelValue);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}
.startIndex + y * dst.stride;
1,114,152
public CopyOnWriteSet remove(final ExecutorPlugin plugin) {<NEW_LINE>int i = indexOf(plugin, plugins);<NEW_LINE>if (i < 0) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>if (plugins.length == 3) {<NEW_LINE>switch(i) {<NEW_LINE>case 0:<NEW_LINE>return new TwoExecutorPluginSet(plugins[<MASK><NEW_LINE>case 1:<NEW_LINE>return new TwoExecutorPluginSet(plugins[0], plugins[2]);<NEW_LINE>case 2:<NEW_LINE>return new TwoExecutorPluginSet(plugins[0], plugins[1]);<NEW_LINE>default:<NEW_LINE>throw new RuntimeException("programming error. i: " + i);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ExecutorPlugin[] newArray = new ExecutorPlugin[plugins.length - 1];<NEW_LINE>arraycopy(plugins, 0, newArray, 0, i);<NEW_LINE>arraycopy(plugins, i + 1, newArray, i, plugins.length - i - 1);<NEW_LINE>return new ThreeOrMoreExecutorPluginSet(newArray);<NEW_LINE>}
1], plugins[2]);
203,686
static Map<String, Object> subsetAnnotationsIfNecessary(final VariantAnnotatorEngine annotationEngine, final boolean doQualApprox, final String posteriorsKey, final VariantContext originalVC, final VariantContext regenotyped) {<NEW_LINE>final Map<String, Object> newAnnotations;<NEW_LINE>if (regenotyped.getNAlleles() != originalVC.getNAlleles()) {<NEW_LINE>final Permutation<Allele> allelePermutation = new IndexedAlleleList<>(originalVC.getAlleles()).permutation(new IndexedAlleleList<><MASK><NEW_LINE>final int[] relevantIndices = IntStream.range(0, regenotyped.getAlleles().size()).map(n -> allelePermutation.fromIndex(n)).toArray();<NEW_LINE>newAnnotations = new LinkedHashMap<>();<NEW_LINE>composeUpdatedAnnotations(newAnnotations, doQualApprox, posteriorsKey, originalVC, annotationEngine, relevantIndices, regenotyped);<NEW_LINE>} else {<NEW_LINE>newAnnotations = originalVC.getAttributes();<NEW_LINE>}<NEW_LINE>return newAnnotations;<NEW_LINE>}
(regenotyped.getAlleles()));
971,100
private void drawCompassCircle(Canvas canvas, RotatedTileBox tileBox, int circleNumber, QuadPoint center, RenderingLineAttributes attrs) {<NEW_LINE>if (!tileBox.isZoomAnimated()) {<NEW_LINE>float radiusLength = radius * circleNumber;<NEW_LINE>float innerRadiusLength = radiusLength - attrs.paint.getStrokeWidth() / 2;<NEW_LINE>updateArcShader(radiusLength, center);<NEW_LINE>updateCompassPaths(center, innerRadiusLength, radiusLength);<NEW_LINE>drawCardinalDirections(canvas, center, radiusLength, tileBox, attrs);<NEW_LINE>redLinesPaint.setStrokeWidth(attrs.paint.getStrokeWidth());<NEW_LINE>blueLinesPaint.setStrokeWidth(attrs.paint.getStrokeWidth());<NEW_LINE>canvas.drawPath(compass, attrs.shadowPaint);<NEW_LINE>canvas.drawPath(compass, attrs.paint);<NEW_LINE>canvas.drawPath(redCompassLines, redLinesPaint);<NEW_LINE>canvas.rotate(cachedHeading, center.x, center.y);<NEW_LINE>canvas.drawPath(arrowArc, blueLinesPaint);<NEW_LINE>canvas.rotate(-cachedHeading, center.x, center.y);<NEW_LINE>canvas.drawPath(arrow, attrs.shadowPaint);<NEW_LINE>canvas.drawPath(arrow, triangleNorthPaint);<NEW_LINE>canvas.rotate(cachedHeading, center.x, center.y);<NEW_LINE>canvas.drawPath(arrow, attrs.shadowPaint);<NEW_LINE>canvas.drawPath(arrow, triangleHeadingPaint);<NEW_LINE>canvas.rotate(-cachedHeading, center.x, center.y);<NEW_LINE>String distance = cacheDistances.get(circleNumber - 1);<NEW_LINE>String heading = OsmAndFormatter.getFormattedAzimuth(cachedHeading, AngularConstants.DEGREES360) + " " + getCardinalDirectionForDegrees(cachedHeading);<NEW_LINE>float[] textCoords = calculateTextCoords(distance, heading, radiusLength + AndroidUtils.dpToPx(app<MASK><NEW_LINE>canvas.rotate(-tileBox.getRotate(), center.x, center.y);<NEW_LINE>setAttrsPaintsTypeface(attrs, Typeface.DEFAULT_BOLD);<NEW_LINE>canvas.drawText(heading, textCoords[0], textCoords[1], attrs.paint3);<NEW_LINE>canvas.drawText(heading, textCoords[0], textCoords[1], attrs.paint2);<NEW_LINE>setAttrsPaintsTypeface(attrs, null);<NEW_LINE>canvas.drawText(distance, textCoords[2], textCoords[3], attrs.paint3);<NEW_LINE>canvas.drawText(distance, textCoords[2], textCoords[3], attrs.paint2);<NEW_LINE>canvas.rotate(tileBox.getRotate(), center.x, center.y);<NEW_LINE>}<NEW_LINE>}
, 16), center, attrs);
769,882
protected final void writeChunk(ObjectDataOutput out, MapChunkContext context) throws IOException {<NEW_LINE><MASK><NEW_LINE>long recordCount = 0;<NEW_LINE>out.writeString(context.getMapName());<NEW_LINE>Iterator<Map.Entry<Data, Record>> entries = context.getIterator();<NEW_LINE>while (entries.hasNext()) {<NEW_LINE>Map.Entry<Data, Record> entry = entries.next();<NEW_LINE>Data dataKey = entry.getKey();<NEW_LINE>Record record = entry.getValue();<NEW_LINE>Data dataValue = ss.toData(record.getValue());<NEW_LINE>IOUtil.writeData(out, dataKey);<NEW_LINE>Records.writeRecord(out, record, dataValue);<NEW_LINE>Records.writeExpiry(out, context.getExpiryMetadata(dataKey));<NEW_LINE>recordCount++;<NEW_LINE>if (isEndOfChunk.getAsBoolean()) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>incrementReplicationRecordCount(recordCount);<NEW_LINE>if (!entries.hasNext()) {<NEW_LINE>incrementReplicationCount();<NEW_LINE>}<NEW_LINE>// indicates end of chunk<NEW_LINE>IOUtil.writeData(out, null);<NEW_LINE>}
SerializationService ss = context.getSerializationService();
1,610,266
private static void defaultMobData(final EntityType type, final Entity spawned) {<NEW_LINE>if (type == EntityType.SKELETON) {<NEW_LINE>final EntityEquipment invent = ((LivingEntity) spawned).getEquipment();<NEW_LINE>InventoryWorkaround.setItemInMainHand(invent, new ItemStack(Material.BOW, 1));<NEW_LINE>InventoryWorkaround.setItemInMainHandDropChance(invent, 0.1f);<NEW_LINE>}<NEW_LINE>if (type == MobCompat.ZOMBIFIED_PIGLIN) {<NEW_LINE>final PigZombie zombie = (PigZombie) spawned;<NEW_LINE>setVillager(zombie, false);<NEW_LINE>final EntityEquipment invent = zombie.getEquipment();<NEW_LINE>InventoryWorkaround.setItemInMainHand(invent, new ItemStack(GOLDEN_SWORD, 1));<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (type == EntityType.ZOMBIE) {<NEW_LINE>final Zombie zombie = (Zombie) spawned;<NEW_LINE>setVillager(zombie, false);<NEW_LINE>}<NEW_LINE>if (type == EntityType.HORSE) {<NEW_LINE>((Horse) spawned).setJumpStrength(1.2);<NEW_LINE>}<NEW_LINE>}
InventoryWorkaround.setItemInMainHandDropChance(invent, 0.1f);
1,104,445
public FieldContainedStatus isCacheFor(EntityField<?> field, Object parameter) {<NEW_LINE>if (!isCacheForAnything) {<NEW_LINE>return FieldContainedStatus.NOT_CONTAINED;<NEW_LINE>}<NEW_LINE>// If there is CACHE_FOR_EXCLUDED then this node is a cache for all fields, and should be treated as such even if there is no CACHE_FOR<NEW_LINE>// This is analogous to PRIMARY_SOURCE_FOR(_EXCLUDED).<NEW_LINE>// However if there is neither CACHE_FOR_EXCLUDED nor CACHE_FOR, then this node is not a cache<NEW_LINE>final Optional<Map> cacheForExcluded = getNodeProperty(<MASK><NEW_LINE>FieldContainedStatus isCacheFor = getNodeProperty(NodeProperties.CACHE_FOR, Map.class).map(m -> isFieldWithParameterIncludedInMap(m, field, parameter)).orElse(cacheForExcluded.isPresent() ? FieldContainedStatus.FULLY : FieldContainedStatus.NOT_CONTAINED);<NEW_LINE>FieldContainedStatus isExcludedCacheFor = cacheForExcluded.map(m -> isFieldWithParameterIncludedInMap(m, field, parameter)).orElse(FieldContainedStatus.NOT_CONTAINED);<NEW_LINE>return isCacheFor.minus(isExcludedCacheFor);<NEW_LINE>}
NodeProperties.CACHE_FOR_EXCLUDED, Map.class);
385,150
public void resolveCurrentRawDeps() {<NEW_LINE>if (!externalDependenciesExtension.resoleOnlyThirdParty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<String, List<ExternalDependency>> rawDepsMap = rawDependencies.stream().collect(Collectors.groupingBy(i -> i.getGroup() + "--" + i.getVersion()));<NEW_LINE>List<Project> allProjects = new ArrayList<<MASK><NEW_LINE>int numberOfChunks = allProjects.size();<NEW_LINE>List<Map<String, List<ExternalDependency>>> chunksRawDepsMap = rawDepsMap.keySet().stream().collect(Collectors.groupingBy(key -> Math.abs(key.hashCode()) % numberOfChunks)).values().stream().map(chunk -> chunk.stream().collect(Collectors.toMap(key -> key, rawDepsMap::get))).collect(Collectors.toList());<NEW_LINE>IntStream.range(0, allProjects.size()).parallel().forEach(i -> {<NEW_LINE>resolveDepsWithProject(allProjects.get(i), chunksRawDepsMap.get(i));<NEW_LINE>});<NEW_LINE>}
>(project.getAllprojects());
1,795,805
protected void map(StaticBuffer key, Iterable<Entry> values, Context context) throws IOException, InterruptedException {<NEW_LINE>EntryArrayList al = EntryArrayList.of(values);<NEW_LINE>// KeyFilter check<NEW_LINE>if (!keyFilter.test(key)) {<NEW_LINE>log.debug("Skipping key {} based on KeyFilter", key);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// InitialQuery check (at least one match is required or else the key is ignored)<NEW_LINE>EntryList initialQueryMatches = findEntriesMatchingQuery(initialQuery, al);<NEW_LINE>if (0 == initialQueryMatches.size()) {<NEW_LINE>log.debug("Skipping key {} based on InitialQuery ({}) match failure", key, initialQuery);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Both conditions (KeyFilter && InitialQuery) for invoking process are satisfied<NEW_LINE>// Create an entries parameter to be passed into the process method<NEW_LINE>Map<SliceQuery, EntryList> matches = new HashMap<>();<NEW_LINE><MASK><NEW_LINE>// Find matches (if any are present) for noninitial queries<NEW_LINE>for (SliceQuery sq : subsequentQueries) {<NEW_LINE>matches.put(sq, findEntriesMatchingQuery(sq, al));<NEW_LINE>}<NEW_LINE>// Process<NEW_LINE>job.process(key, matches, metrics);<NEW_LINE>}
matches.put(initialQuery, initialQueryMatches);
1,251,211
public void init(InitParameters params) {<NEW_LINE>services = new EnumMap<>(CompactionKind.class);<NEW_LINE>var defaultService = CompactionDispatch.builder().toService("default").build();<NEW_LINE>if (params.getOptions().containsKey("service")) {<NEW_LINE>defaultService = CompactionDispatch.builder().toService(params.getOptions().get("service")).build();<NEW_LINE>}<NEW_LINE>for (CompactionKind ctype : CompactionKind.values()) {<NEW_LINE>String service = params.getOptions().get("service." + ctype.name().toLowerCase());<NEW_LINE>if (service == null)<NEW_LINE><MASK><NEW_LINE>else<NEW_LINE>services.put(ctype, CompactionDispatch.builder().toService(service).build());<NEW_LINE>}<NEW_LINE>if (params.getOptions().isEmpty()) {<NEW_LINE>userServices = Map.of();<NEW_LINE>} else {<NEW_LINE>Map<String, CompactionDispatch> tmpUS = new HashMap<>();<NEW_LINE>params.getOptions().forEach((k, v) -> {<NEW_LINE>if (k.startsWith("service.user.")) {<NEW_LINE>String type = k.substring("service.user.".length());<NEW_LINE>tmpUS.put(type, CompactionDispatch.builder().toService(v).build());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>userServices = Map.copyOf(tmpUS);<NEW_LINE>}<NEW_LINE>}
services.put(ctype, defaultService);
807,766
protected Record rebalance(int id1, Record r1, int id2, Record r2) {<NEW_LINE>RecordBufferPageMgr mgr = bpt.getRecordsMgr().getRecordBufferPageMgr();<NEW_LINE>RecordBufferPage page1 = mgr.getWrite(id1);<NEW_LINE>RecordBufferPage page2 = mgr.getWrite(id2);<NEW_LINE>// Wrong calculation??<NEW_LINE>int x1 = page2.getCount();<NEW_LINE>int x2 = page1.getMaxSize() / 2;<NEW_LINE>if (debug) {<NEW_LINE>System.out.printf("Rebalance Data [%s, %s] %d %d\n", id1, id2, x1, x2);<NEW_LINE>}<NEW_LINE>for (int i = page2.getCount(); i < page1.getMaxSize() / 2; i++) {<NEW_LINE>Record r = page1.getRecordBuffer().getHigh();<NEW_LINE>page1.getRecordBuffer().removeTop();<NEW_LINE>page2.getRecordBuffer().add(0, r);<NEW_LINE>}<NEW_LINE>mgr.put(page1);<NEW_LINE>mgr.put(page2);<NEW_LINE>Record splitPoint = page1<MASK><NEW_LINE>splitPoint = bpt.getRecordFactory().createKeyOnly(splitPoint);<NEW_LINE>// Record splitPoint = node1.maxRecord();<NEW_LINE>return splitPoint;<NEW_LINE>}
.getRecordBuffer().getHigh();
1,228,767
public void marshall(CreateClusterRequest createClusterRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createClusterRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createClusterRequest.getBrokerNodeGroupInfo(), BROKERNODEGROUPINFO_BINDING);<NEW_LINE>protocolMarshaller.marshall(createClusterRequest.getClientAuthentication(), CLIENTAUTHENTICATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createClusterRequest.getClusterName(), CLUSTERNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createClusterRequest.getConfigurationInfo(), CONFIGURATIONINFO_BINDING);<NEW_LINE>protocolMarshaller.marshall(createClusterRequest.getEncryptionInfo(), ENCRYPTIONINFO_BINDING);<NEW_LINE>protocolMarshaller.marshall(createClusterRequest.getEnhancedMonitoring(), ENHANCEDMONITORING_BINDING);<NEW_LINE>protocolMarshaller.marshall(createClusterRequest.getOpenMonitoring(), OPENMONITORING_BINDING);<NEW_LINE>protocolMarshaller.marshall(createClusterRequest.getKafkaVersion(), KAFKAVERSION_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createClusterRequest.getNumberOfBrokerNodes(), NUMBEROFBROKERNODES_BINDING);<NEW_LINE>protocolMarshaller.marshall(createClusterRequest.getTags(), TAGS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
createClusterRequest.getLoggingInfo(), LOGGINGINFO_BINDING);
1,511,392
public String asi(final ICalloutField calloutField) {<NEW_LINE>if (isCalloutActive()) {<NEW_LINE>return NO_ERROR;<NEW_LINE>}<NEW_LINE>final I_M_InOutLine inoutLine = calloutField.getModel(I_M_InOutLine.class);<NEW_LINE>final int asiId = inoutLine.getM_AttributeSetInstance_ID();<NEW_LINE>if (asiId <= 0) {<NEW_LINE>return NO_ERROR;<NEW_LINE>}<NEW_LINE>//<NEW_LINE>final I_M_InOut inout = inoutLine.getM_InOut();<NEW_LINE>final int M_Product_ID = inoutLine.getM_Product_ID();<NEW_LINE>final int M_Warehouse_ID = inout.getM_Warehouse_ID();<NEW_LINE>// TODO: Env.getContextAsInt(ctx, WindowNo, CTXNAME_M_Locator_ID);<NEW_LINE>final int M_Locator_ID = inoutLine.getM_Locator_ID();<NEW_LINE>log.debug("M_Product_ID={}, M_ASI_ID={} - M_Warehouse_ID={}, M_Locator_ID={}", M_Product_ID, asiId, M_Warehouse_ID, M_Locator_ID);<NEW_LINE>//<NEW_LINE>// Check Selection<NEW_LINE>final int selected_asiId = calloutField.getTabInfoContextAsInt(CTXNAME_M_AttributeSetInstance_ID);<NEW_LINE>if (selected_asiId == asiId) {<NEW_LINE>final int selectedM_Locator_ID = calloutField.getTabInfoContextAsInt(CTXNAME_M_Locator_ID);<NEW_LINE>if (selectedM_Locator_ID > 0) {<NEW_LINE>log.debug("Selected M_Locator_ID={}", selectedM_Locator_ID);<NEW_LINE>inoutLine.setM_Locator_ID(selectedM_Locator_ID);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// metas: make sure that MovementQty must be 1 for a product with a serial number.<NEW_LINE>final <MASK><NEW_LINE>if (attributeSetInstance != null) {<NEW_LINE>final BigDecimal qtyEntered = inoutLine.getQtyEntered();<NEW_LINE>final String serNo = attributeSetInstance.getSerNo();<NEW_LINE>if (!Check.isEmpty(serNo, true) && (qtyEntered == null || qtyEntered.compareTo(BigDecimal.ONE) != 0)) {<NEW_LINE>final int windowNo = calloutField.getWindowNo();<NEW_LINE>Services.get(IClientUI.class).info(windowNo, MSG_SERIALNO_QTY_ONE);<NEW_LINE>inoutLine.setQtyEntered(BigDecimal.ONE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// metas end<NEW_LINE>return NO_ERROR;<NEW_LINE>}
I_M_AttributeSetInstance attributeSetInstance = inoutLine.getM_AttributeSetInstance();
1,395,029
final SendSSHPublicKeyResult executeSendSSHPublicKey(SendSSHPublicKeyRequest sendSSHPublicKeyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(sendSSHPublicKeyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<SendSSHPublicKeyRequest> request = null;<NEW_LINE>Response<SendSSHPublicKeyResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new SendSSHPublicKeyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(sendSSHPublicKeyRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2 Instance Connect");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SendSSHPublicKey");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<SendSSHPublicKeyResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new SendSSHPublicKeyResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1,635,433
protected boolean isExists(Model model) {<NEW_LINE>ElasticSearchClient esClient = (ElasticSearchClient) client;<NEW_LINE>String tableName = IndexController.INSTANCE.getTableName(model);<NEW_LINE>IndexController.LogicIndicesRegister.registerRelation(model.getName(), tableName);<NEW_LINE>if (!model.isTimeSeries()) {<NEW_LINE>boolean exist = esClient.isExistsIndex(tableName);<NEW_LINE>if (exist) {<NEW_LINE>Mappings historyMapping = esClient.getIndex(tableName).map(Index::getMappings).orElseGet(Mappings::new);<NEW_LINE>structures.putStructure(tableName, historyMapping);<NEW_LINE>exist = structures.containsStructure(tableName, createMapping(model));<NEW_LINE>}<NEW_LINE>return exist;<NEW_LINE>}<NEW_LINE>boolean templateExists = esClient.isExistsTemplate(tableName);<NEW_LINE>final Optional<IndexTemplate> <MASK><NEW_LINE>boolean lastIndexExists = esClient.isExistsIndex(TimeSeriesUtils.latestWriteIndexName(model));<NEW_LINE>if ((templateExists && !template.isPresent()) || (!templateExists && template.isPresent())) {<NEW_LINE>throw new Error("[Bug warning] ElasticSearch client query template result is not consistent. " + "Please file an issue to Apache SkyWalking.(https://github.com/apache/skywalking/issues)");<NEW_LINE>}<NEW_LINE>boolean exist = templateExists && lastIndexExists;<NEW_LINE>if (exist) {<NEW_LINE>structures.putStructure(tableName, template.get().getMappings());<NEW_LINE>exist = structures.containsStructure(tableName, createMapping(model));<NEW_LINE>}<NEW_LINE>return exist;<NEW_LINE>}
template = esClient.getTemplate(tableName);
1,784,287
protected Object toJson(RelDataType node) {<NEW_LINE>if (node.isStruct()) {<NEW_LINE>final List<Object> list = jsonBuilder.list();<NEW_LINE>for (RelDataTypeField field : node.getFieldList()) {<NEW_LINE>list.add(toJson(field));<NEW_LINE>}<NEW_LINE>return list;<NEW_LINE>} else {<NEW_LINE>final Map<String, Object> map = jsonBuilder.map();<NEW_LINE>map.put("type", node.getSqlTypeName().name());<NEW_LINE>map.put("nullable", node.isNullable());<NEW_LINE>if (node.getSqlTypeName().allowsPrec()) {<NEW_LINE>map.put("precision", node.getPrecision());<NEW_LINE>}<NEW_LINE>if (node.getSqlTypeName().allowsScale()) {<NEW_LINE>map.put("scale", node.getScale());<NEW_LINE>}<NEW_LINE>if (node.getSqlTypeName() == SqlTypeName.ENUM) {<NEW_LINE>map.put("values", ((EnumSqlType) node).getStringValues());<NEW_LINE>}<NEW_LINE>if (node.getCollation() != null) {<NEW_LINE>map.put("mysql_collation", node.<MASK><NEW_LINE>}<NEW_LINE>return map;<NEW_LINE>}<NEW_LINE>}
getCollation().getCollationName());
1,187,263
public static SortingParams toSortingParams(@Nullable SortParameters params) {<NEW_LINE>SortingParams jedisParams = null;<NEW_LINE>if (params != null) {<NEW_LINE>jedisParams = new SortingParams();<NEW_LINE>byte[<MASK><NEW_LINE>if (byPattern != null) {<NEW_LINE>jedisParams.by(params.getByPattern());<NEW_LINE>}<NEW_LINE>byte[][] getPattern = params.getGetPattern();<NEW_LINE>if (getPattern != null) {<NEW_LINE>jedisParams.get(getPattern);<NEW_LINE>}<NEW_LINE>Range limit = params.getLimit();<NEW_LINE>if (limit != null) {<NEW_LINE>jedisParams.limit((int) limit.getStart(), (int) limit.getCount());<NEW_LINE>}<NEW_LINE>Order order = params.getOrder();<NEW_LINE>if (order != null && order.equals(Order.DESC)) {<NEW_LINE>jedisParams.desc();<NEW_LINE>}<NEW_LINE>Boolean isAlpha = params.isAlphabetic();<NEW_LINE>if (isAlpha != null && isAlpha) {<NEW_LINE>jedisParams.alpha();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return jedisParams;<NEW_LINE>}
] byPattern = params.getByPattern();
1,175,408
protected T valueOf(String value) {<NEW_LINE>Number multiplier = 1;<NEW_LINE>if (multiplier() != null) {<NEW_LINE>multiplier = (Number) multiplier();<NEW_LINE>}<NEW_LINE>Class<T> type = type();<NEW_LINE>if (type.isAssignableFrom(Boolean.class)) {<NEW_LINE>return (T) Boolean.valueOf(value);<NEW_LINE>} else if (type.isAssignableFrom(Integer.class)) {<NEW_LINE>return (T) new Integer(Integer.parseInt(value) * multiplier.intValue());<NEW_LINE>} else if (type.isAssignableFrom(Long.class)) {<NEW_LINE>return (T) new Long(Long.parseLong(value<MASK><NEW_LINE>} else if (type.isAssignableFrom(Short.class)) {<NEW_LINE>return (T) new Short(Short.parseShort(value));<NEW_LINE>} else if (type.isAssignableFrom(String.class)) {<NEW_LINE>return (T) value;<NEW_LINE>} else if (type.isAssignableFrom(Float.class)) {<NEW_LINE>return (T) new Float(Float.parseFloat(value) * multiplier.floatValue());<NEW_LINE>} else if (type.isAssignableFrom(Double.class)) {<NEW_LINE>return (T) new Double(Double.parseDouble(value) * multiplier.doubleValue());<NEW_LINE>} else if (type.isAssignableFrom(String.class)) {<NEW_LINE>return (T) value;<NEW_LINE>} else if (type.isAssignableFrom(Date.class)) {<NEW_LINE>return (T) Date.valueOf(value);<NEW_LINE>} else if (type.isAssignableFrom(Character.class)) {<NEW_LINE>return (T) new Character(value.charAt(0));<NEW_LINE>} else {<NEW_LINE>throw new CloudRuntimeException("Unsupported data type for config values: " + type);<NEW_LINE>}<NEW_LINE>}
) * multiplier.longValue());
1,750,964
public void writeToJSON(MMKV kvv) {<NEW_LINE>Gson gson = new Gson();<NEW_LINE>Set<String> mapIndex = new HashSet<>();<NEW_LINE>mapIndex = kvv.decodeStringSet("mapIndex", mapIndex);<NEW_LINE>if (mapIndex != null) {<NEW_LINE>for (String string : mapIndex) {<NEW_LINE>Bundle bundle = kvv.decodeParcelable(string, Bundle.class);<NEW_LINE>if (bundle != null) {<NEW_LINE>WritableMap map = Arguments.fromBundle(bundle);<NEW_LINE>String obj = gson.toJson(map.toHashMap());<NEW_LINE>kvv.putString(string, obj);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Set<String> arrayIndex = new HashSet<>();<NEW_LINE>arrayIndex = kvv.decodeStringSet("arrayIndex", arrayIndex);<NEW_LINE>if (arrayIndex != null) {<NEW_LINE>for (String string : arrayIndex) {<NEW_LINE>Bundle bundle = kvv.decodeParcelable(string, Bundle.class);<NEW_LINE>if (bundle != null) {<NEW_LINE>WritableMap map = Arguments.fromBundle(bundle);<NEW_LINE>if (map.getArray(string) != null) {<NEW_LINE>ArrayList<Object> list = map.getArray(string).toArrayList();<NEW_LINE>String obj = gson.toJson(list);<NEW_LINE>kvv.putString(string, obj);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Set<String> intIndex = new HashSet<>();<NEW_LINE>if (intIndex != null) {<NEW_LINE>intIndex = kvv.decodeStringSet("intIndex", intIndex);<NEW_LINE>for (String key : intIndex) {<NEW_LINE>int val = kvv.decodeInt(key);<NEW_LINE>double d = val;<NEW_LINE>kvv.encode(key, d);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
kvv.encode("numberIndex", intIndex);
1,607,302
public void actionPerformed(AnActionEvent e) {<NEW_LINE>final SingleConfigurationConfigurable<RunConfiguration> configuration = getSelectedConfiguration();<NEW_LINE>LOG.assertTrue(configuration != null);<NEW_LINE>try {<NEW_LINE>final DefaultMutableTreeNode typeNode = getSelectedConfigurationTypeNode();<NEW_LINE>final RunnerAndConfigurationSettings settings = configuration.getSnapshot();<NEW_LINE>final String copyName = createUniqueName(typeNode, configuration.getNameText(), CONFIGURATION, TEMPORARY_CONFIGURATION);<NEW_LINE>settings.setName(copyName);<NEW_LINE>final ConfigurationFactory factory = settings.getFactory();<NEW_LINE>if (factory instanceof ConfigurationFactoryEx) {<NEW_LINE>((ConfigurationFactoryEx) factory).onConfigurationCopied(settings.getConfiguration());<NEW_LINE>}<NEW_LINE>final SingleConfigurationConfigurable<RunConfiguration> configurable = createNewConfiguration(settings, typeNode);<NEW_LINE>IdeFocusManager.getInstance(myProject).requestFocus(<MASK><NEW_LINE>configurable.getNameTextField().setSelectionStart(0);<NEW_LINE>configurable.getNameTextField().setSelectionEnd(copyName.length());<NEW_LINE>} catch (ConfigurationException e1) {<NEW_LINE>Messages.showErrorDialog(myToolbarDecorator.getActionsPanel(), e1.getMessage(), e1.getTitle());<NEW_LINE>}<NEW_LINE>}
configurable.getNameTextField(), true);
576,871
final DescribeWorkspacesResult executeDescribeWorkspaces(DescribeWorkspacesRequest describeWorkspacesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeWorkspacesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeWorkspacesRequest> request = null;<NEW_LINE>Response<DescribeWorkspacesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeWorkspacesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeWorkspacesRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "WorkSpaces");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeWorkspaces");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeWorkspacesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeWorkspacesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
241,226
public boolean checkConnectionInCommandThread() {<NEW_LINE>ZebraPrinter savedPrinter = mPrinter;<NEW_LINE>try {<NEW_LINE>boolean wasConnected = false;<NEW_LINE>if (mPrinter == null) {<NEW_LINE>mPrinterConnection.open();<NEW_LINE>mPrinter = ZebraPrinterFactory.getInstance(mPrinterConnection);<NEW_LINE>} else {<NEW_LINE>if (mPrinterConnection.isConnected()) {<NEW_LINE>wasConnected = true;<NEW_LINE>} else {<NEW_LINE>mPrinterConnection.open();<NEW_LINE>mPrinter = ZebraPrinterFactory.getInstance(mPrinterConnection);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (mPrinter == null) {<NEW_LINE>Utils.platformLog("ZebraPrinter.checkConnection", <MASK><NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>PrinterStatus printerStatus = null;<NEW_LINE>try {<NEW_LINE>printerStatus = mPrinter.getCurrentStatus();<NEW_LINE>} catch (ConnectionException e) {<NEW_LINE>Utils.platformLog("ZebraPrinter.checkConnection", "error with connection with [" + getZebraAddress() + "]!");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (printerStatus == null) {<NEW_LINE>Utils.platformLog("ZebraPrinter.checkConnection", "error with connection with [" + getZebraAddress() + "]!");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (!wasConnected) {<NEW_LINE>mPrinterConnection.close();<NEW_LINE>mPrinter = null;<NEW_LINE>}<NEW_LINE>mPrinter = savedPrinter;<NEW_LINE>} catch (Exception e) {<NEW_LINE>mPrinter = null;<NEW_LINE>Utils.platformLog("ZebraPrinter.checkConnection", "WARNINGEN3: can not check connection of [" + getZebraAddress() + "]");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Utils.platformLog("ZebraPrinter.checkConnection", "INFONGEN1: check connection of [" + getZebraAddress() + "] is OK !");<NEW_LINE>return true;<NEW_LINE>}
"WARNINGEN2: can not check connection of [" + getZebraAddress() + "]");
1,091,734
public static void writeBlockState(PacketBuffer buf, IBlockState state) {<NEW_LINE>Block block = state.getBlock();<NEW_LINE>buf.writeVarInt(Block.REGISTRY.getIDForObject(block));<NEW_LINE>int meta = block.getMetaFromState(state);<NEW_LINE>buf.writeByte(meta);<NEW_LINE>IBlockState readState = block.getStateFromMeta(meta);<NEW_LINE>if (readState != state) {<NEW_LINE>buf.writeBoolean(true);<NEW_LINE>Map<IProperty, Comparable<?>> differingProperties = new HashMap<>();<NEW_LINE>for (IProperty<?> property : state.getPropertyKeys()) {<NEW_LINE>Comparable<?> inputValue = state.getValue(property);<NEW_LINE>Comparable<?> readValue = readState.getValue(property);<NEW_LINE>if (!inputValue.equals(readValue)) {<NEW_LINE>differingProperties.put(property, inputValue);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>buf.<MASK><NEW_LINE>for (Entry<IProperty, Comparable<?>> entry : differingProperties.entrySet()) {<NEW_LINE>buf.writeString(entry.getKey().getName());<NEW_LINE>buf.writeString(entry.getKey().getName(entry.getValue()));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>buf.writeBoolean(false);<NEW_LINE>}<NEW_LINE>}
writeByte(differingProperties.size());
405,981
private void buildFolder(final Composite form, final String props_prefix) {<NEW_LINE>PluginInterface pi = PluginInitializer.getDefaultInterface();<NEW_LINE>UIManager uim = pi.getUIManager();<NEW_LINE>MenuManager menuManager = uim.getMenuManager();<NEW_LINE>menuItemShowTabs = menuManager.addMenuItem(props_prefix + "._end_", "ConfigView.section.style.ShowTabsInTorrentView");<NEW_LINE>menuItemShowTabs.setDisposeWithUIDetach(UIInstance.UIT_SWT);<NEW_LINE>menuItemShowTabs.setStyle(MenuItem.STYLE_CHECK);<NEW_LINE>menuItemShowTabs.addFillListener(new MenuItemFillListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void menuWillBeShown(MenuItem menu, Object data) {<NEW_LINE>menu.setData<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>menuItemShowTabs.addListener(new MenuItemListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void selected(MenuItem menu, Object target) {<NEW_LINE>COConfigurationManager.setParameter("Library.ShowTabsInTorrentView", (Boolean) menu.getData());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>cTabsHolder.addListener(SWT.Resize, new Listener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void handleEvent(Event e) {<NEW_LINE>if (tabbedMDI.getMinimized()) {<NEW_LINE>fdHeightChanger.height = tabbedMDI.getFolderHeight();<NEW_LINE>cTabsHolder.getParent().layout();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Double l = (Double) sash.getData("PCT");<NEW_LINE>if (l != null) {<NEW_LINE>int newHeight = (int) (form.getBounds().height * l.doubleValue());<NEW_LINE>if (newHeight != fdHeightChanger.height) {<NEW_LINE>fdHeightChanger.height = newHeight;<NEW_LINE>cTabsHolder.getParent().layout();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
(COConfigurationManager.getBooleanParameter("Library.ShowTabsInTorrentView"));
326,107
public ContentChannel handleRequest(Request request, ResponseHandler originalResponseHandler) {<NEW_LINE>Preconditions.checkArgument(request instanceof HttpRequest, "Expected HttpRequest, got " + request);<NEW_LINE>Objects.requireNonNull(originalResponseHandler, "responseHandler");<NEW_LINE>RequestFilter requestFilter = filterResolver.resolveRequestFilter(jettyRequest, request.getUri()).orElse(null);<NEW_LINE>ResponseFilter responseFilter = filterResolver.resolveResponseFilter(jettyRequest, request.getUri()).orElse(null);<NEW_LINE>// Not using request.connect() here - it adds logic for error handling that we'd rather leave to the framework.<NEW_LINE>RequestHandler resolvedRequestHandler = request.container().resolveHandler(request);<NEW_LINE>if (resolvedRequestHandler == null) {<NEW_LINE>throw new BindingNotFoundException(request.getUri());<NEW_LINE>}<NEW_LINE>getRequestHandlerSpec(resolvedRequestHandler).ifPresent(requestHandlerSpec -> request.context().put<MASK><NEW_LINE>RequestHandler requestHandler = new ReferenceCountingRequestHandler(resolvedRequestHandler);<NEW_LINE>ResponseHandler responseHandler;<NEW_LINE>if (responseFilter != null) {<NEW_LINE>responseHandler = new FilteringResponseHandler(originalResponseHandler, responseFilter, request);<NEW_LINE>} else {<NEW_LINE>responseHandler = originalResponseHandler;<NEW_LINE>}<NEW_LINE>if (requestFilter != null) {<NEW_LINE>InterceptingResponseHandler interceptingResponseHandler = new InterceptingResponseHandler(responseHandler);<NEW_LINE>requestFilter.filter(HttpRequest.class.cast(request), interceptingResponseHandler);<NEW_LINE>if (interceptingResponseHandler.hasProducedResponse()) {<NEW_LINE>return COMPLETING_CONTENT_CHANNEL;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ContentChannel contentChannel = requestHandler.handleRequest(request, responseHandler);<NEW_LINE>if (contentChannel == null) {<NEW_LINE>throw new RequestDeniedException(request);<NEW_LINE>}<NEW_LINE>return contentChannel;<NEW_LINE>}
(RequestHandlerSpec.ATTRIBUTE_NAME, requestHandlerSpec));
905,405
public static <T extends JApiModifierBase> JApiModifier<T> extractModifierFromBehavior(Optional<? extends CtBehavior> oldClassOptional, Optional<? extends CtBehavior> newClassOptional, ExtractModifierFromBehaviorCallback<T> callback) {<NEW_LINE>if (oldClassOptional.isPresent() && newClassOptional.isPresent()) {<NEW_LINE>CtBehavior oldClass = oldClassOptional.get();<NEW_LINE>CtBehavior newClass = newClassOptional.get();<NEW_LINE>T oldClassModifier = callback.getModifierForOld(oldClass);<NEW_LINE>T newClassModifier = callback.getModifierForNew(newClass);<NEW_LINE>if (oldClassModifier != newClassModifier) {<NEW_LINE>return new JApiModifier<>(Optional.of(oldClassModifier), Optional.of(newClassModifier), JApiChangeStatus.MODIFIED);<NEW_LINE>} else {<NEW_LINE>return new JApiModifier<>(Optional.of(oldClassModifier), Optional.of(newClassModifier), JApiChangeStatus.UNCHANGED);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (oldClassOptional.isPresent()) {<NEW_LINE>CtBehavior oldClass = oldClassOptional.get();<NEW_LINE>T oldClassModifier = callback.getModifierForOld(oldClass);<NEW_LINE>return new JApiModifier<>(Optional.of(oldClassModifier), Optional.<T>absent(), JApiChangeStatus.REMOVED);<NEW_LINE>}<NEW_LINE>if (newClassOptional.isPresent()) {<NEW_LINE><MASK><NEW_LINE>T newClassModifier = callback.getModifierForNew(newClass);<NEW_LINE>return new JApiModifier<>(Optional.<T>absent(), Optional.of(newClassModifier), JApiChangeStatus.NEW);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new JApiModifier<>(Optional.<T>absent(), Optional.<T>absent(), JApiChangeStatus.UNCHANGED);<NEW_LINE>}
CtBehavior newClass = newClassOptional.get();
1,167,668
public static GLKMatrix4 subtract(GLKMatrix4 matrixLeft, GLKMatrix4 matrixRight) {<NEW_LINE>float[] m = new float[16];<NEW_LINE>float[] matrixLeft_m = new float[16];<NEW_LINE>float[] matrixRight_m = new float[16];<NEW_LINE>matrixLeft.getM().get(matrixLeft_m);<NEW_LINE>matrixRight.<MASK><NEW_LINE>m[0] = matrixLeft_m[0] - matrixRight_m[0];<NEW_LINE>m[1] = matrixLeft_m[1] - matrixRight_m[1];<NEW_LINE>m[2] = matrixLeft_m[2] - matrixRight_m[2];<NEW_LINE>m[3] = matrixLeft_m[3] - matrixRight_m[3];<NEW_LINE>m[4] = matrixLeft_m[4] - matrixRight_m[4];<NEW_LINE>m[5] = matrixLeft_m[5] - matrixRight_m[5];<NEW_LINE>m[6] = matrixLeft_m[6] - matrixRight_m[6];<NEW_LINE>m[7] = matrixLeft_m[7] - matrixRight_m[7];<NEW_LINE>m[8] = matrixLeft_m[8] - matrixRight_m[8];<NEW_LINE>m[9] = matrixLeft_m[9] - matrixRight_m[9];<NEW_LINE>m[10] = matrixLeft_m[10] - matrixRight_m[10];<NEW_LINE>m[11] = matrixLeft_m[11] - matrixRight_m[11];<NEW_LINE>m[12] = matrixLeft_m[12] - matrixRight_m[12];<NEW_LINE>m[13] = matrixLeft_m[13] - matrixRight_m[13];<NEW_LINE>m[14] = matrixLeft_m[14] - matrixRight_m[14];<NEW_LINE>m[15] = matrixLeft_m[15] - matrixRight_m[15];<NEW_LINE>return create(m);<NEW_LINE>}
getM().get(matrixRight_m);
1,102,405
public static DescribeDataMaskingRunHistoryResponse unmarshall(DescribeDataMaskingRunHistoryResponse describeDataMaskingRunHistoryResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDataMaskingRunHistoryResponse.setRequestId(_ctx.stringValue("DescribeDataMaskingRunHistoryResponse.RequestId"));<NEW_LINE>describeDataMaskingRunHistoryResponse.setPageSize(_ctx.integerValue("DescribeDataMaskingRunHistoryResponse.PageSize"));<NEW_LINE>describeDataMaskingRunHistoryResponse.setCurrentPage(_ctx.integerValue("DescribeDataMaskingRunHistoryResponse.CurrentPage"));<NEW_LINE>describeDataMaskingRunHistoryResponse.setTotalCount(_ctx.integerValue("DescribeDataMaskingRunHistoryResponse.TotalCount"));<NEW_LINE>List<Task> items <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeDataMaskingRunHistoryResponse.Items.Length"); i++) {<NEW_LINE>Task task = new Task();<NEW_LINE>task.setId(_ctx.longValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].Id"));<NEW_LINE>task.setTaskId(_ctx.stringValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].TaskId"));<NEW_LINE>task.setStartTime(_ctx.longValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].StartTime"));<NEW_LINE>task.setEndTime(_ctx.longValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].EndTime"));<NEW_LINE>task.setRunIndex(_ctx.integerValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].RunIndex"));<NEW_LINE>task.setType(_ctx.integerValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].Type"));<NEW_LINE>task.setDstType(_ctx.integerValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].DstType"));<NEW_LINE>task.setPercentage(_ctx.integerValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].Percentage"));<NEW_LINE>task.setSrcType(_ctx.integerValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].SrcType"));<NEW_LINE>task.setMaskingCount(_ctx.longValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].MaskingCount"));<NEW_LINE>task.setConflictCount(_ctx.longValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].ConflictCount"));<NEW_LINE>task.setStatus(_ctx.integerValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].Status"));<NEW_LINE>task.setFailCode(_ctx.stringValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].FailCode"));<NEW_LINE>task.setDstTypeCode(_ctx.stringValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].DstTypeCode"));<NEW_LINE>task.setSrcTypeCode(_ctx.stringValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].SrcTypeCode"));<NEW_LINE>task.setHasSubProcess(_ctx.integerValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].HasSubProcess"));<NEW_LINE>task.setHasDownloadFile(_ctx.integerValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].HasDownloadFile"));<NEW_LINE>task.setSrcTableName(_ctx.stringValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].SrcTableName"));<NEW_LINE>task.setFailMsg(_ctx.stringValue("DescribeDataMaskingRunHistoryResponse.Items[" + i + "].FailMsg"));<NEW_LINE>items.add(task);<NEW_LINE>}<NEW_LINE>describeDataMaskingRunHistoryResponse.setItems(items);<NEW_LINE>return describeDataMaskingRunHistoryResponse;<NEW_LINE>}
= new ArrayList<Task>();
813,130
protected void afterHookedMethod(MethodHookParam param) throws Throwable {<NEW_LINE>Hookers.logD("LoadedApk#<init> starts");<NEW_LINE>try {<NEW_LINE>LoadedApk loadedApk = (LoadedApk) param.thisObject;<NEW_LINE><MASK><NEW_LINE>Object mAppDir = XposedHelpers.getObjectField(loadedApk, "mAppDir");<NEW_LINE>Hookers.logD("LoadedApk#<init> ends: " + mAppDir);<NEW_LINE>XResources.setPackageNameForResDir(packageName, loadedApk.getResDir());<NEW_LINE>if (packageName.equals("android")) {<NEW_LINE>Hookers.logD("LoadedApk#<init> is android, skip: " + mAppDir);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// mIncludeCode checking should go ahead of loadedPackagesInProcess added checking<NEW_LINE>if (!XposedHelpers.getBooleanField(loadedApk, "mIncludeCode")) {<NEW_LINE>Hookers.logD("LoadedApk#<init> mIncludeCode == false: " + mAppDir);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!XposedInit.loadedPackagesInProcess.add(packageName)) {<NEW_LINE>Hookers.logD("LoadedApk#<init> has been loaded before, skip: " + mAppDir);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// OnePlus magic...<NEW_LINE>if (Log.getStackTraceString(new Throwable()).contains("android.app.ActivityThread$ApplicationThread.schedulePreload")) {<NEW_LINE>Hookers.logD("LoadedApk#<init> maybe oneplus's custom opt, skip");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>LoadedApkGetCL hook = new LoadedApkGetCL(loadedApk, packageName, AndroidAppHelper.currentProcessName(), false);<NEW_LINE>hook.setUnhook(XposedHelpers.findAndHookMethod(LoadedApk.class, "getClassLoader", hook));<NEW_LINE>} catch (Throwable t) {<NEW_LINE>Hookers.logE("error when hooking LoadedApk.<init>", t);<NEW_LINE>}<NEW_LINE>}
String packageName = loadedApk.getPackageName();
41,733
// -------------------------------------------------------------------------<NEW_LINE>@Override<NEW_LINE>public Function<Double, Double> differentiate(Function<Double, Double> function, Function<Double, Boolean> domain) {<NEW_LINE>ArgChecker.notNull(function, "function");<NEW_LINE>ArgChecker.notNull(domain, "domain");<NEW_LINE>double[] wFwd = new double[] { -3. / twoEps, 4. / twoEps, -1. / twoEps };<NEW_LINE>double[] wCent = new double[] { -1. / twoEps, 0., 1. / twoEps };<NEW_LINE>double[] wBack = new double[] { 1. / twoEps, -<MASK><NEW_LINE>return new Function<Double, Double>() {<NEW_LINE><NEW_LINE>@SuppressWarnings("synthetic-access")<NEW_LINE>@Override<NEW_LINE>public Double apply(Double x) {<NEW_LINE>ArgChecker.notNull(x, "x");<NEW_LINE>ArgChecker.isTrue(domain.apply(x), "point {} is not in the function domain", x.toString());<NEW_LINE>double[] y = new double[3];<NEW_LINE>double[] w;<NEW_LINE>if (!domain.apply(x + eps)) {<NEW_LINE>if (!domain.apply(x - eps)) {<NEW_LINE>throw new MathException("cannot get derivative at point " + x.toString());<NEW_LINE>}<NEW_LINE>y[0] = function.apply(x - twoEps);<NEW_LINE>y[1] = function.apply(x - eps);<NEW_LINE>y[2] = function.apply(x);<NEW_LINE>w = wBack;<NEW_LINE>} else {<NEW_LINE>if (!domain.apply(x - eps)) {<NEW_LINE>y[0] = function.apply(x);<NEW_LINE>y[1] = function.apply(x + eps);<NEW_LINE>y[2] = function.apply(x + twoEps);<NEW_LINE>w = wFwd;<NEW_LINE>} else {<NEW_LINE>y[0] = function.apply(x - eps);<NEW_LINE>y[2] = function.apply(x + eps);<NEW_LINE>w = wCent;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>double res = y[0] * w[0] + y[2] * w[2];<NEW_LINE>if (w[1] != 0) {<NEW_LINE>res += y[1] * w[1];<NEW_LINE>}<NEW_LINE>return res;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
4. / twoEps, 3. / twoEps };
1,627,338
public static DescribeScheduledTasksResponse unmarshall(DescribeScheduledTasksResponse describeScheduledTasksResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeScheduledTasksResponse.setRequestId<MASK><NEW_LINE>describeScheduledTasksResponse.setTotalCount(_ctx.integerValue("DescribeScheduledTasksResponse.TotalCount"));<NEW_LINE>describeScheduledTasksResponse.setPageNumber(_ctx.integerValue("DescribeScheduledTasksResponse.PageNumber"));<NEW_LINE>describeScheduledTasksResponse.setPageSize(_ctx.integerValue("DescribeScheduledTasksResponse.PageSize"));<NEW_LINE>List<ScheduledTask> scheduledTasks = new ArrayList<ScheduledTask>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeScheduledTasksResponse.ScheduledTasks.Length"); i++) {<NEW_LINE>ScheduledTask scheduledTask = new ScheduledTask();<NEW_LINE>scheduledTask.setScheduledTaskId(_ctx.stringValue("DescribeScheduledTasksResponse.ScheduledTasks[" + i + "].ScheduledTaskId"));<NEW_LINE>scheduledTask.setScheduledTaskName(_ctx.stringValue("DescribeScheduledTasksResponse.ScheduledTasks[" + i + "].ScheduledTaskName"));<NEW_LINE>scheduledTask.setDescription(_ctx.stringValue("DescribeScheduledTasksResponse.ScheduledTasks[" + i + "].Description"));<NEW_LINE>scheduledTask.setScheduledAction(_ctx.stringValue("DescribeScheduledTasksResponse.ScheduledTasks[" + i + "].ScheduledAction"));<NEW_LINE>scheduledTask.setRecurrenceEndTime(_ctx.stringValue("DescribeScheduledTasksResponse.ScheduledTasks[" + i + "].RecurrenceEndTime"));<NEW_LINE>scheduledTask.setLaunchTime(_ctx.stringValue("DescribeScheduledTasksResponse.ScheduledTasks[" + i + "].LaunchTime"));<NEW_LINE>scheduledTask.setRecurrenceType(_ctx.stringValue("DescribeScheduledTasksResponse.ScheduledTasks[" + i + "].RecurrenceType"));<NEW_LINE>scheduledTask.setRecurrenceValue(_ctx.stringValue("DescribeScheduledTasksResponse.ScheduledTasks[" + i + "].RecurrenceValue"));<NEW_LINE>scheduledTask.setLaunchExpirationTime(_ctx.integerValue("DescribeScheduledTasksResponse.ScheduledTasks[" + i + "].LaunchExpirationTime"));<NEW_LINE>scheduledTask.setTaskEnabled(_ctx.booleanValue("DescribeScheduledTasksResponse.ScheduledTasks[" + i + "].TaskEnabled"));<NEW_LINE>scheduledTask.setMaxValue(_ctx.integerValue("DescribeScheduledTasksResponse.ScheduledTasks[" + i + "].MaxValue"));<NEW_LINE>scheduledTask.setMinValue(_ctx.integerValue("DescribeScheduledTasksResponse.ScheduledTasks[" + i + "].MinValue"));<NEW_LINE>scheduledTask.setDesiredCapacity(_ctx.integerValue("DescribeScheduledTasksResponse.ScheduledTasks[" + i + "].DesiredCapacity"));<NEW_LINE>scheduledTask.setScalingGroupId(_ctx.stringValue("DescribeScheduledTasksResponse.ScheduledTasks[" + i + "].ScalingGroupId"));<NEW_LINE>scheduledTasks.add(scheduledTask);<NEW_LINE>}<NEW_LINE>describeScheduledTasksResponse.setScheduledTasks(scheduledTasks);<NEW_LINE>return describeScheduledTasksResponse;<NEW_LINE>}
(_ctx.stringValue("DescribeScheduledTasksResponse.RequestId"));
493,616
public void run() {<NEW_LINE>Map<Long, UserSummary> summaryMap = new HashMap<Long, UserSummary>();<NEW_LINE><MASK><NEW_LINE>while (longEnumer.hasMoreElements()) {<NEW_LINE>XLogData d = dataMap.get(longEnumer.nextLong());<NEW_LINE>long time = d.p.endTime;<NEW_LINE>if (d.filter_ok && time >= stime && time <= etime && !ObjectSelectManager.getInstance().isUnselectedObject(d.p.objHash)) {<NEW_LINE>UserSummary summary = summaryMap.get(d.p.userid);<NEW_LINE>if (summary == null) {<NEW_LINE>summary = new UserSummary();<NEW_LINE>summary.id = d.p.userid;<NEW_LINE>summaryMap.put(d.p.userid, summary);<NEW_LINE>}<NEW_LINE>summary.count++;<NEW_LINE>summary.sumTime += d.p.elapsed;<NEW_LINE>if (d.p.elapsed > summary.maxTime) {<NEW_LINE>summary.maxTime = d.p.elapsed;<NEW_LINE>}<NEW_LINE>if (d.p.error != 0) {<NEW_LINE>summary.error++;<NEW_LINE>}<NEW_LINE>summary.cpu += d.p.cpu;<NEW_LINE>summary.memory += d.p.kbytes;<NEW_LINE>summary.sqltime += d.p.sqlTime;<NEW_LINE>summary.apicalltime += d.p.apicallTime;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final TopN<UserSummary> stn = new TopN<UserSummary>(10000, DIRECTION.DESC);<NEW_LINE>for (UserSummary so : summaryMap.values()) {<NEW_LINE>stn.add(so);<NEW_LINE>}<NEW_LINE>ExUtil.exec(viewer.getTable(), new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>rangeLabel.setText(DateUtil.format(stime, "yyyy-MM-dd HH:mm:ss") + " ~ " + DateUtil.format(etime, "HH:mm:ss") + " (" + stn.size() + ")");<NEW_LINE>viewer.setInput(stn.getList());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
LongEnumer longEnumer = dataMap.keys();
298,831
public static boolean contains(final boolean caseSensitive, final CharSequence text, final CharSequence fragment) {<NEW_LINE>if (text == null) {<NEW_LINE>throw new IllegalArgumentException("Text cannot be null");<NEW_LINE>}<NEW_LINE>if (fragment == null) {<NEW_LINE>throw new IllegalArgumentException("Fragment cannot be null");<NEW_LINE>}<NEW_LINE>if (text instanceof String && fragment instanceof String) {<NEW_LINE>// Technically, String#contains(...) allows a CharSequence as an argument, so the<NEW_LINE>// 'fragment instanceof String' would not be necessary. But it seems String#contains(...) in turn<NEW_LINE>// calls .toString() on the CharSequence argument, which would be inconvenient.<NEW_LINE>return (caseSensitive ? ((String) text).contains(fragment) : contains(caseSensitive, text, 0, text.length(), fragment, 0<MASK><NEW_LINE>}<NEW_LINE>return contains(caseSensitive, text, 0, text.length(), fragment, 0, fragment.length());<NEW_LINE>}
, fragment.length()));
260,682
List<CallableUserAggregationFunction> compileAggregationFunction(Class<?> fcnDefinition) throws KernelException {<NEW_LINE>try {<NEW_LINE>List<Method> methods = Arrays.stream(fcnDefinition.getDeclaredMethods()).filter(m -> m.isAnnotationPresent(UserAggregationFunction.class)).collect(Collectors.toList());<NEW_LINE>if (methods.isEmpty()) {<NEW_LINE>return emptyList();<NEW_LINE>}<NEW_LINE>assertValidConstructor(fcnDefinition);<NEW_LINE>List<CallableUserAggregationFunction> out = new ArrayList<>(methods.size());<NEW_LINE>for (Method method : methods) {<NEW_LINE>String valueName = method.getAnnotation(UserAggregationFunction.class).value();<NEW_LINE>String definedName = method.getAnnotation(UserAggregationFunction.class).name();<NEW_LINE>QualifiedName funcName = extractName(fcnDefinition, method, valueName, definedName);<NEW_LINE>if (config.isWhitelisted(funcName.toString())) {<NEW_LINE>out.add(compileAggregationFunction<MASK><NEW_LINE>} else {<NEW_LINE>log.warn(String.format("The function '%s' is not on the allowlist and won't be loaded.", funcName.toString()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>out.sort(Comparator.comparing(a -> a.signature().name().toString()));<NEW_LINE>return out;<NEW_LINE>} catch (KernelException e) {<NEW_LINE>throw e;<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new ProcedureException(Status.Procedure.ProcedureRegistrationFailed, e, "Failed to compile function defined in `%s`: %s", fcnDefinition.getSimpleName(), e.getMessage());<NEW_LINE>}<NEW_LINE>}
(fcnDefinition, method, funcName));
404,330
public T onCompleted(com.ning.http.client.Response ningResponse) {<NEW_LINE>try {<NEW_LINE>final Map<String, String> headersMap = new HashMap<>();<NEW_LINE>for (Map.Entry<String, List<String>> header : ningResponse.getHeaders().entrySet()) {<NEW_LINE>final StringBuilder value = new StringBuilder();<NEW_LINE>for (String str : header.getValue()) {<NEW_LINE>value.append(str);<NEW_LINE>}<NEW_LINE>headersMap.put(header.getKey(<MASK><NEW_LINE>}<NEW_LINE>final Response response = new Response(ningResponse.getStatusCode(), ningResponse.getStatusText(), headersMap, ningResponse.getResponseBodyAsStream());<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final T t = converter == null ? (T) response : converter.convert(response);<NEW_LINE>if (callback != null) {<NEW_LINE>callback.onCompleted(t);<NEW_LINE>}<NEW_LINE>return t;<NEW_LINE>} catch (IOException | RuntimeException e) {<NEW_LINE>onThrowable(e);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
), value.toString());
1,340,885
public void computeChildren(@NotNull final XCompositeNode node) {<NEW_LINE>final AtomicInteger counter = new AtomicInteger(myFieldRefs.size());<NEW_LINE>final XValueChildrenList list = new <MASK><NEW_LINE>for (final FieldRef fieldRef : myFieldRefs) {<NEW_LINE>myDebugProcess.getVmServiceWrapper().getObject(myIsolateId, fieldRef.getId(), new GetObjectConsumer() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void received(Obj field) {<NEW_LINE>final InstanceRef instanceRef = ((Field) field).getStaticValue();<NEW_LINE>// static field may be not initialized yet, in this case this instanceRef is in fact a Sentinel<NEW_LINE>if ("@Instance".equals(instanceRef.getType())) {<NEW_LINE>list.add(new DartVmServiceValue(myDebugProcess, myIsolateId, ((Field) field).getName(), instanceRef, null, fieldRef, false));<NEW_LINE>} else if ("Sentinel".equals(instanceRef.getType())) {<NEW_LINE>list.add(new XNamedValue(((Field) field).getName()) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void computeSourcePosition(@NotNull XNavigatable navigatable) {<NEW_LINE>DartVmServiceValue.doComputeSourcePosition(myDebugProcess, navigatable, myIsolateId, fieldRef);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void computePresentation(@NotNull XValueNode node, @NotNull XValuePlace place) {<NEW_LINE>final JsonElement valueAsString = instanceRef.getJson().get("valueAsString");<NEW_LINE>final String value = valueAsString == null ? "not initialized" : valueAsString.getAsString();<NEW_LINE>node.setPresentation(AllIcons.Nodes.Field, null, value, false);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>if (counter.decrementAndGet() == 0) {<NEW_LINE>if (list.size() == 0) {<NEW_LINE>node.setErrorMessage("Static fields not initialized yet");<NEW_LINE>} else {<NEW_LINE>node.addChildren(list, true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void received(Sentinel sentinel) {<NEW_LINE>node.setErrorMessage(sentinel.getValueAsString());<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onError(RPCError error) {<NEW_LINE>node.setErrorMessage(error.getMessage());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
XValueChildrenList(myFieldRefs.size());
1,398,718
static File createTempFile(String prefix, String suffix, File directory) throws IOException {<NEW_LINE>if (directory == null) {<NEW_LINE>throw new NullPointerException();<NEW_LINE>}<NEW_LINE>long time = System.currentTimeMillis();<NEW_LINE>prefix = new File(prefix).getName();<NEW_LINE>IOException suppressed = null;<NEW_LINE>for (int i = 0; i < 10000; i++) {<NEW_LINE>String tempName = String.format(Locale.US, "%s%d%04d%s", prefix, time, i, suffix);<NEW_LINE>File tempFile = new File(directory, tempName);<NEW_LINE>if (!tempName.equals(tempFile.getName())) {<NEW_LINE>// The given prefix or suffix contains path separators.<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (tempFile.createNewFile()) {<NEW_LINE>return tempFile.getCanonicalFile();<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>// This may just be a transient error; store it just in case.<NEW_LINE>suppressed = e;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (suppressed != null) {<NEW_LINE>throw suppressed;<NEW_LINE>} else {<NEW_LINE>throw new IOException("Unable to create temporary file");<NEW_LINE>}<NEW_LINE>}
throw new IOException("Unable to create temporary file: " + tempFile);
1,424,542
protected SnippetTemplate.Arguments makeArguments(InstanceOfUsageReplacer replacer, LoweringTool tool) {<NEW_LINE>InstanceOfNode node = (InstanceOfNode) replacer.instanceOf;<NEW_LINE>TypeReference typeReference = node.type();<NEW_LINE>SharedType type = (SharedType) typeReference.getType();<NEW_LINE>DynamicHub hub = type.getHub();<NEW_LINE>if (typeReference.isExact()) {<NEW_LINE>SnippetTemplate.Arguments args = new SnippetTemplate.Arguments(typeEquality, node.graph().getGuardsStage(), tool.getLoweringStage());<NEW_LINE>args.add("object", node.getValue());<NEW_LINE>args.add("trueValue", replacer.trueValue);<NEW_LINE>args.add("falseValue", replacer.falseValue);<NEW_LINE>args.addConst("allowsNull", node.allowsNull());<NEW_LINE><MASK><NEW_LINE>return args;<NEW_LINE>} else {<NEW_LINE>assert type.getSingleImplementor() == null : "Canonicalization of InstanceOfNode produces exact type for single implementor";<NEW_LINE>SnippetTemplate.Arguments args = new SnippetTemplate.Arguments(instanceOf, node.graph().getGuardsStage(), tool.getLoweringStage());<NEW_LINE>args.add("object", node.getValue());<NEW_LINE>args.add("trueValue", replacer.trueValue);<NEW_LINE>args.add("falseValue", replacer.falseValue);<NEW_LINE>args.addConst("allowsNull", node.allowsNull());<NEW_LINE>args.add("start", hub.getTypeCheckStart());<NEW_LINE>args.add("range", hub.getTypeCheckRange());<NEW_LINE>args.add("slot", hub.getTypeCheckSlot());<NEW_LINE>args.addConst("typeIDSlotOffset", runtimeConfig.getTypeIDSlotsOffset());<NEW_LINE>return args;<NEW_LINE>}<NEW_LINE>}
args.add("exactType", hub);
1,555,694
// from CloneableEditor.Pane<NEW_LINE>public void updateName() {<NEW_LINE>// is called before setMultiViewDescriptions() need to check for null.<NEW_LINE>if (model != null) {<NEW_LINE>for (MultiViewDescription mvd : model.getDescriptions()) {<NEW_LINE>if (mvd instanceof ContextAwareDescription && ((ContextAwareDescription) mvd).isSplitDescription())<NEW_LINE>// #240371 - don't update name from spit elements<NEW_LINE>continue;<NEW_LINE>MultiViewElement el = model.getElementForDescription(mvd, MultiViewCloneableTopComponent.isSourceView(mvd));<NEW_LINE>if (el == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (el.getVisualRepresentation() instanceof Pane) {<NEW_LINE>Pane pane = (Pane) el.getVisualRepresentation();<NEW_LINE>pane.updateName();<NEW_LINE>final <MASK><NEW_LINE>peer.setDisplayName(tc.getDisplayName());<NEW_LINE>peer.setIcon(tc.getIcon());<NEW_LINE>if (!Arrays.asList(tc.getPropertyChangeListeners()).contains(propListener)) {<NEW_LINE>tc.addPropertyChangeListener(propListener);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
CloneableTopComponent tc = pane.getComponent();
21,584
private void createAvoidRoadsFilesItems() {<NEW_LINE>List<File> avoidRoadsFiles = avoidRoadsHelper.collectAvoidRoadsFiles();<NEW_LINE>if (!Algorithms.isEmpty(avoidRoadsFiles)) {<NEW_LINE>items.add(new SubtitleDividerItem(app));<NEW_LINE>items.add(new TitleItem(getString(R.string.files_with_route_restrictions)));<NEW_LINE>LayoutInflater inflater = UiUtilities.getInflater(getContext(), nightMode);<NEW_LINE>for (File file : avoidRoadsFiles) {<NEW_LINE>String fileName = file.getName();<NEW_LINE>String name = capitalizeFirstLetter(fileName.replace(AVOID_ROADS_FILE_EXT, ""));<NEW_LINE>boolean enabled = enabledFiles.contains(fileName);<NEW_LINE>View itemView = inflater.inflate(R.layout.bottom_sheet_item_with_switch_and_dialog, null, false);<NEW_LINE>AndroidUiHelper.updateVisibility(itemView.findViewById(R<MASK><NEW_LINE>final BottomSheetItemWithCompoundButton[] item = new BottomSheetItemWithCompoundButton[1];<NEW_LINE>item[0] = (BottomSheetItemWithCompoundButton) new BottomSheetItemWithCompoundButton.Builder().setChecked(enabled).setTitle(name).setIcon(getActiveIcon(R.drawable.ic_action_file_report)).setCustomView(itemView).setOnClickListener(v -> {<NEW_LINE>boolean checked = !item[0].isChecked();<NEW_LINE>if (checked) {<NEW_LINE>enabledFiles.add(fileName);<NEW_LINE>} else {<NEW_LINE>enabledFiles.remove(fileName);<NEW_LINE>}<NEW_LINE>item[0].setChecked(checked);<NEW_LINE>}).create();<NEW_LINE>avoidRoadsHelper.getDirectionPointsForFileAsync(file, result -> {<NEW_LINE>int size = result.queryInBox(new QuadRect(0, 0, Integer.MAX_VALUE, Integer.MAX_VALUE), new ArrayList<>()).size();<NEW_LINE>String roads = getString(R.string.roads);<NEW_LINE>String used = getString(enabled ? R.string.shared_string_used : R.string.shared_string_not_used);<NEW_LINE>String roadsCount = getString(R.string.ltr_or_rtl_combine_via_colon, roads.toLowerCase(), String.valueOf(size));<NEW_LINE>String description = getString(R.string.ltr_or_rtl_combine_via_bold_point, used, roadsCount);<NEW_LINE>item[0].setDescription(description);<NEW_LINE>return true;<NEW_LINE>});<NEW_LINE>items.add(item[0]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.id.divider), false);
335,650
// generateNotification.<NEW_LINE>@WrapInTransaction<NEW_LINE>private void saveNotification(final NotificationDTO dto, final NotificationData data, final Visibility visibility, final String visibilityId, final NotificationLevel level, final String userId, final Locale locale) throws DotSecurityException, DotDataException {<NEW_LINE>Logger.debug(NotificationAPIImpl.class, "Storing the notification: " + dto);<NEW_LINE>// If the is Visibility.ROLE we need to create a notification for each user under that role<NEW_LINE>if (visibility.equals(Visibility.ROLE)) {<NEW_LINE>// Search for all the users in the given role<NEW_LINE>Collection<User> foundUsers = getRoleAPI().findUsersForRole(visibilityId);<NEW_LINE>if (foundUsers != null && !foundUsers.isEmpty()) {<NEW_LINE>this.notificationFactory.saveNotificationsForUsers(dto, foundUsers);<NEW_LINE>}<NEW_LINE>} else if (visibility.equals(Visibility.USER)) {<NEW_LINE>this.notificationFactory.saveNotification(dto);<NEW_LINE>} else {<NEW_LINE>throw new NotImplementedException("Visibility no implemented [" + visibility + "]");<NEW_LINE>}<NEW_LINE>// Adding notification to System Events table<NEW_LINE>final Notification notificationBean = new Notification(level, userId, data);<NEW_LINE>final Payload payload = new Payload(notificationBean, visibility, visibilityId);<NEW_LINE>notificationBean.<MASK><NEW_LINE>notificationBean.setTimeSent(new Date());<NEW_LINE>notificationBean.setPrettyDate(DateUtil.prettyDateSince(notificationBean.getTimeSent(), locale));<NEW_LINE>final SystemEvent systemEvent = new SystemEvent(SystemEventType.NOTIFICATION, payload);<NEW_LINE>this.systemEventsAPI.push(systemEvent);<NEW_LINE>Logger.debug(NotificationAPIImpl.class, "Pushing the event: " + systemEvent);<NEW_LINE>}
setGroupId(dto.getGroupId());
266,259
/* Sample generated code:<NEW_LINE>*<NEW_LINE>* @com.ibm.j9ddr.GeneratedFieldAccessor(offsetFieldName="_isDirOffset_", declaredType="uint32_t:1")<NEW_LINE>* public UDATA isDir() throws CorruptDataException {<NEW_LINE>* return getU32Bitfield(<MASK><NEW_LINE>* }<NEW_LINE>*/<NEW_LINE>private void doBitfieldMethod(FieldDescriptor field, String baseType, int width) {<NEW_LINE>String fieldName = field.getName();<NEW_LINE>Type qualifiedBaseType = Type.getObjectType(qualifyType(baseType));<NEW_LINE>Type qualifiedReturnType = Type.getObjectType(qualifyType(generalizeSimpleType(baseType)));<NEW_LINE>String returnDesc = Type.getMethodDescriptor(qualifiedReturnType);<NEW_LINE>String startFieldName = String.format("_%s_s_", fieldName);<NEW_LINE>String accessorName = String.format("get%sBitfield", baseType);<NEW_LINE>String accessorDesc = Type.getMethodDescriptor(qualifiedBaseType, Type.INT_TYPE, Type.INT_TYPE);<NEW_LINE>MethodVisitor method = beginAnnotatedMethod(field, fieldName, returnDesc);<NEW_LINE>method.visitCode();<NEW_LINE>if (checkPresent(field, method)) {<NEW_LINE>method.visitVarInsn(ALOAD, 0);<NEW_LINE>method.visitFieldInsn(GETSTATIC, getStructureClassName(), startFieldName, Type.INT_TYPE.getDescriptor());<NEW_LINE>loadInt(method, width);<NEW_LINE>method.visitMethodInsn(INVOKEVIRTUAL, className, accessorName, accessorDesc, false);<NEW_LINE>method.visitInsn(ARETURN);<NEW_LINE>}<NEW_LINE>method.visitMaxs(3, 1);<NEW_LINE>method.visitEnd();<NEW_LINE>// no EA method for a bitfield<NEW_LINE>}
J9FileStat._isDir_s_, J9FileStat._isDir_b_);
1,419,102
public void marshall(ListCodeReviewsRequest listCodeReviewsRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (listCodeReviewsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(listCodeReviewsRequest.getProviderTypes(), PROVIDERTYPES_BINDING);<NEW_LINE>protocolMarshaller.marshall(listCodeReviewsRequest.getStates(), STATES_BINDING);<NEW_LINE>protocolMarshaller.marshall(listCodeReviewsRequest.getRepositoryNames(), REPOSITORYNAMES_BINDING);<NEW_LINE>protocolMarshaller.marshall(listCodeReviewsRequest.getType(), TYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(listCodeReviewsRequest.getMaxResults(), MAXRESULTS_BINDING);<NEW_LINE>protocolMarshaller.marshall(listCodeReviewsRequest.getNextToken(), NEXTTOKEN_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + <MASK><NEW_LINE>}<NEW_LINE>}
e.getMessage(), e);
505,991
public Attributes toAttributes(Attributes attrs) {<NEW_LINE>int offsetSOF = offsetSOF();<NEW_LINE>if (offsetSOF == -1)<NEW_LINE>return null;<NEW_LINE>if (attrs == null)<NEW_LINE>attrs = new Attributes(10);<NEW_LINE>int sof = data[offsetSOF] & 255;<NEW_LINE>int p = data[offsetSOF + 3] & 0xff;<NEW_LINE>int y = ((data[offsetSOF + 3 + 1] & 0xff) << 8) | (data[offsetSOF + 3 + 2] & 0xff);<NEW_LINE>int x = ((data[offsetSOF + 3 + 3] & 0xff) << 8) | (data[offsetSOF + 3 + 4] & 0xff);<NEW_LINE>int nf = data[offsetSOF + 3 + 5] & 0xff;<NEW_LINE>attrs.setInt(Tag.SamplesPerPixel, VR.US, nf);<NEW_LINE>if (nf == 3) {<NEW_LINE>attrs.setString(Tag.PhotometricInterpretation, VR.CS, (sof == JPEG.SOF3 || sof == JPEG.SOF55) ? "RGB" : "YBR_FULL_422");<NEW_LINE>attrs.setInt(Tag.PlanarConfiguration, VR.US, 0);<NEW_LINE>} else {<NEW_LINE>attrs.setString(Tag.<MASK><NEW_LINE>}<NEW_LINE>attrs.setInt(Tag.Rows, VR.US, y);<NEW_LINE>attrs.setInt(Tag.Columns, VR.US, x);<NEW_LINE>attrs.setInt(Tag.BitsAllocated, VR.US, p > 8 ? 16 : 8);<NEW_LINE>attrs.setInt(Tag.BitsStored, VR.US, p);<NEW_LINE>attrs.setInt(Tag.HighBit, VR.US, p - 1);<NEW_LINE>attrs.setInt(Tag.PixelRepresentation, VR.US, 0);<NEW_LINE>if (!(sof == JPEG.SOF3 || (sof == JPEG.SOF55 && ss() == 0)))<NEW_LINE>attrs.setString(Tag.LossyImageCompression, VR.CS, "01");<NEW_LINE>return attrs;<NEW_LINE>}
PhotometricInterpretation, VR.CS, "MONOCHROME2");
1,273,066
private boolean processResults(final Results results, final Component component) {<NEW_LINE>try (final QueryManager qm = new QueryManager()) {<NEW_LINE>for (us.springett.vulndbdatamirror.parser.model.Vulnerability vulnDbVuln : (List<us.springett.vulndbdatamirror.parser.model.Vulnerability>) results.getResults()) {<NEW_LINE>Vulnerability vulnerability = qm.getVulnerabilityByVulnId(Vulnerability.Source.VULNDB, String.valueOf(vulnDbVuln.getId()));<NEW_LINE>if (vulnerability == null) {<NEW_LINE>vulnerability = qm.createVulnerability(ModelConverter.convert(qm, vulnDbVuln), false);<NEW_LINE>} else {<NEW_LINE>vulnerability = qm.synchronizeVulnerability(ModelConverter.convert<MASK><NEW_LINE>}<NEW_LINE>NotificationUtil.analyzeNotificationCriteria(qm, vulnerability, component);<NEW_LINE>qm.addVulnerability(vulnerability, component, this.getAnalyzerIdentity());<NEW_LINE>addVulnerabilityToCache(component, vulnerability);<NEW_LINE>}<NEW_LINE>updateAnalysisCacheStats(qm, Vulnerability.Source.VULNDB, TARGET_HOST, component.getCpe(), component.getCacheResult());<NEW_LINE>return results.getPage() * PAGE_SIZE < results.getTotal();<NEW_LINE>}<NEW_LINE>}
(qm, vulnDbVuln), false);
1,683,991
public void fillSector(float cx, float cy, float radiusX, float radiusY, float sweepAngle, int color) {<NEW_LINE>float conjugateAngle = Math.abs(360 - MathUtils<MASK><NEW_LINE>int conjugateCount = Math.round(COUNT_CIRCLE_VERTEX * conjugateAngle / 360);<NEW_LINE>if (conjugateCount == 0) {<NEW_LINE>// It is a circle<NEW_LINE>fillOval(cx, cy, radiusX, radiusY, color);<NEW_LINE>} else if (conjugateCount < COUNT_CIRCLE_VERTEX) {<NEW_LINE>draw(GLES20.GL_TRIANGLE_FAN, OFFSET_FILL_CIRCLE, OFFSET_LAST - OFFSET_FILL_CIRCLE - conjugateCount, cx - radiusX, cy - radiusY, radiusX * 2, radiusY * 2, color, 0f);<NEW_LINE>mCountFillRect++;<NEW_LINE>}<NEW_LINE>}
.positiveModulo(sweepAngle, 360));
1,641,730
public void send(Email email) {<NEW_LINE>if (!portalConfig.isEmailEnabled()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>SMTPTransport t = null;<NEW_LINE>try {<NEW_LINE>Properties prop = System.getProperties();<NEW_LINE>Session session = Session.getInstance(prop, null);<NEW_LINE>Message msg = new MimeMessage(session);<NEW_LINE>msg.setFrom(new InternetAddress(email.getSenderEmailAddress()));<NEW_LINE>msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(email<MASK><NEW_LINE>msg.setSubject(email.getSubject());<NEW_LINE>msg.setDataHandler(new DataHandler(new HTMLDataSource(email.getBody())));<NEW_LINE>String host = portalConfig.emailConfigHost();<NEW_LINE>String user = portalConfig.emailConfigUser();<NEW_LINE>String password = portalConfig.emailConfigPassword();<NEW_LINE>t = (SMTPTransport) session.getTransport("smtp");<NEW_LINE>t.connect(host, user, password);<NEW_LINE>msg.saveChanges();<NEW_LINE>t.sendMessage(msg, msg.getAllRecipients());<NEW_LINE>logger.debug("email response: {}", t.getLastServerResponse());<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error("send email failed.", e);<NEW_LINE>Tracer.logError("send email failed.", e);<NEW_LINE>} finally {<NEW_LINE>if (t != null) {<NEW_LINE>try {<NEW_LINE>t.close();<NEW_LINE>} catch (Exception e) {<NEW_LINE>// nothing<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.getRecipientsString(), false));
705,611
public void attachLoadIconObserver(@NotNull final WebAsyncTree tree) {<NEW_LINE>// Event Dispatch Thread check<NEW_LINE>WebLookAndFeel.checkEventDispatchThread();<NEW_LINE>// Proceed only if icon actually exists<NEW_LINE>final Icon icon = getLoadIcon(new TreeNodeParameters<N, WebAsyncTree<N>>(tree, (N) this));<NEW_LINE>if (icon instanceof ImageIcon) {<NEW_LINE>final ImageIcon imageIcon = (ImageIcon) icon;<NEW_LINE>// Make sure we have broadcast observer in the image icon<NEW_LINE>// This is necessary to ensure all updates are properly preserved<NEW_LINE>final BroadcastImageObserver broadcast;<NEW_LINE>final ImageObserver existing = imageIcon.getImageObserver();<NEW_LINE>if (existing == null) {<NEW_LINE>// Creating new broadcast image observer<NEW_LINE>broadcast = new BroadcastImageObserver();<NEW_LINE>imageIcon.setImageObserver(broadcast);<NEW_LINE>} else if (existing instanceof BroadcastImageObserver) {<NEW_LINE>// Using existing broadcast image observer<NEW_LINE>broadcast = (BroadcastImageObserver) existing;<NEW_LINE>} else {<NEW_LINE>// Creating new broadcast image observer<NEW_LINE>// Adding previously added image observer to broadcast list<NEW_LINE>broadcast = new BroadcastImageObserver();<NEW_LINE>broadcast.addObserver(existing);<NEW_LINE>imageIcon.setImageObserver(broadcast);<NEW_LINE>}<NEW_LINE>// Adding node observer<NEW_LINE>if (observer == null) {<NEW_LINE>observer <MASK><NEW_LINE>}<NEW_LINE>broadcast.addObserver(tree, observer);<NEW_LINE>}<NEW_LINE>}
= new NodeImageObserver(tree, this);
1,826,694
public void deleteCategory() {<NEW_LINE>new MaterialDialog.Builder(this).title(R.string.delete_unused_category_confirmation).content(R.string.delete_category_confirmation).positiveText(R.string.confirm).positiveColorRes(R.color.colorAccent).onPositive((dialog, which) -> {<NEW_LINE>// Changes navigation if actually are shown notes associated with this category<NEW_LINE>String navNotes = getResources().getStringArray(R.array.navigation_list_codes)[0];<NEW_LINE>String navigation = Prefs.getString(PREF_NAVIGATION, navNotes);<NEW_LINE>if (String.valueOf(category.getId()).equals(navigation)) {<NEW_LINE>Prefs.edit().putString(PREF_NAVIGATION, navNotes).apply();<NEW_LINE>}<NEW_LINE>// Removes category and edit notes associated with it<NEW_LINE>DbHelper db = DbHelper.getInstance();<NEW_LINE>db.deleteCategory(category);<NEW_LINE>EventBus.getDefault()<MASK><NEW_LINE>BaseActivity.notifyAppWidgets(OmniNotes.getAppContext());<NEW_LINE>setResult(RESULT_FIRST_USER);<NEW_LINE>finish();<NEW_LINE>}).build().show();<NEW_LINE>}
.post(new CategoriesUpdatedEvent());
958,744
private final /* The common code shared by asSpreader() with the last argument and with the argument at the specified position */<NEW_LINE>MethodHandle asSpreaderCommon(int spreadPosition, Class<?> arrayClass, int spreadCount) throws IllegalArgumentException, WrongMethodTypeException {<NEW_LINE>final int length = type.parameterCount();<NEW_LINE>if (!arrayClass.isArray() || (spreadPosition < 0) || (spreadPosition > length)) {<NEW_LINE>throw new IllegalArgumentException();<NEW_LINE>}<NEW_LINE>if ((spreadCount < 0) || (spreadCount > length)) {<NEW_LINE>throwIllegalArgumentExceptionForMHArgCount();<NEW_LINE>}<NEW_LINE>MethodHandle adapted = this;<NEW_LINE>MethodType collectType;<NEW_LINE>if (0 == spreadCount) {<NEW_LINE>collectType = type.insertParameterTypes(spreadPosition, arrayClass);<NEW_LINE>} else {<NEW_LINE>Class<?<MASK><NEW_LINE>collectType = type.changeParameterType(spreadPosition, arrayClass);<NEW_LINE>if (spreadCount > 1) {
> componentType = arrayClass.getComponentType();
559,864
public ProcessStatus processCheck(final PwmRequest pwmRequest) throws PwmUnrecoverableException {<NEW_LINE>final String ssoOverrideParameterName = pwmRequest.getDomainConfig().readAppProperty(AppProperty.HTTP_PARAM_NAME_SSO_OVERRIDE);<NEW_LINE>if (pwmRequest.hasParameter(ssoOverrideParameterName)) {<NEW_LINE>final String ssoParamValue = pwmRequest.readParameterAsString(ssoOverrideParameterName);<NEW_LINE>if (pwmRequest.readParameterAsBoolean(ssoOverrideParameterName)) {<NEW_LINE>LOGGER.trace(pwmRequest, () -> "enabling sso authentication due to parameter " + ssoOverrideParameterName + "=" + ssoParamValue);<NEW_LINE>pwmRequest.getPwmSession().getLoginInfoBean().removeFlag(LoginInfoBean.LoginFlag.noSso);<NEW_LINE>} else {<NEW_LINE>LOGGER.trace(pwmRequest, () -> <MASK><NEW_LINE>pwmRequest.getPwmSession().getLoginInfoBean().setFlag(LoginInfoBean.LoginFlag.noSso);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return ProcessStatus.Continue;<NEW_LINE>}
"disabling sso authentication due to parameter " + ssoOverrideParameterName + "=" + ssoParamValue);
725,544
private static PGPSignature generateRevocationSignature(PGPSignatureGenerator sGen, Date creationTime, PGPPublicKey masterPublicKey, PGPPrivateKey masterPrivateKey, PGPPublicKey pKey) throws IOException, PGPException, SignatureException {<NEW_LINE>PGPSignatureSubpacketGenerator subHashedPacketsGen = new PGPSignatureSubpacketGenerator();<NEW_LINE>// we use the tag NO_REASON since gnupg does not care about the tag while verifying<NEW_LINE>// signatures with a revoked key, the warning is the same<NEW_LINE>subHashedPacketsGen.setRevocationReason(true, RevocationReasonTags.NO_REASON, "");<NEW_LINE>subHashedPacketsGen.setSignatureCreationTime(true, creationTime);<NEW_LINE>sGen.<MASK><NEW_LINE>// Generate key revocation or subkey revocation, depending on master/subkey-ness<NEW_LINE>if (masterPublicKey.getKeyID() == pKey.getKeyID()) {<NEW_LINE>sGen.init(PGPSignature.KEY_REVOCATION, masterPrivateKey);<NEW_LINE>return sGen.generateCertification(masterPublicKey);<NEW_LINE>} else {<NEW_LINE>sGen.init(PGPSignature.SUBKEY_REVOCATION, masterPrivateKey);<NEW_LINE>return sGen.generateCertification(masterPublicKey, pKey);<NEW_LINE>}<NEW_LINE>}
setHashedSubpackets(subHashedPacketsGen.generate());
1,374,698
protected V filterSingleObject(V featureVector) {<NEW_LINE>// generic casts here are not safe, but will do:<NEW_LINE>Norm<? super V> norm = this.norm;<NEW_LINE>if (featureVector instanceof SparseNumberVector) {<NEW_LINE>// Special override, as it will be easily used inefficiently otherwise<NEW_LINE>if (EuclideanDistance.STATIC.equals(norm)) {<NEW_LINE>norm = (Norm<? super V>) SparseEuclideanDistance.STATIC;<NEW_LINE>} else if (ManhattanDistance.STATIC.equals(norm)) {<NEW_LINE>norm = (Norm<? super V>) SparseManhattanDistance.STATIC;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final double d = norm.norm(featureVector);<NEW_LINE>final double factor = d > 0 ? 1 / d : 1.;<NEW_LINE>// Optimized codepath when converting sparse vectors<NEW_LINE>if (featureVector instanceof SparseNumberVector && factory instanceof SparseNumberVector.Factory) {<NEW_LINE>SparseNumberVector fv = (SparseNumberVector) featureVector;<NEW_LINE>SparseNumberVector.Factory<?> sfact = (SparseNumberVector.Factory<?>) factory;<NEW_LINE>if (map == null) {<NEW_LINE>map = new Int2DoubleOpenHashMap();<NEW_LINE>}<NEW_LINE>map.clear();<NEW_LINE>for (int j = fv.iter(); fv.iterValid(j); j = fv.iterAdvance(j)) {<NEW_LINE>map.put(fv.iterDim(j), fv<MASK><NEW_LINE>}<NEW_LINE>return (V) sfact.newNumberVector(map, fv.getDimensionality());<NEW_LINE>}<NEW_LINE>return factory.newNumberVector(VMath.timesEquals(featureVector.toArray(), factor));<NEW_LINE>}
.iterDoubleValue(j) * factor);
1,754,261
private static Map<TypeAlias, NativeType> buildTypeMap() {<NEW_LINE>Map<TypeAlias, NativeType> m = new EnumMap<TypeAlias<MASK><NEW_LINE>m.put(TypeAlias.int8_t, NativeType.SCHAR);<NEW_LINE>m.put(TypeAlias.u_int8_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.int16_t, NativeType.SSHORT);<NEW_LINE>m.put(TypeAlias.u_int16_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.int32_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.u_int32_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.int64_t, NativeType.SLONGLONG);<NEW_LINE>m.put(TypeAlias.u_int64_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.intptr_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.uintptr_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.caddr_t, NativeType.ADDRESS);<NEW_LINE>m.put(TypeAlias.dev_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.blkcnt_t, NativeType.SLONGLONG);<NEW_LINE>m.put(TypeAlias.blksize_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.gid_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.in_addr_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.in_port_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.ino_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.ino64_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.key_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.mode_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.nlink_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.id_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.pid_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.off_t, NativeType.SLONGLONG);<NEW_LINE>m.put(TypeAlias.swblk_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.uid_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.clock_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.size_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.ssize_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.time_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.fsblkcnt_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.fsfilcnt_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.sa_family_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.socklen_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.rlim_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.cc_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.speed_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.tcflag_t, NativeType.UINT);<NEW_LINE>return m;<NEW_LINE>}
, NativeType>(TypeAlias.class);
659,621
protected void writeArchiveInfoPart(String boundary, CrawlURI curi, ReplayInputStream ris, OutputStream out) throws IOException {<NEW_LINE>// Get things we need to write in this part<NEW_LINE>String uri = curi.toString();<NEW_LINE>String ip = getHostAddress(curi);<NEW_LINE>long headerLength = ris.getHeaderSize();<NEW_LINE>long contentLength = ris.getContentSize();<NEW_LINE>// Fetchtime in seconds<NEW_LINE>long archiveTime <MASK><NEW_LINE>int statusCode = curi.getFetchStatus();<NEW_LINE>String headerMd5 = null;<NEW_LINE>Object contentMd5 = null;<NEW_LINE>// Get headerMd5<NEW_LINE>ByteArrayOutputStream baos = new ByteArrayOutputStream();<NEW_LINE>ris.readHeaderTo(baos);<NEW_LINE>headerMd5 = stringToMD5(baos.toString());<NEW_LINE>// Get contentMd5<NEW_LINE>contentMd5 = curi.getContentDigest();<NEW_LINE>if (contentMd5 != null)<NEW_LINE>contentMd5 = getHexString((byte[]) contentMd5);<NEW_LINE>StringBuffer buffer = new StringBuffer();<NEW_LINE>buffer.append("MIME-version: 1.1" + LF);<NEW_LINE>buffer.append("Content-Type: multipart/mixed; boundary=" + boundary + LF);<NEW_LINE>buffer.append("HTTP-Part: ArchiveInfo" + LF);<NEW_LINE>buffer.append(COLLECTION_KEY + COLON + WS + this.collection + LF);<NEW_LINE>buffer.append(HARVESTER_KEY + COLON + WS + this.harvester + LF);<NEW_LINE>buffer.append(URL_KEY + COLON + WS + uri + LF);<NEW_LINE>buffer.append(IP_ADDRESS_KEY + COLON + WS + ip + LF);<NEW_LINE>buffer.append(HEADER_LENGTH_KEY + COLON + WS + headerLength + LF);<NEW_LINE>buffer.append(HEADER_MD5_KEY + COLON + WS + headerMd5 + LF);<NEW_LINE>buffer.append(CONTENT_LENGTH_KEY + COLON + WS + contentLength + LF);<NEW_LINE>buffer.append(CONTENT_MD5_KEY + COLON + WS + contentMd5 + LF);<NEW_LINE>buffer.append(ARCHIVE_TIME_KEY + COLON + WS + archiveTime + LF);<NEW_LINE>buffer.append(STATUS_CODE_KEY + COLON + WS + statusCode + LF + LF);<NEW_LINE>out.write(buffer.toString().getBytes());<NEW_LINE>}
= System.currentTimeMillis() / 1000;
1,071,384
public static void main(String[] args) {<NEW_LINE>Exercise48_DisjointPaths disjointPaths = new Exercise48_DisjointPaths();<NEW_LINE>Graph graph1 = new Graph(5);<NEW_LINE>graph1.addEdge(0, 1);<NEW_LINE>graph1.addEdge(0, 2);<NEW_LINE>graph1.addEdge(0, 3);<NEW_LINE>graph1.addEdge(1, 4);<NEW_LINE>graph1.addEdge(2, 4);<NEW_LINE>graph1.addEdge(3, 4);<NEW_LINE>int numberOfDisjointPaths1 = disjointPaths.<MASK><NEW_LINE>StdOut.println("Number of disjoint paths 1: " + numberOfDisjointPaths1 + " Expected: 3");<NEW_LINE>int numberOfDisjointPaths2 = disjointPaths.geNumberOfDisjointPaths(graph1, 4, 0);<NEW_LINE>StdOut.println("Number of disjoint paths 2: " + numberOfDisjointPaths2 + " Expected: 3");<NEW_LINE>int numberOfDisjointPaths3 = disjointPaths.geNumberOfDisjointPaths(graph1, 1, 4);<NEW_LINE>StdOut.println("Number of disjoint paths 3: " + numberOfDisjointPaths3 + " Expected: 2");<NEW_LINE>Graph graph2 = new Graph(5);<NEW_LINE>graph2.addEdge(0, 1);<NEW_LINE>graph2.addEdge(0, 2);<NEW_LINE>graph2.addEdge(0, 3);<NEW_LINE>graph2.addEdge(1, 4);<NEW_LINE>graph2.addEdge(2, 1);<NEW_LINE>graph2.addEdge(3, 4);<NEW_LINE>int numberOfDisjointPaths4 = disjointPaths.geNumberOfDisjointPaths(graph2, 0, 4);<NEW_LINE>StdOut.println("Number of disjoint paths 4: " + numberOfDisjointPaths4 + " Expected: 2");<NEW_LINE>int numberOfDisjointPaths5 = disjointPaths.geNumberOfDisjointPaths(graph2, 4, 0);<NEW_LINE>StdOut.println("Number of disjoint paths 5: " + numberOfDisjointPaths5 + " Expected: 2");<NEW_LINE>}
geNumberOfDisjointPaths(graph1, 0, 4);
1,409,160
public InstanceSnapshotInfo unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>InstanceSnapshotInfo instanceSnapshotInfo = new InstanceSnapshotInfo();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("fromBundleId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>instanceSnapshotInfo.setFromBundleId(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("fromBlueprintId", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>instanceSnapshotInfo.setFromBlueprintId(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("fromDiskInfo", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>instanceSnapshotInfo.setFromDiskInfo(new ListUnmarshaller<DiskInfo>(DiskInfoJsonUnmarshaller.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 instanceSnapshotInfo;<NEW_LINE>}
class).unmarshall(context));
378,356
public void recordProceed(String target, String method) throws CompileError {<NEW_LINE>Parser p = new Parser(new Lex(target));<NEW_LINE>final ASTree texpr = p.parseExpression(stable);<NEW_LINE>final String m = method;<NEW_LINE>ProceedHandler h = new ProceedHandler() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void doit(JvstCodeGen gen, Bytecode b, ASTList args) throws CompileError {<NEW_LINE>ASTree expr = new Member(m);<NEW_LINE>if (texpr != null)<NEW_LINE>expr = Expr.make('.', texpr, expr);<NEW_LINE>expr = <MASK><NEW_LINE>gen.compileExpr(expr);<NEW_LINE>gen.addNullIfVoid();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void setReturnType(JvstTypeChecker check, ASTList args) throws CompileError {<NEW_LINE>ASTree expr = new Member(m);<NEW_LINE>if (texpr != null)<NEW_LINE>expr = Expr.make('.', texpr, expr);<NEW_LINE>expr = CallExpr.makeCall(expr, args);<NEW_LINE>expr.accept(check);<NEW_LINE>check.addNullIfVoid();<NEW_LINE>}<NEW_LINE>};<NEW_LINE>gen.setProceedHandler(h, proceedName);<NEW_LINE>}
CallExpr.makeCall(expr, args);
845,224
public // optional, can get from cookie instead<NEW_LINE>// optional, can get from cookie instead<NEW_LINE>Response // optional, can get from cookie instead<NEW_LINE>resetCredentialsGET(@QueryParam(AUTH_SESSION_ID) String authSessionId, @QueryParam(SESSION_CODE) String code, @QueryParam(Constants.EXECUTION) String execution, @QueryParam(Constants.CLIENT_ID) String clientId, @QueryParam(Constants.TAB_ID) String tabId) {<NEW_LINE>ClientModel client = realm.getClientByClientId(clientId);<NEW_LINE>AuthenticationSessionModel authSession = new AuthenticationSessionManager(session).getCurrentAuthenticationSession(realm, client, tabId);<NEW_LINE>processLocaleParam(authSession);<NEW_LINE>// we allow applications to link to reset credentials without going through OAuth or SAML handshakes<NEW_LINE>if (authSession == null && code == null) {<NEW_LINE>if (!realm.isResetPasswordAllowed()) {<NEW_LINE>event.event(EventType.RESET_PASSWORD);<NEW_LINE>event.error(Errors.NOT_ALLOWED);<NEW_LINE>return ErrorPage.error(session, null, Response.Status.BAD_REQUEST, Messages.RESET_CREDENTIAL_NOT_ALLOWED);<NEW_LINE>}<NEW_LINE>authSession = createAuthenticationSessionForClient(clientId);<NEW_LINE>return processResetCredentials(false, null, authSession, null);<NEW_LINE>}<NEW_LINE>event.event(EventType.RESET_PASSWORD);<NEW_LINE>return resetCredentials(authSessionId, <MASK><NEW_LINE>}
code, execution, clientId, tabId);
1,662,648
public InetAddress[] lookupAllHostAddr(String host) throws UnknownHostException {<NEW_LINE>Name name;<NEW_LINE>try {<NEW_LINE>name = new Name(host);<NEW_LINE>} catch (TextParseException e) {<NEW_LINE>throw new UnknownHostException(host);<NEW_LINE>}<NEW_LINE>// avoid asking a dns server (causing a probable timeout) when host is the name of the local<NEW_LINE>// host<NEW_LINE>if (addressesLoaded) {<NEW_LINE>if (name.equals(localhostName)) {<NEW_LINE>return localhostNamedAddresses;<NEW_LINE>} else if ("localhost".equalsIgnoreCase(host)) {<NEW_LINE>return localhostAddresses;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Record[] records = null;<NEW_LINE>if (preferV6) {<NEW_LINE>records = new Lookup(name, Type.AAAA).run();<NEW_LINE>}<NEW_LINE>if (records == null) {<NEW_LINE>records = new Lookup(name, Type.A).run();<NEW_LINE>}<NEW_LINE>if (records == null && !preferV6) {<NEW_LINE>records = new Lookup(name, Type.AAAA).run();<NEW_LINE>}<NEW_LINE>if (records == null) {<NEW_LINE>throw new UnknownHostException(host);<NEW_LINE>}<NEW_LINE>InetAddress[] array <MASK><NEW_LINE>for (int i = 0; i < records.length; i++) {<NEW_LINE>if (records[i] instanceof ARecord) {<NEW_LINE>ARecord a = (ARecord) records[i];<NEW_LINE>array[i] = a.getAddress();<NEW_LINE>} else {<NEW_LINE>AAAARecord aaaa = (AAAARecord) records[i];<NEW_LINE>array[i] = aaaa.getAddress();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return array;<NEW_LINE>}
= new InetAddress[records.length];