idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,787,830
public List<DataFetcherResult<CorpGroup>> batchLoad(final List<String> urns, final QueryContext context) {<NEW_LINE>try {<NEW_LINE>final List<Urn> corpGroupUrns = urns.stream().map(UrnUtils::getUrn).collect(Collectors.toList());<NEW_LINE>final Map<Urn, EntityResponse> corpGroupMap = _entityClient.batchGetV2(CORP_GROUP_ENTITY_NAME, new HashSet<>(corpGroupUrns), null, context.getAuthentication());<NEW_LINE>final List<EntityResponse> <MASK><NEW_LINE>for (Urn urn : corpGroupUrns) {<NEW_LINE>results.add(corpGroupMap.getOrDefault(urn, null));<NEW_LINE>}<NEW_LINE>return results.stream().map(gmsCorpGroup -> gmsCorpGroup == null ? null : DataFetcherResult.<CorpGroup>newResult().data(CorpGroupMapper.map(gmsCorpGroup)).build()).collect(Collectors.toList());<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new RuntimeException("Failed to batch load CorpGroup", e);<NEW_LINE>}<NEW_LINE>}
results = new ArrayList<>();
1,318,795
private static void testErrorCodeWithHeaderJAXRSUsingRowType() {<NEW_LINE>JsonObject requestJson = new JsonObject();<NEW_LINE>requestJson.put("code", 200);<NEW_LINE>requestJson.put("message", "test message");<NEW_LINE>ResponseEntity<MultiResponse200> result = template.postForEntity(SERVER + "/MultiErrorCodeService/errorCodeWithHeaderJAXRS", requestJson, MultiResponse200.class);<NEW_LINE>TestMgr.check(result.getStatusCodeValue(), 200);<NEW_LINE>TestMgr.check(result.getBody(<MASK><NEW_LINE>TestMgr.check(result.getBody().getCode(), 200);<NEW_LINE>TestMgr.check(result.getHeaders().getFirst("x-code"), 200);<NEW_LINE>MultiRequest request = new MultiRequest();<NEW_LINE>request.setCode(200);<NEW_LINE>request.setMessage("test message");<NEW_LINE>String stringRequest = Json.encode(request);<NEW_LINE>// wrap request to JsonObject<NEW_LINE>result = template.postForEntity(SERVER + "/MultiErrorCodeService/errorCodeWithHeaderJAXRS", new JsonObject(stringRequest), MultiResponse200.class);<NEW_LINE>TestMgr.check(result.getStatusCodeValue(), 200);<NEW_LINE>TestMgr.check(result.getBody().getMessage(), "test message");<NEW_LINE>TestMgr.check(result.getBody().getCode(), 200);<NEW_LINE>TestMgr.check(result.getHeaders().getFirst("x-code"), 200);<NEW_LINE>}
).getMessage(), "test message");
961,227
public void createXmlItem(XmlItem xmlItem) throws ApiException {<NEW_LINE>Object localVarPostBody = xmlItem;<NEW_LINE>// verify the required parameter 'xmlItem' is set<NEW_LINE>if (xmlItem == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'xmlItem' when calling createXmlItem");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/fake/create_xml_item";<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, String> localVarCookieParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = {};<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" };<NEW_LINE>final String <MASK><NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);<NEW_LINE>}
localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
1,812,278
public static String formatDownloadStatusDefaultLocale(DownloadManager manager) {<NEW_LINE>int state = manager.getState();<NEW_LINE>String tmp = "";<NEW_LINE>DiskManager dm = manager.getDiskManager();<NEW_LINE>switch(state) {<NEW_LINE>case DownloadManager.STATE_WAITING:<NEW_LINE>tmp = MessageText.getDefaultLocaleString("ManagerItem.waiting");<NEW_LINE>break;<NEW_LINE>case DownloadManager.STATE_INITIALIZING:<NEW_LINE>tmp = MessageText.getDefaultLocaleString("ManagerItem.initializing");<NEW_LINE>break;<NEW_LINE>case DownloadManager.STATE_INITIALIZED:<NEW_LINE>tmp = MessageText.getDefaultLocaleString("ManagerItem.initializing");<NEW_LINE>break;<NEW_LINE>case DownloadManager.STATE_ALLOCATING:<NEW_LINE>tmp = MessageText.getDefaultLocaleString("ManagerItem.allocating");<NEW_LINE>break;<NEW_LINE>case DownloadManager.STATE_CHECKING:<NEW_LINE>tmp = MessageText.getDefaultLocaleString("ManagerItem.checking");<NEW_LINE>break;<NEW_LINE>case DownloadManager.STATE_FINISHING:<NEW_LINE>tmp = MessageText.getDefaultLocaleString("ManagerItem.finishing");<NEW_LINE>break;<NEW_LINE>case DownloadManager.STATE_READY:<NEW_LINE>tmp = MessageText.getDefaultLocaleString("ManagerItem.ready");<NEW_LINE>break;<NEW_LINE>case DownloadManager.STATE_DOWNLOADING:<NEW_LINE>tmp = MessageText.getDefaultLocaleString("ManagerItem.downloading");<NEW_LINE>if (manager.isSwarmMerging()) {<NEW_LINE>tmp += " + " + MessageText.getDefaultLocaleString("TableColumn.header.mergeddata");<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case DownloadManager.STATE_SEEDING:<NEW_LINE>if (dm != null && dm.getCompleteRecheckStatus() != -1) {<NEW_LINE>int done = dm.getCompleteRecheckStatus();<NEW_LINE>if (done == -1) {<NEW_LINE>done = 1000;<NEW_LINE>}<NEW_LINE>// tmp = MessageText.getDefaultLocaleString("ManagerItem.seeding") + " + " +<NEW_LINE>// MessageText.getDefaultLocaleString("ManagerItem.checking") +<NEW_LINE>// ": " + formatPercentFromThousands( done );<NEW_LINE>tmp = formatPercentFromThousands(done) + " " + MessageText.getDefaultLocaleString("ManagerItem.checking") + "; " + MessageText.getDefaultLocaleString("ManagerItem.seeding");<NEW_LINE>} else if (manager.getPeerManager() != null && manager.getPeerManager().isSuperSeedMode()) {<NEW_LINE>tmp = MessageText.getDefaultLocaleString("ManagerItem.superseeding");<NEW_LINE>} else {<NEW_LINE>tmp = MessageText.getDefaultLocaleString("ManagerItem.seeding");<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case DownloadManager.STATE_STOPPING:<NEW_LINE><MASK><NEW_LINE>break;<NEW_LINE>case DownloadManager.STATE_STOPPED:<NEW_LINE>tmp = MessageText.getDefaultLocaleString(manager.isPaused() ? "ManagerItem.paused" : "ManagerItem.stopped");<NEW_LINE>break;<NEW_LINE>case DownloadManager.STATE_QUEUED:<NEW_LINE>tmp = MessageText.getDefaultLocaleString("ManagerItem.queued");<NEW_LINE>break;<NEW_LINE>case DownloadManager.STATE_ERROR:<NEW_LINE>// $NON-NLS-1$ //$NON-NLS-2$<NEW_LINE>tmp = MessageText.getDefaultLocaleString("ManagerItem.error").concat(": ").concat(manager.getErrorDetails());<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>tmp = String.valueOf(state);<NEW_LINE>}<NEW_LINE>return (tmp);<NEW_LINE>}
tmp = MessageText.getDefaultLocaleString("ManagerItem.stopping");
168,393
public boolean isSkipCandidateFromInvoicing(final I_C_Invoice_Candidate ic, final boolean ignoreInvoiceSchedule) {<NEW_LINE>// 04533: ignore already processed candidates<NEW_LINE>// task 08343: if the ic is processed (after the recent update), then skip it (this logic was in the where clause in C_Invoice_Candidate_EnqueueSelection)<NEW_LINE>final IMsgBL msgBL = Services.get(IMsgBL.class);<NEW_LINE>final Properties ctx = InterfaceWrapperHelper.getCtx(ic);<NEW_LINE>if (ic.isProcessed()) {<NEW_LINE>final String msg = msgBL.getMsg(ctx, MSG_INVOICE_CAND_BL_INVOICING_SKIPPED_PROCESSED, new Object[] { ic.getC_Invoice_Candidate_ID() });<NEW_LINE>Loggables.withLogger(logger, Level<MASK><NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// ignore "error" candidates<NEW_LINE>if (ic.isError()) {<NEW_LINE>final String msg = new StringBuilder().append(msgBL.getMsg(ctx, MSG_INVOICE_CAND_BL_INVOICING_SKIPPED_ERROR, new Object[] { ic.getC_Invoice_Candidate_ID() })).append(": ").append(ic.getErrorMsg()).toString();<NEW_LINE>Loggables.withLogger(logger, Level.DEBUG).addLog(msg);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (ic.isToClear()) {<NEW_LINE>// don't log (per Mark request) because those could be a lot and because user has no opportunity to react<NEW_LINE>final String msg = msgBL.getMsg(ctx, MSG_INVOICE_CAND_BL_INVOICING_SKIPPED_IS_TO_CLEAR, new Object[] { ic.getC_Invoice_Candidate_ID() });<NEW_LINE>Loggables.withLogger(logger, Level.DEBUG).addLog(msg);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (ic.isInDispute()) {<NEW_LINE>// don't log (per Mark request) because those could be a lot and because user has no opportunity to react<NEW_LINE>final String msg = msgBL.getMsg(ctx, MSG_INVOICE_CAND_BL_INVOICING_SKIPPED_IS_IN_DISPUTE, new Object[] { ic.getC_Invoice_Candidate_ID() });<NEW_LINE>Loggables.withLogger(logger, Level.DEBUG).addLog(msg);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (ic.isSimulation()) {<NEW_LINE>Loggables.withLogger(logger, Level.DEBUG).addLog(" #isSkipCandidateFromInvoicing: Skipping IC: {}," + " as it's a simulation and it shouldn't be invoiced!", ic.getC_Invoice_Candidate_ID());<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// flagged via field color<NEW_LINE>// ignore candidates that can't be invoiced yet<NEW_LINE>final LocalDate dateToInvoice = getDateToInvoice(ic);<NEW_LINE>if (!ignoreInvoiceSchedule && (dateToInvoice == null || dateToInvoice.isAfter(getToday()))) {<NEW_LINE>final String msg = msgBL.getMsg(ctx, MSG_INVOICE_CAND_BL_INVOICING_SKIPPED_DATE_TO_INVOICE, new Object[] { ic.getC_Invoice_Candidate_ID(), TimeUtil.asTimestamp(dateToInvoice), TimeUtil.asTimestamp(getToday()) });<NEW_LINE>Loggables.withLogger(logger, Level.DEBUG).addLog(msg);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// Don't skip!<NEW_LINE>return false;<NEW_LINE>}
.INFO).addLog(msg);
491,912
public boolean valid(WizardDescriptor wizardDescriptor) {<NEW_LINE>// clear the error message<NEW_LINE>wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, null);<NEW_LINE>wizardDescriptor.putProperty(WizardDescriptor.PROP_INFO_MESSAGE, null);<NEW_LINE>// check for the validity of the entered installation directory<NEW_LINE>// if it's invalid, return false<NEW_LINE>String location = getInstallLocation();<NEW_LINE>if (location.trim().isEmpty()) {<NEW_LINE>// NOI18N<NEW_LINE>String msg = NbBundle.getMessage(ServerLocationVisual.class, "ERR_EMPTY_SERVER_ROOT");<NEW_LINE>wizardDescriptor.putProperty(WizardDescriptor.PROP_INFO_MESSAGE, WLInstantiatingIterator.decorateMessage(msg));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>File serverRoot = FileUtil.normalizeFile(new File(location));<NEW_LINE>serverRoot = findServerLocation(serverRoot, wizardDescriptor);<NEW_LINE>if (serverRoot == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>location = serverRoot.getPath();<NEW_LINE>File weblogicJar = WebLogicLayout.getWeblogicJar(serverRoot);<NEW_LINE>if (!weblogicJar.exists()) {<NEW_LINE>File packed <MASK><NEW_LINE>if (packed.isFile()) {<NEW_LINE>// NOI18N<NEW_LINE>String msg = NbBundle.getMessage(ServerLocationVisual.class, "ERR_INVALID_CONFIGURE", Utilities.isWindows() ? "cmd" : "sh");<NEW_LINE>wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, WLInstantiatingIterator.decorateMessage(msg));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Version version = WebLogicLayout.getServerVersion(serverRoot);<NEW_LINE>if (!WebLogicLayout.isSupportedVersion(version)) {<NEW_LINE>// NOI18N<NEW_LINE>String msg = NbBundle.getMessage(ServerLocationVisual.class, "ERR_INVALID_SERVER_VERSION");<NEW_LINE>wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, WLInstantiatingIterator.decorateMessage(msg));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (!WebLogicLayout.isSupportedLayout(serverRoot)) {<NEW_LINE>// NOI18N<NEW_LINE>String msg = NbBundle.getMessage(ServerLocationVisual.class, "ERR_INVALID_SERVER_ROOT");<NEW_LINE>wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, WLInstantiatingIterator.decorateMessage(msg));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>WLPluginProperties.setLastServerRoot(location);<NEW_LINE>// set the server root in the parent instantiating iterator<NEW_LINE>instantiatingIterator.setServerRoot(location);<NEW_LINE>instantiatingIterator.setServerVersion(VersionBridge.getVersion(version));<NEW_LINE>instantiatingIterator.setRemote(remoteRadioButton.isSelected());<NEW_LINE>// everything seems ok<NEW_LINE>return true;<NEW_LINE>}
= new File(serverRoot, "server/lib/weblogic.jar.pack");
108,385
public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "c0,c1".split(",");<NEW_LINE>env.advanceTime(0);<NEW_LINE>String epl = "@Name('s0') select irstream theString as c0, intPrimitive as c1 from SupportBean#firsttime(10 sec)";<NEW_LINE>env.compileDeployAddListenerMileZero(epl, "s0");<NEW_LINE>env.milestone(1);<NEW_LINE>env.assertPropsPerRowIterator("s0", fields, new Object[0][]);<NEW_LINE>sendSupportBean(env, "E1", 1);<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { "E1", 1 });<NEW_LINE>env.milestone(2);<NEW_LINE>env.assertPropsPerRowIteratorAnyOrder("s0", fields, new Object[][] <MASK><NEW_LINE>env.advanceTime(2000);<NEW_LINE>sendSupportBean(env, "E2", 20);<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { "E2", 20 });<NEW_LINE>env.milestone(3);<NEW_LINE>env.advanceTime(9999);<NEW_LINE>env.milestone(4);<NEW_LINE>env.advanceTime(10000);<NEW_LINE>env.assertPropsPerRowIteratorAnyOrder("s0", fields, new Object[][] { { "E1", 1 }, { "E2", 20 } });<NEW_LINE>sendSupportBean(env, "E3", 30);<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>env.milestone(5);<NEW_LINE>sendSupportBean(env, "E4", 40);<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>env.assertPropsPerRowIteratorAnyOrder("s0", fields, new Object[][] { { "E1", 1 }, { "E2", 20 } });<NEW_LINE>env.undeployAll();<NEW_LINE>}
{ { "E1", 1 } });
1,216,637
public void customize(ConfigurableServletWebServerFactory container) {<NEW_LINE>LOG.trace("Servlet container is {}", container.getClass().getCanonicalName());<NEW_LINE>// Yes, there is a good reason we do this.<NEW_LINE>// We cannot count on the tomcat classes being on the classpath which will<NEW_LINE>// happen if the war is deployed to another app server like Jetty. So, we<NEW_LINE>// ensure this class does not have any direct dependencies on any Tomcat<NEW_LINE>// specific classes.<NEW_LINE>try {<NEW_LINE>Class<?> tomcatESCF = Class.forName("org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory");<NEW_LINE>if (tomcatESCF.isInstance(container)) {<NEW_LINE>LOG.info("Detected Tomcat web server");<NEW_LINE>LOG.debug("Attempting to optimize tomcat");<NEW_LINE>Object <MASK><NEW_LINE>Class<?> tomcatApplicationClass = Class.forName("org.airsonic.player.TomcatApplication");<NEW_LINE>Method configure = ReflectionUtils.findMethod(tomcatApplicationClass, "configure", tomcatESCF);<NEW_LINE>configure.invoke(null, tomcatESCFInstance);<NEW_LINE>LOG.debug("Tomcat optimizations complete");<NEW_LINE>} else {<NEW_LINE>LOG.debug("Skipping tomcat optimization as we are not running on tomcat");<NEW_LINE>}<NEW_LINE>} catch (NoClassDefFoundError | ClassNotFoundException e) {<NEW_LINE>LOG.debug("No tomcat classes found");<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.warn("An error happened while trying to optimize tomcat", e);<NEW_LINE>}<NEW_LINE>}
tomcatESCFInstance = tomcatESCF.cast(container);
999,738
public void deleteFileIfExistsCodeSnippets() {<NEW_LINE>// BEGIN: com.azure.storage.file.datalake.DataLakeDirectoryAsyncClient.deleteFileIfExists#String<NEW_LINE>client.deleteFileIfExists(fileName).subscribe(deleted -> {<NEW_LINE>if (deleted) {<NEW_LINE>System.out.println("successfully deleted.");<NEW_LINE>} else {<NEW_LINE>System.out.println("Does not exist.");<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// END: com.azure.storage.file.datalake.DataLakeDirectoryAsyncClient.deleteFileIfExists#String<NEW_LINE>// BEGIN: com.azure.storage.file.datalake.DataLakeDirectoryAsyncClient.deleteFileIfExistsWithResponse#String-DataLakePathDeleteOptions<NEW_LINE>DataLakeRequestConditions requestConditions = new DataLakeRequestConditions().setLeaseId(leaseId);<NEW_LINE>DataLakePathDeleteOptions options = new DataLakePathDeleteOptions().setIsRecursive(false).setRequestConditions(requestConditions);<NEW_LINE>client.deleteFileIfExistsWithResponse(fileName, options).subscribe(response -> {<NEW_LINE>if (response.getStatusCode() == 404) {<NEW_LINE>System.out.println("Does not exist.");<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>// END: com.azure.storage.file.datalake.DataLakeDirectoryAsyncClient.deleteFileIfExistsWithResponse#String-DataLakePathDeleteOptions<NEW_LINE>}
System.out.println("successfully deleted.");
1,791,272
public void initToolsMenu() {<NEW_LINE>Menu addMenu = mainMenuBar.addMenu(3, "_Tools");<NEW_LINE>addMenu.setAccelerator(KeyCombination.keyCombination("SHORTCUT+T"));<NEW_LINE>MenuItem restFulServerMenuItem = new MenuItem("Start LISA+ Virtual Controllers");<NEW_LINE>restFulServerMenuItem.setAccelerator(new KeyCodeCombination(KeyCode<MASK><NEW_LINE>restFulServerMenuItem.addEventHandler(EventType.ROOT, (Event event) -> {<NEW_LINE>Tools.startLisaRESTfulServer(GlobalConfig.getInstance().getLisaRESTfulServerPath(), GlobalConfig.getInstance().getLisaServerPort());<NEW_LINE>});<NEW_LINE>addMenu.getItems().add(restFulServerMenuItem);<NEW_LINE>addMenu.getItems().add(new SeparatorMenuItem());<NEW_LINE>MenuItem controlUnitPreferencesItem = new MenuItem("Control Units Management");<NEW_LINE>controlUnitPreferencesItem.setDisable(true);<NEW_LINE>controlUnitPreferencesItem.setAccelerator(new KeyCodeCombination(KeyCode.M, KeyCodeCombination.CONTROL_DOWN));<NEW_LINE>controlUnitPreferencesItem.addEventHandler(EventType.ROOT, (Event event) -> Actions.getInstance().openControlUnitPreferences());<NEW_LINE>addMenu.getItems().add(controlUnitPreferencesItem);<NEW_LINE>SystemProperties.getInstance().simulationOpenedProperty().addListener((ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) -> controlUnitPreferencesItem.setDisable(oldValue));<NEW_LINE>addMenu.getItems().add(new SeparatorMenuItem());<NEW_LINE>MenuItem preferenciesMenuItem = new MenuItem("System Preferences");<NEW_LINE>preferenciesMenuItem.addEventHandler(EventType.ROOT, (Event event) -> new SystemPreferencesWindow().show(0));<NEW_LINE>addMenu.getItems().add(preferenciesMenuItem);<NEW_LINE>}
.R, KeyCodeCombination.CONTROL_DOWN));
50,991
protected CaseElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, ActivityProcessor processor, BaseElement parentElement, Map<String, JsonNode> shapeMap, CmmnModel cmmnModel, CmmnJsonConverterContext converterContext, CmmnModelIdHelper cmmnModelIdHelper) {<NEW_LINE>Stage stage = new Stage();<NEW_LINE>stage.setId(CmmnJsonConverterUtil.getElementId(elementNode));<NEW_LINE>stage.setAutoComplete(CmmnJsonConverterUtil.getPropertyValueAsBoolean(PROPERTY_IS_AUTOCOMPLETE, elementNode));<NEW_LINE>String autoCompleteCondition = CmmnJsonConverterUtil.getPropertyValueAsString(PROPERTY_AUTOCOMPLETE_CONDITION, elementNode);<NEW_LINE>if (StringUtils.isNotEmpty(autoCompleteCondition)) {<NEW_LINE>stage.setAutoCompleteCondition(autoCompleteCondition);<NEW_LINE>}<NEW_LINE>stage.setDisplayOrder(CmmnJsonConverterUtil.getPropertyValueAsInteger(CmmnStencilConstants.PROPERTY_DISPLAY_ORDER, elementNode));<NEW_LINE>String includeInStageOverview = String.valueOf(CmmnJsonConverterUtil.getPropertyValueAsBoolean(CmmnStencilConstants<MASK><NEW_LINE>stage.setIncludeInStageOverview(includeInStageOverview);<NEW_LINE>JsonNode childShapesArray = elementNode.get(EDITOR_CHILD_SHAPES);<NEW_LINE>processor.processJsonElements(childShapesArray, modelNode, stage, shapeMap, converterContext, cmmnModel, cmmnModelIdHelper);<NEW_LINE>Stage parentStage = (Stage) parentElement;<NEW_LINE>stage.setParent(parentStage);<NEW_LINE>ListenerConverterUtil.convertJsonToLifeCycleListeners(elementNode, stage);<NEW_LINE>return stage;<NEW_LINE>}
.PROPERTY_INCLUDE_IN_STAGE_OVERVIEW, elementNode, true));
1,742,083
public void grantSystemPermission(String user, SystemPermission permission) throws AccumuloSecurityException {<NEW_LINE>try {<NEW_LINE>byte[] permBytes = zooCache.get(ZKUserPath + "/" + user + ZKUserSysPerms);<NEW_LINE>Set<SystemPermission> perms;<NEW_LINE>if (permBytes == null) {<NEW_LINE>perms = new TreeSet<>();<NEW_LINE>} else {<NEW_LINE>perms = ZKSecurityTool.convertSystemPermissions(permBytes);<NEW_LINE>}<NEW_LINE>if (perms.add(permission)) {<NEW_LINE>synchronized (zooCache) {<NEW_LINE>zooCache.clear();<NEW_LINE>zoo.putPersistentData(ZKUserPath + "/" + user + ZKUserSysPerms, ZKSecurityTool.convertSystemPermissions(perms), NodeExistsPolicy.OVERWRITE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (KeeperException e) {<NEW_LINE>log.error("{}", e.getMessage(), e);<NEW_LINE>throw new AccumuloSecurityException(<MASK><NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>log.error("{}", e.getMessage(), e);<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>}
user, SecurityErrorCode.CONNECTION_ERROR, e);
432,954
// snippet-start:[rekognition.java2.list_faces_collection.main]<NEW_LINE>public static void listFacesCollection(RekognitionClient rekClient, String collectionId) {<NEW_LINE>try {<NEW_LINE>ListFacesRequest facesRequest = ListFacesRequest.builder().collectionId(collectionId).maxResults(10).build();<NEW_LINE>ListFacesResponse facesResponse = rekClient.listFaces(facesRequest);<NEW_LINE>// For each face in the collection, print out the confidence level and face id value.<NEW_LINE>List<Face> faces = facesResponse.faces();<NEW_LINE>for (Face face : faces) {<NEW_LINE>System.out.println(<MASK><NEW_LINE>System.out.println("The face Id value is " + face.faceId());<NEW_LINE>}<NEW_LINE>} catch (RekognitionException e) {<NEW_LINE>System.out.println(e.getMessage());<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>}
"Confidence level there is a face: " + face.confidence());
713,524
public void testCompletedStage() throws Exception {<NEW_LINE>CompletionStage<Integer> cs0 = defaultManagedExecutor.completedStage(86);<NEW_LINE>// Disallow CompletableFuture methods:<NEW_LINE>CompletableFuture<Integer> cf0 = (CompletableFuture<Integer>) cs0;<NEW_LINE>try {<NEW_LINE>cf0.obtrudeValue(860);<NEW_LINE>fail("obtrudeValue must not be permitted on minimal stage: ");<NEW_LINE>} catch (UnsupportedOperationException x) {<NEW_LINE>}<NEW_LINE>// pass<NEW_LINE>try {<NEW_LINE>fail("cancel must not be permitted on minimal stage: " + cf0.cancel(true));<NEW_LINE>} catch (UnsupportedOperationException x) {<NEW_LINE>}<NEW_LINE>// pass<NEW_LINE>// Verify the value, and the thread of dependent stage:<NEW_LINE>final CompletableFuture<String> cf = new CompletableFuture<String>();<NEW_LINE>CompletionStage<Void> cs1 = cs0.thenAcceptAsync(value -> cf.complete(Thread.currentThread().getName<MASK><NEW_LINE>String result = cf.get(TIMEOUT_NS, TimeUnit.NANOSECONDS);<NEW_LINE>assertTrue(result, result.endsWith(":86"));<NEW_LINE>assertTrue(result, result.startsWith("Default Executor-thread-"));<NEW_LINE>assertTrue(result, !result.startsWith(Thread.currentThread().getName() + ':'));<NEW_LINE>// Disallow CompletableFuture methods on dependent stage:<NEW_LINE>CompletableFuture<Void> cf1 = (CompletableFuture<Void>) cs1;<NEW_LINE>try {<NEW_LINE>fail("get must not be permitted on minimal stage: " + cf1.get());<NEW_LINE>} catch (UnsupportedOperationException x) {<NEW_LINE>}<NEW_LINE>// pass<NEW_LINE>try {<NEW_LINE>cf1.obtrudeException(new ArithmeticException("test"));<NEW_LINE>fail("obtrudeException must not be permitted on minimal stage: ");<NEW_LINE>} catch (UnsupportedOperationException x) {<NEW_LINE>}<NEW_LINE>// pass<NEW_LINE>}
() + ":" + value));
17,836
public void onViewCreated(View root, @Nullable Bundle savedInstanceState) {<NEW_LINE>super.onViewCreated(root, savedInstanceState);<NEW_LINE>Context context = getContext();<NEW_LINE>ButterKnife.bind(this, root);<NEW_LINE>_appSettings = new AppSettings(root.getContext());<NEW_LINE>_contextUtils = new ContextUtils(root.getContext());<NEW_LINE>_shareUtil = new ShareUtil(root.getContext());<NEW_LINE>if (!(getActivity() instanceof FilesystemFragmentOptionsListener)) {<NEW_LINE>throw new RuntimeException("Error: " + getActivity().getClass().getName() + " doesn't implement FilesystemFragmentOptionsListener");<NEW_LINE>}<NEW_LINE>setDialogOptions(((FilesystemFragmentOptionsListener) getActivity()).getFilesystemFragmentOptions(_dopt));<NEW_LINE>LinearLayoutManager lam = (LinearLayoutManager) _recyclerList.getLayoutManager();<NEW_LINE>DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(getActivity(<MASK><NEW_LINE>_recyclerList.addItemDecoration(dividerItemDecoration);<NEW_LINE>_previousNotebookDirectory = _appSettings.getNotebookDirectoryAsStr();<NEW_LINE>_filesystemViewerAdapter = new FilesystemViewerAdapter(_dopt, context, _recyclerList);<NEW_LINE>_recyclerList.setAdapter(_filesystemViewerAdapter);<NEW_LINE>_filesystemViewerAdapter.getFilter().filter("");<NEW_LINE>onFsViewerDoUiUpdate(_filesystemViewerAdapter);<NEW_LINE>swipe.setOnRefreshListener(() -> {<NEW_LINE>_filesystemViewerAdapter.reloadCurrentFolder();<NEW_LINE>swipe.setRefreshing(false);<NEW_LINE>});<NEW_LINE>_filesystemViewerAdapter.restoreSavedInstanceState(savedInstanceState);<NEW_LINE>if (SearchEngine.isSearchExecuting) {<NEW_LINE>SearchEngine.activity.set(new WeakReference<>(getActivity()));<NEW_LINE>}<NEW_LINE>}
), lam.getOrientation());
1,572,767
private static String resolveHostToIpIfNecessary(String host) {<NEW_LINE>String schemaDelimiter = "://";<NEW_LINE>String schema = StringUtils.EMPTY;<NEW_LINE>if (host.contains(schemaDelimiter)) {<NEW_LINE>int index = host.indexOf(schemaDelimiter);<NEW_LINE>schema = host.substring(0, index);<NEW_LINE>host = host.substring(index + schemaDelimiter.length());<NEW_LINE>}<NEW_LINE>int index = host.lastIndexOf(':');<NEW_LINE>String name = index > 0 ? host.substring(0, index) : host;<NEW_LINE>// if the port is specified, include the ":"<NEW_LINE>String port = index > 0 ? host.substring(index) : "";<NEW_LINE>if (StringUtils.hasLetter(name)) {<NEW_LINE>try {<NEW_LINE>String hostAddress = InetAddress.getByName(<MASK><NEW_LINE>return StringUtils.hasText(schema) ? schema + schemaDelimiter + hostAddress : hostAddress;<NEW_LINE>} catch (UnknownHostException ex) {<NEW_LINE>throw new EsHadoopIllegalArgumentException("Cannot resolve ip for hostname: " + name);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return host;<NEW_LINE>}
name).getHostAddress() + port;
623,957
void checkForFaultyBookies() {<NEW_LINE>List<BookieId> faultyBookies = bookieClient.getFaultyBookies();<NEW_LINE>if (faultyBookies.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean isEnabled = false;<NEW_LINE>try {<NEW_LINE>isEnabled = metadataDriver.isHealthCheckEnabled().get();<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>Thread.currentThread().interrupt();<NEW_LINE>LOG.error("Cannot verify if healthcheck is enabled", e);<NEW_LINE>} catch (ExecutionException e) {<NEW_LINE>LOG.error("Cannot verify if healthcheck is enabled", e.getCause());<NEW_LINE>}<NEW_LINE>if (!isEnabled) {<NEW_LINE>LOG.info("Health checks is currently disabled!");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (BookieId faultyBookie : faultyBookies) {<NEW_LINE>if (Math.random() <= bookieQuarantineRatio) {<NEW_LINE>bookieWatcher.quarantineBookie(faultyBookie);<NEW_LINE>statsLogger.getCounter(BookKeeperServerStats.BOOKIE_QUARANTINE).inc();<NEW_LINE>} else {<NEW_LINE>statsLogger.getCounter(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
BookKeeperServerStats.BOOKIE_QUARANTINE_SKIP).inc();
755,097
public void acceptProblem(CategorizedProblem problem, char[] fragmentSource, int fragmentKind) {<NEW_LINE>try {<NEW_LINE>Map<String, Object> attributes = new HashMap<>();<NEW_LINE>attributes.put(IJavaModelMarker.ID, problem.getID());<NEW_LINE>attributes.put(IMarker.CHAR_START, problem.getSourceStart());<NEW_LINE>attributes.put(IMarker.CHAR_END, problem.getSourceEnd() + 1);<NEW_LINE>attributes.put(IMarker.LINE_NUMBER, problem.getSourceLineNumber());<NEW_LINE>attributes.put(IMarker.MESSAGE, problem.getMessage());<NEW_LINE>attributes.put(IMarker.SEVERITY, (problem.isError() ? IMarker.SEVERITY_ERROR : problem.isWarning() ? IMarker.SEVERITY_WARNING : IMarker.SEVERITY_INFO));<NEW_LINE>attributes.put(IMarker.SOURCE_ID, JavaBuilder.SOURCE_ID);<NEW_LINE>IMarker marker = ResourcesPlugin.getWorkspace().getRoot().createMarker(IJavaModelMarker.TRANSIENT_PROBLEM, attributes);<NEW_LINE>this.requestor.acceptProblem(marker, <MASK><NEW_LINE>} catch (CoreException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}
new String(fragmentSource), fragmentKind);
438,799
public static Result restCompare() {<NEW_LINE>DynamicForm form = Form.form().bindFromRequest(request());<NEW_LINE>String flowExecId1 = form.get(COMPARE_FLOW_ID1);<NEW_LINE>flowExecId1 = (flowExecId1 != null) ? flowExecId1.trim() : null;<NEW_LINE>String flowExecId2 = form.get(COMPARE_FLOW_ID2);<NEW_LINE>flowExecId2 = (flowExecId2 != null) ? flowExecId2.trim() : null;<NEW_LINE>List<AppResult> results1 = null;<NEW_LINE>List<AppResult> results2 = null;<NEW_LINE>if (flowExecId1 != null && !flowExecId1.isEmpty() && flowExecId2 != null && !flowExecId2.isEmpty()) {<NEW_LINE>results1 = AppResult.find.select("*").where().eq(AppResult.TABLE.FLOW_EXEC_ID, flowExecId1).setMaxRows(100).fetch(AppResult.TABLE.APP_HEURISTIC_RESULTS, "*").fetch(AppResult.TABLE.APP_HEURISTIC_RESULTS + "." + AppHeuristicResult.TABLE.APP_HEURISTIC_RESULT_DETAILS, "*").findList();<NEW_LINE>results2 = AppResult.find.select("*").where().eq(AppResult.TABLE.FLOW_EXEC_ID, flowExecId2).setMaxRows(100).fetch(AppResult.TABLE.APP_HEURISTIC_RESULTS, "*").fetch(AppResult.TABLE.APP_HEURISTIC_RESULTS + "." + AppHeuristicResult.TABLE.APP_HEURISTIC_RESULT_DETAILS, "*").findList();<NEW_LINE>}<NEW_LINE>Map<IdUrlPair, Map<IdUrlPair, List<AppResult>>> compareResults = compareFlows(results1, results2);<NEW_LINE>Map<String, Map<String, List<AppResult>>> resMap = new HashMap<String, Map<String, List<AppResult>>>();<NEW_LINE>for (Map.Entry<IdUrlPair, Map<IdUrlPair, List<AppResult>>> entry : compareResults.entrySet()) {<NEW_LINE>IdUrlPair jobExecPair = entry.getKey();<NEW_LINE>Map<IdUrlPair, List<AppResult>> value = entry.getValue();<NEW_LINE>for (Map.Entry<IdUrlPair, List<AppResult>> innerEntry : value.entrySet()) {<NEW_LINE>IdUrlPair flowExecPair = innerEntry.getKey();<NEW_LINE>List<AppResult> results = innerEntry.getValue();<NEW_LINE>Map<String, List<AppResult>> resultMap = new HashMap<String, List<AppResult>>();<NEW_LINE>resultMap.put(<MASK><NEW_LINE>resMap.put(jobExecPair.getId(), resultMap);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return ok(Json.toJson(resMap));<NEW_LINE>}
flowExecPair.getId(), results);
147,245
public void onTraversalStart() {<NEW_LINE>if (clusterSize <= 1) {<NEW_LINE>throw new CommandLineException.BadArgumentValue(CLUSTER_SIZE_LONG_NAME, "values lower than 2 are not allowed");<NEW_LINE>}<NEW_LINE>if (maskExtension < 0) {<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>if (filterRecordsNotInMask && mask == null) {<NEW_LINE>throw new CommandLineException.BadArgumentValue(FILTER_NOT_IN_MASK_LONG_NAME, "argument not allowed if mask argument is not provided");<NEW_LINE>}<NEW_LINE>filterExps = VariantContextUtils.initializeMatchExps(filterNames, filterExpressions);<NEW_LINE>genotypeFilterExps = VariantContextUtils.initializeMatchExps(genotypeFilterNames, genotypeFilterExpressions);<NEW_LINE>howToTreatMissingValues = failMissingValues ? JexlMissingValueTreatment.TREAT_AS_MATCH : JexlMissingValueTreatment.TREAT_AS_MISMATCH;<NEW_LINE>VariantContextUtils.engine.get().setSilent(true);<NEW_LINE>initializeVcfWriter();<NEW_LINE>}
CommandLineException.BadArgumentValue(MASK_EXTENSION_LONG_NAME, "negative values are not allowed");
63,159
// Uses Kahn's algorithm to do a topological sort and detect cycles<NEW_LINE>public static List<Vertex> sortVertices(Graph g) throws UnexpectedGraphCycleError {<NEW_LINE>if (g.getEdges().size() == 0)<NEW_LINE>return new ArrayList<>(g.getVertices());<NEW_LINE>List<Vertex> sorted = new ArrayList<>(g.getVertices().size());<NEW_LINE>Deque<Vertex> pending = new LinkedList<>();<NEW_LINE>pending.addAll(g.getRoots());<NEW_LINE>Set<Edge> <MASK><NEW_LINE>while (!pending.isEmpty()) {<NEW_LINE>Vertex currentVertex = pending.removeFirst();<NEW_LINE>sorted.add(currentVertex);<NEW_LINE>currentVertex.getOutgoingEdges().forEach(edge -> {<NEW_LINE>traversedEdges.add(edge);<NEW_LINE>Vertex toVertex = edge.getTo();<NEW_LINE>if (toVertex.getIncomingEdges().stream().allMatch(traversedEdges::contains)) {<NEW_LINE>pending.add(toVertex);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>// Check for cycles<NEW_LINE>if (g.edges().noneMatch(traversedEdges::contains)) {<NEW_LINE>throw new UnexpectedGraphCycleError(g);<NEW_LINE>}<NEW_LINE>return sorted;<NEW_LINE>}
traversedEdges = new HashSet<>();
496,996
private static Map<TypeAlias, jnr.ffi.NativeType> buildTypeMap() {<NEW_LINE>Map<TypeAlias, jnr.ffi.NativeType> m = new EnumMap<TypeAlias, NativeType>(TypeAlias.class);<NEW_LINE>m.put(<MASK><NEW_LINE>m.put(TypeAlias.u_int8_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.int16_t, NativeType.SSHORT);<NEW_LINE>m.put(TypeAlias.u_int16_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.int32_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.u_int32_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.int64_t, NativeType.SLONGLONG);<NEW_LINE>m.put(TypeAlias.u_int64_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.intptr_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.uintptr_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.caddr_t, NativeType.ADDRESS);<NEW_LINE>m.put(TypeAlias.dev_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.blkcnt_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.blksize_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.gid_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.in_addr_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.in_port_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.ino_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.ino64_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.key_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.mode_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.nlink_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.id_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.pid_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.off_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.swblk_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.uid_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.clock_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.size_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.ssize_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.time_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.fsblkcnt_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.fsfilcnt_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.sa_family_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.socklen_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.rlim_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.cc_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.speed_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.tcflag_t, NativeType.UINT);<NEW_LINE>return m;<NEW_LINE>}
TypeAlias.int8_t, NativeType.SCHAR);
1,529,800
private boolean selectFile() {<NEW_LINE>File selectedFile = CompletableFuture.supplyAsync(() -> {<NEW_LINE>FileChooser fChooser = new FileChooser();<NEW_LINE>// TODO: FIX BAD IMPLEMENTATION<NEW_LINE>fChooser.setTitle(MediatorControl.getInstance().getResourceBundle().getString("btn_OpenFile"));<NEW_LINE>// TODO: Consider fixing; not a prio.<NEW_LINE>fChooser.setInitialDirectory(new File(System.getProperty("user.home")));<NEW_LINE>fChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("*", "*"));<NEW_LINE>// Leave as is for now.<NEW_LINE>return fChooser.showOpenDialog(null);<NEW_LINE>}, Platform::runLater).join();<NEW_LINE>if (selectedFile != null) {<NEW_LINE>List<byte[]> command = new LinkedList<>();<NEW_LINE>byte[] selectedFileNameBytes = ("SPEC:/" + selectedFile.getName()<MASK><NEW_LINE>// since GL 0.7<NEW_LINE>command.add(intToArrLE(selectedFileNameBytes.length / 2));<NEW_LINE>command.add(selectedFileNameBytes);<NEW_LINE>if (writeGL_PASS(command)) {<NEW_LINE>print("GL Handle 'SelectFile' command", EMsgType.FAIL);<NEW_LINE>this.selectedFile = null;<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>this.selectedFile = selectedFile;<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Nothing selected; Report failure.<NEW_LINE>this.selectedFile = null;<NEW_LINE>return writeGL_FAIL("GL Handle 'SelectFile' command: Nothing selected");<NEW_LINE>}
).getBytes(StandardCharsets.UTF_16LE);
1,332,946
public void deleteTask(TaskEntity task, String deleteReason, boolean cascade) {<NEW_LINE>if (!task.isDeleted()) {<NEW_LINE>task.fireEvent(TaskListener.EVENTNAME_DELETE);<NEW_LINE>task.setDeleted(true);<NEW_LINE>CommandContext commandContext = Context.getCommandContext();<NEW_LINE>String taskId = task.getId();<NEW_LINE>List<Task> subTasks = findTasksByParentTaskId(taskId);<NEW_LINE>for (Task subTask : subTasks) {<NEW_LINE>deleteTask((TaskEntity) subTask, deleteReason, cascade);<NEW_LINE>}<NEW_LINE>commandContext.getIdentityLinkEntityManager().deleteIdentityLinksByTaskId(taskId);<NEW_LINE>commandContext.getVariableInstanceEntityManager().deleteVariableInstanceByTask(task);<NEW_LINE>if (cascade) {<NEW_LINE>commandContext.getHistoricTaskInstanceEntityManager().deleteHistoricTaskInstanceById(taskId);<NEW_LINE>} else {<NEW_LINE>commandContext.getHistoryManager().recordTaskEnd(taskId, deleteReason);<NEW_LINE>}<NEW_LINE>getDbSqlSession().delete(task);<NEW_LINE>if (commandContext.getEventDispatcher().isEnabled()) {<NEW_LINE>commandContext.getEventDispatcher().dispatchEvent(ActivitiEventBuilder.createEntityEvent(FlowableEngineEventType.ENTITY_DELETED<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
, task), EngineConfigurationConstants.KEY_PROCESS_ENGINE_CONFIG);
610,680
public void run(final FlowTrigger trigger, Map data) {<NEW_LINE>PrimaryStorageInventory ps = findSMPByHostUuid(context.getInventory().getClusterUuid());<NEW_LINE>if (ps == null) {<NEW_LINE>trigger.next();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>InitKvmHostMsg msg = new InitKvmHostMsg();<NEW_LINE>msg.setHypervisorType(context.getInventory().getHypervisorType());<NEW_LINE>msg.setHostUuid(context.getInventory().getUuid());<NEW_LINE>msg.setPrimaryStorageUuid(ps.getUuid());<NEW_LINE>bus.makeTargetServiceIdByResourceUuid(msg, PrimaryStorageConstant.SERVICE_ID, ps.getUuid());<NEW_LINE>bus.send(msg, new CloudBusCallBack(trigger) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run(MessageReply reply) {<NEW_LINE>if (!reply.isSuccess()) {<NEW_LINE>trigger.<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>SMPRecalculatePrimaryStorageCapacityMsg msg = new SMPRecalculatePrimaryStorageCapacityMsg();<NEW_LINE>msg.setPrimaryStorageUuid(ps.getUuid());<NEW_LINE>msg.setRelease(false);<NEW_LINE>bus.makeTargetServiceIdByResourceUuid(msg, PrimaryStorageConstant.SERVICE_ID, ps.getUuid());<NEW_LINE>bus.send(msg);<NEW_LINE>trigger.next();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
fail(reply.getError());
152,025
public int doStartTag() throws JspException {<NEW_LINE>HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();<NEW_LINE>// creates wsc/wu<NEW_LINE>Properties ctx = JSPEnv.getCtx(request);<NEW_LINE>WebSessionCtx wsc = WebSessionCtx.get(request);<NEW_LINE>//<NEW_LINE>HttpSession session = pageContext.getSession();<NEW_LINE>WebUser wu = (WebUser) session.getAttribute(WebUser.NAME);<NEW_LINE>if (wu != null && wu.isLoggedIn()) {<NEW_LINE>if (ctx != null) {<NEW_LINE>WebInfo info = (WebInfo) session.getAttribute(WebInfo.NAME);<NEW_LINE>if (info == null || wu.getAD_User_ID() != info.getAD_User_ID()) {<NEW_LINE>info = new WebInfo(ctx, wu);<NEW_LINE>session.setAttribute(WebInfo.NAME, info);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// log.fine("WebUser exists - " + wu);<NEW_LINE>//<NEW_LINE>JspWriter out = pageContext.getOut();<NEW_LINE>HtmlCode html = new HtmlCode();<NEW_LINE>//<NEW_LINE>if (wu.isCustomer() || wu.isVendor())<NEW_LINE>menuBPartner(html, wsc.wstore);<NEW_LINE>if (wu.isSalesRep())<NEW_LINE>menuSalesRep(html, wsc.wstore);<NEW_LINE>if (wu.isEmployee() || wu.isSalesRep())<NEW_LINE>menuUser(html, wu.isEmployee(), wsc.wstore);<NEW_LINE><MASK><NEW_LINE>//<NEW_LINE>html.output(out);<NEW_LINE>} else {<NEW_LINE>if (CLogMgt.isLevelFiner())<NEW_LINE>log.fine("No WebUser");<NEW_LINE>if (session.getAttribute(WebInfo.NAME) == null)<NEW_LINE>session.setAttribute(WebInfo.NAME, WebInfo.getGeneral());<NEW_LINE>}<NEW_LINE>return (SKIP_BODY);<NEW_LINE>}
menuAll(html, wsc.wstore);
1,435,602
private void runBookies() throws Exception {<NEW_LINE>LOG.info("Starting Bookie(s)");<NEW_LINE>// Create Bookie Servers (B1, B2, B3)<NEW_LINE>if (localBookiesConfigDir.exists() && localBookiesConfigDir.isFile()) {<NEW_LINE>throw new IOException(<MASK><NEW_LINE>}<NEW_LINE>if (!localBookiesConfigDir.exists() && !localBookiesConfigDir.mkdirs()) {<NEW_LINE>throw new IOException("Unable to create LocalBookiesConfigDir - " + localBookiesConfigDir.getAbsolutePath());<NEW_LINE>}<NEW_LINE>allocator = BookieResources.createAllocator(baseConf);<NEW_LINE>for (int i = 0; i < numberOfBookies; i++) {<NEW_LINE>runBookie(i);<NEW_LINE>}<NEW_LINE>ServerConfiguration baseConfWithCorrectZKServers = new ServerConfiguration((ServerConfiguration) baseConf.clone());<NEW_LINE>if (null == baseConf.getMetadataServiceUriUnchecked()) {<NEW_LINE>baseConfWithCorrectZKServers.setMetadataServiceUri(baseConf.getMetadataServiceUri());<NEW_LINE>}<NEW_LINE>serializeLocalBookieConfig(baseConfWithCorrectZKServers, "baseconf.conf");<NEW_LINE>}
"Unable to create LocalBookiesConfigDir, since there is a file at " + localBookiesConfigDir.getAbsolutePath());
572,470
private static void init() {<NEW_LINE>getConnection(true);<NEW_LINE>if (jadb == null) {<NEW_LINE>try {<NEW_LINE>new AdbServerLauncher().launch();<NEW_LINE>Debug.log(3, "ADBClient: ADBServer started");<NEW_LINE>getConnection(false);<NEW_LINE>if (jadb != null) {<NEW_LINE>shouldStopServer = true;<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>// Cannot run program "adb": error=2, No such file or directory<NEW_LINE>if (e.getMessage().startsWith("Cannot run program")) {<NEW_LINE>isAdbAvailable = false;<NEW_LINE>Debug.error("ADBClient: package adb not available. need to be installed");<NEW_LINE>} else {<NEW_LINE>Debug.error("ADBClient: ADBServer problem: %s", e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String serial = null;<NEW_LINE>if (jadb != null) {<NEW_LINE>List<JadbDevice> devices = null;<NEW_LINE>try {<NEW_LINE>devices = jadb.getDevices();<NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>if (devices != null && devices.size() > 0) {<NEW_LINE>device = devices.get(0);<NEW_LINE>serial = device.getSerial();<NEW_LINE>} else {<NEW_LINE>device = null;<NEW_LINE>Debug.error("ADBClient: init: no devices attached");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (device != null) {<NEW_LINE>Debug.<MASK><NEW_LINE>}<NEW_LINE>}
log(3, "ADBClient: init: attached device: serial(%s)", serial);
921,103
private RexNode convertJoinCondition(Blackboard bb, SqlValidatorNamespace leftNamespace, SqlValidatorNamespace rightNamespace, SqlNode condition, JoinConditionType conditionType, RelNode leftRel, RelNode rightRel) {<NEW_LINE>if (condition == null) {<NEW_LINE>return rexBuilder.makeLiteral(true);<NEW_LINE>}<NEW_LINE>bb.setRoot(ImmutableList.of(leftRel, rightRel));<NEW_LINE>replaceSubQueries(bb, condition, RelOptUtil.Logic.UNKNOWN_AS_FALSE);<NEW_LINE>switch(conditionType) {<NEW_LINE>case ON:<NEW_LINE>bb.setRoot(ImmutableList.of(leftRel, rightRel));<NEW_LINE>return bb.convertExpression(condition);<NEW_LINE>case USING:<NEW_LINE>final SqlNodeList list = (SqlNodeList) condition;<NEW_LINE>final List<String> nameList = new ArrayList<>();<NEW_LINE>for (SqlNode columnName : list) {<NEW_LINE><MASK><NEW_LINE>String name = id.getSimple();<NEW_LINE>nameList.add(name);<NEW_LINE>}<NEW_LINE>return convertUsing(leftNamespace, rightNamespace, nameList);<NEW_LINE>default:<NEW_LINE>throw Util.unexpected(conditionType);<NEW_LINE>}<NEW_LINE>}
final SqlIdentifier id = (SqlIdentifier) columnName;
472,482
public void run() {<NEW_LINE>if (Double.parseDouble(Current_Version) > Double.parseDouble(Latest_Version)) {<NEW_LINE>try {<NEW_LINE>com.google.android.material.snackbar.Snackbar.make(main_refresh_layout, "API Update Failed", com.google.android.material.snackbar.Snackbar.LENGTH_LONG).show();<NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>sub_7.setText(VERSIONS.getString("AMOLED_CLONED", ""));<NEW_LINE>Timer = new TimerTask() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>runOnUiThread(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>main_refresh_layout.setRefreshing(false);<NEW_LINE>list_menu_2.setAdapter(new List_menu_2Adapter(listdata));<NEW_LINE>((BaseAdapter) list_menu_2.getAdapter()).notifyDataSetChanged();<NEW_LINE>main_body.setAlpha((float) (1.0d));<NEW_LINE>if (!LIST_REFRESH.getString("UPDATE", "").equals("ON")) {<NEW_LINE>String currentDateTimeString = java.text.DateFormat.getDateTimeInstance().format(new Date());<NEW_LINE>com.google.android.material.snackbar.Snackbar.make(main_refresh_layout, "API Updated | " + (currentDateTimeString), com.google.android.material.snackbar.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>};<NEW_LINE>_timer.schedule(Timer, (int) (500));<NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
Snackbar.LENGTH_LONG).show();
352,813
private Wo list(Business business, Wi wi) throws Exception {<NEW_LINE>List<Person> os = business.person().pick(wi.getPersonList());<NEW_LINE>List<String> groupIds = new ArrayList<>();<NEW_LINE>List<String> personIds = new ArrayList<>();<NEW_LINE>List<String> unitIds = new ArrayList<>();<NEW_LINE>for (Person person : os) {<NEW_LINE>personIds.add(person.getId());<NEW_LINE>groupIds.addAll(business.group().listSupNestedWithPerson(person.getId()));<NEW_LINE>}<NEW_LINE>groupIds = ListTools.trim(groupIds, true, true);<NEW_LINE>List<Identity> identities = this.identities(business, personIds);<NEW_LINE>for (Identity o : identities) {<NEW_LINE>unitIds.<MASK><NEW_LINE>}<NEW_LINE>unitIds = ListTools.trim(unitIds, true, true);<NEW_LINE>groupIds.addAll(this.groupsContainsUnit(business, unitIds));<NEW_LINE>groupIds = ListTools.trim(groupIds, true, true);<NEW_LINE>EntityManager em = business.entityManagerContainer().get(Role.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<String> cq = cb.createQuery(String.class);<NEW_LINE>Root<Role> root = cq.from(Role.class);<NEW_LINE>Predicate p = root.get(Role_.personList).in(personIds);<NEW_LINE>p = cb.or(p, root.get(Role_.groupList).in(groupIds));<NEW_LINE>List<String> roleIds = em.createQuery(cq.select(root.get(Role_.id)).where(p)).getResultList().stream().distinct().collect(Collectors.toList());<NEW_LINE>Wo wo = new Wo();<NEW_LINE>wo.getRoleList().addAll(business.role().listRoleDistinguishedNameSorted(roleIds));<NEW_LINE>return wo;<NEW_LINE>}
add(o.getUnit());
1,094,206
private void postProcessKaifaE0003() {<NEW_LINE>logger.debug("postProcessKaifaE0003");<NEW_LINE>// First check of there is at least one entry of a power failure present<NEW_LINE>// (i.e. date at idx 2 and duration at idx 3)<NEW_LINE>if (cosemValues.size() > FIRST_POWER_FAILURE_DURATION) {<NEW_LINE>CosemDate powerFailureDate = (CosemDate) cosemValues.get(FIRST_POWER_FAILURE_DATE);<NEW_LINE>CosemInteger powerFailureDuration = (CosemInteger) cosemValues.get(FIRST_POWER_FAILURE_DURATION);<NEW_LINE>Calendar epoch = Calendar.getInstance();<NEW_LINE>epoch.<MASK><NEW_LINE>// Check if the first entry it as epoc and has a 2^32-1 value<NEW_LINE>// If so, filter this value, since it has no added value<NEW_LINE>if (powerFailureDate.getValue().getCalendar().before(epoch) && powerFailureDuration.getValue().intValue() == Integer.MAX_VALUE) {<NEW_LINE>logger.debug("Filter invalid power failure entry");<NEW_LINE>cosemValues.remove(FIRST_POWER_FAILURE_DURATION);<NEW_LINE>cosemValues.remove(FIRST_POWER_FAILURE_DATE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
setTime(new Date(0));
556,077
private BuiltQuery<?> createTable() {<NEW_LINE>StringBuilder query = new StringBuilder();<NEW_LINE>Keyspace ks = schemaKeyspace();<NEW_LINE>String tableName = cqlName(this.tableName);<NEW_LINE>query.append("CREATE TABLE ");<NEW_LINE>if (ifNotExists) {<NEW_LINE>query.append("IF NOT EXISTS ");<NEW_LINE>} else if (ks.table(this.tableName) != null) {<NEW_LINE>throw invalid("A table named %s already exists", tableName);<NEW_LINE>}<NEW_LINE>query.append(ks.cqlName()).append('.').append(tableName);<NEW_LINE>query.append(" (");<NEW_LINE>query.append(createColumns.stream().map(c -> c.cqlName() + " " + c.type().cqlDefinition() + (c.kind() == Column.Kind.Static ? " STATIC" : "")).collect(Collectors.joining(", ")));<NEW_LINE>query.append(", ");<NEW_LINE><MASK><NEW_LINE>query.append(")");<NEW_LINE>WithAdder with = new WithAdder(query);<NEW_LINE>addClusteringOrder(with, createColumns);<NEW_LINE>addComment(with);<NEW_LINE>addDefaultTTL(with);<NEW_LINE>return new BuiltOther(valueCodec, executor, query.toString());<NEW_LINE>}
addPrimaryKey(query, createColumns, tableName);
1,163,395
private void saveL10N(DataOutputStream output, Hashtable l10n) throws IOException {<NEW_LINE>List keys = new ArrayList();<NEW_LINE>for (Object locale : l10n.keySet()) {<NEW_LINE>Hashtable current = (Hashtable) l10n.get(locale);<NEW_LINE>for (Object key : current.keySet()) {<NEW_LINE>if (!keys.contains(key)) {<NEW_LINE>keys.add(key);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>output.writeShort(keys.size());<NEW_LINE>output.writeShort(l10n.size());<NEW_LINE>for (Object key : keys) {<NEW_LINE>output<MASK><NEW_LINE>}<NEW_LINE>for (Object locale : l10n.keySet()) {<NEW_LINE>Hashtable currentLanguage = (Hashtable) l10n.get(locale);<NEW_LINE>output.writeUTF((String) locale);<NEW_LINE>for (Object key : keys) {<NEW_LINE>String k = (String) currentLanguage.get(key);<NEW_LINE>if (k != null) {<NEW_LINE>output.writeUTF(k);<NEW_LINE>} else {<NEW_LINE>output.writeUTF("");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.writeUTF((String) key);
711,932
private Mono<PagedResponse<AttestationInner>> listSinglePageAsync(Integer top, String filter, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String apiVersion = "2021-01-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), top, filter, apiVersion, accept, context).map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue()<MASK><NEW_LINE>}
.nextLink(), null));
157,152
// don't release the lock if this method returns true for success; instead, the caller should<NEW_LINE>// clean up by calling finishUpdatingLogsUsed()<NEW_LINE>@SuppressFBWarnings(value = "UL_UNRELEASED_LOCK", justification = "lock is released by caller calling finishedUpdatingLogsUsed method")<NEW_LINE>public boolean beginUpdatingLogsUsed(InMemoryMap memTable, DfsLogger more, boolean mincFinish) {<NEW_LINE>boolean releaseLock = true;<NEW_LINE>// do not hold tablet lock while acquiring the log lock<NEW_LINE>logLock.lock();<NEW_LINE>try {<NEW_LINE>synchronized (this) {<NEW_LINE>if (isCloseComplete()) {<NEW_LINE>throw new IllegalStateException("Can not update logs of closed tablet " + extent);<NEW_LINE>}<NEW_LINE>boolean addToOther;<NEW_LINE>if (memTable == getTabletMemory().getMinCMemTable()) {<NEW_LINE>addToOther = true;<NEW_LINE>} else if (memTable == getTabletMemory().getMemTable()) {<NEW_LINE>addToOther = false;<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("Passed in memtable that is not in use for " + extent);<NEW_LINE>}<NEW_LINE>if (mincFinish) {<NEW_LINE>if (addToOther) {<NEW_LINE>throw new IllegalStateException("Adding to other logs for mincFinish on " + extent);<NEW_LINE>}<NEW_LINE>if (!otherLogs.isEmpty()) {<NEW_LINE>throw new IllegalStateException("Expect other logs to be 0 when minC finish, but its " + otherLogs + " for " + extent);<NEW_LINE>}<NEW_LINE>// when writing a minc finish event, there is no need to add the log to metadata<NEW_LINE>// if nothing has been logged for the tablet since the minor compaction started<NEW_LINE>if (currentLogs.isEmpty()) {<NEW_LINE>return !releaseLock;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>boolean added;<NEW_LINE>boolean contained;<NEW_LINE>if (addToOther) {<NEW_LINE>added = otherLogs.add(more);<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>added = currentLogs.add(more);<NEW_LINE>contained = otherLogs.contains(more);<NEW_LINE>}<NEW_LINE>if (added) {<NEW_LINE>rebuildReferencedLogs();<NEW_LINE>}<NEW_LINE>if (added && !contained) {<NEW_LINE>releaseLock = false;<NEW_LINE>}<NEW_LINE>return !releaseLock;<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>if (releaseLock) {<NEW_LINE>logLock.unlock();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
contained = currentLogs.contains(more);
358,665
public void dump(PrintWriter pw) {<NEW_LINE>pw.println("DeviceState:");<NEW_LINE>pw.println(" canStartSystemGesture=" + canStartSystemGesture());<NEW_LINE>pw.println(" systemUiFlags=" + mSystemUiStateFlags);<NEW_LINE>pw.println(" systemUiFlagsDesc=" + QuickStepContract.getSystemUiStateString(mSystemUiStateFlags));<NEW_LINE>pw.println(" assistantAvailable=" + mAssistantAvailable);<NEW_LINE>pw.println(" assistantDisabled=" + QuickStepContract.isAssistantGestureDisabled(mSystemUiStateFlags));<NEW_LINE>pw.println(" isUserUnlocked=" + mIsUserUnlocked);<NEW_LINE><MASK><NEW_LINE>pw.println(" isSwipeToNotificationEnabled=" + mIsSwipeToNotificationEnabled);<NEW_LINE>pw.println(" deferredGestureRegion=" + mDeferredGestureRegion);<NEW_LINE>pw.println(" pipIsActive=" + mPipIsActive);<NEW_LINE>mRotationTouchHelper.dump(pw);<NEW_LINE>}
pw.println(" isOneHandedModeEnabled=" + mIsOneHandedModeEnabled);
877,912
final DescribeRefreshSchemasStatusResult executeDescribeRefreshSchemasStatus(DescribeRefreshSchemasStatusRequest describeRefreshSchemasStatusRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeRefreshSchemasStatusRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeRefreshSchemasStatusRequest> request = null;<NEW_LINE>Response<DescribeRefreshSchemasStatusResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeRefreshSchemasStatusRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeRefreshSchemasStatusRequest));<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, "Database Migration Service");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeRefreshSchemasStatus");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeRefreshSchemasStatusResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeRefreshSchemasStatusResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1,073,546
final StopPipelineExecutionResult executeStopPipelineExecution(StopPipelineExecutionRequest stopPipelineExecutionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(stopPipelineExecutionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<StopPipelineExecutionRequest> request = null;<NEW_LINE>Response<StopPipelineExecutionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new StopPipelineExecutionRequestProtocolMarshaller(protocolFactory).marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SageMaker");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopPipelineExecution");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<StopPipelineExecutionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StopPipelineExecutionResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(stopPipelineExecutionRequest));
227,968
private JSONObject serviceList(HttpServletRequest request) {<NEW_LINE>String namespaceId = WebUtils.optional(request, CommonParams.NAMESPACE_ID, Constants.DEFAULT_NAMESPACE_ID);<NEW_LINE>JSONObject result = new JSONObject();<NEW_LINE>int page = Integer.parseInt(WebUtils.required(request, "pageNo"));<NEW_LINE>int pageSize = Integer.parseInt(WebUtils.required(request, "pageSize"));<NEW_LINE>String keyword = WebUtils.optional(request, "keyword", StringUtils.EMPTY);<NEW_LINE>String containedInstance = WebUtils.optional(request, "instance", StringUtils.EMPTY);<NEW_LINE>boolean hasIpCount = Boolean.parseBoolean(WebUtils.optional(request, "hasIpCount", "false"));<NEW_LINE>List<Service> services = new ArrayList<>();<NEW_LINE>int total = serviceManager.getPagedService(namespaceId, page - 1, pageSize, keyword, containedInstance, services, hasIpCount);<NEW_LINE>if (CollectionUtils.isEmpty(services)) {<NEW_LINE>result.put("serviceList", Collections.emptyList());<NEW_LINE>result.put("count", 0);<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>JSONArray serviceJsonArray = new JSONArray();<NEW_LINE>for (Service service : services) {<NEW_LINE>ServiceView serviceView = new ServiceView();<NEW_LINE>serviceView.setName(NamingUtils.getServiceName(service.getName()));<NEW_LINE>serviceView.setGroupName(NamingUtils.getGroupName(service.getName()));<NEW_LINE>serviceView.setClusterCount(service.getClusterMap().size());<NEW_LINE>serviceView.setIpCount(service.<MASK><NEW_LINE>// FIXME should be optimized:<NEW_LINE>int validCount = 0;<NEW_LINE>for (Instance instance : service.allIPs()) {<NEW_LINE>if (instance.isHealthy()) {<NEW_LINE>validCount++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>serviceView.setHealthyInstanceCount(validCount);<NEW_LINE>serviceJsonArray.add(serviceView);<NEW_LINE>}<NEW_LINE>result.put("serviceList", serviceJsonArray);<NEW_LINE>result.put("count", total);<NEW_LINE>return result;<NEW_LINE>}
allIPs().size());
223,047
public void refetchCounterXml(int serverId, final MapPack param) throws Exception {<NEW_LINE>Server server = ServerManager.getInstance().getServer(serverId);<NEW_LINE>if (server == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TcpProxy tcp = TcpProxy.getTcpProxy(serverId);<NEW_LINE>Pack p = null;<NEW_LINE>try {<NEW_LINE>p = tcp.getSingle(RequestCmd.GET_XML_COUNTER, null);<NEW_LINE>} catch (Exception e) {<NEW_LINE>ConsoleProxy.errorSafe(e.toString());<NEW_LINE>} finally {<NEW_LINE>TcpProxy.putTcpProxy(tcp);<NEW_LINE>}<NEW_LINE>if (p != null) {<NEW_LINE>ConsoleProxy.infoSafe("***********************************");<NEW_LINE>ConsoleProxy.infoSafe("Refetch counter.xml is successfully read from " + server.getName());<NEW_LINE>CounterEngine engine = server.getCounterEngine();<NEW_LINE>MapPack m = (MapPack) p;<NEW_LINE>engine.clear();<NEW_LINE>Value v1 = m.get("default");<NEW_LINE>engine.parse((<MASK><NEW_LINE>v1 = m.get("custom");<NEW_LINE>if (v1 != null) {<NEW_LINE>engine.parse(((BlobValue) v1).value);<NEW_LINE>}<NEW_LINE>server.setDirty(true);<NEW_LINE>ConsoleProxy.infoSafe("Applied Complete.");<NEW_LINE>ConsoleProxy.infoSafe("***********************************");<NEW_LINE>}<NEW_LINE>}
(BlobValue) v1).value);
1,400,224
private void storeFeedDetails() {<NEW_LINE>// Store the facebook and twitter page name in the shared preference from the database<NEW_LINE>storePageName(<MASK><NEW_LINE>storePageName(ConstantStrings.SOCIAL_LINK_TWITTER, ConstantStrings.TWITTER_PAGE_NAME);<NEW_LINE>if (SharedPreferencesUtil.getString(ConstantStrings.FACEBOOK_PAGE_ID, null) == null && SharedPreferencesUtil.getString(ConstantStrings.FACEBOOK_PAGE_NAME, null) != null) {<NEW_LINE>disposable.add(FacebookApi.getFacebookGraphAPI().getPageId(SharedPreferencesUtil.getString(ConstantStrings.FACEBOOK_PAGE_NAME, null), getResources().getString(R.string.facebook_access_token)).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(facebookPageId -> {<NEW_LINE>String id = facebookPageId.getId();<NEW_LINE>SharedPreferencesUtil.putString(ConstantStrings.FACEBOOK_PAGE_ID, id);<NEW_LINE>}, throwable -> Timber.d("Facebook page id download failed: " + throwable.toString())));<NEW_LINE>}<NEW_LINE>}
ConstantStrings.SOCIAL_LINK_FACEBOOK, ConstantStrings.FACEBOOK_PAGE_NAME);
1,270,270
public boolean isBalanced(String str) {<NEW_LINE>if (null == str || ((str.length() % 2) != 0)) {<NEW_LINE>return false;<NEW_LINE>} else {<NEW_LINE>char[] ch = str.toCharArray();<NEW_LINE>for (char c : ch) {<NEW_LINE>if (!(c == '{' || c == '[' || c == '(' || c == '}' || c == ']' || c == ')')) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Deque<Character> <MASK><NEW_LINE>for (char ch : str.toCharArray()) {<NEW_LINE>if (ch == '{' || ch == '[' || ch == '(') {<NEW_LINE>deque.addFirst(ch);<NEW_LINE>} else {<NEW_LINE>if (!deque.isEmpty() && ((deque.peekFirst() == '{' && ch == '}') || (deque.peekFirst() == '[' && ch == ']') || (deque.peekFirst() == '(' && ch == ')'))) {<NEW_LINE>deque.removeFirst();<NEW_LINE>} else {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
deque = new LinkedList<>();
1,768,406
static HashMap<String, SimpleSet> findPackagesInModules(final ClasspathJrt jrt) {<NEW_LINE>String zipFileName = jrt.zipFilename;<NEW_LINE>HashMap<String, SimpleSet> cache = PackageCache.get(zipFileName);<NEW_LINE>if (cache != null) {<NEW_LINE>return cache;<NEW_LINE>}<NEW_LINE>final HashMap<String, SimpleSet> packagesInModule = new HashMap<>();<NEW_LINE>PackageCache.put(zipFileName, packagesInModule);<NEW_LINE>try {<NEW_LINE>final File imageFile = new File(zipFileName);<NEW_LINE>org.eclipse.jdt.internal.compiler.util.JRTUtil.walkModuleImage(imageFile, new org.eclipse.jdt.internal.compiler.util.JRTUtil.JrtFileVisitor<Path>() {<NEW_LINE><NEW_LINE>SimpleSet packageSet = null;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public FileVisitResult visitPackage(Path dir, Path mod, BasicFileAttributes attrs) throws IOException {<NEW_LINE>ClasspathJar.addToPackageSet(this.packageSet, dir.toString(), true);<NEW_LINE>return FileVisitResult.CONTINUE;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public FileVisitResult visitFile(Path file, Path mod, BasicFileAttributes attrs) throws IOException {<NEW_LINE>return FileVisitResult.CONTINUE;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public FileVisitResult visitModule(Path mod) throws IOException {<NEW_LINE>String name = mod.toString();<NEW_LINE>try {<NEW_LINE>jrt.acceptModule(JRTUtil.getClassfileContent(imageFile, IModule.MODULE_INFO_CLASS, name));<NEW_LINE>} catch (ClassFormatException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>this.packageSet = new SimpleSet(41);<NEW_LINE>// $NON-NLS-1$<NEW_LINE><MASK><NEW_LINE>packagesInModule.put(name, this.packageSet);<NEW_LINE>return FileVisitResult.CONTINUE;<NEW_LINE>}<NEW_LINE>}, JRTUtil.NOTIFY_PACKAGES | JRTUtil.NOTIFY_MODULES);<NEW_LINE>} catch (IOException e) {<NEW_LINE>// TODO: Java 9 Should report better<NEW_LINE>}<NEW_LINE>return packagesInModule;<NEW_LINE>}
this.packageSet.add("");
1,682,167
public RestChannelConsumer doCatRequest(final RestRequest request, final NodeClient client) {<NEW_LINE>final ClusterStateRequest clusterStateRequest = new ClusterStateRequest();<NEW_LINE>clusterStateRequest.clear().nodes(true);<NEW_LINE>clusterStateRequest.local(request.paramAsBoolean("local", clusterStateRequest.local()));<NEW_LINE>clusterStateRequest.masterNodeTimeout(request.paramAsTime("master_timeout", clusterStateRequest.masterNodeTimeout()));<NEW_LINE>return channel -> client.admin().cluster().state(clusterStateRequest, new RestActionListener<ClusterStateResponse>(channel) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void processResponse(final ClusterStateResponse clusterStateResponse) {<NEW_LINE>NodesInfoRequest nodesInfoRequest = new NodesInfoRequest();<NEW_LINE>nodesInfoRequest.clear().addMetric(NodesInfoRequest.<MASK><NEW_LINE>client.admin().cluster().nodesInfo(nodesInfoRequest, new RestResponseListener<NodesInfoResponse>(channel) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public RestResponse buildResponse(NodesInfoResponse nodesInfoResponse) throws Exception {<NEW_LINE>return RestTable.buildResponse(buildTable(request, clusterStateResponse, nodesInfoResponse), channel);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
Metric.PROCESS.metricName());
796,997
protected void drawFrame(Canvas canvas) {<NEW_LINE>Layout layout = mHTextView.getLayout();<NEW_LINE>int gapIndex = 0;<NEW_LINE>for (int i = 0; i < layout.getLineCount(); i++) {<NEW_LINE>int lineStart = layout.getLineStart(i);<NEW_LINE>int lineEnd = layout.getLineEnd(i);<NEW_LINE>float lineLeft = layout.getLineLeft(i);<NEW_LINE>float <MASK><NEW_LINE>String lineText = mText.subSequence(lineStart, lineEnd).toString();<NEW_LINE>for (int c = 0; c < lineText.length(); c++) {<NEW_LINE>int alpha = alphaList.get(gapIndex);<NEW_LINE>mPaint.setAlpha((int) ((255 - alpha) * progress + alpha));<NEW_LINE>canvas.drawText(String.valueOf(lineText.charAt(c)), lineLeft, lineBaseline, mPaint);<NEW_LINE>lineLeft += gapList.get(gapIndex++);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
lineBaseline = layout.getLineBaseline(i);
1,440,692
public ListDatasetGroupsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListDatasetGroupsResult listDatasetGroupsResult = new ListDatasetGroupsResult();<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 listDatasetGroupsResult;<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("DatasetGroups", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listDatasetGroupsResult.setDatasetGroups(new ListUnmarshaller<DatasetGroupSummary>(DatasetGroupSummaryJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("NextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listDatasetGroupsResult.setNextToken(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return listDatasetGroupsResult;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,667,749
private void handleMentions(long lastTime, long delay, long presentTime) {<NEW_LINE>if (presentTime - lastTime < delay) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>updateDBLong("lastpoll_mentions", presentTime);<NEW_LINE>String lastID = PhantomBot.instance().getDataStore().GetString("twitter", "", "lastid_mentions");<NEW_LINE>List<TweetData> statuses = TwitterAPI.instance().getMentions(lastID);<NEW_LINE>if (statuses == null || statuses.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String twitterID = statuses.get(0).getId();<NEW_LINE>String tweet = statuses.get(0).getText() + " [" + TwitterAPI.instance().getTwitterURLFromId(twitterID) + "]";<NEW_LINE>String name = statuses.get(0).getUser().getName();<NEW_LINE>PhantomBot.instance().getDataStore().SetString(<MASK><NEW_LINE>updateDBString("last_mentions", tweet);<NEW_LINE>EventBus.instance().post(new TwitterEvent(tweet, name));<NEW_LINE>}
"twitter", "", "lastid_mentions", twitterID);
1,254,119
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>MapActivity mapActivity = requireMapActivity();<NEW_LINE>LayoutInflater themedInflater = UiUtilities.getInflater(mapActivity, nightMode);<NEW_LINE>view = themedInflater.inflate(R.<MASK><NEW_LINE>mapWindow = view.findViewById(R.id.map_window);<NEW_LINE>View minZoomPreviewContainer = view.findViewById(R.id.min_zoom_tile_preview);<NEW_LINE>View maxZoomPreviewContainer = view.findViewById(R.id.max_zoom_tile_preview);<NEW_LINE>minZoomPreviewImage = minZoomPreviewContainer.findViewById(R.id.tile_image);<NEW_LINE>maxZoomPreviewImage = maxZoomPreviewContainer.findViewById(R.id.tile_image);<NEW_LINE>minZoomPreviewText = minZoomPreviewContainer.findViewById(R.id.tile_zoom);<NEW_LINE>maxZoomPreviewText = maxZoomPreviewContainer.findViewById(R.id.tile_zoom);<NEW_LINE>selectedMinZoomText = view.findViewById(R.id.min_zoom);<NEW_LINE>selectedMaxZoomText = view.findViewById(R.id.max_zoom);<NEW_LINE>slider = view.findViewById(R.id.zooms_range_slider);<NEW_LINE>tilesNumberText = view.findViewById(R.id.tiles_number);<NEW_LINE>estimatedDownloadSizeText = view.findViewById(R.id.estimated_download_size);<NEW_LINE>mapView.rotateToAnimate(0);<NEW_LINE>setupToolbar();<NEW_LINE>view.getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onGlobalLayout() {<NEW_LINE>view.getViewTreeObserver().removeOnGlobalLayoutListener(this);<NEW_LINE>moveMapCenterToMapWindow();<NEW_LINE>updateTileSourceContent();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>setupDownloadButton();<NEW_LINE>showHideMapControls(false);<NEW_LINE>restrictMapMovableArea();<NEW_LINE>return view;<NEW_LINE>}
layout.download_tiles_fragment, container, false);
315,137
final CreateResourceGroupResult executeCreateResourceGroup(CreateResourceGroupRequest createResourceGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createResourceGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateResourceGroupRequest> request = null;<NEW_LINE>Response<CreateResourceGroupResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateResourceGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createResourceGroupRequest));<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.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateResourceGroupResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateResourceGroupResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateResourceGroup");
1,709,864
private Long retrieveTemplateGuestOsIdFromGuestOsInfo(long templateId, String guestOsType, String guestOsDescription, String minimumHardwareVersion) {<NEW_LINE>VMTemplateVO template = templateDao.findById(templateId);<NEW_LINE>Hypervisor.<MASK><NEW_LINE>if (hypervisor != Hypervisor.HypervisorType.VMware) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String minimumHypervisorVersion = getMinimumSupportedHypervisorVersionForHardwareVersion(minimumHardwareVersion);<NEW_LINE>LOGGER.info("Minimum hardware version " + minimumHardwareVersion + " matched to hypervisor version " + minimumHypervisorVersion + ". " + "Checking guest OS supporting this version");<NEW_LINE>List<GuestOSHypervisorVO> guestOsMappings = guestOSHypervisorDao.listByOsNameAndHypervisorMinimumVersion(guestOsType, hypervisor.toString(), minimumHypervisorVersion);<NEW_LINE>if (CollectionUtils.isNotEmpty(guestOsMappings)) {<NEW_LINE>Long guestOsId = null;<NEW_LINE>if (guestOsMappings.size() == 1) {<NEW_LINE>GuestOSHypervisorVO mapping = guestOsMappings.get(0);<NEW_LINE>guestOsId = mapping.getGuestOsId();<NEW_LINE>} else {<NEW_LINE>if (StringUtils.isNotEmpty(guestOsDescription)) {<NEW_LINE>for (GuestOSHypervisorVO guestOSHypervisorVO : guestOsMappings) {<NEW_LINE>GuestOSVO guestOSVO = guestOSDao.findByIdIncludingRemoved(guestOSHypervisorVO.getGuestOsId());<NEW_LINE>if (guestOSVO != null && guestOsDescription.equalsIgnoreCase(guestOSVO.getDisplayName())) {<NEW_LINE>guestOsId = guestOSHypervisorVO.getGuestOsId();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (null == guestOsId) {<NEW_LINE>GuestOSHypervisorVO mapping = guestOsMappings.get(guestOsMappings.size() - 1);<NEW_LINE>guestOsId = mapping.getGuestOsId();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return guestOsId;<NEW_LINE>} else {<NEW_LINE>throw new CloudRuntimeException("Did not find a guest OS with type " + guestOsType);<NEW_LINE>}<NEW_LINE>}
HypervisorType hypervisor = template.getHypervisorType();
1,532,276
final DescribeDRTAccessResult executeDescribeDRTAccess(DescribeDRTAccessRequest describeDRTAccessRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeDRTAccessRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<DescribeDRTAccessRequest> request = null;<NEW_LINE>Response<DescribeDRTAccessResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeDRTAccessRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeDRTAccessRequest));<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, "Shield");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDRTAccess");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeDRTAccessResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeDRTAccessResultJsonUnmarshaller());<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);
897,072
public Mono<Response<List<VirtualMachineExtensionImageInner>>> listTypesWithResponseAsync(String location, String publisherName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (location == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (publisherName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String apiVersion = "2020-06-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>return FluxUtil.withContext(context -> service.listTypes(this.client.getEndpoint(), location, publisherName, apiVersion, this.client.getSubscriptionId(), accept, context)).contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));<NEW_LINE>}
error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
1,386,655
public ClassLoader call() throws Exception {<NEW_LINE>if (clazz == null) {<NEW_LINE>try {<NEW_LINE>clazz = Class.forName(agent.getClassName(), false, loader);<NEW_LINE>} catch (ClassNotFoundException ex) {<NEW_LINE>// the class may not be loaded yet, use the default loader now<NEW_LINE>return loader;<NEW_LINE>}<NEW_LINE>String m = agent.getMethod();<NEW_LINE><MASK><NEW_LINE>if (m != null) {<NEW_LINE>method = clazz.getDeclaredMethod(m);<NEW_LINE>if (!method.getReturnType().isAssignableFrom(ClassLoader.class) || (method.getModifiers() & Modifier.STATIC) == 0) {<NEW_LINE>throw new IllegalStateException("Loader access method must be static and return ClassLoader");<NEW_LINE>}<NEW_LINE>method.setAccessible(true);<NEW_LINE>} else if (f != null) {<NEW_LINE>field = clazz.getDeclaredField(f);<NEW_LINE>field.setAccessible(true);<NEW_LINE>if (!field.getType().isAssignableFrom(ClassLoader.class) || (field.getModifiers() & Modifier.STATIC) == 0) {<NEW_LINE>throw new IllegalStateException("Loader access field must be static and assignable to ClassLoader");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (method != null) {<NEW_LINE>return (ClassLoader) method.invoke(null);<NEW_LINE>} else if (field != null) {<NEW_LINE>return (ClassLoader) field.get(null);<NEW_LINE>} else {<NEW_LINE>return loader;<NEW_LINE>}<NEW_LINE>}
String f = agent.getField();
583,262
private void reportFixes(Map<Symbol, Tree> fixableTypes, ListMultimap<Symbol, Type> symbolsToType, VisitorState state) {<NEW_LINE><MASK><NEW_LINE>for (Map.Entry<Symbol, List<Type>> entry : asMap(symbolsToType).entrySet()) {<NEW_LINE>Symbol symbol = entry.getKey();<NEW_LINE>List<Type> assignedTypes = entry.getValue();<NEW_LINE>Tree tree = fixableTypes.get(symbol);<NEW_LINE>if (tree == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>assignedTypes.stream().filter(type -> !type.getKind().equals(TypeKind.NULL)).map(type -> getUpperBound(type, types)).reduce(types::lub).flatMap(type -> toGoodReplacement(type, state)).filter(replacement -> !isSubtype(getType(tree), replacement, state)).filter(replacement -> isSubtype(replacement, getType(tree), state)).ifPresent(type -> {<NEW_LINE>SuggestedFix.Builder builder = SuggestedFix.builder();<NEW_LINE>SuggestedFix fix = builder.replace(getErasedTypeTree(tree), qualifyType(state, builder, type.asElement())).addImport(types.erasure(type).toString()).build();<NEW_LINE>state.reportMatch(buildDescription(tree).setMessage(getMessage(symbol, type, state)).addFix(fix).build());<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
Types types = state.getTypes();
566,388
static void validateHeaderOverrides(final SAMFileHeader inHeader, final String sampleAlias, final String libraryName) {<NEW_LINE>final List<SAMReadGroupRecord<MASK><NEW_LINE>if (sampleAlias != null || libraryName != null) {<NEW_LINE>boolean allSampleAliasesIdentical = true;<NEW_LINE>boolean allLibraryNamesIdentical = true;<NEW_LINE>for (int i = 1; i < rgs.size(); i++) {<NEW_LINE>if (!rgs.get(0).getSample().equals(rgs.get(i).getSample())) {<NEW_LINE>allSampleAliasesIdentical = false;<NEW_LINE>}<NEW_LINE>if (!rgs.get(0).getLibrary().equals(rgs.get(i).getLibrary())) {<NEW_LINE>allLibraryNamesIdentical = false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (sampleAlias != null && !allSampleAliasesIdentical) {<NEW_LINE>throw new PicardException("Read groups have multiple values for sample. " + "A value for SAMPLE_ALIAS cannot be supplied.");<NEW_LINE>}<NEW_LINE>if (libraryName != null && !allLibraryNamesIdentical) {<NEW_LINE>throw new PicardException("Read groups have multiple values for library name. " + "A value for library name cannot be supplied.");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
> rgs = inHeader.getReadGroups();
1,647,728
public void updatePageFreeSpace(final OAtomicOperation atomicOperation, final int pageIndex, final int freeSpace) throws IOException {<NEW_LINE>assert pageIndex >= 0;<NEW_LINE>assert freeSpace < ODurablePage.MAX_PAGE_SIZE_BYTES;<NEW_LINE>final int normalizedSpace = freeSpace / NORMALIZATION_INTERVAL;<NEW_LINE>final int secondLevelPageIndex = 1 + pageIndex / FreeSpaceMapPage.CELLS_PER_PAGE;<NEW_LINE>final long <MASK><NEW_LINE>for (int i = 0; i < secondLevelPageIndex - filledUpTo + 1; i++) {<NEW_LINE>final OCacheEntry cacheEntry = addPage(atomicOperation, fileId);<NEW_LINE>try {<NEW_LINE>final FreeSpaceMapPage page = new FreeSpaceMapPage(cacheEntry);<NEW_LINE>page.init();<NEW_LINE>} finally {<NEW_LINE>releasePageFromWrite(atomicOperation, cacheEntry);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final int maxFreeSpaceSecondLevel;<NEW_LINE>final int localSecondLevelPageIndex = pageIndex % FreeSpaceMapPage.CELLS_PER_PAGE;<NEW_LINE>final OCacheEntry leafEntry = loadPageForWrite(atomicOperation, fileId, secondLevelPageIndex, true, true);<NEW_LINE>try {<NEW_LINE>final FreeSpaceMapPage page = new FreeSpaceMapPage(leafEntry);<NEW_LINE>maxFreeSpaceSecondLevel = page.updatePageMaxFreeSpace(localSecondLevelPageIndex, normalizedSpace);<NEW_LINE>} finally {<NEW_LINE>releasePageFromWrite(atomicOperation, leafEntry);<NEW_LINE>}<NEW_LINE>final OCacheEntry firstLevelCacheEntry = loadPageForWrite(atomicOperation, fileId, 0, true, true);<NEW_LINE>try {<NEW_LINE>final FreeSpaceMapPage page = new FreeSpaceMapPage(firstLevelCacheEntry);<NEW_LINE>page.updatePageMaxFreeSpace(secondLevelPageIndex - 1, maxFreeSpaceSecondLevel);<NEW_LINE>} finally {<NEW_LINE>releasePageFromWrite(atomicOperation, firstLevelCacheEntry);<NEW_LINE>}<NEW_LINE>}
filledUpTo = getFilledUpTo(atomicOperation, fileId);
798,206
public HoodieWriteMetadata<HoodieData<WriteStatus>> performClustering(final HoodieClusteringPlan clusteringPlan, final Schema schema, final String instantTime) {<NEW_LINE>JavaSparkContext engineContext = HoodieSparkEngineContext.getSparkContext(getEngineContext());<NEW_LINE>// execute clustering for each group async and collect WriteStatus<NEW_LINE>Stream<HoodieData<WriteStatus>> writeStatusesStream = FutureUtils.allOf(clusteringPlan.getInputGroups().stream().map(inputGroup -> runClusteringForGroupAsync(inputGroup, clusteringPlan.getStrategy().getStrategyParams(), Option.ofNullable(clusteringPlan.getPreserveHoodieMetadata()).orElse(false), instantTime)).collect(Collectors.toList())).join().stream();<NEW_LINE>JavaRDD<WriteStatus>[] writeStatuses = convertStreamToArray(writeStatusesStream.map(HoodieJavaRDD::getJavaRDD));<NEW_LINE>JavaRDD<WriteStatus> writeStatusRDD = engineContext.union(writeStatuses);<NEW_LINE>HoodieWriteMetadata<HoodieData<WriteStatus>> <MASK><NEW_LINE>writeMetadata.setWriteStatuses(HoodieJavaRDD.of(writeStatusRDD));<NEW_LINE>return writeMetadata;<NEW_LINE>}
writeMetadata = new HoodieWriteMetadata<>();
1,730,724
private ILogicExpression evaluatePartial(final ExpressionEvaluationContext ctx, final ILogicExpression expr) {<NEW_LINE>logger.trace("Partial evaluating {}", expr);<NEW_LINE>if (expr == null) {<NEW_LINE>throw new ExpressionEvaluationException("Cannot evaluate null expression");<NEW_LINE>} else if (expr.isConstant()) {<NEW_LINE>return expr;<NEW_LINE>} else if (expr instanceof LogicTuple) {<NEW_LINE>final LogicTuple tuple = (LogicTuple) expr;<NEW_LINE>final Object operand1 = tuple.getOperand1();<NEW_LINE>final String operand1Resolved = ctx.getValue(operand1);<NEW_LINE>@SuppressWarnings("StringEquality")<NEW_LINE>final boolean isOperand1Resolved = operand1Resolved != VALUE_NotFound;<NEW_LINE>final Object newOperand1 = isOperand1Resolved ? operand1Resolved : operand1;<NEW_LINE>final Object operand2 = tuple.getOperand2();<NEW_LINE>final String operand2Resolved = ctx.getValue(operand2);<NEW_LINE>@SuppressWarnings("StringEquality")<NEW_LINE>final boolean isOperand2Resolved = operand2Resolved != VALUE_NotFound;<NEW_LINE>final <MASK><NEW_LINE>if (isOperand1Resolved && isOperand2Resolved) {<NEW_LINE>final boolean result = evaluateLogicTuple(operand1Resolved, tuple.getOperator(), operand2Resolved);<NEW_LINE>return ConstantLogicExpression.of(result);<NEW_LINE>} else if (Objects.equals(operand1, operand1Resolved) && Objects.equals(operand2, operand2Resolved)) {<NEW_LINE>return tuple;<NEW_LINE>} else {<NEW_LINE>return LogicTuple.of(newOperand1, tuple.getOperator(), newOperand2);<NEW_LINE>}<NEW_LINE>} else if (expr instanceof LogicExpression) {<NEW_LINE>final LogicExpression logicExpr = (LogicExpression) expr;<NEW_LINE>final ILogicExpression leftExpression = logicExpr.getLeft();<NEW_LINE>final ILogicExpression newLeftExpression = evaluatePartial(ctx, leftExpression);<NEW_LINE>final ILogicExpression rightExpression = logicExpr.getRight();<NEW_LINE>final ILogicExpression newRightExpression = evaluatePartial(ctx, rightExpression);<NEW_LINE>final String logicOperator = logicExpr.getOperator();<NEW_LINE>if (newLeftExpression.isConstant() && newRightExpression.isConstant()) {<NEW_LINE>final BooleanEvaluator logicExprEvaluator = getBooleanEvaluatorByOperator(logicOperator);<NEW_LINE>final boolean result = logicExprEvaluator.evaluateOrNull(newLeftExpression::constantValue, newRightExpression::constantValue);<NEW_LINE>return ConstantLogicExpression.of(result);<NEW_LINE>} else if (Objects.equals(leftExpression, newLeftExpression) && Objects.equals(rightExpression, newRightExpression)) {<NEW_LINE>return logicExpr;<NEW_LINE>} else {<NEW_LINE>return LogicExpression.of(newLeftExpression, logicOperator, newRightExpression);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new ExpressionEvaluationException("Unsupported ILogicExpression type: " + expr + " (class: " + expr.getClass() + ")");<NEW_LINE>}<NEW_LINE>}
Object newOperand2 = isOperand2Resolved ? operand2Resolved : operand2;
1,316,146
private static RecyclerView.ViewHolder findSwapTargetItemForGridLayoutManagerInternal2(FindSwapTargetContext fc) {<NEW_LINE>final int spanCount = CustomRecyclerViewUtils.getSpanCount(fc.rv);<NEW_LINE>final int height = fc.rv.getHeight();<NEW_LINE>final int width = fc.rv.getWidth();<NEW_LINE>final int paddingLeft = (fc.vertical) ? fc.rv.getPaddingLeft() : 0;<NEW_LINE>final int paddingTop = (!fc.vertical) ? fc.rv.getPaddingTop() : 0;<NEW_LINE>final int paddingRight = (fc.vertical) ? fc.rv.getPaddingRight() : 0;<NEW_LINE>final int paddingBottom = (!fc.vertical) ? fc.rv.getPaddingBottom() : 0;<NEW_LINE>final int columnWidth = (<MASK><NEW_LINE>final int rowHeight = (height - paddingTop - paddingBottom) / spanCount;<NEW_LINE>final int cx = fc.lastTouchX;<NEW_LINE>final int cy = fc.lastTouchY;<NEW_LINE>final int rangeStartIndex = fc.rootAdapterRange.getStart();<NEW_LINE>final int rangeEndIndex = fc.rootAdapterRange.getEnd();<NEW_LINE>int scanStartIndex = (int) ((fc.vertical) ? (float) (cx - paddingLeft) / columnWidth : (float) (cy - paddingTop) / rowHeight);<NEW_LINE>scanStartIndex = Math.min(Math.max(scanStartIndex, 0), (spanCount - 1));<NEW_LINE>for (int i = scanStartIndex; i >= 0; i--) {<NEW_LINE>final int cx2 = (fc.vertical) ? (paddingLeft + (columnWidth * i) + (columnWidth / 2)) : cx;<NEW_LINE>final int cy2 = (!fc.vertical) ? (paddingTop + (rowHeight * i) + (rowHeight / 2)) : cy;<NEW_LINE>final RecyclerView.ViewHolder vh2 = CustomRecyclerViewUtils.findChildViewHolderUnderWithoutTranslation(fc.rv, cx2, cy2);<NEW_LINE>if (vh2 != null) {<NEW_LINE>final int pos = vh2.getAdapterPosition();<NEW_LINE>if ((pos != RecyclerView.NO_POSITION) && pos >= rangeStartIndex && pos <= rangeEndIndex) {<NEW_LINE>return vh2;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
width - paddingLeft - paddingRight) / spanCount;
809,575
void load() {<NEW_LINE><MASK><NEW_LINE>boolean useDefault = (path == null || path.isEmpty());<NEW_LINE>defaultLogoRB.setSelected(useDefault);<NEW_LINE>specifyLogoRB.setSelected(!useDefault);<NEW_LINE>agencyLogoPathField.setEnabled(!useDefault);<NEW_LINE>browseLogosButton.setEnabled(!useDefault);<NEW_LINE>tempCustomField.setText(UserMachinePreferences.getCustomTempDirectory());<NEW_LINE>switch(UserMachinePreferences.getTempDirChoice()) {<NEW_LINE>case CASE:<NEW_LINE>tempCaseRadio.setSelected(true);<NEW_LINE>break;<NEW_LINE>case CUSTOM:<NEW_LINE>tempCustomRadio.setSelected(true);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>case SYSTEM:<NEW_LINE>tempLocalRadio.setSelected(true);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>evaluateTempDirState();<NEW_LINE>logFileCount.setText(String.valueOf(UserPreferences.getLogFileCount()));<NEW_LINE>solrMaxHeapSpinner.setValue(UserPreferences.getMaxSolrVMSize());<NEW_LINE>try {<NEW_LINE>updateAgencyLogo(path);<NEW_LINE>} catch (IOException ex) {<NEW_LINE>logger.log(Level.WARNING, "Error loading image from previously saved agency logo path", ex);<NEW_LINE>}<NEW_LINE>boolean confLoaded = false;<NEW_LINE>if (isJVMHeapSettingsCapable()) {<NEW_LINE>try {<NEW_LINE>ConfValues confValues = getEtcConfValues();<NEW_LINE>heapDumpFileField.setText(confValues.getHeapDumpPath());<NEW_LINE>initialMemValue = Long.toString(getCurrentJvmMaxMemoryInGB(confValues.getXmxVal()));<NEW_LINE>confLoaded = true;<NEW_LINE>} catch (IOException ex) {<NEW_LINE>logger.log(Level.SEVERE, "Can't read current Jvm max memory setting from file", ex);<NEW_LINE>memField.setEnabled(false);<NEW_LINE>heapDumpFileField.setText(DEFAULT_HEAP_DUMP_FILE_FIELD);<NEW_LINE>}<NEW_LINE>memField.setText(initialMemValue);<NEW_LINE>}<NEW_LINE>heapDumpBrowseButton.setEnabled(confLoaded);<NEW_LINE>heapDumpFileField.setEnabled(confLoaded);<NEW_LINE>setTempDirEnabled();<NEW_LINE>// ensure the error messages are up to date<NEW_LINE>valid();<NEW_LINE>}
String path = reportBranding.getAgencyLogoPath();
1,679,475
public void generatePo(ActionRequest request, ActionResponse response) {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>List<Long> requestIds = (List<Long>) request.getContext().get("_ids");<NEW_LINE>if (requestIds != null && !requestIds.isEmpty()) {<NEW_LINE>Boolean groupBySupplier = (Boolean) request.getContext().get("groupBySupplier");<NEW_LINE>groupBySupplier = groupBySupplier == null ? false : groupBySupplier;<NEW_LINE>Boolean groupByProduct = (Boolean) request.getContext().get("groupByProduct");<NEW_LINE>groupByProduct = groupByProduct == null ? false : groupByProduct;<NEW_LINE>try {<NEW_LINE>List<PurchaseRequest> purchaseRequests = Beans.get(PurchaseRequestRepository.class).all().filter("self.id in (?1)", requestIds).fetch();<NEW_LINE>List<String> purchaseRequestSeqs = purchaseRequests.stream().filter(pr -> pr.getSupplierUser() == null).map(PurchaseRequest::getPurchaseRequestSeq).collect(Collectors.toList());<NEW_LINE>if (purchaseRequestSeqs != null && !purchaseRequestSeqs.isEmpty()) {<NEW_LINE>throw new AxelorException(TraceBackRepository.CATEGORY_CONFIGURATION_ERROR, I18n.get(IExceptionMessage.PURCHASE_REQUEST_MISSING_SUPPLIER_USER), purchaseRequestSeqs.toString());<NEW_LINE>}<NEW_LINE>response.setCanClose(true);<NEW_LINE>List<PurchaseOrder> purchaseOrderList = Beans.get(PurchaseRequestService.class).generatePo(purchaseRequests, groupBySupplier, groupByProduct);<NEW_LINE>ActionViewBuilder actionViewBuilder = ActionView.define(String.format("Purchase Order%s generated", (purchaseOrderList.size() > 1 ? "s" : ""))).model(PurchaseOrder.class.getName()).add("grid", "purchase-order-quotation-grid").add("form", "purchase-order-form").param("search-filters", "purchase-order-filters").context("_showSingle", true).domain(String.format("self.id in (%s)", StringTool.getIdListString(purchaseOrderList)));<NEW_LINE>response.<MASK><NEW_LINE>} catch (AxelorException e) {<NEW_LINE>response.setFlash(e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
setView(actionViewBuilder.map());
1,684,169
private void generateAccessoryTags() {<NEW_LINE>tag(accessory("belt")).add(knockbackBelt, speedUpBelt, superTravelBelt, travelBelt);<NEW_LINE>tag(accessory("body")).add(balanceCloak, holyCloak, invisibilityCloak, thirdEye, unholyCloak);<NEW_LINE>tag(accessory("charm")).add(<MASK><NEW_LINE>tag(accessory("head")).add(flightTiara, itemFinder);<NEW_LINE>tag(accessory("necklace")).add(bloodPendant, cloudPendant, icePendant, lavaPendant, superCloudPendant, superLavaPendant);<NEW_LINE>tag(accessory("ring")).add(auraRing, auraRingGreater, dodgeRing, lokiRing, magnetRing, magnetRingGreater, manaRing, manaRingGreater, miningRing, odinRing, pixieRing, reachRing, swapRing, thorRing, waterRing);<NEW_LINE>tag(accessory("curio")).add(blackBowtie, blackTie, redGlasses, puffyScarf, engineerGoggles, eyepatch, wickedEyepatch, redRibbons, pinkFlowerBud, polkaDottedBows, blueButterfly, catEars, witchPin, devilTail, kamuiEye, googlyEyes, fourLeafClover, clockEye, unicornHorn, devilHorns, hyperPlus, botanistEmblem, ancientMask, eerieMask, alienAntenna, anaglyphGlasses, orangeShades, grouchoGlasses, thickEyebrows, lusitanicShield, tinyPotatoMask, questgiverMark, thinkingHand);<NEW_LINE>}
divaCharm, goddessCharm, monocle, tinyPlanet);
748,611
public void drawTo(Graphic graphic, Style highLight) {<NEW_LINE>int yOffs = 0;<NEW_LINE>for (int p = 0; p < poles; p++) graphic.drawPolygon(new Polygon(false).add(SIZE * 2, p * SIZE * 2 + SIZE).add(SIZE * 2 - SIZE2 / 2, p * SIZE * 2 + SIZE).add(SIZE * 2 - SIZE2 / 2, p * SIZE * 2 + SIZE2 + 2), Style.NORMAL);<NEW_LINE>if (closed) {<NEW_LINE>for (int p = 0; p < poles; p++) graphic.drawLine(new Vector(0, 2 * SIZE * p), new Vector(SIZE * 2, 2 * SIZE <MASK><NEW_LINE>} else {<NEW_LINE>yOffs = -SIZE2 / 2;<NEW_LINE>for (int p = 0; p < poles; p++) graphic.drawLine(new Vector(0, 2 * SIZE * p), new Vector(SIZE * 2 - 4, 2 * SIZE * p - yOffs * 2), Style.NORMAL);<NEW_LINE>}<NEW_LINE>graphic.drawLine(new Vector(SIZE, -yOffs + (poles - 1) * 2 * SIZE), new Vector(SIZE, -yOffs - SIZE), Style.DASH);<NEW_LINE>graphic.drawLine(new Vector(SIZE2, -yOffs - SIZE), new Vector(SIZE + SIZE2, -yOffs - SIZE), Style.THIN);<NEW_LINE>if (label != null && label.length() > 0)<NEW_LINE>graphic.drawText(new Vector(SIZE, 4 + (poles - 1) * 2 * SIZE + SIZE), label, Orientation.CENTERTOP, Style.SHAPE_PIN);<NEW_LINE>}
* p), Style.NORMAL);
877,942
public void addMatchingInterceptors(InterceptableChannel channel, String beanName) {<NEW_LINE>if (LOGGER.isDebugEnabled()) {<NEW_LINE>LOGGER.debug("Applying global interceptors on channel '" + beanName + "'");<NEW_LINE>}<NEW_LINE>List<GlobalChannelInterceptorWrapper> tempInterceptors = new ArrayList<>();<NEW_LINE>this.positiveOrderInterceptors.forEach(interceptorWrapper -> addMatchingInterceptors(beanName, tempInterceptors, interceptorWrapper));<NEW_LINE>tempInterceptors.sort(this.comparator);<NEW_LINE>tempInterceptors.stream().map(GlobalChannelInterceptorWrapper::getChannelInterceptor).filter(interceptor -> !(interceptor instanceof VetoCapableInterceptor) || ((VetoCapableInterceptor) interceptor).shouldIntercept(beanName, channel)).forEach(channel::addInterceptor);<NEW_LINE>tempInterceptors.clear();<NEW_LINE>this.negativeOrderInterceptors.forEach(interceptorWrapper -> addMatchingInterceptors(beanName, tempInterceptors, interceptorWrapper));<NEW_LINE>tempInterceptors.sort(this.comparator);<NEW_LINE>if (!tempInterceptors.isEmpty()) {<NEW_LINE>for (int i = tempInterceptors.size() - 1; i >= 0; i--) {<NEW_LINE>ChannelInterceptor channelInterceptor = tempInterceptors.get(i).getChannelInterceptor();<NEW_LINE>if (!(channelInterceptor instanceof VetoCapableInterceptor) || ((VetoCapableInterceptor) channelInterceptor).shouldIntercept(beanName, channel)) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
channel.addInterceptor(0, channelInterceptor);
1,234,532
private KenaiRepository createKenaiRepository(TeamProject kenaiProject, String displayName, String location) {<NEW_LINE>final URL loc;<NEW_LINE>try {<NEW_LINE>loc = new URL(location);<NEW_LINE>} catch (MalformedURLException ex) {<NEW_LINE>Bugzilla.LOG.log(Level.WARNING, null, ex);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String host = loc.getHost();<NEW_LINE>int idx = location.indexOf(IBugzillaConstants.URL_BUGLIST);<NEW_LINE>if (idx <= 0) {<NEW_LINE>// NOI18N<NEW_LINE>Bugzilla.LOG.log(Level.WARNING, "can't get issue tracker url from [{0}, {1}]", new Object[] { displayName, location });<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String url = location.substring(0, idx);<NEW_LINE>if (url.startsWith("http:")) {<NEW_LINE>// XXX hack??? // NOI18N<NEW_LINE>// NOI18N<NEW_LINE>url = "https" + url.substring(4);<NEW_LINE>}<NEW_LINE>String productParamUrl = null;<NEW_LINE>// NOI18N<NEW_LINE>String productAttribute = "product=";<NEW_LINE>String product = null;<NEW_LINE>int idxProductStart = location.indexOf(productAttribute);<NEW_LINE>if (idxProductStart <= 0) {<NEW_LINE>// NOI18N<NEW_LINE>Bugzilla.LOG.log(Level.WARNING, "can''t get issue tracker product from [{0}, {1}]", new Object[] { displayName, location });<NEW_LINE>return null;<NEW_LINE>} else {<NEW_LINE>// NOI18N<NEW_LINE>int idxProductEnd = <MASK><NEW_LINE>if (idxProductEnd > -1) {<NEW_LINE>productParamUrl = location.substring(idxProductStart, idxProductEnd);<NEW_LINE>product = location.substring(idxProductStart + productAttribute.length(), idxProductEnd);<NEW_LINE>} else {<NEW_LINE>productParamUrl = location.substring(idxProductStart);<NEW_LINE>product = location.substring(idxProductStart + productAttribute.length());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new KenaiRepository(kenaiProject, displayName, url, host, productParamUrl, product);<NEW_LINE>}
location.indexOf("&", idxProductStart);
997,449
public Object instantiateItem(@NonNull ViewGroup container, int position) {<NEW_LINE>ImageView imageView = new ImageView(mContext);<NEW_LINE>// display default city image if no image is present in array<NEW_LINE>if (mImagesArray.size() == 0) {<NEW_LINE>Picasso.with(mContext).load(R.drawable.placeholder_image).error(R.drawable.placeholder_image).fit().centerCrop().into(imageView);<NEW_LINE>}<NEW_LINE>Picasso.with(mContext).load(mImagesArray.get(position)).error(R.drawable.placeholder_image).fit().<MASK><NEW_LINE>container.addView(imageView);<NEW_LINE>imageView.setOnClickListener(v -> {<NEW_LINE>Intent fullScreenIntent = FullScreenImage.getStartIntent(mContext, mImagesArray.get(position), mCityName);<NEW_LINE>mContext.startActivity(fullScreenIntent);<NEW_LINE>});<NEW_LINE>imageView.setBackgroundColor(Color.TRANSPARENT);<NEW_LINE>imageView.setAlpha(0.6f);<NEW_LINE>return imageView;<NEW_LINE>}
centerCrop().into(imageView);
1,253,362
private void continueGroup(VideoGroup group) {<NEW_LINE>boolean updateInProgress = mScrollAction != null && !mScrollAction.isDisposed();<NEW_LINE>if (updateInProgress) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Log.d(TAG, "continueGroup: start continue group: " + group.getTitle());<NEW_LINE>getController().showProgressBar(true);<NEW_LINE>MediaGroup mediaGroup = group.getMediaGroup();<NEW_LINE>MediaItemManager mediaItemManager = YouTubeMediaService.instance().getMediaItemManager();<NEW_LINE>mScrollAction = mediaItemManager.continueGroupObserve(mediaGroup).subscribeOn(Schedulers.newThread()).observeOn(AndroidSchedulers.mainThread()).subscribe(continueMediaGroup -> {<NEW_LINE>getController().showProgressBar(false);<NEW_LINE>VideoGroup videoGroup = VideoGroup.from(<MASK><NEW_LINE>getController().updateSuggestions(videoGroup);<NEW_LINE>// Merge remote queue with player's queue<NEW_LINE>Video video = getController().getVideo();<NEW_LINE>if (video != null && video.isRemote && getController().getSuggestionsIndex(videoGroup) == 0) {<NEW_LINE>Playlist.instance().addAll(videoGroup.getVideos());<NEW_LINE>Playlist.instance().setCurrent(video);<NEW_LINE>}<NEW_LINE>}, error -> {<NEW_LINE>getController().showProgressBar(false);<NEW_LINE>Log.e(TAG, "continueGroup error: %s", error.getMessage());<NEW_LINE>});<NEW_LINE>}
continueMediaGroup, group.getSection());
1,552,250
public List<ValidateError> validate() {<NEW_LINE>List<ValidateError> errors = new ArrayList<>();<NEW_LINE>Validator validator;<NEW_LINE>ValidateError error;<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.REQUIRED);<NEW_LINE>error = validator.validate(this.serviceName, convLabelName("Service Name"));<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.MAX_LENGTH);<NEW_LINE>error = validator.validate(this.serviceName, convLabelName("Service Name"), 64);<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.REQUIRED);<NEW_LINE>error = validator.validate(this.serviceLabel, convLabelName("Service Label"));<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.MAX_LENGTH);<NEW_LINE>error = validator.validate(this.serviceLabel, convLabelName("Service Label"), 24);<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.REQUIRED);<NEW_LINE>error = validator.validate(this.serviceIcon, convLabelName("Service Icon"));<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.MAX_LENGTH);<NEW_LINE>error = validator.validate(this.serviceIcon, convLabelName("Service Icon"), 24);<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.INTEGER);<NEW_LINE>error = validator.validate(this.insertUser, convLabelName("Insert User"));<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.INTEGER);<NEW_LINE>error = validator.validate(this.updateUser, convLabelName("Update User"));<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>validator = <MASK><NEW_LINE>error = validator.validate(this.deleteFlag, convLabelName("Delete Flag"));<NEW_LINE>if (error != null) {<NEW_LINE>errors.add(error);<NEW_LINE>}<NEW_LINE>return errors;<NEW_LINE>}
ValidatorFactory.getInstance(Validator.INTEGER);
1,099,015
private void interactive() throws Exception {<NEW_LINE>screens = new Screens(new Framebuffer(config), config.teamName);<NEW_LINE>try {<NEW_LINE>if (nCipher) {<NEW_LINE>NCipher nCipher = new NCipher();<NEW_LINE>nCipher.healthCheck();<NEW_LINE>if (initNvram) {<NEW_LINE>nCipher.initNvram(config.dataSignerKey, screens);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>String input = screens.readQRCode();<NEW_LINE>byte[] proto = base64().decode(input);<NEW_LINE>CommandRequest commandRequest = CommandRequest.parseFrom(proto);<NEW_LINE>CommandResponse response = CommandHandler.dispatch(this, new InternalCommandConnector(hostname, port), commandRequest);<NEW_LINE>System.out.println(response.toString());<NEW_LINE>String encoded = base64().<MASK><NEW_LINE>Screens.ExitOrRestartOrPowerOff command = screens.displayQRCode(encoded);<NEW_LINE>if (command == Screens.ExitOrRestartOrPowerOff.Exit) {<NEW_LINE>return;<NEW_LINE>} else if (command == Screens.ExitOrRestartOrPowerOff.PowerOff) {<NEW_LINE>SystemShutdown.systemShutdown();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>screens.exception(e);<NEW_LINE>}<NEW_LINE>}
encode(response.toByteArray());
1,459,742
private Mono<Response<MaintenanceConfigurationInner>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, MaintenanceConfigurationInner configuration, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (configuration == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter configuration is required and cannot be null."));<NEW_LINE>} else {<NEW_LINE>configuration.validate();<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, resourceName, this.client.getApiVersion(), configuration, accept, context);<NEW_LINE>}
error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
1,235,249
private String issueReceipt() {<NEW_LINE>MInOut inOut = new MInOut(<MASK><NEW_LINE>if (inOut.isSOTrx() || !inOut.isProcessed() || !(MInOut.DOCSTATUS_Completed.equals(inOut.getDocStatus()) || MInOut.DOCSTATUS_Closed.equals(inOut.getDocStatus())))<NEW_LINE>throw new IllegalArgumentException("Receipt not valid - " + inOut);<NEW_LINE>log.info(inOut.toString());<NEW_LINE>// Set Project of Receipt<NEW_LINE>if (inOut.getC_Project_ID() == 0) {<NEW_LINE>inOut.setC_Project_ID(m_project.getC_Project_ID());<NEW_LINE>inOut.save();<NEW_LINE>} else if (inOut.getC_Project_ID() != m_project.getC_Project_ID())<NEW_LINE>throw new IllegalArgumentException("Receipt for other Project (" + inOut.getC_Project_ID() + ")");<NEW_LINE>int counter = 0;<NEW_LINE>for (final MInOutLine inOutLine : inOut.getLines()) {<NEW_LINE>// Need to have a Product<NEW_LINE>if (inOutLine.getM_Product_ID() <= 0)<NEW_LINE>continue;<NEW_LINE>// Need to have Quantity<NEW_LINE>if (inOutLine.getMovementQty() == null || inOutLine.getMovementQty().signum() == 0)<NEW_LINE>continue;<NEW_LINE>// not issued yet<NEW_LINE>if (projectIssueHasReceipt(inOutLine.getM_InOutLine_ID()))<NEW_LINE>continue;<NEW_LINE>// Create Issue<NEW_LINE>MProjectIssue pi = new MProjectIssue(m_project);<NEW_LINE>pi.setMandatory(inOutLine.getM_Locator_ID(), inOutLine.getM_Product_ID(), inOutLine.getMovementQty());<NEW_LINE>if (// default today<NEW_LINE>m_MovementDate != null)<NEW_LINE>pi.setMovementDate(m_MovementDate);<NEW_LINE>if (m_Description != null && m_Description.length() > 0)<NEW_LINE>pi.setDescription(m_Description);<NEW_LINE>else if (inOutLine.getDescription() != null)<NEW_LINE>pi.setDescription(inOutLine.getDescription());<NEW_LINE>else if (inOut.getDescription() != null)<NEW_LINE>pi.setDescription(inOut.getDescription());<NEW_LINE>pi.setM_InOutLine_ID(inOutLine.getM_InOutLine_ID());<NEW_LINE>pi.process();<NEW_LINE>// Find/Create Project Line<NEW_LINE>MProjectLine pl = null;<NEW_LINE>for (MProjectLine line : m_project.getLines()) {<NEW_LINE>// The Order we generated is the same as the Order of the receipt<NEW_LINE>if (// not issued<NEW_LINE>line.getC_OrderPO_ID() == inOut.getC_Order_ID() && line.getM_Product_ID() == inOutLine.getM_Product_ID() && line.getC_ProjectIssue_ID() == 0) {<NEW_LINE>pl = line;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (pl == null)<NEW_LINE>pl = new MProjectLine(m_project);<NEW_LINE>// setIssue<NEW_LINE>pl.setMProjectIssue(pi);<NEW_LINE>pl.save();<NEW_LINE>addLog(pi.getLine(), pi.getMovementDate(), pi.getMovementQty(), null);<NEW_LINE>counter++;<NEW_LINE>}<NEW_LINE>// all InOutLines<NEW_LINE>return "@Created@ " + counter;<NEW_LINE>}
getCtx(), m_M_InOut_ID, null);
905,632
Object resolveConstantExpressionValue(Expression expression) {<NEW_LINE>org.eclipse.jdt.internal.compiler.ast.ASTNode node = (org.eclipse.jdt.internal.compiler.ast.ASTNode) this.newAstToOldAst.get(expression);<NEW_LINE>if (node instanceof org.eclipse.jdt.internal.compiler.ast.FieldDeclaration) {<NEW_LINE>node = ((org.eclipse.jdt.internal.compiler.ast.FieldDeclaration) node).initialization;<NEW_LINE>}<NEW_LINE>if (node instanceof org.eclipse.jdt.internal.compiler.ast.Expression && ((org.eclipse.jdt.internal.compiler.ast.Expression) node).isTrulyExpression()) {<NEW_LINE>org.eclipse.jdt.internal.compiler.ast.Expression compilerExpression = (org.eclipse.jdt.internal.compiler.ast.Expression) node;<NEW_LINE>Constant constant = compilerExpression.constant;<NEW_LINE>if (constant != null && constant != Constant.NotAConstant) {<NEW_LINE>switch(constant.typeID()) {<NEW_LINE>case TypeIds.T_int:<NEW_LINE>return Integer.valueOf(constant.intValue());<NEW_LINE>case TypeIds.T_byte:<NEW_LINE>return Byte.<MASK><NEW_LINE>case TypeIds.T_short:<NEW_LINE>return Short.valueOf(constant.shortValue());<NEW_LINE>case TypeIds.T_char:<NEW_LINE>return Character.valueOf(constant.charValue());<NEW_LINE>case TypeIds.T_float:<NEW_LINE>return Float.valueOf(constant.floatValue());<NEW_LINE>case TypeIds.T_double:<NEW_LINE>return Double.valueOf(constant.doubleValue());<NEW_LINE>case TypeIds.T_boolean:<NEW_LINE>return constant.booleanValue() ? Boolean.TRUE : Boolean.FALSE;<NEW_LINE>case TypeIds.T_long:<NEW_LINE>return Long.valueOf(constant.longValue());<NEW_LINE>case TypeIds.T_JavaLangString:<NEW_LINE>return constant.stringValue();<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
valueOf(constant.byteValue());
886,988
public boolean doAlert(AlertConfigWithParams alertConfig, AlertTemplate alertTemplate) throws AlertException {<NEW_LINE>AlertDingTalkParams dingTalkParams = alertConfig.getDingTalkParams();<NEW_LINE>try {<NEW_LINE>// handling contacts<NEW_LINE>List<String> contactList = new ArrayList<>();<NEW_LINE>String contacts = dingTalkParams.getContacts();<NEW_LINE>if (StringUtils.hasLength(contacts)) {<NEW_LINE>Collections.addAll(contactList, contacts.split(","));<NEW_LINE>}<NEW_LINE>String title = alertTemplate.getTitle();<NEW_LINE>if (contactList.size() > 0) {<NEW_LINE>StringJoiner joiner = new StringJoiner(<MASK><NEW_LINE>contactList.forEach(joiner::add);<NEW_LINE>title = joiner.toString();<NEW_LINE>}<NEW_LINE>Map<String, Object> contactMap = new HashMap<>();<NEW_LINE>contactMap.put("atMobiles", contactList);<NEW_LINE>contactMap.put("isAtAll", BooleanUtils.toBoolean(dingTalkParams.getIsAtAll()));<NEW_LINE>// format markdown<NEW_LINE>String markdown = FreemarkerUtils.format(template, alertTemplate);<NEW_LINE>Map<String, String> content = new HashMap<>();<NEW_LINE>content.put("title", title);<NEW_LINE>content.put("text", markdown);<NEW_LINE>Map<String, Object> body = new HashMap<>();<NEW_LINE>body.put("msgtype", "markdown");<NEW_LINE>body.put("markdown", content);<NEW_LINE>body.put("at", contactMap);<NEW_LINE>sendMessage(dingTalkParams, body);<NEW_LINE>return true;<NEW_LINE>} catch (AlertException alertException) {<NEW_LINE>throw alertException;<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new AlertException("Failed send dingTalk alert", e);<NEW_LINE>}<NEW_LINE>}
",@", title + " @", "");
241,267
private void createButtonArea() {<NEW_LINE>GridLayoutFactory.fillDefaults().numColumns(2).margins(0, 0).spacing(10, 0).applyTo(buttonComp);<NEW_LINE>Label xButton = new Label(buttonComp, SWT.READ_ONLY);<NEW_LINE>GridDataFactory.fillDefaults().grab(false, false).align(SWT.BEGINNING, SWT<MASK><NEW_LINE>xButton.setText("X");<NEW_LINE>xButton.setFont(getBold());<NEW_LINE>applyDefaultEffects(xButton);<NEW_LINE>xButton.addMouseListener(new MouseListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void mouseUp(MouseEvent event) {<NEW_LINE>// Do nothing<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void mouseDown(MouseEvent event) {<NEW_LINE>removeSelection();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void mouseDoubleClick(MouseEvent event) {<NEW_LINE>removeSelection();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>xButton.addMouseTrackListener(new MouseTrackListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void mouseHover(MouseEvent event) {<NEW_LINE>// Do nothing. Enter/exit events are faster than hover, so those will<NEW_LINE>// be fired first before hover<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void mouseExit(MouseEvent event) {<NEW_LINE>applyDefaultEffects(xButton);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void mouseEnter(MouseEvent event) {<NEW_LINE>applyHoverEffects(xButton);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>xButton.setToolTipText("Click to remove the dependency");<NEW_LINE>Label label = new Label(buttonComp, SWT.NONE);<NEW_LINE>GridDataFactory.fillDefaults().grab(false, false).align(SWT.BEGINNING, SWT.CENTER).applyTo(label);<NEW_LINE>label.setText(model.getLabel());<NEW_LINE>Supplier<String> tooltip = model.getTooltipHtml();<NEW_LINE>if (tooltip != null) {<NEW_LINE>// Setup HTML tooltip and its content<NEW_LINE>HtmlTooltip htmlTooltip = new HtmlTooltip(label);<NEW_LINE>htmlTooltip.setMaxSize(400, 400);<NEW_LINE>htmlTooltip.setHtml(tooltip);<NEW_LINE>}<NEW_LINE>}
.CENTER).applyTo(xButton);
1,528,743
public CategoryInfo saveBaseInfo(EntityManagerContainer emc, CategoryInfo categoryInfo) throws Exception {<NEW_LINE>AppInfo appInfo = null;<NEW_LINE>CategoryInfo categoryInfo_tmp = null;<NEW_LINE>if (categoryInfo.getId() == null) {<NEW_LINE>categoryInfo.setId(CategoryInfo.createId());<NEW_LINE>}<NEW_LINE>appInfo = emc.find(categoryInfo.getAppId(), AppInfo.class);<NEW_LINE>categoryInfo_tmp = emc.find(categoryInfo.getId(), CategoryInfo.class);<NEW_LINE>emc.beginTransaction(AppInfo.class);<NEW_LINE>emc.beginTransaction(CategoryInfo.class);<NEW_LINE>if (categoryInfo_tmp == null) {<NEW_LINE>categoryInfo.setAppName(appInfo.getAppName());<NEW_LINE>emc.persist(categoryInfo, CheckPersistType.all);<NEW_LINE>} else {<NEW_LINE>categoryInfo_tmp.setAppId(appInfo.getId());<NEW_LINE>categoryInfo_tmp.setAppName(appInfo.getAppName());<NEW_LINE>categoryInfo_tmp.<MASK><NEW_LINE>categoryInfo_tmp.setCategoryMemo(categoryInfo.getCategoryMemo());<NEW_LINE>categoryInfo_tmp.setCategoryName(categoryInfo.getCategoryName());<NEW_LINE>categoryInfo_tmp.setFormId(categoryInfo.getFormId());<NEW_LINE>categoryInfo_tmp.setFormName(categoryInfo.getFormName());<NEW_LINE>categoryInfo_tmp.setParentId(categoryInfo.getParentId());<NEW_LINE>categoryInfo_tmp.setReadFormId(categoryInfo.getReadFormId());<NEW_LINE>categoryInfo_tmp.setReadFormName(categoryInfo.getReadFormName());<NEW_LINE>emc.check(categoryInfo_tmp, CheckPersistType.all);<NEW_LINE>}<NEW_LINE>if (appInfo.getCategoryList() == null) {<NEW_LINE>appInfo.setCategoryList(new ArrayList<String>());<NEW_LINE>}<NEW_LINE>if (!appInfo.getCategoryList().contains(categoryInfo.getId())) {<NEW_LINE>appInfo.getCategoryList().add(categoryInfo.getId());<NEW_LINE>}<NEW_LINE>emc.commit();<NEW_LINE>return categoryInfo;<NEW_LINE>}
setCategoryAlias(categoryInfo.getCategoryAlias());
1,844,057
public static void writeMetadataFromString(OFFlowMod.Builder fmb, String inst) {<NEW_LINE>if (inst == null || inst.equals("")) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (fmb.getVersion().compareTo(OFVersion.OF_11) < 0) {<NEW_LINE>log.error("Write Metadata Instruction not supported in OpenFlow 1.0");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>OFInstructionWriteMetadata.Builder ib = OFFactories.getFactory(fmb.getVersion()).instructions().buildWriteMetadata();<NEW_LINE>// Process tokens (should be metadata or its mask)<NEW_LINE>String[] keyValue = inst.split("/");<NEW_LINE>if (keyValue.length > 2) {<NEW_LINE>throw new IllegalArgumentException("[Metadata, Mask] " + keyValue + " does not have form 'metadata/mask' or 'metadata' for parsing " + inst);<NEW_LINE>} else if (keyValue.length == 1) {<NEW_LINE>log.debug("No mask detected in OFInstructionWriteMetaData string.");<NEW_LINE>} else if (keyValue.length == 2) {<NEW_LINE>log.debug("Detected mask in OFInstructionWriteMetaData string.");<NEW_LINE>}<NEW_LINE>// Get the metadata<NEW_LINE>ib.setMetadata(U64.of(ParseUtils.parseHexOrDecLong(keyValue[0])));<NEW_LINE>// Get the optional mask<NEW_LINE>if (keyValue.length == 2) {<NEW_LINE>ib.setMetadataMask(U64.of(ParseUtils.parseHexOrDecLong(keyValue[1])));<NEW_LINE>} else {<NEW_LINE>ib.setMetadataMask(U64.NO_MASK);<NEW_LINE>}<NEW_LINE>log.debug("Appending WriteMetadata instruction: {}", ib.build());<NEW_LINE>appendInstruction(fmb, ib.build());<NEW_LINE>log.debug(<MASK><NEW_LINE>}
"All instructions after append: {}", fmb.getInstructions());
1,549,768
public SplitFilter visitOrExpression(OrFilterExpression expression) {<NEW_LINE>SplitFilter lhs = expression.getLeft().accept(this);<NEW_LINE>SplitFilter rhs = expression.getRight().accept(this);<NEW_LINE>// If either the left or right side of the expression require an outer query, the entire<NEW_LINE>// expression must be run as an outer query.<NEW_LINE>if (lhs.getOuter() != null || rhs.getOuter() != null) {<NEW_LINE>// The only operation that splits a filter into inner & outer is AND. We can recombine<NEW_LINE>// each side using AND and then OR the results.<NEW_LINE>FilterExpression combined = OrFilterExpression.fromPair(AndFilterExpression.fromPair(lhs.getOuter(), lhs.getInner()), AndFilterExpression.fromPair(rhs.getOuter(), rhs.getInner()));<NEW_LINE>return SplitFilter.builder().<MASK><NEW_LINE>}<NEW_LINE>// Both left and right are inner queries.<NEW_LINE>FilterExpression combined = OrFilterExpression.fromPair(lhs.getInner(), rhs.getInner());<NEW_LINE>return SplitFilter.builder().inner(combined).build();<NEW_LINE>}
outer(combined).build();
71,913
public ImageData filter(Effect effect, RenderState rstate, BaseTransform transform, Rectangle outputClip, ImageData... inputs) {<NEW_LINE>FilterContext fctx = getFilterContext();<NEW_LINE>Reflection reflect = (Reflection) effect;<NEW_LINE>Rectangle inputbounds = inputs[0].getUntransformedBounds();<NEW_LINE>int srcW = inputbounds.width;<NEW_LINE>int srcH = inputbounds.height;<NEW_LINE>float refY = srcH + reflect.getTopOffset();<NEW_LINE>float refH = reflect.getFraction() * srcH;<NEW_LINE>int irefY1 = (int) Math.floor(refY);<NEW_LINE>int irefY2 = (int) Math.ceil(refY + refH);<NEW_LINE>int irefH = irefY2 - irefY1;<NEW_LINE>int dstH = (<MASK><NEW_LINE>// RT-27389: take clipping into account...<NEW_LINE>PrDrawable dst = (PrDrawable) getRenderer().getCompatibleImage(srcW, dstH);<NEW_LINE>if (!inputs[0].validate(fctx) || dst == null) {<NEW_LINE>return new ImageData(fctx, null, inputbounds);<NEW_LINE>}<NEW_LINE>PrDrawable src = (PrDrawable) inputs[0].getUntransformedImage();<NEW_LINE>Texture srctex = src.getTextureObject();<NEW_LINE>Graphics gdst = dst.createGraphics();<NEW_LINE>gdst.transform(inputs[0].getTransform());<NEW_LINE>float sx1 = 0f;<NEW_LINE>float sy1 = srcH - irefH;<NEW_LINE>float sx2 = srcW;<NEW_LINE>float sy2 = srcH;<NEW_LINE>gdst.drawTextureVO(srctex, reflect.getBottomOpacity(), reflect.getTopOpacity(), 0, irefY2, srcW, irefY1, sx1, sy1, sx2, sy2);<NEW_LINE>gdst.drawTexture(srctex, 0, 0, srcW, srcH);<NEW_LINE>Rectangle newbounds = new Rectangle(inputbounds.x, inputbounds.y, srcW, dstH);<NEW_LINE>return new ImageData(fctx, dst, newbounds);<NEW_LINE>}
irefY2 > srcH) ? irefY2 : srcH;
251,486
private static <T> T deserializeXML(InputStream pluginXML, Class<T> klass) throws JAXBException, XMLStreamException, SAXException {<NEW_LINE>JAXBContext <MASK><NEW_LINE>XMLStreamReader data = XMLInputFactory.newInstance().createXMLStreamReader(pluginXML);<NEW_LINE>final Unmarshaller unmarshaller = ctx.createUnmarshaller();<NEW_LINE>unmarshaller.setSchema(SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(GoPluginBundleDescriptorParser.class.getResource("/gocd-bundle-descriptor.xsd")));<NEW_LINE>try {<NEW_LINE>final JAXBElement<T> result = unmarshaller.unmarshal(data, klass);<NEW_LINE>return result.getValue();<NEW_LINE>} catch (UnmarshalException e) {<NEW_LINE>// there is no non-frustrating way to customize error messages (without other pitfalls anyway),<NEW_LINE>// and `UnmarshalException` instances are rarely informative; assume a validation error.<NEW_LINE>if (null == e.getMessage()) {<NEW_LINE>throw new ValidationException("XML Schema validation of Plugin Descriptor(bundle.xml) failed", e.getCause());<NEW_LINE>}<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>}
ctx = JAXBContext.newInstance(klass);
169,926
public Model addProperties(Map<String, String> propertyMap, Model model, ModelElementInstance element) {<NEW_LINE>Mapper mapper = Mapper.of(EntityHelper.getEntityClass(model));<NEW_LINE>for (String property : propertyMap.keySet()) {<NEW_LINE>Object value = element.getAttributeValueNs(BpmnParser.CAMUNDA_BPMN_EXTENSIONS_NS, propertyMap.get(property));<NEW_LINE>if (value != null && value.equals("undefined")) {<NEW_LINE>value = null;<NEW_LINE>}<NEW_LINE>Property field = mapper.getProperty(property);<NEW_LINE>if (field.isReference()) {<NEW_LINE>try {<NEW_LINE>value = JpaRepository.of((Class<? extends Model>) field.getTarget()).all().filter("self.name = ?1", value).fetchOne();<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>mapper.<MASK><NEW_LINE>}<NEW_LINE>return model;<NEW_LINE>}
set(model, property, value);
1,351,989
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException {<NEW_LINE>JsonObject input = InputParser.parseJsonObjectOrThrowError(req);<NEW_LINE>String refreshToken = InputParser.parseStringOrThrowError(input, "refreshToken", false);<NEW_LINE>String antiCsrfToken = InputParser.<MASK><NEW_LINE>Boolean enableAntiCsrf = InputParser.parseBooleanOrThrowError(input, "enableAntiCsrf", false);<NEW_LINE>assert enableAntiCsrf != null;<NEW_LINE>assert refreshToken != null;<NEW_LINE>try {<NEW_LINE>SessionInformationHolder sessionInfo = Session.refreshSession(main, refreshToken, antiCsrfToken, enableAntiCsrf);<NEW_LINE>JsonObject result = new JsonParser().parse(new Gson().toJson(sessionInfo)).getAsJsonObject();<NEW_LINE>result.addProperty("status", "OK");<NEW_LINE>super.sendJsonResponse(200, result, resp);<NEW_LINE>} catch (StorageQueryException | StorageTransactionLogicException e) {<NEW_LINE>throw new ServletException(e);<NEW_LINE>} catch (UnauthorisedException e) {<NEW_LINE>Logging.debug(main, Utils.exceptionStacktraceToString(e));<NEW_LINE>JsonObject reply = new JsonObject();<NEW_LINE>reply.addProperty("status", "UNAUTHORISED");<NEW_LINE>reply.addProperty("message", e.getMessage());<NEW_LINE>super.sendJsonResponse(200, reply, resp);<NEW_LINE>} catch (TokenTheftDetectedException e) {<NEW_LINE>Logging.debug(main, Utils.exceptionStacktraceToString(e));<NEW_LINE>JsonObject reply = new JsonObject();<NEW_LINE>reply.addProperty("status", "TOKEN_THEFT_DETECTED");<NEW_LINE>JsonObject session = new JsonObject();<NEW_LINE>session.addProperty("handle", e.sessionHandle);<NEW_LINE>session.addProperty("userId", e.userId);<NEW_LINE>reply.add("session", session);<NEW_LINE>super.sendJsonResponse(200, reply, resp);<NEW_LINE>}<NEW_LINE>}
parseStringOrThrowError(input, "antiCsrfToken", true);
446,971
static void saveAsImage(String path, boolean isOverwrite, String title, String xLabel, String yLabel, String[] keys, Tuple2<String, Double> subTitle, Tuple2<double[], double[]>... curvePoints) throws IOException {<NEW_LINE>File file = new File(path);<NEW_LINE>Preconditions.checkArgument(isOverwrite || !file.exists(), "File: %s is exists.", path);<NEW_LINE>Preconditions.checkNotNull(curvePoints, "Points should not be null!");<NEW_LINE>XYSeriesCollection seriesCollection = new XYSeriesCollection();<NEW_LINE>for (int i = 0; i < curvePoints.length; i++) {<NEW_LINE>XYSeries series = new XYSeries(keys[i]);<NEW_LINE>for (int j = 0; j < curvePoints[i].f0.length; j++) {<NEW_LINE>series.add(curvePoints[i].f0[j], curvePoints[i].f1[j]);<NEW_LINE>}<NEW_LINE>seriesCollection.addSeries(series);<NEW_LINE>}<NEW_LINE>JFreeChart chart = ChartFactory.createXYLineChart(title, xLabel, yLabel, seriesCollection, PlotOrientation.VERTICAL, keys.<MASK><NEW_LINE>chart.setBackgroundPaint(Color.white);<NEW_LINE>XYPlot p = chart.getXYPlot();<NEW_LINE>p.setBackgroundPaint(ChartColor.WHITE);<NEW_LINE>p.setRangeGridlinePaint(ChartColor.BLACK);<NEW_LINE>p.setDomainGridlinePaint(ChartColor.BLACK);<NEW_LINE>p.setOutlinePaint(null);<NEW_LINE>p.getRenderer().setSeriesPaint(0, ChartColor.BLACK);<NEW_LINE>for (int i = 0; i < keys.length; i++) {<NEW_LINE>p.getRenderer().setSeriesStroke(i, new BasicStroke(2.0f));<NEW_LINE>}<NEW_LINE>if (null != subTitle) {<NEW_LINE>TextTitle source = new TextTitle(subTitle.f0 + ":" + FeatureBinsUtil.keepGivenDecimal(subTitle.f1, 3));<NEW_LINE>source.setFont(new Font("SansSerif", Font.PLAIN, 15));<NEW_LINE>source.setPosition(RectangleEdge.TOP);<NEW_LINE>source.setHorizontalAlignment(HorizontalAlignment.LEFT);<NEW_LINE>chart.addSubtitle(source);<NEW_LINE>}<NEW_LINE>String format = TreeModelViz.getFormat(path);<NEW_LINE>BufferedImage image = chart.createBufferedImage(500, 400, BufferedImage.TYPE_INT_RGB, null);<NEW_LINE>ImageIO.write(image, format, new FileImageOutputStream(file));<NEW_LINE>// ChartUtilities.saveChartAsJPEG(file, chart, 500, 400);<NEW_LINE>}
length > 1, true, false);
982,674
public Request<DescribeTextTranslationJobRequest> marshall(DescribeTextTranslationJobRequest describeTextTranslationJobRequest) {<NEW_LINE>if (describeTextTranslationJobRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DescribeTextTranslationJobRequest)");<NEW_LINE>}<NEW_LINE>Request<DescribeTextTranslationJobRequest> request = new DefaultRequest<DescribeTextTranslationJobRequest>(describeTextTranslationJobRequest, "AmazonTranslate");<NEW_LINE>String target = "AWSShineFrontendService_20170701.DescribeTextTranslationJob";<NEW_LINE>request.addHeader("X-Amz-Target", target);<NEW_LINE><MASK><NEW_LINE>String uriResourcePath = "/";<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>try {<NEW_LINE>StringWriter stringWriter = new StringWriter();<NEW_LINE>AwsJsonWriter jsonWriter = JsonUtils.getJsonWriter(stringWriter);<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (describeTextTranslationJobRequest.getJobId() != null) {<NEW_LINE>String jobId = describeTextTranslationJobRequest.getJobId();<NEW_LINE>jsonWriter.name("JobId");<NEW_LINE>jsonWriter.value(jobId);<NEW_LINE>}<NEW_LINE>jsonWriter.endObject();<NEW_LINE>jsonWriter.close();<NEW_LINE>String snippet = stringWriter.toString();<NEW_LINE>byte[] content = snippet.getBytes(UTF8);<NEW_LINE>request.setContent(new StringInputStream(snippet));<NEW_LINE>request.addHeader("Content-Length", Integer.toString(content.length));<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t);<NEW_LINE>}<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE>request.addHeader("Content-Type", "application/x-amz-json-1.1");<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
request.setHttpMethod(HttpMethodName.POST);
395,900
private void startEngine(AbstractThreadGroup[] threadGroupsToRun, RunMode runMode) {<NEW_LINE><MASK><NEW_LINE>HashTree testTree = gui.getTreeModel().getTestPlan();<NEW_LINE>// We need to make this conversion before removing any Thread Group as 1 thread Group running may<NEW_LINE>// reference another one (not running) using ModuleController<NEW_LINE>// We don't clone as we'll be doing it later AND we cannot clone before we have removed the unselected ThreadGroups<NEW_LINE>HashTree treeToUse = JMeter.convertSubTree(testTree, false);<NEW_LINE>if (threadGroupsToRun != null && threadGroupsToRun.length > 0) {<NEW_LINE>keepOnlySelectedThreadGroupsInHashTree(treeToUse, threadGroupsToRun);<NEW_LINE>}<NEW_LINE>treeToUse.add(treeToUse.getArray()[0], gui.getMainFrame());<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("test plan before cloning is running version: {}", ((TestPlan) treeToUse.getArray()[0]).isRunningVersion());<NEW_LINE>}<NEW_LINE>ListedHashTree clonedTree = cloneTree(treeToUse, runMode);<NEW_LINE>if (popupCheckExistingFileListener(clonedTree)) {<NEW_LINE>engine = new StandardJMeterEngine();<NEW_LINE>engine.configure(clonedTree);<NEW_LINE>try {<NEW_LINE>engine.runTest();<NEW_LINE>} catch (JMeterEngineException e) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>JOptionPane.// $NON-NLS-1$<NEW_LINE>showMessageDialog(// $NON-NLS-1$<NEW_LINE>gui.getMainFrame(), // $NON-NLS-1$<NEW_LINE>e.getMessage(), // $NON-NLS-1$<NEW_LINE>JMeterUtils.getResString("error_occurred"), JOptionPane.ERROR_MESSAGE);<NEW_LINE>}<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("test plan after cloning and running test is running version: {}", ((TestPlan) treeToUse.getArray()[0]).isRunningVersion());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
GuiPackage gui = GuiPackage.getInstance();
342,622
protected void createSheet(CutsInfo xCuts, SheetInfo sheetInfo) {<NEW_LINE>startPage = true;<NEW_LINE>currentSheetPageScale = sheetInfo.sheetPageScale;<NEW_LINE>currentSheetFirstPageNumber = sheetInfo.sheetFirstPageNumber;<NEW_LINE>currentSheetName = sheetInfo.sheetName;<NEW_LINE>firstSheetName = firstSheetName == null ? currentSheetName : firstSheetName;<NEW_LINE>wbHelper.exportSheet(sheetIndex + 1, currentSheetName, sheetMapping);<NEW_LINE>ctHelper.exportSheet(sheetIndex + 1);<NEW_LINE>relsHelper.exportSheet(sheetIndex + 1);<NEW_LINE>XlsxReportConfiguration configuration = getCurrentItemConfiguration();<NEW_LINE>ExportZipEntry sheetRelsEntry = xlsxZip.addSheetRels(sheetIndex + 1);<NEW_LINE>Writer sheetRelsWriter = sheetRelsEntry.getWriter();<NEW_LINE>sheetRelsHelper = new XlsxSheetRelsHelper(jasperReportsContext, sheetRelsWriter);<NEW_LINE>ExportZipEntry sheetEntry = xlsxZip.addSheet(sheetIndex + 1);<NEW_LINE>Writer sheetWriter = sheetEntry.getWriter();<NEW_LINE>sheetHelper = new XlsxSheetHelper(jasperReportsContext, sheetWriter, sheetRelsHelper, configuration);<NEW_LINE>ExportZipEntry drawingRelsEntry = xlsxZip.addDrawingRels(sheetIndex + 1);<NEW_LINE>Writer drawingRelsWriter = drawingRelsEntry.getWriter();<NEW_LINE>drawingRelsHelper = new XlsxDrawingRelsHelper(jasperReportsContext, drawingRelsWriter);<NEW_LINE>ExportZipEntry drawingEntry = xlsxZip.addDrawing(sheetIndex + 1);<NEW_LINE>Writer drawingWriter = drawingEntry.getWriter();<NEW_LINE>drawingHelper = new <MASK><NEW_LINE>cellHelper = new XlsxCellHelper(jasperReportsContext, sheetWriter, styleHelper);<NEW_LINE>runHelper = new XlsxRunHelper(jasperReportsContext, sheetWriter, getExporterKey());<NEW_LINE>boolean showGridlines = true;<NEW_LINE>if (sheetInfo.sheetShowGridlines == null) {<NEW_LINE>Boolean documentShowGridlines = configuration.isShowGridLines();<NEW_LINE>if (documentShowGridlines != null) {<NEW_LINE>showGridlines = documentShowGridlines;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>showGridlines = sheetInfo.sheetShowGridlines;<NEW_LINE>}<NEW_LINE>sheetHelper.exportHeader(showGridlines, (sheetInfo.sheetPageScale == null ? 0 : sheetInfo.sheetPageScale), sheetInfo.rowFreezeIndex, sheetInfo.columnFreezeIndex, maxColumnIndex, jasperPrint, sheetInfo.tabColor);<NEW_LINE>sheetRelsHelper.exportHeader(sheetIndex + 1);<NEW_LINE>drawingHelper.exportHeader();<NEW_LINE>drawingRelsHelper.exportHeader();<NEW_LINE>}
XlsxDrawingHelper(jasperReportsContext, drawingWriter, drawingRelsHelper);
570,844
protected void init() throws FailStoreException {<NEW_LINE>try {<NEW_LINE>options = new Options();<NEW_LINE>options.setCreateIfMissing(true).setWriteBufferSize(8 * SizeUnit.KB).setMaxWriteBufferNumber(3).setMaxBackgroundCompactions(10).setCompressionType(CompressionType.SNAPPY_COMPRESSION).setCompactionStyle(CompactionStyle.UNIVERSAL);<NEW_LINE>Filter bloomFilter = new BloomFilter(10);<NEW_LINE>BlockBasedTableConfig tableConfig = new BlockBasedTableConfig();<NEW_LINE>tableConfig.setBlockCacheSize(64 * SizeUnit.KB).setFilter(bloomFilter).setCacheNumShardBits(6).setBlockSizeDeviation(5).setBlockRestartInterval(10).setCacheIndexAndFilterBlocks(true).setHashIndexAllowCollision(false).setBlockCacheCompressedSize(64 * SizeUnit<MASK><NEW_LINE>options.setTableFormatConfig(tableConfig);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new FailStoreException(e);<NEW_LINE>}<NEW_LINE>}
.KB).setBlockCacheCompressedNumShardBits(10);
1,383,624
private Mono<Response<EnvironmentListResponseInner>> listByResourceGroupWithResponseAsync(String resourceGroupName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>return FluxUtil.withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)).contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext(<MASK><NEW_LINE>}
)).readOnly()));
523,223
public void show() {<NEW_LINE>wizard.setTitle(MessageText.getString("installPluginsWizard.installMode.title"));<NEW_LINE>wizard.setErrorMessage("");<NEW_LINE>Composite rootPanel = wizard.getPanel();<NEW_LINE>GridLayout layout = new GridLayout();<NEW_LINE>layout.numColumns = 1;<NEW_LINE>rootPanel.setLayout(layout);<NEW_LINE>Composite panel = new Composite(rootPanel, SWT.NULL);<NEW_LINE>GridData gridData = new GridData(GridData.VERTICAL_ALIGN_CENTER | GridData.FILL_HORIZONTAL);<NEW_LINE>panel.setLayoutData(gridData);<NEW_LINE>layout = new GridLayout();<NEW_LINE>layout.numColumns = 1;<NEW_LINE>panel.setLayout(layout);<NEW_LINE>// default is PER_USER installation (changed 2013/02/14 by parg)<NEW_LINE>wizard.shared = false;<NEW_LINE>Button bSharedMode = new Button(panel, SWT.RADIO);<NEW_LINE>Messages.setLanguageText(bSharedMode, "installPluginsWizard.installMode.shared");<NEW_LINE>bSharedMode.setData(<MASK><NEW_LINE>bSharedMode.setSelection(wizard.shared);<NEW_LINE>GridData data = new GridData(GridData.FILL_VERTICAL);<NEW_LINE>data.verticalAlignment = GridData.VERTICAL_ALIGN_END;<NEW_LINE>bSharedMode.setLayoutData(data);<NEW_LINE>Button bUserMode = new Button(panel, SWT.RADIO);<NEW_LINE>Messages.setLanguageText(bUserMode, "installPluginsWizard.installMode.user");<NEW_LINE>bUserMode.setData("mode", new Integer(MODE_USER));<NEW_LINE>bUserMode.setSelection(!wizard.shared);<NEW_LINE>data = new GridData(GridData.FILL_VERTICAL);<NEW_LINE>data.verticalAlignment = GridData.VERTICAL_ALIGN_BEGINNING;<NEW_LINE>bUserMode.setLayoutData(data);<NEW_LINE>Listener modeListener = new Listener() {<NEW_LINE><NEW_LINE>public void handleEvent(Event e) {<NEW_LINE>wizard.shared = ((Integer) e.widget.getData("mode")).intValue() == MODE_SHARED;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>bUserMode.addListener(SWT.Selection, modeListener);<NEW_LINE>bSharedMode.addListener(SWT.Selection, modeListener);<NEW_LINE>}
"mode", new Integer(MODE_SHARED));
1,300,974
public void marshall(ReplicationTask replicationTask, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (replicationTask == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(replicationTask.getReplicationTaskIdentifier(), REPLICATIONTASKIDENTIFIER_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationTask.getSourceEndpointArn(), SOURCEENDPOINTARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationTask.getTargetEndpointArn(), TARGETENDPOINTARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationTask.getReplicationInstanceArn(), REPLICATIONINSTANCEARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(replicationTask.getTableMappings(), TABLEMAPPINGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationTask.getReplicationTaskSettings(), REPLICATIONTASKSETTINGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationTask.getStatus(), STATUS_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationTask.getLastFailureMessage(), LASTFAILUREMESSAGE_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationTask.getStopReason(), STOPREASON_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationTask.getReplicationTaskCreationDate(), REPLICATIONTASKCREATIONDATE_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationTask.getReplicationTaskStartDate(), REPLICATIONTASKSTARTDATE_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationTask.getCdcStartPosition(), CDCSTARTPOSITION_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationTask.getCdcStopPosition(), CDCSTOPPOSITION_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationTask.getRecoveryCheckpoint(), RECOVERYCHECKPOINT_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationTask.getReplicationTaskArn(), REPLICATIONTASKARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationTask.getReplicationTaskStats(), REPLICATIONTASKSTATS_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationTask.getTaskData(), TASKDATA_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationTask.getTargetReplicationInstanceArn(), TARGETREPLICATIONINSTANCEARN_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
replicationTask.getMigrationType(), MIGRATIONTYPE_BINDING);
1,277,104
protected CommandExecutionResult executeArg(ActivityDiagram diagram, LineLocation location, RegexResult arg) throws NoSuchColorException {<NEW_LINE>final IEntity entity1 = getEntity(diagram, arg, true);<NEW_LINE>if (entity1 == null) {<NEW_LINE>return CommandExecutionResult.error("No such activity");<NEW_LINE>}<NEW_LINE>if (arg.get("STEREOTYPE", 0) != null) {<NEW_LINE>entity1.setStereotype(Stereotype.build(arg.get("STEREOTYPE", 0)));<NEW_LINE>}<NEW_LINE>if (arg.get("BACKCOLOR", 0) != null) {<NEW_LINE>String s = arg.get("BACKCOLOR", 0);<NEW_LINE>entity1.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s));<NEW_LINE>}<NEW_LINE>final IEntity entity2 = getEntity(diagram, arg, false);<NEW_LINE>if (entity2 == null) {<NEW_LINE>return CommandExecutionResult.error("No such activity");<NEW_LINE>}<NEW_LINE>if (arg.get("BACKCOLOR2", 0) != null) {<NEW_LINE>String s = arg.get("BACKCOLOR2", 0);<NEW_LINE>entity2.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet().getColor(diagram.getSkinParam().getThemeStyle(), s));<NEW_LINE>}<NEW_LINE>if (arg.get("STEREOTYPE2", 0) != null) {<NEW_LINE>entity2.setStereotype(Stereotype.build(arg.get("STEREOTYPE2", 0)));<NEW_LINE>}<NEW_LINE>final Display linkLabel = Display.getWithNewlines(arg.get("BRACKET", 0));<NEW_LINE>final String arrowBody1 = CommandLinkClass.notNull(arg.get("ARROW_BODY1", 0));<NEW_LINE>final String arrowBody2 = CommandLinkClass.notNull(arg.get("ARROW_BODY2", 0));<NEW_LINE>final String arrowDirection = CommandLinkClass.notNull(arg.get("ARROW_DIRECTION", 0));<NEW_LINE>final String arrow = StringUtils.manageArrowForCuca(arrowBody1 + arrowDirection + arrowBody2 + ">");<NEW_LINE>int lenght = arrow.length() - 1;<NEW_LINE>if (arrowDirection.contains("*")) {<NEW_LINE>lenght = 2;<NEW_LINE>}<NEW_LINE>LinkType type = new LinkType(LinkDecor.ARROW, LinkDecor.NONE);<NEW_LINE>if ((arrowBody1 + arrowBody2).contains(".")) {<NEW_LINE>type = type.goDotted();<NEW_LINE>}<NEW_LINE>Link link = new Link(entity1, entity2, type, linkLabel, lenght, diagram.getSkinParam().getCurrentStyleBuilder());<NEW_LINE>if (arrowDirection.contains("*")) {<NEW_LINE>link.setConstraint(false);<NEW_LINE>}<NEW_LINE>final Direction direction = StringUtils.getArrowDirection(<MASK><NEW_LINE>if (direction == Direction.LEFT || direction == Direction.UP) {<NEW_LINE>link = link.getInv();<NEW_LINE>}<NEW_LINE>if (arg.get("URL", 0) != null) {<NEW_LINE>final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), UrlMode.STRICT);<NEW_LINE>final Url urlLink = urlBuilder.getUrl(arg.get("URL", 0));<NEW_LINE>link.setUrl(urlLink);<NEW_LINE>}<NEW_LINE>link.applyStyle(diagram.getSkinParam().getThemeStyle(), arg.getLazzy("ARROW_STYLE", 0));<NEW_LINE>diagram.addLink(link);<NEW_LINE>return CommandExecutionResult.ok();<NEW_LINE>}
arrowBody1 + arrowDirection + arrowBody2 + ">");
1,804,795
public static UserQosInfo parseGetUserQosInfo(InputStream responseBody) throws ResponseParseException {<NEW_LINE>try {<NEW_LINE>Element root = getXmlRootElement(responseBody);<NEW_LINE>UserQosInfo userQosInfo = new UserQosInfo();<NEW_LINE>userQosInfo.setRegion(root.getChildText("Region"));<NEW_LINE>userQosInfo.setTotalUploadBw(Integer.valueOf(root.getChildText("TotalUploadBandwidth")));<NEW_LINE>userQosInfo.setIntranetUploadBw(Integer.valueOf(root.getChildText("IntranetUploadBandwidth")));<NEW_LINE>userQosInfo.setExtranetUploadBw(Integer.valueOf(root.getChildText("ExtranetUploadBandwidth")));<NEW_LINE>userQosInfo.setTotalDownloadBw(Integer.valueOf(root.getChildText("TotalDownloadBandwidth")));<NEW_LINE>userQosInfo.setIntranetDownloadBw(Integer.valueOf(<MASK><NEW_LINE>userQosInfo.setExtranetDownloadBw(Integer.valueOf(root.getChildText("ExtranetDownloadBandwidth")));<NEW_LINE>userQosInfo.setTotalQps(Integer.valueOf(root.getChildText("TotalQps")));<NEW_LINE>userQosInfo.setIntranetQps(Integer.valueOf(root.getChildText("IntranetQps")));<NEW_LINE>userQosInfo.setExtranetQps(Integer.valueOf(root.getChildText("ExtranetQps")));<NEW_LINE>return userQosInfo;<NEW_LINE>} catch (JDOMParseException e) {<NEW_LINE>throw new ResponseParseException(e.getPartialDocument() + ": " + e.getMessage(), e);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new ResponseParseException(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
root.getChildText("IntranetDownloadBandwidth")));
901,575
public static IRubyObject pack_sockaddr_in(ThreadContext context, int port, String host) {<NEW_LINE>ByteArrayOutputStream bufS = new ByteArrayOutputStream();<NEW_LINE>try {<NEW_LINE>DataOutputStream ds = new DataOutputStream(bufS);<NEW_LINE>try {<NEW_LINE>if (host != null && host.length() == 0) {<NEW_LINE><MASK><NEW_LINE>writeSockaddrPort(ds, port);<NEW_LINE>ds.writeInt(0);<NEW_LINE>} else {<NEW_LINE>InetAddress[] addrs = InetAddress.getAllByName(host);<NEW_LINE>byte[] addr = addrs[0].getAddress();<NEW_LINE>if (addr.length == 4) {<NEW_LINE>writeSockaddrHeader(AddressFamily.AF_INET, ds);<NEW_LINE>} else {<NEW_LINE>writeSockaddrHeader(AddressFamily.AF_INET6, ds);<NEW_LINE>}<NEW_LINE>writeSockaddrPort(ds, port);<NEW_LINE>ds.write(addr, 0, addr.length);<NEW_LINE>}<NEW_LINE>} catch (UnknownHostException e) {<NEW_LINE>throw sockerr(context.runtime, "getaddrinfo: No address associated with nodename");<NEW_LINE>}<NEW_LINE>writeSockaddrFooter(ds);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw sockerr(context.runtime, "pack_sockaddr_in: internal error");<NEW_LINE>}<NEW_LINE>return context.runtime.newString(new ByteList(bufS.toByteArray(), false));<NEW_LINE>}
writeSockaddrHeader(AddressFamily.AF_INET, ds);
25,723
/*<NEW_LINE>* Create usage events for existing port forwarding rules<NEW_LINE>*/<NEW_LINE>private void createPortForwardingEvents(Connection conn) {<NEW_LINE>s_logger.debug("Creating Port Forwarding usage events");<NEW_LINE>try (PreparedStatement pstmt = conn.prepareStatement("SELECT fw.account_id, ip.data_center_id, fw.id FROM firewall_rules fw, user_ip_address ip where purpose = 'PortForwarding' and " + "fw.state = 'Active' and ip.id = fw.ip_address_id");<NEW_LINE>ResultSet rs = pstmt.executeQuery()) {<NEW_LINE>Date now = new Date();<NEW_LINE>while (rs.next()) {<NEW_LINE>long accountId = rs.getLong(1);<NEW_LINE>long zoneId = rs.getLong(2);<NEW_LINE>long ruleId = rs.getLong(3);<NEW_LINE>try (PreparedStatement pstmt1 = conn.prepareStatement("INSERT INTO usage_event (usage_event.type, usage_event.created, usage_event.account_id, usage_event.zone_id, usage_event.resource_id)" + " VALUES (?, ?, ?, ?, ?)")) {<NEW_LINE>pstmt1.setString(1, EventTypes.EVENT_NET_RULE_ADD);<NEW_LINE>pstmt1.setString(2, DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), now));<NEW_LINE>pstmt1.setLong(3, accountId);<NEW_LINE>pstmt1.setLong(4, zoneId);<NEW_LINE>pstmt1.setLong(5, ruleId);<NEW_LINE>pstmt1.executeUpdate();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>s_logger.debug("Completed creating Port Forwarding usage events");<NEW_LINE>} catch (SQLException e) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
throw new CloudRuntimeException("Failed to add port forwarding usage events due to:", e);
1,209,048
private boolean processUnrecoverableException(final HttpServletRequest req, final HttpServletResponse resp, final PwmDomain pwmDomain, final PwmRequest pwmRequest, final PwmUnrecoverableException e) throws IOException {<NEW_LINE>switch(e.getError()) {<NEW_LINE>case ERROR_DIRECTORY_UNAVAILABLE:<NEW_LINE>LOGGER.fatal(pwmRequest.getLabel(), () -> e.getErrorInformation().toDebugStr());<NEW_LINE>StatisticsClient.<MASK><NEW_LINE>break;<NEW_LINE>case ERROR_PASSWORD_REQUIRED:<NEW_LINE>LOGGER.warn(() -> "attempt to access functionality requiring password authentication, but password not yet supplied by actor, forwarding to password Login page");<NEW_LINE>// store the original requested url<NEW_LINE>try {<NEW_LINE>LOGGER.debug(pwmRequest, () -> "user is authenticated without a password, redirecting to login page");<NEW_LINE>LoginServlet.redirectToLoginServlet(PwmRequest.forRequest(req, resp));<NEW_LINE>return true;<NEW_LINE>} catch (final Throwable e1) {<NEW_LINE>LOGGER.error(() -> "error while marking pre-login url:" + e1.getMessage());<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case ERROR_INTERNAL:<NEW_LINE>default:<NEW_LINE>final Supplier<CharSequence> msg = () -> "unexpected error: " + e.getErrorInformation().toDebugStr();<NEW_LINE>final PwmLogLevel level = e.getError().isTrivial() ? PwmLogLevel.TRACE : PwmLogLevel.ERROR;<NEW_LINE>LOGGER.log(level, pwmRequest.getLabel(), msg);<NEW_LINE>StatisticsClient.incrementStat(pwmRequest, Statistic.PWM_UNKNOWN_ERRORS);<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
incrementStat(pwmRequest, Statistic.LDAP_UNAVAILABLE_COUNT);
615,807
public static void openInstallWizard(OperationContainer<InstallSupport> container, boolean runInBackground) {<NEW_LINE>if (container == null) {<NEW_LINE>// NOI18N<NEW_LINE>throw new IllegalArgumentException("OperationContainer cannot be null.");<NEW_LINE>}<NEW_LINE>List<OperationContainer.OperationInfo<InstallSupport>> all = container.listAll();<NEW_LINE>if (all.isEmpty()) {<NEW_LINE>// NOI18N<NEW_LINE>throw new IllegalArgumentException("OperationContainer cannot be empty.");<NEW_LINE>}<NEW_LINE>List<OperationContainer.OperationInfo<InstallSupport>> invalid = container.listInvalid();<NEW_LINE>if (!invalid.isEmpty()) {<NEW_LINE>// NOI18N<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>OperationInfo<InstallSupport> info = all.get(0);<NEW_LINE>OperationType doOperation = info.getUpdateUnit().getInstalled() == null ? OperationType.INSTALL : OperationType.UPDATE;<NEW_LINE>new InstallUnitWizard().invokeWizard(new InstallUnitWizardModel(doOperation, container), true, runInBackground);<NEW_LINE>}
throw new IllegalArgumentException("OperationContainer cannot contain invalid elements but " + invalid);
565,026
public void sendNotification(Check check, Subscription subscription, List<Alert> alerts) throws NotificationFailedException {<NEW_LINE>String token = seyrenConfig.getSlackToken();<NEW_LINE>String channel = subscription.getTarget();<NEW_LINE>String username = seyrenConfig.getSlackUsername();<NEW_LINE>String iconUrl = seyrenConfig.getSlackIconUrl();<NEW_LINE>List<String> emojis = Lists.newArrayList(Splitter.on(',').omitEmptyStrings().trimResults().split(seyrenConfig.getSlackEmojis()));<NEW_LINE>String url = String.format("%s/api/chat.postMessage", baseUrl);<NEW_LINE>HttpClient client = HttpClientBuilder.create().useSystemProperties().build();<NEW_LINE>HttpPost post = new HttpPost(url);<NEW_LINE>post.addHeader("accept", "application/json");<NEW_LINE>List<BasicNameValuePair> parameters = new ArrayList<BasicNameValuePair>();<NEW_LINE>parameters.add(new BasicNameValuePair("token", token));<NEW_LINE>parameters.add(new BasicNameValuePair("channel", StringUtils.removeEnd(channel, "!")));<NEW_LINE>parameters.add(new BasicNameValuePair("text", formatContent(emojis, check, subscription, alerts)));<NEW_LINE>parameters.add(new BasicNameValuePair("username", username));<NEW_LINE>parameters.add(<MASK><NEW_LINE>try {<NEW_LINE>post.setEntity(new UrlEncodedFormEntity(parameters));<NEW_LINE>if (LOGGER.isDebugEnabled()) {<NEW_LINE>LOGGER.info("> parameters: {}", parameters);<NEW_LINE>}<NEW_LINE>HttpResponse response = client.execute(post);<NEW_LINE>if (LOGGER.isDebugEnabled()) {<NEW_LINE>LOGGER.info("> parameters: {}", parameters);<NEW_LINE>LOGGER.debug("Status: {}, Body: {}", response.getStatusLine(), new BasicResponseHandler().handleResponse(response));<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOGGER.warn("Error posting to Slack", e);<NEW_LINE>} finally {<NEW_LINE>post.releaseConnection();<NEW_LINE>HttpClientUtils.closeQuietly(client);<NEW_LINE>}<NEW_LINE>}
new BasicNameValuePair("icon_url", iconUrl));
119,384
public Object visitMemberSelect(MemberSelectTree node, Object p) {<NEW_LINE>if (wc.getTrees().getElement(new TreePath(getCurrentPath(), node.getExpression())) != varElement) {<NEW_LINE>return super.visitMemberSelect(node, p);<NEW_LINE>}<NEW_LINE>Element target = wc.getTrees().getElement(getCurrentPath());<NEW_LINE>if (target != null && target.getKind() == ElementKind.METHOD) {<NEW_LINE>Tree x = getCurrentPath().getParentPath().getLeaf();<NEW_LINE>Tree.Kind k = x.getKind();<NEW_LINE>if (k == Tree.Kind.METHOD_INVOCATION) {<NEW_LINE>if (node.getIdentifier().contentEquals("toString")) {<NEW_LINE>// NOI18N<NEW_LINE>// rewrite the node to just the variable, which is going to change the type<NEW_LINE>gu.copyComments(x, node.getExpression(), true);<NEW_LINE>gu.copyComments(x, node.getExpression(), false);<NEW_LINE>wc.rewrite(x, node.getExpression());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return <MASK><NEW_LINE>}
super.visitMemberSelect(node, p);
1,577,363
protected String[] processStringArray(String name, String expression, boolean immediateOnly, boolean mask) {<NEW_LINE>final String methodName = "processStringArray";<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {<NEW_LINE>Tr.entry(tc, methodName, new Object[] { name, (expression == null) ? null : mask ? OBFUSCATED_STRING : expression, immediateOnly, mask });<NEW_LINE>}<NEW_LINE>String[] result;<NEW_LINE>boolean immediate = false;<NEW_LINE>try {<NEW_LINE>Object obj = evaluateElExpression(expression, mask);<NEW_LINE>if (obj == null) {<NEW_LINE>throw new IllegalArgumentException("EL expression '" + (mask ? OBFUSCATED_STRING : expression) + "' for '" + name + "' evaluated to null.");<NEW_LINE>} else if (obj instanceof String[]) {<NEW_LINE>result = (String[]) obj;<NEW_LINE>immediate = isImmediateExpression(expression, mask);<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("Expected '" + name + "' to evaluate to a String value.");<NEW_LINE>}<NEW_LINE>} catch (ELException e) {<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>String[] finalResult = (immediateOnly && !immediate) ? null : result;<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {<NEW_LINE>Tr.exit(tc, methodName, (finalResult == null) ? null : mask ? OBFUSCATED_STRING : finalResult);<NEW_LINE>}<NEW_LINE>return finalResult;<NEW_LINE>}
IllegalArgumentException("Expected '" + name + "' to evaluate to a String[] value.");
184,991
JobExecution createJobExecutionFromResultSet(ResultSet rs, int rowNum) throws SQLException {<NEW_LINE>Long id = rs.getLong(1);<NEW_LINE>JobExecution jobExecution;<NEW_LINE>JobParameters jobParameters = getJobParameters(id);<NEW_LINE>JobInstance jobInstance = new JobInstance(rs.getLong(10), rs.getString(11));<NEW_LINE>jobExecution = new JobExecution(jobInstance, jobParameters);<NEW_LINE>jobExecution.setId(id);<NEW_LINE>jobExecution.setStartTime(rs.getTimestamp(2));<NEW_LINE>jobExecution.setEndTime(rs.getTimestamp(3));<NEW_LINE>jobExecution.setStatus(BatchStatus.valueOf(<MASK><NEW_LINE>jobExecution.setExitStatus(new ExitStatus(rs.getString(5), rs.getString(6)));<NEW_LINE>jobExecution.setCreateTime(rs.getTimestamp(7));<NEW_LINE>jobExecution.setLastUpdated(rs.getTimestamp(8));<NEW_LINE>jobExecution.setVersion(rs.getInt(9));<NEW_LINE>return jobExecution;<NEW_LINE>}
rs.getString(4)));