idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,490,661
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {<NEW_LINE>final String operation = req.getParameter("operation");<NEW_LINE>final String clientId = req.getParameter("clientId");<NEW_LINE>final String subject = req.getParameter("subject");<NEW_LINE>final String consumerGroup = req.getParameter("consumerGroup");<NEW_LINE>final OnOfflineState state = getOnOfflineState(req.getParameter("state"));<NEW_LINE>resp.setStatus(HttpServletResponse.SC_OK);<NEW_LINE>resp.setHeader("Content-Type", "application/json");<NEW_LINE>PrintWriter out = resp.getWriter();<NEW_LINE>if (Strings.isNullOrEmpty(operation) || Strings.isNullOrEmpty(clientId) || Strings.isNullOrEmpty(subject) || Strings.isNullOrEmpty(consumerGroup) || state == null) {<NEW_LINE>out.println(MAPPER.writeValueAsString(new JsonResult<>(ResultStatus.<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ClientOfflineState clientState = new ClientOfflineState();<NEW_LINE>clientState.setClientId(clientId);<NEW_LINE>clientState.setSubject(subject);<NEW_LINE>clientState.setConsumerGroup(consumerGroup);<NEW_LINE>clientState.setState(state);<NEW_LINE>try {<NEW_LINE>if ("update".equals(operation)) {<NEW_LINE>offlineStateManager.insertOrUpdate(clientState);<NEW_LINE>out.println(MAPPER.writeValueAsString(new JsonResult<Boolean>(ResultStatus.OK, "ok", null)));<NEW_LINE>} else if ("query".equals(operation)) {<NEW_LINE>offlineStateManager.queryClientState(clientState);<NEW_LINE>out.println(MAPPER.writeValueAsString(new JsonResult<Boolean>(ResultStatus.OK, clientState.getState().toString(), null)));<NEW_LINE>} else {<NEW_LINE>out.println(MAPPER.writeValueAsString(new JsonResult<Boolean>(ResultStatus.SYSTEM_ERROR, "unsupport: " + operation, null)));<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOGGER.error("onoffline exception. {}", clientState, e);<NEW_LINE>out.println(MAPPER.writeValueAsString(new JsonResult<Boolean>(ResultStatus.SYSTEM_ERROR, e.getClass().getCanonicalName() + ": " + e.getMessage(), null)));<NEW_LINE>}<NEW_LINE>}
SYSTEM_ERROR, "invalid parameter", null)));
672,083
// Convenience method so you can run it in your IDE<NEW_LINE>public static void main(String[] args) {<NEW_LINE>PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>();<NEW_LINE>postgres.start();<NEW_LINE>PgConnectOptions options = new PgConnectOptions().setPort(postgres.getMappedPort(5432)).setHost(postgres.getContainerIpAddress()).setDatabase(postgres.getDatabaseName()).setUser(postgres.getUsername()).setPassword(postgres.getPassword());<NEW_LINE>// Uncomment for MySQL<NEW_LINE>// MySQLContainer<?> mysql = new MySQLContainer<>();<NEW_LINE>// mysql.start();<NEW_LINE>// MySQLConnectOptions options = new MySQLConnectOptions()<NEW_LINE>// .setPort(mysql.getMappedPort(3306))<NEW_LINE>// .setHost(mysql.getContainerIpAddress())<NEW_LINE>// .setDatabase(mysql.getDatabaseName())<NEW_LINE>// .setUser(mysql.getUsername())<NEW_LINE>// .setPassword(mysql.getPassword());<NEW_LINE><MASK><NEW_LINE>vertx.deployVerticle(new SqlClientExample(options));<NEW_LINE>}
Vertx vertx = Vertx.vertx();
897,988
private Map<String, TestClasspath> computeTestingClassPaths(ModuleList ml, PropertyEvaluator evaluator, Set<String> extraTestTypes) {<NEW_LINE>Map<String, TestClasspath> classpaths = new HashMap<String, TestClasspath>();<NEW_LINE>ProjectXMLManager pxm = new ProjectXMLManager(project);<NEW_LINE>Map<String, Set<TestModuleDependency>> testDependencies = pxm.getTestDependencies(ml);<NEW_LINE>// NOI18N<NEW_LINE>String testDistDir = evaluator.getProperty("test.dist.dir");<NEW_LINE>if (testDistDir == null) {<NEW_LINE>NbModuleType type = project.getModuleType();<NEW_LINE>if (type == NbModuleType.NETBEANS_ORG) {<NEW_LINE>// test.dist.dir = ${nb_all}/nbbuild/build/testdist<NEW_LINE>// NOI18N<NEW_LINE>String <MASK><NEW_LINE>// NOI18N<NEW_LINE>testDistDir = nball + File.separatorChar + "nbbuild" + File.separatorChar + "build" + File.separatorChar + "testdist";<NEW_LINE>} else if (type == NbModuleType.SUITE_COMPONENT) {<NEW_LINE>// test.dist.dir = ${suite.build.dir}/testdist<NEW_LINE>// NOI18N<NEW_LINE>String suiteDir = evaluator.getProperty("suite.build.dir");<NEW_LINE>// NOI18N<NEW_LINE>testDistDir = suiteDir + File.separatorChar + "testdist";<NEW_LINE>} else {<NEW_LINE>// standalone module<NEW_LINE>// test.dist.dir = ${build.dir}/testdist<NEW_LINE>// NOI18N<NEW_LINE>String moduleDir = evaluator.getProperty("build.dir");<NEW_LINE>// NOI18N<NEW_LINE>testDistDir = moduleDir + File.separatorChar + "testdist";<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (Map.Entry<String, Set<TestModuleDependency>> entry : testDependencies.entrySet()) {<NEW_LINE>computeTestType(entry.getKey(), new File(testDistDir), entry.getValue(), classpaths, ml);<NEW_LINE>}<NEW_LINE>for (String testType : extraTestTypes) {<NEW_LINE>if (!testDependencies.containsKey(testType)) {<NEW_LINE>// No declared dependencies of this type, so will definitely need to add in compatibility libraries.<NEW_LINE>computeTestType(testType, new File(testDistDir), Collections.<TestModuleDependency>emptySet(), classpaths, ml);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return classpaths;<NEW_LINE>}
nball = evaluator.getProperty("nb_all");
1,228,859
public Collection<S> readCollection(final Local file) throws AccessDeniedException {<NEW_LINE>if (!file.exists()) {<NEW_LINE>throw new LocalAccessDeniedException(file.getAbsolute());<NEW_LINE>}<NEW_LINE>final Collection<S> c = new Collection<S>();<NEW_LINE>NSArray list = NSArray.arrayWithContentsOfFile(file.getAbsolute());<NEW_LINE>if (null == list) {<NEW_LINE>log.error(String.format("Invalid bookmark file %s", file));<NEW_LINE>return c;<NEW_LINE>}<NEW_LINE>final NSEnumerator i = list.objectEnumerator();<NEW_LINE>NSObject next;<NEW_LINE>while ((next = i.nextObject()) != null) {<NEW_LINE>if (next.isKindOfClass(NSDictionary.CLASS)) {<NEW_LINE>final NSDictionary dict = Rococoa.cast(next, NSDictionary.class);<NEW_LINE>final S <MASK><NEW_LINE>if (null == object) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>c.add(object);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return c;<NEW_LINE>}
object = this.deserialize(dict);
1,762,173
final UnsubscribeFromEventResult executeUnsubscribeFromEvent(UnsubscribeFromEventRequest unsubscribeFromEventRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(unsubscribeFromEventRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UnsubscribeFromEventRequest> request = null;<NEW_LINE>Response<UnsubscribeFromEventResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UnsubscribeFromEventRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(unsubscribeFromEventRequest));<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, "Inspector");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UnsubscribeFromEvent");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UnsubscribeFromEventResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UnsubscribeFromEventResultJsonUnmarshaller());<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);
728,205
public static OpenOrders adaptOpenOrders(CurrencyPair currencyPair, Bl3pOpenOrders.Bl3pOpenOrder[] bl3pOrders) {<NEW_LINE>List<LimitOrder> result = new ArrayList<>(bl3pOrders.length);<NEW_LINE>for (Bl3pOpenOrders.Bl3pOpenOrder bl3pOrder : bl3pOrders) {<NEW_LINE>Order.OrderType orderType = Bl3pUtils.fromBl3pOrderType(bl3pOrder.getStatus());<NEW_LINE>BigDecimal limitPrice = bl3pOrder.getPrice().value;<NEW_LINE>BigDecimal originalAmount = bl3pOrder.getAmountFunds().value;<NEW_LINE>BigDecimal executedAmount = bl3pOrder.getAmountExecuted().value;<NEW_LINE>BigDecimal <MASK><NEW_LINE>result.add(new LimitOrder.Builder(orderType, currencyPair).cumulativeAmount(executedAmount).id("" + bl3pOrder.getOrderId()).limitPrice(limitPrice).originalAmount(originalAmount).remainingAmount(remainingAmount).timestamp(bl3pOrder.getTimestamp()).build());<NEW_LINE>}<NEW_LINE>return new OpenOrders(result);<NEW_LINE>}
remainingAmount = originalAmount.subtract(executedAmount);
1,452,569
public static void addFileSliceCommonMetrics(List<FileSlice> fileSlices, Map<String, Double> metrics, long defaultBaseFileSize) {<NEW_LINE>int numLogFiles = 0;<NEW_LINE>long totalLogFileSize = 0;<NEW_LINE>long totalIORead = 0;<NEW_LINE>long totalIOWrite = 0;<NEW_LINE>long totalIO = 0;<NEW_LINE>for (FileSlice slice : fileSlices) {<NEW_LINE>numLogFiles += slice.getLogFiles().count();<NEW_LINE>// Total size of all the log files<NEW_LINE>totalLogFileSize += slice.getLogFiles().map(HoodieLogFile::getFileSize).filter(size -> size >= 0).reduce(Long::sum).orElse(0L);<NEW_LINE>long baseFileSize = slice.getBaseFile().isPresent() ? slice.getBaseFile().get().getFileSize() : 0L;<NEW_LINE>totalIORead += baseFileSize;<NEW_LINE>// Total write will be similar to the size of the base file<NEW_LINE>totalIOWrite += baseFileSize > 0 ? baseFileSize : defaultBaseFileSize;<NEW_LINE>}<NEW_LINE>// Total read will be the base file + all the log files<NEW_LINE>totalIORead = FSUtils.getSizeInMB(totalIORead + totalLogFileSize);<NEW_LINE><MASK><NEW_LINE>// Total IO will be the IO for read + write<NEW_LINE>totalIO = totalIORead + totalIOWrite;<NEW_LINE>metrics.put(TOTAL_IO_READ_MB, (double) totalIORead);<NEW_LINE>metrics.put(TOTAL_IO_WRITE_MB, (double) totalIOWrite);<NEW_LINE>metrics.put(TOTAL_IO_MB, (double) totalIO);<NEW_LINE>metrics.put(TOTAL_LOG_FILE_SIZE, (double) totalLogFileSize);<NEW_LINE>metrics.put(TOTAL_LOG_FILES, (double) numLogFiles);<NEW_LINE>}
totalIOWrite = FSUtils.getSizeInMB(totalIOWrite);
920,783
public Dialog createDialog(Activity activity, Bundle args) {<NEW_LINE>AlertDialog.Builder builder = new AlertDialog.Builder(mapActivity);<NEW_LINE>builder.<MASK><NEW_LINE>LinearLayout ll = new LinearLayout(activity);<NEW_LINE>final ListView lv = new ListView(activity);<NEW_LINE>final int dp24 = AndroidUtils.dpToPx(mapActivity, 24f);<NEW_LINE>final int dp12 = AndroidUtils.dpToPx(mapActivity, 12f);<NEW_LINE>final int dp8 = AndroidUtils.dpToPx(mapActivity, 8f);<NEW_LINE>lv.setPadding(0, dp8, 0, dp8);<NEW_LINE>final AppCompatCheckBox cb = new AppCompatCheckBox(activity);<NEW_LINE>cb.setText(R.string.shared_string_remember_my_choice);<NEW_LINE>LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);<NEW_LINE>AndroidUtils.setMargins(lp, dp24, dp8, dp8, dp24);<NEW_LINE>cb.setLayoutParams(lp);<NEW_LINE>cb.setPadding(dp8, 0, 0, 0);<NEW_LINE>int textColorPrimary = ColorUtilities.getPrimaryTextColor(activity, isNightMode());<NEW_LINE>int selectedModeColor = getSettings().getApplicationMode().getProfileColor(isNightMode());<NEW_LINE>cb.setTextColor(textColorPrimary);<NEW_LINE>UiUtilities.setupCompoundButton(isNightMode(), selectedModeColor, cb);<NEW_LINE>final int layout = R.layout.list_menu_item_native;<NEW_LINE>final ArrayAdapter<GpsStatusApps> adapter = new ArrayAdapter<GpsStatusApps>(mapActivity, layout, GpsStatusApps.values()) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public View getView(int position, View convertView, ViewGroup parent) {<NEW_LINE>View v = mapActivity.getLayoutInflater().inflate(layout, null);<NEW_LINE>TextView tv = (TextView) v.findViewById(R.id.title);<NEW_LINE>tv.setPadding(dp12, 0, dp24, 0);<NEW_LINE>tv.setText(getItem(position).stringRes);<NEW_LINE>v.findViewById(R.id.toggle_item).setVisibility(View.INVISIBLE);<NEW_LINE>return v;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>lv.setAdapter(adapter);<NEW_LINE>ll.setOrientation(LinearLayout.VERTICAL);<NEW_LINE>ll.addView(lv);<NEW_LINE>ll.addView(cb);<NEW_LINE>final AlertDialog dlg = builder.create();<NEW_LINE>lv.setOnItemClickListener(new OnItemClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onItemClick(AdapterView<?> parent, View view, int position, long id) {<NEW_LINE>boolean remember = cb.isChecked();<NEW_LINE>GpsStatusApps item = adapter.getItem(position);<NEW_LINE>if (remember) {<NEW_LINE>getSettings().GPS_STATUS_APP.set(item.appName);<NEW_LINE>}<NEW_LINE>dlg.dismiss();<NEW_LINE>runChosenGPSStatus(item);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>dlg.setView(ll);<NEW_LINE>return dlg;<NEW_LINE>}
setTitle(R.string.gps_status);
456,638
/* (non-Javadoc)<NEW_LINE>* @see org.eclipse.jdt.ls.core.internal.managers.IProjectImporter#importToWorkspace(org.eclipse.core.runtime.IProgressMonitor)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void importToWorkspace(IProgressMonitor monitor) throws CoreException {<NEW_LINE>if (!applies(monitor)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int projectSize = directories.size();<NEW_LINE>SubMonitor subMonitor = SubMonitor.convert(monitor, projectSize + 1);<NEW_LINE>subMonitor.setTaskName(IMPORTING_GRADLE_PROJECTS);<NEW_LINE>JavaLanguageServerPlugin.logInfo(IMPORTING_GRADLE_PROJECTS);<NEW_LINE>subMonitor.worked(1);<NEW_LINE>MultiStatus compatibilityStatus = new MultiStatus(IConstants.PLUGIN_ID, -1, "Compatibility issue occurs when importing Gradle projects", null);<NEW_LINE>for (Path directory : directories) {<NEW_LINE>IStatus importStatus = importDir(directory, subMonitor.newChild(1));<NEW_LINE>if (isFailedStatus(importStatus) && importStatus instanceof GradleCompatibilityStatus) {<NEW_LINE>compatibilityStatus.add(importStatus);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// store the digest for the imported gradle projects.<NEW_LINE>ProjectUtils.getGradleProjects().forEach(project -> {<NEW_LINE>File buildFile = project.getFile(BUILD_GRADLE_DESCRIPTOR).getLocation().toFile();<NEW_LINE>File settingsFile = project.getFile(SETTINGS_GRADLE_DESCRIPTOR).getLocation().toFile();<NEW_LINE>File buildKtsFile = project.getFile(BUILD_GRADLE_KTS_DESCRIPTOR).getLocation().toFile();<NEW_LINE>File settingsKtsFile = project.getFile(SETTINGS_GRADLE_KTS_DESCRIPTOR).getLocation().toFile();<NEW_LINE>try {<NEW_LINE>if (buildFile.exists()) {<NEW_LINE>JavaLanguageServerPlugin.getDigestStore().updateDigest(buildFile.toPath());<NEW_LINE>} else if (buildKtsFile.exists()) {<NEW_LINE>JavaLanguageServerPlugin.getDigestStore().updateDigest(buildKtsFile.toPath());<NEW_LINE>}<NEW_LINE>if (settingsFile.exists()) {<NEW_LINE>JavaLanguageServerPlugin.getDigestStore().updateDigest(settingsFile.toPath());<NEW_LINE>} else if (settingsKtsFile.exists()) {<NEW_LINE>JavaLanguageServerPlugin.getDigestStore().updateDigest(settingsKtsFile.toPath());<NEW_LINE>}<NEW_LINE>} catch (CoreException e) {<NEW_LINE>JavaLanguageServerPlugin.logException("Failed to update digest for gradle build file", e);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>for (IProject gradleProject : ProjectUtils.getGradleProjects()) {<NEW_LINE>gradleProject.deleteMarkers(COMPATIBILITY_MARKER_ID, true, IResource.DEPTH_ZERO);<NEW_LINE>}<NEW_LINE>for (IStatus status : compatibilityStatus.getChildren()) {<NEW_LINE>// only report first compatibility issue<NEW_LINE>GradleCompatibilityStatus gradleStatus = ((GradleCompatibilityStatus) status);<NEW_LINE>for (IProject gradleProject : ProjectUtils.getGradleProjects()) {<NEW_LINE>if (URIUtil.sameURI(URI.create(JDTUtils.getFileURI(gradleProject)), URI.create(gradleStatus.getProjectUri()))) {<NEW_LINE>ResourceUtils.createErrorMarker(gradleProject, gradleStatus, COMPATIBILITY_MARKER_ID);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>GradleCompatibilityInfo info = new GradleCompatibilityInfo(gradleStatus.getProjectUri(), gradleStatus.getMessage(), gradleStatus.getHighestJavaVersion(), GradleCompatibilityChecker.CURRENT_GRADLE);<NEW_LINE>EventNotification notification = new EventNotification().withType(EventType.IncompatibleGradleJdkIssue).withData(info);<NEW_LINE>JavaLanguageServerPlugin.getProjectsManager().<MASK><NEW_LINE>break;<NEW_LINE>}<NEW_LINE>subMonitor.done();<NEW_LINE>}
getConnection().sendEventNotification(notification);
785,865
/*<NEW_LINE>* Reading configuration values from the env variables, if a value was not provided it falls back to defaults.<NEW_LINE>*/<NEW_LINE>@VisibleForTesting<NEW_LINE>public static void readConfigurationFromEnvVariables() {<NEW_LINE>int sWidth = env.getIntEnvVariable(<MASK><NEW_LINE>int sHeight = env.getIntEnvVariable(ZALENIUM_SCREEN_HEIGHT, DEFAULT_SCREEN_SIZE.getHeight());<NEW_LINE>setConfiguredScreenSize(new Dimension(sWidth, sHeight));<NEW_LINE>String tz = env.getStringEnvVariable(ZALENIUM_TZ, DEFAULT_TZ.getID());<NEW_LINE>setConfiguredTimeZone(tz);<NEW_LINE>String containerN = env.getStringEnvVariable(ZALENIUM_CONTAINER_NAME, DEFAULT_ZALENIUM_CONTAINER_NAME);<NEW_LINE>setContainerName(containerN);<NEW_LINE>String seleniumImageName = env.getStringEnvVariable(ZALENIUM_SELENIUM_IMAGE_NAME, DEFAULT_DOCKER_SELENIUM_IMAGE);<NEW_LINE>setDockerSeleniumImageName(seleniumImageName);<NEW_LINE>String seleniumNodeParams = env.getStringEnvVariable(SELENIUM_NODE_PARAMS, DEFAULT_SELENIUM_NODE_PARAMS);<NEW_LINE>setSeleniumNodeParameters(seleniumNodeParams);<NEW_LINE>String seleniumNodeHost = env.getStringEnvVariable(SELENIUM_NODE_HOST, DEFAULT_SELENIUM_NODE_HOST);<NEW_LINE>setSeleniumNodeHost(seleniumNodeHost);<NEW_LINE>setBrowserTimeout(env.getIntEnvVariable("SEL_BROWSER_TIMEOUT_SECS", DEFAULT_SEL_BROWSER_TIMEOUT_SECS));<NEW_LINE>sendAnonymousUsageInfo = env.getBooleanEnvVariable("ZALENIUM_SEND_ANONYMOUS_USAGE_INFO", false);<NEW_LINE>addProxyVars();<NEW_LINE>}
ZALENIUM_SCREEN_WIDTH, DEFAULT_SCREEN_SIZE.getWidth());
452,441
final UpdateTrustResult executeUpdateTrust(UpdateTrustRequest updateTrustRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateTrustRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<UpdateTrustRequest> request = null;<NEW_LINE>Response<UpdateTrustResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateTrustRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateTrustRequest));<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, "Directory Service");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateTrust");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateTrustResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateTrustResultJsonUnmarshaller());<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);
688,526
public boolean uninstallApkFromDevice(String packageName, boolean keepData) {<NEW_LINE>String name = getNameForDisplay();<NEW_LINE>PrintStream stdOut = console.getStdOut();<NEW_LINE>stdOut.printf("Removing apk from %s.\n", name);<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>String reason = deviceUninstallPackage(packageName, keepData);<NEW_LINE>long end = System.currentTimeMillis();<NEW_LINE>if (reason != null) {<NEW_LINE>console.printBuildFailure(String.format("Failed to uninstall apk from %s: %s.", name, reason));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>long delta = end - start;<NEW_LINE>stdOut.printf("Uninstalled apk from %s in %d.%03ds.\n", name, delta / 1000, delta % 1000);<NEW_LINE>return true;<NEW_LINE>} catch (InstallException ex) {<NEW_LINE>console.printBuildFailure(String.format("Failed to uninstall apk from %s.", name));<NEW_LINE>ex.printStackTrace(console.getStdErr());<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
long start = System.currentTimeMillis();
1,230,678
public DeviceStatusInfo unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DeviceStatusInfo deviceStatusInfo = new DeviceStatusInfo();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("DeviceStatusDetails", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>deviceStatusInfo.setDeviceStatusDetails(new ListUnmarshaller<DeviceStatusDetail>(DeviceStatusDetailJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("ConnectionStatus", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>deviceStatusInfo.setConnectionStatus(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("ConnectionStatusUpdatedTime", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>deviceStatusInfo.setConnectionStatusUpdatedTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").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 deviceStatusInfo;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,089,152
private String resolveResourceTypeName(ConversionEnvironment environment, CfnResourceTrait resourceTrait) {<NEW_LINE>CfnConfig config <MASK><NEW_LINE>ServiceShape serviceShape = environment.context.getModel().expectShape(config.getService(), ServiceShape.class);<NEW_LINE>Optional<ServiceTrait> serviceTrait = serviceShape.getTrait(ServiceTrait.class);<NEW_LINE>String organizationName = config.getOrganizationName();<NEW_LINE>if (organizationName == null) {<NEW_LINE>// Services utilizing the AWS service trait default to being in the<NEW_LINE>// "AWS" organization instead of requiring the configuration value.<NEW_LINE>organizationName = serviceTrait.map(t -> "AWS").orElseThrow(() -> new CfnException("cloudformation is missing required property, `organizationName`"));<NEW_LINE>}<NEW_LINE>String serviceName = config.getServiceName();<NEW_LINE>if (serviceName == null) {<NEW_LINE>// Services utilizing the AWS service trait have the `cloudFormationName`<NEW_LINE>// member, so use that if present. Otherwise, default to the service<NEW_LINE>// shape's name.<NEW_LINE>serviceName = serviceTrait.map(ServiceTrait::getCloudFormationName).orElse(serviceShape.getId().getName());<NEW_LINE>}<NEW_LINE>// Use the trait's name if present, or default to the resource shape's name.<NEW_LINE>String resourceName = resourceTrait.getName().orElse(environment.context.getResource().getId().getName());<NEW_LINE>return String.format("%s::%s::%s", organizationName, serviceName, resourceName);<NEW_LINE>}
= environment.context.getConfig();
945,612
final ListPendingInvitationResourcesResult executeListPendingInvitationResources(ListPendingInvitationResourcesRequest listPendingInvitationResourcesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listPendingInvitationResourcesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListPendingInvitationResourcesRequest> request = null;<NEW_LINE>Response<ListPendingInvitationResourcesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListPendingInvitationResourcesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listPendingInvitationResourcesRequest));<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, "RAM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPendingInvitationResources");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListPendingInvitationResourcesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPendingInvitationResourcesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
360,603
public CompletableFuture<CreateKeyValueTableStatus> createKeyValueTable(String scope, String kvtName, final KeyValueTableConfiguration kvtConfig, final long createTimestamp, final long requestId) {<NEW_LINE>Preconditions.checkNotNull(kvtConfig, "kvTableConfig");<NEW_LINE>Preconditions.checkArgument(createTimestamp >= 0);<NEW_LINE>Preconditions.checkArgument(kvtConfig.getPartitionCount() > 0);<NEW_LINE>Preconditions.checkArgument(kvtConfig.getPrimaryKeyLength() > 0);<NEW_LINE>Preconditions.checkArgument(kvtConfig.getSecondaryKeyLength() >= 0);<NEW_LINE>Preconditions.checkArgument(kvtConfig.getRolloverSizeBytes() >= 0);<NEW_LINE>Timer timer = new Timer();<NEW_LINE>try {<NEW_LINE>NameUtils.validateUserKeyValueTableName(kvtName);<NEW_LINE>} catch (IllegalArgumentException | NullPointerException e) {<NEW_LINE>log.warn(requestId, "Create KeyValueTable failed due to invalid name {}", kvtName);<NEW_LINE>return CompletableFuture.completedFuture(CreateKeyValueTableStatus.newBuilder().setStatus(CreateKeyValueTableStatus.Status.INVALID_TABLE_NAME).build());<NEW_LINE>}<NEW_LINE>return kvtMetadataTasks.createKeyValueTable(scope, kvtName, kvtConfig, createTimestamp, requestId).thenApplyAsync(status -> {<NEW_LINE>reportCreateKVTableMetrics(scope, kvtName, kvtConfig.getPartitionCount(), status, timer.getElapsed());<NEW_LINE>return CreateKeyValueTableStatus.newBuilder().<MASK><NEW_LINE>}, executor);<NEW_LINE>}
setStatus(status).build();
1,438,218
public CodeGenNodeArg unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CodeGenNodeArg codeGenNodeArg = new CodeGenNodeArg();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("Name", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>codeGenNodeArg.setName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Value", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>codeGenNodeArg.setValue(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Param", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>codeGenNodeArg.setParam(context.getUnmarshaller(Boolean.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return codeGenNodeArg;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,540,241
public Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext) {<NEW_LINE>Size size = IntegerConstant.forValue(stackManipulations.size()).apply(methodVisitor, implementationContext);<NEW_LINE>// The array's construction does not alter the stack's size.<NEW_LINE>size = size.aggregate(arrayCreator<MASK><NEW_LINE>int index = 0;<NEW_LINE>for (StackManipulation stackManipulation : stackManipulations) {<NEW_LINE>methodVisitor.visitInsn(Opcodes.DUP);<NEW_LINE>size = size.aggregate(StackSize.SINGLE.toIncreasingSize());<NEW_LINE>size = size.aggregate(IntegerConstant.forValue(index++).apply(methodVisitor, implementationContext));<NEW_LINE>size = size.aggregate(stackManipulation.apply(methodVisitor, implementationContext));<NEW_LINE>methodVisitor.visitInsn(arrayCreator.getStorageOpcode());<NEW_LINE>size = size.aggregate(sizeDecrease);<NEW_LINE>}<NEW_LINE>return size;<NEW_LINE>}
.apply(methodVisitor, implementationContext));
1,541,852
public static GetProjectResponse unmarshall(GetProjectResponse getProjectResponse, UnmarshallerContext _ctx) {<NEW_LINE>getProjectResponse.setRequestId(_ctx.stringValue("GetProjectResponse.RequestId"));<NEW_LINE>getProjectResponse.setHttpStatusCode(_ctx.integerValue("GetProjectResponse.HttpStatusCode"));<NEW_LINE>getProjectResponse.setSuccess(_ctx.booleanValue("GetProjectResponse.Success"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setStatus(_ctx.integerValue("GetProjectResponse.Data.Status"));<NEW_LINE>data.setMaxFlowNode(_ctx.integerValue("GetProjectResponse.Data.MaxFlowNode"));<NEW_LINE>data.setProjectId(_ctx.integerValue("GetProjectResponse.Data.ProjectId"));<NEW_LINE>data.setIsAllowDownload(_ctx.integerValue("GetProjectResponse.Data.IsAllowDownload"));<NEW_LINE>data.setProjectMode(_ctx.integerValue("GetProjectResponse.Data.ProjectMode"));<NEW_LINE>data.setGmtModified(_ctx.stringValue("GetProjectResponse.Data.GmtModified"));<NEW_LINE>data.setProdStorageQuota(_ctx.stringValue("GetProjectResponse.Data.ProdStorageQuota"));<NEW_LINE>data.setProjectDescription(_ctx.stringValue("GetProjectResponse.Data.ProjectDescription"));<NEW_LINE>data.setDevelopmentType(_ctx.integerValue("GetProjectResponse.Data.DevelopmentType"));<NEW_LINE>data.setTablePrivacyMode(_ctx.integerValue("GetProjectResponse.Data.TablePrivacyMode"));<NEW_LINE>data.setDefaultDiResourceGroupIdentifier(_ctx.stringValue("GetProjectResponse.Data.DefaultDiResourceGroupIdentifier"));<NEW_LINE>data.setSchedulerMaxRetryTimes(_ctx.integerValue("GetProjectResponse.Data.SchedulerMaxRetryTimes"));<NEW_LINE>data.setProtectedMode(_ctx.integerValue("GetProjectResponse.Data.ProtectedMode"));<NEW_LINE>data.setSchedulerRetryInterval(_ctx.integerValue("GetProjectResponse.Data.SchedulerRetryInterval"));<NEW_LINE>data.setAppkey(_ctx.stringValue("GetProjectResponse.Data.Appkey"));<NEW_LINE>data.setDevStorageQuota(_ctx.stringValue("GetProjectResponse.Data.DevStorageQuota"));<NEW_LINE>data.setResidentArea(_ctx.stringValue("GetProjectResponse.Data.ResidentArea"));<NEW_LINE>data.setIsDefault(_ctx.integerValue("GetProjectResponse.Data.IsDefault"));<NEW_LINE>data.setDestination<MASK><NEW_LINE>data.setProjectName(_ctx.stringValue("GetProjectResponse.Data.ProjectName"));<NEW_LINE>data.setProjectIdentifier(_ctx.stringValue("GetProjectResponse.Data.ProjectIdentifier"));<NEW_LINE>data.setDisableDevelopment(_ctx.booleanValue("GetProjectResponse.Data.DisableDevelopment"));<NEW_LINE>data.setProjectOwnerBaseId(_ctx.stringValue("GetProjectResponse.Data.ProjectOwnerBaseId"));<NEW_LINE>data.setBaseProject(_ctx.booleanValue("GetProjectResponse.Data.BaseProject"));<NEW_LINE>data.setUseProxyOdpsAccount(_ctx.booleanValue("GetProjectResponse.Data.UseProxyOdpsAccount"));<NEW_LINE>data.setGmtCreate(_ctx.stringValue("GetProjectResponse.Data.GmtCreate"));<NEW_LINE>data.setTenantId(_ctx.longValue("GetProjectResponse.Data.TenantId"));<NEW_LINE>List<String> envTypes = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetProjectResponse.Data.EnvTypes.Length"); i++) {<NEW_LINE>envTypes.add(_ctx.stringValue("GetProjectResponse.Data.EnvTypes[" + i + "]"));<NEW_LINE>}<NEW_LINE>data.setEnvTypes(envTypes);<NEW_LINE>getProjectResponse.setData(data);<NEW_LINE>return getProjectResponse;<NEW_LINE>}
(_ctx.integerValue("GetProjectResponse.Data.Destination"));
1,265,188
//<NEW_LINE>"LogNotTimber", //<NEW_LINE>"StringFormatInTimber", //<NEW_LINE>"ThrowableNotAtBeginning", //<NEW_LINE>"BinaryOperationInTimber", //<NEW_LINE>"TimberArgCount", //<NEW_LINE>"TimberArgTypes", //<NEW_LINE>"TimberTagLength", "TimberExceptionLogging" })<NEW_LINE>//<NEW_LINE>@Override<NEW_LINE>protected void onCreate(@Nullable Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>// LogNotTimber<NEW_LINE>Log.d("TAG", "msg");<NEW_LINE>Log.d("TAG", "msg", new Exception());<NEW_LINE>android.util.Log.d("TAG", "msg");<NEW_LINE>android.util.Log.d("TAG", "msg", new Exception());<NEW_LINE>// StringFormatInTimber<NEW_LINE>Timber.w(String.format("%s", getString()));<NEW_LINE>Timber.w(format("%s", getString()));<NEW_LINE>// ThrowableNotAtBeginning<NEW_LINE>Timber.d("%s", new Exception());<NEW_LINE>// BinaryOperationInTimber<NEW_LINE>String foo = "foo";<NEW_LINE>String bar = "bar";<NEW_LINE>Timber.d("foo" + "bar");<NEW_LINE>Timber.d("foo" + bar);<NEW_LINE>Timber.d(foo + "bar");<NEW_LINE>Timber.d(foo + bar);<NEW_LINE>// TimberArgCount<NEW_LINE><MASK><NEW_LINE>Timber.d("%s", "arg0", "arg1");<NEW_LINE>Timber.tag("tag").d("%s %s", "arg0");<NEW_LINE>Timber.tag("tag").d("%s", "arg0", "arg1");<NEW_LINE>// TimberArgTypes<NEW_LINE>Timber.d("%d", "arg0");<NEW_LINE>Timber.tag("tag").d("%d", "arg0");<NEW_LINE>// TimberTagLength<NEW_LINE>Timber.tag("abcdefghijklmnopqrstuvwx");<NEW_LINE>Timber.tag("abcdefghijklmnopqrstuvw" + "x");<NEW_LINE>// TimberExceptionLogging<NEW_LINE>Timber.d(new Exception(), new Exception().getMessage());<NEW_LINE>Timber.d(new Exception(), "");<NEW_LINE>Timber.d(new Exception(), null);<NEW_LINE>Timber.d(new Exception().getMessage());<NEW_LINE>}
Timber.d("%s %s", "arg0");
1,563,460
public // region update<NEW_LINE>UpdateRequest updateRequest(UpdateQuery query, IndexCoordinates index) {<NEW_LINE>String indexName = query.getIndexName() != null ? query.getIndexName<MASK><NEW_LINE>UpdateRequest updateRequest = new UpdateRequest(indexName, query.getId());<NEW_LINE>if (query.getScript() != null) {<NEW_LINE>Map<String, Object> params = query.getParams();<NEW_LINE>if (params == null) {<NEW_LINE>params = new HashMap<>();<NEW_LINE>}<NEW_LINE>Script script = new Script(getScriptType(query.getScriptType()), query.getLang(), query.getScript(), params);<NEW_LINE>updateRequest.script(script);<NEW_LINE>}<NEW_LINE>if (query.getDocument() != null) {<NEW_LINE>updateRequest.doc(query.getDocument());<NEW_LINE>}<NEW_LINE>if (query.getUpsert() != null) {<NEW_LINE>updateRequest.upsert(query.getUpsert());<NEW_LINE>}<NEW_LINE>if (query.getRouting() != null) {<NEW_LINE>updateRequest.routing(query.getRouting());<NEW_LINE>}<NEW_LINE>if (query.getScriptedUpsert() != null) {<NEW_LINE>updateRequest.scriptedUpsert(query.getScriptedUpsert());<NEW_LINE>}<NEW_LINE>if (query.getDocAsUpsert() != null) {<NEW_LINE>updateRequest.docAsUpsert(query.getDocAsUpsert());<NEW_LINE>}<NEW_LINE>if (query.getFetchSource() != null) {<NEW_LINE>updateRequest.fetchSource(query.getFetchSource());<NEW_LINE>}<NEW_LINE>if (query.getFetchSourceIncludes() != null || query.getFetchSourceExcludes() != null) {<NEW_LINE>List<String> includes = query.getFetchSourceIncludes() != null ? query.getFetchSourceIncludes() : Collections.emptyList();<NEW_LINE>List<String> excludes = query.getFetchSourceExcludes() != null ? query.getFetchSourceExcludes() : Collections.emptyList();<NEW_LINE>updateRequest.fetchSource(includes.toArray(new String[0]), excludes.toArray(new String[0]));<NEW_LINE>}<NEW_LINE>if (query.getIfSeqNo() != null) {<NEW_LINE>updateRequest.setIfSeqNo(query.getIfSeqNo());<NEW_LINE>}<NEW_LINE>if (query.getIfPrimaryTerm() != null) {<NEW_LINE>updateRequest.setIfPrimaryTerm(query.getIfPrimaryTerm());<NEW_LINE>}<NEW_LINE>if (query.getRefreshPolicy() != null) {<NEW_LINE>updateRequest.setRefreshPolicy(RequestFactory.toElasticsearchRefreshPolicy(query.getRefreshPolicy()));<NEW_LINE>}<NEW_LINE>if (query.getRetryOnConflict() != null) {<NEW_LINE>updateRequest.retryOnConflict(query.getRetryOnConflict());<NEW_LINE>}<NEW_LINE>if (query.getTimeout() != null) {<NEW_LINE>updateRequest.timeout(query.getTimeout());<NEW_LINE>}<NEW_LINE>if (query.getWaitForActiveShards() != null) {<NEW_LINE>updateRequest.waitForActiveShards(ActiveShardCount.parseString(query.getWaitForActiveShards()));<NEW_LINE>}<NEW_LINE>return updateRequest;<NEW_LINE>}
() : index.getIndexName();
845,113
public okhttp3.Call applicationsApplicationIdOauthKeysKeyMappingIdGetCall(String applicationId, String keyMappingId, String groupId, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/applications/{applicationId}/oauth-keys/{keyMappingId}".replaceAll("\\{" + "applicationId" + "\\}", localVarApiClient.escapeString(applicationId.toString())).replaceAll("\\{" + "keyMappingId" + "\\}", localVarApiClient.escapeString(keyMappingId.toString()));<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();<NEW_LINE>if (groupId != null) {<NEW_LINE>localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupId", groupId));<NEW_LINE>}<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, String> localVarCookieParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final <MASK><NEW_LINE>final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>if (localVarAccept != null) {<NEW_LINE>localVarHeaderParams.put("Accept", localVarAccept);<NEW_LINE>}<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>localVarHeaderParams.put("Content-Type", localVarContentType);<NEW_LINE>String[] localVarAuthNames = new String[] { "OAuth2Security" };<NEW_LINE>return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);<NEW_LINE>}
String[] localVarAccepts = { "application/json" };
1,007,692
public void onBindViewHolder(@NonNull CategoryViewHolder holder, int position) {<NEW_LINE>Category <MASK><NEW_LINE>holder.txtTitle.setText(category.getName());<NEW_LINE>if (isSelected(position)) {<NEW_LINE>holder.txtTitle.setTypeface(null, Typeface.BOLD);<NEW_LINE>holder.txtTitle.setTextColor(Integer.parseInt(category.getColor()));<NEW_LINE>} else {<NEW_LINE>holder.txtTitle.setTypeface(null, Typeface.NORMAL);<NEW_LINE>holder.txtTitle.setTextColor(mActivity.getResources().getColor(R.color.drawer_text));<NEW_LINE>}<NEW_LINE>// Set the results into ImageView checking if an icon is present before<NEW_LINE>if (category.getColor() != null && category.getColor().length() > 0) {<NEW_LINE>Drawable img = mActivity.getResources().getDrawable(R.drawable.ic_folder_special_black_24dp);<NEW_LINE>ColorFilter cf = new LightingColorFilter(Color.parseColor("#000000"), Integer.parseInt(category.getColor()));<NEW_LINE>img.mutate().setColorFilter(cf);<NEW_LINE>holder.imgIcon.setImageDrawable(img);<NEW_LINE>int padding = 4;<NEW_LINE>holder.imgIcon.setPadding(padding, padding, padding, padding);<NEW_LINE>}<NEW_LINE>showCategoryCounter(holder, category);<NEW_LINE>}
category = categories.get(position);
1,461,981
private void checkFilterChainOrder(List<OrderDecorator> filters, ParserContext pc, Object source) {<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < filters.size(); i++) {<NEW_LINE>OrderDecorator filter = filters.get(i);<NEW_LINE>if (i > 0) {<NEW_LINE>OrderDecorator previous = filters.get(i - 1);<NEW_LINE>if (filter.getOrder() == previous.getOrder()) {<NEW_LINE>pc.getReaderContext().error("Filter beans '" + filter.bean + "' and '" + previous.bean + "' have the same 'order' value. When using custom filters, " + "please make sure the positions do not conflict with default filters. " + "Alternatively you can disable the default filters by removing the corresponding " + "child elements from <http> and avoiding the use of <http auto-config='true'>.", source);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
logger.info("Checking sorted filter chain: " + filters);
436,414
protected void serviceStart() throws Exception {<NEW_LINE>stateMonitor = new Thread(new Runnable() {<NEW_LINE><NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>while (!stopped.get() && !Thread.interrupted()) {<NEW_LINE>AppState state = getInternalState();<NEW_LINE>try {<NEW_LINE>readLock.lock();<NEW_LINE>if (stateToTsMap.containsKey(state) && context.getClock().getTime() - stateToTsMap.get(state) >= stateTimeOutMs) {<NEW_LINE>if (state.equals(AppState.NEW)) {<NEW_LINE>context.getEventHandler().handle(new InternalErrorEvent(context<MASK><NEW_LINE>} else if (state.equals(AppState.PREPARE_WORKERS)) {<NEW_LINE>context.getEventHandler().handle(new InternalErrorEvent(context.getApplicationId(), "lack of resources: memory or vCores are not enough for the request by worker"));<NEW_LINE>} else {<NEW_LINE>context.getEventHandler().handle(new InternalErrorEvent(context.getApplicationId(), "app in state " + state + " over " + stateTimeOutMs + " milliseconds!"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>readLock.unlock();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>stateMonitor.setName("app-state-monitor");<NEW_LINE>stateMonitor.start();<NEW_LINE>super.serviceStart();<NEW_LINE>}
.getApplicationId(), "lack of resources: memory or vCores are not enough for the request by ps"));
890,125
public void updatedNode(VarNode vn) {<NEW_LINE>Object r = vn.getVariable();<NEW_LINE>if (!(r instanceof Local)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Local receiver = (Local) r;<NEW_LINE>final Context context = vn.context();<NEW_LINE>PointsToSetInternal p2set = vn<MASK><NEW_LINE>if (ofcgb.wantTypes(receiver)) {<NEW_LINE>p2set.forall(new P2SetVisitor() {<NEW_LINE><NEW_LINE>public final void visit(Node n) {<NEW_LINE>if (n instanceof AllocNode) {<NEW_LINE>ofcgb.addType(receiver, context, n.getType(), (AllocNode) n);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>if (ofcgb.wantStringConstants(receiver)) {<NEW_LINE>p2set.forall(new P2SetVisitor() {<NEW_LINE><NEW_LINE>public final void visit(Node n) {<NEW_LINE>if (n instanceof StringConstantNode) {<NEW_LINE>String constant = ((StringConstantNode) n).getString();<NEW_LINE>ofcgb.addStringConstant(receiver, context, constant);<NEW_LINE>} else {<NEW_LINE>ofcgb.addStringConstant(receiver, context, null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>if (ofcgb.wantInvokeArg(receiver)) {<NEW_LINE>p2set.forall(new P2SetVisitor() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void visit(Node n) {<NEW_LINE>if (n instanceof AllocNode) {<NEW_LINE>AllocNode an = ((AllocNode) n);<NEW_LINE>ofcgb.addInvokeArgDotField(receiver, pag.makeAllocDotField(an, ArrayElement.v()));<NEW_LINE>assert an.getNewExpr() instanceof NewArrayExpr;<NEW_LINE>NewArrayExpr nae = (NewArrayExpr) an.getNewExpr();<NEW_LINE>if (!(nae.getSize() instanceof IntConstant)) {<NEW_LINE>ofcgb.setArgArrayNonDetSize(receiver, context);<NEW_LINE>} else {<NEW_LINE>IntConstant sizeConstant = (IntConstant) nae.getSize();<NEW_LINE>ofcgb.addPossibleArgArraySize(receiver, sizeConstant.value, context);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>for (Type ty : pag.reachingObjectsOfArrayElement(p2set).possibleTypes()) {<NEW_LINE>ofcgb.addInvokeArgType(receiver, context, ty);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.getP2Set().getNewSet();
1,339,614
private static boolean skipBrokerRebalance(Broker broker, ClusterModel clusterModel, Collection<Replica> replicas, boolean requireLessReplicas, boolean requireMoreReplicas, boolean hasOfflineTopicReplicas, boolean moveImmigrantReplicaOnly) {<NEW_LINE>if (broker.isAlive() && !requireMoreReplicas && !requireLessReplicas) {<NEW_LINE>LOG.<MASK><NEW_LINE>return true;<NEW_LINE>} else if (!clusterModel.newBrokers().isEmpty() && !broker.isNew() && !requireLessReplicas) {<NEW_LINE>LOG.trace("Skip rebalance: Cluster has new brokers and this broker {} is not new, but does not require less load " + "for replicas {}. Hence, it does not have any offline replicas.", broker, replicas);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>boolean hasImmigrantTopicReplicas = replicas.stream().anyMatch(replica -> broker.immigrantReplicas().contains(replica));<NEW_LINE>if (!clusterModel.selfHealingEligibleReplicas().isEmpty() && requireLessReplicas && !hasOfflineTopicReplicas && !hasImmigrantTopicReplicas) {<NEW_LINE>LOG.trace("Skip rebalance: Cluster is in self-healing mode and the broker {} requires less load, but none of its " + "current offline or immigrant replicas are from the topic being balanced {}.", broker, replicas);<NEW_LINE>return true;<NEW_LINE>} else if (moveImmigrantReplicaOnly && requireLessReplicas && !hasImmigrantTopicReplicas) {<NEW_LINE>LOG.trace("Skip rebalance: Only immigrant replicas can be moved, but none of broker {}'s " + "current immigrant replicas are from the topic being balanced {}.", broker, replicas);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
trace("Skip rebalance: Broker {} is already within the limit for replicas {}.", broker, replicas);
427,817
public void checkScroll() {<NEW_LINE>if (listView == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (context instanceof ManagerActivity) {<NEW_LINE>if (bannerContainer.getVisibility() == View.GONE) {<NEW_LINE>((ManagerActivity) context).changeAppBarElevation(listView.canScrollVertically(-1) || (adapterList != null && adapterList.isMultipleSelect()));<NEW_LINE>} else if (listView.canScrollVertically(-1) || (adapterList != null && adapterList.isMultipleSelect()) || contactsListLayout.getVisibility() == View.VISIBLE) {<NEW_LINE>appBarLayout.setElevation(getResources().getDimension(R.dimen.toolbar_elevation));<NEW_LINE>((ManagerActivity) context).changeAppBarElevation(isDarkMode(context));<NEW_LINE>} else {<NEW_LINE>appBarLayout.setElevation(0);<NEW_LINE>// Reset the AppBar elevation whatever in the light and dark mode<NEW_LINE>((ManagerActivity) context).changeAppBarElevation(false);<NEW_LINE>}<NEW_LINE>} else if (context instanceof ArchivedChatsActivity) {<NEW_LINE>boolean withElevation = listView.canScrollVertically(-1) || (adapterList != null && adapterList.isMultipleSelect());<NEW_LINE>Util.changeActionBarElevation((ArchivedChatsActivity) context, ((ArchivedChatsActivity) context).findViewById(R<MASK><NEW_LINE>}<NEW_LINE>}
.id.app_bar_layout_chat_explorer), withElevation);
1,021,702
public final void next() {<NEW_LINE>try {<NEW_LINE>Token tok = getNextToken();<NEW_LINE>myimage = tok.image;<NEW_LINE>id = tok.kind;<NEW_LINE>if (id == EOF) {<NEW_LINE>// ??? EOF is visible just at Parser LEVEL<NEW_LINE>setState(lastValidState);<NEW_LINE>id = Bridge.JJ_EOF;<NEW_LINE>}<NEW_LINE>lastValidState = getState();<NEW_LINE>} catch (TokenMgrError ex) {<NEW_LINE>try {<NEW_LINE>// is the exception caused by EOF?<NEW_LINE><MASK><NEW_LINE>input_stream.backup(1);<NEW_LINE>myimage = input_stream.GetImage();<NEW_LINE>if (// NOI18N<NEW_LINE>Boolean.getBoolean("netbeans.debug.exceptions"))<NEW_LINE>// NOI18N<NEW_LINE>System.err.println(getClass().toString() + " ERROR:" + getState() + ":'" + ch + "'");<NEW_LINE>id = Bridge.JJ_ERR;<NEW_LINE>} catch (IOException eof) {<NEW_LINE>myimage = input_stream.GetImage();<NEW_LINE>id = Bridge.JJ_EOF;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
char ch = input_stream.readChar();
147,347
static Referable resolveName(Scope scope, List<? extends String> path, boolean withSuperClasses) {<NEW_LINE>for (int i = 0; i < path.size(); i++) {<NEW_LINE>if (scope == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (withSuperClasses && i == path.size() - 2) {<NEW_LINE>Referable parentRef = scope.resolveName(path.get(i));<NEW_LINE>if (parentRef instanceof ClassReferable) {<NEW_LINE>Referable result = new ClassFieldImplScope((ClassReferable) parentRef, false).resolveName(path<MASK><NEW_LINE>if (result != null) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (i == path.size() - 1) {<NEW_LINE>return scope.resolveName(path.get(i));<NEW_LINE>} else {<NEW_LINE>scope = scope.resolveNamespace(path.get(i), i < path.size() - 2);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
.get(i + 1));
1,753,979
public GetConfigurationPResponse toProto() {<NEW_LINE>GetConfigurationPResponse.Builder response = GetConfigurationPResponse.newBuilder();<NEW_LINE>if (mClusterConf != null) {<NEW_LINE>mClusterConf.forEach(property -> response.addClusterConfigs<MASK><NEW_LINE>}<NEW_LINE>if (mPathConf != null) {<NEW_LINE>mPathConf.forEach((path, properties) -> {<NEW_LINE>List<ConfigProperty> propertyList = properties.stream().map(Property::toProto).collect(Collectors.toList());<NEW_LINE>ConfigProperties configProperties = ConfigProperties.newBuilder().addAllProperties(propertyList).build();<NEW_LINE>response.putPathConfigs(path, configProperties);<NEW_LINE>});<NEW_LINE>}<NEW_LINE>if (mClusterConfHash != null) {<NEW_LINE>response.setClusterConfigHash(mClusterConfHash);<NEW_LINE>}<NEW_LINE>if (mPathConfHash != null) {<NEW_LINE>response.setPathConfigHash(mPathConfHash);<NEW_LINE>}<NEW_LINE>return response.build();<NEW_LINE>}
(property.toProto()));
464,198
protected void mergeList(List<Entity> list, Entity managedEntity, MetaProperty property, boolean replace, MergeOptions options, Set<Entity> mergedSet) {<NEW_LINE>if (replace) {<NEW_LINE>List<Entity> managedRefs = new ArrayList<>(list.size());<NEW_LINE>for (Entity entity : list) {<NEW_LINE>Entity managedRef = internalMerge(entity, mergedSet, false, options);<NEW_LINE>managedRefs.add(managedRef);<NEW_LINE>}<NEW_LINE>List<Entity> dstList = createObservableList(managedRefs, managedEntity);<NEW_LINE>setPropertyValue(managedEntity, property, dstList);<NEW_LINE>} else {<NEW_LINE>List<Entity> dstList = managedEntity.getValue(property.getName());<NEW_LINE>if (dstList == null) {<NEW_LINE>dstList = createObservableList(managedEntity);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (dstList.size() == 0) {<NEW_LINE>for (Entity srcRef : list) {<NEW_LINE>dstList.add(internalMerge(srcRef, mergedSet, false, options));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (Entity srcRef : list) {<NEW_LINE>Entity managedRef = internalMerge(srcRef, mergedSet, false, options);<NEW_LINE>if (!dstList.contains(managedRef)) {<NEW_LINE>dstList.add(managedRef);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
setPropertyValue(managedEntity, property, dstList);
140,122
private static void addNewExtraProperties(ObjectName objName, Properties props, AttributeList attrList, ServerInterface mejb) throws Exception {<NEW_LINE>try {<NEW_LINE>// NOI18N<NEW_LINE>String[] signature = new String[] { "javax.management.Attribute" };<NEW_LINE>Object[] params = null;<NEW_LINE>if (props.size() > attrList.size()) {<NEW_LINE>java.util.Enumeration listProps = props.propertyNames();<NEW_LINE>while (listProps.hasMoreElements()) {<NEW_LINE>String propName = listProps.nextElement().toString();<NEW_LINE>if (!attrList.contains(propName)) {<NEW_LINE>Attribute attr = new Attribute(propName<MASK><NEW_LINE>params = new Object[] { attr };<NEW_LINE>mejb.invoke(objName, __SetProperty, params, signature);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// while<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>throw new Exception(ex.getLocalizedMessage(), ex);<NEW_LINE>}<NEW_LINE>}
, props.getProperty(propName));
1,486,924
private RawData loadRawData() {<NEW_LINE>final List<I_C_Invoice_Line_Alloc> ilaRecords = Services.get(IQueryBL.class).createQueryBuilder(I_C_Invoice_Line_Alloc.class).addOnlyActiveRecordsFilter().addInArrayFilter(I_C_Invoice_Line_Alloc.COLUMN_C_Invoice_Candidate_ID, invoiceCandidateIds).create().list();<NEW_LINE>final ImmutableListMultimap<Integer, I_C_Invoice_Line_Alloc> invoiceCandidateId2IlaRecords = Multimaps.index(ilaRecords, I_C_Invoice_Line_Alloc::getC_Invoice_Candidate_ID);<NEW_LINE>final ImmutableList<Integer> invoiceLineRepoIds = ilaRecords.stream().map(ilaRecord -> ilaRecord.getC_InvoiceLine_ID()).distinct().collect(ImmutableList.toImmutableList());<NEW_LINE>final List<I_C_InvoiceLine> invoiceLineRecords = Services.get(IQueryBL.class).createQueryBuilder(I_C_InvoiceLine.class).addOnlyActiveRecordsFilter().addInArrayFilter(I_C_InvoiceLine.COLUMN_C_InvoiceLine_ID, invoiceLineRepoIds).create().list();<NEW_LINE>final ImmutableMap<Integer, I_C_InvoiceLine> invoiceLineId2InvoiceLineRecord = Maps.uniqueIndex(invoiceLineRecords, I_C_InvoiceLine::getC_InvoiceLine_ID);<NEW_LINE>final ImmutableList<Integer> invoiceRepoIds = invoiceLineRecords.stream().map(I_C_InvoiceLine::getC_Invoice_ID).distinct().collect(ImmutableList.toImmutableList());<NEW_LINE>final List<I_C_Invoice> invoiceRecords = Services.get(IQueryBL.class).createQueryBuilder(I_C_Invoice.class).addOnlyActiveRecordsFilter().addInArrayFilter(I_C_Invoice.COLUMN_C_Invoice_ID, invoiceRepoIds).create().list();<NEW_LINE>final ImmutableMap<Integer, I_C_Invoice> invoiceId2InvoiceRecord = Maps.<MASK><NEW_LINE>return new RawData(invoiceId2InvoiceRecord, invoiceLineId2InvoiceLineRecord, invoiceCandidateId2IlaRecords);<NEW_LINE>}
uniqueIndex(invoiceRecords, I_C_Invoice::getC_Invoice_ID);
1,215,347
public long readLong() {<NEW_LINE>if (dbg)<NEW_LINE>System.err.println("\nread");<NEW_LINE>if (!hasMore()) {<NEW_LINE>throw new NoSuchElementException();<NEW_LINE>}<NEW_LINE>readElementCount--;<NEW_LINE>if (repeatCount != 0) {<NEW_LINE>if (dbg)<NEW_LINE>System.err.println("next repeat count = " + repeatCount + " lastn = " + hex(lastn));<NEW_LINE>repeatCount--;<NEW_LINE>return lastn;<NEW_LINE>}<NEW_LINE>int type = bitStream.readIntBits(TYPE_FIELD_BITS);<NEW_LINE>if (type == REPEATED_DELTA) {<NEW_LINE>repeatCount = bitStream.readIntBits(REPEATED_DELTA_BITS);<NEW_LINE>Assert(repeatCount != 0);<NEW_LINE>if (dbg)<NEW_LINE>System.err.println("init repeat count = " + repeatCount + " lastn = " + hex(lastn));<NEW_LINE>repeatCount--;<NEW_LINE>return lastn;<NEW_LINE>}<NEW_LINE>boolean isNegative = bitStream.readIntBits(SIGN_FIELD_BITS) != 0;<NEW_LINE>long delta;<NEW_LINE>if (type == SMALL_DELTA) {<NEW_LINE>delta = bitStream.readIntBits(SMALL_DELTA_BITS);<NEW_LINE>if (isNegative)<NEW_LINE>delta = -delta;<NEW_LINE>} else if (type == MEDIUM_DELTA) {<NEW_LINE><MASK><NEW_LINE>if (isNegative)<NEW_LINE>delta = -delta;<NEW_LINE>} else {<NEW_LINE>delta = bitStream.readLongBits(LARGE_DELTA_BITS);<NEW_LINE>if (isNegative)<NEW_LINE>delta = -delta;<NEW_LINE>}<NEW_LINE>lastn += delta;<NEW_LINE>if (dbg)<NEW_LINE>System.err.println("delta = " + hex(delta) + " lastn = " + hex(lastn));<NEW_LINE>if (dbg)<NEW_LINE>System.err.println("type = " + type);<NEW_LINE>return lastn;<NEW_LINE>}
delta = bitStream.readIntBits(MEDIUM_DELTA_BITS);
741,954
private void mergeHigherLevels(final KllFloatsSketch other, final long finalN) {<NEW_LINE>final int tmpSpaceNeeded = getNumRetained() + other.getNumRetainedAboveLevelZero();<NEW_LINE>final float[] workbuf = new float[tmpSpaceNeeded];<NEW_LINE>final int ub = KllHelper.ubOnNumLevels(finalN);<NEW_LINE>// ub+1 does not work<NEW_LINE>final int[] worklevels = new int[ub + 2];<NEW_LINE>final int[] outlevels = new int[ub + 2];<NEW_LINE>final int provisionalNumLevels = <MASK><NEW_LINE>populateWorkArrays(other, workbuf, worklevels, provisionalNumLevels);<NEW_LINE>// notice that workbuf is being used as both the input and output here<NEW_LINE>final int[] result = KllFloatsHelper.generalFloatsCompress(k_, m_, provisionalNumLevels, workbuf, worklevels, workbuf, outlevels, isLevelZeroSorted_, random);<NEW_LINE>final int finalNumLevels = result[0];<NEW_LINE>final int finalCapacity = result[1];<NEW_LINE>final int finalPop = result[2];<NEW_LINE>// ub can sometimes be much bigger<NEW_LINE>assert finalNumLevels <= ub;<NEW_LINE>// now we need to transfer the results back into the "self" sketch<NEW_LINE>final float[] newbuf = finalCapacity == items_.length ? items_ : new float[finalCapacity];<NEW_LINE>final int freeSpaceAtBottom = finalCapacity - finalPop;<NEW_LINE>System.arraycopy(workbuf, outlevels[0], newbuf, freeSpaceAtBottom, finalPop);<NEW_LINE>final int theShift = freeSpaceAtBottom - outlevels[0];<NEW_LINE>if (levels_.length < finalNumLevels + 1) {<NEW_LINE>levels_ = new int[finalNumLevels + 1];<NEW_LINE>}<NEW_LINE>for (int lvl = 0; lvl < finalNumLevels + 1; lvl++) {<NEW_LINE>// includes the "extra" index<NEW_LINE>levels_[lvl] = outlevels[lvl] + theShift;<NEW_LINE>}<NEW_LINE>items_ = newbuf;<NEW_LINE>numLevels_ = finalNumLevels;<NEW_LINE>}
max(numLevels_, other.numLevels_);
682,054
protected Tuple3<Boolean, Double, Map<String, String>>[] detect(MTable series, boolean detectLast) throws Exception {<NEW_LINE>TableSummary summary = series.summary();<NEW_LINE>final double mean = summary.mean(selectedCol);<NEW_LINE>final double <MASK><NEW_LINE>double[] zScores = OutlierUtil.getNumericArray(series, selectedCol);<NEW_LINE>for (int i = 0; i < zScores.length; i++) {<NEW_LINE>zScores[i] = (zScores[i] - mean) / standardDeviation;<NEW_LINE>}<NEW_LINE>Tuple3<Boolean, Double, Map<String, String>>[] results = new Tuple3[zScores.length];<NEW_LINE>for (int i = 0; i < zScores.length; i++) {<NEW_LINE>double outlier_score;<NEW_LINE>switch(direction) {<NEW_LINE>case BOTH:<NEW_LINE>outlier_score = Math.abs(zScores[i]);<NEW_LINE>break;<NEW_LINE>case NEGATIVE:<NEW_LINE>outlier_score = -zScores[i];<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>outlier_score = zScores[i];<NEW_LINE>}<NEW_LINE>if (isPredDetail) {<NEW_LINE>HashMap<String, String> infoMap = new HashMap<>();<NEW_LINE>infoMap.put("z_score", String.valueOf(zScores[i]));<NEW_LINE>results[i] = Tuple3.of(outlier_score > K, outlier_score, infoMap);<NEW_LINE>} else {<NEW_LINE>results[i] = Tuple3.of(outlier_score > K, null, null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return results;<NEW_LINE>}
standardDeviation = summary.standardDeviation(selectedCol);
1,177,140
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<NEW_LINE>public void handleRunEmulator(Sketch sketch, AndroidEditor editor, RunnerListener listener) throws SketchException, IOException {<NEW_LINE>listener.startIndeterminate();<NEW_LINE>listener.statusNotice(AndroidMode.getTextString("android_mode.status.starting_project_build"));<NEW_LINE>AndroidBuild build = new AndroidBuild(sketch, this, editor.getAppComponent());<NEW_LINE>listener.statusNotice(AndroidMode.getTextString("android_mode.status.building_project"));<NEW_LINE>build.build("debug");<NEW_LINE>boolean avd = AVD.ensureProperAVD(editor, this, sdk, build.isWear());<NEW_LINE>if (!avd) {<NEW_LINE>SketchException se = new SketchException<MASK><NEW_LINE>se.hideStackTrace();<NEW_LINE>throw se;<NEW_LINE>}<NEW_LINE>int comp = build.getAppComponent();<NEW_LINE>Future<Device> emu = Devices.getInstance().getEmulator(build.isWear());<NEW_LINE>runner = new AndroidRunner(build, listener);<NEW_LINE>runner.launch(emu, comp, true);<NEW_LINE>}
(AndroidMode.getTextString("android_mode.error.cannot_create_avd"));
1,574,661
protected BasicValidationResult createRecord(final DataLine dataLine) {<NEW_LINE>final String contig = dataLine.get(BasicValidationResultTableColumn.CONTIG);<NEW_LINE>final int start = <MASK><NEW_LINE>final int end = dataLine.getInt(BasicValidationResultTableColumn.END);<NEW_LINE>final Allele ref = Allele.create(dataLine.get(BasicValidationResultTableColumn.REF).getBytes(), true);<NEW_LINE>final Allele alt = Allele.create(dataLine.get(BasicValidationResultTableColumn.ALT).getBytes(), false);<NEW_LINE>final int discoveryAltCount = dataLine.getInt(BasicValidationResultTableColumn.DISCOVERY_ALT_COVERAGE);<NEW_LINE>final int discoveryRefCount = dataLine.getInt(BasicValidationResultTableColumn.DISCOVERY_REF_COVERAGE);<NEW_LINE>final int validationAltCount = dataLine.getInt(BasicValidationResultTableColumn.VALIDATION_ALT_COVERAGE);<NEW_LINE>final int validationRefCount = dataLine.getInt(BasicValidationResultTableColumn.VALIDATION_REF_COVERAGE);<NEW_LINE>final int minValidationReadCount = dataLine.getInt(BasicValidationResultTableColumn.MIN_VAL_COUNT);<NEW_LINE>final double power = dataLine.getDouble(BasicValidationResultTableColumn.POWER);<NEW_LINE>final boolean isOutOfNoiseFloor = dataLine.getBoolean(BasicValidationResultTableColumn.IS_NOT_NOISE.toString());<NEW_LINE>final boolean isEnoughValidationReads = dataLine.getBoolean(BasicValidationResultTableColumn.IS_ENOUGH_VALIDATION_COVERAGE.toString());<NEW_LINE>final String filters = dataLine.get(BasicValidationResultTableColumn.DISCOVERY_VCF_FILTER);<NEW_LINE>final long numAltSupportingReadsInNormal = dataLine.getLong(BasicValidationResultTableColumn.NUM_ALT_READS_IN_VALIDATION_NORMAL);<NEW_LINE>final Locatable interval = new SimpleInterval(contig, start, end);<NEW_LINE>return new BasicValidationResult(interval, minValidationReadCount, isEnoughValidationReads, isOutOfNoiseFloor, power, validationAltCount, validationRefCount, discoveryAltCount, discoveryRefCount, ref, alt, filters, numAltSupportingReadsInNormal);<NEW_LINE>}
dataLine.getInt(BasicValidationResultTableColumn.START);
1,368,729
final ListDeliverabilityTestReportsResult executeListDeliverabilityTestReports(ListDeliverabilityTestReportsRequest listDeliverabilityTestReportsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDeliverabilityTestReportsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListDeliverabilityTestReportsRequest> request = null;<NEW_LINE>Response<ListDeliverabilityTestReportsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListDeliverabilityTestReportsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listDeliverabilityTestReportsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SESv2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListDeliverabilityTestReports");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListDeliverabilityTestReportsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListDeliverabilityTestReportsResultJsonUnmarshaller());<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);
945,612
final ListPendingInvitationResourcesResult executeListPendingInvitationResources(ListPendingInvitationResourcesRequest listPendingInvitationResourcesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listPendingInvitationResourcesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListPendingInvitationResourcesRequest> request = null;<NEW_LINE>Response<ListPendingInvitationResourcesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListPendingInvitationResourcesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listPendingInvitationResourcesRequest));<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, "RAM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPendingInvitationResources");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListPendingInvitationResourcesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPendingInvitationResourcesResultJsonUnmarshaller());<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);
113,061
private Module registerModule(Path file) {<NEW_LINE>if (!FS.canReadFile(file)) {<NEW_LINE>throw new IllegalStateException("Cannot read file: " + file);<NEW_LINE>}<NEW_LINE>String shortName = _baseHome.toShortForm(file);<NEW_LINE>try {<NEW_LINE>StartLog.debug("Registering Module: %s", shortName);<NEW_LINE>Module module = new Module(_baseHome, file);<NEW_LINE>_modules.add(module);<NEW_LINE>_names.put(module.getName(), module);<NEW_LINE>module.getProvides().forEach(n -> {<NEW_LINE>// Syntax can be :<NEW_LINE>// "<name>" - for a simple provider reference<NEW_LINE>// "<name>|default" - for a provider that is also the default implementation<NEW_LINE>String name = n;<NEW_LINE>boolean isDefaultProvider = false;<NEW_LINE>int idx = n.indexOf('|');<NEW_LINE>if (idx > 0) {<NEW_LINE>name = n.substring(0, idx);<NEW_LINE>isDefaultProvider = n.substring(idx <MASK><NEW_LINE>}<NEW_LINE>_provided.computeIfAbsent(name, k -> new HashSet<>()).add(module);<NEW_LINE>if (isDefaultProvider) {<NEW_LINE>_providedDefaults.computeIfAbsent(name, k -> module.getName());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return module;<NEW_LINE>} catch (Error | RuntimeException t) {<NEW_LINE>throw t;<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw new IllegalStateException("Unable to register module: " + shortName, t);<NEW_LINE>}<NEW_LINE>}
+ 1).equalsIgnoreCase("default");
1,584,946
private static InputStream spawnGrep(Artifact input, PathFragment outputExecPath, boolean inMemoryOutput, ActionExecutionMetadata resourceOwner, ActionExecutionContext actionExecutionContext, Artifact grepIncludes, GrepIncludesFileType fileType) throws ExecException, InterruptedException {<NEW_LINE>ActionInput output = ActionInputHelper.fromPath(outputExecPath);<NEW_LINE>NestedSet<? extends ActionInput> inputs = NestedSetBuilder.create(Order.STABLE_ORDER, grepIncludes, input);<NEW_LINE>ImmutableSet<ActionInput> outputs = ImmutableSet.of(output);<NEW_LINE>ImmutableList<String> command = ImmutableList.of(grepIncludes.getExecPathString(), input.getExecPath().getPathString(), outputExecPath.getPathString(), fileType.getFileType());<NEW_LINE>ImmutableMap.Builder<String, String> execInfoBuilder = ImmutableMap.builder();<NEW_LINE>execInfoBuilder.putAll(resourceOwner.getExecutionInfo());<NEW_LINE>if (inMemoryOutput) {<NEW_LINE>execInfoBuilder.put(ExecutionRequirements.REMOTE_EXECUTION_INLINE_OUTPUTS, outputExecPath.getPathString());<NEW_LINE>}<NEW_LINE>execInfoBuilder.put(ExecutionRequirements.DO_NOT_REPORT, "");<NEW_LINE>Spawn spawn = new SimpleSpawn(resourceOwner, command, ImmutableMap.of(), execInfoBuilder.buildOrThrow(<MASK><NEW_LINE>actionExecutionContext.maybeReportSubcommand(spawn);<NEW_LINE>// Don't share the originalOutErr across spawnGrep calls. Doing so would not be thread-safe.<NEW_LINE>FileOutErr originalOutErr = actionExecutionContext.getFileOutErr();<NEW_LINE>FileOutErr grepOutErr = originalOutErr.childOutErr();<NEW_LINE>SpawnStrategyResolver spawnStrategyResolver = actionExecutionContext.getContext(SpawnStrategyResolver.class);<NEW_LINE>ActionExecutionContext spawnContext = actionExecutionContext.withFileOutErr(grepOutErr);<NEW_LINE>List<SpawnResult> results;<NEW_LINE>try {<NEW_LINE>results = spawnStrategyResolver.exec(spawn, spawnContext);<NEW_LINE>dump(spawnContext, actionExecutionContext);<NEW_LINE>} catch (ExecException e) {<NEW_LINE>dump(spawnContext, actionExecutionContext);<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>SpawnResult result = Iterables.getLast(results);<NEW_LINE>return result.getInMemoryOutput(output);<NEW_LINE>}
), inputs, outputs, LOCAL_RESOURCES);
208,616
public void onCreate(Bundle icicle) {<NEW_LINE>super.onCreate(icicle);<NEW_LINE>setContentView(R.layout.act_help);<NEW_LINE>Version.setVersionText(getApplicationContext(), findViewById(R.id.version));<NEW_LINE>Button hintsButton = findViewById(R.id.hints_button);<NEW_LINE>hintsButton.setOnClickListener(new OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>Intent intent = new Intent(HelpActivity.this, HintsActivity.class);<NEW_LINE>HelpActivity.this.startActivity(intent);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>inflater = LayoutInflater.from(this);<NEW_LINE>Button shortcutsButton = findViewById(R.id.shortcuts_button);<NEW_LINE>shortcutsButton.setOnClickListener(new OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>// Dialogs do not have a parent view.<NEW_LINE>@SuppressLint("InflateParams")<NEW_LINE>final View shortcuts = inflater.inflate(R.layout.dia_keyboard_shortcuts, null, false);<NEW_LINE>new androidx.appcompat.app.AlertDialog.Builder(HelpActivity.this, R.style.AlertDialogTheme).setView(shortcuts).setTitle(R.<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>Button eulaButton = findViewById(R.id.eula_button);<NEW_LINE>eulaButton.setOnClickListener(new OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>Intent intent = new Intent(HelpActivity.this, EulaActivity.class);<NEW_LINE>HelpActivity.this.startActivity(intent);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
string.keyboard_shortcuts).show();
983,164
public void createMatrices(List<MatrixContext> matrixContexts, long timeOutMS) throws Exception {<NEW_LINE>CreateMatricesRequest.Builder createBuilder = CreateMatricesRequest.newBuilder();<NEW_LINE>CheckMatricesCreatedRequest.Builder checkBuilder = CheckMatricesCreatedRequest.newBuilder();<NEW_LINE>List<String> matrixNames = new ArrayList<>(matrixContexts.size());<NEW_LINE>int size = matrixContexts.size();<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>matrixContexts.get(i).init(PSAgentContext.get().getConf());<NEW_LINE>matrixNames.add(matrixContexts.get(i).getName());<NEW_LINE>checkBuilder.addMatrixNames(matrixContexts.get(i).getName());<NEW_LINE>createBuilder.addMatrices(ProtobufUtil.convertToMatrixContextProto(matrixContexts.get(i)));<NEW_LINE>}<NEW_LINE>LOG.info("start to create matrices " + String.join(",", matrixNames));<NEW_LINE>master.createMatrices(null, createBuilder.build());<NEW_LINE>CheckMatricesCreatedRequest checkRequest = checkBuilder.build();<NEW_LINE>CheckMatricesCreatedResponse checkResponse = null;<NEW_LINE>while (true) {<NEW_LINE>long startTs = Time.now();<NEW_LINE>checkResponse = master.checkMatricesCreated(null, checkRequest);<NEW_LINE>if (checkResponse.getStatus() == 0) {<NEW_LINE>LOG.info("create matrices " + String.join(",", matrixNames) + " success");<NEW_LINE>List<MatrixMetaProto> metaProtos = master.getMatrices(null, GetMatricesRequest.newBuilder().addAllMatrixNames(matrixNames).<MASK><NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>PSAgentContext.get().getMatrixMetaManager().addMatrix(ProtobufUtil.convertToMatrixMeta(metaProtos.get(i)));<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>if (Time.now() - startTs > timeOutMS) {<NEW_LINE>throw new TimeOutException("create matrix time out ", (Time.now() - startTs), timeOutMS);<NEW_LINE>}<NEW_LINE>Thread.sleep(1000);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
build()).getMatrixMetasList();
1,037,262
/*<NEW_LINE>* @see<NEW_LINE>* com.sitewhere.microservice.api.device.IDeviceManagement#searchDeviceAlarms(<NEW_LINE>* com.sitewhere.spi.search.device.IDeviceAlarmSearchCriteria)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public ISearchResults<RdbDeviceAlarm> searchDeviceAlarms(IDeviceAlarmSearchCriteria criteria) throws SiteWhereException {<NEW_LINE>return getEntityManagerProvider().findWithCriteria(criteria, new IRdbQueryProvider<RdbDeviceAlarm>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void addPredicates(CriteriaBuilder cb, List<Predicate> predicates, Root<RdbDeviceAlarm> root) throws SiteWhereException {<NEW_LINE>if (criteria.getDeviceId() != null) {<NEW_LINE>Path<UUID> path = root.get("deviceId");<NEW_LINE>predicates.add(cb.equal(path, criteria.getDeviceId()));<NEW_LINE>}<NEW_LINE>if (criteria.getDeviceAssignmentId() != null) {<NEW_LINE>Path<UUID> path = root.get("deviceAssignmentId");<NEW_LINE>predicates.add(cb.equal(path, criteria.getDeviceAssignmentId()));<NEW_LINE>}<NEW_LINE>if (criteria.getCustomerId() != null) {<NEW_LINE>Path<UUID> path = root.get("customerId");<NEW_LINE>predicates.add(cb.equal(path, criteria.getCustomerId()));<NEW_LINE>}<NEW_LINE>if (criteria.getAreaId() != null) {<NEW_LINE>Path<UUID> path = root.get("areaId");<NEW_LINE>predicates.add(cb.equal(path, criteria.getAreaId()));<NEW_LINE>}<NEW_LINE>if (criteria.getAssetId() != null) {<NEW_LINE>Path<UUID> path = root.get("assetId");<NEW_LINE>predicates.add(cb.equal(path<MASK><NEW_LINE>}<NEW_LINE>if (criteria.getState() != null) {<NEW_LINE>Path<DeviceAlarmState> path = root.get("state");<NEW_LINE>predicates.add(cb.equal(path, criteria.getState()));<NEW_LINE>}<NEW_LINE>if (criteria.getTriggeringEventId() != null) {<NEW_LINE>Path<UUID> path = root.get("triggeringEventId");<NEW_LINE>predicates.add(cb.equal(path, criteria.getTriggeringEventId()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public CriteriaQuery<RdbDeviceAlarm> addSort(CriteriaBuilder cb, Root<RdbDeviceAlarm> root, CriteriaQuery<RdbDeviceAlarm> query) {<NEW_LINE>return query.orderBy(cb.desc(root.get("createdDate")));<NEW_LINE>}<NEW_LINE>}, RdbDeviceAlarm.class);<NEW_LINE>}
, criteria.getAssetId()));
1,812,975
public com.amazonaws.services.memorydb.model.ACLAlreadyExistsException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.memorydb.model.ACLAlreadyExistsException aCLAlreadyExistsException = new com.amazonaws.services.memorydb.model.ACLAlreadyExistsException(null);<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} 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 aCLAlreadyExistsException;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,816,344
private void processFiles(RootModule rootModule, final SeverityLevelCounter warningCounter, final String checkstyleVersion) {<NEW_LINE>final long startTime = System.currentTimeMillis();<NEW_LINE>final List<File> files = getFilesToCheck();<NEW_LINE>final long endTime = System.currentTimeMillis();<NEW_LINE>log("To locate the files took " + (endTime - startTime) + TIME_SUFFIX, Project.MSG_VERBOSE);<NEW_LINE>log("Running Checkstyle " + Objects.toString(checkstyleVersion, "") + " on " + files.size() + " files", Project.MSG_INFO);<NEW_LINE>log(<MASK><NEW_LINE>final int numErrs;<NEW_LINE>try {<NEW_LINE>final long processingStartTime = System.currentTimeMillis();<NEW_LINE>numErrs = rootModule.process(files);<NEW_LINE>final long processingEndTime = System.currentTimeMillis();<NEW_LINE>log("To process the files took " + (processingEndTime - processingStartTime) + TIME_SUFFIX, Project.MSG_VERBOSE);<NEW_LINE>} catch (CheckstyleException ex) {<NEW_LINE>throw new BuildException("Unable to process files: " + files, ex);<NEW_LINE>}<NEW_LINE>final int numWarnings = warningCounter.getCount();<NEW_LINE>final boolean okStatus = numErrs <= maxErrors && numWarnings <= maxWarnings;<NEW_LINE>// Handle the return status<NEW_LINE>if (!okStatus) {<NEW_LINE>final String failureMsg = "Got " + numErrs + " errors and " + numWarnings + " warnings.";<NEW_LINE>if (failureProperty != null) {<NEW_LINE>getProject().setProperty(failureProperty, failureMsg);<NEW_LINE>}<NEW_LINE>if (failOnViolation) {<NEW_LINE>throw new BuildException(failureMsg, getLocation());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
"Using configuration " + config, Project.MSG_VERBOSE);
319,980
public static String prettyPrint3D(int[][][] m) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>int rows = m.length;<NEW_LINE>int <MASK><NEW_LINE>int size = 1 + m[0][0].length * 2;<NEW_LINE>for (int i = 0; i < size; i++) sb.append(" ");<NEW_LINE>String spaces = sb.toString();<NEW_LINE>sb = new StringBuilder();<NEW_LINE>for (int i = 0; i < size; i++) sb.append("_");<NEW_LINE>String underscores = sb.toString();<NEW_LINE>sb = new StringBuilder();<NEW_LINE>sb.append(" |");<NEW_LINE>for (int i = 0; i < columns; i++) {<NEW_LINE>sb.append(spaces + i + spaces);<NEW_LINE>}<NEW_LINE>sb.append("\n____");<NEW_LINE>for (int i = 0; i < columns; i++) {<NEW_LINE>sb.append(underscores + underscores + "_");<NEW_LINE>}<NEW_LINE>sb.append("\n");<NEW_LINE>for (int i = 0; i < rows; i++) {<NEW_LINE>sb.append(" " + i + " |");<NEW_LINE>for (int j = 0; j < columns; j++) {<NEW_LINE>sb.append(" " + Arrays.toString(m[i][j]) + " ");<NEW_LINE>}<NEW_LINE>sb.append("\n");<NEW_LINE>}<NEW_LINE>return sb.toString();<NEW_LINE>}
columns = m[0].length;
1,852,844
public FieldElement multInv() {<NEW_LINE>if (this.getData().equals(BigInteger.ZERO)) {<NEW_LINE>throw new ArithmeticException();<NEW_LINE>}<NEW_LINE>if (this.getData().equals(BigInteger.ONE)) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>// Polynomial EEA:<NEW_LINE>BigInteger r2 = this.getModulus();<NEW_LINE>BigInteger r1 = this.getData();<NEW_LINE>BigInteger t2 = new BigInteger("0");<NEW_LINE>BigInteger t1 = BigInteger.ONE;<NEW_LINE>do {<NEW_LINE>BigInteger[] division = this.polynomialDivision(r2, r1);<NEW_LINE>// r = r2 mod r1<NEW_LINE>BigInteger r = division[1];<NEW_LINE>// q = (r2 - r) / r1<NEW_LINE>BigInteger q = division[0];<NEW_LINE>// t = t2 - (t1 * q)<NEW_LINE>FieldElementF2m pointT1Polynomial = new FieldElementF2m(t1, this.getModulus());<NEW_LINE>FieldElementF2m pointQPolynomial = new FieldElementF2m(q, this.getModulus());<NEW_LINE>BigInteger t = pointT1Polynomial.mult(pointQPolynomial).getData();<NEW_LINE>t = this.reduce(t);<NEW_LINE><MASK><NEW_LINE>t2 = t1;<NEW_LINE>t1 = t;<NEW_LINE>r2 = r1;<NEW_LINE>r1 = r;<NEW_LINE>} while (!r1.equals(BigInteger.ONE) && !r1.equals(BigInteger.ZERO));<NEW_LINE>// t1 * this.getData() == 1<NEW_LINE>return new FieldElementF2m(t1, this.getModulus());<NEW_LINE>}
t = t2.xor(t);
1,478,604
public void computeKilometricExpense(ActionRequest request, ActionResponse response) throws AxelorException {<NEW_LINE>ExpenseLine expenseLine = request.getContext().asType(ExpenseLine.class);<NEW_LINE>if (expenseLine.getKilometricAllowParam() == null || expenseLine.getDistance().compareTo(BigDecimal.ZERO) == 0 || expenseLine.getExpenseDate() == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String userId;<NEW_LINE>String userName;<NEW_LINE>if (expenseLine.getExpense() != null) {<NEW_LINE>setExpense(request, expenseLine);<NEW_LINE>}<NEW_LINE>Expense expense = expenseLine.getExpense();<NEW_LINE>if (expense != null && expenseLine.getUser() != null) {<NEW_LINE>userId = expense.getUser().getId().toString();<NEW_LINE>userName = expense.getUser().getFullName();<NEW_LINE>} else {<NEW_LINE>userId = request.getContext().getParent().asType(Expense.class).getUser().getId().toString();<NEW_LINE>userName = request.getContext().getParent().asType(Expense.class).getUser().getFullName();<NEW_LINE>}<NEW_LINE>Employee employee = Beans.get(EmployeeRepository.class).all().filter("self.user.id = ?1", userId).fetchOne();<NEW_LINE>if (employee == null) {<NEW_LINE>throw new AxelorException(TraceBackRepository.CATEGORY_CONFIGURATION_ERROR, I18n.get<MASK><NEW_LINE>}<NEW_LINE>BigDecimal amount = BigDecimal.ZERO;<NEW_LINE>try {<NEW_LINE>amount = Beans.get(KilometricService.class).computeKilometricExpense(expenseLine, employee);<NEW_LINE>} catch (Exception e) {<NEW_LINE>TraceBackService.trace(response, e);<NEW_LINE>}<NEW_LINE>response.setValue("totalAmount", amount);<NEW_LINE>response.setValue("untaxedAmount", amount);<NEW_LINE>}
(IExceptionMessage.LEAVE_USER_EMPLOYEE), userName);
1,814,156
public StarlarkCallable rule(StarlarkFunction implementation, Boolean test, Object attrs, Object implicitOutputs, Boolean executable, Boolean outputToGenfiles, Sequence<?> fragments, Sequence<?> hostFragments, Boolean starlarkTestable, Sequence<?> toolchains, boolean useToolchainTransition, String doc, Sequence<?> providesArg, Sequence<?> execCompatibleWith, Object analysisTest, Object buildSetting, Object cfg, Object execGroups, Object compileOneFiletype, Object name, StarlarkThread thread) throws EvalException {<NEW_LINE>ImmutableMap.Builder<String, FakeDescriptor<MASK><NEW_LINE>if (attrs != null && attrs != Starlark.NONE) {<NEW_LINE>attrsMapBuilder.putAll(Dict.cast(attrs, String.class, FakeDescriptor.class, "attrs"));<NEW_LINE>}<NEW_LINE>attrsMapBuilder.put("name", IMPLICIT_NAME_ATTRIBUTE_DESCRIPTOR);<NEW_LINE>List<AttributeInfo> attrInfos = attrsMapBuilder.build().entrySet().stream().filter(entry -> !entry.getKey().startsWith("_")).map(entry -> entry.getValue().asAttributeInfo(entry.getKey())).collect(Collectors.toList());<NEW_LINE>attrInfos.sort(new AttributeNameComparator());<NEW_LINE>RuleDefinitionIdentifier functionIdentifier = new RuleDefinitionIdentifier();<NEW_LINE>// Only the Builder is passed to RuleInfoWrapper as the rule name may not be available yet.<NEW_LINE>RuleInfo.Builder ruleInfo = RuleInfo.newBuilder().setDocString(doc).addAllAttribute(attrInfos);<NEW_LINE>if (name != Starlark.NONE) {<NEW_LINE>ruleInfo.setRuleName((String) name);<NEW_LINE>}<NEW_LINE>Location loc = thread.getCallerLocation();<NEW_LINE>ruleInfoList.add(new RuleInfoWrapper(functionIdentifier, loc, ruleInfo));<NEW_LINE>return functionIdentifier;<NEW_LINE>}
> attrsMapBuilder = ImmutableMap.builder();
1,190,449
public void handlePerspective(ItemStack Object, TransformType cameraTransformType, PoseStack mat, LivingEntity entity) {<NEW_LINE>if (entity != null && entity.isUsingItem())<NEW_LINE>if ((entity.getUsedItemHand() == InteractionHand.MAIN_HAND) == (entity.getMainArm() == HumanoidArm.RIGHT)) {<NEW_LINE>if (cameraTransformType == TransformType.FIRST_PERSON_RIGHT_HAND) {<NEW_LINE>mat.mulPose(new Quaternion(-.15F, 0, 0, false));<NEW_LINE>mat.translate(-.25, .5, -.4375);<NEW_LINE>} else if (cameraTransformType == TransformType.THIRD_PERSON_RIGHT_HAND) {<NEW_LINE>mat.mulPose(new Quaternion(0.52359F, 0, 0, false));<NEW_LINE>mat.mulPose(new Quaternion(0, 0.78539F, 0, false));<NEW_LINE>mat.translate(.40625, -.125, -.125);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (cameraTransformType == TransformType.FIRST_PERSON_LEFT_HAND) {<NEW_LINE>mat.mulPose(new Quaternion(.15F, 0, 0, false));<NEW_LINE>mat.translate(.25, .375, .4375);<NEW_LINE>} else if (cameraTransformType == TransformType.THIRD_PERSON_LEFT_HAND) {<NEW_LINE>mat.mulPose(new Quaternion(-0.52359F<MASK><NEW_LINE>mat.translate(.1875, .3125, .75);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
, 1, 0, false));
1,322,677
private static void startCoreDaemon() throws SuException, DaemonException {<NEW_LINE>boolean access_granted = false;<NEW_LINE>DataOutputStream writer = null;<NEW_LINE>BufferedReader reader = null;<NEW_LINE>String line;<NEW_LINE>int ret = -1;<NEW_LINE>try {<NEW_LINE>Process shell = Runtime.getRuntime().exec("su");<NEW_LINE>writer = new <MASK><NEW_LINE>String cmd;<NEW_LINE>cmd = String.format("{ echo 'ACCESS GRANTED' >&2; cd '%s' && exec ./start_daemon.sh ;} || exit 1\n", System.getCorePath());<NEW_LINE>writer.write(cmd.getBytes());<NEW_LINE>writer.flush();<NEW_LINE>ret = shell.waitFor();<NEW_LINE>if (ret != 0) {<NEW_LINE>reader = new BufferedReader(new InputStreamReader(shell.getErrorStream()));<NEW_LINE>while ((line = reader.readLine()) != null) {<NEW_LINE>if (line.equals("ACCESS GRANTED")) {<NEW_LINE>access_granted = true;<NEW_LINE>Logger.debug("'ACCESS GRANTED' found");<NEW_LINE>} else<NEW_LINE>Logger.warning("STDERR: " + line);<NEW_LINE>}<NEW_LINE>} else<NEW_LINE>access_granted = true;<NEW_LINE>} catch (IOException e) {<NEW_LINE>// command "su" not found or cannot write to it's stdin<NEW_LINE>Logger.error(e.getMessage());<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>// interrupted while waiting for shell exit value<NEW_LINE>Logger.error(e.getMessage());<NEW_LINE>} finally {<NEW_LINE>if (writer != null)<NEW_LINE>try {<NEW_LINE>writer.close();<NEW_LINE>} catch (IOException ignored) {<NEW_LINE>}<NEW_LINE>if (reader != null)<NEW_LINE>try {<NEW_LINE>reader.close();<NEW_LINE>} catch (IOException ignored) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>mKnownIssues.fromFile(String.format("%s/issues", getCorePath()));<NEW_LINE>if (!access_granted)<NEW_LINE>throw new SuException();<NEW_LINE>if (ret != 0) {<NEW_LINE>File log = new File(System.getCorePath(), "cSploitd.log");<NEW_LINE>DaemonException daemonException = new DaemonException("core daemon returned " + ret);<NEW_LINE>throw daemonException;<NEW_LINE>}<NEW_LINE>}
DataOutputStream(shell.getOutputStream());
66,234
public float evaluateMask(int tl_x, int tl_y) {<NEW_LINE>Objects.requireNonNull(o.mask);<NEW_LINE>float top = 0;<NEW_LINE>float imageMean = 0;<NEW_LINE>float imageSigma = 0;<NEW_LINE>for (int y = 0; y < o.template.height; y++) {<NEW_LINE>int imageIndex = o.image.startIndex + (tl_y + y) * o.image.stride + tl_x;<NEW_LINE>for (int x = 0; x < o.template.width; x++) {<NEW_LINE>imageMean += o.image.data[imageIndex++];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>imageMean /= area;<NEW_LINE>for (int y = 0; y < o.template.height; y++) {<NEW_LINE>int imageIndex = o.image.startIndex + (tl_y + y) * o.image.stride + tl_x;<NEW_LINE>int templateIndex = o.template.startIndex + y * o.template.stride;<NEW_LINE>int maskIndex = o.mask.startIndex + y * o.mask.stride;<NEW_LINE>for (int x = 0; x < o.template.width; x++) {<NEW_LINE>final float templateVal = o<MASK><NEW_LINE>final float imageVal = o.image.data[imageIndex++];<NEW_LINE>float imageDiff = imageVal - imageMean;<NEW_LINE>imageSigma += imageDiff * imageDiff;<NEW_LINE>top += o.mask.data[maskIndex++] * imageDiff * (templateVal - templateMean);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>imageSigma = (float) Math.sqrt(imageSigma);<NEW_LINE>return top / (EPS + imageSigma * templateSigma);<NEW_LINE>}
.template.data[templateIndex++];
1,111,673
protected void renderSafe(SchematicannonTileEntity tileEntity, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light, int overlay) {<NEW_LINE>boolean blocksLaunching = !tileEntity.flyingBlocks.isEmpty();<NEW_LINE>if (blocksLaunching)<NEW_LINE>renderLaunchedBlocks(tileEntity, partialTicks, <MASK><NEW_LINE>if (Backend.canUseInstancing(tileEntity.getLevel()))<NEW_LINE>return;<NEW_LINE>BlockPos pos = tileEntity.getBlockPos();<NEW_LINE>BlockState state = tileEntity.getBlockState();<NEW_LINE>double[] cannonAngles = getCannonAngles(tileEntity, pos, partialTicks);<NEW_LINE>double yaw = cannonAngles[0];<NEW_LINE>double pitch = cannonAngles[1];<NEW_LINE>double recoil = getRecoil(tileEntity, partialTicks);<NEW_LINE>ms.pushPose();<NEW_LINE>VertexConsumer vb = buffer.getBuffer(RenderType.solid());<NEW_LINE>SuperByteBuffer connector = CachedBufferer.partial(AllBlockPartials.SCHEMATICANNON_CONNECTOR, state);<NEW_LINE>connector.translate(.5f, 0, .5f);<NEW_LINE>connector.rotate(Direction.UP, (float) ((yaw + 90) / 180 * Math.PI));<NEW_LINE>connector.translate(-.5f, 0, -.5f);<NEW_LINE>connector.light(light).renderInto(ms, vb);<NEW_LINE>SuperByteBuffer pipe = CachedBufferer.partial(AllBlockPartials.SCHEMATICANNON_PIPE, state);<NEW_LINE>pipe.translate(.5f, 15 / 16f, .5f);<NEW_LINE>pipe.rotate(Direction.UP, (float) ((yaw + 90) / 180 * Math.PI));<NEW_LINE>pipe.rotate(Direction.SOUTH, (float) (pitch / 180 * Math.PI));<NEW_LINE>pipe.translate(-.5f, -15 / 16f, -.5f);<NEW_LINE>pipe.translate(0, -recoil / 100, 0);<NEW_LINE>pipe.light(light).renderInto(ms, vb);<NEW_LINE>ms.popPose();<NEW_LINE>}
ms, buffer, light, overlay);
132,044
public void logExternal(Logger useLogger) {<NEW_LINE>String methodName = "logExternal";<NEW_LINE>useLogger.logp(Level.FINER, CLASS_NAME, methodName, " Module Externals:");<NEW_LINE>String useAppLibPath = getAppLibRootPath();<NEW_LINE>if (useAppLibPath == null) {<NEW_LINE>useLogger.logp(Level.<MASK><NEW_LINE>} else {<NEW_LINE>useLogger.logp(Level.FINER, CLASS_NAME, methodName, " Application library path [ " + useAppLibPath + " ]");<NEW_LINE>}<NEW_LINE>List<String> useLibraryJarPaths = getAppLibPaths();<NEW_LINE>if (useLibraryJarPaths != null) {<NEW_LINE>for (String nextJarPath : useLibraryJarPaths) {<NEW_LINE>useLogger.logp(Level.FINER, CLASS_NAME, methodName, " Application library jar [ " + nextJarPath + " ]");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>List<String> useManifestJarPaths = getManifestPaths();<NEW_LINE>if (useManifestJarPaths != null) {<NEW_LINE>useLogger.logp(Level.FINER, CLASS_NAME, methodName, " Manifest jars");<NEW_LINE>for (String nextJarPath : useManifestJarPaths) {<NEW_LINE>useLogger.logp(Level.FINER, CLASS_NAME, methodName, " Manifest jar [ " + nextJarPath + " ]");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
FINER, CLASS_NAME, methodName, " Application library path [ Null ]");
497,230
public void addToHandleList(Object h, HandleList HL) {<NEW_LINE>final boolean isTracingEnabled = TraceComponent.isAnyTracingEnabled();<NEW_LINE>if (HL != null) {<NEW_LINE><MASK><NEW_LINE>if (isTracingEnabled && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(this, tc, "Adding Connection handle: " + h + "and its handle list object: " + HL + " to the MCWrapper connection Handle to HandeList map " + "MCwrapper Handlelist size : " + mcwHandleList.size());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (isTracingEnabled && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(this, tc, "The Handle List is null for connection handle: " + h + " This is a thread with no context so so this handle will only " + " be stored in the handlelist no_context_handle_list object.");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
mcwHandleList.put(h, HL);
105,541
public int bufferSize(@NotNull final ClientConnection clientConnection, @NotNull final T msg) {<NEW_LINE>int omittedProperties = 0;<NEW_LINE>int propertyLength = calculatePropertyLength(msg);<NEW_LINE>if (!securityConfigurationService.allowRequestProblemInformation() || !Objects.requireNonNullElse(clientConnection.getRequestProblemInformation(), Mqtt5CONNECT.DEFAULT_PROBLEM_INFORMATION_REQUESTED)) {<NEW_LINE>// Must omit user properties and reason string for any other packet than PUBLISH, CONNACK, DISCONNECT<NEW_LINE>// if no problem information requested.<NEW_LINE>final boolean mustOmit = !(msg instanceof PUBLISH || msg instanceof CONNACK || msg instanceof DISCONNECT);<NEW_LINE>if (mustOmit) {<NEW_LINE>// propertyLength - reason string<NEW_LINE>propertyLength = propertyLength<MASK><NEW_LINE>// propertyLength - user properties<NEW_LINE>propertyLength = propertyLength(msg, propertyLength, ++omittedProperties);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final long maximumPacketSize = calculateMaxMessageSize(clientConnection);<NEW_LINE>final int remainingLengthWithoutProperties = calculateRemainingLengthWithoutProperties(msg);<NEW_LINE>int remainingLength = remainingLength(msg, remainingLengthWithoutProperties, propertyLength);<NEW_LINE>int encodedLength = encodedPacketLength(remainingLength);<NEW_LINE>while (encodedLength > maximumPacketSize) {<NEW_LINE>omittedProperties++;<NEW_LINE>propertyLength = propertyLength(msg, propertyLength, omittedProperties);<NEW_LINE>if (propertyLength == -1) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>remainingLength = remainingLength(msg, remainingLengthWithoutProperties, propertyLength);<NEW_LINE>encodedLength = encodedPacketLength(remainingLength);<NEW_LINE>}<NEW_LINE>msg.setEncodedLength(encodedLength);<NEW_LINE>msg.setOmittedProperties(omittedProperties);<NEW_LINE>msg.setRemainingLength(remainingLength);<NEW_LINE>msg.setPropertyLength(propertyLength);<NEW_LINE>return encodedLength;<NEW_LINE>}
(msg, propertyLength, ++omittedProperties);
225,946
private static JSModuleRecord createSyntheticJSONModule(JSRealm realm, Source source, Object hostDefined) {<NEW_LINE>final TruffleString exportName = Strings.DEFAULT;<NEW_LINE>JSFrameDescriptor frameDescBuilder = new JSFrameDescriptor(Undefined.instance);<NEW_LINE>JSFrameSlot slot = frameDescBuilder.addFrameSlot(exportName);<NEW_LINE>FrameDescriptor frameDescriptor = frameDescBuilder.toFrameDescriptor();<NEW_LINE>List<ExportEntry> localExportEntries = Collections.singletonList<MASK><NEW_LINE>Module moduleNode = new Module(Collections.emptyList(), Collections.emptyList(), localExportEntries, Collections.emptyList(), Collections.emptyList(), null, null);<NEW_LINE>JavaScriptRootNode rootNode = new JavaScriptRootNode(realm.getContext().getLanguage(), source.createUnavailableSection(), frameDescriptor) {<NEW_LINE><NEW_LINE>private final int defaultSlot = slot.getIndex();<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Object execute(VirtualFrame frame) {<NEW_LINE>JSModuleRecord module = (JSModuleRecord) JSArguments.getUserArgument(frame.getArguments(), 0);<NEW_LINE>if (module.getEnvironment() == null) {<NEW_LINE>assert module.getStatus() == Status.Linking;<NEW_LINE>module.setEnvironment(frame.materialize());<NEW_LINE>} else {<NEW_LINE>assert module.getStatus() == Status.Evaluating;<NEW_LINE>setSyntheticModuleExport(module);<NEW_LINE>}<NEW_LINE>return Undefined.instance;<NEW_LINE>}<NEW_LINE><NEW_LINE>private void setSyntheticModuleExport(JSModuleRecord module) {<NEW_LINE>module.getEnvironment().setObject(defaultSlot, module.getHostDefined());<NEW_LINE>}<NEW_LINE>};<NEW_LINE>CallTarget callTarget = rootNode.getCallTarget();<NEW_LINE>JSFunctionData functionData = JSFunctionData.create(realm.getContext(), callTarget, callTarget, 0, Strings.EMPTY_STRING, false, false, true, true);<NEW_LINE>final JSModuleData parseModule = new JSModuleData(moduleNode, source, functionData, frameDescriptor);<NEW_LINE>return new JSModuleRecord(parseModule, realm.getModuleLoader(), hostDefined);<NEW_LINE>}
(ExportEntry.exportSpecifier(exportName));
605,959
private boolean checkAuthorization(String authorization) {<NEW_LINE>if (authorization == null)<NEW_LINE>return false;<NEW_LINE>try {<NEW_LINE>String userInfo = authorization.substring(6).trim();<NEW_LINE>Base64 decoder = new Base64();<NEW_LINE>String namePassword = new String(decoder.decode(userInfo.getBytes()));<NEW_LINE>// log.fine("checkAuthorization - Name:Password=" + namePassword);<NEW_LINE>int index = namePassword.indexOf(':');<NEW_LINE>String name = namePassword.substring(0, index);<NEW_LINE>String password = namePassword.substring(index + 1);<NEW_LINE>Login login = new <MASK><NEW_LINE>KeyNamePair[] rolesKNPairs = login.getRoles(name, password);<NEW_LINE>if (rolesKNPairs == null || rolesKNPairs.length == 0)<NEW_LINE>throw new AdempiereException("@UserPwdError@");<NEW_LINE>for (KeyNamePair keyNamePair : rolesKNPairs) {<NEW_LINE>if ("System Administrator".equals(keyNamePair.getName())) {<NEW_LINE>log.info("Name=" + name);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>log.warning("Not a Sys Admin = " + name);<NEW_LINE>return false;<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.log(Level.SEVERE, "check", e);<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
Login(Env.getCtx());
702,331
protected JMenuBar createMenuBar() {<NEW_LINE>JMenuBar menuBar = new JMenuBar();<NEW_LINE>String[] sessionMenuActionNames = { // "convertSession",<NEW_LINE>"newSession", // "convertSession",<NEW_LINE>"openSession", // "propertiesSession",<NEW_LINE>"saveSession", // "propertiesSession",<NEW_LINE>"refreshSession", "---", "lookAndFeel", "---", "quit" };<NEW_LINE>String[] simsRunsMenuActionNames = { "importSimDir", "addRunDir" };<NEW_LINE>String[] dataProductMenuActionNames = { "addDP", "editSelectedDP", "filterDP" };<NEW_LINE>String[] actionsMenuActionNames = { "singlePlot", "comparisonPlot", "errorPlot", "contrastPlot", "tabularData", "tabularErrorData", "---", "gnuSinglePlot", "gnuComparisonPlot", "gnuErrorPlot", "---", "quickPlot", "---", "createPDF" };<NEW_LINE>String[] helpMenuActionNames = { "helpContents", "---", "showAboutBox" };<NEW_LINE>JMenu sessionMenu = createMenu("sessionMenu", sessionMenuActionNames);<NEW_LINE>sessionMenu.insert(confirmExitSelection, sessionMenuActionNames.length - 1);<NEW_LINE>menuBar.add(sessionMenu);<NEW_LINE>menuBar.add<MASK><NEW_LINE>menuBar.add(createMenu("dataProductMenu", dataProductMenuActionNames));<NEW_LINE>menuBar.add(createSettingsMenu());<NEW_LINE>menuBar.add(createMenu("actionsMenu", actionsMenuActionNames));<NEW_LINE>menuBar.add(createHelpMenu("helpMenu", helpMenuActionNames, "Help.hs"));<NEW_LINE>return menuBar;<NEW_LINE>}
(createMenu("simsRunsMenu", simsRunsMenuActionNames));
1,672,839
final AssociateVirtualInterfaceResult executeAssociateVirtualInterface(AssociateVirtualInterfaceRequest associateVirtualInterfaceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(associateVirtualInterfaceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<AssociateVirtualInterfaceRequest> request = null;<NEW_LINE>Response<AssociateVirtualInterfaceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new AssociateVirtualInterfaceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(associateVirtualInterfaceRequest));<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, "Direct Connect");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AssociateVirtualInterface");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<AssociateVirtualInterfaceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AssociateVirtualInterfaceResultJsonUnmarshaller());<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);
686,731
private static Map<String, String> genericNameValueProcess(String s) {<NEW_LINE>Map<String, String> params = new HashMap<String, String>();<NEW_LINE>List<String> parameters = split(s, ";");<NEW_LINE>for (String parameter : parameters) {<NEW_LINE>List<String> <MASK><NEW_LINE>// do a check, otherwise we might get NPE<NEW_LINE>if (parts.size() == 2) {<NEW_LINE>String second = parts.get(1).trim();<NEW_LINE>if (second.startsWith("\"") && second.endsWith("\""))<NEW_LINE>second = second.substring(1, second.length() - 1);<NEW_LINE>String first = parts.get(0).trim();<NEW_LINE>// make sure for directives we clear out any space as in "directive :=value"<NEW_LINE>if (first.endsWith(":")) {<NEW_LINE>first = first.substring(0, first.length() - 1).trim() + ":";<NEW_LINE>}<NEW_LINE>params.put(first, second);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return params;<NEW_LINE>}
parts = split(parameter, "=");
729,704
public User retrieveContactOrNull(@NonNull final RetrieveContactRequest request) {<NEW_LINE>final List<I_AD_User> contactRecords = bpartnersRepo.retrieveContacts(Env.getCtx(), request.getBpartnerId().getRepoId(), ITrx.TRXNAME_None);<NEW_LINE>final boolean ifNotFoundReturnNull = RetrieveContactRequest.IfNotFound.RETURN_NULL.equals(request.getIfNotFound());<NEW_LINE>final boolean onlyActiveContacts = request.isOnlyActive();<NEW_LINE>// we will collect the candidates for our return value into these variables<NEW_LINE>final Set<User> contactsAtLocation = new TreeSet<>(request.getComparator());<NEW_LINE>final Set<User> contactsAtOtherLocations = new TreeSet<>(request.getComparator());<NEW_LINE>User defaultContactOfType = null;<NEW_LINE>User defaultContact = null;<NEW_LINE>for (final I_AD_User contactRecord : contactRecords) {<NEW_LINE>if (onlyActiveContacts && !contactRecord.isActive()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final User contact = userRepository.ofRecord(contactRecord);<NEW_LINE>if (!request.getFilter().test(contact)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final boolean contactHasMatchingBPartnerLocation = request.getBPartnerLocationId() != null && contactRecord.getC_BPartner_Location_ID() == request.getBPartnerLocationId().getRepoId();<NEW_LINE>if (contactHasMatchingBPartnerLocation) {<NEW_LINE>contactsAtLocation.add(contact);<NEW_LINE>} else {<NEW_LINE>contactsAtOtherLocations.add(contact);<NEW_LINE>}<NEW_LINE>if (contactRecord.isDefaultContact()) {<NEW_LINE>defaultContact = contact;<NEW_LINE>}<NEW_LINE>if (recordMatchesType(contactRecord, request.getContactType())) {<NEW_LINE>defaultContactOfType = contact;<NEW_LINE>if (ifNotFoundReturnNull) {<NEW_LINE>return defaultContactOfType;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (ifNotFoundReturnNull) {<NEW_LINE>// no user of the given type was found<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (!contactsAtLocation.isEmpty()) {<NEW_LINE>return findBestMatch(contactsAtLocation, defaultContactOfType, defaultContact);<NEW_LINE>} else if (!contactsAtOtherLocations.isEmpty()) {<NEW_LINE>return <MASK><NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
findBestMatch(contactsAtOtherLocations, defaultContactOfType, defaultContact);
986,402
private Map<String, File> findBundledFiles(File module, String cnb) throws Exception {<NEW_LINE>Map<String, File> result = new HashMap<>();<NEW_LINE>if (module.getParentFile().getName().matches("modules|core|lib")) {<NEW_LINE>File cluster = module<MASK><NEW_LINE>File updateTracking = new File(new File(cluster, "update_tracking"), cnb.replace('.', '-') + ".xml");<NEW_LINE>if (updateTracking.isFile()) {<NEW_LINE>Document doc = XMLUtil.parse(new InputSource(updateTracking.toURI().toString()), false, false, null, null);<NEW_LINE>NodeList nl = doc.getElementsByTagName("file");<NEW_LINE>for (int i = 0; i < nl.getLength(); i++) {<NEW_LINE>String path = ((Element) nl.item(i)).getAttribute("name");<NEW_LINE>if (path.matches("config/(Modules|ModuleAutoDeps)/.+[.]xml|lib/nbexec.*")) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>File f = new File(cluster, path);<NEW_LINE>if (f.equals(module)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (f.isFile()) {<NEW_LINE>result.put(path, f);<NEW_LINE>} else {<NEW_LINE>log("did not find " + f + " specified in " + updateTracking, Project.MSG_WARN);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>log("did not find expected " + updateTracking, Project.MSG_WARN);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>log("JAR " + module + " not found in expected cluster layout", Project.MSG_WARN);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
.getParentFile().getParentFile();
1,051,236
public void run() {<NEW_LINE>if (started) {<NEW_LINE>LOG.error("Already ran consumer");<NEW_LINE>throw new IllegalStateException("Already ran consumer");<NEW_LINE>}<NEW_LINE>started = true;<NEW_LINE>try {<NEW_LINE>initialize();<NEW_LINE>subscribeOrAssign();<NEW_LINE>while (!closed) {<NEW_LINE>final ConsumerRecords<?, GenericRow> <MASK><NEW_LINE>// No assignment yet<NEW_LINE>if (this.topicPartitions.get() == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (newAssignment) {<NEW_LINE>newAssignment = false;<NEW_LINE>onNewAssignment();<NEW_LINE>}<NEW_LINE>final PushOffsetVector startOffsetVector = getOffsetVector(currentPositions.get(), topicName, partitions);<NEW_LINE>if (records.isEmpty()) {<NEW_LINE>updateCurrentPositions();<NEW_LINE>computeProgressToken(Optional.of(startOffsetVector));<NEW_LINE>onEmptyRecords();<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>for (ConsumerRecord<?, GenericRow> rec : records) {<NEW_LINE>handleRow(rec.key(), rec.value(), rec.timestamp());<NEW_LINE>}<NEW_LINE>updateCurrentPositions();<NEW_LINE>computeProgressToken(Optional.of(startOffsetVector));<NEW_LINE>try {<NEW_LINE>consumer.commitSync();<NEW_LINE>} catch (CommitFailedException e) {<NEW_LINE>LOG.warn("Failed to commit, likely due to rebalance. Will wait for new assignment", e);<NEW_LINE>}<NEW_LINE>afterBatchProcessed();<NEW_LINE>}<NEW_LINE>} catch (WakeupException e) {<NEW_LINE>// This is expected when we get closed.<NEW_LINE>}<NEW_LINE>}
records = consumer.poll(POLL_TIMEOUT);
1,222,168
static int isFirstJavaLine(JTextComponent component) {<NEW_LINE>ShellSession s = ShellSession.get(component.getDocument());<NEW_LINE>if (s == null) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>ConsoleSection sec = s.getModel().getInputSection();<NEW_LINE>if (sec == null) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>LineDocument ld = LineDocumentUtils.as(component.getDocument(), LineDocument.class);<NEW_LINE>if (ld == null) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>int off = sec.getStart();<NEW_LINE><MASK><NEW_LINE>int s1 = LineDocumentUtils.getLineStart(ld, caret);<NEW_LINE>int s2 = LineDocumentUtils.getLineStart(ld, off);<NEW_LINE>try {<NEW_LINE>return s1 == s2 ? component.getDocument().getText(sec.getPartBegin(), sec.getPartLen()).trim().length() : -1;<NEW_LINE>} catch (BadLocationException ex) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>}
int caret = component.getCaretPosition();
177,748
public Map<String, Object> info() {<NEW_LINE>Map<String, Object> info = new HashMap<>();<NEW_LINE>info.put("id", RSocketAppContext.ID);<NEW_LINE>info.put("serviceStatus", AppStatusEvent.statusText(this.rsocketServiceStatus));<NEW_LINE>if (this.serviceProvider) {<NEW_LINE>info.put("published", rsocketRequesterSupport.exposedServices().get());<NEW_LINE>}<NEW_LINE>if (!RSocketRemoteServiceBuilder.CONSUMED_SERVICES.isEmpty()) {<NEW_LINE>info.put("subscribed", rsocketRequesterSupport.subscribedServices().get().stream().filter(serviceLocator -> !RSocketServiceHealth.class.getCanonicalName().equals(serviceLocator.getService())).collect(Collectors.toList()));<NEW_LINE>}<NEW_LINE>Collection<UpstreamCluster> upstreamClusters = upstreamManager.findAllClusters();<NEW_LINE>if (!upstreamClusters.isEmpty()) {<NEW_LINE>info.put("upstreams", upstreamClusters.stream().map(upstreamCluster -> {<NEW_LINE>Map<String, Object> temp = new HashMap<>();<NEW_LINE>temp.put("service", upstreamCluster.getServiceId());<NEW_LINE>temp.put("uris", upstreamCluster.getUris());<NEW_LINE>LoadBalancedRSocket loadBalancedRSocket = upstreamCluster.getLoadBalancedRSocket();<NEW_LINE>temp.put("activeUris", loadBalancedRSocket.getActiveSockets().keySet());<NEW_LINE>if (!loadBalancedRSocket.getUnHealthyUriSet().isEmpty()) {<NEW_LINE>temp.put("unHealthyUris", loadBalancedRSocket.getUnHealthyUriSet());<NEW_LINE>}<NEW_LINE>temp.put("lastRefreshTimeStamp", new Date<MASK><NEW_LINE>temp.put("lastHealthCheckTimeStamp", new Date(loadBalancedRSocket.getLastHealthCheckTimeStamp()));<NEW_LINE>return temp;<NEW_LINE>}).collect(Collectors.toList()));<NEW_LINE>}<NEW_LINE>UpstreamCluster brokerCluster = upstreamManager.findClusterByServiceId("*");<NEW_LINE>if (brokerCluster != null) {<NEW_LINE>info.put("brokers", brokerCluster.getUris());<NEW_LINE>}<NEW_LINE>if (properties.getMetadata() != null && !properties.getMetadata().isEmpty()) {<NEW_LINE>info.put("metadata", properties.getMetadata());<NEW_LINE>}<NEW_LINE>if (!offlineServices.isEmpty()) {<NEW_LINE>info.put("offlineServices", offlineServices);<NEW_LINE>}<NEW_LINE>return info;<NEW_LINE>}
(loadBalancedRSocket.getLastRefreshTimeStamp()));
1,370,609
public void validate() {<NEW_LINE>String target = getTargetName();<NEW_LINE>// validate the parameters<NEW_LINE>if (delay() < 0) {<NEW_LINE>throw new FaultToleranceDefinitionException(Tr.formatMessage(tc, "circuitBreaker.parameter.delay.invalid.value.CWMFT5012E", "delay", delay(), target));<NEW_LINE>}<NEW_LINE>if ((failureRatio() < 0) || (failureRatio() > 1)) {<NEW_LINE>throw new FaultToleranceDefinitionException(Tr.formatMessage(tc, "circuitBreaker.parameter.failureRatio.invalid.value.CWMFT5013E", "failureRatio"<MASK><NEW_LINE>}<NEW_LINE>if (requestVolumeThreshold() < 1) {<NEW_LINE>throw new FaultToleranceDefinitionException(Tr.formatMessage(tc, "circuitBreaker.parameter.requestVolumeThreshold.invalid.value.CWMFT5014E", "requestVolumeThreshold", requestVolumeThreshold(), target));<NEW_LINE>}<NEW_LINE>if (successThreshold() < 1) {<NEW_LINE>throw new FaultToleranceDefinitionException(Tr.formatMessage(tc, "circuitBreaker.parameter.successThreshold.invalid.value.CWMFT5015E", "successThreshold", successThreshold(), target));<NEW_LINE>}<NEW_LINE>if (failOn().length == 0) {<NEW_LINE>throw new FaultToleranceDefinitionException(Tr.formatMessage(tc, "circuitBreaker.parameter.failOn.invalid.value.CWMFT5018E", "failOn", target));<NEW_LINE>}<NEW_LINE>}
, failureRatio(), target));
1,434,342
public synchronized boolean register(ResolvedDependency dependencyToResolve) {<NEW_LINE>SameResolvedDependencyInAllVersions allVersions = <MASK><NEW_LINE>if (allVersions.noValidVersionExists()) {<NEW_LINE>LOGGER.debug("{} doesn't exit in registry, add it.", dependencyToResolve);<NEW_LINE>allVersions.add(dependencyToResolve);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>ResolvedDependencyWithReferenceCount head = allVersions.headOfValidVersions();<NEW_LINE>int compareResult = PackageComparator.INSTANCE.compare(dependencyToResolve, head.resolvedDependency);<NEW_LINE>if (currentDependencyEqualsLatestOne(compareResult)) {<NEW_LINE>LOGGER.debug("Same version of {} already exited in registry, increase reference count to {}", dependencyToResolve, head.referenceCount);<NEW_LINE>head.referenceCount++;<NEW_LINE>return false;<NEW_LINE>} else if (currentDependencyShouldReplaceExistedOnes(compareResult)) {<NEW_LINE>LOGGER.debug("{} is newer, replace the old version {} in registry", dependencyToResolve, head.resolvedDependency);<NEW_LINE>allVersions.onlyDecreaseDescendantsReferenceCount();<NEW_LINE>allVersions.add(dependencyToResolve);<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>LOGGER.debug("{} is older, do nothing.", dependencyToResolve);<NEW_LINE>allVersions.addEvictedDependency(dependencyToResolve);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
getAllVersions(dependencyToResolve.getName());
1,221,069
public Void visitMethodInvocation(MethodInvocationTree javacTree, Node javaParserNode) {<NEW_LINE>if (javaParserNode instanceof MethodCallExpr) {<NEW_LINE>MethodCallExpr node = (MethodCallExpr) javaParserNode;<NEW_LINE>processMethodInvocation(javacTree, node);<NEW_LINE>// In javac, the type arguments will be empty if no type arguments are specified, but in<NEW_LINE>// JavaParser the type arguments will have the none Optional value.<NEW_LINE>assert javacTree.getTypeArguments().isEmpty() != node.getTypeArguments().isPresent();<NEW_LINE>if (!javacTree.getTypeArguments().isEmpty()) {<NEW_LINE>visitLists(javacTree.getTypeArguments(), node.getTypeArguments().get());<NEW_LINE>}<NEW_LINE>// In JavaParser, the method name itself and receiver are stored as fields of the<NEW_LINE>// invocation itself, but in javac they might be combined into one MemberSelectTree.<NEW_LINE>// That member select may also be a single IdentifierTree if no receiver was written.<NEW_LINE>// This requires one layer of unnesting.<NEW_LINE>ExpressionTree methodSelect = javacTree.getMethodSelect();<NEW_LINE>if (methodSelect.getKind() == Tree.Kind.IDENTIFIER) {<NEW_LINE>methodSelect.accept(this, node.getName());<NEW_LINE>} else if (methodSelect.getKind() == Tree.Kind.MEMBER_SELECT) {<NEW_LINE>MemberSelectTree selection = (MemberSelectTree) methodSelect;<NEW_LINE>assert node.getScope().isPresent();<NEW_LINE>selection.getExpression().accept(this, node.getScope().get());<NEW_LINE>} else {<NEW_LINE>throw new BugInCF("Unexpected method selection type: %s", methodSelect);<NEW_LINE>}<NEW_LINE>visitLists(javacTree.getArguments(), node.getArguments());<NEW_LINE>} else if (javaParserNode instanceof ExplicitConstructorInvocationStmt) {<NEW_LINE>ExplicitConstructorInvocationStmt node = (ExplicitConstructorInvocationStmt) javaParserNode;<NEW_LINE>processMethodInvocation(javacTree, node);<NEW_LINE>assert javacTree.getTypeArguments().isEmpty() != node.getTypeArguments().isPresent();<NEW_LINE>if (!javacTree.getTypeArguments().isEmpty()) {<NEW_LINE>visitLists(javacTree.getTypeArguments(), node.getTypeArguments().get());<NEW_LINE>}<NEW_LINE>visitLists(javacTree.getArguments(<MASK><NEW_LINE>} else {<NEW_LINE>throwUnexpectedNodeType(javacTree, javaParserNode);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
), node.getArguments());
1,731,995
private static void testFileEncryptionWithStream(StreamingAead ags, File tmpFile, int plaintextSize) throws Exception {<NEW_LINE>byte[] aad = TestUtil.hexDecode("aabbccddeeff");<NEW_LINE>byte[] pt = generatePlaintext(plaintextSize);<NEW_LINE>FileOutputStream ctStream = new FileOutputStream(tmpFile);<NEW_LINE>WritableByteChannel <MASK><NEW_LINE>WritableByteChannel encChannel = ags.newEncryptingChannel(channel, aad);<NEW_LINE>OutputStream encStream = Channels.newOutputStream(encChannel);<NEW_LINE>// Writing single bytes appears to be the most troubling case.<NEW_LINE>for (int i = 0; i < pt.length; i++) {<NEW_LINE>encStream.write(pt[i]);<NEW_LINE>}<NEW_LINE>encStream.close();<NEW_LINE>FileInputStream inpStream = new FileInputStream(tmpFile);<NEW_LINE>ReadableByteChannel inpChannel = Channels.newChannel(inpStream);<NEW_LINE>ReadableByteChannel decryptedChannel = ags.newDecryptingChannel(inpChannel, aad);<NEW_LINE>InputStream decrypted = Channels.newInputStream(decryptedChannel);<NEW_LINE>int decryptedSize = 0;<NEW_LINE>int read;<NEW_LINE>while (true) {<NEW_LINE>read = decrypted.read();<NEW_LINE>if (read == -1) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (read != (pt[decryptedSize] & 0xff)) {<NEW_LINE>fail("Incorrect decryption at position " + decryptedSize + " expected: " + pt[decryptedSize] + " read:" + read);<NEW_LINE>}<NEW_LINE>decryptedSize += 1;<NEW_LINE>}<NEW_LINE>assertEquals(plaintextSize, decryptedSize);<NEW_LINE>}
channel = Channels.newChannel(ctStream);
1,774,568
public InteractionResultHolder<ItemStack> use(Level world, Player player, @Nonnull InteractionHand hand) {<NEW_LINE>ItemStack stack = player.getItemInHand(hand);<NEW_LINE>if (!world.isClientSide && ManaItemHandler.instance().requestManaExactForTool(stack, player, MANA_COST, false)) {<NEW_LINE>BlockState bifrost = ModBlocks.bifrost.defaultBlockState();<NEW_LINE>Vec3 vector = player.getLookAngle().normalize();<NEW_LINE>double x = player.getX();<NEW_LINE>double y = player.getY() - 1;<NEW_LINE>double z = player.getZ();<NEW_LINE>BlockPos.MutableBlockPos pos = new BlockPos.MutableBlockPos((int) x, (int) y, (int) z);<NEW_LINE>double lastX = 0;<NEW_LINE>double lastY = -1;<NEW_LINE>double lastZ = 0;<NEW_LINE>BlockPos.MutableBlockPos <MASK><NEW_LINE>int count = 0;<NEW_LINE>boolean placedAny = false;<NEW_LINE>boolean prof = ManaItemHandler.instance().hasProficiency(player, stack);<NEW_LINE>int maxlen = prof ? 160 : 100;<NEW_LINE>int time = prof ? (int) (TIME * 1.6) : TIME;<NEW_LINE>BlockPos.MutableBlockPos placePos = new BlockPos.MutableBlockPos();<NEW_LINE>while (count < maxlen) {<NEW_LINE>previousPos.set(lastX, lastY, lastZ);<NEW_LINE>if (!previousPos.equals(pos)) {<NEW_LINE>// Occasionally moving to the next segment stays on the same location, skip it<NEW_LINE>if (!world.isEmptyBlock(pos) && world.getBlockState(pos) != bifrost && count >= 4) {<NEW_LINE>// Stop placing if you hit a wall (bifrost blocks are fine), but only after 4 segments.<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (world.isOutsideBuildHeight(pos.getY())) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (placeBridgeSegment(world, pos, placePos, time)) {<NEW_LINE>placedAny = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>count++;<NEW_LINE>lastX = x;<NEW_LINE>lastY = y;<NEW_LINE>lastZ = z;<NEW_LINE>x += vector.x;<NEW_LINE>y += vector.y;<NEW_LINE>z += vector.z;<NEW_LINE>pos.set(x, y, z);<NEW_LINE>}<NEW_LINE>if (placedAny) {<NEW_LINE>world.playSound(null, player.getX(), player.getY(), player.getZ(), ModSounds.bifrostRod, SoundSource.PLAYERS, 1F, 1F);<NEW_LINE>ManaItemHandler.instance().requestManaExactForTool(stack, player, MANA_COST, false);<NEW_LINE>player.getCooldowns().addCooldown(this, player.isCreative() ? 10 : TIME);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return InteractionResultHolder.success(stack);<NEW_LINE>}
previousPos = new BlockPos.MutableBlockPos();
1,411,817
public int numEnclaves(int[][] A) {<NEW_LINE>int n = A.length;<NEW_LINE>int m = A[0].length;<NEW_LINE>boolean[][] visited = new boolean[n][m];<NEW_LINE>for (int i = 0; i < n; ++i) {<NEW_LINE>walk(A, visited, i, 0);<NEW_LINE>walk(A, <MASK><NEW_LINE>}<NEW_LINE>for (int j = 0; j < m; ++j) {<NEW_LINE>walk(A, visited, 0, j);<NEW_LINE>walk(A, visited, n - 1, j);<NEW_LINE>}<NEW_LINE>int unreachables = 0;<NEW_LINE>for (int i = 0; i < n; ++i) {<NEW_LINE>for (int j = 0; j < m; ++j) {<NEW_LINE>if (A[i][j] == 1 && !visited[i][j]) {<NEW_LINE>++unreachables;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return unreachables;<NEW_LINE>}
visited, i, m - 1);
696,321
public void measureChildWithMargins(View child, int widthUsed, int heightUsed) {<NEW_LINE>// first get default measured size<NEW_LINE>super.measureChildWithMargins(child, widthUsed, heightUsed);<NEW_LINE>if (!isTabExpandEnabled())<NEW_LINE>return;<NEW_LINE>final int count = getItemCount();<NEW_LINE>if (count == 0)<NEW_LINE>return;<NEW_LINE>final int parentHeight = mRecyclerView.getHeight(), parentWidth = mRecyclerView.getWidth();<NEW_LINE>final int decoratedWidth = getDecoratedMeasuredWidth(child);<NEW_LINE>final <MASK><NEW_LINE>final int decoratorWidth = decoratedWidth - measuredWidth;<NEW_LINE>final int width = Math.max(measuredWidth, parentWidth / count - decoratorWidth);<NEW_LINE>final int heightMeasureSpec = MeasureSpec.makeMeasureSpec(parentHeight, MeasureSpec.EXACTLY);<NEW_LINE>final int widthMeasureSpec = MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY);<NEW_LINE>child.measure(widthMeasureSpec, heightMeasureSpec);<NEW_LINE>}
int measuredWidth = child.getMeasuredWidth();
283,597
public Object apply(final ActionContext ctx, final Object caller, final Object[] sources) throws FrameworkException {<NEW_LINE>try {<NEW_LINE>assertArrayHasMinLengthAndMaxLengthAndAllElementsNotNull(sources, 2, 3);<NEW_LINE>if (!(sources[0] instanceof Group)) {<NEW_LINE>logParameterError(caller, sources, "Expected node of type Group as first argument!", ctx.isJavaScriptContext());<NEW_LINE>} else if (!(sources[1] instanceof Principal)) {<NEW_LINE>logParameterError(caller, sources, "Expected node of type Principal as second argument!", ctx.isJavaScriptContext());<NEW_LINE>} else if ((sources[1] instanceof SuperUser)) {<NEW_LINE>logParameterError(caller, sources, <MASK><NEW_LINE>} else {<NEW_LINE>boolean checkHierarchy = (sources.length > 2 && sources[2] instanceof Boolean) ? (boolean) sources[2] : false;<NEW_LINE>final RelationshipType type = StructrApp.getInstance().getDatabaseService().forName(RelationshipType.class, "CONTAINS");<NEW_LINE>final Group group = (Group) sources[0];<NEW_LINE>final Principal principal = (Principal) sources[1];<NEW_LINE>return principalInGroup(new HashSet<>(), group, principal, type, checkHierarchy);<NEW_LINE>}<NEW_LINE>} catch (ArgumentNullException pe) {<NEW_LINE>// silently ignore null arguments<NEW_LINE>} catch (ArgumentCountException pe) {<NEW_LINE>logParameterError(caller, sources, pe.getMessage(), ctx.isJavaScriptContext());<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
"Expected node of type Principal as second argument - SuperUser can not be member of a group!", ctx.isJavaScriptContext());
320,630
protected void changeApplianceVmStatus(ApplianceVmStatus newStatus) {<NEW_LINE><MASK><NEW_LINE>if (newStatus == getSelf().getStatus()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ApplianceVmStatus oldStatus = getSelf().getStatus();<NEW_LINE>logger.debug(String.format("ApplianceVm [%s] changed status, old status: [%s], new status: [%s]", self.getUuid(), getInventory().getStatus(), newStatus.toString()));<NEW_LINE>getSelf().setStatus(newStatus);<NEW_LINE>self = dbf.updateAndRefresh(self);<NEW_LINE>ApplianceVmCanonicalEvents.ApplianceVmStatusChangedData d = new ApplianceVmCanonicalEvents.ApplianceVmStatusChangedData();<NEW_LINE>d.setApplianceVmUuid(self.getUuid());<NEW_LINE>d.setOldStatus(oldStatus.toString());<NEW_LINE>d.setNewStatus(newStatus.toString());<NEW_LINE>d.setInv(ApplianceVmInventory.valueOf(getSelf()));<NEW_LINE>evtf.fire(ApplianceVmCanonicalEvents.APPLIANCEVM_STATUS_CHANGED_PATH, d);<NEW_LINE>logger.debug(String.format("the virtual router [uuid:%s, name:%s] changed status from %s to %s", self.getUuid(), self.getName(), oldStatus.toString(), newStatus.toString()));<NEW_LINE>}
self = dbf.reload(self);
785,007
public String loginUser(String username, String password) throws RestClientException {<NEW_LINE>Object postBody = null;<NEW_LINE>// verify the required parameter 'username' is set<NEW_LINE>if (username == null) {<NEW_LINE>throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'username' when calling loginUser");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'password' is set<NEW_LINE>if (password == null) {<NEW_LINE>throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'password' when calling loginUser");<NEW_LINE>}<NEW_LINE>String path = UriComponentsBuilder.fromPath("/user/login").build().toUriString();<NEW_LINE>final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();<NEW_LINE>final HttpHeaders headerParams = new HttpHeaders();<NEW_LINE>final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();<NEW_LINE>queryParams.putAll(apiClient.parameterToMultiValueMap(null, "username", username));<NEW_LINE>queryParams.putAll(apiClient.parameterToMultiValueMap(null, "password", password));<NEW_LINE>final String[] accepts = { "application/xml", "application/json" };<NEW_LINE>final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);<NEW_LINE>final String[] contentTypes = {};<NEW_LINE>final MediaType <MASK><NEW_LINE>String[] authNames = new String[] {};<NEW_LINE>ParameterizedTypeReference<String> returnType = new ParameterizedTypeReference<String>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);<NEW_LINE>}
contentType = apiClient.selectHeaderContentType(contentTypes);
477,479
final CreateRegexPatternSetResult executeCreateRegexPatternSet(CreateRegexPatternSetRequest createRegexPatternSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createRegexPatternSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateRegexPatternSetRequest> request = null;<NEW_LINE>Response<CreateRegexPatternSetResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateRegexPatternSetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createRegexPatternSetRequest));<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, "WAFV2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateRegexPatternSet");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateRegexPatternSetResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateRegexPatternSetResultJsonUnmarshaller());<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);
135,369
private void initFields() {<NEW_LINE>String address = instance.getProperty(PayaraModule.DEBUG_PORT);<NEW_LINE>SpinnerNumberModel addressModel = (SpinnerNumberModel) addressValue.getModel();<NEW_LINE>javaPlatforms = JavaUtils.findSupportedPlatforms(this.instance);<NEW_LINE>((JavaPlatformsComboBox) javaComboBox).updateModel(javaPlatforms);<NEW_LINE>javaComboBox.setSelectedItem(instance.getJavaPlatform());<NEW_LINE>if (null == address || "0".equals(address) || "".equals(address)) {<NEW_LINE>useUserDefinedAddress.setSelected(false);<NEW_LINE>} else {<NEW_LINE>useUserDefinedAddress.setSelected(true);<NEW_LINE>setAddressValue(address);<NEW_LINE>}<NEW_LINE>if (Utilities.isWindows() && !instance.isRemote()) {<NEW_LINE>useSharedMemRB.setSelected("true".equals(instance.getProperty(PayaraModule.USE_SHARED_MEM_ATTR)));<NEW_LINE>useSocketRB.setSelected(!("true".equals(instance.getProperty(PayaraModule.USE_SHARED_MEM_ATTR))));<NEW_LINE>} else {<NEW_LINE>// not windows -- disable shared mem and correct it if it was set...<NEW_LINE>// or remote instance....<NEW_LINE>useSharedMemRB.setEnabled(false);<NEW_LINE>useSharedMemRB.setSelected(false);<NEW_LINE>useSocketRB.setSelected(true);<NEW_LINE>}<NEW_LINE>useIDEProxyInfo.setSelected("true".equals(instance.getProperty(PayaraModule.USE_IDE_PROXY_FLAG)));<NEW_LINE>boolean isLocalDomain = instance.getProperty(PayaraModule.DOMAINS_FOLDER_ATTR) != null;<NEW_LINE><MASK><NEW_LINE>this.useIDEProxyInfo.setEnabled(isLocalDomain);<NEW_LINE>this.useSharedMemRB.setEnabled(isLocalDomain);<NEW_LINE>}
this.javaComboBox.setEnabled(isLocalDomain);
1,269,361
public static BaseRawValueBasedPredicateEvaluator newRawValueBasedEvaluator(EqPredicate eqPredicate, DataType dataType) {<NEW_LINE>String value = eqPredicate.getValue();<NEW_LINE>switch(dataType) {<NEW_LINE>case INT:<NEW_LINE>return new IntRawValueBasedEqPredicateEvaluator(eqPredicate, Integer.parseInt(value));<NEW_LINE>case LONG:<NEW_LINE>return new LongRawValueBasedEqPredicateEvaluator(eqPredicate, Long.parseLong(value));<NEW_LINE>case FLOAT:<NEW_LINE>return new FloatRawValueBasedEqPredicateEvaluator(eqPredicate, Float.parseFloat(value));<NEW_LINE>case DOUBLE:<NEW_LINE>return new DoubleRawValueBasedEqPredicateEvaluator(eqPredicate, Double.parseDouble(value));<NEW_LINE>case BOOLEAN:<NEW_LINE>return new IntRawValueBasedEqPredicateEvaluator(eqPredicate, BooleanUtils.toInt(value));<NEW_LINE>case TIMESTAMP:<NEW_LINE>return new LongRawValueBasedEqPredicateEvaluator(eqPredicate, TimestampUtils.toMillisSinceEpoch(value));<NEW_LINE>case STRING:<NEW_LINE>return new StringRawValueBasedEqPredicateEvaluator(eqPredicate, value);<NEW_LINE>case BYTES:<NEW_LINE>return new BytesRawValueBasedEqPredicateEvaluator(eqPredicate, BytesUtils.toBytes(value));<NEW_LINE>default:<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
throw new IllegalStateException("Unsupported data type: " + dataType);
477,132
public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String epl = "@public create table RectangleTable(id string primary key, rx double, ry double, rw double, rh double);\n" + "create index MyIndex on RectangleTable((rx,ry,rw,rh) mxcifquadtree(0,0,100,100,4,20));\n" + "insert into RectangleTable select id, x as rx, y as ry, width as rw, height as rh from SupportSpatialEventRectangle;\n" + "@name('s0') on SupportSpatialAABB as aabb select pt.id as c0 from RectangleTable as pt where rectangle(rx,ry,rw,rh).intersects(rectangle(x,y,width,height));\n";<NEW_LINE>env.compileDeploy(epl, path).addListener("s0");<NEW_LINE>sendEventRectangle(env, "P1", 80, 80, 1, 1);<NEW_LINE>sendEventRectangle(env, "P2", <MASK><NEW_LINE>sendEventRectangle(env, "P3", 80, 81, 1, 1);<NEW_LINE>sendEventRectangle(env, "P4", 80, 80, 1, 1);<NEW_LINE>sendEventRectangle(env, "P5", 45, 55, 1, 1);<NEW_LINE>assertRectanglesManyRow(env, BOXES, null, null, "P5", "P1,P2,P3,P4", "P5");<NEW_LINE>env.milestone(0);<NEW_LINE>assertRectanglesManyRow(env, BOXES, null, null, "P5", "P1,P2,P3,P4", "P5");<NEW_LINE>env.compileExecuteFAFNoResult("delete from RectangleTable where id = 'P4'", path);<NEW_LINE>assertRectanglesManyRow(env, BOXES, null, null, "P5", "P1,P2,P3", "P5");<NEW_LINE>env.milestone(1);<NEW_LINE>assertRectanglesManyRow(env, BOXES, null, null, "P5", "P1,P2,P3", "P5");<NEW_LINE>env.undeployAll();<NEW_LINE>}
81, 80, 1, 1);
292,068
private org.batfish.datamodel.ospf.OspfArea.Builder toOspfAreaBuilder(OspfArea area, RouteFilterList summaryFilter) {<NEW_LINE>org.batfish.datamodel.ospf.OspfArea.Builder newAreaBuilder = org.batfish.datamodel.ospf.OspfArea.builder();<NEW_LINE>newAreaBuilder.setNumber(area.getName());<NEW_LINE>newAreaBuilder.setNssaSettings(toNssaSettings(area.getNssaSettings()));<NEW_LINE>newAreaBuilder.setStubSettings(toStubSettings<MASK><NEW_LINE>newAreaBuilder.setStubType(area.getStubType());<NEW_LINE>newAreaBuilder.addSummaries(area.getSummaries());<NEW_LINE>newAreaBuilder.setInjectDefaultRoute(area.getInjectDefaultRoute());<NEW_LINE>newAreaBuilder.setMetricOfDefaultRoute(area.getMetricOfDefaultRoute());<NEW_LINE>// Add summary filters for each area summary<NEW_LINE>for (Entry<Prefix, OspfAreaSummary> e2 : area.getSummaries().entrySet()) {<NEW_LINE>Prefix prefix = e2.getKey();<NEW_LINE>OspfAreaSummary summary = e2.getValue();<NEW_LINE>int prefixLength = prefix.getPrefixLength();<NEW_LINE>int filterMinPrefixLength = summary.isAdvertised() ? Math.min(Prefix.MAX_PREFIX_LENGTH, prefixLength + 1) : prefixLength;<NEW_LINE>summaryFilter.addLine(new org.batfish.datamodel.RouteFilterLine(LineAction.DENY, IpWildcard.create(prefix), new SubRange(filterMinPrefixLength, Prefix.MAX_PREFIX_LENGTH)));<NEW_LINE>}<NEW_LINE>summaryFilter.addLine(new org.batfish.datamodel.RouteFilterLine(LineAction.PERMIT, IpWildcard.create(Prefix.ZERO), new SubRange(0, Prefix.MAX_PREFIX_LENGTH)));<NEW_LINE>newAreaBuilder.setSummaryFilter(summaryFilter.getName());<NEW_LINE>return newAreaBuilder;<NEW_LINE>}
(area.getStubSettings()));
1,118,185
public static void main(String[] args) {<NEW_LINE>Options options = new Options();<NEW_LINE>options.addRequiredOption("p", "port", true, "port number");<NEW_LINE>options.addRequiredOption("l", "loadPath", true, ".jar files path for dynamic loading");<NEW_LINE>CommandLine line = null;<NEW_LINE>try {<NEW_LINE>CommandLineParser parser = new DefaultParser();<NEW_LINE>line = <MASK><NEW_LINE>} catch (ParseException e) {<NEW_LINE>HelpFormatter formatter = new HelpFormatter();<NEW_LINE>formatter.printHelp("Parser Command Line", options);<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>ParserGrpcServer server = new ParserGrpcServer(Integer.parseInt(line.getOptionValue("p")), line.getOptionValue("l"));<NEW_LINE>server.start();<NEW_LINE>server.blockUntilShutdown();<NEW_LINE>} catch (Exception e) {<NEW_LINE>System.err.println("start server failed");<NEW_LINE>System.err.printf("%s: %s\n", e.getClass(), e.getMessage());<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>}
parser.parse(options, args);
1,034,592
public static HighlightField of(org.springframework.data.elasticsearch.annotations.HighlightField field) {<NEW_LINE>org.springframework.data.elasticsearch.annotations.HighlightParameters parameters = field.parameters();<NEW_LINE>//<NEW_LINE>HighlightFieldParameters //<NEW_LINE>highlightParameters = //<NEW_LINE>HighlightFieldParameters.builder().//<NEW_LINE>withBoundaryChars(//<NEW_LINE>parameters.boundaryChars()).//<NEW_LINE>withBoundaryMaxScan(//<NEW_LINE>parameters.boundaryMaxScan()).//<NEW_LINE>withBoundaryScanner(//<NEW_LINE>parameters.boundaryScanner()).//<NEW_LINE>withBoundaryScannerLocale(//<NEW_LINE>parameters.boundaryScannerLocale()).//<NEW_LINE>withForceSource(//<NEW_LINE>parameters.forceSource()).//<NEW_LINE>withFragmenter(//<NEW_LINE>parameters.fragmenter()).//<NEW_LINE>withFragmentOffset(//<NEW_LINE>parameters.fragmentOffset()).//<NEW_LINE>withFragmentSize(//<NEW_LINE>parameters.fragmentSize()).//<NEW_LINE>withMatchedFields(//<NEW_LINE>parameters.matchedFields()).//<NEW_LINE>withNoMatchSize(//<NEW_LINE>parameters.noMatchSize()).//<NEW_LINE>withNumberOfFragments(//<NEW_LINE>parameters.numberOfFragments()).//<NEW_LINE>withOrder(//<NEW_LINE>parameters.order()).//<NEW_LINE>withPhraseLimit(//<NEW_LINE>parameters.phraseLimit()).//<NEW_LINE>withPreTags(//<NEW_LINE>parameters.preTags()).//<NEW_LINE>withPostTags(//<NEW_LINE>parameters.postTags()).//<NEW_LINE>withRequireFieldMatch(//<NEW_LINE>parameters.requireFieldMatch()).//<NEW_LINE>withType(parameters.<MASK><NEW_LINE>return new HighlightField(field.name(), highlightParameters);<NEW_LINE>}
type()).build();
1,028,971
void decode(Decoder decoder, Instruction instruction) {<NEW_LINE>if ((((decoder.state_zs_flags & (StateFlags.B | StateFlags.Z)) | decoder.state_aaa) & decoder.invalidCheckMask) != 0)<NEW_LINE>decoder.setInvalidInstruction();<NEW_LINE>instruction.setCode(code);<NEW_LINE>instruction.setOp0Register(decoder.state_reg + decoder.state_zs_extraRegisterBase + decoder.state_extraRegisterBaseEVEX + baseReg);<NEW_LINE>instruction.setOp1Register(decoder.state_vvvv + baseReg);<NEW_LINE>if (decoder.state_mod == 3) {<NEW_LINE>instruction.setOp2Register(decoder.state_rm + decoder.state_extraBaseRegisterBaseEVEX + baseReg);<NEW_LINE>} else {<NEW_LINE>instruction.setOp2Kind(OpKind.MEMORY);<NEW_LINE>decoder.readOpMem(instruction, tupleType);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>instruction.setImmediate8((byte) decoder.readByte());<NEW_LINE>}
instruction.setOp3Kind(OpKind.IMMEDIATE8);
550,399
private void addDocumentField(Document doc, String key, JsonNode value, FieldType fieldType) {<NEW_LINE>String valueText = value.asText() == "null" <MASK><NEW_LINE>if (STRING_FIELD_NAMES.contains(key)) {<NEW_LINE>doc.add(new StringField(key, valueText, Field.Store.YES));<NEW_LINE>} else if (FIELDS_WITHOUT_STEMMING.contains(key)) {<NEW_LINE>// index field without stemming but store original string value<NEW_LINE>FieldType nonStemmedType = new FieldType(fieldType);<NEW_LINE>nonStemmedType.setStored(true);<NEW_LINE>// token stream to be indexed<NEW_LINE>Analyzer nonStemmingAnalyzer = DefaultEnglishAnalyzer.newNonStemmingInstance(CharArraySet.EMPTY_SET);<NEW_LINE>TokenStream stream = nonStemmingAnalyzer.tokenStream(null, new StringReader(value.asText()));<NEW_LINE>Field field = new Field(key, valueText, nonStemmedType);<NEW_LINE>field.setTokenStream(stream);<NEW_LINE>doc.add(field);<NEW_LINE>nonStemmingAnalyzer.close();<NEW_LINE>} else if (key == CoreField.YEAR.name) {<NEW_LINE>// index as numeric value to allow range queries<NEW_LINE>try {<NEW_LINE>doc.add(new IntPoint(key, Integer.parseInt(valueText)));<NEW_LINE>} catch (Exception e) {<NEW_LINE>// year is not numeric value<NEW_LINE>}<NEW_LINE>doc.add(new StoredField(key, valueText));<NEW_LINE>} else {<NEW_LINE>doc.add(new Field(key, valueText, fieldType));<NEW_LINE>}<NEW_LINE>}
? "" : value.asText();
1,644,073
private void drawBackground(Canvas canvas) {<NEW_LINE>RectF rect = mCropWindowHandler.getRect();<NEW_LINE>float left = Math.max(BitmapUtils.getRectLeft(mBoundsPoints), 0);<NEW_LINE>float top = Math.max(BitmapUtils.getRectTop(mBoundsPoints), 0);<NEW_LINE>float right = Math.min(BitmapUtils.getRectRight(mBoundsPoints), getWidth());<NEW_LINE>float bottom = Math.min(BitmapUtils.getRectBottom(mBoundsPoints), getHeight());<NEW_LINE>if (mCropShape == CropImageView.CropShape.RECTANGLE) {<NEW_LINE>if (!isNonStraightAngleRotated() || Build.VERSION.SDK_INT <= 17) {<NEW_LINE>canvas.drawRect(left, top, right, rect.top, mBackgroundPaint);<NEW_LINE>canvas.drawRect(left, rect.bottom, right, bottom, mBackgroundPaint);<NEW_LINE>canvas.drawRect(left, rect.top, rect.left, rect.bottom, mBackgroundPaint);<NEW_LINE>canvas.drawRect(rect.right, rect.top, right, rect.bottom, mBackgroundPaint);<NEW_LINE>} else {<NEW_LINE>mPath.reset();<NEW_LINE>mPath.moveTo(mBoundsPoints[0], mBoundsPoints[1]);<NEW_LINE>mPath.lineTo(mBoundsPoints[<MASK><NEW_LINE>mPath.lineTo(mBoundsPoints[4], mBoundsPoints[5]);<NEW_LINE>mPath.lineTo(mBoundsPoints[6], mBoundsPoints[7]);<NEW_LINE>mPath.close();<NEW_LINE>canvas.save();<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {<NEW_LINE>canvas.clipOutPath(mPath);<NEW_LINE>} else {<NEW_LINE>canvas.clipPath(mPath, Region.Op.INTERSECT);<NEW_LINE>}<NEW_LINE>canvas.clipRect(rect, Region.Op.XOR);<NEW_LINE>canvas.drawRect(left, top, right, bottom, mBackgroundPaint);<NEW_LINE>canvas.restore();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>mPath.reset();<NEW_LINE>if (Build.VERSION.SDK_INT <= 17 && mCropShape == CropImageView.CropShape.OVAL) {<NEW_LINE>mDrawRect.set(rect.left + 2, rect.top + 2, rect.right - 2, rect.bottom - 2);<NEW_LINE>} else {<NEW_LINE>mDrawRect.set(rect.left, rect.top, rect.right, rect.bottom);<NEW_LINE>}<NEW_LINE>mPath.addOval(mDrawRect, Path.Direction.CW);<NEW_LINE>canvas.save();<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {<NEW_LINE>canvas.clipOutPath(mPath);<NEW_LINE>} else {<NEW_LINE>canvas.clipPath(mPath, Region.Op.XOR);<NEW_LINE>}<NEW_LINE>canvas.drawRect(left, top, right, bottom, mBackgroundPaint);<NEW_LINE>canvas.restore();<NEW_LINE>}<NEW_LINE>}
2], mBoundsPoints[3]);
1,540,496
public void matchFound(Map<String, Object> matchEvent, EventBean optionalTriggeringEvent) {<NEW_LINE>Map<String, Object> matchEventInclusive = null;<NEW_LINE>if (pattern.isInclusive()) {<NEW_LINE>if (matchEvent.size() < 2) {<NEW_LINE>matchEventInclusive = matchEvent;<NEW_LINE>} else {<NEW_LINE>// need to reorder according to tag order<NEW_LINE>LinkedHashMap<String, Object> ordered = new LinkedHashMap<>();<NEW_LINE>for (String key : pattern.getTaggedEvents()) {<NEW_LINE>ordered.put(key<MASK><NEW_LINE>}<NEW_LINE>for (String key : pattern.getArrayEvents()) {<NEW_LINE>ordered.put(key, matchEvent.get(key));<NEW_LINE>}<NEW_LINE>matchEventInclusive = ordered;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (pattern.getAsName() != null) {<NEW_LINE>// make sure the termination event does not contain the full match-event data which contains prior state<NEW_LINE>Map<String, Object> termEvent = new LinkedHashMap<>();<NEW_LINE>for (String tag : pattern.getPatternTags()) {<NEW_LINE>Object value = matchEvent.get(tag);<NEW_LINE>if (value != null) {<NEW_LINE>termEvent.put(tag, value);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>EventBean compositeEvent = controller.getRealization().getAgentInstanceContextCreate().getEventBeanTypedEventFactory().adapterForTypedMap(termEvent, pattern.getAsNameEventType());<NEW_LINE>HashMap<String, Object> data = new HashMap<>();<NEW_LINE>data.put(pattern.getAsName(), compositeEvent);<NEW_LINE>matchEvent = data;<NEW_LINE>}<NEW_LINE>callback.rangeNotification(conditionPath, this, null, matchEvent, optionalTriggeringEvent, matchEventInclusive, matchEvent);<NEW_LINE>}
, matchEvent.get(key));
847,838
private void runAssertionSelectNested(RegressionEnvironment env, String typename, FunctionSendEvent send, Function<Object, Object> optionalValueConversion, Pair[] tests, Class expectedPropertyType, RegressionPath path) {<NEW_LINE>String stmtText = "@name('s0') select " + " item.nested?.nestedValue as n1, " + " exists(item.nested?.nestedValue) as exists_n1, " + " item.nested?.nestedValue? as n2, " + " exists(item.nested?.nestedValue?) as exists_n2, " + " item.nested?.nestedNested.nestedNestedValue as n3, " + " exists(item.nested?.nestedNested.nestedNestedValue) as exists_n3, " + " item.nested?.nestedNested?.nestedNestedValue as n4, " + " exists(item.nested?.nestedNested?.nestedNestedValue) as exists_n4, " + " item.nested?.nestedNested.nestedNestedValue? as n5, " + " exists(item.nested?.nestedNested.nestedNestedValue?) as exists_n5, " + " item.nested?.nestedNested?.nestedNestedValue? as n6, " + " exists(item.nested?.nestedNested?.nestedNestedValue?) as exists_n6 " + " from " + typename;<NEW_LINE>env.compileDeploy(stmtText<MASK><NEW_LINE>String[] propertyNames = "n1,n2,n3,n4,n5,n6".split(",");<NEW_LINE>env.assertStatement("s0", statement -> {<NEW_LINE>EventType eventType = statement.getEventType();<NEW_LINE>for (String propertyName : propertyNames) {<NEW_LINE>assertEquals(expectedPropertyType, eventType.getPropertyType(propertyName));<NEW_LINE>assertEquals(Boolean.class, eventType.getPropertyType("exists_" + propertyName));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>for (Pair pair : tests) {<NEW_LINE>send.apply(env, pair.getFirst(), typename);<NEW_LINE>env.assertEventNew("s0", event -> SupportEventInfra.assertValuesMayConvert(event, propertyNames, (ValueWithExistsFlag[]) pair.getSecond(), optionalValueConversion));<NEW_LINE>}<NEW_LINE>env.undeployModuleContaining("s0");<NEW_LINE>}
, path).addListener("s0");
645,189
private void replaceWithSuperType(TreePath path, VariableTree oldVarTree, VariableElement varElement, Element superTypeElement) {<NEW_LINE>Types types = workingCopy.getTypes();<NEW_LINE>TypeMirror supTypeErasure = types.<MASK><NEW_LINE>DeclaredType varType = (DeclaredType) varElement.asType();<NEW_LINE>TypeMirror theType = null;<NEW_LINE>List<TypeMirror> supertypes = new LinkedList(types.directSupertypes(varType));<NEW_LINE>while (!supertypes.isEmpty()) {<NEW_LINE>TypeMirror supertype = supertypes.remove(0);<NEW_LINE>if (types.isSameType(types.erasure(supertype), supTypeErasure)) {<NEW_LINE>theType = supertype;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>supertypes.addAll(types.directSupertypes(supertype));<NEW_LINE>}<NEW_LINE>if (theType == null) {<NEW_LINE>theType = supTypeErasure;<NEW_LINE>}<NEW_LINE>Tree superTypeTree = make.Type(theType);<NEW_LINE>ExpressionTree oldInitTree = oldVarTree.getInitializer();<NEW_LINE>ModifiersTree oldModifiers = oldVarTree.getModifiers();<NEW_LINE>Tree newTree = make.Variable(oldModifiers, oldVarTree.getName(), superTypeTree, oldInitTree);<NEW_LINE>rewrite(oldVarTree, newTree);<NEW_LINE>}
erasure(superTypeElement.asType());
1,613,438
// ------------------------------- XP<NEW_LINE>private void hooverXP() {<NEW_LINE>double maxDist = Math.max(KillerJoeConfig.killerJoeHooverXpHeight.get(), Math.max(KillerJoeConfig.killerJoeHooverXpLength.get(), KillerJoeConfig.killerJoeHooverXpWidth.get()));<NEW_LINE>List<EntityXPOrb> xp = world.getEntitiesWithinAABB(EntityXPOrb.class, getHooverBounds(), null);<NEW_LINE>for (EntityXPOrb entity : xp) {<NEW_LINE>double xDist = (getPos().getX() + 0.5D - entity.posX);<NEW_LINE>double yDist = (getPos().getY() + 0.5D - entity.posY);<NEW_LINE>double zDist = (getPos().getZ() + 0.5D - entity.posZ);<NEW_LINE>double totalDistance = Math.sqrt(xDist * xDist + yDist * yDist + zDist * zDist);<NEW_LINE>if (totalDistance < 1.5) {<NEW_LINE>hooverXP(entity);<NEW_LINE>if (!needsMending()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} else if (MagnetUtil.shouldAttract(getPos(), entity, true)) {<NEW_LINE>double d = 1 - (Math.max(0.1, totalDistance) / maxDist);<NEW_LINE>double speed = 0.01 + (d * 0.02);<NEW_LINE>entity<MASK><NEW_LINE>entity.motionZ += zDist / totalDistance * speed;<NEW_LINE>entity.motionY += yDist / totalDistance * speed;<NEW_LINE>if (yDist > 0.5) {<NEW_LINE>entity.motionY = 0.12;<NEW_LINE>}<NEW_LINE>// force client sync because this movement is server-side only<NEW_LINE>boolean silent = entity.isSilent();<NEW_LINE>entity.setSilent(!silent);<NEW_LINE>entity.setSilent(silent);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.motionX += xDist / totalDistance * speed;
1,461,005
public PresentableForm generateForm(final ForgottenPasswordStateMachine forgottenPasswordStateMachine) {<NEW_LINE>final PwmRequestContext pwmRequestContext = forgottenPasswordStateMachine.getRequestContext();<NEW_LINE>final LinkedHashSet<IdentityVerificationMethod> remainingAvailableOptionalMethods = new LinkedHashSet<>(ForgottenPasswordUtil.figureRemainingAvailableOptionalAuthMethods(pwmRequestContext, forgottenPasswordStateMachine.getForgottenPasswordBean()));<NEW_LINE>final Map<String, String> <MASK><NEW_LINE>for (final IdentityVerificationMethod method : remainingAvailableOptionalMethods) {<NEW_LINE>if (method.isUserSelectable()) {<NEW_LINE>selectOptions.put(method.name(), method.getLabel(pwmRequestContext.getDomainConfig(), pwmRequestContext.getLocale()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final Map<String, String> locales = Collections.singletonMap("", LocaleHelper.getLocalizedMessage(pwmRequestContext.getLocale(), Display.Button_Select, pwmRequestContext.getDomainConfig()));<NEW_LINE>final FormConfiguration formConfiguration = FormConfiguration.builder().type(FormConfiguration.Type.select).required(true).selectOptions(selectOptions).labels(locales).name(PwmConstants.PARAM_METHOD_CHOICE).build();<NEW_LINE>return PresentableForm.builder().label(LocaleHelper.getLocalizedMessage(pwmRequestContext.getLocale(), Display.Title_ForgottenPassword, pwmRequestContext.getDomainConfig())).message(LocaleHelper.getLocalizedMessage(pwmRequestContext.getLocale(), Display.Display_RecoverVerificationChoice, pwmRequestContext.getDomainConfig())).formRow(PresentableFormRow.fromFormConfiguration(formConfiguration, pwmRequestContext.getLocale())).build();<NEW_LINE>}
selectOptions = new LinkedHashMap<>();
1,818,903
public byte[] serialize(Map<Object, Object> map) {<NEW_LINE>int size = map.size();<NEW_LINE>// Directly return the size (0) for empty map<NEW_LINE>if (size == 0) {<NEW_LINE>return new byte[Integer.BYTES];<NEW_LINE>}<NEW_LINE>// No need to close these 2 streams<NEW_LINE>ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();<NEW_LINE>DataOutputStream dataOutputStream = new DataOutputStream(byteArrayOutputStream);<NEW_LINE>try {<NEW_LINE>// Write the size of the map<NEW_LINE>dataOutputStream.writeInt(size);<NEW_LINE>// Write the serialized key-value pairs<NEW_LINE>Iterator<Map.Entry<Object, Object>> iterator = map.entrySet().iterator();<NEW_LINE>// First write the key type and value type<NEW_LINE>Map.Entry<Object, Object<MASK><NEW_LINE>Object firstKey = firstEntry.getKey();<NEW_LINE>Object firstValue = firstEntry.getValue();<NEW_LINE>int keyTypeValue = ObjectType.getObjectType(firstKey).getValue();<NEW_LINE>int valueTypeValue = ObjectType.getObjectType(firstValue).getValue();<NEW_LINE>dataOutputStream.writeInt(keyTypeValue);<NEW_LINE>dataOutputStream.writeInt(valueTypeValue);<NEW_LINE>// Then write each key-value pair<NEW_LINE>for (Map.Entry<Object, Object> entry : map.entrySet()) {<NEW_LINE>byte[] keyBytes = ObjectSerDeUtils.serialize(entry.getKey(), keyTypeValue);<NEW_LINE>dataOutputStream.writeInt(keyBytes.length);<NEW_LINE>dataOutputStream.write(keyBytes);<NEW_LINE>byte[] valueBytes = ObjectSerDeUtils.serialize(entry.getValue(), valueTypeValue);<NEW_LINE>dataOutputStream.writeInt(valueBytes.length);<NEW_LINE>dataOutputStream.write(valueBytes);<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new RuntimeException("Caught exception while serializing Map", e);<NEW_LINE>}<NEW_LINE>return byteArrayOutputStream.toByteArray();<NEW_LINE>}
> firstEntry = iterator.next();
1,426,065
public JobDetails unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>JobDetails jobDetails = new JobDetails();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("TranslatedDocumentsCount", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>jobDetails.setTranslatedDocumentsCount(context.getUnmarshaller(Integer.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("DocumentsWithErrorsCount", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>jobDetails.setDocumentsWithErrorsCount(context.getUnmarshaller(Integer.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("InputDocumentsCount", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>jobDetails.setInputDocumentsCount(context.getUnmarshaller(Integer.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return jobDetails;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
409,655
// -------------------------------------------------------------------------<NEW_LINE>private static double[] calculateSecondDerivative(double[] xValues, double[] yValues, int dataSize, double leftFirstDev, double rightFirstDev, boolean leftNatural, boolean rightNatural) {<NEW_LINE>double[] deltaX = new double[dataSize - 1];<NEW_LINE>double[] deltaYOverDeltaX = new double[dataSize - 1];<NEW_LINE>double[] oneOverDeltaX = new double[dataSize - 1];<NEW_LINE>for (int i = 0; i < dataSize - 1; i++) {<NEW_LINE>deltaX[i] = xValues[i + 1] - xValues[i];<NEW_LINE>oneOverDeltaX[i<MASK><NEW_LINE>deltaYOverDeltaX[i] = (yValues[i + 1] - yValues[i]) * oneOverDeltaX[i];<NEW_LINE>}<NEW_LINE>DoubleMatrix inverseTriDiag = getInverseTridiagonalMatrix(deltaX, leftNatural, rightNatural);<NEW_LINE>DoubleArray rhsVector = getRightVector(deltaYOverDeltaX, leftFirstDev, rightFirstDev, leftNatural, rightNatural);<NEW_LINE>return ((DoubleArray) OG_ALGEBRA.multiply(inverseTriDiag, rhsVector)).toArrayUnsafe();<NEW_LINE>}
] = 1.0 / deltaX[i];
1,438,779
private boolean swapInputs(RelMetadataQuery mq, LoptMultiJoin multiJoin, LoptJoinTree left, LoptJoinTree right, boolean selfJoin) {<NEW_LINE>boolean swap = false;<NEW_LINE>if (selfJoin) {<NEW_LINE>return !multiJoin.isLeftFactorInRemovableSelfJoin(((LoptJoinTree.Leaf) left.getFactorTree()).getId());<NEW_LINE>}<NEW_LINE>final Double leftRowCount = mq.getRowCount(left.getJoinTree());<NEW_LINE>final Double rightRowCount = mq.<MASK><NEW_LINE>// The left side is smaller than the right if it has fewer rows,<NEW_LINE>// or if it has the same number of rows as the right (excluding<NEW_LINE>// roundoff), but fewer columns.<NEW_LINE>if ((leftRowCount != null) && (rightRowCount != null) && ((leftRowCount < rightRowCount) || ((Math.abs(leftRowCount - rightRowCount) < RelOptUtil.EPSILON) && (rowWidthCost(left.getJoinTree()) < rowWidthCost(right.getJoinTree()))))) {<NEW_LINE>swap = true;<NEW_LINE>}<NEW_LINE>return swap;<NEW_LINE>}
getRowCount(right.getJoinTree());
1,799,333
public void run() {<NEW_LINE>String title = "About";<NEW_LINE>StringBuilder aboutString = new StringBuilder();<NEW_LINE>aboutString.append(TermuxUtils.getAppInfoMarkdownString(TermuxAPIActivity.this, TermuxUtils.AppInfoMode.TERMUX_AND_PLUGIN_PACKAGE));<NEW_LINE>aboutString.append("\n\n").append(AndroidUtils<MASK><NEW_LINE>aboutString.append("\n\n").append(TermuxUtils.getImportantLinksMarkdownString(TermuxAPIActivity.this));<NEW_LINE>ReportInfo reportInfo = new ReportInfo(title, TermuxConstants.TERMUX_APP.TERMUX_SETTINGS_ACTIVITY_NAME, title);<NEW_LINE>reportInfo.setReportString(aboutString.toString());<NEW_LINE>reportInfo.setReportSaveFileLabelAndPath(title, Environment.getExternalStorageDirectory() + "/" + FileUtils.sanitizeFileName(TermuxConstants.TERMUX_APP_NAME + "-" + title + ".log", true, true));<NEW_LINE>ReportActivity.startReportActivity(TermuxAPIActivity.this, reportInfo);<NEW_LINE>}
.getDeviceInfoMarkdownString(TermuxAPIActivity.this));
87,185
public void marshall(CreateDataSourceRequest createDataSourceRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createDataSourceRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createDataSourceRequest.getAwsAccountId(), AWSACCOUNTID_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDataSourceRequest.getDataSourceId(), DATASOURCEID_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDataSourceRequest.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDataSourceRequest.getType(), TYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDataSourceRequest.getDataSourceParameters(), DATASOURCEPARAMETERS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDataSourceRequest.getCredentials(), CREDENTIALS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDataSourceRequest.getPermissions(), PERMISSIONS_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createDataSourceRequest.getSslProperties(), SSLPROPERTIES_BINDING);<NEW_LINE>protocolMarshaller.marshall(createDataSourceRequest.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>}
createDataSourceRequest.getVpcConnectionProperties(), VPCCONNECTIONPROPERTIES_BINDING);