idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,407,924
public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@name('var') create constant variable string MYVAR = '.*abc.*';\n" + "@name('s0') select * from SupportBean(theString regexp MYVAR);\n" + "" + "@name('ctx') create context MyContext start SupportBean_S0 as s0;\n" + "@name('s1') context MyContext select * from SupportBean(theString regexp context.s0.p00);\n" + "" + "@name('s2') select * from pattern[s0=SupportBean_S0 -> every SupportBean(theString regexp s0.p00)];\n" + "" + "@name('s3') select * from SupportBean(theString regexp '.*' || 'abc' || '.*');\n";<NEW_LINE>env.compileDeploy(epl);<NEW_LINE>EPDeployment deployment = env.deployment().getDeployment(env.deploymentId("s0"));<NEW_LINE>Set<String> statementNames = new LinkedHashSet<>();<NEW_LINE>for (EPStatement stmt : deployment.getStatements()) {<NEW_LINE>if (stmt.getName().startsWith("s")) {<NEW_LINE>stmt.addListener(env.listenerNew());<NEW_LINE>statementNames.add(stmt.getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>env.milestone(0);<NEW_LINE>env.sendEventBean(new SupportBean_S0(1, ".*abc.*"));<NEW_LINE>sendSBAssert(env, "xabsx", statementNames, false);<NEW_LINE>sendSBAssert(env, "xabcx", statementNames, true);<NEW_LINE>if (hasFilterIndexPlanAdvanced(env)) {<NEW_LINE>Map<String, FilterItem> filters = SupportFilterServiceHelper.getFilterSvcAllStmtForTypeSingleFilter(env.runtime(), "SupportBean");<NEW_LINE>FilterItem s0 = filters.get("s0");<NEW_LINE>for (String name : statementNames) {<NEW_LINE>FilterItem sn = filters.get(name);<NEW_LINE>assertEquals(FilterOperator.REBOOL, sn.getOp());<NEW_LINE>assertNotNull(s0.getOptionalValue());<NEW_LINE>assertNotNull(s0.getIndex());<NEW_LINE>assertSame(s0.getIndex(<MASK><NEW_LINE>assertSame(s0.getOptionalValue(), sn.getOptionalValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>env.undeployAll();<NEW_LINE>}
), sn.getIndex());
286,444
public SaikuDatasource process(SaikuDatasource ds) {<NEW_LINE>if (SecurityContextHolder.getContext() != null && SecurityContextHolder.getContext().getAuthentication() != null) {<NEW_LINE>String roles = null;<NEW_LINE>String ROLEFILTER = "role.filter";<NEW_LINE>String filter = ds.getProperties().containsKey(ROLEFILTER) ? ds.getProperties().getProperty(ROLEFILTER) : null;<NEW_LINE>List<String> allowedRoles = new ArrayList<>();<NEW_LINE>if (filter != null) {<NEW_LINE>String[] filterRoles = filter.split(",");<NEW_LINE>allowedRoles.addAll(Arrays.asList(filterRoles));<NEW_LINE>}<NEW_LINE>for (GrantedAuthority ga : SecurityContextHolder.getContext().getAuthentication().getAuthorities()) {<NEW_LINE>String r = ga.getAuthority();<NEW_LINE>boolean isAllowed = true;<NEW_LINE>if (filter != null) {<NEW_LINE>isAllowed = false;<NEW_LINE>for (String allowed : allowedRoles) {<NEW_LINE>if (r.toUpperCase().contains(allowed.toUpperCase())) {<NEW_LINE>isAllowed = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (isAllowed) {<NEW_LINE>if (roles == null) {<NEW_LINE>roles = r;<NEW_LINE>} else {<NEW_LINE>roles += "," + r;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String location = ds.getProperties().getProperty("location");<NEW_LINE>if (!location.endsWith(";")) {<NEW_LINE>location += ";";<NEW_LINE>}<NEW_LINE>if (roles != null) {<NEW_LINE>location += "Role=" + roles + ";";<NEW_LINE>}<NEW_LINE>log.debug(RoleDatasourceProcessor.class.getCanonicalName() + " : location = " + location);<NEW_LINE>ds.getProperties(<MASK><NEW_LINE>}<NEW_LINE>return ds;<NEW_LINE>}
).put("location", location);
1,582,969
public static ListResourcesResponse unmarshall(ListResourcesResponse listResourcesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listResourcesResponse.setRequestId(_ctx.stringValue("ListResourcesResponse.RequestId"));<NEW_LINE>listResourcesResponse.setTotalCount(_ctx.integerValue("ListResourcesResponse.TotalCount"));<NEW_LINE>listResourcesResponse.setPageSize(_ctx.integerValue("ListResourcesResponse.PageSize"));<NEW_LINE>listResourcesResponse.setPageNumber(_ctx.integerValue("ListResourcesResponse.PageNumber"));<NEW_LINE>List<Resource> resources = new ArrayList<Resource>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListResourcesResponse.Resources.Length"); i++) {<NEW_LINE>Resource resource = new Resource();<NEW_LINE>resource.setService(_ctx.stringValue("ListResourcesResponse.Resources[" + i + "].Service"));<NEW_LINE>resource.setResourceType(_ctx.stringValue("ListResourcesResponse.Resources[" + i + "].ResourceType"));<NEW_LINE>resource.setResourceGroupId(_ctx.stringValue("ListResourcesResponse.Resources[" + i + "].ResourceGroupId"));<NEW_LINE>resource.setResourceId(_ctx.stringValue("ListResourcesResponse.Resources[" + i + "].ResourceId"));<NEW_LINE>resource.setCreateDate(_ctx.stringValue("ListResourcesResponse.Resources[" + i + "].CreateDate"));<NEW_LINE>resource.setRegionId(_ctx.stringValue<MASK><NEW_LINE>resources.add(resource);<NEW_LINE>}<NEW_LINE>listResourcesResponse.setResources(resources);<NEW_LINE>return listResourcesResponse;<NEW_LINE>}
("ListResourcesResponse.Resources[" + i + "].RegionId"));
1,850,267
protected FilterResults performFiltering(CharSequence constraint) {<NEW_LINE>String query = null != constraint ? constraint.toString() : "";<NEW_LINE>FilterResults filterResults = new FilterResults();<NEW_LINE>if (query.trim().isEmpty()) {<NEW_LINE>filterResults.count = data.size();<NEW_LINE>filterResults.values = data;<NEW_LINE>}<NEW_LINE>settings.setQuery(query);<NEW_LINE>data.clear();<NEW_LINE>if (null != settings.getAmiiboFiles()) {<NEW_LINE>data.addAll(settings.getAmiiboFiles());<NEW_LINE>}<NEW_LINE>ArrayList<AmiiboFile> tempList = new ArrayList<>();<NEW_LINE>String queryText = query.trim().toLowerCase();<NEW_LINE>for (AmiiboFile amiiboFile : data) {<NEW_LINE>boolean add = false;<NEW_LINE><MASK><NEW_LINE>if (null != amiiboManager) {<NEW_LINE>Amiibo amiibo = amiiboManager.amiibos.get(amiiboFile.getId());<NEW_LINE>if (null == amiibo)<NEW_LINE>amiibo = new Amiibo(amiiboManager, amiiboFile.getId(), null, null);<NEW_LINE>add = settings.amiiboContainsQuery(amiibo, queryText);<NEW_LINE>}<NEW_LINE>if (!add && null != amiiboFile.getFilePath())<NEW_LINE>add = pathContainsQuery(amiiboFile.getFilePath().getAbsolutePath(), queryText);<NEW_LINE>if (add)<NEW_LINE>tempList.add(amiiboFile);<NEW_LINE>}<NEW_LINE>filterResults.count = tempList.size();<NEW_LINE>filterResults.values = tempList;<NEW_LINE>return filterResults;<NEW_LINE>}
AmiiboManager amiiboManager = settings.getAmiiboManager();
1,538,565
private void adaptFpsRange(int expectedFps, CaptureRequest.Builder builderInputSurface) {<NEW_LINE>List<Range<Integer>> fpsRanges = getSupportedFps(null, Facing.BACK);<NEW_LINE>if (fpsRanges != null && fpsRanges.size() > 0) {<NEW_LINE>Range<Integer> closestRange = fpsRanges.get(0);<NEW_LINE>int measure = Math.abs(closestRange.getLower() - expectedFps) + Math.abs(<MASK><NEW_LINE>for (Range<Integer> range : fpsRanges) {<NEW_LINE>if (CameraHelper.discardCamera2Fps(range, facing))<NEW_LINE>continue;<NEW_LINE>if (range.getLower() <= expectedFps && range.getUpper() >= expectedFps) {<NEW_LINE>int curMeasure = Math.abs(((range.getLower() + range.getUpper()) / 2) - expectedFps);<NEW_LINE>if (curMeasure < measure) {<NEW_LINE>closestRange = range;<NEW_LINE>measure = curMeasure;<NEW_LINE>} else if (curMeasure == measure) {<NEW_LINE>if (Math.abs(range.getUpper() - expectedFps) < Math.abs(closestRange.getUpper() - expectedFps)) {<NEW_LINE>closestRange = range;<NEW_LINE>measure = curMeasure;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Log.i(TAG, "fps: " + closestRange.getLower() + " - " + closestRange.getUpper());<NEW_LINE>builderInputSurface.set(CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE, closestRange);<NEW_LINE>}<NEW_LINE>}
closestRange.getUpper() - expectedFps);
695,391
private void statInit() {<NEW_LINE>final int p_WindowNo = getWindowNo();<NEW_LINE>labelValue.setText(Msg.getMsg(Env.getCtx(), "Value"));<NEW_LINE>fieldValue.setBackground(AdempierePLAF.getInfoBackground());<NEW_LINE>fieldValue.addActionListener(this);<NEW_LINE>labelName.setText(Msg.getMsg(Env.getCtx(), "Name"));<NEW_LINE>fieldName.setBackground(AdempierePLAF.getInfoBackground());<NEW_LINE>fieldName.addActionListener(this);<NEW_LINE>// From A_Asset.<NEW_LINE>fBPartner_ID = new VLookup("C_BPartner_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, 8065, DisplayType.Search));<NEW_LINE>lBPartner_ID.setLabelFor(fBPartner_ID);<NEW_LINE>fBPartner_ID.setBackground(AdempierePLAF.getInfoBackground());<NEW_LINE>fProduct_ID = new VLookup("M_Product_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, 8047, DisplayType.Search));<NEW_LINE>lProduct_ID.setLabelFor(fProduct_ID);<NEW_LINE>fProduct_ID.setBackground(AdempierePLAF.getInfoBackground());<NEW_LINE>//<NEW_LINE>parameterPanel.setLayout(new ALayout());<NEW_LINE>//<NEW_LINE>parameterPanel.add(labelValue, new ALayoutConstraint(0, 0));<NEW_LINE>parameterPanel.add(fieldValue, null);<NEW_LINE>parameterPanel.add(lBPartner_ID, null);<NEW_LINE>parameterPanel.add(fBPartner_ID, null);<NEW_LINE>//<NEW_LINE>parameterPanel.add(labelName, new ALayoutConstraint(1, 0));<NEW_LINE><MASK><NEW_LINE>parameterPanel.add(lProduct_ID, null);<NEW_LINE>parameterPanel.add(fProduct_ID, null);<NEW_LINE>}
parameterPanel.add(fieldName, null);
124,686
/* =============== ENCRYPTION ================= */<NEW_LINE>private byte[] encrypt(byte[] data) throws Exception {<NEW_LINE>if (config.getGroupPassword() == null) {<NEW_LINE>return data;<NEW_LINE>}<NEW_LINE>Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");<NEW_LINE>byte[] iv = cipher.getParameters().getParameterSpec(IvParameterSpec.class).getIV();<NEW_LINE>IvParameterSpec ivSpec = new IvParameterSpec(iv);<NEW_LINE>SecretKeySpec keySpec = new SecretKeySpec(paddedPassword(config.getGroupPassword()), "AES");<NEW_LINE>cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivSpec);<NEW_LINE>ByteArrayOutputStream stream = new ByteArrayOutputStream();<NEW_LINE>DataOutput output = new DataOutputStream(stream);<NEW_LINE><MASK><NEW_LINE>output.write(iv);<NEW_LINE>byte[] cypher = cipher.doFinal(data);<NEW_LINE>output.writeInt(cypher.length);<NEW_LINE>output.write(cypher);<NEW_LINE>return stream.toByteArray();<NEW_LINE>}
output.writeInt(iv.length);
963,417
protected final MethodTree rewriteChildren(MethodTree tree) {<NEW_LINE>ModifiersTree mods = (ModifiersTree) translate(tree.getModifiers());<NEW_LINE>ExpressionTree restype = (ExpressionTree) translateClassRef(tree.getReturnType());<NEW_LINE>List<? extends TypeParameterTree> typarams = translateStable(tree.getTypeParameters());<NEW_LINE>List<? extends VariableTree> params = <MASK><NEW_LINE>List<? extends ExpressionTree> thrown = translate(tree.getThrows());<NEW_LINE>ExpressionTree defaultValue = (ExpressionTree) translate(tree.getDefaultValue());<NEW_LINE>BlockTree body = (BlockTree) translate(tree.getBody());<NEW_LINE>if (restype != tree.getReturnType() || !typarams.equals(tree.getTypeParameters()) || !params.equals(tree.getParameters()) || !thrown.equals(tree.getThrows()) || mods != tree.getModifiers() || defaultValue != tree.getDefaultValue() || body != tree.getBody()) {<NEW_LINE>if ((((JCModifiers) mods).flags & Flags.GENERATEDCONSTR) != 0) {<NEW_LINE>mods = make.Modifiers(((JCModifiers) mods).flags & ~Flags.GENERATEDCONSTR, mods.getAnnotations());<NEW_LINE>}<NEW_LINE>MethodTree n = make.Method(mods, tree.getName().toString(), restype, typarams, params, thrown, body, defaultValue);<NEW_LINE>copyCommentTo(tree, n);<NEW_LINE>copyPosTo(tree, n);<NEW_LINE>tree = n;<NEW_LINE>}<NEW_LINE>return tree;<NEW_LINE>}
translateStable(tree.getParameters());
923,779
private static void syncDefaultRoleStatesToDb(Connection conn, List<PolarAccountInfo> accounts, DefaultRoleState state) throws SQLException {<NEW_LINE>final String sql = String.format("insert into %s(%s, %s) values (?, ?) " + "on duplicate key update %s = ?;", <MASK><NEW_LINE>try (PreparedStatement stmt = conn.prepareStatement(sql)) {<NEW_LINE>int updatedCount = 0;<NEW_LINE>for (PolarAccountInfo account : accounts) {<NEW_LINE>stmt.setLong(1, account.getAccount().getAccountId());<NEW_LINE>stmt.setByte(2, state.stateId);<NEW_LINE>stmt.setLong(3, account.getAccount().getAccountId());<NEW_LINE>updatedCount += stmt.executeUpdate();<NEW_LINE>}<NEW_LINE>LOG.info("Start to update default role state from metadb.");<NEW_LINE>int expectedRowCount = accounts.size();<NEW_LINE>LOG.info("Finished updating default role state in metadb, expected row count: " + expectedRowCount + ", " + "actual row count: " + updatedCount);<NEW_LINE>}<NEW_LINE>}
TABLE_DEFAULT_ROLE_STATE, COL_ACCOUNT_ID, COL_DEFAULT_ROLE_STATE, COL_ACCOUNT_ID);
519,286
private TsModel transformNonStringEnumKeyMaps(SymbolTable symbolTable, TsModel tsModel) {<NEW_LINE>return transformBeanPropertyTypes(tsModel, new TsType.Transformer() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public TsType transform(TsType.Context context, TsType tsType) {<NEW_LINE>if (tsType instanceof TsType.MappedType) {<NEW_LINE>final TsType.MappedType mappedType = (TsType.MappedType) tsType;<NEW_LINE>if (mappedType.parameterType instanceof TsType.EnumReferenceType) {<NEW_LINE>final TsType.EnumReferenceType enumType = (TsType.EnumReferenceType) mappedType.parameterType;<NEW_LINE>final Class<?> enumClass = symbolTable.getSymbolClass(enumType.symbol);<NEW_LINE>final TsEnumModel enumModel = tsModel.getEnums().stream().filter(model -> Objects.equals(model.getOrigin(), enumClass)).<MASK><NEW_LINE>if (settings.mapEnum == EnumMapping.asNumberBasedEnum || enumModel != null && enumModel.getKind() == EnumKind.NumberBased || enumModel != null && enumModel.getMembers().stream().anyMatch(member -> !(member.getEnumValue() instanceof String))) {<NEW_LINE>return new TsType.IndexedArrayType(TsType.String, mappedType.type);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return tsType;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
findFirst().orElse(null);
1,287,946
public void testAsyncInvoker_postConnectionTimeoutwithInvocationCallback(Map<String, String> param, StringBuilder ret) {<NEW_LINE>String target = null;<NEW_LINE>if (isZOS()) {<NEW_LINE>// https://stackoverflow.com/a/904609/6575578<NEW_LINE>target = "http://example.com:81";<NEW_LINE>} else {<NEW_LINE>// Connect to telnet port - which should be disabled on all non-Z test machines - so we should expect a timeout<NEW_LINE>target = "http://localhost:23/blah";<NEW_LINE>}<NEW_LINE>ClientBuilder cb = ClientBuilder.newBuilder();<NEW_LINE>cb.property("com.ibm.ws.jaxrs.client.connection.timeout", TIMEOUT);<NEW_LINE>Client c = cb.build();<NEW_LINE>WebTarget t = c.target(target);<NEW_LINE><MASK><NEW_LINE>builder.accept("application/xml");<NEW_LINE>AsyncInvoker asyncInvoker = builder.async();<NEW_LINE>Book book = new Book("Test book6", 105);<NEW_LINE>final Holder<Book> holder = new Holder<Book>();<NEW_LINE>InvocationCallback<Book> callback = createCallbackFailed(holder);<NEW_LINE>long startTime = System.currentTimeMillis();<NEW_LINE>Future<Book> future = asyncInvoker.post(Entity.xml(book), callback);<NEW_LINE>long elapsed = System.currentTimeMillis() - startTime;<NEW_LINE>System.out.println("testAsyncInvoker_postConnectionTimeoutwithInvocationCallback with TIMEOUT " + TIMEOUT + " asyncInvoker.post elapsed time " + elapsed);<NEW_LINE>long startTime2 = System.currentTimeMillis();<NEW_LINE>try {<NEW_LINE>Book response = future.get();<NEW_LINE>// Did not time out as expected<NEW_LINE>ret.append(response.getName());<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>ret.append("InterruptedException");<NEW_LINE>e.printStackTrace();<NEW_LINE>} catch (ExecutionException e) {<NEW_LINE>if (e.getCause().toString().contains("ProcessingException")) {<NEW_LINE>ret.append("Timeout as expected");<NEW_LINE>} else {<NEW_LINE>ret.append("ExecutionException");<NEW_LINE>}<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>long elapsed2 = System.currentTimeMillis() - startTime2;<NEW_LINE>System.out.println("testAsyncInvoker_postConnectionTimeoutwithInvocationCallback with TIMEOUT " + TIMEOUT + " future.get elapsed2 time " + elapsed2);<NEW_LINE>c.close();<NEW_LINE>}
Builder builder = t.request();
1,513,932
public void run() {<NEW_LINE>log.debug("Loading asset: " + asset.getMD5Key());<NEW_LINE>BufferedImage image = imageMap.get(asset.getMD5Key());<NEW_LINE>if (image != null && image != TRANSFERING_IMAGE) {<NEW_LINE>// We've somehow already loaded this image<NEW_LINE>log.debug("Image wasn't in transit: " + asset.getMD5Key());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (asset.getExtension().equals(Asset.DATA_EXTENSION)) {<NEW_LINE>log.debug("BackgroundImageLoader.run(" + asset.getName() + "," + asset.getExtension() + ", " + <MASK><NEW_LINE>// we should never see this<NEW_LINE>image = BROKEN_IMAGE;<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>assert asset.getData() != null : "asset.getImage() for " + asset.toString() + "returns null?!";<NEW_LINE>image = ImageUtil.createCompatibleImage(ImageUtil.bytesToImage(asset.getData(), asset.getName()), hints);<NEW_LINE>} catch (Throwable t) {<NEW_LINE>if (!AssetManager.BAD_ASSET_LOCATION_KEY.toString().equals(asset.getMD5Key())) {<NEW_LINE>// Don't bother logging cache miss of internal bad location asset<NEW_LINE>log.error("BackgroundImageLoader.run(" + asset.getName() + "," + asset.getExtension() + ", " + asset.getMD5Key() + "): image not resolved", t);<NEW_LINE>}<NEW_LINE>image = BROKEN_IMAGE;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>synchronized (imageLoaderMutex) {<NEW_LINE>// Replace placeholder with actual image<NEW_LINE>imageMap.put(asset.getMD5Key(), image);<NEW_LINE>backupImageMap.put(asset.getMD5Key(), image);<NEW_LINE>notifyObservers(asset, image);<NEW_LINE>}<NEW_LINE>}
asset.getMD5Key() + "): looks like data and skipped");
994,022
public static void openInRevision(final File originalFile, final SVNUrl repoUrl, final SVNUrl fileUrl, final SVNRevision svnRevision, final SVNRevision pegRevision, boolean showAnnotations) {<NEW_LINE>File file;<NEW_LINE>String rev = svnRevision.toString();<NEW_LINE>try {<NEW_LINE>file = org.netbeans.modules.subversion.VersionsCache.getInstance().getFileRevision(repoUrl, fileUrl, rev, pegRevision.toString(), originalFile.getName());<NEW_LINE>} catch (IOException e) {<NEW_LINE>SvnClientExceptionHandler.notifyException(e, true, true);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final FileObject fo = FileUtil.toFileObject(FileUtil.normalizeFile(file));<NEW_LINE>EditorCookie ec = null;<NEW_LINE>org.openide.cookies.OpenCookie oc = null;<NEW_LINE>try {<NEW_LINE>DataObject dobj = DataObject.find(fo);<NEW_LINE>ec = dobj.getCookie(EditorCookie.class);<NEW_LINE>oc = dobj.getCookie(org.openide.cookies.OpenCookie.class);<NEW_LINE>} catch (DataObjectNotFoundException ex) {<NEW_LINE>Subversion.LOG.log(Level.FINE, null, ex);<NEW_LINE>}<NEW_LINE>org.openide.text.CloneableEditorSupport ces = null;<NEW_LINE>if (ec == null && oc != null) {<NEW_LINE>oc.open();<NEW_LINE>} else {<NEW_LINE>ces = org.netbeans.modules.versioning.util.<MASK><NEW_LINE>}<NEW_LINE>if (showAnnotations) {<NEW_LINE>if (ces == null) {<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>final org.openide.text.CloneableEditorSupport support = ces;<NEW_LINE>EventQueue.invokeLater(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>javax.swing.JEditorPane[] panes = support.getOpenedPanes();<NEW_LINE>if (panes != null) {<NEW_LINE>org.netbeans.modules.subversion.ui.blame.BlameAction.showAnnotations(panes[0], originalFile, svnRevision);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
Utils.openFile(fo, rev);
1,193
protected KeyInfoBean createKeyInfo() throws Exception {<NEW_LINE>KeyInfoBean keyInfo = new KeyInfoBean();<NEW_LINE>if (statement == Statement.AUTHN) {<NEW_LINE>keyInfo.setCertificate(certs[0]);<NEW_LINE>keyInfo.setCertIdentifer(certIdentifier);<NEW_LINE>} else if (statement == Statement.ATTR) {<NEW_LINE>// Build a new Document<NEW_LINE>DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();<NEW_LINE>docBuilderFactory.setNamespaceAware(true);<NEW_LINE>DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();<NEW_LINE>Document doc = docBuilder.newDocument();<NEW_LINE>// Create an Encrypted Key<NEW_LINE>WSSecEncryptedKey encrKey = new WSSecEncryptedKey();<NEW_LINE>encrKey.setKeyIdentifierType(WSConstants.X509_KEY_IDENTIFIER);<NEW_LINE>encrKey.setUseThisCert(certs[0]);<NEW_LINE>encrKey.prepare(doc, null);<NEW_LINE>ephemeralKey = encrKey.getEphemeralKey();<NEW_LINE><MASK><NEW_LINE>// Append the EncryptedKey to a KeyInfo element<NEW_LINE>Element keyInfoElement = doc.createElementNS(WSConstants.SIG_NS, WSConstants.SIG_PREFIX + ":" + WSConstants.KEYINFO_LN);<NEW_LINE>keyInfoElement.setAttributeNS(WSConstants.XMLNS_NS, "xmlns:" + WSConstants.SIG_PREFIX, WSConstants.SIG_NS);<NEW_LINE>keyInfoElement.appendChild(encryptedKeyElement);<NEW_LINE>keyInfo.setElement(keyInfoElement);<NEW_LINE>}<NEW_LINE>return keyInfo;<NEW_LINE>}
Element encryptedKeyElement = encrKey.getEncryptedKeyElement();
1,015,736
private Mono<PagedResponse<NetworkInterfaceInner>> listByResourceGroupSinglePageAsync(String resourceGroupName, 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 (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>final String apiVersion = "2021-05-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), accept, context).map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null));<NEW_LINE>}
error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));
662,060
final ListPackagingConfigurationsResult executeListPackagingConfigurations(ListPackagingConfigurationsRequest listPackagingConfigurationsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listPackagingConfigurationsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListPackagingConfigurationsRequest> request = null;<NEW_LINE>Response<ListPackagingConfigurationsResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new ListPackagingConfigurationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listPackagingConfigurationsRequest));<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, "MediaPackage Vod");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPackagingConfigurations");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListPackagingConfigurationsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPackagingConfigurationsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
205,760
public List<Integer> breadthFirstOrder(int startVertex) {<NEW_LINE>// If the specified startVertex is invalid, return an empty list<NEW_LINE>if (startVertex >= _numberOfVertices || startVertex < 0) {<NEW_LINE>return new ArrayList<Integer>();<NEW_LINE>}<NEW_LINE>// Create an array to keep track of the visited vertices<NEW_LINE>boolean[<MASK><NEW_LINE>// Create a list to keep track of the ordered vertices<NEW_LINE>ArrayList<Integer> orderList = new ArrayList<Integer>();<NEW_LINE>// Create a queue for our BFS algorithm and add the startVertex<NEW_LINE>// to the queue<NEW_LINE>Queue<Integer> queue = new LinkedList<Integer>();<NEW_LINE>queue.add(startVertex);<NEW_LINE>// Continue until the queue is empty<NEW_LINE>while (!queue.isEmpty()) {<NEW_LINE>// Remove the first vertex in the queue<NEW_LINE>int currentVertex = queue.poll();<NEW_LINE>// If we've visited this vertex, skip it<NEW_LINE>if (visited[currentVertex]) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// We now visit this vertex by adding it to the orderList and<NEW_LINE>// marking it as visited<NEW_LINE>orderList.add(currentVertex);<NEW_LINE>visited[currentVertex] = true;<NEW_LINE>// Get the adjacency array for the currentVertex and<NEW_LINE>// check each node<NEW_LINE>int[] adjacent = _adjacency[currentVertex];<NEW_LINE>for (// If an edge exists between the current vertex and the<NEW_LINE>// If an edge exists between the current vertex and the<NEW_LINE>int vertex = 0; // If an edge exists between the current vertex and the<NEW_LINE>vertex < adjacent.length; // vertex we are considering exploring, we add it to the queue<NEW_LINE>vertex++) {<NEW_LINE>if (adjacent[vertex] == AdjacencyMatrixGraph.EDGE_EXIST) {<NEW_LINE>queue.add(vertex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return orderList;<NEW_LINE>}
] visited = new boolean[_numberOfVertices];
931,016
private void initAttrs(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {<NEW_LINE>float density = context.getResources().getDisplayMetrics().density;<NEW_LINE>float scaledDensity = context.getResources().getDisplayMetrics().scaledDensity;<NEW_LINE>TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.BaseWheelLayout, defStyleAttr, defStyleRes);<NEW_LINE>setVisibleItemCount(typedArray.getInt(R<MASK><NEW_LINE>setSameWidthEnabled(typedArray.getBoolean(R.styleable.BaseWheelLayout_wheel_sameWidthEnabled, false));<NEW_LINE>setMaxWidthText(typedArray.getString(R.styleable.BaseWheelLayout_wheel_maxWidthText));<NEW_LINE>setTextColor(typedArray.getColor(R.styleable.BaseWheelLayout_wheel_itemTextColor, 0xFF888888));<NEW_LINE>setSelectedTextColor(typedArray.getColor(R.styleable.BaseWheelLayout_wheel_itemTextColorSelected, 0xFF000000));<NEW_LINE>setTextSize(typedArray.getDimension(R.styleable.BaseWheelLayout_wheel_itemTextSize, 15 * scaledDensity));<NEW_LINE>setSelectedTextSize(typedArray.getDimension(R.styleable.BaseWheelLayout_wheel_itemTextSizeSelected, 15 * scaledDensity));<NEW_LINE>setSelectedTextBold(typedArray.getBoolean(R.styleable.BaseWheelLayout_wheel_itemTextBoldSelected, false));<NEW_LINE>setTextAlign(typedArray.getInt(R.styleable.BaseWheelLayout_wheel_itemTextAlign, ItemTextAlign.CENTER));<NEW_LINE>setItemSpace(typedArray.getDimensionPixelSize(R.styleable.BaseWheelLayout_wheel_itemSpace, (int) (20 * density)));<NEW_LINE>setCyclicEnabled(typedArray.getBoolean(R.styleable.BaseWheelLayout_wheel_cyclicEnabled, false));<NEW_LINE>setIndicatorEnabled(typedArray.getBoolean(R.styleable.BaseWheelLayout_wheel_indicatorEnabled, false));<NEW_LINE>setIndicatorColor(typedArray.getColor(R.styleable.BaseWheelLayout_wheel_indicatorColor, 0xFFC9C9C9));<NEW_LINE>setIndicatorSize(typedArray.getDimension(R.styleable.BaseWheelLayout_wheel_indicatorSize, 1 * density));<NEW_LINE>setCurvedIndicatorSpace(typedArray.getDimensionPixelSize(R.styleable.BaseWheelLayout_wheel_curvedIndicatorSpace, (int) (1 * density)));<NEW_LINE>setCurtainEnabled(typedArray.getBoolean(R.styleable.BaseWheelLayout_wheel_curtainEnabled, false));<NEW_LINE>setCurtainColor(typedArray.getColor(R.styleable.BaseWheelLayout_wheel_curtainColor, 0x88FFFFFF));<NEW_LINE>setCurtainCorner(typedArray.getInt(R.styleable.BaseWheelLayout_wheel_curtainCorner, CurtainCorner.NONE));<NEW_LINE>setCurtainRadius(typedArray.getDimension(R.styleable.BaseWheelLayout_wheel_curtainRadius, 0));<NEW_LINE>setAtmosphericEnabled(typedArray.getBoolean(R.styleable.BaseWheelLayout_wheel_atmosphericEnabled, false));<NEW_LINE>setCurvedEnabled(typedArray.getBoolean(R.styleable.BaseWheelLayout_wheel_curvedEnabled, false));<NEW_LINE>setCurvedMaxAngle(typedArray.getInteger(R.styleable.BaseWheelLayout_wheel_curvedMaxAngle, 90));<NEW_LINE>typedArray.recycle();<NEW_LINE>onAttributeSet(context, attrs);<NEW_LINE>}
.styleable.BaseWheelLayout_wheel_visibleItemCount, 5));
1,105,555
public RestResponse list(Application app, RestRequest request) {<NEW_LINE>IPage<Application> applicationList = applicationService.page(app, request);<NEW_LINE>List<Application> appRecords = applicationList.getRecords();<NEW_LINE>List<Long> appIds = appRecords.stream().map(Application::getId).collect(Collectors.toList());<NEW_LINE>Map<Long, PipelineStatus> <MASK><NEW_LINE>// add building pipeline status info and app control info<NEW_LINE>appRecords = appRecords.stream().peek(e -> {<NEW_LINE>if (pipeStates.containsKey(e.getId())) {<NEW_LINE>e.setBuildStatus(pipeStates.get(e.getId()).getCode());<NEW_LINE>}<NEW_LINE>}).peek(e -> e.setAppControl(new AppControl().setAllowBuild(e.getBuildStatus() == null || !PipelineStatus.running.getCode().equals(e.getBuildStatus())).setAllowStart(PipelineStatus.success.getCode().equals(e.getBuildStatus()) && !e.shouldBeTrack()).setAllowStop(e.isRunning()))).collect(Collectors.toList());<NEW_LINE>applicationList.setRecords(appRecords);<NEW_LINE>return RestResponse.create().data(applicationList);<NEW_LINE>}
pipeStates = appBuildPipeService.listPipelineStatus(appIds);
1,706,591
private Mono<Response<Void>> generateNewSitePublishingPasswordSlotWithResponseAsync(String resourceGroupName, String name, String slot, 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 (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (name == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (slot == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter slot 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>context = <MASK><NEW_LINE>return service.generateNewSitePublishingPasswordSlot(this.client.getEndpoint(), resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), context);<NEW_LINE>}
this.client.mergeContext(context);
1,296,828
public static void main(String[] args) {<NEW_LINE>JFrame view = new JFrame("spinner");<NEW_LINE>view.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<NEW_LINE>view.setLayout(new FlowLayout());<NEW_LINE>Transaction.runVoid(() -> {<NEW_LINE>CellLoop<Integer> value = new CellLoop<>();<NEW_LINE>SLabel lblValue = new SLabel(value.map(i -> Integer.toString(i)));<NEW_LINE>SButton plus = new SButton("+");<NEW_LINE>SButton minus = new SButton("-");<NEW_LINE>view.add(lblValue);<NEW_LINE>view.add(plus);<NEW_LINE>view.add(minus);<NEW_LINE>Stream<Integer> sPlusDelta = plus.<MASK><NEW_LINE>Stream<Integer> sMinusDelta = minus.sClicked.map(u -> -1);<NEW_LINE>Stream<Integer> sDelta = sPlusDelta.orElse(sMinusDelta);<NEW_LINE>Stream<Integer> sUpdate = sDelta.snapshot(value, (delta, value_) -> delta + value_);<NEW_LINE>value.loop(sUpdate.hold(0));<NEW_LINE>});<NEW_LINE>view.setSize(400, 160);<NEW_LINE>view.setVisible(true);<NEW_LINE>}
sClicked.map(u -> 1);
1,059,070
public Zebra read(JsonReader in) throws IOException {<NEW_LINE>JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();<NEW_LINE>validateJsonObject(jsonObj);<NEW_LINE>// store additional fields in the deserialized instance<NEW_LINE>Zebra instance = thisAdapter.fromJsonTree(jsonObj);<NEW_LINE>for (Map.Entry<String, JsonElement> entry : jsonObj.entrySet()) {<NEW_LINE>if (!openapiFields.contains(entry.getKey())) {<NEW_LINE>if (entry.getValue().isJsonPrimitive()) {<NEW_LINE>// primitive type<NEW_LINE>if (entry.getValue().getAsJsonPrimitive().isString())<NEW_LINE>instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());<NEW_LINE>else if (entry.getValue().getAsJsonPrimitive().isNumber())<NEW_LINE>instance.putAdditionalProperty(entry.getKey(), entry.<MASK><NEW_LINE>else if (entry.getValue().getAsJsonPrimitive().isBoolean())<NEW_LINE>instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());<NEW_LINE>else<NEW_LINE>throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));<NEW_LINE>} else {<NEW_LINE>// non-primitive type<NEW_LINE>instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return instance;<NEW_LINE>}
getValue().getAsNumber());
73,861
public List<OrderItem> readOrderItemsForCustomersInDateRange(List<Long> customerIds, Date startDate, Date endDate) {<NEW_LINE>CriteriaBuilder builder = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<OrderItem> criteria = builder.createQuery(OrderItem.class);<NEW_LINE>Root<OrderImpl> order = <MASK><NEW_LINE>Join<Order, OrderItem> orderItems = order.join("orderItems");<NEW_LINE>criteria.select(orderItems);<NEW_LINE>List<Predicate> restrictions = new ArrayList<>();<NEW_LINE>restrictions.add(builder.between(order.<Date>get("submitDate"), startDate, endDate));<NEW_LINE>restrictions.add(order.get("customer").get("id").in(customerIds));<NEW_LINE>criteria.where(restrictions.toArray(new Predicate[restrictions.size()]));<NEW_LINE>criteria.orderBy(builder.desc(order.get("customer")), builder.asc(order.get("submitDate")));<NEW_LINE>TypedQuery<OrderItem> query = em.createQuery(criteria);<NEW_LINE>query.setHint(QueryHints.HINT_CACHEABLE, true);<NEW_LINE>query.setHint(QueryHints.HINT_CACHE_REGION, "query.Order");<NEW_LINE>return query.getResultList();<NEW_LINE>}
criteria.from(OrderImpl.class);
1,840,054
protected String bindToFields(final OHttpRequest iRequest, final Map<String, String> iFields, final ORecordId iRid) throws Exception {<NEW_LINE>if (iRequest.getContent() == null)<NEW_LINE>throw new IllegalArgumentException("HTTP Request content is empty");<NEW_LINE>final <MASK><NEW_LINE>// PARSE PARAMETERS<NEW_LINE>String className = null;<NEW_LINE>final String[] params = req.split("&");<NEW_LINE>String value;<NEW_LINE>for (String p : params) {<NEW_LINE>if (OStringSerializerHelper.contains(p, '=')) {<NEW_LINE>String[] pairs = p.split("=");<NEW_LINE>value = pairs.length == 1 ? null : pairs[1];<NEW_LINE>if ("0".equals(pairs[0]) && iRid != null)<NEW_LINE>iRid.fromString(value);<NEW_LINE>else if ("1".equals(pairs[0]))<NEW_LINE>className = value;<NEW_LINE>else if (pairs[0].startsWith("_") || pairs[0].equals("id"))<NEW_LINE>continue;<NEW_LINE>else if (iFields != null) {<NEW_LINE>iFields.put(pairs[0], value);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return className;<NEW_LINE>}
String req = iRequest.getContent();
1,192,793
private void createPolarAreaModel() {<NEW_LINE>polarAreaModel = new PolarAreaChartModel();<NEW_LINE>ChartData data = new ChartData();<NEW_LINE>PolarAreaChartDataSet dataSet = new PolarAreaChartDataSet();<NEW_LINE>List<Number> <MASK><NEW_LINE>values.add(11);<NEW_LINE>values.add(16);<NEW_LINE>values.add(7);<NEW_LINE>values.add(3);<NEW_LINE>values.add(14);<NEW_LINE>dataSet.setData(values);<NEW_LINE>List<String> bgColors = new ArrayList<>();<NEW_LINE>bgColors.add("rgb(255, 99, 132)");<NEW_LINE>bgColors.add("rgb(75, 192, 192)");<NEW_LINE>bgColors.add("rgb(255, 205, 86)");<NEW_LINE>bgColors.add("rgb(201, 203, 207)");<NEW_LINE>bgColors.add("rgb(54, 162, 235)");<NEW_LINE>dataSet.setBackgroundColor(bgColors);<NEW_LINE>data.addChartDataSet(dataSet);<NEW_LINE>List<String> labels = new ArrayList<>();<NEW_LINE>labels.add("Red");<NEW_LINE>labels.add("Green");<NEW_LINE>labels.add("Yellow");<NEW_LINE>labels.add("Grey");<NEW_LINE>labels.add("Blue");<NEW_LINE>data.setLabels(labels);<NEW_LINE>polarAreaModel.setData(data);<NEW_LINE>}
values = new ArrayList<>();
822,596
public com.amazonaws.services.applicationinsights.model.AccessDeniedException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.applicationinsights.model.AccessDeniedException accessDeniedException = new com.amazonaws.services.applicationinsights.model.AccessDeniedException(null);<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return accessDeniedException;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,845,584
final public void caseAssignStmt(AssignStmt as) {<NEW_LINE>Value l = as.getLeftOp();<NEW_LINE>Value r = as.getRightOp();<NEW_LINE>if (!(l.getType() instanceof RefLikeType)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>assert r.getType() instanceof RefLikeType : "Type mismatch in assignment " + as + " in method " + method.getSignature();<NEW_LINE>l.apply(MethodNodeFactory.this);<NEW_LINE>Node dest = getNode();<NEW_LINE>r.apply(MethodNodeFactory.this);<NEW_LINE>Node src = getNode();<NEW_LINE>if (l instanceof InstanceFieldRef) {<NEW_LINE>((InstanceFieldRef) l).getBase().apply(MethodNodeFactory.this);<NEW_LINE>pag.addDereference((VarNode) getNode());<NEW_LINE>}<NEW_LINE>if (r instanceof InstanceFieldRef) {<NEW_LINE>((InstanceFieldRef) r).getBase().apply(MethodNodeFactory.this);<NEW_LINE>pag.addDereference((VarNode) getNode());<NEW_LINE>} else if (r instanceof StaticFieldRef) {<NEW_LINE>StaticFieldRef sfr = (StaticFieldRef) r;<NEW_LINE>SootFieldRef s = sfr.getFieldRef();<NEW_LINE>if (pag.getOpts().empties_as_allocs()) {<NEW_LINE>if (s.declaringClass().getName().equals("java.util.Collections")) {<NEW_LINE>if (s.name().equals("EMPTY_SET")) {<NEW_LINE>src = pag.makeAllocNode(rtHashSet, rtHashSet, method);<NEW_LINE>} else if (s.name().equals("EMPTY_MAP")) {<NEW_LINE>src = pag.<MASK><NEW_LINE>} else if (s.name().equals("EMPTY_LIST")) {<NEW_LINE>src = pag.makeAllocNode(rtLinkedList, rtLinkedList, method);<NEW_LINE>}<NEW_LINE>} else if (s.declaringClass().getName().equals("java.util.Hashtable")) {<NEW_LINE>if (s.name().equals("emptyIterator")) {<NEW_LINE>src = pag.makeAllocNode(rtHashtableEmptyIterator, rtHashtableEmptyIterator, method);<NEW_LINE>} else if (s.name().equals("emptyEnumerator")) {<NEW_LINE>src = pag.makeAllocNode(rtHashtableEmptyEnumerator, rtHashtableEmptyEnumerator, method);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>mpag.addInternalEdge(src, dest);<NEW_LINE>}
makeAllocNode(rtHashMap, rtHashMap, method);
1,306,935
private static void markStackRoots() {<NEW_LINE>Address relocationThreshold <MASK><NEW_LINE>for (Address stackRoots = ShadowStack.getStackTop(); stackRoots != null; stackRoots = ShadowStack.getNextStackFrame(stackRoots)) {<NEW_LINE>int count = ShadowStack.getStackRootCount(stackRoots);<NEW_LINE>Address stackRootsPtr = ShadowStack.getStackRootPointer(stackRoots);<NEW_LINE>while (count-- > 0) {<NEW_LINE>RuntimeObject obj = stackRootsPtr.getAddress().toStructure();<NEW_LINE>if (!obj.toAddress().isLessThan(relocationThreshold)) {<NEW_LINE>if (isFullGC || (obj.classReference & RuntimeObject.GC_OLD_GENERATION) == 0) {<NEW_LINE>obj.classReference |= RuntimeObject.GC_MARKED;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>stackRootsPtr = stackRootsPtr.add(Address.sizeOf());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
= currentChunkPointer.value.toAddress();
1,659,579
private void updateSelectedColor() {<NEW_LINE>final boolean enabled = isEnabled();<NEW_LINE>if (enabled && myEditable) {<NEW_LINE>myTextField.setEnabled(true);<NEW_LINE>myTextField.setToolTipText(UIBundle.message("color.panel.select.color.tooltip.text"));<NEW_LINE>} else {<NEW_LINE>myTextField.setEnabled(false);<NEW_LINE>myTextField.setToolTipText(null);<NEW_LINE>}<NEW_LINE>Color color = enabled ? myColor : null;<NEW_LINE>if (color != null) {<NEW_LINE>myTextField.setText(String.format(HEX_STR, ColorUtil.toHex(color, true).toUpperCase(Locale.ENGLISH)));<NEW_LINE>} else {<NEW_LINE>myTextField.setText(null);<NEW_LINE>color = getBackground();<NEW_LINE>}<NEW_LINE>myTextField.setBackground(color);<NEW_LINE>myTextField.setSelectedTextColor(color);<NEW_LINE>myTextField.setOpaque(false);<NEW_LINE>if (color != null) {<NEW_LINE>int gray = (int) (0.212656 * color.getRed() + 0.715158 * color.getGreen() + 0.072186 * color.getBlue());<NEW_LINE>final int delta = gray < 0x20 ? 0x60 : gray < 0x50 ? 0x40 : gray < 0x80 ? 0x20 : gray < 0xB0 ? -0x20 : gray < 0xE0 ? -0x40 : -0x60;<NEW_LINE>gray += delta;<NEW_LINE>color = new <MASK><NEW_LINE>myTextField.setDisabledTextColor(color);<NEW_LINE>myTextField.setSelectionColor(color);<NEW_LINE>gray += delta;<NEW_LINE>color = new Color(gray, gray, gray);<NEW_LINE>myTextField.setForeground(color);<NEW_LINE>}<NEW_LINE>}
Color(gray, gray, gray);
1,189,929
public DmgClientFileSystem create(FSRLRoot targetFSRL, ByteProvider provider, FileSystemService fsService, TaskMonitor monitor) throws IOException, CancelledException {<NEW_LINE>FSRL containerFSRL = provider.getFSRL();<NEW_LINE>String dmgName = containerFSRL.getName();<NEW_LINE>ByteProvider decryptedProvider;<NEW_LINE>if (isEncrypted(provider)) {<NEW_LINE>if (containerFSRL.getNestingDepth() < 2) {<NEW_LINE>throw new CryptoException("Unable to decrypt DMG data because DMG crypto keys " + "are specific to the container it is embedded in and this DMG was not " + "in a container");<NEW_LINE>}<NEW_LINE>// get the name of the iphone.ipsw container so we can lookup our crypto keys<NEW_LINE>// based on that.<NEW_LINE>String containerName = containerFSRL.getName(1);<NEW_LINE>decryptedProvider = fsService.getDerivedByteProvider(containerFSRL, null, "decrypted " + containerName, provider.length(), () -> new DmgDecryptorStream(containerName, dmgName, provider), monitor);<NEW_LINE>} else {<NEW_LINE>decryptedProvider = provider;<NEW_LINE>}<NEW_LINE>File decryptedDmgFile = fsService.createPlaintextTempFile(decryptedProvider, "ghidra_decrypted_dmg_file", monitor);<NEW_LINE>DmgClientFileSystem fs = new DmgClientFileSystem(decryptedDmgFile, true, targetFSRL, fsService);<NEW_LINE>try {<NEW_LINE>fs.mount(monitor);<NEW_LINE>return fs;<NEW_LINE>} catch (IOException ioe) {<NEW_LINE>Msg.error(this, <MASK><NEW_LINE>fs.close();<NEW_LINE>throw ioe;<NEW_LINE>}<NEW_LINE>}
"Failed to mount DMG file system " + containerFSRL + ": ", ioe);
1,695,384
protected SootMethod generateRedirectMethodForStartActivityForResult(SootClass originActivity, SootClass destComp) {<NEW_LINE>String newSM_name = "redirector" + num++;<NEW_LINE>List<Type> newSM_parameters = new ArrayList<>();<NEW_LINE>newSM_parameters.add(originActivity.getType());<NEW_LINE>newSM_parameters.add(INTENT_TYPE);<NEW_LINE>SootMethod newSM = Scene.v().makeSootMethod(newSM_name, newSM_parameters, VoidType.v(), Modifier.STATIC | Modifier.PUBLIC);<NEW_LINE>dummyMainClass.addMethod(newSM);<NEW_LINE>final JimpleBody b = Jimple.v().newBody(newSM);<NEW_LINE>newSM.setActiveBody(b);<NEW_LINE>newSM.addTag(SimulatedCodeElementTag.TAG);<NEW_LINE>LocalGenerator lg = Scene.v().createLocalGenerator(b);<NEW_LINE>Local originActivityParameterLocal = lg.generateLocal(originActivity.getType());<NEW_LINE>Unit originActivityParameterU = Jimple.v().newIdentityStmt(originActivityParameterLocal, Jimple.v().newParameterRef(originActivity.getType(), 0));<NEW_LINE>b.getUnits().add(originActivityParameterU);<NEW_LINE>Local intentParameterLocal = lg.generateLocal(INTENT_TYPE);<NEW_LINE>b.getUnits().add(Jimple.v().newIdentityStmt(intentParameterLocal, Jimple.v().newParameterRef(INTENT_TYPE, 1)));<NEW_LINE>// call onCreate<NEW_LINE>Local componentLocal = lg.generateLocal(destComp.getType());<NEW_LINE>ActivityEntryPointInfo entryPointInfo = (ActivityEntryPointInfo) componentToEntryPoint.get(destComp);<NEW_LINE>{<NEW_LINE>SootMethod targetDummyMain = componentToEntryPoint.getEntryPoint(destComp);<NEW_LINE>if (targetDummyMain == null)<NEW_LINE>throw new RuntimeException(String.format("Destination component %s has no dummy main method", destComp.getName()));<NEW_LINE>b.getUnits().add(Jimple.v().newAssignStmt(componentLocal, Jimple.v().newStaticInvokeExpr(targetDummyMain.makeRef(), Collections.singletonList(intentParameterLocal))));<NEW_LINE>}<NEW_LINE>// Get the activity result<NEW_LINE>Local arIntentLocal = lg.generateLocal(INTENT_TYPE);<NEW_LINE>b.getUnits().add(Jimple.v().newAssignStmt(arIntentLocal, Jimple.v().newInstanceFieldRef(componentLocal, entryPointInfo.getResultIntentField().makeRef())));<NEW_LINE>// some apps do not have an onActivityResult method even they use<NEW_LINE>// startActivityForResult to communicate with other components.<NEW_LINE>SootMethod method = originActivity.getMethodUnsafe("void onActivityResult(int,int,android.content.Intent)");<NEW_LINE>if (method != null) {<NEW_LINE>List<Value> args = new ArrayList<>();<NEW_LINE>args.add(<MASK><NEW_LINE>args.add(IntConstant.v(-1));<NEW_LINE>args.add(arIntentLocal);<NEW_LINE>b.getUnits().add(Jimple.v().newInvokeStmt(Jimple.v().newVirtualInvokeExpr(originActivityParameterLocal, method.makeRef(), args)));<NEW_LINE>}<NEW_LINE>b.getUnits().add(Jimple.v().newReturnVoidStmt());<NEW_LINE>return newSM;<NEW_LINE>}
IntConstant.v(-1));
1,839,028
public Result tryPrepareBlock(@Nonnull IFarmer farm, @Nonnull BlockPos pos, @Nonnull IBlockState state) {<NEW_LINE>if (canPlant(farm.getSeedTypeInSuppliesFor(pos))) {<NEW_LINE>// we'll lose some spots in the center, but we can plant in the outer ring, which gives a net gain<NEW_LINE>if (Math.abs(farm.getLocation().getX() - pos.getX()) % 2 == 0) {<NEW_LINE>return Result.CLAIM;<NEW_LINE>}<NEW_LINE>if (Math.abs(farm.getLocation().getZ() - pos.getZ()) % 2 == 0) {<NEW_LINE>return Result.CLAIM;<NEW_LINE>}<NEW_LINE>final World world = farm.getWorld();<NEW_LINE>for (int x = -1; x < 2; x++) {<NEW_LINE>for (int z = -1; z < 2; z++) {<NEW_LINE>final BlockPos pos2 = pos.<MASK><NEW_LINE>final IBlockState state2 = world.getBlockState(pos2);<NEW_LINE>final Block block = state2.getBlock();<NEW_LINE>if (!(block.isLeaves(state2, world, pos2) || block.isAir(state2, world, pos2) || block.canBeReplacedByLeaves(state2, world, pos2))) {<NEW_LINE>return Result.CLAIM;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return super.tryPrepareBlock(farm, pos, state);<NEW_LINE>}<NEW_LINE>return Result.NEXT;<NEW_LINE>}
add(x, 0, z);
694,010
public static List<AnAction> buildSurroundActions(final Project project, final Editor editor, PsiFile file, @Nullable Surrounder surrounder) {<NEW_LINE>SelectionModel selectionModel = editor.getSelectionModel();<NEW_LINE><MASK><NEW_LINE>if (!hasSelection) {<NEW_LINE>selectLogicalLineContentsAtCaret(editor);<NEW_LINE>}<NEW_LINE>int startOffset = selectionModel.getSelectionStart();<NEW_LINE>int endOffset = selectionModel.getSelectionEnd();<NEW_LINE>PsiElement element1 = file.findElementAt(startOffset);<NEW_LINE>PsiElement element2 = file.findElementAt(endOffset - 1);<NEW_LINE>if (element1 == null || element2 == null)<NEW_LINE>return null;<NEW_LINE>TextRange textRange = new TextRange(startOffset, endOffset);<NEW_LINE>for (SurroundWithRangeAdjuster adjuster : SurroundWithRangeAdjuster.EP_NAME.getExtensionList()) {<NEW_LINE>textRange = adjuster.adjustSurroundWithRange(file, textRange, hasSelection);<NEW_LINE>if (textRange == null)<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>startOffset = textRange.getStartOffset();<NEW_LINE>endOffset = textRange.getEndOffset();<NEW_LINE>element1 = file.findElementAt(startOffset);<NEW_LINE>final Language baseLanguage = file.getViewProvider().getBaseLanguage();<NEW_LINE>assert element1 != null;<NEW_LINE>final Language l = element1.getParent().getLanguage();<NEW_LINE>List<SurroundDescriptor> surroundDescriptors = new ArrayList<>(LanguageSurrounders.INSTANCE.allForLanguage(l));<NEW_LINE>if (l != baseLanguage)<NEW_LINE>surroundDescriptors.addAll(LanguageSurrounders.INSTANCE.allForLanguage(baseLanguage));<NEW_LINE>surroundDescriptors.add(CustomFoldingSurroundDescriptor.INSTANCE);<NEW_LINE>int exclusiveCount = 0;<NEW_LINE>List<SurroundDescriptor> exclusiveSurroundDescriptors = new ArrayList<>();<NEW_LINE>for (SurroundDescriptor sd : surroundDescriptors) {<NEW_LINE>if (sd.isExclusive()) {<NEW_LINE>exclusiveCount++;<NEW_LINE>exclusiveSurroundDescriptors.add(sd);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (exclusiveCount > 0) {<NEW_LINE>surroundDescriptors = exclusiveSurroundDescriptors;<NEW_LINE>}<NEW_LINE>if (surrounder != null) {<NEW_LINE>invokeSurrounderInTests(project, editor, file, surrounder, startOffset, endOffset, surroundDescriptors);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Map<Surrounder, PsiElement[]> surrounders = new LinkedHashMap<>();<NEW_LINE>for (SurroundDescriptor descriptor : surroundDescriptors) {<NEW_LINE>final PsiElement[] elements = descriptor.getElementsToSurround(file, startOffset, endOffset);<NEW_LINE>if (elements.length > 0) {<NEW_LINE>for (PsiElement element : elements) {<NEW_LINE>assert element != null : "descriptor " + descriptor + " returned null element";<NEW_LINE>assert element.isValid() : descriptor;<NEW_LINE>}<NEW_LINE>for (Surrounder s : descriptor.getSurrounders()) {<NEW_LINE>surrounders.put(s, elements);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return doBuildSurroundActions(project, editor, file, surrounders);<NEW_LINE>}
boolean hasSelection = selectionModel.hasSelection();
60,694
public void addMappingForUrlPatterns(EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter, int index, String... urlPatterns) throws IllegalStateException, IllegalArgumentException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {<NEW_LINE>Tr.entry(tc, "addMappingForUrlPatterns", "isMatchAfter -> " + isMatchAfter + " index -> " + index);<NEW_LINE>}<NEW_LINE>if (urlPatterns == null) {<NEW_LINE>throw new IllegalArgumentException(nls.getString("add.filter.mapping.to.null.url.patterns"));<NEW_LINE>} else if (urlPatterns.length == 0) {<NEW_LINE>throw new IllegalArgumentException(nls.getString("add.filter.mapping.to.empty.url.patterns"));<NEW_LINE>}<NEW_LINE>if (this.context != null && this.context.isInitialized()) {<NEW_LINE>throw new IllegalStateException(nls.getString("Not.in.servletContextCreated"));<NEW_LINE>}<NEW_LINE>if (this.urlPatternMappings == null) {<NEW_LINE>this.urlPatternMappings = new ArrayList<String>();<NEW_LINE>}<NEW_LINE>for (String urlPattern : urlPatterns) {<NEW_LINE>this.urlPatternMappings.add(urlPattern);<NEW_LINE>IFilterMapping fmapping = new FilterMapping(urlPattern, this, null);<NEW_LINE>if (dispatcherTypes != null) {<NEW_LINE>// will default to REQUEST<NEW_LINE>DispatcherType[] dispatcherType = {};<NEW_LINE>fmapping.setDispatchMode(dispatcherTypes.toArray(dispatcherType));<NEW_LINE>}<NEW_LINE>if (isMatchAfter) {<NEW_LINE>if (index < 0) {<NEW_LINE>this.webAppConfig.<MASK><NEW_LINE>} else {<NEW_LINE>this.webAppConfig.getFilterMappings().add(index, fmapping);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>int previous = this.webAppConfig.getLastIndexBeforeDeclaredFilters();<NEW_LINE>this.webAppConfig.getFilterMappings().add(previous, fmapping);<NEW_LINE>this.webAppConfig.setLastIndexBeforeDeclaredFilters(++previous);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {<NEW_LINE>Tr.exit(tc, "addMappingForUrlPatterns", "isMatchAfter -> " + isMatchAfter + " index -> " + index);<NEW_LINE>}<NEW_LINE>}
getFilterMappings().add(fmapping);
1,116,602
// Populate the table with data.<NEW_LINE>public static void putItem(DynamoDbClient ddb, String tableName, String issueId, String title, String description, String createDate, String lastUpdateDate, String dueDate, Integer priority, String status) {<NEW_LINE>HashMap<String, AttributeValue> item = new HashMap<String, AttributeValue>();<NEW_LINE>item.put("issueId", AttributeValue.builder().s(issueId).build());<NEW_LINE>item.put("title", AttributeValue.builder().s(title).build());<NEW_LINE>item.put("description", AttributeValue.builder().s(description).build());<NEW_LINE>item.put("createDate", AttributeValue.builder().s(createDate).build());<NEW_LINE>item.put("lastUpdateDate", AttributeValue.builder().s(lastUpdateDate).build());<NEW_LINE>item.put("dueDate", AttributeValue.builder().s(dueDate).build());<NEW_LINE>item.put("priority", AttributeValue.builder().n(priority.toString()).build());<NEW_LINE>item.put("status", AttributeValue.builder().s(status).build());<NEW_LINE>PutItemRequest request = PutItemRequest.builder().tableName(tableName).item(item).build();<NEW_LINE>try {<NEW_LINE>ddb.putItem(request);<NEW_LINE>System.out.println(tableName + " was successfully updated");<NEW_LINE>} catch (DynamoDbException e) {<NEW_LINE>System.err.<MASK><NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>}
println(e.getMessage());
1,572,976
void poll(long timeout) {<NEW_LINE>checkState(Looper.myLooper() == Looper.getMainLooper() && Looper.myQueue() == realQueue);<NEW_LINE>// Message queue typically expects the looper to loop calling next() which returns current<NEW_LINE>// messages from the head of the queue. If no messages are current it will mark itself blocked<NEW_LINE>// and call nativePollOnce (see above) which suspends the thread until the next message's time.<NEW_LINE>// When messages are posted to the queue, if a new message is posted to the head and the queue<NEW_LINE>// is marked as blocked, then the enqueue function will notify and resume next(), allowing it<NEW_LINE>// return the next message. To simulate this behavior check if the queue is idle and if it is<NEW_LINE>// mark the queue as blocked and wait on a new message.<NEW_LINE>synchronized (realQueue) {<NEW_LINE>if (isIdle()) {<NEW_LINE>ReflectionHelpers.<MASK><NEW_LINE>try {<NEW_LINE>realQueue.wait(timeout);<NEW_LINE>} catch (InterruptedException ignored) {<NEW_LINE>// Fall through and unblock with no messages.<NEW_LINE>} finally {<NEW_LINE>ReflectionHelpers.setField(realQueue, "mBlocked", false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
setField(realQueue, "mBlocked", true);
663,740
final DescribeStackDriftDetectionStatusResult executeDescribeStackDriftDetectionStatus(DescribeStackDriftDetectionStatusRequest describeStackDriftDetectionStatusRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeStackDriftDetectionStatusRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeStackDriftDetectionStatusRequest> request = null;<NEW_LINE>Response<DescribeStackDriftDetectionStatusResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeStackDriftDetectionStatusRequestMarshaller().marshall(super.beforeMarshalling(describeStackDriftDetectionStatusRequest));<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, "CloudFormation");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeStackDriftDetectionStatus");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribeStackDriftDetectionStatusResult> responseHandler = new StaxResponseHandler<DescribeStackDriftDetectionStatusResult>(new DescribeStackDriftDetectionStatusResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
385,597
public static QuasiNode parseQuasiNode(InputSource inputSource, String pattern) throws ParseException {<NEW_LINE>// The top-level node returned from the parser is always a Block.<NEW_LINE>Block topLevelBlock = (Block) parse(inputSource, pattern);<NEW_LINE>ParseTreeNode topLevelNode = topLevelBlock;<NEW_LINE>// If the top-level Block contains a single child, promote it to allow it to<NEW_LINE>// match anywhere.<NEW_LINE>if (topLevelNode.children().size() == 1) {<NEW_LINE>topLevelNode = topLevelNode.children().get(0);<NEW_LINE>}<NEW_LINE>// If the top level is an ExpressionStmt, with one child, then promote its<NEW_LINE>// single child to the top level to allow the contained expression to match<NEW_LINE>// anywhere.<NEW_LINE>if (topLevelNode instanceof ExpressionStmt) {<NEW_LINE>topLevelNode = topLevelNode.children().get(0);<NEW_LINE>}<NEW_LINE>// If the top level is a FunctionDeclaration, promote its single child to<NEW_LINE>// the top level to allow the contained FunctionConstructor to match in any<NEW_LINE>// context.<NEW_LINE>if (topLevelNode instanceof FunctionDeclaration) {<NEW_LINE>topLevelNode = ((<MASK><NEW_LINE>}<NEW_LINE>return build(topLevelNode);<NEW_LINE>}
FunctionDeclaration) topLevelNode).getInitializer();
122,013
public void updateKeys() {<NEW_LINE>List<Node> keys = new LinkedList<Node>();<NEW_LINE>serverInstance.getCommonSupport().refresh();<NEW_LINE>if (serverInstance.getServerState() == ServerState.RUNNING) {<NEW_LINE>keys.add(new Hk2ItemNode(serverInstance.getLookup(), new Hk2ApplicationsChildren(serverInstance.getLookup()), NbBundle.getMessage(Hk2InstanceNode.class, "LBL_Apps"), Hk2ItemNode.J2EE_APPLICATION_FOLDER));<NEW_LINE>keys.add(new Hk2ItemNode(serverInstance.getLookup(), new Hk2ResourceContainers(serverInstance.getLookup()), NbBundle.getMessage(Hk2InstanceNode.class, "LBL_Resources"), Hk2ItemNode.RESOURCES_FOLDER));<NEW_LINE>String iid = serverInstance.getDeployerUri();<NEW_LINE>if (null != iid && iid.contains("gfv3ee6wc")) {<NEW_LINE>keys.add(new Hk2ItemNode(serverInstance.getLookup(), new Hk2WSChildren(serverInstance.getLookup()), NbBundle.getMessage(Hk2InstanceNode.class, <MASK><NEW_LINE>}<NEW_LINE>List<Node> pluggableNodes = getExtensionNodes();<NEW_LINE>for (Iterator<Node> itr = pluggableNodes.iterator(); itr.hasNext(); ) {<NEW_LINE>keys.add(itr.next());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setKeys(keys);<NEW_LINE>}
"LBL_WS"), Hk2ItemNode.WS_FOLDER));
1,052,527
public static int findLongestSubstring(String str) {<NEW_LINE>// Maintains count of each alphabet<NEW_LINE>int[] charCount = new int[52];<NEW_LINE>// Variable len stores length of longest valid substring, while start and end<NEW_LINE>// are limits of the current window (substring) being considered<NEW_LINE>int len = 0, start = 0;<NEW_LINE>for (int end = 0; end < str.length(); ) {<NEW_LINE>char ch = str.charAt(end);<NEW_LINE>if (// Lower-case letter<NEW_LINE>ch >= 'a' && ch <= 'z')<NEW_LINE>charCount[ch - 'a']++;<NEW_LINE>else<NEW_LINE>// Upper-case letter<NEW_LINE>charCount[ch - 'A' + 26]++;<NEW_LINE>end++;<NEW_LINE>if (isDistinct(charCount)) {<NEW_LINE>len = Math.<MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// If there are repeating characters, we shorten substring by removing<NEW_LINE>// characters from start, till we get a distinct substring.<NEW_LINE>while (!isDistinct(charCount)) {<NEW_LINE>ch = str.charAt(start);<NEW_LINE>if (ch >= 'a' && ch <= 'z')<NEW_LINE>charCount[ch - 'a']--;<NEW_LINE>else<NEW_LINE>charCount[ch - 'A' + 26]--;<NEW_LINE>start++;<NEW_LINE>}<NEW_LINE>len = Math.max(len, end - start);<NEW_LINE>}<NEW_LINE>return len;<NEW_LINE>}
max(len, end - start);
264,153
private void validate(User user, PerfTest oldOne, PerfTest newOne) {<NEW_LINE>if (oldOne == null) {<NEW_LINE>oldOne = new PerfTest();<NEW_LINE>oldOne.init();<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>checkNotEmpty(newOne.getTestName(), "testName should be provided");<NEW_LINE>checkArgument(newOne.getStatus().equals(Status.READY) || newOne.getStatus().equals(Status.SAVED), "status only allows SAVE or READY");<NEW_LINE>if (newOne.isThresholdRunCount()) {<NEW_LINE>final Integer runCount = newOne.getRunCount();<NEW_LINE>checkArgument(runCount > 0 && runCount <= agentManager.getMaxRunCount(), "runCount should be equal to or less than %s", agentManager.getMaxRunCount());<NEW_LINE>} else {<NEW_LINE>final Long duration = newOne.getDuration();<NEW_LINE>checkArgument(duration > 0 && duration <= (((long) agentManager.getMaxRunHour()) * 3600000L), "duration should be equal to or less than %s", agentManager.getMaxRunHour());<NEW_LINE>}<NEW_LINE>Map<String, MutableInt> agentCountMap = agentService.getAvailableAgentCountMap(user.getUserId());<NEW_LINE>MutableInt agentCountObj = agentCountMap.get(config.isClustered() ? newOne.getRegion() : Config.NONE_REGION);<NEW_LINE>checkNotNull(agentCountObj, "region should be within current region list");<NEW_LINE>int agentMaxCount = agentCountObj.intValue();<NEW_LINE>checkArgument(newOne.getAgentCount() <= agentMaxCount, "test agent should be equal to or less than %s", agentMaxCount);<NEW_LINE>if (newOne.getStatus().equals(Status.READY)) {<NEW_LINE>checkArgument(newOne.getAgentCount() >= 1, "agentCount should be more than 1 when it's READY status.");<NEW_LINE>}<NEW_LINE>checkArgument(newOne.getVuserPerAgent() <= agentManager.getMaxVuserPerAgent(), "vuserPerAgent should be equal to or less than %s", agentManager.getMaxVuserPerAgent());<NEW_LINE>if (config.isSecurityEnabled() && GrinderConstants.GRINDER_SECURITY_LEVEL_NORMAL.equals(config.getSecurityLevel())) {<NEW_LINE>checkArgument(StringUtils.isNotEmpty(newOne.getTargetHosts()), "targetHosts should be provided when security mode is enabled");<NEW_LINE>}<NEW_LINE>if (newOne.getStatus() != Status.SAVED) {<NEW_LINE>checkArgument(StringUtils.isNotBlank(newOne.getScriptName()), "scriptName should be provided.");<NEW_LINE>}<NEW_LINE>checkArgument(newOne.getVuserPerAgent() == newOne.getProcesses() * newOne.getThreads(), "vuserPerAgent should be equal to (processes * threads)");<NEW_LINE>}
newOne = oldOne.merge(newOne);
115,095
protected String doIt() throws Exception {<NEW_LINE>log.info("R_MailText_ID=" + m_R_MailText_ID);<NEW_LINE>// Mail Test<NEW_LINE>m_MailText = new MMailText(getCtx(), m_R_MailText_ID, get_TrxName());<NEW_LINE>if (m_MailText.getR_MailText_ID() == 0)<NEW_LINE>throw new Exception("Not found @R_MailText_ID@=" + m_R_MailText_ID);<NEW_LINE>// Client Info<NEW_LINE>m_client = MClient.get(getCtx());<NEW_LINE>if (m_client.getAD_Client_ID() == 0)<NEW_LINE>throw new Exception("Not found @AD_Client_ID@");<NEW_LINE>if (m_client.getSMTPHost() == null || m_client.getSMTPHost().length() == 0)<NEW_LINE>throw new Exception("No SMTP Host found");<NEW_LINE>//<NEW_LINE>if (m_AD_User_ID > 0) {<NEW_LINE>m_from = new MUser(getCtx(), m_AD_User_ID, get_TrxName());<NEW_LINE>if (m_from.getAD_User_ID() == 0)<NEW_LINE>throw new Exception("No found @AD_User_ID@=" + m_AD_User_ID);<NEW_LINE>}<NEW_LINE>log.fine("From " + m_from);<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>if (m_R_InterestArea_ID > 0)<NEW_LINE>sendInterestArea();<NEW_LINE>if (m_C_BP_Group_ID > 0)<NEW_LINE>sendBPGroup();<NEW_LINE>return "@Created@=" + m_counter + ", @Errors@=" + m_errors + " - " + (System.<MASK><NEW_LINE>}
currentTimeMillis() - start) + "ms";
1,270,288
private VmWorkJobVO createVmWorkJobToAddNetwork(VirtualMachine vm, Network network, NicProfile requested, CallContext context, User user, Account account) {<NEW_LINE>VmWorkJobVO workJob;<NEW_LINE>workJob = new VmWorkJobVO(context.getContextId());<NEW_LINE>workJob.setDispatcher(VmWorkConstants.VM_WORK_JOB_DISPATCHER);<NEW_LINE>workJob.setCmd(VmWorkAddVmToNetwork.class.getName());<NEW_LINE>workJob.setAccountId(account.getId());<NEW_LINE>workJob.setUserId(user.getId());<NEW_LINE>workJob.setVmType(VirtualMachine.Type.Instance);<NEW_LINE>workJob.<MASK><NEW_LINE>workJob.setRelated(AsyncJobExecutionContext.getOriginJobId());<NEW_LINE>workJob.setSecondaryObjectIdentifier(network.getUuid());<NEW_LINE>// save work context info as there might be some duplicates<NEW_LINE>final VmWorkAddVmToNetwork workInfo = new VmWorkAddVmToNetwork(user.getId(), account.getId(), vm.getId(), VirtualMachineManagerImpl.VM_WORK_JOB_HANDLER, network.getId(), requested);<NEW_LINE>workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo));<NEW_LINE>try {<NEW_LINE>_jobMgr.submitAsyncJob(workJob, VmWorkConstants.VM_WORK_QUEUE, vm.getId());<NEW_LINE>} catch (CloudRuntimeException e) {<NEW_LINE>if (e.getCause() instanceof EntityExistsException) {<NEW_LINE>String msg = String.format("A job to add a nic for network %s to vm %s already exists", network.getUuid(), vm.getUuid());<NEW_LINE>s_logger.warn(msg, e);<NEW_LINE>}<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>return workJob;<NEW_LINE>}
setVmInstanceId(vm.getId());
1,053,132
public Sequence execute(StaticContext sctx, QueryContext ctx, Sequence[] args) {<NEW_LINE>final XmlDBNode doc <MASK><NEW_LINE>final XmlNodeReadOnlyTrx rtx = doc.getTrx();<NEW_LINE>final XmlIndexController controller = rtx.getResourceManager().getRtxIndexController(rtx.getRevisionNumber());<NEW_LINE>if (controller == null) {<NEW_LINE>throw new QueryException(new QNm("Document not found: " + ((Str) args[1]).stringValue()));<NEW_LINE>}<NEW_LINE>final QNm name = new QNm(Namespaces.XS_NSURI, ((Str) args[1]).stringValue());<NEW_LINE>final Type type = sctx.getTypes().resolveAtomicType(name);<NEW_LINE>final Path<QNm> path = Path.parse(((Str) args[2]).stringValue());<NEW_LINE>final Optional<IndexDef> indexDef = controller.getIndexes().findCASIndex(path, type);<NEW_LINE>if (indexDef.isPresent())<NEW_LINE>return new Int32(indexDef.get().getID());<NEW_LINE>return new Int32(-1);<NEW_LINE>}
= (XmlDBNode) args[0];
905,848
public boolean execute(int tag, String name) {<NEW_LINE>if (name != null && name.trim().length() > 0) {<NEW_LINE>boolean isName = tag <MASK><NEW_LINE>String nameTag = isName ? "" : obj.getMapIndex().decodeType(tag).tag;<NEW_LINE>boolean skip = false;<NEW_LINE>// not completely correct we should check "name"+rc.preferredLocale<NEW_LINE>if (isName && !rc.preferredLocale.isEmpty() && map.containsKey(obj.getMapIndex().nameEnEncodingType)) {<NEW_LINE>skip = true;<NEW_LINE>}<NEW_LINE>// if (tag == obj.getMapIndex().nameEnEncodingType && !rc.useEnglishNames) {<NEW_LINE>// skip = true;<NEW_LINE>// }<NEW_LINE>if (!skip) {<NEW_LINE>createTextDrawInfo(obj, render, rc, pair, xMid, yMid, path, points, name, nameTag);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
== obj.getMapIndex().nameEncodingType;
432,916
private void buildUI() {<NEW_LINE>BorderLayout borderLayout = new BorderLayout();<NEW_LINE>setLayout(borderLayout);<NEW_LINE>ringChartPanel = new RingChartPanel(this);<NEW_LINE>toolbar = new Toolbar(this);<NEW_LINE><MASK><NEW_LINE>toolbar.addKeyListenerToTypingArea(this);<NEW_LINE>displayArea = new DisplayArea(this);<NEW_LINE>final JScrollPane rightScrollPane = new JScrollPane(displayArea.onAddComponentToPane());<NEW_LINE>theme.applyTo(rightScrollPane);<NEW_LINE>filesTree = new FilesTree(this);<NEW_LINE>JTabbedPane jTabbedPane = new JTabbedPane();<NEW_LINE>JScrollPane leftScrollPane = new JScrollPane(filesTree.getJTree());<NEW_LINE>theme.applyTo(leftScrollPane);<NEW_LINE>jTabbedPane.addTab("Classes", leftScrollPane);<NEW_LINE>methodsCountPanel = new MethodsCountPanel(this);<NEW_LINE>jTabbedPane.addTab("Methods count", methodsCountPanel);<NEW_LINE>theme.applyTo(jTabbedPane);<NEW_LINE>jTabbedPane.addChangeListener(new ChangeListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void stateChanged(ChangeEvent e) {<NEW_LINE>int dividerLocation1 = jSplitPane.getDividerLocation();<NEW_LINE>JTabbedPane jTabbedPane1 = (JTabbedPane) e.getSource();<NEW_LINE>if (jTabbedPane1.getSelectedIndex() == 0) {<NEW_LINE>jSplitPane.setRightComponent(rightScrollPane);<NEW_LINE>} else {<NEW_LINE>jSplitPane.setRightComponent(ringChartPanel);<NEW_LINE>}<NEW_LINE>jSplitPane.setDividerLocation(dividerLocation1);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>jSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);<NEW_LINE>jSplitPane.setDividerSize(3);<NEW_LINE>jSplitPane.setPreferredSize(new Dimension(1000, 700));<NEW_LINE>jSplitPane.add(jTabbedPane, JSplitPane.LEFT);<NEW_LINE>jSplitPane.add(rightScrollPane, JSplitPane.RIGHT);<NEW_LINE>jSplitPane.getLeftComponent().setVisible(true);<NEW_LINE>jSplitPane.setDividerLocation(300);<NEW_LINE>theme.applyTo(jSplitPane);<NEW_LINE>add(jSplitPane, BorderLayout.CENTER);<NEW_LINE>}
add(toolbar, BorderLayout.NORTH);
845,195
public void onPreInitialize() {<NEW_LINE>List<ContactRealm> contacts = RosterCacheManager.loadContacts();<NEW_LINE>for (ContactRealm contactRealm : contacts) {<NEW_LINE>try {<NEW_LINE>AccountJid account = AccountJid.from(contactRealm.getAccount() + "/" + contactRealm.getAccountResource());<NEW_LINE>UserJid userJid = UserJid.from(contactRealm.getUser());<NEW_LINE>RosterContact contact = RosterContact.getRosterContact(account, userJid, contactRealm.getName());<NEW_LINE>for (ContactGroup group : contactRealm.getGroups()) {<NEW_LINE>contact.addGroupReference(new RosterGroupReference(new RosterGroup(account, <MASK><NEW_LINE>}<NEW_LINE>rosterContacts.put(contact.getAccount().toString(), contact.getUser().getBareJid().toString(), contact);<NEW_LINE>MessageItem lastMessage = contactRealm.getLastMessage();<NEW_LINE>if (lastMessage != null) {<NEW_LINE>MessageManager.getInstance().getOrCreateChat(contact.getAccount(), contact.getUser(), lastMessage);<NEW_LINE>} else<NEW_LINE>MessageManager.getInstance().getOrCreateChat(contact.getAccount(), contact.getUser());<NEW_LINE>} catch (UserJid.UserJidCreateException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>} catch (XmppStringprepException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>onContactsChanged(Collections.<RosterContact>emptyList());<NEW_LINE>}
group.getGroupName())));
1,365,669
private void destroyAndReallocateManagedVolume(VolumeInfo volumeInfo) {<NEW_LINE>if (volumeInfo == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>VolumeVO volume = volDao.findById(volumeInfo.getId());<NEW_LINE>if (volume == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (volume.getState() == State.Allocated) {<NEW_LINE>// Possible states here: Allocated, Ready & Creating<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>volumeInfo.processEvent(Event.DestroyRequested);<NEW_LINE>Volume newVol = _volumeMgr.allocateDuplicateVolume(volume, null);<NEW_LINE>VolumeVO newVolume = (VolumeVO) newVol;<NEW_LINE>newVolume.set_iScsiName(null);<NEW_LINE>volDao.update(newVolume.getId(), newVolume);<NEW_LINE>s_logger.debug("Allocated new volume: " + newVolume.getId() + " for the VM: " + volume.getInstanceId());<NEW_LINE>try {<NEW_LINE>AsyncCallFuture<VolumeApiResult> expungeVolumeFuture = expungeVolumeAsync(volumeInfo);<NEW_LINE>VolumeApiResult expungeVolumeResult = expungeVolumeFuture.get();<NEW_LINE>if (expungeVolumeResult.isFailed()) {<NEW_LINE>s_logger.warn("Failed to expunge volume: " + volumeInfo.getId() + " that was created");<NEW_LINE>throw new CloudRuntimeException("Failed to expunge volume: " + volumeInfo.getId() + " that was created");<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>if (canVolumeBeRemoved(volumeInfo.getId())) {<NEW_LINE>volDao.remove(volumeInfo.getId());<NEW_LINE>}<NEW_LINE>s_logger.warn("Unable to expunge volume: " + volumeInfo.getId() + <MASK><NEW_LINE>throw new CloudRuntimeException("Unable to expunge volume: " + volumeInfo.getId() + " due to: " + ex.getMessage());<NEW_LINE>}<NEW_LINE>}
" due to: " + ex.getMessage());
1,044,348
private boolean snapshot() {<NEW_LINE>try {<NEW_LINE>final Dimension size = heavyWeightContainer.getPreferredSize();<NEW_LINE>final int width = size.width;<NEW_LINE>final int height = size.height;<NEW_LINE>// Avoid unnecessary and illegal screen captures<NEW_LINE>// for degenerated popups.<NEW_LINE>if (width <= 0 || height <= SHADOW_SIZE) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// uses the default screen device<NEW_LINE>final Robot robot = new Robot();<NEW_LINE>RECT.setBounds(x, y + height - SHADOW_SIZE, width, SHADOW_SIZE);<NEW_LINE>final BufferedImage hShadowBg = robot.createScreenCapture(RECT);<NEW_LINE>RECT.setBounds(x + width - SHADOW_SIZE, <MASK><NEW_LINE>final BufferedImage vShadowBg = robot.createScreenCapture(RECT);<NEW_LINE>final JComponent parent = (JComponent) contents.getParent();<NEW_LINE>parent.putClientProperty(PROP_HORIZONTAL_BACKGROUND, hShadowBg);<NEW_LINE>parent.putClientProperty(PROP_VERTICAL_BACKGROUND, vShadowBg);<NEW_LINE>final Container layeredPane = getLayeredPane();<NEW_LINE>if (layeredPane == null) {<NEW_LINE>// This could happen if owner is null.<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>POINT.x = x;<NEW_LINE>POINT.y = y;<NEW_LINE>SwingUtilities.convertPointFromScreen(POINT, layeredPane);<NEW_LINE>// If needed paint dirty region of the horizontal snapshot.<NEW_LINE>RECT.x = POINT.x;<NEW_LINE>RECT.y = POINT.y + height - SHADOW_SIZE;<NEW_LINE>RECT.width = width;<NEW_LINE>RECT.height = SHADOW_SIZE;<NEW_LINE>paintShadow(hShadowBg, layeredPane);<NEW_LINE>// If needed paint dirty region of the vertical snapshot.<NEW_LINE>RECT.x = POINT.x + width - SHADOW_SIZE;<NEW_LINE>RECT.y = POINT.y;<NEW_LINE>RECT.width = SHADOW_SIZE;<NEW_LINE>RECT.height = height - SHADOW_SIZE;<NEW_LINE>paintShadow(vShadowBg, layeredPane);<NEW_LINE>} catch (final AWTException e) {<NEW_LINE>return true;<NEW_LINE>} catch (final SecurityException e) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
y, SHADOW_SIZE, height - SHADOW_SIZE);
337,205
public void addInformation(@Nonnull ItemStack stack, @Nullable World worldIn, @Nonnull List<String> tooltip, @Nonnull ITooltipFlag flagIn) {<NEW_LINE>super.addInformation(stack, worldIn, tooltip, flagIn);<NEW_LINE>CapturedMob capturedMob = CapturedMob.create(stack);<NEW_LINE>if (capturedMob != null) {<NEW_LINE>tooltip.add(capturedMob.getDisplayName());<NEW_LINE>float health = capturedMob.getHealth();<NEW_LINE>if (health >= 0) {<NEW_LINE>float maxHealth = capturedMob.getMaxHealth();<NEW_LINE>if (maxHealth >= 0) {<NEW_LINE>tooltip.add(Lang.SOUL_VIAL_HEALTH.get(String.format("%3.1f/%3.1f", health, maxHealth)));<NEW_LINE>} else {<NEW_LINE>tooltip.add(Lang.SOUL_VIAL_HEALTH.get(String.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>String fluidName = capturedMob.getFluidName();<NEW_LINE>if (fluidName != null) {<NEW_LINE>Fluid fluid = FluidRegistry.getFluid(fluidName);<NEW_LINE>if (fluid != null) {<NEW_LINE>String localizedName = fluid.getLocalizedName(new FluidStack(fluid, 1));<NEW_LINE>tooltip.add(Lang.SOUL_VIAL_FLUID.get(localizedName));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>DyeColor color = capturedMob.getColor();<NEW_LINE>if (color != null) {<NEW_LINE>tooltip.add(Lang.SOUL_VIAL_COLOR.get(color.getLocalisedName()));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>tooltip.add(Lang.SOUL_VIAL_EMPTY.get());<NEW_LINE>}<NEW_LINE>}
format("%3.1f", health)));
1,238,952
private void drawNode(UGraphic ug, double xTheoricalPosition, double yTheoricalPosition, double width, double height, boolean shadowing) {<NEW_LINE><MASK><NEW_LINE>shape.addPoint(0, 10);<NEW_LINE>shape.addPoint(10, 0);<NEW_LINE>shape.addPoint(width, 0);<NEW_LINE>shape.addPoint(width, height - 10);<NEW_LINE>shape.addPoint(width - 10, height);<NEW_LINE>shape.addPoint(0, height);<NEW_LINE>shape.addPoint(0, 10);<NEW_LINE>if (shadowing) {<NEW_LINE>shape.setDeltaShadow(2);<NEW_LINE>}<NEW_LINE>ug.apply(new UTranslate(xTheoricalPosition, yTheoricalPosition)).draw(shape);<NEW_LINE>ug.apply(new UTranslate(xTheoricalPosition + width - 10, yTheoricalPosition + 10)).draw(new ULine(9, -9));<NEW_LINE>final UPath path = new UPath();<NEW_LINE>path.moveTo(0, 0);<NEW_LINE>path.lineTo(width - 10, 0);<NEW_LINE>path.lineTo(width - 10, height - 10);<NEW_LINE>ug.apply(new UTranslate(xTheoricalPosition, yTheoricalPosition + 10)).draw(path);<NEW_LINE>}
final UPolygon shape = new UPolygon();
1,644,194
public static ListSubscriptionItemsResponse unmarshall(ListSubscriptionItemsResponse listSubscriptionItemsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listSubscriptionItemsResponse.setRequestId(_ctx.stringValue("ListSubscriptionItemsResponse.RequestId"));<NEW_LINE>listSubscriptionItemsResponse.setTotalCount(_ctx.integerValue("ListSubscriptionItemsResponse.TotalCount"));<NEW_LINE>listSubscriptionItemsResponse.setMessage(_ctx.stringValue("ListSubscriptionItemsResponse.Message"));<NEW_LINE>listSubscriptionItemsResponse.setNextToken<MASK><NEW_LINE>listSubscriptionItemsResponse.setCode(_ctx.stringValue("ListSubscriptionItemsResponse.Code"));<NEW_LINE>listSubscriptionItemsResponse.setSuccess(_ctx.booleanValue("ListSubscriptionItemsResponse.Success"));<NEW_LINE>List<SubscriptionItem> subscriptionItems = new ArrayList<SubscriptionItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListSubscriptionItemsResponse.SubscriptionItems.Length"); i++) {<NEW_LINE>SubscriptionItem subscriptionItem = new SubscriptionItem();<NEW_LINE>subscriptionItem.setPmsgStatus(_ctx.integerValue("ListSubscriptionItemsResponse.SubscriptionItems[" + i + "].PmsgStatus"));<NEW_LINE>subscriptionItem.setWebhookStatus(_ctx.integerValue("ListSubscriptionItemsResponse.SubscriptionItems[" + i + "].WebhookStatus"));<NEW_LINE>subscriptionItem.setDescription(_ctx.stringValue("ListSubscriptionItemsResponse.SubscriptionItems[" + i + "].Description"));<NEW_LINE>subscriptionItem.setSmsStatus(_ctx.integerValue("ListSubscriptionItemsResponse.SubscriptionItems[" + i + "].SmsStatus"));<NEW_LINE>subscriptionItem.setChannel(_ctx.stringValue("ListSubscriptionItemsResponse.SubscriptionItems[" + i + "].Channel"));<NEW_LINE>subscriptionItem.setEmailStatus(_ctx.integerValue("ListSubscriptionItemsResponse.SubscriptionItems[" + i + "].EmailStatus"));<NEW_LINE>subscriptionItem.setTtsStatus(_ctx.integerValue("ListSubscriptionItemsResponse.SubscriptionItems[" + i + "].TtsStatus"));<NEW_LINE>subscriptionItem.setItemName(_ctx.stringValue("ListSubscriptionItemsResponse.SubscriptionItems[" + i + "].ItemName"));<NEW_LINE>subscriptionItem.setItemId(_ctx.integerValue("ListSubscriptionItemsResponse.SubscriptionItems[" + i + "].ItemId"));<NEW_LINE>List<Long> webhookIds = new ArrayList<Long>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("ListSubscriptionItemsResponse.SubscriptionItems[" + i + "].WebhookIds.Length"); j++) {<NEW_LINE>webhookIds.add(_ctx.longValue("ListSubscriptionItemsResponse.SubscriptionItems[" + i + "].WebhookIds[" + j + "]"));<NEW_LINE>}<NEW_LINE>subscriptionItem.setWebhookIds(webhookIds);<NEW_LINE>List<Long> contactIds = new ArrayList<Long>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("ListSubscriptionItemsResponse.SubscriptionItems[" + i + "].ContactIds.Length"); j++) {<NEW_LINE>contactIds.add(_ctx.longValue("ListSubscriptionItemsResponse.SubscriptionItems[" + i + "].ContactIds[" + j + "]"));<NEW_LINE>}<NEW_LINE>subscriptionItem.setContactIds(contactIds);<NEW_LINE>subscriptionItems.add(subscriptionItem);<NEW_LINE>}<NEW_LINE>listSubscriptionItemsResponse.setSubscriptionItems(subscriptionItems);<NEW_LINE>return listSubscriptionItemsResponse;<NEW_LINE>}
(_ctx.integerValue("ListSubscriptionItemsResponse.NextToken"));
1,243,550
ArrayList<Geometry> collect_geometries_to_union(int dim) {<NEW_LINE>ArrayList<Geometry> batch_to_union = new ArrayList<Geometry>();<NEW_LINE>ArrayList<Map.Entry<Integer, Bin_type>> entriesToRemove = new ArrayList<Map.Entry<MASK><NEW_LINE>Set<Map.Entry<Integer, Bin_type>> set = m_union_bins.get(dim).entrySet();<NEW_LINE>for (Map.Entry<Integer, Bin_type> e : set) {<NEW_LINE>// int level = e.getKey();<NEW_LINE>Bin_type bin = e.getValue();<NEW_LINE>final int binVertexThreshold = 10000;<NEW_LINE>if (m_b_done || (bin.bin_vertex_count > binVertexThreshold && bin.geom_count() > 1)) {<NEW_LINE>m_dim_geom_counts[dim] -= bin.geom_count();<NEW_LINE>m_added_geoms -= bin.geom_count();<NEW_LINE>while (bin.geometries.size() > 0) {<NEW_LINE>// empty geometries will be unioned too.<NEW_LINE>batch_to_union.add(bin.back_pair().geom);<NEW_LINE>bin.pop_pair();<NEW_LINE>}<NEW_LINE>entriesToRemove.add(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>set.removeAll(entriesToRemove);<NEW_LINE>return batch_to_union;<NEW_LINE>}
<Integer, Bin_type>>();
282,136
public void consumeMessageAfter(ConsumeMessageContext context) {<NEW_LINE>if (context == null || context.getMsgList() == null || context.getMsgList().isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TraceContext subBeforeContext = (TraceContext) context.getMqTraceContext();<NEW_LINE>if (subBeforeContext.getTraceBeans() == null || subBeforeContext.getTraceBeans().size() < 1) {<NEW_LINE>// If subBefore bean is null ,skip it<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TraceContext subAfterContext = new TraceContext();<NEW_LINE>//<NEW_LINE>subAfterContext.setTraceType(TraceType.SubAfter);<NEW_LINE>//<NEW_LINE>subAfterContext.setRegionId(subBeforeContext.getRegionId());<NEW_LINE>//<NEW_LINE>subAfterContext.setGroupName(NamespaceUtil.withoutNamespace<MASK><NEW_LINE>//<NEW_LINE>subAfterContext.setRequestId(subBeforeContext.getRequestId());<NEW_LINE>//<NEW_LINE>subAfterContext.setSuccess(context.isSuccess());<NEW_LINE>// Calculate the cost time for processing messages<NEW_LINE>int costTime = (int) ((System.currentTimeMillis() - subBeforeContext.getTimeStamp()) / context.getMsgList().size());<NEW_LINE>//<NEW_LINE>subAfterContext.setCostTime(costTime);<NEW_LINE>subAfterContext.setTraceBeans(subBeforeContext.getTraceBeans());<NEW_LINE>Map<String, String> props = context.getProps();<NEW_LINE>if (props != null) {<NEW_LINE>String contextType = props.get(MixAll.CONSUME_CONTEXT_TYPE);<NEW_LINE>if (contextType != null) {<NEW_LINE>subAfterContext.setContextCode(ConsumeReturnType.valueOf(contextType).ordinal());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>localDispatcher.append(subAfterContext);<NEW_LINE>}
(subBeforeContext.getGroupName()));
1,816,860
public static void successPage(HttpAction action, String message) {<NEW_LINE>String x = action.getRequestHeader(HttpNames.hAccept);<NEW_LINE>MediaType mt = null;<NEW_LINE>if (x != null && x.equals("*/*")) {<NEW_LINE>if (action.getRequestContentType().equals(WebContent.contentTypeHTMLForm))<NEW_LINE>mt = mtTextHTML;<NEW_LINE>}<NEW_LINE>if (mt == null && x != null)<NEW_LINE>mt = ConNeg.chooseContentType(action.getRequest(), successReponseAccept<MASK><NEW_LINE>if (mt == null)<NEW_LINE>mt = mtTextHTML;<NEW_LINE>if (WebContent.ctTextPlain.agreesWith(mt)) {<NEW_LINE>successPageText(action, message);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (WebContent.ctJSON.agreesWith(mt)) {<NEW_LINE>successPageJson(action, message);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Default.<NEW_LINE>successPageHtml(action, message);<NEW_LINE>}
, MediaType.create("text/plain"));
981,096
protected HeifHandler<?> processBox(@NotNull Box box, @NotNull byte[] payload) throws IOException {<NEW_LINE>SequentialReader reader = new SequentialByteArrayReader(payload);<NEW_LINE>if (box.type.equals(HeifBoxTypes.BOX_ITEM_PROTECTION)) {<NEW_LINE>itemProtectionBox = new ItemProtectionBox(reader, box);<NEW_LINE>} else if (box.type.equals(HeifBoxTypes.BOX_PRIMARY_ITEM)) {<NEW_LINE>primaryItemBox = new PrimaryItemBox(reader, box);<NEW_LINE>} else if (box.type.equals(HeifBoxTypes.BOX_ITEM_INFO)) {<NEW_LINE>itemInfoBox <MASK><NEW_LINE>itemInfoBox.addMetadata(directory);<NEW_LINE>} else if (box.type.equals(HeifBoxTypes.BOX_ITEM_LOCATION)) {<NEW_LINE>itemLocationBox = new ItemLocationBox(reader, box);<NEW_LINE>} else if (box.type.equals(HeifBoxTypes.BOX_IMAGE_SPATIAL_EXTENTS)) {<NEW_LINE>ImageSpatialExtentsProperty imageSpatialExtentsProperty = new ImageSpatialExtentsProperty(reader, box);<NEW_LINE>imageSpatialExtentsProperty.addMetadata(directory);<NEW_LINE>} else if (box.type.equals(HeifBoxTypes.BOX_AUXILIARY_TYPE_PROPERTY)) {<NEW_LINE>AuxiliaryTypeProperty auxiliaryTypeProperty = new AuxiliaryTypeProperty(reader, box);<NEW_LINE>} else if (box.type.equals(HeifBoxTypes.BOX_IMAGE_ROTATION)) {<NEW_LINE>ImageRotationBox imageRotationBox = new ImageRotationBox(reader, box);<NEW_LINE>imageRotationBox.addMetadata(directory);<NEW_LINE>} else if (box.type.equals(HeifBoxTypes.BOX_COLOUR_INFO)) {<NEW_LINE>ColourInformationBox colourInformationBox = new ColourInformationBox(reader, box, metadata);<NEW_LINE>colourInformationBox.addMetadata(directory);<NEW_LINE>} else if (box.type.equals(HeifBoxTypes.BOX_PIXEL_INFORMATION)) {<NEW_LINE>PixelInformationBox pixelInformationBox = new PixelInformationBox(reader, box);<NEW_LINE>pixelInformationBox.addMetadata(directory);<NEW_LINE>}<NEW_LINE>return this;<NEW_LINE>}
= new ItemInfoBox(reader, box);
1,004,121
public AggregationGroupByOperator run() {<NEW_LINE>assert _queryContext.getAggregationFunctions() != null;<NEW_LINE>assert _queryContext.getGroupByExpressions() != null;<NEW_LINE>int numTotalDocs = _indexSegment.getSegmentMetadata().getTotalDocs();<NEW_LINE>AggregationFunction[] aggregationFunctions = _queryContext.getAggregationFunctions();<NEW_LINE>ExpressionContext[] groupByExpressions = _queryContext.getGroupByExpressions().toArray(new ExpressionContext[0]);<NEW_LINE>FilterPlanNode filterPlanNode = new FilterPlanNode(_indexSegment, _queryContext);<NEW_LINE>BaseFilterOperator filterOperator = filterPlanNode.run();<NEW_LINE>// Use star-tree to solve the query if possible<NEW_LINE>List<StarTreeV2> starTrees = _indexSegment.getStarTrees();<NEW_LINE>if (starTrees != null && !StarTreeUtils.isStarTreeDisabled(_queryContext)) {<NEW_LINE>AggregationFunctionColumnPair[] aggregationFunctionColumnPairs = StarTreeUtils.extractAggregationFunctionPairs(aggregationFunctions);<NEW_LINE>if (aggregationFunctionColumnPairs != null) {<NEW_LINE>Map<String, List<CompositePredicateEvaluator>> predicateEvaluatorsMap = StarTreeUtils.extractPredicateEvaluatorsMap(_indexSegment, _queryContext.getFilter(), filterPlanNode.getPredicateEvaluatorMap());<NEW_LINE>if (predicateEvaluatorsMap != null) {<NEW_LINE>for (StarTreeV2 starTreeV2 : starTrees) {<NEW_LINE>if (StarTreeUtils.isFitForStarTree(starTreeV2.getMetadata(), aggregationFunctionColumnPairs, groupByExpressions, predicateEvaluatorsMap.keySet())) {<NEW_LINE>TransformOperator transformOperator = new StarTreeTransformPlanNode(starTreeV2, aggregationFunctionColumnPairs, groupByExpressions, predicateEvaluatorsMap, _queryContext.getDebugOptions()).run();<NEW_LINE>return new AggregationGroupByOperator(_queryContext, groupByExpressions, transformOperator, numTotalDocs, true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Set<ExpressionContext> expressionsToTransform = AggregationFunctionUtils.collectExpressionsToTransform(aggregationFunctions, groupByExpressions);<NEW_LINE>TransformOperator transformPlanNode = new TransformPlanNode(_indexSegment, _queryContext, expressionsToTransform, DocIdSetPlanNode.<MASK><NEW_LINE>return new AggregationGroupByOperator(_queryContext, groupByExpressions, transformPlanNode, numTotalDocs, false);<NEW_LINE>}
MAX_DOC_PER_CALL, filterOperator).run();
1,049,772
public String generateId(Environment environment, ServiceInstance serviceInstance) {<NEW_LINE>Optional<String> cloudFoundryId = environment.getProperty("vcap.application.instance_id", String.class);<NEW_LINE>if (cloudFoundryId.isPresent()) {<NEW_LINE>return cloudFoundryId.get();<NEW_LINE>} else {<NEW_LINE>StringJoiner joiner = new StringJoiner(":");<NEW_LINE><MASK><NEW_LINE>joiner.add(applicationName);<NEW_LINE>if (serviceInstance instanceof EmbeddedServerInstance) {<NEW_LINE>EmbeddedServerInstance esi = (EmbeddedServerInstance) serviceInstance;<NEW_LINE>Optional<String> id = esi.getEmbeddedServer().getApplicationConfiguration().getInstance().getId();<NEW_LINE>if (id.isPresent()) {<NEW_LINE>joiner.add(id.get());<NEW_LINE>} else {<NEW_LINE>joiner.add(String.valueOf(esi.getPort()));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>joiner.add(String.valueOf(serviceInstance.getPort()));<NEW_LINE>}<NEW_LINE>return joiner.toString();<NEW_LINE>}<NEW_LINE>}
String applicationName = serviceInstance.getId();
732,240
private final void onButtonPressed() {<NEW_LINE>try {<NEW_LINE>// Show the dialog<NEW_LINE>final VImageDialog vid = new VImageDialog(Env.getWindow(m_WindowNo), m_WindowNo, m_mImage);<NEW_LINE>vid.setVisible(true);<NEW_LINE>// Do nothing if user canceled (i.e. closed the window)<NEW_LINE>if (vid.isCanceled()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final int AD_Image_ID = vid.getAD_Image_ID();<NEW_LINE>final Integer newValue = AD_Image_ID > 0 ? AD_Image_ID : null;<NEW_LINE>//<NEW_LINE>// force reload<NEW_LINE>m_mImage = null;<NEW_LINE>// set explicitly<NEW_LINE>setValue(newValue);<NEW_LINE>//<NEW_LINE>try {<NEW_LINE>fireVetoableChange(m_columnName, null, newValue);<NEW_LINE>} catch (PropertyVetoException pve) {<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>Services.get(IClientUI.class<MASK><NEW_LINE>}<NEW_LINE>}
).error(m_WindowNo, e);
588,407
private // due to negative edge weights.<NEW_LINE>int relax(EdgeWeightedDigraph edgeWeightedDigraph, int vertex) {<NEW_LINE>int lastComputedShortestDistance = distTo[vertex] + maxPathDistance;<NEW_LINE>for (DirectedEdge edge : edgeWeightedDigraph.adjacent(vertex)) {<NEW_LINE>Integer neighbor = edge.to();<NEW_LINE>if (distTo[neighbor] > distTo[vertex] + edge.weight()) {<NEW_LINE>if (hasPathTo(neighbor)) {<NEW_LINE>int <MASK><NEW_LINE>distances[distancesIndex].remove(neighbor);<NEW_LINE>}<NEW_LINE>distTo[neighbor] = distTo[vertex] + (int) edge.weight();<NEW_LINE>edgeTo[neighbor] = edge;<NEW_LINE>int distancesIndex = distTo[neighbor] + maxPathDistance;<NEW_LINE>distances[distancesIndex].add(neighbor);<NEW_LINE>if (distTo[neighbor] + maxPathDistance < lastComputedShortestDistance) {<NEW_LINE>lastComputedShortestDistance = distTo[neighbor] + maxPathDistance;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (callsToRelax++ % edgeWeightedDigraph.vertices() == 0) {<NEW_LINE>findNegativeCycle();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return lastComputedShortestDistance;<NEW_LINE>}
distancesIndex = distTo[neighbor] + maxPathDistance;
956,127
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {<NEW_LINE>CommonLayoutParams.adjustChildrenLayoutParams(this, widthMeasureSpec, heightMeasureSpec);<NEW_LINE>// Don't call measure because it will measure content twice.<NEW_LINE>// ScrollView is expected to have single child so we measure only the first child.<NEW_LINE>View child = this.getChildCount() > 0 ? this.getChildAt(0) : null;<NEW_LINE>if (child == null) {<NEW_LINE>this.scrollableLength = 0;<NEW_LINE>this.contentMeasuredWidth = 0;<NEW_LINE>this.contentMeasuredHeight = 0;<NEW_LINE>this.setPadding(0, 0, 0, 0);<NEW_LINE>} else {<NEW_LINE>CommonLayoutParams.measureChild(child, widthMeasureSpec, MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));<NEW_LINE>this.contentMeasuredWidth = CommonLayoutParams.getDesiredWidth(child);<NEW_LINE>this.<MASK><NEW_LINE>// Android ScrollView does not account to child margins so we set them as paddings. Otherwise you can never scroll to bottom.<NEW_LINE>CommonLayoutParams lp = (CommonLayoutParams) child.getLayoutParams();<NEW_LINE>this.setPadding(lp.leftMargin, lp.topMargin, lp.rightMargin, lp.bottomMargin);<NEW_LINE>}<NEW_LINE>// Don't add in our paddings because they are already added as child margins. (we will include them twice if we add them).<NEW_LINE>// check the previous line - this.setPadding(lp.leftMargin, lp.topMargin, lp.rightMargin, lp.bottomMargin);<NEW_LINE>// this.contentMeasuredWidth += this.getPaddingLeft() + this.getPaddingRight();<NEW_LINE>// this.contentMeasuredHeight += this.getPaddingTop() + this.getPaddingBottom();<NEW_LINE>// Check against our minimum height<NEW_LINE>this.contentMeasuredWidth = Math.max(this.contentMeasuredWidth, this.getSuggestedMinimumWidth());<NEW_LINE>this.contentMeasuredHeight = Math.max(this.contentMeasuredHeight, this.getSuggestedMinimumHeight());<NEW_LINE>int widthSizeAndState = resolveSizeAndState(this.contentMeasuredWidth, widthMeasureSpec, 0);<NEW_LINE>int heightSizeAndState = resolveSizeAndState(this.contentMeasuredHeight, heightMeasureSpec, 0);<NEW_LINE>this.setMeasuredDimension(widthSizeAndState, heightSizeAndState);<NEW_LINE>}
contentMeasuredHeight = CommonLayoutParams.getDesiredHeight(child);
889,561
public static void main(String[] args) {<NEW_LINE>final MetricsAdvisorClient advisorClient = new MetricsAdvisorClientBuilder().credential(new MetricsAdvisorKeyCredential("subscription_key", "api_key")).endpoint("{endpoint}").buildClient();<NEW_LINE>final OffsetDateTime startTime = OffsetDateTime.parse("2020-01-01T00:00:00Z");<NEW_LINE>final OffsetDateTime endTime = OffsetDateTime.parse("2020-09-09T00:00:00Z");<NEW_LINE>final String metricId = "2dgfbbbb-41ec-a637-677e77b81455";<NEW_LINE>advisorClient.listMetricSeriesData(metricId, Arrays.asList(new DimensionKey().put("cost", "redmond")), startTime, endTime).forEach(metricSeriesData -> {<NEW_LINE>System.out.println("List of data points for this series:");<NEW_LINE>System.out.println(metricSeriesData.getMetricValues());<NEW_LINE>System.out.println("Timestamps of the data related to this time series:");<NEW_LINE>System.out.<MASK><NEW_LINE>System.out.printf("Series Key: %s%n", metricSeriesData.getSeriesKey().asMap());<NEW_LINE>});<NEW_LINE>}
println(metricSeriesData.getTimestamps());
649,728
public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("rgb" + mm.getMessage("function.missingParam"));<NEW_LINE>}<NEW_LINE>int size = param.getSubSize();<NEW_LINE>if (size < 3 || size > 4) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("rgb" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>int r, g, b, a = 255;<NEW_LINE>IParam sub1 = param.getSub(0);<NEW_LINE>IParam <MASK><NEW_LINE>IParam sub3 = param.getSub(2);<NEW_LINE>if (sub1 == null || sub2 == null || sub3 == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("rgb" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>Object result1 = sub1.getLeafExpression().calculate(ctx);<NEW_LINE>if (result1 instanceof Number) {<NEW_LINE>r = ((Number) result1).intValue();<NEW_LINE>} else {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("rgb" + mm.getMessage("function.paramTypeError"));<NEW_LINE>}<NEW_LINE>Object result2 = sub2.getLeafExpression().calculate(ctx);<NEW_LINE>if (result2 instanceof Number) {<NEW_LINE>g = ((Number) result2).intValue();<NEW_LINE>} else {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("rgb" + mm.getMessage("function.paramTypeError"));<NEW_LINE>}<NEW_LINE>Object result3 = sub3.getLeafExpression().calculate(ctx);<NEW_LINE>if (result3 instanceof Number) {<NEW_LINE>b = ((Number) result3).intValue();<NEW_LINE>} else {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("rgb" + mm.getMessage("function.paramTypeError"));<NEW_LINE>}<NEW_LINE>if (size == 4) {<NEW_LINE>IParam sub4 = param.getSub(3);<NEW_LINE>if (sub4 != null) {<NEW_LINE>Object result4 = sub4.getLeafExpression().calculate(ctx);<NEW_LINE>if (result4 instanceof Number) {<NEW_LINE>a = ((Number) result4).intValue();<NEW_LINE>} else {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("rgb" + mm.getMessage("function.paramTypeError"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return ((a & 0xFF) << 24) | ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | ((b & 0xFF) << 0);<NEW_LINE>}
sub2 = param.getSub(1);
1,380,067
public int[][] highestPeak(int[][] isWater) {<NEW_LINE>int m = isWater.length, n = isWater[0].length;<NEW_LINE>int[][] ans = new int[m][n];<NEW_LINE>for (int i = 0; i < m; ++i) {<NEW_LINE>Arrays.fill(<MASK><NEW_LINE>}<NEW_LINE>Deque<int[]> q = new LinkedList<>();<NEW_LINE>for (int i = 0; i < m; ++i) {<NEW_LINE>for (int j = 0; j < n; ++j) {<NEW_LINE>if (isWater[i][j] == 1) {<NEW_LINE>ans[i][j] = 0;<NEW_LINE>q.offerLast(new int[] { i, j });<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>while (!q.isEmpty()) {<NEW_LINE>int[] p = q.pollFirst();<NEW_LINE>int i = p[0], j = p[1];<NEW_LINE>for (int[] dir : dirs) {<NEW_LINE>int x = i + dir[0], y = j + dir[1];<NEW_LINE>if (x >= 0 && x < m && y >= 0 && y < n && ans[x][y] == -1) {<NEW_LINE>ans[x][y] = ans[i][j] + 1;<NEW_LINE>q.offerLast(new int[] { x, y });<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return ans;<NEW_LINE>}
ans[i], -1);
1,817,823
public com.amazonaws.services.migrationhubrefactorspaces.model.InternalServerException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.migrationhubrefactorspaces.model.InternalServerException internalServerException = new com.amazonaws.services.migrationhubrefactorspaces.model.InternalServerException(null);<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return internalServerException;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,282,170
public RedirectView authenticateWithWebBasedPlugin(@PathVariable("pluginId") String pluginId, HttpServletRequest request) {<NEW_LINE>if (securityIsDisabledOrAlreadyLoggedIn(request)) {<NEW_LINE>return new RedirectView("/pipelines", true);<NEW_LINE>}<NEW_LINE>LOGGER.debug("Requesting authentication for form auth.");<NEW_LINE>SavedRequest savedRequest = SessionUtils.savedRequest(request);<NEW_LINE>try {<NEW_LINE>final AccessToken accessToken = webBasedPluginAuthenticationProvider.fetchAccessToken(pluginId, getRequestHeaders(request), getParameterMap(request));<NEW_LINE>AuthenticationToken<AccessToken> authenticationToken = webBasedPluginAuthenticationProvider.authenticate(accessToken, pluginId);<NEW_LINE>if (authenticationToken == null) {<NEW_LINE>return unknownAuthenticationError(request);<NEW_LINE>}<NEW_LINE>SessionUtils.setAuthenticationTokenAfterRecreatingSession(authenticationToken, request);<NEW_LINE>} catch (AuthenticationException e) {<NEW_LINE>LOGGER.error("Failed to authenticate user.", e);<NEW_LINE>return badAuthentication(request, e.getMessage());<NEW_LINE>} catch (Exception e) {<NEW_LINE>return unknownAuthenticationError(request);<NEW_LINE>}<NEW_LINE>SessionUtils.removeAuthenticationError(request);<NEW_LINE>String redirectUrl = savedRequest == null <MASK><NEW_LINE>return new RedirectView(redirectUrl, false);<NEW_LINE>}
? "/go/pipelines" : savedRequest.getRedirectUrl();
119,916
public void compact(String tableName, CompactionConfig config) throws AccumuloSecurityException, TableNotFoundException, AccumuloException {<NEW_LINE>EXISTING_TABLE_NAME.validate(tableName);<NEW_LINE>// Ensure compaction iterators exist on a tabletserver<NEW_LINE>final String skviName = SortedKeyValueIterator.class.getName();<NEW_LINE>for (IteratorSetting setting : config.getIterators()) {<NEW_LINE><MASK><NEW_LINE>if (!testClassLoad(tableName, iteratorClass, skviName)) {<NEW_LINE>throw new AccumuloException("TabletServer could not load iterator class " + iteratorClass);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ensureStrategyCanLoad(tableName, config);<NEW_LINE>if (!UserCompactionUtils.isDefault(config.getConfigurer())) {<NEW_LINE>if (!testClassLoad(tableName, config.getConfigurer().getClassName(), CompactionConfigurer.class.getName())) {<NEW_LINE>throw new AccumuloException("TabletServer could not load " + CompactionConfigurer.class.getSimpleName() + " class " + config.getConfigurer().getClassName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!UserCompactionUtils.isDefault(config.getSelector())) {<NEW_LINE>if (!testClassLoad(tableName, config.getSelector().getClassName(), CompactionSelector.class.getName())) {<NEW_LINE>throw new AccumuloException("TabletServer could not load " + CompactionSelector.class.getSimpleName() + " class " + config.getSelector().getClassName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>TableId tableId = context.getTableId(tableName);<NEW_LINE>Text start = config.getStartRow();<NEW_LINE>Text end = config.getEndRow();<NEW_LINE>if (config.getFlush())<NEW_LINE>_flush(tableId, start, end, true);<NEW_LINE>List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableId.canonical().getBytes(UTF_8)), ByteBuffer.wrap(UserCompactionUtils.encode(config)));<NEW_LINE>Map<String, String> opts = new HashMap<>();<NEW_LINE>try {<NEW_LINE>doFateOperation(FateOperation.TABLE_COMPACT, args, opts, tableName, config.getWait());<NEW_LINE>} catch (TableExistsException | NamespaceExistsException e) {<NEW_LINE>// should not happen<NEW_LINE>throw new AssertionError(e);<NEW_LINE>} catch (NamespaceNotFoundException e) {<NEW_LINE>throw new TableNotFoundException(null, tableName, "Namespace not found", e);<NEW_LINE>}<NEW_LINE>}
String iteratorClass = setting.getIteratorClass();
1,771,796
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>View view = inflater.inflate(R.layout.fragment_rounded, container, false);<NEW_LINE>StreamAdapter adapter <MASK><NEW_LINE>adapter.add(new StreamItem(getActivity(), R.drawable.photo1, "Tufa at night", "Mono Lake, CA", ScaleType.CENTER));<NEW_LINE>adapter.add(new StreamItem(getActivity(), R.drawable.photo2, "Starry night", "Lake Powell, AZ", ScaleType.CENTER_CROP));<NEW_LINE>adapter.add(new StreamItem(getActivity(), R.drawable.photo3, "Racetrack playa", "Death Valley, CA", ScaleType.CENTER_INSIDE));<NEW_LINE>adapter.add(new StreamItem(getActivity(), R.drawable.photo4, "Napali coast", "Kauai, HI", ScaleType.FIT_CENTER));<NEW_LINE>adapter.add(new StreamItem(getActivity(), R.drawable.photo5, "Delicate Arch", "Arches, UT", ScaleType.FIT_END));<NEW_LINE>adapter.add(new StreamItem(getActivity(), R.drawable.photo6, "Sierra sunset", "Lone Pine, CA", ScaleType.FIT_START));<NEW_LINE>adapter.add(new StreamItem(getActivity(), R.drawable.photo7, "Majestic", "Grand Teton, WY", ScaleType.FIT_XY));<NEW_LINE>adapter.add(new StreamItem(getActivity(), R.drawable.black_white_tile, "TileMode", "REPEAT", ScaleType.FIT_XY, Shader.TileMode.REPEAT));<NEW_LINE>adapter.add(new StreamItem(getActivity(), R.drawable.black_white_tile, "TileMode", "CLAMP", ScaleType.FIT_XY, Shader.TileMode.CLAMP));<NEW_LINE>adapter.add(new StreamItem(getActivity(), R.drawable.black_white_tile, "TileMode", "MIRROR", ScaleType.FIT_XY, Shader.TileMode.MIRROR));<NEW_LINE>((ListView) view.findViewById(R.id.main_list)).setAdapter(adapter);<NEW_LINE>return view;<NEW_LINE>}
= new StreamAdapter(getActivity());
314,825
public static IClasspathEntry[] resolveClassPathEntries(IJavaProject javaProject, List<IPath> sourcePaths, List<IPath> excludingPaths, IPath outputPath) throws CoreException {<NEW_LINE>List<IClasspathEntry> <MASK><NEW_LINE>for (IClasspathEntry entry : javaProject.getRawClasspath()) {<NEW_LINE>if (entry.getEntryKind() != IClasspathEntry.CPE_SOURCE) {<NEW_LINE>newEntries.add(entry);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Sort the source paths to make the child folders come first<NEW_LINE>Collections.sort(sourcePaths, new Comparator<IPath>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public int compare(IPath path1, IPath path2) {<NEW_LINE>return path1.toString().compareTo(path2.toString()) * -1;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>List<IClasspathEntry> sourceEntries = new LinkedList<>();<NEW_LINE>for (IPath currentPath : sourcePaths) {<NEW_LINE>boolean canAddToSourceEntries = true;<NEW_LINE>List<IPath> exclusionPatterns = new ArrayList<>();<NEW_LINE>for (IClasspathEntry sourceEntry : sourceEntries) {<NEW_LINE>if (Objects.equals(sourceEntry.getPath(), currentPath)) {<NEW_LINE>JavaLanguageServerPlugin.logError("Skip duplicated source path: " + currentPath.toString());<NEW_LINE>canAddToSourceEntries = false;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (currentPath.isPrefixOf(sourceEntry.getPath())) {<NEW_LINE>exclusionPatterns.add(sourceEntry.getPath().makeRelativeTo(currentPath).addTrailingSeparator());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (currentPath.equals(outputPath)) {<NEW_LINE>throw new CoreException(new Status(IStatus.ERROR, IConstants.PLUGIN_ID, "The output path cannot be equal to the source path, please provide a new path."));<NEW_LINE>} else if (currentPath.isPrefixOf(outputPath)) {<NEW_LINE>exclusionPatterns.add(outputPath.makeRelativeTo(currentPath).addTrailingSeparator());<NEW_LINE>} else if (outputPath.isPrefixOf(currentPath)) {<NEW_LINE>throw new CoreException(new Status(IStatus.ERROR, IConstants.PLUGIN_ID, "The specified output path contains source folders, please provide a new path instead."));<NEW_LINE>}<NEW_LINE>if (canAddToSourceEntries) {<NEW_LINE>if (excludingPaths != null) {<NEW_LINE>for (IPath exclusion : excludingPaths) {<NEW_LINE>if (currentPath.isPrefixOf(exclusion) && !currentPath.equals(exclusion)) {<NEW_LINE>exclusionPatterns.add(exclusion.makeRelativeTo(currentPath).addTrailingSeparator());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>sourceEntries.add(JavaCore.newSourceEntry(currentPath, exclusionPatterns.toArray(IPath[]::new)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>newEntries.addAll(sourceEntries);<NEW_LINE>return newEntries.toArray(IClasspathEntry[]::new);<NEW_LINE>}
newEntries = new LinkedList<>();
1,034,048
default void reconcileThese(String trigger, Set<NamespaceAndName> desiredNames, String namespace, Handler<AsyncResult<Void>> handler) {<NEW_LINE>if (namespace.equals("*")) {<NEW_LINE>resetCounters();<NEW_LINE>} else {<NEW_LINE>resourceCounter(namespace).set(0);<NEW_LINE>pausedResourceCounter(namespace).set(0);<NEW_LINE>}<NEW_LINE>if (desiredNames.size() > 0) {<NEW_LINE>List<Future> <MASK><NEW_LINE>for (NamespaceAndName resourceRef : desiredNames) {<NEW_LINE>resourceCounter(resourceRef.getNamespace()).getAndIncrement();<NEW_LINE>Reconciliation reconciliation = new Reconciliation(trigger, kind(), resourceRef.getNamespace(), resourceRef.getName());<NEW_LINE>futures.add(reconcile(reconciliation));<NEW_LINE>}<NEW_LINE>CompositeFuture.join(futures).map((Void) null).onComplete(handler);<NEW_LINE>} else {<NEW_LINE>handler.handle(Future.succeededFuture());<NEW_LINE>}<NEW_LINE>}
futures = new ArrayList<>();
228,514
public RestConditionGroup appToRest(ConditionGroup app) {<NEW_LINE>Map<String, Boolean> restConditionMap = new HashMap<>();<NEW_LINE>if (app.getConditions() != null && !app.getConditions().isEmpty()) {<NEW_LINE>for (Condition condition : app.getConditions()) {<NEW_LINE>if (rulesAPI.findConditionlet(condition.getConditionletId()) != null) {<NEW_LINE>restConditionMap.put(<MASK><NEW_LINE>} else {<NEW_LINE>// In case the conditionlet from DB no longer exists in the List of Server Conditionlets.<NEW_LINE>// This case mostly for custom conditionlets (OSGI).<NEW_LINE>Logger.error(this, "Conditionlet not found: " + condition.getConditionletId());<NEW_LINE>throw new NotFoundException("Conditionlet not found: '%s'", condition.getConditionletId());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>RestConditionGroup rest = new RestConditionGroup.Builder().operator(app.getOperator().name()).id(app.getId()).priority(app.getPriority()).conditions(restConditionMap).build();<NEW_LINE>return rest;<NEW_LINE>}
condition.getId(), true);
1,105,361
public static List<Point2D_F64> createLayout(int numRows, int numCols, double centerDistance, double diameter) {<NEW_LINE>List<Point2D_F64> <MASK><NEW_LINE>double radius = diameter / 2.0;<NEW_LINE>double width = (numCols - 1) * centerDistance;<NEW_LINE>double height = (numRows - 1) * centerDistance;<NEW_LINE>for (int row = 0; row < numRows; row++) {<NEW_LINE>double y = (numRows - row - 1) * centerDistance - height / 2;<NEW_LINE>for (int col = 0; col < numCols; col++) {<NEW_LINE>double x = col * centerDistance - width / 2;<NEW_LINE>ret.add(new Point2D_F64(x, y - radius));<NEW_LINE>ret.add(new Point2D_F64(x + radius, y));<NEW_LINE>ret.add(new Point2D_F64(x, y + radius));<NEW_LINE>ret.add(new Point2D_F64(x - radius, y));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return ret;<NEW_LINE>}
ret = new ArrayList<>();
1,852,432
private void deleteSpecificServerRegistration(RESTRequest request, RESTResponse response) {<NEW_LINE>String source_objName = RESTHelper.getRequiredParam(request, APIConstants.PARAM_SOURCE_OBJNAME);<NEW_LINE>String listener_objName = RESTHelper.getRequiredParam(request, APIConstants.PARAM_LISTENER_OBJNAME);<NEW_LINE>String registrationID = RESTHelper.getRequiredParam(request, APIConstants.PARAM_REGISTRATIONID);<NEW_LINE>String clientIDString = RESTHelper.getRequiredParam(request, APIConstants.PARAM_CLIENTID);<NEW_LINE>int clientID = -1;<NEW_LINE>try {<NEW_LINE>clientID = Integer.parseInt(clientIDString);<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>ErrorHelper.createRESTHandlerJsonException(e, null, APIConstants.STATUS_BAD_REQUEST);<NEW_LINE>}<NEW_LINE>// Get the converter<NEW_LINE>JSONConverter converter = JSONConverter.getConverter();<NEW_LINE>// We'll build the server registration ourselves<NEW_LINE>ServerNotificationRegistration serverNotificationRegistration = new ServerNotificationRegistration();<NEW_LINE>serverNotificationRegistration.objectName = RESTHelper.objectNameConverter(source_objName, true, converter);<NEW_LINE>serverNotificationRegistration.listener = RESTHelper.<MASK><NEW_LINE>serverNotificationRegistration.operation = Operation.RemoveSpecific;<NEW_LINE>NotificationManager.getNotificationManager().deleteServerRegistrationHTTP(request, clientID, serverNotificationRegistration, registrationID, converter);<NEW_LINE>response.setStatus(APIConstants.STATUS_NO_CONTENT);<NEW_LINE>}
objectNameConverter(listener_objName, true, converter);
229,328
public Target unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Target target = new Target();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("Key", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>target.setKey(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("Values", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>target.setValues(new ListUnmarshaller<String>(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 target;<NEW_LINE>}
class).unmarshall(context));
459,870
private LambdaExpression cachedResolvedCopy(TypeBinding targetType, boolean anyTargetOk, boolean requireExceptionAnalysis, InferenceContext18 context) {<NEW_LINE>targetType = findGroundTargetType(this.enclosingScope, targetType, targetType, argumentsTypeElided());<NEW_LINE>if (targetType == null)<NEW_LINE>return null;<NEW_LINE>MethodBinding sam = targetType.getSingleAbstractMethod(this.enclosingScope, true);<NEW_LINE>if (sam == null || !sam.isValidBinding())<NEW_LINE>return null;<NEW_LINE>if (sam.parameters.length != this.arguments.length)<NEW_LINE>return null;<NEW_LINE>LambdaExpression copy = null;<NEW_LINE>if (this.copiesPerTargetType != null) {<NEW_LINE>copy = this.copiesPerTargetType.get(targetType);<NEW_LINE>if (copy == null) {<NEW_LINE>if (anyTargetOk && this.copiesPerTargetType.values().size() > 0)<NEW_LINE>copy = this.copiesPerTargetType.values().iterator().next();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>IErrorHandlingPolicy oldPolicy = this.enclosingScope.problemReporter().switchErrorHandlingPolicy(silentErrorHandlingPolicy);<NEW_LINE>try {<NEW_LINE>if (copy == null) {<NEW_LINE>copy = copy();<NEW_LINE>if (copy == null)<NEW_LINE>throw new CopyFailureException();<NEW_LINE>copy.setExpressionContext(this.expressionContext);<NEW_LINE>copy.setExpectedType(targetType);<NEW_LINE>copy.inferenceContext = context;<NEW_LINE>TypeBinding type = copy.resolveType(this.enclosingScope, true);<NEW_LINE>if (type == null || !type.isValidBinding())<NEW_LINE>return null;<NEW_LINE>if (this.copiesPerTargetType == null)<NEW_LINE>this.copiesPerTargetType = new <MASK><NEW_LINE>this.copiesPerTargetType.put(targetType, copy);<NEW_LINE>}<NEW_LINE>if (!requireExceptionAnalysis)<NEW_LINE>return copy;<NEW_LINE>if (copy.thrownExceptions == null)<NEW_LINE>if (!copy.hasIgnoredMandatoryErrors && !enclosingScopesHaveErrors())<NEW_LINE>copy.analyzeExceptions();<NEW_LINE>return copy;<NEW_LINE>} finally {<NEW_LINE>this.enclosingScope.problemReporter().switchErrorHandlingPolicy(oldPolicy);<NEW_LINE>}<NEW_LINE>}
HashMap<TypeBinding, LambdaExpression>();
164,296
public void visit(BLangRecordVariable varNode, AnalyzerData data) {<NEW_LINE>// Only simple variables are allowed to be configurable.<NEW_LINE>if (isConfigurable(varNode)) {<NEW_LINE>dlog.error(varNode.pos, DiagnosticErrorCode.ONLY_SIMPLE_VARIABLES_ARE_ALLOWED_TO_BE_CONFIGURABLE);<NEW_LINE>}<NEW_LINE>if (isIsolated(varNode)) {<NEW_LINE>dlog.error(varNode.pos, DiagnosticErrorCode.ONLY_A_SIMPLE_VARIABLE_CAN_BE_MARKED_AS_ISOLATED);<NEW_LINE>}<NEW_LINE>if (varNode.isDeclaredWithVar) {<NEW_LINE>handleDeclaredWithVar(varNode, data);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>SymbolEnv currentEnv = data.env;<NEW_LINE>if (varNode.getBType() == null) {<NEW_LINE>varNode.setBType(symResolver.resolveTypeNode(varNode.typeNode, currentEnv));<NEW_LINE>}<NEW_LINE>int ownerSymTag = currentEnv.scope.owner.tag;<NEW_LINE>// If this is a module record variable, checkTypeAndVarCountConsistency already done at symbolEnter.<NEW_LINE>if ((ownerSymTag & SymTag.PACKAGE) != SymTag.PACKAGE && !(this.symbolEnter.symbolEnterAndValidateRecordVariable(varNode, currentEnv))) {<NEW_LINE>varNode.setBType(symTable.semanticError);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (varNode.getBType() == symTable.semanticError) {<NEW_LINE>// This will return module record variables with type error<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>BVarSymbol symbol = varNode.symbol;<NEW_LINE>varNode.annAttachments.forEach(annotationAttachment -> {<NEW_LINE>annotationAttachment.attachPoints.add(AttachPoint.Point.VAR);<NEW_LINE>annotationAttachment.accept(this, data);<NEW_LINE>symbol.addAnnotation(annotationAttachment.annotationAttachmentSymbol);<NEW_LINE>});<NEW_LINE>validateAnnotationAttachmentCount(varNode.annAttachments);<NEW_LINE>if (varNode.expr == null) {<NEW_LINE>// we have no rhs to do type checking<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>typeChecker.checkExpr(varNode.expr, currentEnv, varNode.<MASK><NEW_LINE>}
getBType(), data.prevEnvs);
1,100,670
private void openCamera(SurfaceHolder holder, int cameraId) {<NEW_LINE>releaseCamera();<NEW_LINE>mCameraId = cameraId;<NEW_LINE>mCamera = Camera.open(mCameraId);<NEW_LINE>setCameraDisplayOrientation((Activity) getContext(), mCameraId, mCamera);<NEW_LINE>mParams = mCamera.getParameters();<NEW_LINE>mPictureSize = getPropPictureSize(mParams.getSupportedPictureSizes(), mConfig.rate, mConfig.minPictureWidth);<NEW_LINE>mPreviewSize = getPropPreviewSize(mParams.getSupportedPreviewSizes(), mConfig.rate, mConfig.minPreviewWidth);<NEW_LINE>mParams.setPictureSize(mPictureSize.width, mPictureSize.height);<NEW_LINE>mParams.setPreviewSize(mPreviewSize.width, mPreviewSize.height);<NEW_LINE>mParams.setPreviewFormat(IMAGE_FORMAT);<NEW_LINE>if (mCameraId == Camera.CameraInfo.CAMERA_FACING_BACK) {<NEW_LINE>mParams.<MASK><NEW_LINE>}<NEW_LINE>mCamera.setParameters(mParams);<NEW_LINE>holder.setFixedSize(mPreviewSize.width, mPreviewSize.height);<NEW_LINE>try {<NEW_LINE>mCamera.setPreviewDisplay(holder);<NEW_LINE>} catch (IOException ioe) {<NEW_LINE>ioe.printStackTrace();<NEW_LINE>}<NEW_LINE>mCamera.setPreviewCallback(this);<NEW_LINE>mCamera.startPreview();<NEW_LINE>}
setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);
1,534,109
ActionResult<Wo> execute(EffectivePerson effectivePerson, String job, String path0, String path1, String path2, String path3, String path4, String path5, JsonElement jsonElement) throws Exception {<NEW_LINE>LOGGER.debug("{} access.", effectivePerson::getDistinguishedName);<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>String executorSeed = null;<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>List<Work> works = emc.fetchEqual(Work.class, Arrays.asList(Work.job_FIELDNAME<MASK><NEW_LINE>if (!works.isEmpty()) {<NEW_LINE>executorSeed = job;<NEW_LINE>} else {<NEW_LINE>throw new ExceptionJobNotExist(job);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Callable<Wo> callable = callable(job, path0, path1, path2, path3, path4, path5, jsonElement);<NEW_LINE>Wo wo = ProcessPlatformExecutorFactory.get(executorSeed).submit(callable).get(300, TimeUnit.SECONDS);<NEW_LINE>result.setData(wo);<NEW_LINE>return result;<NEW_LINE>}
), Work.job_FIELDNAME, job);
632,326
public JComponent createWSEditorComponent(Node node) {<NEW_LINE>WSDLModel clientWsdlModel;<NEW_LINE>WSDLModel wsdlModel;<NEW_LINE>isClient = !jaxWsService.isServiceProvider();<NEW_LINE>if (project != null) {<NEW_LINE>try {<NEW_LINE>wsdlModel = MavenWSITModelSupport.getModel(node, project, jaxWsSupport, jaxWsService, this, true, createdFiles);<NEW_LINE>if (isClient) {<NEW_LINE>clientWsdlModel = MavenWSITModelSupport.getModel(node, project, jaxWsSupport, jaxWsService, this, true, createdFiles);<NEW_LINE>wsdlModel = MavenWSITModelSupport.getServiceModelForClient(jaxWsSupport, jaxWsService);<NEW_LINE>return new ClientTopComponent(jaxWsSupport, <MASK><NEW_LINE>} else {<NEW_LINE>return new ServiceTopComponent(node, jaxWsService, wsdlModel, getUndoManager());<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.log(Level.INFO, null, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new ErrorTopComponent(NbBundle.getMessage(MavenWSITEditor.class, "TXT_WSIT_NotSupported"));<NEW_LINE>}
jaxWsService, clientWsdlModel, wsdlModel, node);
347,835
private void checkLineWrappedLambda(final boolean isSwitchRuleLambda, final int mainAstColumnNo) {<NEW_LINE>final IndentLevel level;<NEW_LINE>final DetailAST mainAst = getMainAst();<NEW_LINE>if (isSwitchRuleLambda) {<NEW_LINE>// We check the indentation of the case literal or default literal<NEW_LINE>// on the previous line and use that to determine the correct<NEW_LINE>// indentation for the line wrapped "->"<NEW_LINE>final DetailAST previousSibling = mainAst.getPreviousSibling();<NEW_LINE><MASK><NEW_LINE>level = new IndentLevel(new IndentLevel(previousLineStart), getIndentCheck().getLineWrappingIndentation());<NEW_LINE>} else {<NEW_LINE>level = new IndentLevel(getIndent(), getIndentCheck().getLineWrappingIndentation());<NEW_LINE>}<NEW_LINE>if (isNonAcceptableIndent(mainAstColumnNo, level)) {<NEW_LINE>isLambdaCorrectlyIndented = false;<NEW_LINE>logError(mainAst, "", mainAstColumnNo, level);<NEW_LINE>}<NEW_LINE>}
final int previousLineStart = getLineStart(previousSibling);
202,969
private String buildNativeImagePath(VisitorContext visitorContext) {<NEW_LINE>String group = visitorContext.getOptions(<MASK><NEW_LINE>String module = visitorContext.getOptions().get(VisitorContext.MICRONAUT_PROCESSING_MODULE);<NEW_LINE>if (group != null && module != null) {<NEW_LINE>return "native-image/" + group + "/" + module + "/";<NEW_LINE>}<NEW_LINE>String basePackage = packages.stream().distinct().min(Comparator.comparingInt(String::length)).orElse("io.micronaut");<NEW_LINE>if (basePackage.startsWith("io.micronaut.")) {<NEW_LINE>module = basePackage.substring("io.micronaut.".length()).replace('.', '-');<NEW_LINE>basePackage = "io.micronaut";<NEW_LINE>} else {<NEW_LINE>if (basePackage.contains(".")) {<NEW_LINE>final int i = basePackage.lastIndexOf('.');<NEW_LINE>module = basePackage.substring(i + 1);<NEW_LINE>basePackage = basePackage.substring(0, i);<NEW_LINE>} else {<NEW_LINE>module = basePackage;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return "native-image/" + basePackage + "/" + module + "/";<NEW_LINE>}
).get(VisitorContext.MICRONAUT_PROCESSING_GROUP);
1,108,461
protected void fillContentElement(final Element contentElement, final Content content) throws FeedException {<NEW_LINE>final String type = content.getType();<NEW_LINE>if (type != null) {<NEW_LINE>final Attribute typeAttribute = new Attribute("type", type);<NEW_LINE>contentElement.setAttribute(typeAttribute);<NEW_LINE>}<NEW_LINE>final String mode = content.getMode();<NEW_LINE>if (mode != null) {<NEW_LINE>final Attribute modeAttribute = new Attribute("mode", mode);<NEW_LINE>contentElement.setAttribute(modeAttribute);<NEW_LINE>}<NEW_LINE>final String value = content.getValue();<NEW_LINE>if (value != null) {<NEW_LINE>if (mode == null || mode.equals(Content.ESCAPED)) {<NEW_LINE>contentElement.addContent(value);<NEW_LINE>} else if (mode.equals(Content.BASE64)) {<NEW_LINE>contentElement.addContent<MASK><NEW_LINE>} else if (mode.equals(Content.XML)) {<NEW_LINE>final StringBuffer tmpDocString = new StringBuffer("<tmpdoc>");<NEW_LINE>tmpDocString.append(value);<NEW_LINE>tmpDocString.append("</tmpdoc>");<NEW_LINE>final StringReader tmpDocReader = new StringReader(tmpDocString.toString());<NEW_LINE>Document tmpDoc;<NEW_LINE>try {<NEW_LINE>final SAXBuilder saxBuilder = new SAXBuilder();<NEW_LINE>tmpDoc = saxBuilder.build(tmpDocReader);<NEW_LINE>} catch (final Exception ex) {<NEW_LINE>throw new FeedException("Invalid XML", ex);<NEW_LINE>}<NEW_LINE>final List<org.jdom2.Content> children = tmpDoc.getRootElement().removeContent();<NEW_LINE>contentElement.addContent(children);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(Base64.encode(value));
229,084
private static void hashFunction(byte[] output, int outputOff, long[] v, byte[] hm, int hmOff) {<NEW_LINE>int mask, cL;<NEW_LINE>byte[] T = new byte[PARAM_K * PARAM_N + 2 * HM_BYTES];<NEW_LINE>for (int k = 0; k < PARAM_K; k++) {<NEW_LINE>int index = k * PARAM_N;<NEW_LINE>for (int i = 0; i < PARAM_N; i++) {<NEW_LINE>int temp = (int) v[index];<NEW_LINE>// If v[i] > PARAM_Q/2 then v[i] -= PARAM_Q<NEW_LINE>mask = (PARAM_Q / 2 - temp) >> (RADIX32 - 1);<NEW_LINE>temp = ((temp - PARAM_Q) & mask) | (temp & ~mask);<NEW_LINE>cL = temp & ((1 << PARAM_D) - 1);<NEW_LINE>// If cL > 2^(d-1) then cL -= 2^d<NEW_LINE>mask = ((1 << (PARAM_D - 1)) - cL<MASK><NEW_LINE>cL = ((cL - (1 << PARAM_D)) & mask) | (cL & ~mask);<NEW_LINE>T[index++] = (byte) ((temp - cL) >> PARAM_D);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>System.arraycopy(hm, hmOff, T, PARAM_K * PARAM_N, 2 * HM_BYTES);<NEW_LINE>HashUtils.secureHashAlgorithmKECCAK256(output, outputOff, CRYPTO_C_BYTES, T, 0, T.length);<NEW_LINE>}
) >> (RADIX32 - 1);
797,587
private static double mergeNoises(double yNoiseIdx, double biomeNoiseV, double depthNoiseV, double upperInterpolationNoiseV, double lowerInterpolationNoiseV, double interpolationNoiseV, double temperatureV, double rainfallV) {<NEW_LINE>// This took a lot of trial and error to get right...<NEW_LINE>double scaledRainfall = 1.0 - rainfallV * temperatureV;<NEW_LINE>double biomeNoiseValue = biomeNoiseV / 512.0 + 0.5;<NEW_LINE>double biomeFactor = Math.max(0, Math.min(1, biomeNoiseValue * (1 - Math.pow(scaledRainfall, 4))));<NEW_LINE>double upperInter = upperInterpolationNoiseV / 512.0;<NEW_LINE>double lowerInter = lowerInterpolationNoiseV / 512.0;<NEW_LINE>double mainInter = interpolationNoiseV / 20.0 + 0.5;<NEW_LINE>double clampedInterpolated = PerlinNoise.lerp(Math.max(0, Math.min(1, mainInter)), upperInter, lowerInter);<NEW_LINE>// Why are there so many conditionals for depth noise???<NEW_LINE>double depth1 = depthNoiseV / 8000.0;<NEW_LINE>double depth2 = depth1 * (depth1 < 0 ? -0.8999999999999999 : 3.0) - 2.0;<NEW_LINE>double depth3 = depth2 < 0 ? Math.max(-2, depth2) / 5.6 : Math.<MASK><NEW_LINE>double depthAdjustedBiomeFactor = depth2 < 0 ? 0.5 : biomeFactor + 0.5;<NEW_LINE>double depth4 = (NOISE_HEIGHT_OFFSET + yNoiseIdx - VANILLA_NOISE_HEIGHT * (0.5 + depth3 * 0.25)) * 12.0 / depthAdjustedBiomeFactor;<NEW_LINE>double depth5 = depth4 < 0 ? depth4 * 4.0 : depth4;<NEW_LINE>return clampedInterpolated - depth5;<NEW_LINE>}
min(1, depth2) / 8.0;
1,726,505
public static DescribeCdnDomainDetailResponse unmarshall(DescribeCdnDomainDetailResponse describeCdnDomainDetailResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeCdnDomainDetailResponse.setRequestId(_ctx.stringValue("DescribeCdnDomainDetailResponse.RequestId"));<NEW_LINE>GetDomainDetailModel getDomainDetailModel = new GetDomainDetailModel();<NEW_LINE>getDomainDetailModel.setDomainName<MASK><NEW_LINE>getDomainDetailModel.setCname(_ctx.stringValue("DescribeCdnDomainDetailResponse.GetDomainDetailModel.Cname"));<NEW_LINE>getDomainDetailModel.setHttpsCname(_ctx.stringValue("DescribeCdnDomainDetailResponse.GetDomainDetailModel.HttpsCname"));<NEW_LINE>getDomainDetailModel.setDomainStatus(_ctx.stringValue("DescribeCdnDomainDetailResponse.GetDomainDetailModel.DomainStatus"));<NEW_LINE>getDomainDetailModel.setCdnType(_ctx.stringValue("DescribeCdnDomainDetailResponse.GetDomainDetailModel.CdnType"));<NEW_LINE>getDomainDetailModel.setServerCertificateStatus(_ctx.stringValue("DescribeCdnDomainDetailResponse.GetDomainDetailModel.ServerCertificateStatus"));<NEW_LINE>getDomainDetailModel.setGmtCreated(_ctx.stringValue("DescribeCdnDomainDetailResponse.GetDomainDetailModel.GmtCreated"));<NEW_LINE>getDomainDetailModel.setGmtModified(_ctx.stringValue("DescribeCdnDomainDetailResponse.GetDomainDetailModel.GmtModified"));<NEW_LINE>getDomainDetailModel.setResourceGroupId(_ctx.stringValue("DescribeCdnDomainDetailResponse.GetDomainDetailModel.ResourceGroupId"));<NEW_LINE>getDomainDetailModel.setDescription(_ctx.stringValue("DescribeCdnDomainDetailResponse.GetDomainDetailModel.Description"));<NEW_LINE>getDomainDetailModel.setScope(_ctx.stringValue("DescribeCdnDomainDetailResponse.GetDomainDetailModel.Scope"));<NEW_LINE>List<SourceModel> sourceModels = new ArrayList<SourceModel>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeCdnDomainDetailResponse.GetDomainDetailModel.SourceModels.Length"); i++) {<NEW_LINE>SourceModel sourceModel = new SourceModel();<NEW_LINE>sourceModel.setContent(_ctx.stringValue("DescribeCdnDomainDetailResponse.GetDomainDetailModel.SourceModels[" + i + "].Content"));<NEW_LINE>sourceModel.setType(_ctx.stringValue("DescribeCdnDomainDetailResponse.GetDomainDetailModel.SourceModels[" + i + "].Type"));<NEW_LINE>sourceModel.setPort(_ctx.integerValue("DescribeCdnDomainDetailResponse.GetDomainDetailModel.SourceModels[" + i + "].Port"));<NEW_LINE>sourceModel.setEnabled(_ctx.stringValue("DescribeCdnDomainDetailResponse.GetDomainDetailModel.SourceModels[" + i + "].Enabled"));<NEW_LINE>sourceModel.setPriority(_ctx.stringValue("DescribeCdnDomainDetailResponse.GetDomainDetailModel.SourceModels[" + i + "].Priority"));<NEW_LINE>sourceModel.setWeight(_ctx.stringValue("DescribeCdnDomainDetailResponse.GetDomainDetailModel.SourceModels[" + i + "].Weight"));<NEW_LINE>sourceModels.add(sourceModel);<NEW_LINE>}<NEW_LINE>getDomainDetailModel.setSourceModels(sourceModels);<NEW_LINE>describeCdnDomainDetailResponse.setGetDomainDetailModel(getDomainDetailModel);<NEW_LINE>return describeCdnDomainDetailResponse;<NEW_LINE>}
(_ctx.stringValue("DescribeCdnDomainDetailResponse.GetDomainDetailModel.DomainName"));
262,252
public ValueStatus checkValidity(Object value) {<NEW_LINE>if (!(value instanceof String)) {<NEW_LINE>return ValueStatus.getErrorStatus(value);<NEW_LINE>}<NEW_LINE>String typeToCheck = (String) value;<NEW_LINE>// This only checks if the value is syntactically correct Java. It does<NEW_LINE>// not check if<NEW_LINE>// the type or the parameters of the parameterised type exists. Further<NEW_LINE>// checks need to be performed below.<NEW_LINE>StringBuffer source = new StringBuffer();<NEW_LINE>Type astType = getASTType(typeToCheck, source);<NEW_LINE>// Check the parameters to see if they are valid Java types. The<NEW_LINE>// ASTNode only checks for syntactic<NEW_LINE>// correctness, not whether the type actually exists or not,<NEW_LINE>// therefore an IType is needed.<NEW_LINE>List<String> allNonExistantTypes = new ArrayList<>();<NEW_LINE>if (astType != null) {<NEW_LINE>try {<NEW_LINE>boolean isValid = allTypesExist(astType, source, allNonExistantTypes);<NEW_LINE>if (!isValid) {<NEW_LINE>String message = composeErrorMessage(allNonExistantTypes);<NEW_LINE>return ValueStatus.getErrorStatus(value, message);<NEW_LINE>} else {<NEW_LINE>return ValueStatus.getValidStatus(value);<NEW_LINE>}<NEW_LINE>} catch (JavaModelException e) {<NEW_LINE>GroovyDSLCoreActivator.logException(e);<NEW_LINE>return ValueStatus.getErrorStatus(value, e.getLocalizedMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return <MASK><NEW_LINE>}
ValueStatus.getErrorStatus(value, INVALID_JAVA);
882,932
private ProcessInfoParameter createProcessInfoParameter(@NonNull final WFNodeParameter nPara) {<NEW_LINE>final String attributeName = nPara.getAttributeName();<NEW_LINE>final String attributeValue = nPara.getAttributeValue();<NEW_LINE>log.debug("{} = {}", attributeName, attributeValue);<NEW_LINE>// Value - Constant/Variable<NEW_LINE>Object value = attributeValue;<NEW_LINE>if (attributeValue == null || attributeValue.isEmpty()) {<NEW_LINE>value = null;<NEW_LINE>} else if (// we have a variable<NEW_LINE>attributeValue.indexOf('@') != -1) {<NEW_LINE>// Strip<NEW_LINE>int index = attributeValue.indexOf('@');<NEW_LINE>String columnName = attributeValue.substring(index + 1);<NEW_LINE><MASK><NEW_LINE>if (index == -1) {<NEW_LINE>log.warn(attributeName + " - cannot evaluate=" + attributeValue);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>columnName = columnName.substring(0, index);<NEW_LINE>if (context.hasDocumentColumn(getDocumentRef(), columnName)) {<NEW_LINE>value = context.getDocumentColumnValueByColumnName(getDocumentRef(), columnName);<NEW_LINE>} else // not a column<NEW_LINE>{<NEW_LINE>// try Env<NEW_LINE>final String env = Env.getContext(Env.getCtx(), columnName);<NEW_LINE>if (Check.isEmpty(env)) {<NEW_LINE>log.warn("{} - not column nor environment ={}({})", attributeName, columnName, attributeValue);<NEW_LINE>return null;<NEW_LINE>} else {<NEW_LINE>value = env;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// @variable@<NEW_LINE>// No Value<NEW_LINE>if (value == null) {<NEW_LINE>if (nPara.isMandatory()) {<NEW_LINE>log.warn("{} - empty - mandatory!", attributeName);<NEW_LINE>} else {<NEW_LINE>log.debug("{} - empty", attributeName);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// Convert to Type<NEW_LINE>try {<NEW_LINE>final int displayType = nPara.getValueType().getRepoId();<NEW_LINE>if (DisplayType.isNumeric(displayType) || DisplayType.isID(displayType)) {<NEW_LINE>final BigDecimal bd = NumberUtils.asBigDecimal(value);<NEW_LINE>return ProcessInfoParameter.of(attributeName, bd);<NEW_LINE>} else if (DisplayType.isDate(displayType)) {<NEW_LINE>final Timestamp ts;<NEW_LINE>if (value instanceof Timestamp) {<NEW_LINE>ts = (Timestamp) value;<NEW_LINE>} else {<NEW_LINE>ts = Timestamp.valueOf(value.toString());<NEW_LINE>}<NEW_LINE>return ProcessInfoParameter.of(attributeName, ts);<NEW_LINE>} else {<NEW_LINE>return ProcessInfoParameter.of(attributeName, value.toString());<NEW_LINE>}<NEW_LINE>} catch (final Exception e) {<NEW_LINE>log.warn("Failed on {} = {} ({})", attributeName, attributeValue, value, e);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
index = columnName.indexOf('@');
1,377,379
public void testXA012(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>final <MASK><NEW_LINE>tm.begin();<NEW_LINE>final Transaction tx = tm.getTransaction();<NEW_LINE>tx.enlistResource(new XAResourceImpl().setPrepareAction(XAException.XA_RBROLLBACK));<NEW_LINE>tx.enlistResource(new XAResourceImpl());<NEW_LINE>tx.enlistResource(new XAResourceImpl().setPrepareAction(XAResource.XA_RDONLY));<NEW_LINE>tx.enlistResource(new XAResourceImpl().setRollbackAction(XAException.XA_HEURHAZ));<NEW_LINE>tx.enlistResource(new XAResourceImpl().setPrepareAction(XAResource.XA_RDONLY));<NEW_LINE>tx.enlistResource(new XAResourceImpl());<NEW_LINE>tx.enlistResource(new XAResourceImpl());<NEW_LINE>tx.enlistResource(new XAResourceImpl());<NEW_LINE>tx.enlistResource(new XAResourceImpl().setPrepareAction(XAResource.XA_RDONLY));<NEW_LINE>tx.enlistResource(new XAResourceImpl());<NEW_LINE>try {<NEW_LINE>tm.commit();<NEW_LINE>throw new Exception();<NEW_LINE>} catch (HeuristicMixedException e) {<NEW_LINE>// As expected<NEW_LINE>}<NEW_LINE>}
TransactionManager tm = TransactionManagerFactory.getTransactionManager();
822,756
public static void partialReduceFloatAddCarrierValue(float[] inputArray, float[] outputArray, int gidx, float value) {<NEW_LINE>float[] localArray = (float[]) NewArrayNode.<MASK><NEW_LINE>int localIdx = SPIRVOCLIntrinsics.get_local_id(0);<NEW_LINE>int localGroupSize = SPIRVOCLIntrinsics.get_local_size(0);<NEW_LINE>int groupID = SPIRVOCLIntrinsics.get_group_id(0);<NEW_LINE>int myID = localIdx + (localGroupSize * groupID);<NEW_LINE>localArray[localIdx] = value;<NEW_LINE>for (int stride = (localGroupSize / 2); stride > 0; stride /= 2) {<NEW_LINE>SPIRVOCLIntrinsics.localBarrier();<NEW_LINE>if (localIdx < stride) {<NEW_LINE>localArray[localIdx] += localArray[localIdx + stride];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>SPIRVOCLIntrinsics.globalBarrier();<NEW_LINE>if (localIdx == 0) {<NEW_LINE>outputArray[groupID + 1] = localArray[0];<NEW_LINE>}<NEW_LINE>}
newUninitializedArray(float.class, LOCAL_WORK_GROUP_SIZE);
805,116
public final void neighborAllToAllv(Object sendbuf, int[] sendcount, int[] sdispls, Datatype sendtype, Object recvbuf, int[] recvcount, int[] rdispls, Datatype recvtype) throws MPIException {<NEW_LINE>MPI.check();<NEW_LINE>int sendoff = 0, recvoff = 0;<NEW_LINE>boolean sdb = false, rdb = false;<NEW_LINE>if (sendbuf instanceof Buffer && !(sdb = ((Buffer) sendbuf).isDirect())) {<NEW_LINE>sendoff = sendtype.getOffset(sendbuf);<NEW_LINE>sendbuf = ((<MASK><NEW_LINE>}<NEW_LINE>if (recvbuf instanceof Buffer && !(rdb = ((Buffer) recvbuf).isDirect())) {<NEW_LINE>recvoff = recvtype.getOffset(recvbuf);<NEW_LINE>recvbuf = ((Buffer) recvbuf).array();<NEW_LINE>}<NEW_LINE>neighborAllToAllv(handle, sendbuf, sdb, sendoff, sendcount, sdispls, sendtype.handle, sendtype.baseType, recvbuf, rdb, recvoff, recvcount, rdispls, recvtype.handle, recvtype.baseType);<NEW_LINE>}
Buffer) sendbuf).array();
276,805
public static boolean areElementsEquivalent(@Nonnull PsiElement element1, @Nonnull PsiElement element2, @Nullable Comparator<PsiElement> resolvedElementsComparator, @Nullable Comparator<PsiElement> leafElementsComparator, @javax.annotation.Nullable Condition<PsiElement> isElementSignificantCondition, boolean areCommentsSignificant) {<NEW_LINE>if (element1 == element2)<NEW_LINE>return true;<NEW_LINE>ASTNode node1 = element1.getNode();<NEW_LINE>ASTNode node2 = element2.getNode();<NEW_LINE>if (node1 == null || node2 == null)<NEW_LINE>return false;<NEW_LINE>if (node1.getElementType() != node2.getElementType())<NEW_LINE>return false;<NEW_LINE>PsiElement[] children1 = getFilteredChildren(element1, isElementSignificantCondition, areCommentsSignificant);<NEW_LINE>PsiElement[] children2 = getFilteredChildren(element2, isElementSignificantCondition, areCommentsSignificant);<NEW_LINE>if (children1.length != children2.length)<NEW_LINE>return false;<NEW_LINE>for (int i = 0; i < children1.length; i++) {<NEW_LINE>PsiElement child1 = children1[i];<NEW_LINE>PsiElement child2 = children2[i];<NEW_LINE>if (!areElementsEquivalent(child1, child2, resolvedElementsComparator, leafElementsComparator, isElementSignificantCondition, areCommentsSignificant))<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (children1.length == 0) {<NEW_LINE>if (leafElementsComparator != null) {<NEW_LINE>if (leafElementsComparator.compare(element1, element2) != 0)<NEW_LINE>return false;<NEW_LINE>} else {<NEW_LINE>if (!element1.textMatches(element2))<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>PsiReference ref1 = element1.getReference();<NEW_LINE>if (ref1 != null) {<NEW_LINE><MASK><NEW_LINE>if (ref2 == null)<NEW_LINE>return false;<NEW_LINE>PsiElement resolved1 = ref1.resolve();<NEW_LINE>PsiElement resolved2 = ref2.resolve();<NEW_LINE>if (!Comparing.equal(resolved1, resolved2) && (resolvedElementsComparator == null || resolvedElementsComparator.compare(resolved1, resolved2) != 0))<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
PsiReference ref2 = element2.getReference();
700,125
public void bind(ViewPager viewPager, TabLayout tabLayout, FloatingActionButton navigationFab, FloatingActionButton genericFab) {<NEW_LINE>viewPager.setPageMargin(viewPager.getResources().getDimensionPixelOffset(R.dimen.divider));<NEW_LINE>viewPager.setPageMarginDrawable(R.color.blackT12);<NEW_LINE>viewPager.setOffscreenPageLimit(2);<NEW_LINE>viewPager.setAdapter(this);<NEW_LINE>tabLayout.setupWithViewPager(viewPager);<NEW_LINE>mTabListener = new TabLayout.ViewPagerOnTabSelectedListener(viewPager) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onTabSelected(TabLayout.Tab tab) {<NEW_LINE>super.onTabSelected(tab);<NEW_LINE>toggleFabs(viewPager.getCurrentItem() == 0, navigationFab, genericFab);<NEW_LINE>Fragment fragment = <MASK><NEW_LINE>if (fragment != null) {<NEW_LINE>((LazyLoadFragment) fragment).loadNow();<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onTabReselected(TabLayout.Tab tab) {<NEW_LINE>Fragment fragment = getItem(viewPager.getCurrentItem());<NEW_LINE>if (fragment != null) {<NEW_LINE>((Scrollable) fragment).scrollToTop();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>tabLayout.addOnTabSelectedListener(mTabListener);<NEW_LINE>viewPager.setCurrentItem(mDefaultItem);<NEW_LINE>toggleFabs(mDefaultItem == 0, navigationFab, genericFab);<NEW_LINE>}
getItem(viewPager.getCurrentItem());
608,490
public void testCMTBeanSubmitsManagedTaskThatInvokesTxNever(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>PrintWriter out = response.getWriter();<NEW_LINE>final ConcurrentCMT bean = (ConcurrentCMT) new <MASK><NEW_LINE>Future<?> future = bean.submit(new Callable<Object>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Object call() throws Exception {<NEW_LINE>Object ejbTxKey = bean.runAsNever();<NEW_LINE>if (ejbTxKey != null)<NEW_LINE>throw new Exception("TX_NEVER should not run in a transaction: " + ejbTxKey);<NEW_LINE>UserTransaction tran = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");<NEW_LINE>tran.begin();<NEW_LINE>try {<NEW_LINE>bean.runAsNever();<NEW_LINE>throw new Exception("Should not be able to invoke TX_NEVER method when there is a transaction on the thread");<NEW_LINE>} catch (EJBException x) {<NEW_LINE>if (x.getMessage() == null && !x.getMessage().contains("TX_NEVER"))<NEW_LINE>throw x;<NEW_LINE>} finally {<NEW_LINE>tran.commit();<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>try {<NEW_LINE>future.get(TIMEOUT, TimeUnit.MILLISECONDS);<NEW_LINE>} finally {<NEW_LINE>future.cancel(true);<NEW_LINE>}<NEW_LINE>}
InitialContext().lookup("java:global/concurrent/ConcurrentCMTBean!ejb.ConcurrentCMT");
598,963
protected void completeEditing(boolean messageStop, boolean messageCancel, boolean messageTree) {<NEW_LINE>if (stopEditingInCompleteEditing && editingComponent != null) {<NEW_LINE>Component oldComponent = editingComponent;<NEW_LINE>TreePath oldPath = editingPath;<NEW_LINE>TreeCellEditor oldEditor = cellEditor;<NEW_LINE><MASK><NEW_LINE>Rectangle editingBounds = getPathBounds(tree, editingPath);<NEW_LINE>boolean requestFocus = (tree != null && (tree.hasFocus() || SwingUtilities.findFocusOwner(editingComponent) != null));<NEW_LINE>editingComponent = null;<NEW_LINE>editingPath = null;<NEW_LINE>if (messageStop)<NEW_LINE>oldEditor.stopCellEditing();<NEW_LINE>else if (messageCancel)<NEW_LINE>oldEditor.cancelCellEditing();<NEW_LINE>tree.remove(oldComponent);<NEW_LINE>if (editorHasDifferentSize) {<NEW_LINE>treeState.invalidatePathBounds(oldPath);<NEW_LINE>updateSize();<NEW_LINE>} else if (editingBounds != null) {<NEW_LINE>editingBounds.x = 0;<NEW_LINE>editingBounds.width = tree.getSize().width;<NEW_LINE>tree.repaint(editingBounds);<NEW_LINE>}<NEW_LINE>if (requestFocus)<NEW_LINE>tree.requestFocus();<NEW_LINE>if (messageTree)<NEW_LINE>treeModel.valueForPathChanged(oldPath, newValue);<NEW_LINE>}<NEW_LINE>}
Object newValue = oldEditor.getCellEditorValue();
1,732,388
private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String ruleName, 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 (ruleName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String apiVersion = "2018-03-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, ruleName, apiVersion, accept, context);<NEW_LINE>}
error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
1,072,787
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setTitle(R.string.stats);<NEW_LINE>displayBackAction();<NEW_LINE>setContentView(R.layout.activity_stats);<NEW_LINE>mTable = findViewById(R.id.table);<NEW_LINE>mBytesSent = findViewById(R.id.bytes_sent);<NEW_LINE>mBytesRcvd = findViewById(R.id.bytes_rcvd);<NEW_LINE>mPacketsSent = findViewById(R.id.packets_sent);<NEW_LINE>mPacketsRcvd = findViewById(R.id.packets_rcvd);<NEW_LINE>mActiveConns = findViewById(R.id.active_connections);<NEW_LINE>mDroppedConns = findViewById(R.id.dropped_connections);<NEW_LINE>mDroppedPkts = findViewById(R.id.pkts_dropped);<NEW_LINE>mTotConns = findViewById(R.id.tot_connections);<NEW_LINE>mMaxFd = findViewById(R.id.max_fd);<NEW_LINE>mOpenSocks = findViewById(R.id.open_sockets);<NEW_LINE>mDnsQueries = findViewById(R.id.dns_queries);<NEW_LINE>mDnsServer = findViewById(R.id.dns_server);<NEW_LINE>mAllocStats = findViewById(R.id.alloc_stats);<NEW_LINE>if (CaptureService.isCapturingAsRoot()) {<NEW_LINE>findViewById(R.id.open_sockets_row).setVisibility(View.GONE);<NEW_LINE>findViewById(R.id.max_fd_row).setVisibility(View.GONE);<NEW_LINE>findViewById(R.id.row_dropped_connections).setVisibility(View.GONE);<NEW_LINE>} else<NEW_LINE>findViewById(R.id.row_pkts_dropped<MASK><NEW_LINE>mReceiver = new BroadcastReceiver() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onReceive(Context context, Intent intent) {<NEW_LINE>updateVPNStats(intent);<NEW_LINE>}<NEW_LINE>};
).setVisibility(View.GONE);
1,235,829
public void run(WorkingCopy parameter) throws Exception {<NEW_LINE>parameter.toPhase(JavaSource.Phase.RESOLVED);<NEW_LINE>TypeElement classElement = parameter.getElements().getTypeElement(packageNameWithDot + ejbClassName);<NEW_LINE>ClassTree classTree = parameter.getTrees().getTree(classElement);<NEW_LINE>ModifiersTree modifiers = classTree.getModifiers();<NEW_LINE>TypeElement el = parameter.getElements().getTypeElement(JndiResourcesDefinition.ANN_JMS_DESTINATION);<NEW_LINE>TreeMaker tm = parameter.getTreeMaker();<NEW_LINE>List<ExpressionTree> values = new ArrayList<ExpressionTree>(2);<NEW_LINE>// NOI18N<NEW_LINE>ExpressionTree nameQualIdent = tm.QualIdent("name");<NEW_LINE>values.add(tm.Assignment(nameQualIdent, tm.Literal(def.getName())));<NEW_LINE>// NOI18N<NEW_LINE>ExpressionTree classnameQualIdent = tm.QualIdent("interfaceName");<NEW_LINE>values.add(tm.Assignment(classnameQualIdent, tm.Literal(getInterfaceName(def))));<NEW_LINE>// NOI18N<NEW_LINE>ExpressionTree resourceAdapterQualIdent = tm.QualIdent("resourceAdapter");<NEW_LINE>// NOI18N<NEW_LINE>values.add(tm.Assignment(resourceAdapterQualIdent, tm.Literal("jmsra")));<NEW_LINE>// NOI18N<NEW_LINE>ExpressionTree destinationNameQualIdent = tm.QualIdent("destinationName");<NEW_LINE>// NOI18N<NEW_LINE>values.add(tm.Assignment(destinationNameQualIdent, tm.Literal(getPhysicalName(def.getName()))));<NEW_LINE>List<AnnotationTree> annotations = new ArrayList<AnnotationTree>(modifiers.getAnnotations());<NEW_LINE>annotations.add(0, tm.Annotation(tm.QualIdent(el), values));<NEW_LINE>ModifiersTree nueMods = <MASK><NEW_LINE>parameter.rewrite(modifiers, nueMods);<NEW_LINE>}
tm.Modifiers(modifiers, annotations);
1,695,809
protected void configure() {<NEW_LINE>bind(ActionFilters.class).toInstance(actionFilters);<NEW_LINE>bind(DestructiveOperations.class).toInstance(destructiveOperations);<NEW_LINE>bind(TransportPutMappingAction.RequestValidators.class).toInstance(mappingRequestValidators);<NEW_LINE>if (false == transportClient) {<NEW_LINE>// Supporting classes only used when not a transport client<NEW_LINE>bind(AutoCreateIndex.class).toInstance(autoCreateIndex);<NEW_LINE>bind(TransportLivenessAction.class).asEagerSingleton();<NEW_LINE>// register GenericAction -> transportAction Map used by NodeClient<NEW_LINE>@SuppressWarnings("rawtypes")<NEW_LINE>MapBinder<GenericAction, TransportAction> transportActionsBinder = MapBinder.newMapBinder(binder(), GenericAction.class, TransportAction.class);<NEW_LINE>for (ActionHandler<?, ?> action : actions.values()) {<NEW_LINE>// bind the action as eager singleton, so the map binder one will reuse it<NEW_LINE>bind(action.<MASK><NEW_LINE>transportActionsBinder.addBinding(action.getAction()).to(action.getTransportAction()).asEagerSingleton();<NEW_LINE>for (Class<?> supportAction : action.getSupportTransportActions()) {<NEW_LINE>bind(supportAction).asEagerSingleton();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getTransportAction()).asEagerSingleton();
1,637,899
public void process() {<NEW_LINE>EjbBundleDescriptorImpl bundle = ctx.getModuleMetaData(EjbBundleDescriptorImpl.class);<NEW_LINE>ResourceReferenceDescriptor cmpResource = bundle.getCMPResourceReference();<NEW_LINE>// If this bundle's beans are not created by Java2DB, there is nothing to do.<NEW_LINE>if (!DeploymentHelper.isJavaToDatabase(cmpResource.getSchemaGeneratorProperties())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>helper = new Java2DBProcessorHelper(ctx);<NEW_LINE>helper.init();<NEW_LINE>String resourceName = cmpResource.getJndiName();<NEW_LINE>// NOI18N<NEW_LINE>helper.setProcessorType("CMP", bundle.getName());<NEW_LINE>helper.setJndiName(resourceName, bundle.getName());<NEW_LINE>// If CLI options are not set, use value from the create-tables-at-deploy<NEW_LINE>// or drop-tables-at-undeploy elements of the sun-ejb-jar.xml<NEW_LINE><MASK><NEW_LINE>boolean createTables = helper.getCreateTables(userCreateTables);<NEW_LINE>boolean userDropTables = cmpResource.isDropTablesAtUndeploy();<NEW_LINE>if (logger.isLoggable(logger.FINE)) {<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>logger.// NOI18N<NEW_LINE>fine("ejb.CMPProcessor.createanddroptables", new Object[] { createTables, userDropTables });<NEW_LINE>}<NEW_LINE>if (!createTables && !userDropTables) {<NEW_LINE>// Nothing to do.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>helper.setCreateTablesValue(userCreateTables, bundle.getName());<NEW_LINE>helper.setDropTablesValue(userDropTables, bundle.getName());<NEW_LINE>constructJdbcFileNames(bundle);<NEW_LINE>if (logger.isLoggable(logger.FINE)) {<NEW_LINE>logger.fine("ejb.CMPProcessor.createanddropfilenames", helper.getCreateJdbcFileName(bundle.getName()), helper.getDropJdbcFileName(bundle.getName()));<NEW_LINE>}<NEW_LINE>if (createTables) {<NEW_LINE>// NOI18N<NEW_LINE>helper.createOrDropTablesInDB(true, "CMP");<NEW_LINE>}<NEW_LINE>}
boolean userCreateTables = cmpResource.isCreateTablesAtDeploy();
219,021
public void searchPerson(final LdapQuery query, final LdapListener caller, LdapSearchSettings searchSettings) {<NEW_LINE>if (query == null)<NEW_LINE>throw new NullPointerException("query shouldn't be null!");<NEW_LINE>if (caller == null)<NEW_LINE>throw new NullPointerException("caller shouldn't be null!");<NEW_LINE>if (searchSettings == null)<NEW_LINE>searchSettings = new LdapSearchSettingsImpl();<NEW_LINE>// if the initial query string was "john d",<NEW_LINE>// the intermediate query strings could be:<NEW_LINE>// "*john d*" and "d*john"<NEW_LINE>final String[] intermediateQueryStrings = buildIntermediateQueryStrings(query.toString());<NEW_LINE>// the servers list contains this directory as many times as<NEW_LINE>// the number of intermediate query strings<NEW_LINE>List<LdapDirectory> serversList <MASK><NEW_LINE>// for(String queryString : intermediateQueryStrings)<NEW_LINE>for (int i = 0; i < intermediateQueryStrings.length; i++) serversList.add(this);<NEW_LINE>// when the pendingSearches element will be empty,<NEW_LINE>// all intermediate query strings will have been searched<NEW_LINE>// and the search will be finished<NEW_LINE>this.pendingSearches.put(query, new LdapPendingSearch(serversList, caller));<NEW_LINE>// really performs the search<NEW_LINE>for (String queryString : intermediateQueryStrings) this.performSearch(query, queryString, searchSettings, this);<NEW_LINE>}
= new ArrayList<LdapDirectory>();