idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
583,390
public void onRequestFinish(MegaApiJava api, MegaRequest request, MegaError error) {<NEW_LINE>logDebug("onRequestFinish");<NEW_LINE>if (request.getType() == MegaRequest.TYPE_LOGIN) {<NEW_LINE>if (error.getErrorCode() != MegaError.API_OK) {<NEW_LINE>logWarning("Login failed with error code: " + error.getErrorCode());<NEW_LINE>MegaApplication.setLoggingIn(false);<NEW_LINE>} else {<NEW_LINE>loginProgressBar.setVisibility(View.VISIBLE);<NEW_LINE>loginFetchNodesProgressBar.setVisibility(View.GONE);<NEW_LINE>loggingInText.setVisibility(View.VISIBLE);<NEW_LINE>fetchingNodesText.setVisibility(View.VISIBLE);<NEW_LINE>prepareNodesText.setVisibility(View.GONE);<NEW_LINE>gSession = megaApi.dumpSession();<NEW_LINE>credentials = new UserCredentials(lastEmail, gSession, "", "", "");<NEW_LINE>dbH.saveCredentials(credentials);<NEW_LINE>logDebug("Logged in with session");<NEW_LINE>logDebug("Setting account auth token for folder links.");<NEW_LINE>megaApiFolder.setAccountAuth(megaApi.getAccountAuth());<NEW_LINE>megaApi.fetchNodes(this);<NEW_LINE>// Get cookies settings after login.<NEW_LINE>MegaApplication.getInstance().checkEnabledCookies();<NEW_LINE>}<NEW_LINE>} else if (request.getType() == MegaRequest.TYPE_FETCH_NODES) {<NEW_LINE>if (error.getErrorCode() == MegaError.API_OK) {<NEW_LINE>DatabaseHandler dbH = DatabaseHandler.getDbHandler(getApplicationContext());<NEW_LINE>gSession = megaApi.dumpSession();<NEW_LINE>MegaUser myUser = megaApi.getMyUser();<NEW_LINE>String myUserHandle = "";<NEW_LINE>if (myUser != null) {<NEW_LINE>lastEmail = megaApi.getMyUser().getEmail();<NEW_LINE>myUserHandle = megaApi.getMyUser().getHandle() + "";<NEW_LINE>}<NEW_LINE>credentials = new UserCredentials(lastEmail, <MASK><NEW_LINE>dbH.saveCredentials(credentials);<NEW_LINE>loginLoggingIn.setVisibility(View.GONE);<NEW_LINE>MegaApplication.setLoggingIn(false);<NEW_LINE>afterLoginAndFetch();<NEW_LINE>}<NEW_LINE>} else if (request.getType() == MegaRequest.TYPE_COPY) {<NEW_LINE>filesChecked++;<NEW_LINE>if (error.getErrorCode() == MegaError.API_OK) {<NEW_LINE>MegaNode node = megaApi.getNodeByHandle(request.getNodeHandle());<NEW_LINE>if (node != null) {<NEW_LINE>attachNodes.add(node);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>logWarning("Error copying node into My Chat Files");<NEW_LINE>}<NEW_LINE>if (filesChecked == filePreparedInfos.size()) {<NEW_LINE>startChatUploadService();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
gSession, "", "", myUserHandle);
1,543,020
protected List<Element> expandDurationHM(Document doc, String s) {<NEW_LINE>ArrayList<Element> exp = new ArrayList<Element>();<NEW_LINE>Matcher reMatcher = reHourMinute.matcher(s);<NEW_LINE>reMatcher.find();<NEW_LINE>String hour = reMatcher.group(1);<NEW_LINE>String minute = reMatcher.group(2);<NEW_LINE>if (hour.equals("01") || hour.equals("1")) {<NEW_LINE>exp.addAll(makeNewTokens(doc, "eine Stunde"));<NEW_LINE>} else {<NEW_LINE>exp.addAll(number.expandInteger(doc, hour, false));<NEW_LINE>exp.addAll(makeNewTokens(doc, "Stunden"));<NEW_LINE>}<NEW_LINE>if (!minute.equals("00")) {<NEW_LINE>exp.addAll(makeNewTokens(doc, "und"));<NEW_LINE>if (minute.equals("01")) {<NEW_LINE>exp.addAll(makeNewTokens(doc, "eine Minute"));<NEW_LINE>} else {<NEW_LINE>exp.addAll(number.expandInteger<MASK><NEW_LINE>exp.addAll(makeNewTokens(doc, "Minuten"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return exp;<NEW_LINE>}
(doc, minute, false));
606,451
public static ListRepositoryBranchesResponse unmarshall(ListRepositoryBranchesResponse listRepositoryBranchesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listRepositoryBranchesResponse.setRequestId(_ctx.stringValue("ListRepositoryBranchesResponse.RequestId"));<NEW_LINE>listRepositoryBranchesResponse.setErrorCode(_ctx.stringValue("ListRepositoryBranchesResponse.ErrorCode"));<NEW_LINE>listRepositoryBranchesResponse.setSuccess(_ctx.booleanValue("ListRepositoryBranchesResponse.Success"));<NEW_LINE>listRepositoryBranchesResponse.setErrorMessage(_ctx.stringValue("ListRepositoryBranchesResponse.ErrorMessage"));<NEW_LINE>listRepositoryBranchesResponse.setTotal(_ctx.longValue("ListRepositoryBranchesResponse.Total"));<NEW_LINE>List<ResultItem> result = new ArrayList<ResultItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListRepositoryBranchesResponse.Result.Length"); i++) {<NEW_LINE>ResultItem resultItem = new ResultItem();<NEW_LINE>resultItem.setBranchName(_ctx.stringValue("ListRepositoryBranchesResponse.Result[" + i + "].BranchName"));<NEW_LINE>resultItem.setProtectedBranch(_ctx.booleanValue<MASK><NEW_LINE>CommitInfo commitInfo = new CommitInfo();<NEW_LINE>commitInfo.setId(_ctx.stringValue("ListRepositoryBranchesResponse.Result[" + i + "].CommitInfo.Id"));<NEW_LINE>commitInfo.setShortId(_ctx.stringValue("ListRepositoryBranchesResponse.Result[" + i + "].CommitInfo.ShortId"));<NEW_LINE>commitInfo.setTitle(_ctx.stringValue("ListRepositoryBranchesResponse.Result[" + i + "].CommitInfo.Title"));<NEW_LINE>commitInfo.setAuthorName(_ctx.stringValue("ListRepositoryBranchesResponse.Result[" + i + "].CommitInfo.AuthorName"));<NEW_LINE>commitInfo.setAuthorEmail(_ctx.stringValue("ListRepositoryBranchesResponse.Result[" + i + "].CommitInfo.AuthorEmail"));<NEW_LINE>commitInfo.setCreatedAt(_ctx.stringValue("ListRepositoryBranchesResponse.Result[" + i + "].CommitInfo.CreatedAt"));<NEW_LINE>commitInfo.setMessage(_ctx.stringValue("ListRepositoryBranchesResponse.Result[" + i + "].CommitInfo.Message"));<NEW_LINE>commitInfo.setAuthorDate(_ctx.stringValue("ListRepositoryBranchesResponse.Result[" + i + "].CommitInfo.AuthorDate"));<NEW_LINE>commitInfo.setCommittedDate(_ctx.stringValue("ListRepositoryBranchesResponse.Result[" + i + "].CommitInfo.CommittedDate"));<NEW_LINE>commitInfo.setCommitterEmail(_ctx.stringValue("ListRepositoryBranchesResponse.Result[" + i + "].CommitInfo.CommitterEmail"));<NEW_LINE>commitInfo.setCommitterName(_ctx.stringValue("ListRepositoryBranchesResponse.Result[" + i + "].CommitInfo.CommitterName"));<NEW_LINE>List<String> parentIds = new ArrayList<String>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("ListRepositoryBranchesResponse.Result[" + i + "].CommitInfo.ParentIds.Length"); j++) {<NEW_LINE>parentIds.add(_ctx.stringValue("ListRepositoryBranchesResponse.Result[" + i + "].CommitInfo.ParentIds[" + j + "]"));<NEW_LINE>}<NEW_LINE>commitInfo.setParentIds(parentIds);<NEW_LINE>resultItem.setCommitInfo(commitInfo);<NEW_LINE>result.add(resultItem);<NEW_LINE>}<NEW_LINE>listRepositoryBranchesResponse.setResult(result);<NEW_LINE>return listRepositoryBranchesResponse;<NEW_LINE>}
("ListRepositoryBranchesResponse.Result[" + i + "].ProtectedBranch"));
701,740
public void visitBinary(JCBinary tree) {<NEW_LINE>int ownprec = TreeInfo.opPrec(tree.getTag());<NEW_LINE>Name opname = operators.<MASK><NEW_LINE>int col = out.col;<NEW_LINE>printExpr(tree.lhs, ownprec);<NEW_LINE>if (cs.spaceAroundBinaryOps())<NEW_LINE>print(' ');<NEW_LINE>print(opname);<NEW_LINE>boolean needsSpace = cs.spaceAroundBinaryOps() || (tree.getTag() == JCTree.Tag.PLUS && (tree.rhs.getTag() == JCTree.Tag.POS || tree.rhs.getTag() == JCTree.Tag.PREINC)) || (tree.getTag() == JCTree.Tag.MINUS && (tree.rhs.getTag() == JCTree.Tag.NEG || tree.rhs.getTag() == JCTree.Tag.PREDEC));<NEW_LINE>int rm = cs.getRightMargin();<NEW_LINE>switch(cs.wrapBinaryOps()) {<NEW_LINE>case WRAP_IF_LONG:<NEW_LINE>if (widthEstimator.estimateWidth(tree.rhs, rm - out.col) + out.col <= cs.getRightMargin()) {<NEW_LINE>if (needsSpace)<NEW_LINE>print(' ');<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case WRAP_ALWAYS:<NEW_LINE>newline();<NEW_LINE>toColExactly(cs.alignMultilineBinaryOp() ? col : out.leftMargin + cs.getContinuationIndentSize());<NEW_LINE>break;<NEW_LINE>case WRAP_NEVER:<NEW_LINE>if (needsSpace)<NEW_LINE>print(' ');<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>printExpr(tree.rhs, ownprec + 1);<NEW_LINE>}
operatorName(tree.getTag());
1,488,972
private void addDestroyChildNodesCommand(ICompositeCommand cmd) {<NEW_LINE>View view = (View) getHost().getModel();<NEW_LINE>for (Iterator nit = view.getChildren().iterator(); nit.hasNext(); ) {<NEW_LINE>Node node = <MASK><NEW_LINE>switch(OpenDDSDcpsLibVisualIDRegistry.getVisualID(node)) {<NEW_LINE>case DeadlineQosPolicyPeriod2EditPart.VISUAL_ID:<NEW_LINE>for (Iterator cit = node.getChildren().iterator(); cit.hasNext(); ) {<NEW_LINE>Node cnode = (Node) cit.next();<NEW_LINE>// For the OpenDDS Modeling SDK, elements behind compartment children may not necessarily be in the same<NEW_LINE>// library as the element behind the compartment's parent (e.g. a DataReader's shared policies).<NEW_LINE>// In this case avoid destroying the child.<NEW_LINE>if (!OpenDDSLibHelper.areElementsInSameLib(view.getElement(), cnode.getElement())) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>switch(OpenDDSDcpsLibVisualIDRegistry.getVisualID(cnode)) {<NEW_LINE>case PeriodEditPart.VISUAL_ID:<NEW_LINE>cmd.add(new // directlyOwned: true<NEW_LINE>DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false)));<NEW_LINE>// don't need explicit deletion of cnode as parent's view deletion would clean child views as well<NEW_LINE>// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(Node) nit.next();
1,846,701
public static void validateTransition(IndexMetadata idxMeta, Step.StepKey currentStepKey, Step.StepKey newStepKey, PolicyStepsRegistry stepRegistry) {<NEW_LINE>String indexName = idxMeta.getIndex().getName();<NEW_LINE>String policyName = idxMeta.getLifecyclePolicyName();<NEW_LINE>// policy could be updated in-between execution<NEW_LINE>if (Strings.isNullOrEmpty(policyName)) {<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>LifecycleExecutionState lifecycleState = idxMeta.getLifecycleExecutionState();<NEW_LINE>Step.StepKey realKey = Step.getCurrentStepKey(lifecycleState);<NEW_LINE>if (currentStepKey != null && currentStepKey.equals(realKey) == false) {<NEW_LINE>throw new IllegalArgumentException("index [" + indexName + "] is not on current step [" + currentStepKey + "], currently: [" + realKey + "]");<NEW_LINE>}<NEW_LINE>final Set<Step.StepKey> cachedStepKeys = stepRegistry.parseStepKeysFromPhase(lifecycleState.phaseDefinition(), lifecycleState.phase());<NEW_LINE>boolean isNewStepCached = cachedStepKeys != null && cachedStepKeys.contains(newStepKey);<NEW_LINE>// Always allow moving to the terminal step or to a step that's present in the cached phase, even if it doesn't exist in the policy<NEW_LINE>if (isNewStepCached == false && (stepRegistry.stepExists(policyName, newStepKey) == false && newStepKey.equals(TerminalPolicyStep.KEY) == false)) {<NEW_LINE>throw new IllegalArgumentException("step [" + newStepKey + "] for index [" + indexName + "] with policy [" + policyName + "] does not exist");<NEW_LINE>}<NEW_LINE>}
IllegalArgumentException("index [" + indexName + "] is not associated with an Index Lifecycle Policy");
1,005,246
protected ClassVisitor createClassVisitor() {<NEW_LINE>return new ClassWriter(ClassWriter.COMPUTE_MAXS | ClassWriter.COMPUTE_FRAMES) {<NEW_LINE><NEW_LINE>private ClassNode getClassNode(String name) {<NEW_LINE>// try classes under compilation<NEW_LINE>CompileUnit cu = getAST();<NEW_LINE>ClassNode cn = cu.getClass(name);<NEW_LINE>if (cn != null)<NEW_LINE>return cn;<NEW_LINE>// try inner classes<NEW_LINE>cn = cu.getGeneratedInnerClass(name);<NEW_LINE>if (cn != null)<NEW_LINE>return cn;<NEW_LINE>// GRECLIPSE add -- try JDT model<NEW_LINE>cn = getResolveVisitor().resolve(name);<NEW_LINE>if (cn != null)<NEW_LINE>return cn;<NEW_LINE>// GRECLIPSE end<NEW_LINE>ClassNodeResolver.LookupResult lookupResult = getClassNodeResolver().resolveName(name, CompilationUnit.this);<NEW_LINE>return lookupResult == null ? null : lookupResult.getClassNode();<NEW_LINE>}<NEW_LINE><NEW_LINE>private ClassNode getCommonSuperClassNode(ClassNode c, ClassNode d) {<NEW_LINE>// adapted from ClassWriter code<NEW_LINE>if (c.isDerivedFrom(d))<NEW_LINE>return d;<NEW_LINE>if (d.isDerivedFrom(c))<NEW_LINE>return c;<NEW_LINE>if (c.isInterface() || d.isInterface())<NEW_LINE>return ClassHelper.OBJECT_TYPE;<NEW_LINE>do {<NEW_LINE>c = c.getSuperClass();<NEW_LINE>} while (c != null && !d.isDerivedFrom(c));<NEW_LINE>if (c == null)<NEW_LINE>return ClassHelper.OBJECT_TYPE;<NEW_LINE>return c;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected String getCommonSuperClass(String arg1, String arg2) {<NEW_LINE>ClassNode a = getClassNode(arg1.replace('/', '.'));<NEW_LINE>ClassNode b = getClassNode(arg2.replace('/', '.'));<NEW_LINE>return getCommonSuperClassNode(a, b).getName(<MASK><NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
).replace('.', '/');
1,786,526
public List<BlockNode> prepareBlocks() {<NEW_LINE>removeEmptyBlocks();<NEW_LINE>List<BlockNode> blocksList = getSortedBlocks();<NEW_LINE>blocksList.removeIf(b -> b.equals(mth.getEnterBlock()) || b.equals(mth.getExitBlock()));<NEW_LINE>unbindExceptionHandlers();<NEW_LINE>if (blocksList.isEmpty()) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>@Nullable<NEW_LINE>BlockNode prev = null;<NEW_LINE>int blocksCount = blocksList.size();<NEW_LINE>for (int i = 0; i < blocksCount; i++) {<NEW_LINE>BlockNode block = blocksList.get(i);<NEW_LINE>BlockNode nextBlock = i + 1 == blocksCount ? null : blocksList.get(i + 1);<NEW_LINE>List<BlockNode> preds = block.getPredecessors();<NEW_LINE><MASK><NEW_LINE>if (predsCount > 1) {<NEW_LINE>startLabel.set(block.getId());<NEW_LINE>} else if (predsCount == 1 && prev != null) {<NEW_LINE>if (!prev.equals(preds.get(0))) {<NEW_LINE>startLabel.set(block.getId());<NEW_LINE>if (prev.getSuccessors().size() == 1 && !mth.isPreExitBlocks(prev)) {<NEW_LINE>endGoto.set(prev.getId());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>InsnNode lastInsn = BlockUtils.getLastInsn(block);<NEW_LINE>if (lastInsn instanceof TargetInsnNode) {<NEW_LINE>processTargetInsn(block, lastInsn, nextBlock);<NEW_LINE>}<NEW_LINE>if (block.contains(AType.EXC_HANDLER)) {<NEW_LINE>startLabel.set(block.getId());<NEW_LINE>}<NEW_LINE>if (nextBlock == null && !mth.isPreExitBlocks(block)) {<NEW_LINE>endGoto.set(block.getId());<NEW_LINE>}<NEW_LINE>prev = block;<NEW_LINE>}<NEW_LINE>if (mth.isVoidReturn()) {<NEW_LINE>int last = blocksList.size() - 1;<NEW_LINE>if (blocksList.get(last).contains(AFlag.RETURN)) {<NEW_LINE>// remove trailing return<NEW_LINE>blocksList.remove(last);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return blocksList;<NEW_LINE>}
int predsCount = preds.size();
522,440
public void onChildAdded(DataSnapshot _param1, String _param2) {<NEW_LINE>GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {<NEW_LINE>};<NEW_LINE>final String _childKey = _param1.getKey();<NEW_LINE>final HashMap<String, Object> _childValue = _param1.getValue(_ind);<NEW_LINE>try {<NEW_LINE>Regular_Cloned.addListenerForSingleValueEvent(new ValueEventListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onDataChange(DataSnapshot _dataSnapshot) {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>GenericTypeIndicator<HashMap<String, Object>> _ind = new GenericTypeIndicator<HashMap<String, Object>>() {<NEW_LINE>};<NEW_LINE>for (DataSnapshot _data : _dataSnapshot.getChildren()) {<NEW_LINE>HashMap<String, Object> _map = _data.getValue(_ind);<NEW_LINE>listdata.add(_map);<NEW_LINE>}<NEW_LINE>} catch (Exception _e) {<NEW_LINE>_e.printStackTrace();<NEW_LINE>}<NEW_LINE>sub_5.setText(_childKey.replace("-", ".").replace("Spotify v", " ").replace("(Armeabi.v7a)", " ").replace("(Arm64.v8a)", " "));<NEW_LINE>VERSIONS.edit().putString("REGULAR_CLONED", _childKey.replace("-", ".").replace("Spotify v", " ").replace("(Armeabi.v7a)", "").replace("(Arm64.v8a)", "")).commit();<NEW_LINE>list_menu_1.setAdapter(new List_menu_1Adapter(listdata));<NEW_LINE>((BaseAdapter) list_menu_1.getAdapter()).notifyDataSetChanged();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onCancelled(DatabaseError _databaseError) {<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (Exception e) {<NEW_LINE>SketchwareUtil.showMessage(getApplicationContext(), "Failed to Fetch API");<NEW_LINE>}<NEW_LINE>}
listdata = new ArrayList<>();
1,819,892
private void sendTextMessage(RoomMediaMessage sharedDataItem) {<NEW_LINE>final CharSequence sequence = sharedDataItem.getText();<NEW_LINE>String htmlText = sharedDataItem.getHtmlText();<NEW_LINE>// content only text -> insert it in the room editor<NEW_LINE>// to let the user decides to send the message<NEW_LINE>if (!TextUtils.isEmpty(sequence) && (null == htmlText)) {<NEW_LINE>new Handler(Looper.getMainLooper()).post(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>mVectorRoomActivity.insertTextInTextEditor(sequence.toString());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>String text = null;<NEW_LINE>if (null == sequence) {<NEW_LINE>if (null != htmlText) {<NEW_LINE>text = Html.fromHtml(htmlText).toString();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>text = sequence.toString();<NEW_LINE>}<NEW_LINE>Log.d(LOG_TAG, "sendTextMessage " + text);<NEW_LINE>final String fText = text;<NEW_LINE>final String fHtmlText = htmlText;<NEW_LINE>mVectorRoomActivity.runOnUiThread(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>mVectorRoomActivity.sendMessage(fText, <MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>// manage others<NEW_LINE>if (mSharedDataItems.size() > 0) {<NEW_LINE>mSharedDataItems.remove(0);<NEW_LINE>}<NEW_LINE>sendMedias();<NEW_LINE>}
fHtmlText, Message.FORMAT_MATRIX_HTML, false);
1,148,537
private Document layerDocument(Element... originatingElements) {<NEW_LINE>Filer filer = processingEnv.getFiler();<NEW_LINE>Collection<Element> originatingElementsL = originatingElementsByProcessor.get(filer);<NEW_LINE>if (originatingElementsL == null) {<NEW_LINE>originatingElementsL = new WeakSet<Element>();<NEW_LINE>originatingElementsByProcessor.put(filer, originatingElementsL);<NEW_LINE>}<NEW_LINE>originatingElementsL.addAll(Arrays.asList(originatingElements));<NEW_LINE>Document doc = generatedLayerByProcessor.get(filer);<NEW_LINE>if (doc == null) {<NEW_LINE>try {<NEW_LINE>FileObject layer = filer.getResource(StandardLocation.CLASS_OUTPUT, "", GENERATED_LAYER);<NEW_LINE>InputStream is = layer.openInputStream();<NEW_LINE>try {<NEW_LINE>doc = XMLUtil.parse(new InputSource(is), true, true, ERROR_HANDLER, ENTITY_RESOLVER);<NEW_LINE>} finally {<NEW_LINE>is.close();<NEW_LINE>}<NEW_LINE>} catch (FileNotFoundException | NoSuchFileException fnfe) {<NEW_LINE>// Fine, not yet created.<NEW_LINE>} catch (IOException x) {<NEW_LINE>processingEnv.getMessager().printMessage(Kind.ERROR, "Failed to read generated-layer.xml: " + x.toString());<NEW_LINE>} catch (SAXException x) {<NEW_LINE>processingEnv.getMessager().printMessage(Kind.ERROR, "Failed to parse generated-layer.xml: " + x.toString());<NEW_LINE>}<NEW_LINE>if (doc == null) {<NEW_LINE>doc = XMLUtil.createDocument(<MASK><NEW_LINE>}<NEW_LINE>generatedLayerByProcessor.put(filer, doc);<NEW_LINE>}<NEW_LINE>return doc;<NEW_LINE>}
"filesystem", null, PUBLIC_DTD_ID, NETWORK_DTD_URL);
1,018,500
protected List<? extends JComponent> createPreviewElements() {<NEW_LINE>final JToggleButton basic = new JToggleButton("", true);<NEW_LINE>basic.putClientProperty(StyleId.STYLE_PROPERTY, getStyleId());<NEW_LINE>UILanguageManager.registerComponent(basic, getExampleLanguageKey("styled.text.basic"));<NEW_LINE>final JToggleButton group1 = new JToggleButton("", true);<NEW_LINE>group1.putClientProperty(StyleId.STYLE_PROPERTY, getStyleId());<NEW_LINE>UILanguageManager.registerComponent(group1, getExampleLanguageKey("styled.text.group1"));<NEW_LINE>final JToggleButton group2 = new JToggleButton();<NEW_LINE>group2.putClientProperty(StyleId.STYLE_PROPERTY, getStyleId());<NEW_LINE>UILanguageManager.registerComponent(group2, getExampleLanguageKey("styled.text.group2"));<NEW_LINE>final JToggleButton group3 = new JToggleButton();<NEW_LINE>group3.putClientProperty(StyleId.STYLE_PROPERTY, getStyleId());<NEW_LINE>UILanguageManager.registerComponent(group3, getExampleLanguageKey("styled.text.group3"));<NEW_LINE>final JToggleButton icon = new JToggleButton(WebLookAndFeel.getIcon(16));<NEW_LINE>icon.putClientProperty(<MASK><NEW_LINE>UILanguageManager.registerComponent(icon, getExampleLanguageKey("styled.text.icon"));<NEW_LINE>return CollectionUtils.asList(basic, new GroupPane(group1, group2, group3), icon);<NEW_LINE>}
StyleId.STYLE_PROPERTY, getStyleId());
665,751
private Problem extract(String problem) {<NEW_LINE>java.util.regex.Matcher matcher = CAUSE_PATTERN.matcher(problem);<NEW_LINE>String description;<NEW_LINE>List<String> causes = new ArrayList<>();<NEW_LINE>if (!matcher.find()) {<NEW_LINE>description = TextUtil.normaliseLineSeparators(problem.trim());<NEW_LINE>} else {<NEW_LINE>description = TextUtil.normaliseLineSeparators(problem.substring(0, matcher.start()).trim());<NEW_LINE>while (true) {<NEW_LINE>int pos = matcher.end();<NEW_LINE>int prefix = matcher.group(1).length();<NEW_LINE>String prefixPattern = toPrefixPattern(prefix);<NEW_LINE>if (matcher.find(pos)) {<NEW_LINE>String cause = TextUtil.normaliseLineSeparators(problem.substring(pos, matcher.start()).trim().replaceAll(prefixPattern, ""));<NEW_LINE>causes.add(cause);<NEW_LINE>} else {<NEW_LINE>String cause = TextUtil.normaliseLineSeparators(problem.substring(pos).trim().replaceAll(prefixPattern, ""));<NEW_LINE>causes.add(cause);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}
return new Problem(description, causes);
688,355
public List<StandardServiceInitiator> initialInitiatorList() {<NEW_LINE>// Note to maintainers: always remember to check for consistency needs with both:<NEW_LINE>// io.quarkus.hibernate.orm.runtime.boot.registry.PreconfiguredServiceRegistryBuilder#buildQuarkusServiceInitiatorList(RecordedState)<NEW_LINE>// and ReactiveHibernateInitiatorListProvider<NEW_LINE>final ArrayList<StandardServiceInitiator> serviceInitiators = new ArrayList<StandardServiceInitiator>();<NEW_LINE>// This one needs to be replaced after Metadata has been recorded:<NEW_LINE>serviceInitiators.add(BootstrapOnlyProxyFactoryFactoryInitiator.INSTANCE);<NEW_LINE>serviceInitiators.add(CfgXmlAccessServiceInitiator.INSTANCE);<NEW_LINE>serviceInitiators.add(ConfigurationServiceInitiator.INSTANCE);<NEW_LINE>serviceInitiators.add(PropertyAccessStrategyResolverInitiator.INSTANCE);<NEW_LINE>// Custom one!<NEW_LINE>serviceInitiators.add(QuarkusImportSqlCommandExtractorInitiator.INSTANCE);<NEW_LINE>serviceInitiators.add(SchemaManagementToolInitiator.INSTANCE);<NEW_LINE>serviceInitiators.add(JdbcEnvironmentInitiator.INSTANCE);<NEW_LINE>// Custom one!<NEW_LINE>serviceInitiators.add(QuarkusJndiServiceInitiator.INSTANCE);<NEW_LINE>// Custom one!<NEW_LINE>serviceInitiators.add(DisabledJMXInitiator.INSTANCE);<NEW_LINE>serviceInitiators.add(PersisterClassResolverInitiator.INSTANCE);<NEW_LINE>serviceInitiators.add(PersisterFactoryInitiator.INSTANCE);<NEW_LINE>// Custom one!<NEW_LINE>serviceInitiators.add(QuarkusConnectionProviderInitiator.INSTANCE);<NEW_LINE>serviceInitiators.add(MultiTenantConnectionProviderInitiator.INSTANCE);<NEW_LINE>serviceInitiators.add(DialectResolverInitiator.INSTANCE);<NEW_LINE>// Custom one!<NEW_LINE>serviceInitiators.add(DialectFactoryInitiator.INSTANCE);<NEW_LINE>// Non-default implementation: optimised for lack of JMX management<NEW_LINE>serviceInitiators.add(UnmodifiableBatchBuilderInitiator.INSTANCE);<NEW_LINE>serviceInitiators.add(JdbcServicesInitiator.INSTANCE);<NEW_LINE>serviceInitiators.add(RefCursorSupportInitiator.INSTANCE);<NEW_LINE>serviceInitiators.add(QueryTranslatorFactoryInitiator.INSTANCE);<NEW_LINE>// Custom one! Also, this one has state so can't use the singleton.<NEW_LINE>// MutableIdentifierGeneratorFactoryInitiator.INSTANCE);<NEW_LINE>serviceInitiators.add(new QuarkusMutableIdentifierGeneratorFactoryInitiator());<NEW_LINE>serviceInitiators.add(QuarkusJtaPlatformInitiator.INSTANCE);<NEW_LINE><MASK><NEW_LINE>serviceInitiators.add(QuarkusRegionFactoryInitiator.INSTANCE);<NEW_LINE>serviceInitiators.add(TransactionCoordinatorBuilderInitiator.INSTANCE);<NEW_LINE>// Replaces ManagedBeanRegistryInitiator.INSTANCE<NEW_LINE>serviceInitiators.add(QuarkusManagedBeanRegistryInitiator.INSTANCE);<NEW_LINE>serviceInitiators.add(EntityCopyObserverFactoryInitiator.INSTANCE);<NEW_LINE>serviceInitiators.trimToSize();<NEW_LINE>return serviceInitiators;<NEW_LINE>}
serviceInitiators.add(SessionFactoryServiceRegistryFactoryInitiator.INSTANCE);
595,820
public synchronized ObjectId rootTreeShaOf(Project project, String reference) {<NEW_LINE>try {<NEW_LINE>Repository repo = repositoryFor(project);<NEW_LINE>ObjectId treeSha = rootTreeShaCache.get(repo, reference);<NEW_LINE>if (treeSha == null) {<NEW_LINE>try (RevWalk revWalk = new RevWalk(repo)) {<NEW_LINE>ObjectId commitSha = repo.resolve(reference);<NEW_LINE>if (commitSha == null) {<NEW_LINE>throw new IllegalArgumentException("No such reference '" + reference + "'");<NEW_LINE>}<NEW_LINE>RevCommit ratchetFrom = revWalk.parseCommit(commitSha);<NEW_LINE>RevCommit head = revWalk.parseCommit(repo<MASK><NEW_LINE>revWalk.setRevFilter(RevFilter.MERGE_BASE);<NEW_LINE>revWalk.markStart(ratchetFrom);<NEW_LINE>revWalk.markStart(head);<NEW_LINE>RevCommit mergeBase = revWalk.next();<NEW_LINE>treeSha = Optional.ofNullable(mergeBase).orElse(ratchetFrom).getTree();<NEW_LINE>}<NEW_LINE>rootTreeShaCache.put(repo, reference, treeSha.copy());<NEW_LINE>}<NEW_LINE>return treeSha;<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw Errors.asRuntime(e);<NEW_LINE>}<NEW_LINE>}
.resolve(Constants.HEAD));
182,645
public static LineString uncompactLineString(double xa, double ya, double xb, double yb, byte[] packedCoords, boolean reverse) {<NEW_LINE>int[] <MASK><NEW_LINE>int size = coords == null ? 2 : (coords.length / 2) + 2;<NEW_LINE>Coordinate[] c = new Coordinate[size];<NEW_LINE>double x0 = reverse ? xb : xa;<NEW_LINE>double y0 = reverse ? yb : ya;<NEW_LINE>double x1 = reverse ? xa : xb;<NEW_LINE>double y1 = reverse ? ya : yb;<NEW_LINE>c[0] = new Coordinate(x0, y0);<NEW_LINE>if (coords != null) {<NEW_LINE>int oix = (int) Math.round(x0 * FIXED_FLOAT_MULT);<NEW_LINE>int oiy = (int) Math.round(y0 * FIXED_FLOAT_MULT);<NEW_LINE>for (int i = 1; i < c.length - 1; i++) {<NEW_LINE>int ix = oix + coords[(i - 1) * 2];<NEW_LINE>int iy = oiy + coords[(i - 1) * 2 + 1];<NEW_LINE>c[i] = new Coordinate(ix / FIXED_FLOAT_MULT, iy / FIXED_FLOAT_MULT);<NEW_LINE>oix = ix;<NEW_LINE>oiy = iy;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>c[c.length - 1] = new Coordinate(x1, y1);<NEW_LINE>LineString out = GeometryUtils.makeLineString(c);<NEW_LINE>if (reverse) {<NEW_LINE>out = out.reverse();<NEW_LINE>}<NEW_LINE>return out;<NEW_LINE>}
coords = DlugoszVarLenIntPacker.unpack(packedCoords);
1,720,904
private Mono<Response<PartnerTopicInner>> createOrUpdateWithResponseAsync(String resourceGroupName, String partnerTopicName, PartnerTopicInner partnerTopicInfo, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (partnerTopicName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter partnerTopicName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (partnerTopicInfo == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter partnerTopicInfo is required and cannot be null."));<NEW_LINE>} else {<NEW_LINE>partnerTopicInfo.validate();<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = <MASK><NEW_LINE>return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, partnerTopicName, this.client.getApiVersion(), partnerTopicInfo, accept, context);<NEW_LINE>}
this.client.mergeContext(context);
911,000
public static void transformSq(final GrayF32 input, final GrayF64 transformed) {<NEW_LINE>int indexSrc = input.startIndex;<NEW_LINE>int indexDst = transformed.startIndex;<NEW_LINE>int end = indexSrc + input.width;<NEW_LINE>double total = 0;<NEW_LINE>for (; indexSrc < end; indexSrc++) {<NEW_LINE>float value = input.data[indexSrc];<NEW_LINE>transformed.data[indexDst++] = total += value * value;<NEW_LINE>}<NEW_LINE>for (int y = 1; y < input.height; y++) {<NEW_LINE>indexSrc = input.startIndex + input.stride * y;<NEW_LINE>indexDst = transformed<MASK><NEW_LINE>int indexPrev = indexDst - transformed.stride;<NEW_LINE>end = indexSrc + input.width;<NEW_LINE>total = 0;<NEW_LINE>for (; indexSrc < end; indexSrc++) {<NEW_LINE>float value = input.data[indexSrc];<NEW_LINE>total += value * value;<NEW_LINE>transformed.data[indexDst++] = transformed.data[indexPrev++] + total;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.startIndex + transformed.stride * y;
878,606
private void createOfficeElements(GridBagConstraints cons, JPanel portPanel) {<NEW_LINE>JCheckBox useQueueResetbox = new JCheckBox(Tools.getLabel(messages.getString("guiUseTextLevelQueue")));<NEW_LINE>JCheckBox saveCacheBox = new JCheckBox(Tools.getLabel(messages.getString("guiSaveCacheToFile")));<NEW_LINE>addOfficeLanguageElements(cons, portPanel);<NEW_LINE>cons.gridx = 0;<NEW_LINE>cons.gridy++;<NEW_LINE>portPanel.add(new JLabel(" "), cons);<NEW_LINE>cons.gridy++;<NEW_LINE>portPanel.add(getMotherTonguePanel(cons), cons);<NEW_LINE>cons.gridx = 0;<NEW_LINE>cons.gridy++;<NEW_LINE>portPanel.add(new JLabel(" "), cons);<NEW_LINE>JCheckBox markSingleCharBold = new JCheckBox(Tools.getLabel(messages.getString("guiMarkSingleCharBold")));<NEW_LINE>markSingleCharBold.setSelected(config.markSingleCharBold());<NEW_LINE>markSingleCharBold.addItemListener(e -> config.setMarkSingleCharBold(markSingleCharBold.isSelected()));<NEW_LINE>cons.gridy++;<NEW_LINE>portPanel.add(markSingleCharBold, cons);<NEW_LINE>JCheckBox useLtDictionaryBox = new JCheckBox(Tools.getLabel(<MASK><NEW_LINE>useLtDictionaryBox.setSelected(config.useLtDictionary());<NEW_LINE>useLtDictionaryBox.addItemListener(e -> {<NEW_LINE>config.setUseLtDictionary(useLtDictionaryBox.isSelected());<NEW_LINE>});<NEW_LINE>cons.gridy++;<NEW_LINE>portPanel.add(useLtDictionaryBox, cons);<NEW_LINE>JCheckBox noSynonymsAsSuggestionsBox = new JCheckBox(Tools.getLabel(messages.getString("guiNoSynonymsAsSuggestions")));<NEW_LINE>noSynonymsAsSuggestionsBox.setSelected(config.noSynonymsAsSuggestions());<NEW_LINE>noSynonymsAsSuggestionsBox.addItemListener(e -> {<NEW_LINE>config.setNoSynonymsAsSuggestions(noSynonymsAsSuggestionsBox.isSelected());<NEW_LINE>});<NEW_LINE>cons.gridy++;<NEW_LINE>portPanel.add(noSynonymsAsSuggestionsBox, cons);<NEW_LINE>JCheckBox noBackgroundCheckBox = new JCheckBox(Tools.getLabel(messages.getString("guiNoBackgroundCheck")));<NEW_LINE>noBackgroundCheckBox.setSelected(config.noBackgroundCheck());<NEW_LINE>noBackgroundCheckBox.addItemListener(e -> config.setNoBackgroundCheck(noBackgroundCheckBox.isSelected()));<NEW_LINE>cons.gridy++;<NEW_LINE>portPanel.add(noBackgroundCheckBox, cons);<NEW_LINE>cons.gridy++;<NEW_LINE>portPanel.add(new JLabel(" "), cons);<NEW_LINE>addOfficeTextruleElements(cons, portPanel, useQueueResetbox, saveCacheBox);<NEW_LINE>cons.insets = new Insets(0, SHIFT1, 0, 0);<NEW_LINE>cons.gridx = 0;<NEW_LINE>cons.gridy++;<NEW_LINE>portPanel.add(new JLabel(" "), cons);<NEW_LINE>addOfficeTechnicalElements(cons, portPanel);<NEW_LINE>saveCacheBox.setSelected(config.saveLoCache());<NEW_LINE>saveCacheBox.addItemListener(e -> {<NEW_LINE>config.setSaveLoCache(saveCacheBox.isSelected());<NEW_LINE>});<NEW_LINE>cons.insets = new Insets(0, SHIFT2, 0, 0);<NEW_LINE>cons.gridx = 0;<NEW_LINE>cons.gridy++;<NEW_LINE>portPanel.add(saveCacheBox, cons);<NEW_LINE>cons.gridy++;<NEW_LINE>portPanel.add(getNgramAndWord2VecPanel(), cons);<NEW_LINE>}
messages.getString("guiUseLtDictionary")));
1,485,888
protected void trainSequence(@NonNull Sequence<T> sequence, AtomicLong nextRandom, double alpha) {<NEW_LINE>if (sequence.getElements().isEmpty())<NEW_LINE>return;<NEW_LINE>if (trainElementsVectors && !(trainSequenceVectors && sequenceLearningAlgorithm instanceof DM)) {<NEW_LINE>// call for ElementsLearningAlgorithm<NEW_LINE>nextRandom.set(nextRandom.get() * 25214903917L + 11);<NEW_LINE>if (!elementsLearningAlgorithm.isEarlyTerminationHit()) {<NEW_LINE>scoreElements.set(elementsLearningAlgorithm.learnSequence(sequence, nextRandom, alpha, batchSequences));<NEW_LINE>} else<NEW_LINE>scoreElements.set(elementsLearningAlgorithm.learnSequence<MASK><NEW_LINE>}<NEW_LINE>if (trainSequenceVectors) {<NEW_LINE>// call for SequenceLearningAlgorithm<NEW_LINE>nextRandom.set(nextRandom.get() * 25214903917L + 11);<NEW_LINE>if (!sequenceLearningAlgorithm.isEarlyTerminationHit())<NEW_LINE>scoreSequences.set(sequenceLearningAlgorithm.learnSequence(sequence, nextRandom, alpha, batchSequences));<NEW_LINE>}<NEW_LINE>}
(sequence, nextRandom, alpha));
346,494
protected void addGuiElements() {<NEW_LINE>super.addGuiElements();<NEW_LINE>addRenderableWidget(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 157, 23)).warning(WarningType.NOT_ENOUGH_ENERGY, tile.getWarningCheck(RecipeError.NOT_ENOUGH_ENERGY));<NEW_LINE>addRenderableWidget(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getActive));<NEW_LINE>addRenderableWidget(new GuiMergedChemicalTankGauge<>(() -> tile.inputTank, () -> tile, GaugeType.STANDARD, this, 7, 4)).warning(WarningType.NO_MATCHING_RECIPE, tile.getWarningCheck(RecipeError.NOT_ENOUGH_INPUT));<NEW_LINE>addRenderableWidget(new GuiProgress(tile::getScaledProgress, ProgressType.LARGE_RIGHT, this, 53, 61).jeiCategory(tile)).warning(WarningType.INPUT_DOESNT_PRODUCE_OUTPUT, tile.getWarningCheck(RecipeError.INPUT_DOESNT_PRODUCE_OUTPUT));<NEW_LINE>// Init slot display before gui screen, so it can reference it, but add it after, so it renders above it<NEW_LINE>slotDisplay = new GuiSequencedSlotDisplay(this, 129, 14, () -> iterStacks);<NEW_LINE>updateSlotContents();<NEW_LINE>addRenderableWidget(new GuiInnerScreen(this, 31, 13, 115, 42, () -> getScreenRenderStrings(this.oreInfo)));<NEW_LINE>addRenderableWidget(new GuiSlot(SlotType.ORE, this, 128<MASK><NEW_LINE>addRenderableWidget(slotDisplay);<NEW_LINE>}
, 13).setRenderAboveSlots());
788,059
public void updateToolbar(TopToolbarView view) {<NEW_LINE>TextView titleView = view.getTitleView();<NEW_LINE>TextView descrView = view.getDescrView();<NEW_LINE>LinearLayout bottomViewLayout = view.getBottomViewLayout();<NEW_LINE>SwitchCompat switchCompat = view.getTopBarSwitch();<NEW_LINE>if (title != null) {<NEW_LINE>titleView.setText(title);<NEW_LINE>AndroidUiHelper.updateVisibility(titleView, true);<NEW_LINE>} else {<NEW_LINE>AndroidUiHelper.updateVisibility(titleView, false);<NEW_LINE>}<NEW_LINE>if (description != null) {<NEW_LINE>descrView.setText(description);<NEW_LINE>AndroidUiHelper.updateVisibility(descrView, true);<NEW_LINE>} else {<NEW_LINE>AndroidUiHelper.updateVisibility(descrView, false);<NEW_LINE>}<NEW_LINE>if (bottomView != null) {<NEW_LINE>if (!bottomViewAdded) {<NEW_LINE>bottomViewLayout.removeAllViews();<NEW_LINE>bottomViewLayout.addView(bottomView);<NEW_LINE><MASK><NEW_LINE>bottomViewAdded = true;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>bottomViewLayout.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>AndroidUiHelper.updateVisibility(switchCompat, topBarSwitchVisible);<NEW_LINE>if (topBarSwitchVisible) {<NEW_LINE>switchCompat.setChecked(topBarSwitchChecked);<NEW_LINE>if (topBarSwitchChecked) {<NEW_LINE>DrawableCompat.setTint(switchCompat.getTrackDrawable(), ContextCompat.getColor(switchCompat.getContext(), R.color.map_toolbar_switch_track_color));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>View shadowView = view.getShadowView();<NEW_LINE>if (shadowView != null) {<NEW_LINE>AndroidUiHelper.updateVisibility(shadowView, isShadowViewVisible());<NEW_LINE>}<NEW_LINE>}
bottomViewLayout.setVisibility(View.VISIBLE);
1,382,187
public void didUploadPhoto(final TLRPC.InputFile photo, final TLRPC.InputFile video, double videoStartTimestamp, String videoPath, final TLRPC.PhotoSize bigSize, final TLRPC.PhotoSize smallSize) {<NEW_LINE>AndroidUtilities.runOnUIThread(() -> {<NEW_LINE>avatar = smallSize.location;<NEW_LINE>if (photo != null || video != null) {<NEW_LINE>getMessagesController().changeChatAvatar(chatId, null, photo, video, videoStartTimestamp, videoPath, smallSize.location, bigSize.location, null);<NEW_LINE>if (createAfterUpload) {<NEW_LINE>try {<NEW_LINE>if (progressDialog != null && progressDialog.isShowing()) {<NEW_LINE>progressDialog.dismiss();<NEW_LINE>progressDialog = null;<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>FileLog.e(e);<NEW_LINE>}<NEW_LINE>donePressed = false;<NEW_LINE>doneButton.performClick();<NEW_LINE>}<NEW_LINE>showAvatarProgress(false, true);<NEW_LINE>} else {<NEW_LINE>avatarImage.setImage(ImageLocation.getForLocal(avatar<MASK><NEW_LINE>setAvatarCell.setTextAndIcon(LocaleController.getString("ChatSetNewPhoto", R.string.ChatSetNewPhoto), R.drawable.baseline_image_24, true);<NEW_LINE>if (cameraDrawable == null) {<NEW_LINE>cameraDrawable = new RLottieDrawable(R.raw.camera_outline, "" + R.raw.camera_outline, AndroidUtilities.dp(50), AndroidUtilities.dp(50), false, null);<NEW_LINE>}<NEW_LINE>setAvatarCell.imageView.setTranslationY(-AndroidUtilities.dp(9));<NEW_LINE>setAvatarCell.imageView.setTranslationX(-AndroidUtilities.dp(8));<NEW_LINE>setAvatarCell.imageView.setAnimation(cameraDrawable);<NEW_LINE>showAvatarProgress(true, false);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
), "50_50", avatarDrawable, currentChat);
1,337,759
ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, String workId) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<List<Wo>> result = new ActionResult<>();<NEW_LINE>Business business = new Business(emc);<NEW_LINE>if (!business.readableWithWork(effectivePerson, workId, new ExceptionEntityNotExist(workId, Work.class))) {<NEW_LINE>throw new ExceptionAccessDenied(effectivePerson);<NEW_LINE>}<NEW_LINE>Work work = emc.find(workId, Work.class);<NEW_LINE>List<WorkLog> workLogs = emc.listEqual(WorkLog.class, Work.job_FIELDNAME, work.getJob());<NEW_LINE>WorkLogTree tree = new WorkLogTree(workLogs);<NEW_LINE>WorkLogTree.Node current = tree.location(work);<NEW_LINE>WorkLogTree.Nodes nodes = tree.up(current);<NEW_LINE>List<Wo> wos = new ArrayList<>();<NEW_LINE>List<WorkLog> os = new ArrayList<>();<NEW_LINE>Stream<Node> splitNodes = nodes.stream().filter(o -> {<NEW_LINE>return Objects.equals(o.getWorkLog().getFromActivityType(), ActivityType.split) && StringUtils.startsWith(StringUtils.join(work.getSplitTokenList(), ","), StringUtils.join(o.getWorkLog().getProperties().getSplitTokenList(), ","));<NEW_LINE>});<NEW_LINE>if (business.canManageApplicationOrProcess(effectivePerson, work.getApplication(), work.getProcess())) {<NEW_LINE>splitNodes.forEach(o -> {<NEW_LINE>o.upTo(ActivityType.manual, ActivityType.split, ActivityType.agent, ActivityType.choice, ActivityType.delay, ActivityType.embed, ActivityType.invoke).forEach(n -> {<NEW_LINE>try {<NEW_LINE>os.add(o.getWorkLog());<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error(e);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>splitNodes.forEach(o -> {<NEW_LINE>o.upTo(ActivityType.manual, ActivityType.split, ActivityType.agent, ActivityType.choice, ActivityType.delay, ActivityType.embed, ActivityType.invoke).forEach(n -> {<NEW_LINE>try {<NEW_LINE>Long count = emc.countEqualAndEqual(TaskCompleted.class, TaskCompleted.person_FIELDNAME, effectivePerson.getDistinguishedName(), TaskCompleted.activityToken_FIELDNAME, n.getWorkLog().getFromActivityToken());<NEW_LINE>if (count > 0) {<NEW_LINE>os.add(o.getWorkLog());<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error(e);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>});<NEW_LINE>}<NEW_LINE>wos = <MASK><NEW_LINE>result.setData(wos);<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}
Wo.copier.copy(os);
133,949
protected PowerMockJUnitRunnerDelegate createDelegatorFromClassloader(ClassLoader classLoader, Class<?> testClass, final List<Method> methodsToTest) throws Exception {<NEW_LINE>Set<String> methodNames = new HashSet<String>();<NEW_LINE>for (Method method : methodsToTest) {<NEW_LINE>methodNames.add(method.getName());<NEW_LINE>}<NEW_LINE>final Class<?> testClassLoadedByMockedClassLoader = Class.forName(testClass.getName(), false, classLoader);<NEW_LINE>final Class<?> powerMockTestListenerArrayType = Class.forName(PowerMockTestListener[].class.getName(), false, classLoader);<NEW_LINE>final Class<?> delegateClass = Class.forName(runnerDelegateImplementationType.getName(), false, classLoader);<NEW_LINE>Constructor<?> con = delegateClass.getConstructor(Class.class, <MASK><NEW_LINE>return (PowerMockJUnitRunnerDelegate) con.newInstance(testClassLoadedByMockedClassLoader, methodNames.toArray(new String[methodNames.size()]), getPowerMockTestListenersLoadedByASpecificClassLoader(testClass, classLoader));<NEW_LINE>}
String[].class, powerMockTestListenerArrayType);
1,356,579
private void processFile(File file, String license) {<NEW_LINE>try {<NEW_LINE>String content = FileUtils.readFileToString(file);<NEW_LINE>int indexOfPackageStart = content.indexOf("package ");<NEW_LINE>if (indexOfPackageStart != -1) {<NEW_LINE>int indexOfPackageEnd = content.indexOf(";", indexOfPackageStart + 1);<NEW_LINE>int indexOfFirstImport = content.indexOf("import ", indexOfPackageEnd);<NEW_LINE>if (indexOfFirstImport != -1) {<NEW_LINE>if (content.substring(indexOfFirstImport - 2, indexOfFirstImport).equals("//")) {<NEW_LINE>indexOfFirstImport = indexOfFirstImport - 2;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (indexOfFirstImport == -1) {<NEW_LINE>int indexOfFirstPublic = content.indexOf("public ", indexOfPackageEnd);<NEW_LINE>int indexOfFirstPrivate = content.indexOf("private ", indexOfPackageEnd);<NEW_LINE>if (indexOfFirstPublic != -1 && indexOfFirstPrivate != -1) {<NEW_LINE>if (indexOfFirstPublic < indexOfFirstPrivate) {<NEW_LINE>indexOfFirstImport = indexOfFirstPublic;<NEW_LINE>} else {<NEW_LINE>indexOfFirstImport = indexOfFirstPrivate;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (indexOfFirstPrivate != -1) {<NEW_LINE>indexOfFirstImport = indexOfFirstPrivate;<NEW_LINE>} else if (indexOfFirstPublic != -1) {<NEW_LINE>indexOfFirstImport = indexOfFirstPublic;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (indexOfFirstImport != -1) {<NEW_LINE>String first = content.substring(0, indexOfPackageEnd + 1);<NEW_LINE>String second = content.substring(indexOfFirstImport);<NEW_LINE>String total = first <MASK><NEW_LINE>if (total.equals(content)) {<NEW_LINE>same++;<NEW_LINE>} else {<NEW_LINE>changed++;<NEW_LINE>}<NEW_LINE>FileUtils.writeStringToFile(file, total);<NEW_LINE>} else {<NEW_LINE>skipped++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>LOGGER.error("", e);<NEW_LINE>}<NEW_LINE>}
+ "\n\n" + license + "\n\n" + second;
220,766
protected void initScene() {<NEW_LINE>PointLight pointLight = new PointLight();<NEW_LINE>pointLight.setPower(1);<NEW_LINE>pointLight.setPosition(-1, 1, 4);<NEW_LINE>getCurrentScene().addLight(pointLight);<NEW_LINE>try {<NEW_LINE>Texture earthTexture = new Texture("earthDiffuseTex", R.drawable.earth_diffuse);<NEW_LINE>Material material = new Material();<NEW_LINE>material.enableLighting(true);<NEW_LINE>material.setDiffuseMethod(new DiffuseMethod.Lambert());<NEW_LINE>material.setSpecularMethod(new SpecularMethod.Phong(Color.WHITE, 40));<NEW_LINE>material.addTexture(earthTexture);<NEW_LINE>material.addTexture(new SpecularMapTexture("earthSpecularTex", R.drawable.earth_specular));<NEW_LINE>material.setColorInfluence(0);<NEW_LINE>Sphere sphere = new Sphere(1, 32, 24);<NEW_LINE>sphere.setMaterial(material);<NEW_LINE>sphere.setY(1.2f);<NEW_LINE>getCurrentScene().addChild(sphere);<NEW_LINE>RotateOnAxisAnimation sphereAnim = new RotateOnAxisAnimation(<MASK><NEW_LINE>sphereAnim.setDurationMilliseconds(14000);<NEW_LINE>sphereAnim.setRepeatMode(Animation.RepeatMode.INFINITE);<NEW_LINE>sphereAnim.setTransformable3D(sphere);<NEW_LINE>getCurrentScene().registerAnimation(sphereAnim);<NEW_LINE>sphereAnim.play();<NEW_LINE>material = new Material();<NEW_LINE>material.enableLighting(true);<NEW_LINE>material.setDiffuseMethod(new DiffuseMethod.Lambert());<NEW_LINE>material.setSpecularMethod(new SpecularMethod.Phong());<NEW_LINE>material.addTexture(earthTexture);<NEW_LINE>material.addTexture(new AlphaMapTexture("alphaMapTex", R.drawable.camden_town_alpha));<NEW_LINE>material.setColorInfluence(0);<NEW_LINE>sphere = new Sphere(1, 32, 24);<NEW_LINE>sphere.setMaterial(material);<NEW_LINE>sphere.setDoubleSided(true);<NEW_LINE>sphere.setY(-1.2f);<NEW_LINE>getCurrentScene().addChild(sphere);<NEW_LINE>sphereAnim = new RotateOnAxisAnimation(Vector3.Axis.Y, -359);<NEW_LINE>sphereAnim.setDurationMilliseconds(10000);<NEW_LINE>sphereAnim.setRepeatMode(Animation.RepeatMode.INFINITE);<NEW_LINE>sphereAnim.setTransformable3D(sphere);<NEW_LINE>getCurrentScene().registerAnimation(sphereAnim);<NEW_LINE>sphereAnim.play();<NEW_LINE>} catch (ATexture.TextureException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>TranslateAnimation3D lightAnim = new TranslateAnimation3D(new Vector3(-2, 3, 3), new Vector3(2, -1, 3));<NEW_LINE>lightAnim.setDurationMilliseconds(3000);<NEW_LINE>lightAnim.setInterpolator(new AccelerateDecelerateInterpolator());<NEW_LINE>lightAnim.setRepeatMode(Animation.RepeatMode.REVERSE_INFINITE);<NEW_LINE>lightAnim.setTransformable3D(pointLight);<NEW_LINE>getCurrentScene().registerAnimation(lightAnim);<NEW_LINE>lightAnim.play();<NEW_LINE>getCurrentCamera().setZ(6);<NEW_LINE>}
Vector3.Axis.Y, 359);
1,073,373
protected RowExpression visitSimpleCaseExpression(SimpleCaseExpression node, Void context) {<NEW_LINE>ImmutableList.Builder<RowExpression<MASK><NEW_LINE>RowExpression value = process(node.getOperand(), context);<NEW_LINE>arguments.add(value);<NEW_LINE>ImmutableList.Builder<ResolvedFunction> functionDependencies = ImmutableList.builder();<NEW_LINE>for (WhenClause clause : node.getWhenClauses()) {<NEW_LINE>RowExpression operand = process(clause.getOperand(), context);<NEW_LINE>RowExpression result = process(clause.getResult(), context);<NEW_LINE>functionDependencies.add(metadata.resolveOperator(session, EQUAL, ImmutableList.of(value.getType(), operand.getType())));<NEW_LINE>arguments.add(new SpecialForm(WHEN, getType(clause), operand, result));<NEW_LINE>}<NEW_LINE>Type returnType = getType(node);<NEW_LINE>arguments.add(node.getDefaultValue().map(defaultValue -> process(defaultValue, context)).orElse(constantNull(returnType)));<NEW_LINE>return new SpecialForm(SWITCH, returnType, arguments.build(), functionDependencies.build());<NEW_LINE>}
> arguments = ImmutableList.builder();
88,106
private synchronized TravelArticle findArticleById(@NonNull final TravelArticleIdentifier articleId, String lang, boolean readGpx, @Nullable GpxReadCallback callback) {<NEW_LINE>TravelArticle article = null;<NEW_LINE>final boolean isDbArticle = articleId.file != null && articleId.file.getName(<MASK><NEW_LINE>final List<Amenity> amenities = new ArrayList<>();<NEW_LINE>for (BinaryMapIndexReader reader : getReaders()) {<NEW_LINE>try {<NEW_LINE>if (articleId.file != null && !articleId.file.equals(reader.getFile()) && !isDbArticle) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>SearchRequest<Amenity> req = BinaryMapIndexReader.buildSearchPoiRequest(0, 0, Algorithms.emptyIfNull(articleId.title), 0, Integer.MAX_VALUE, 0, Integer.MAX_VALUE, getSearchFilter(ROUTE_ARTICLE), new ResultMatcher<Amenity>() {<NEW_LINE><NEW_LINE>boolean done = false;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean publish(Amenity amenity) {<NEW_LINE>if (Algorithms.stringsEqual(articleId.routeId, Algorithms.emptyIfNull(amenity.getTagContent(Amenity.ROUTE_ID))) || isDbArticle) {<NEW_LINE>amenities.add(amenity);<NEW_LINE>done = true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean isCancelled() {<NEW_LINE>return done;<NEW_LINE>}<NEW_LINE>}, null);<NEW_LINE>if (!Double.isNaN(articleId.lat)) {<NEW_LINE>req.setBBoxRadius(articleId.lat, articleId.lon, ARTICLE_SEARCH_RADIUS);<NEW_LINE>if (!Algorithms.isEmpty(articleId.title)) {<NEW_LINE>reader.searchPoiByName(req);<NEW_LINE>} else {<NEW_LINE>reader.searchPoi(req);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>reader.searchPoi(req);<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>LOG.error(e.getMessage());<NEW_LINE>}<NEW_LINE>if (!Algorithms.isEmpty(amenities)) {<NEW_LINE>article = cacheTravelArticles(reader.getFile(), amenities.get(0), lang, readGpx, callback);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return article;<NEW_LINE>}
).endsWith(IndexConstants.BINARY_WIKIVOYAGE_MAP_INDEX_EXT);
331,052
private Map<String, Long> findResoucerDistributionByDate(String searchResponse, LocalDate fromDate) {<NEW_LINE>JsonParser parser = new JsonParser();<NEW_LINE>JsonObject responeObj = parser.parse(searchResponse).getAsJsonObject();<NEW_LINE>System.out.println("****Time taken for ES Query " + responeObj.get("took").getAsLong());<NEW_LINE>JsonArray resourceBuckets = responeObj.getAsJsonObject("aggregations").getAsJsonObject("resources").getAsJsonArray("buckets");<NEW_LINE>Map<String, Set<String>> dateResourceMap = new ConcurrentHashMap<>();<NEW_LINE>for (JsonElement resourceElmnt : resourceBuckets) {<NEW_LINE>JsonObject resourceObj = (JsonObject) resourceElmnt;<NEW_LINE>String resource = resourceObj.get("key").getAsString();<NEW_LINE>JsonArray fromBukets = resourceObj.getAsJsonObject("from").getAsJsonArray("buckets");<NEW_LINE>for (JsonElement from : fromBukets) {<NEW_LINE>JsonObject fromObj = (JsonObject) from;<NEW_LINE>String fromDt = fromObj.get("key").getAsString();<NEW_LINE>JsonArray toBukets = fromObj.getAsJsonObject("to").getAsJsonArray("buckets");<NEW_LINE>for (JsonElement to : toBukets) {<NEW_LINE>JsonObject toObj = (JsonObject) to;<NEW_LINE>String toDt = toObj.get("key").getAsString();<NEW_LINE>if ("1969-12-31".equals(toDt)) {<NEW_LINE>toDt = null;<NEW_LINE>}<NEW_LINE>List<String> ranges = getDateRange(fromDt, toDt, fromDate, DateTimeFormatter.ofPattern("yyyy-MM-dd"));<NEW_LINE>ranges.parallelStream().forEach(date -> {<NEW_LINE>Set<String> currentResources = dateResourceMap.get(date);<NEW_LINE>if (currentResources == null) {<NEW_LINE>currentResources = new HashSet<>();<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>currentResources.add(resource);<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return dateResourceMap.entrySet().parallelStream().collect(Collectors.toMap(entry -> entry.getKey(), entry -> Long.valueOf("" + entry.getValue().size())));<NEW_LINE>}
dateResourceMap.put(date, currentResources);
1,684,941
protected void rebalanceClusterOwnership(final String iNode, String databaseName, final OModifiableDistributedConfiguration cfg, final boolean canCreateNewClusters) {<NEW_LINE>final ODistributedConfiguration.ROLES role = cfg.getServerRole(iNode);<NEW_LINE>if (role != ODistributedConfiguration.ROLES.MASTER)<NEW_LINE>// NO MASTER, DON'T CREATE LOCAL CLUSTERS<NEW_LINE>return;<NEW_LINE>ODatabaseDocumentInternal current = ODatabaseRecordThreadLocal.instance().getIfDefined();<NEW_LINE>try (ODatabaseDocumentInternal iDatabase = getServerInstance().openDatabase(databaseName)) {<NEW_LINE>ODistributedServerLog.info(this, nodeName, null, DIRECTION.NONE, "Reassigning ownership of clusters for database %s...", iDatabase.getName());<NEW_LINE>final Set<String> availableNodes = getAvailableNodeNames(iDatabase.getName());<NEW_LINE>iDatabase.activateOnCurrentThread();<NEW_LINE>final OSchema schema = iDatabase.getDatabaseOwner().getMetadata().getSchema();<NEW_LINE>final Map<OClass, List<String>> cluster2CreateMap = new HashMap<OClass, List<String>>(1);<NEW_LINE>for (final OClass clazz : schema.getClasses()) {<NEW_LINE>final List<String> cluster2Create = clusterAssignmentStrategy.assignClusterOwnershipOfClass(iDatabase, cfg, clazz, availableNodes, canCreateNewClusters);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (canCreateNewClusters)<NEW_LINE>createClusters(iDatabase, cluster2CreateMap, cfg);<NEW_LINE>ODistributedServerLog.info(this, nodeName, null, DIRECTION.NONE, "Reassignment of clusters for database '%s' completed (classes=%d)", iDatabase.getName(), cluster2CreateMap.size());<NEW_LINE>} finally {<NEW_LINE>ODatabaseRecordThreadLocal.instance().set(current);<NEW_LINE>}<NEW_LINE>}
cluster2CreateMap.put(clazz, cluster2Create);
563,519
private void checkSuperclass() {<NEW_LINE>ClassAccessor<? super T> superAccessor = classAccessor.getSuperAccessor();<NEW_LINE>if (superAccessor.isEqualsInheritedFromObject() || superAccessor.isSealed()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (config.hasRedefinedSuperclass() || config.isUsingGetClass()) {<NEW_LINE>T reference = classAccessor.getRedObject(typeTag);<NEW_LINE>Object equalSuper = getEqualSuper(reference);<NEW_LINE>Formatter formatter = Formatter.of("Redefined superclass:\n" + " %%\nshould not equal superclass instance\n %%\nbut it does.", reference, equalSuper);<NEW_LINE>try {<NEW_LINE>assertFalse(formatter, reference.equals(equalSuper) || equalSuper.equals(reference));<NEW_LINE>} catch (AbstractMethodError ignored) {<NEW_LINE>// In this case, we'll assume all super properties hold.<NEW_LINE>// The problems we test for, can never occur anyway if you can't instantiate a super<NEW_LINE>// instance.<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>safelyCheckSuperProperties<MASK><NEW_LINE>safelyCheckSuperProperties(classAccessor.getDefaultValuesAccessor(typeTag, config.getWarningsToSuppress().contains(Warning.NULL_FIELDS), config.getWarningsToSuppress().contains(Warning.ZERO_FIELDS), config.getNonnullFields(), config.getAnnotationCache()));<NEW_LINE>}<NEW_LINE>}
(classAccessor.getRedAccessor(typeTag));
1,592,164
private void declarePyramid(int imageWidth, int imageHeight) {<NEW_LINE>int minSize = (config.trackerFeatureRadius * 2 + 1) * 5;<NEW_LINE>ConfigDiscreteLevels configLevels = ConfigDiscreteLevels.minSize(minSize);<NEW_LINE>currentImage = FactoryPyramid.discreteGaussian(configLevels, -1, 1, false, ImageType.single(imageType));<NEW_LINE>currentImage.initialize(imageWidth, imageHeight);<NEW_LINE>previousImage = FactoryPyramid.discreteGaussian(configLevels, -1, 1, false, ImageType.single(imageType));<NEW_LINE>previousImage.initialize(imageWidth, imageHeight);<NEW_LINE>int numPyramidLayers = currentImage.getNumLayers();<NEW_LINE>previousDerivX = (Derivative[]) Array.newInstance(derivType, numPyramidLayers);<NEW_LINE>previousDerivY = (Derivative[]) Array.newInstance(derivType, numPyramidLayers);<NEW_LINE>currentDerivX = (Derivative[]) Array.newInstance(derivType, numPyramidLayers);<NEW_LINE>currentDerivY = (Derivative[]) Array.newInstance(derivType, numPyramidLayers);<NEW_LINE>for (int i = 0; i < numPyramidLayers; i++) {<NEW_LINE>int w = currentImage.getWidth(i);<NEW_LINE>int h = currentImage.getHeight(i);<NEW_LINE>previousDerivX[i] = GeneralizedImageOps.createSingleBand(derivType, w, h);<NEW_LINE>previousDerivY[i] = GeneralizedImageOps.createSingleBand(derivType, w, h);<NEW_LINE>currentDerivX[i] = GeneralizedImageOps.createSingleBand(derivType, w, h);<NEW_LINE>currentDerivY[i] = GeneralizedImageOps.<MASK><NEW_LINE>}<NEW_LINE>track = new PyramidKltFeature(numPyramidLayers, config.trackerFeatureRadius);<NEW_LINE>}
createSingleBand(derivType, w, h);
423,253
public static void takeScreenShot() {<NEW_LINE>// create the screenshot directory<NEW_LINE>File dir = Options.getScreenshotDir();<NEW_LINE>if (!dir.isDirectory() && !dir.mkdir()) {<NEW_LINE>ErrorHandler.error(String.format("Failed to create screenshot directory at '%s'.", dir.getAbsolutePath()), null, false);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// create file name<NEW_LINE>SimpleDateFormat date = new SimpleDateFormat("yyyyMMdd_HHmmss");<NEW_LINE>final File file = new File(dir, String.format("screenshot_%s.%s", date.format(new Date()), Options.getScreenshotFormat()));<NEW_LINE>SoundController.playSound(SoundEffect.SHUTTER);<NEW_LINE>// copy the screen to file<NEW_LINE>final int width = Display.getWidth();<NEW_LINE>final int height = Display.getHeight();<NEW_LINE>// assuming a 32-bit display with a byte each for red, green, blue, and alpha<NEW_LINE>final int bpp = 3;<NEW_LINE>final ByteBuffer buffer = BufferUtils.createByteBuffer(width * height * bpp);<NEW_LINE>GL11.glReadBuffer(GL11.GL_FRONT);<NEW_LINE>GL11.glPixelStorei(GL11.GL_PACK_ALIGNMENT, 1);<NEW_LINE>GL11.glReadPixels(0, 0, width, height, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, buffer);<NEW_LINE>new Thread() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>BufferedImage image = new BufferedImage(<MASK><NEW_LINE>for (int x = 0; x < width; x++) {<NEW_LINE>for (int y = 0; y < height; y++) {<NEW_LINE>int i = (x + (width * y)) * bpp;<NEW_LINE>int r = buffer.get(i) & 0xFF;<NEW_LINE>int g = buffer.get(i + 1) & 0xFF;<NEW_LINE>int b = buffer.get(i + 2) & 0xFF;<NEW_LINE>image.setRGB(x, height - (y + 1), (0xFF << 24) | (r << 16) | (g << 8) | b);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ImageIO.write(image, Options.getScreenshotFormat(), file);<NEW_LINE>UI.getNotificationManager().sendNotification(String.format("Saved screenshot to %s", file.getAbsolutePath()), Colors.PURPLE, new NotificationListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void click() {<NEW_LINE>try {<NEW_LINE>Utils.openInFileManager(file);<NEW_LINE>} catch (IOException e) {<NEW_LINE>Log.warn("Failed to open screenshot location.", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (Exception e) {<NEW_LINE>ErrorHandler.error("Failed to take a screenshot.", e, true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}.start();<NEW_LINE>}
width, height, BufferedImage.TYPE_INT_RGB);
977,004
private String addReference(EjbReference ejbReference, EjbReference.EjbRefIType refType, String ejbRefName, FileObject referencingFile, String referencingClass) throws IOException {<NEW_LINE>String refName = ejbRefName;<NEW_LINE>AppClient webApp = getAppClient();<NEW_LINE>// don't duplicate ejbRefs with same name - issue #193576<NEW_LINE>// NOI18N<NEW_LINE>CommonDDBean bean = getAppClient().findBeanByName("EjbRef", "EjbRefName", ejbRefName);<NEW_LINE>if (bean != null) {<NEW_LINE>// when the name leads to the same bean<NEW_LINE>if (bean.getValue(EjbRef.REMOTE).equals(ejbReference.getRemote())) {<NEW_LINE>return ejbRefName;<NEW_LINE>} else {<NEW_LINE>// NOI18N<NEW_LINE>refName = getUniqueName(getAppClient(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>// EjbRef can come from Ejb project<NEW_LINE>try {<NEW_LINE>// NOI18N<NEW_LINE>EjbRef newRef = (EjbRef) webApp.createBean("EjbRef");<NEW_LINE>newRef.setEjbRefName(refName);<NEW_LINE>newRef.setEjbRefType(ejbReference.getEjbRefType());<NEW_LINE>newRef.setHome(ejbReference.getRemoteHome());<NEW_LINE>newRef.setRemote(ejbReference.getRemote());<NEW_LINE>getAppClient().addEjbRef(newRef);<NEW_LINE>} catch (ClassNotFoundException ex) {<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>AntArtifact target = getAntArtifact(ejbReference, refType);<NEW_LINE>ProjectClassPathModifier.addAntArtifacts(new AntArtifact[] { target }, new URI[] { BaseUtilities.normalizeURI(target.getArtifactLocations()[0]) }, referencingFile, ClassPath.COMPILE);<NEW_LINE>} catch (IOException ioe) {<NEW_LINE>Exceptions.printStackTrace(ioe);<NEW_LINE>}<NEW_LINE>writeDD(referencingFile, referencingClass);<NEW_LINE>return refName;<NEW_LINE>}
), "EjbRef", "EjbRefName", ejbRefName);
1,208,250
private MetaDataRegisterDTO buildMetaDataDTO(final Class<?> clazz, final MotanService service, final ShenyuMotanClient shenyuMotanClient, final Method method, final String rpcExt) {<NEW_LINE>String appName = this.appName;<NEW_LINE>String path = this.contextPath + shenyuMotanClient.path();<NEW_LINE>String desc = shenyuMotanClient.desc();<NEW_LINE>String host = IpUtils.isCompleteHost(this.host) ? this.host : IpUtils.getHost(this.host);<NEW_LINE>int port = StringUtils.isBlank(this.port) ? -1 : Integer.parseInt(this.port);<NEW_LINE>String configRuleName = shenyuMotanClient.ruleName();<NEW_LINE>String ruleName = ("".equals(configRuleName)) ? path : configRuleName;<NEW_LINE>String methodName = method.getName();<NEW_LINE>Class<?>[] parameterTypesClazz = method.getParameterTypes();<NEW_LINE>String parameterTypes = Arrays.stream(parameterTypesClazz).map(Class::getName).collect(Collectors.joining(","));<NEW_LINE>String serviceName;<NEW_LINE>if (void.class.equals(service.interfaceClass())) {<NEW_LINE>if (clazz.getInterfaces().length > 0) {<NEW_LINE>serviceName = clazz.getInterfaces()[0].getName();<NEW_LINE>} else {<NEW_LINE>throw new ShenyuClientIllegalArgumentException("Failed to export remote service class " + clazz.getName() + ", cause: The @Service undefined interfaceClass or interfaceName, and the service class unimplemented any interfaces.");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>serviceName = service.interfaceClass().getName();<NEW_LINE>}<NEW_LINE>return MetaDataRegisterDTO.builder().appName(appName).serviceName(serviceName).methodName(methodName).contextPath(this.contextPath).path(path).port(port).host(host).ruleName(ruleName).pathDesc(desc).parameterTypes(parameterTypes).rpcType(RpcTypeEnum.MOTAN.getName()).rpcExt(rpcExt).enabled(shenyuMotanClient.<MASK><NEW_LINE>}
enabled()).build();
956,336
public static void initDefaultSchemas() {<NEW_LINE>SoapUIClassLoaderState state = SoapUIExtensionClassLoader.ensure();<NEW_LINE>try {<NEW_LINE>defaultSchemas.clear();<NEW_LINE>String root = "/com/eviware/soapui/resources/xsds";<NEW_LINE>loadDefaultSchema(SoapUI.class.getResource(root + "/xop.xsd"));<NEW_LINE>loadDefaultSchema(SoapUI.class.getResource(root + "/XMLSchema.xsd"));<NEW_LINE>loadDefaultSchema(SoapUI.class.getResource(root + "/xml.xsd"));<NEW_LINE>loadDefaultSchema(SoapUI.class.getResource(root + "/swaref.xsd"));<NEW_LINE>loadDefaultSchema(SoapUI.class.getResource(root + "/xmime200505.xsd"));<NEW_LINE>loadDefaultSchema(SoapUI.class.getResource(root + "/xmime200411.xsd"));<NEW_LINE>loadDefaultSchema(SoapUI.class<MASK><NEW_LINE>loadDefaultSchema(SoapUI.class.getResource(root + "/soapEncoding.xsd"));<NEW_LINE>loadDefaultSchema(SoapUI.class.getResource(root + "/soapEnvelope12.xsd"));<NEW_LINE>loadDefaultSchema(SoapUI.class.getResource(root + "/soapEncoding12.xsd"));<NEW_LINE>String schemaDirectory = SoapUI.getSettings().getString(WsdlSettings.SCHEMA_DIRECTORY, null);<NEW_LINE>if (StringUtils.hasContent(schemaDirectory)) {<NEW_LINE>loadSchemaDirectory(schemaDirectory);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>SoapUI.logError(e);<NEW_LINE>} finally {<NEW_LINE>state.restore();<NEW_LINE>}<NEW_LINE>}
.getResource(root + "/soapEnvelope.xsd"));
1,054,109
public static IRubyObject inject(ThreadContext context, IRubyObject self, IRubyObject init, IRubyObject method, final Block block) {<NEW_LINE>final Ruby runtime = context.runtime;<NEW_LINE>if (block.isGiven())<NEW_LINE>runtime.getWarnings().warn(ID.BLOCK_UNUSED, "given block not used");<NEW_LINE>final String methodId = method.asJavaString();<NEW_LINE>final IRubyObject[] result = new IRubyObject[] { init };<NEW_LINE>callEach(context, eachSite(context), self, Signature.OPTIONAL, new BlockCallback() {<NEW_LINE><NEW_LINE>final MonomorphicCallSite site = new MonomorphicCallSite(methodId);<NEW_LINE><NEW_LINE>public IRubyObject call(ThreadContext ctx, IRubyObject[] largs, Block blk) {<NEW_LINE>return call(ctx, packEnumValues(ctx, largs), blk);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public IRubyObject call(ThreadContext ctx, IRubyObject larg, Block blk) {<NEW_LINE>result[0] = result[0] == null ? larg : site.call(ctx, self, result[0], larg);<NEW_LINE>return ctx.nil;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public IRubyObject call(ThreadContext ctx, IRubyObject larg) {<NEW_LINE>result[0] = result[0] == null ? larg : site.call(ctx, self<MASK><NEW_LINE>return ctx.nil;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return result[0] == null ? context.nil : result[0];<NEW_LINE>}
, result[0], larg);
995,610
public static DescribeFlowResponse unmarshall(DescribeFlowResponse describeFlowResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeFlowResponse.setRequestId(_ctx.stringValue("DescribeFlowResponse.RequestId"));<NEW_LINE>describeFlowResponse.setId(_ctx.stringValue("DescribeFlowResponse.Id"));<NEW_LINE>describeFlowResponse.setGmtCreate(_ctx.longValue("DescribeFlowResponse.GmtCreate"));<NEW_LINE>describeFlowResponse.setGmtModified(_ctx.longValue("DescribeFlowResponse.GmtModified"));<NEW_LINE>describeFlowResponse.setName(_ctx.stringValue("DescribeFlowResponse.Name"));<NEW_LINE>describeFlowResponse.setDescription(_ctx.stringValue("DescribeFlowResponse.Description"));<NEW_LINE>describeFlowResponse.setType(_ctx.stringValue("DescribeFlowResponse.Type"));<NEW_LINE>describeFlowResponse.setStatus(_ctx.stringValue("DescribeFlowResponse.Status"));<NEW_LINE>describeFlowResponse.setPeriodic<MASK><NEW_LINE>describeFlowResponse.setStartSchedule(_ctx.longValue("DescribeFlowResponse.StartSchedule"));<NEW_LINE>describeFlowResponse.setEndSchedule(_ctx.longValue("DescribeFlowResponse.EndSchedule"));<NEW_LINE>describeFlowResponse.setCronExpr(_ctx.stringValue("DescribeFlowResponse.CronExpr"));<NEW_LINE>describeFlowResponse.setCreateCluster(_ctx.booleanValue("DescribeFlowResponse.CreateCluster"));<NEW_LINE>describeFlowResponse.setClusterId(_ctx.stringValue("DescribeFlowResponse.ClusterId"));<NEW_LINE>describeFlowResponse.setHostName(_ctx.stringValue("DescribeFlowResponse.HostName"));<NEW_LINE>describeFlowResponse.setNamespace(_ctx.stringValue("DescribeFlowResponse.Namespace"));<NEW_LINE>describeFlowResponse.setLogArchiveLocation(_ctx.stringValue("DescribeFlowResponse.LogArchiveLocation"));<NEW_LINE>describeFlowResponse.setLifecycle(_ctx.stringValue("DescribeFlowResponse.Lifecycle"));<NEW_LINE>describeFlowResponse.setGraph(_ctx.stringValue("DescribeFlowResponse.Graph"));<NEW_LINE>describeFlowResponse.setCategoryId(_ctx.stringValue("DescribeFlowResponse.CategoryId"));<NEW_LINE>describeFlowResponse.setAlertConf(_ctx.stringValue("DescribeFlowResponse.AlertConf"));<NEW_LINE>describeFlowResponse.setAlertUserGroupBizId(_ctx.stringValue("DescribeFlowResponse.AlertUserGroupBizId"));<NEW_LINE>describeFlowResponse.setAlertDingDingGroupBizId(_ctx.stringValue("DescribeFlowResponse.AlertDingDingGroupBizId"));<NEW_LINE>describeFlowResponse.setApplication(_ctx.stringValue("DescribeFlowResponse.Application"));<NEW_LINE>describeFlowResponse.setEditLockDetail(_ctx.stringValue("DescribeFlowResponse.EditLockDetail"));<NEW_LINE>List<ParentFlow> parentFlowList = new ArrayList<ParentFlow>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeFlowResponse.ParentFlowList.Length"); i++) {<NEW_LINE>ParentFlow parentFlow = new ParentFlow();<NEW_LINE>parentFlow.setParentFlowId(_ctx.stringValue("DescribeFlowResponse.ParentFlowList[" + i + "].ParentFlowId"));<NEW_LINE>parentFlow.setParentFlowName(_ctx.stringValue("DescribeFlowResponse.ParentFlowList[" + i + "].ParentFlowName"));<NEW_LINE>parentFlow.setProjectId(_ctx.stringValue("DescribeFlowResponse.ParentFlowList[" + i + "].ProjectId"));<NEW_LINE>parentFlow.setProjectName(_ctx.stringValue("DescribeFlowResponse.ParentFlowList[" + i + "].ProjectName"));<NEW_LINE>parentFlowList.add(parentFlow);<NEW_LINE>}<NEW_LINE>describeFlowResponse.setParentFlowList(parentFlowList);<NEW_LINE>return describeFlowResponse;<NEW_LINE>}
(_ctx.booleanValue("DescribeFlowResponse.Periodic"));
1,693,652
/*<NEW_LINE>* Registration form submit<NEW_LINE>*/<NEW_LINE>private void submitForm() {<NEW_LINE>logDebug("submit form!");<NEW_LINE>DatabaseHandler dbH = DatabaseHandler.getDbHandler(context.getApplicationContext());<NEW_LINE>dbH.clearCredentials();<NEW_LINE>if (!validateForm()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);<NEW_LINE>imm.hideSoftInputFromWindow(userEmail.getWindowToken(), 0);<NEW_LINE>if (!isOnline(context)) {<NEW_LINE>((LoginActivity) context).showSnackbar(getString(R.string.error_server_connection_problem));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>createAccountLayout.setVisibility(View.GONE);<NEW_LINE>creatingAccountLayout.setVisibility(View.VISIBLE);<NEW_LINE>creatingAccountTextView.setVisibility(View.VISIBLE);<NEW_LINE>createAccountProgressBar.setVisibility(View.VISIBLE);<NEW_LINE>createAccountAndAcceptLayout.setVisibility(View.GONE);<NEW_LINE>final String email = userEmail.getText() != null ? userEmail.getText().toString().trim().toLowerCase(Locale.ENGLISH) : null;<NEW_LINE>final String password = userPassword.getText() != null ? userPassword.getText<MASK><NEW_LINE>final String name = userName.getText() != null ? userName.getText().toString() : null;<NEW_LINE>final String lastName = userLastName.getText() != null ? userLastName.getText().toString() : null;<NEW_LINE>MegaAttributes attributes = MegaApplication.getInstance().getDbH().getAttributes();<NEW_LINE>final long lastPublicHandle = attributes != null ? attributes.getLastPublicHandle() : INVALID_HANDLE;<NEW_LINE>if (lastPublicHandle == INVALID_HANDLE) {<NEW_LINE>megaApi.createAccount(email, password, name, lastName, this);<NEW_LINE>} else {<NEW_LINE>megaApi.createAccount(email, password, name, lastName, lastPublicHandle, attributes.getLastPublicHandleType(), attributes.getLastPublicHandleTimeStamp(), this);<NEW_LINE>}<NEW_LINE>}
().toString() : null;
60,965
protected static void interpretIntOp(AluInstr instr, Operation op, long[] fixnums, boolean[] booleans) {<NEW_LINE>TemporaryLocalVariable dst = (TemporaryLocalVariable) instr.getResult();<NEW_LINE>long i1 = getFixnumArg(fixnums, instr.getArg1());<NEW_LINE>long i2 = getFixnumArg(fixnums, instr.getArg2());<NEW_LINE>switch(op) {<NEW_LINE>case IADD:<NEW_LINE>setFixnumVar(<MASK><NEW_LINE>break;<NEW_LINE>case ISUB:<NEW_LINE>setFixnumVar(fixnums, dst, i1 - i2);<NEW_LINE>break;<NEW_LINE>case IMUL:<NEW_LINE>setFixnumVar(fixnums, dst, i1 * i2);<NEW_LINE>break;<NEW_LINE>case IDIV:<NEW_LINE>setFixnumVar(fixnums, dst, i1 / i2);<NEW_LINE>break;<NEW_LINE>case IOR:<NEW_LINE>setFixnumVar(fixnums, dst, i1 | i2);<NEW_LINE>break;<NEW_LINE>case IAND:<NEW_LINE>setFixnumVar(fixnums, dst, i1 & i2);<NEW_LINE>break;<NEW_LINE>case IXOR:<NEW_LINE>setFixnumVar(fixnums, dst, i1 ^ i2);<NEW_LINE>break;<NEW_LINE>case ISHL:<NEW_LINE>setFixnumVar(fixnums, dst, i1 << i2);<NEW_LINE>break;<NEW_LINE>case ISHR:<NEW_LINE>setFixnumVar(fixnums, dst, i1 >> i2);<NEW_LINE>break;<NEW_LINE>case ILT:<NEW_LINE>setBooleanVar(booleans, dst, i1 < i2);<NEW_LINE>break;<NEW_LINE>case IGT:<NEW_LINE>setBooleanVar(booleans, dst, i1 > i2);<NEW_LINE>break;<NEW_LINE>case IEQ:<NEW_LINE>setBooleanVar(booleans, dst, i1 == i2);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new RuntimeException("Unhandled int op: " + op + " for instr " + instr);<NEW_LINE>}<NEW_LINE>}
fixnums, dst, i1 + i2);
101,317
final BatchGetCustomDataIdentifiersResult executeBatchGetCustomDataIdentifiers(BatchGetCustomDataIdentifiersRequest batchGetCustomDataIdentifiersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchGetCustomDataIdentifiersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<BatchGetCustomDataIdentifiersRequest> request = null;<NEW_LINE>Response<BatchGetCustomDataIdentifiersResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new BatchGetCustomDataIdentifiersRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchGetCustomDataIdentifiersRequest));<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(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Macie2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchGetCustomDataIdentifiers");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<BatchGetCustomDataIdentifiersResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchGetCustomDataIdentifiersResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
305,056
private void queryDohServer(IpPacket ipPacket, Message dnsMsg, Name name) {<NEW_LINE>String dnsQueryName = name.toString(true);<NEW_LINE>InetAddress address = null;<NEW_LINE>try {<NEW_LINE>List<InetAddress> addresses = this.dnsOverHttps.lookup(dnsQueryName);<NEW_LINE>if (!addresses.isEmpty()) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} catch (UnknownHostException e) {<NEW_LINE>Timber.i(e, "Failed to query DNS Name %s.", dnsQueryName);<NEW_LINE>}<NEW_LINE>if (address == null) {<NEW_LINE>Timber.i("No address was found for DNS Name %s.", dnsQueryName);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Timber.i("handleDnsRequest: DNS Name %s redirected to %s.", dnsQueryName, address);<NEW_LINE>dnsMsg.getHeader().setFlag(Flags.QR);<NEW_LINE>dnsMsg.getHeader().setFlag(Flags.AA);<NEW_LINE>dnsMsg.getHeader().unsetFlag(Flags.RD);<NEW_LINE>dnsMsg.getHeader().setRcode(Rcode.NOERROR);<NEW_LINE>Record dnsRecord;<NEW_LINE>if (address instanceof Inet6Address) {<NEW_LINE>dnsRecord = new AAAARecord(name, DClass.IN, NEGATIVE_CACHE_TTL_SECONDS, address);<NEW_LINE>} else {<NEW_LINE>dnsRecord = new ARecord(name, DClass.IN, NEGATIVE_CACHE_TTL_SECONDS, address);<NEW_LINE>}<NEW_LINE>dnsMsg.addRecord(dnsRecord, Section.ANSWER);<NEW_LINE>handleDnsResponse(ipPacket, dnsMsg.toWire());<NEW_LINE>}
address = addresses.get(0);
785,116
public final void objectConstructionExpr() throws RecognitionException, TokenStreamException {<NEW_LINE>returnAST = null;<NEW_LINE>ASTPair currentAST = new ASTPair();<NEW_LINE>AST objectConstructionExpr_AST = null;<NEW_LINE>{<NEW_LINE>switch(LA(1)) {<NEW_LINE>case DOTDOT:<NEW_LINE>{<NEW_LINE>AST tmp47_AST = null;<NEW_LINE>tmp47_AST = astFactory<MASK><NEW_LINE>astFactory.addASTChild(currentAST, tmp47_AST);<NEW_LINE>match(DOTDOT);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case LBRACKET:<NEW_LINE>{<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>default:<NEW_LINE>{<NEW_LINE>throw new NoViableAltException(LT(1), getFilename());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>match(LBRACKET);<NEW_LINE>{<NEW_LINE>switch(LA(1)) {<NEW_LINE>case STRING:<NEW_LINE>{<NEW_LINE>AST tmp49_AST = null;<NEW_LINE>tmp49_AST = astFactory.create(LT(1));<NEW_LINE>astFactory.addASTChild(currentAST, tmp49_AST);<NEW_LINE>match(STRING);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case ID:<NEW_LINE>{<NEW_LINE>AST tmp50_AST = null;<NEW_LINE>tmp50_AST = astFactory.create(LT(1));<NEW_LINE>astFactory.addASTChild(currentAST, tmp50_AST);<NEW_LINE>match(ID);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>default:<NEW_LINE>{<NEW_LINE>throw new NoViableAltException(LT(1), getFilename());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>{<NEW_LINE>int _cnt36 = 0;<NEW_LINE>_loop36: do {<NEW_LINE>if ((LA(1) == COMMA)) {<NEW_LINE>match(COMMA);<NEW_LINE>{<NEW_LINE>switch(LA(1)) {<NEW_LINE>case STRING:<NEW_LINE>{<NEW_LINE>AST tmp52_AST = null;<NEW_LINE>tmp52_AST = astFactory.create(LT(1));<NEW_LINE>astFactory.addASTChild(currentAST, tmp52_AST);<NEW_LINE>match(STRING);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case ID:<NEW_LINE>{<NEW_LINE>AST tmp53_AST = null;<NEW_LINE>tmp53_AST = astFactory.create(LT(1));<NEW_LINE>astFactory.addASTChild(currentAST, tmp53_AST);<NEW_LINE>match(ID);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>default:<NEW_LINE>{<NEW_LINE>throw new NoViableAltException(LT(1), getFilename());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (_cnt36 >= 1) {<NEW_LINE>break _loop36;<NEW_LINE>} else {<NEW_LINE>throw new NoViableAltException(LT(1), getFilename());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>_cnt36++;<NEW_LINE>} while (true);<NEW_LINE>}<NEW_LINE>match(RBRACKET);<NEW_LINE>if (inputState.guessing == 0) {<NEW_LINE>objectConstructionExpr_AST = (AST) currentAST.root;<NEW_LINE>objectConstructionExpr_AST = (AST) astFactory.make((new ASTArray(2)).add(astFactory.create(OBJECT_CONSTRUCTION, "Object construction expression:")).add(objectConstructionExpr_AST));<NEW_LINE>currentAST.root = objectConstructionExpr_AST;<NEW_LINE>currentAST.child = objectConstructionExpr_AST != null && objectConstructionExpr_AST.getFirstChild() != null ? objectConstructionExpr_AST.getFirstChild() : objectConstructionExpr_AST;<NEW_LINE>currentAST.advanceChildToEnd();<NEW_LINE>}<NEW_LINE>objectConstructionExpr_AST = (AST) currentAST.root;<NEW_LINE>returnAST = objectConstructionExpr_AST;<NEW_LINE>}
.create(LT(1));
47,128
public Object visitNewClass(NewClassTree node, Object p) {<NEW_LINE>Element e = ctx.getInfo().getTrees().getElement(getCurrentPath());<NEW_LINE>if (e == null) {<NEW_LINE>return super.visitNewClass(node, p);<NEW_LINE>} else {<NEW_LINE>e = e.getEnclosingElement();<NEW_LINE>}<NEW_LINE>if (e != null && e.getKind().isClass()) {<NEW_LINE>Object r = scan(node.getEnclosingExpression(), p);<NEW_LINE>r = scanAndReduce(node.getIdentifier(), p, r);<NEW_LINE>r = scanAndReduce(node.getTypeArguments(), p, r);<NEW_LINE>r = scanAndReduce(node.getArguments(), p, r);<NEW_LINE>nestingLevel++;<NEW_LINE>enclosingElements.push((TypeElement) e);<NEW_LINE>r = scanAndReduce(node.<MASK><NEW_LINE>nestingLevel--;<NEW_LINE>enclosingElements.pop();<NEW_LINE>return r;<NEW_LINE>} else {<NEW_LINE>return super.visitNewClass(node, p);<NEW_LINE>}<NEW_LINE>}
getClassBody(), p, r);
1,135,335
private void initSourcesConn(DatabusSourcesConnection sourcesConn) {<NEW_LINE>if (null != sourcesConn) {<NEW_LINE>RelayPullThread rp = sourcesConn.getRelayPullThread();<NEW_LINE>BootstrapPullThread bp = sourcesConn.getBootstrapPullThread();<NEW_LINE>GenericDispatcher<DatabusCombinedConsumer> rd = sourcesConn.getRelayDispatcher();<NEW_LINE>GenericDispatcher<DatabusCombinedConsumer> bd = sourcesConn.getBootstrapDispatcher();<NEW_LINE>if (null != rp) {<NEW_LINE>setRelayPullerConnectionState(rp.getConnectionState().getStateId());<NEW_LINE>if (null != rp.getComponentStatus())<NEW_LINE>setRelayPullerComponentStatus(rp.getComponentStatus().getStatus());<NEW_LINE>setCurrentRelay(rp.getCurentServer());<NEW_LINE>setCandidateRelays(rp.getServers());<NEW_LINE>}<NEW_LINE>if (null != bp) {<NEW_LINE>setBootstrapPullerConnectionState(bp.getConnectionState().getStateId());<NEW_LINE>if (null != bp.getComponentStatus())<NEW_LINE>setBootstrapPullerComponentStatus(bp.getComponentStatus().getStatus());<NEW_LINE><MASK><NEW_LINE>setCandidateBootstrapServers(bp.getServers());<NEW_LINE>}<NEW_LINE>if (null != rd) {<NEW_LINE>if (null != rd.getComponentStatus())<NEW_LINE>setRelayDispatcherComponentStatus(rd.getComponentStatus().getStatus());<NEW_LINE>if (null != rd.getDispatcherState())<NEW_LINE>setRelayDispatcherConnectionState(rd.getDispatcherState().getStateId());<NEW_LINE>}<NEW_LINE>if (null != bd) {<NEW_LINE>if (null != bd.getComponentStatus())<NEW_LINE>setBootstrapDispatcherComponentStatus(bd.getComponentStatus().getStatus());<NEW_LINE>if (null != bd.getDispatcherState())<NEW_LINE>setBootstrapDispatcherConnectionState(bd.getDispatcherState().getStateId());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
setCurrentBootstrapServer(bp.getCurentServer());
1,025,066
public Builder mergeFrom(edu.stanford.nlp.pipeline.CoreNLPProtos.CorefChain other) {<NEW_LINE>if (other == edu.stanford.nlp.pipeline.CoreNLPProtos.CorefChain.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (other.hasChainID()) {<NEW_LINE>setChainID(other.getChainID());<NEW_LINE>}<NEW_LINE>if (mentionBuilder_ == null) {<NEW_LINE>if (!other.mention_.isEmpty()) {<NEW_LINE>if (mention_.isEmpty()) {<NEW_LINE>mention_ = other.mention_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000002);<NEW_LINE>} else {<NEW_LINE>ensureMentionIsMutable();<NEW_LINE>mention_.addAll(other.mention_);<NEW_LINE>}<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (!other.mention_.isEmpty()) {<NEW_LINE>if (mentionBuilder_.isEmpty()) {<NEW_LINE>mentionBuilder_.dispose();<NEW_LINE>mentionBuilder_ = null;<NEW_LINE>mention_ = other.mention_;<NEW_LINE><MASK><NEW_LINE>mentionBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getMentionFieldBuilder() : null;<NEW_LINE>} else {<NEW_LINE>mentionBuilder_.addAllMessages(other.mention_);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (other.hasRepresentative()) {<NEW_LINE>setRepresentative(other.getRepresentative());<NEW_LINE>}<NEW_LINE>this.mergeUnknownFields(other.unknownFields);<NEW_LINE>onChanged();<NEW_LINE>return this;<NEW_LINE>}
bitField0_ = (bitField0_ & ~0x00000002);
693,125
final CreateAssetResult executeCreateAsset(CreateAssetRequest createAssetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createAssetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateAssetRequest> request = null;<NEW_LINE>Response<CreateAssetResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateAssetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createAssetRequest));<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, "IoTSiteWise");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateAsset");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>URI endpointTraitHost = null;<NEW_LINE>if (!clientConfiguration.isDisableHostPrefixInjection()) {<NEW_LINE>String hostPrefix = "api.";<NEW_LINE>String <MASK><NEW_LINE>endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateAssetResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateAssetResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
resolvedHostPrefix = String.format("api.");
473,918
public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>if (player == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>List<Integer> results = player.rollDice(outcome, source, <MASK><NEW_LINE>int firstResult = results.get(0);<NEW_LINE>int secondResult = results.get(1);<NEW_LINE>int first, second;<NEW_LINE>if (firstResult != secondResult && player.chooseUse(outcome, "Choose a number of cards to draw", "The other number will be the maximum mana value of the spell you cast", "" + firstResult, "" + secondResult, source, game)) {<NEW_LINE>first = firstResult;<NEW_LINE>second = secondResult;<NEW_LINE>} else {<NEW_LINE>first = secondResult;<NEW_LINE>second = firstResult;<NEW_LINE>}<NEW_LINE>player.drawCards(first, source, game);<NEW_LINE>FilterCard filter = new FilterInstantOrSorceryCard();<NEW_LINE>filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, second + 1));<NEW_LINE>CardUtil.castSpellWithAttributesForFree(player, source, game, new CardsImpl(player.getHand()), filter);<NEW_LINE>return true;<NEW_LINE>}
game, 8, 2, 0);
8,491
public void checkAndDoUpdate() throws UserException {<NEW_LINE>Database database = Catalog.getCurrentCatalog().getDbNullable(dbId);<NEW_LINE>if (database == null) {<NEW_LINE>if (!isCompleted()) {<NEW_LINE>String msg = "The database has been deleted. Change job state to cancelled";<NEW_LINE>LOG.warn(new LogBuilder(LogKey.SYNC_JOB, id).add("database", dbId).add("msg", msg).build());<NEW_LINE>cancel(MsgType.SCHEDULE_FAIL, msg);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (ChannelDescription channelDescription : channelDescriptions) {<NEW_LINE>Table table = database.getTableNullable(channelDescription.getTargetTable());<NEW_LINE>if (table == null) {<NEW_LINE>if (!isCompleted()) {<NEW_LINE>String msg = "The table has been deleted. Change job state to cancelled";<NEW_LINE>LOG.warn(new LogBuilder(LogKey.SYNC_JOB, id).add("dbId", dbId).add("table", channelDescription.getTargetTable()).add("msg", msg).build());<NEW_LINE>cancel(MsgType.SCHEDULE_FAIL, msg);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (isNeedReschedule()) {<NEW_LINE>LOG.info(new LogBuilder(LogKey.SYNC_JOB, id).add("msg"<MASK><NEW_LINE>updateState(JobState.PENDING, false);<NEW_LINE>}<NEW_LINE>}
, "Job need to be scheduled").build());
347,732
private void _buildSQL(String fileName) throws IOException {<NEW_LINE>File file = new File("../sql/" + fileName + ".sql");<NEW_LINE>if (!file.exists()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Template<NEW_LINE>String template = FileUtil.read(file);<NEW_LINE>// DB2<NEW_LINE>String db2 = StringUtil.replace(template, _TEMPLATE, _DB2);<NEW_LINE>db2 = _removeLongInserts(db2);<NEW_LINE>db2 = _removeNull(db2);<NEW_LINE>FileUtil.write("../sql/" + fileName + "/" + fileName + "-db2.sql", db2);<NEW_LINE>// Firebird<NEW_LINE>String firebird = StringUtil.replace(template, _TEMPLATE, _FIREBIRD);<NEW_LINE>firebird = _removeLongInserts(firebird);<NEW_LINE>firebird = _removeNull(firebird);<NEW_LINE>firebird = StringUtil.replace(firebird, "varchar(100)", "varchar(60)");<NEW_LINE>FileUtil.write("../sql/" + fileName + "/" + fileName + "-firebird.sql", firebird);<NEW_LINE>// Hypersonic<NEW_LINE>String hypersonic = StringUtil.replace(template, _TEMPLATE, _HYPERSONIC);<NEW_LINE>FileUtil.write("../sql/" + fileName + "/" + fileName + "-hypersonic.sql", hypersonic);<NEW_LINE>// InterBase<NEW_LINE>FileUtil.write("../sql/" + fileName + "/" + fileName + "-interbase.sql", firebird);<NEW_LINE>// JDataStore<NEW_LINE>String jDataStore = StringUtil.replace(template, _TEMPLATE, _JDATASTORE);<NEW_LINE>jDataStore = _removeLongInserts(jDataStore);<NEW_LINE>FileUtil.write("../sql/" + fileName + "/" + fileName + "-jdatastore.sql", jDataStore);<NEW_LINE>// MySQL<NEW_LINE>String mysql = StringUtil.replace(template, _TEMPLATE, _MYSQL);<NEW_LINE>FileUtil.write("../sql/" + fileName + "/" + fileName + "-mysql.sql", mysql);<NEW_LINE>// Oracle<NEW_LINE>String oracle = StringUtil.replace(template, _TEMPLATE, _ORACLE);<NEW_LINE>oracle = _removeLongInserts(oracle);<NEW_LINE>FileUtil.write("../sql/" + fileName + "/" + fileName + "-oracle.sql", oracle);<NEW_LINE>// PostgreSQL<NEW_LINE>String postgresql = StringUtil.replace(template, _TEMPLATE, _POSTGRESQL);<NEW_LINE>FileUtil.write("../sql/" + fileName + "/" + fileName + "-postgresql.sql", postgresql);<NEW_LINE>// SAP<NEW_LINE>String sap = StringUtil.replace(template, _TEMPLATE, _SAP);<NEW_LINE>FileUtil.write("../sql/" + fileName + "/" + fileName + "-sap.sql", sap);<NEW_LINE>// SQL Server<NEW_LINE>String sqlServer = StringUtil.<MASK><NEW_LINE>FileUtil.write("../sql/" + fileName + "/" + fileName + "-sql-server.sql", sqlServer);<NEW_LINE>}
replace(template, _TEMPLATE, _SQL_SERVER);
144,859
private void readZapAddOnXmlFile(ZapAddOnXmlFile zapAddOnXml) {<NEW_LINE>this.name = zapAddOnXml.getName();<NEW_LINE>this.version = zapAddOnXml.getVersion();<NEW_LINE>this.semVer = zapAddOnXml.getSemVer();<NEW_LINE>this.status = AddOn.Status.valueOf(zapAddOnXml.getStatus());<NEW_LINE>this.description = zapAddOnXml.getDescription();<NEW_LINE>this.changes = zapAddOnXml.getChanges();<NEW_LINE>this.author = zapAddOnXml.getAuthor();<NEW_LINE>this.notBeforeVersion = zapAddOnXml.getNotBeforeVersion();<NEW_LINE>this.notFromVersion = zapAddOnXml.getNotFromVersion();<NEW_LINE>this.dependencies = zapAddOnXml.getDependencies();<NEW_LINE>this.info = createUrl(zapAddOnXml.getUrl());<NEW_LINE>this.repo = createUrl(zapAddOnXml.getRepo());<NEW_LINE>this.ascanrules = zapAddOnXml.getAscanrules();<NEW_LINE>this.extensions = zapAddOnXml.getExtensions();<NEW_LINE>this.extensionsWithDeps = zapAddOnXml.getExtensionsWithDeps();<NEW_LINE>this.files = zapAddOnXml.getFiles();<NEW_LINE>this.libs = createLibs(zapAddOnXml.getLibs());<NEW_LINE>this.pscanrules = zapAddOnXml.getPscanrules();<NEW_LINE>this.addOnClassnames = zapAddOnXml.getAddOnClassnames();<NEW_LINE>String bundleBaseName = zapAddOnXml.getBundleBaseName();<NEW_LINE>if (!bundleBaseName.isEmpty()) {<NEW_LINE>bundleData = new BundleData(<MASK><NEW_LINE>}<NEW_LINE>String helpSetBaseName = zapAddOnXml.getHelpSetBaseName();<NEW_LINE>if (!helpSetBaseName.isEmpty()) {<NEW_LINE>this.helpSetData = new HelpSetData(helpSetBaseName, zapAddOnXml.getHelpSetLocaleToken());<NEW_LINE>}<NEW_LINE>hasZapAddOnEntry = true;<NEW_LINE>}
bundleBaseName, zapAddOnXml.getBundlePrefix());
1,213,163
private static void recreateAllTableIndexes(Handle handle, Map<String, Map<String, Set<String>>> tableWiseIndexesMap) {<NEW_LINE>for (Map.Entry<String, Map<String, Set<String>>> tableIndexesMap : tableWiseIndexesMap.entrySet()) {<NEW_LINE>for (Map.Entry<String, Set<String>> indexesMap : tableIndexesMap.getValue().entrySet()) {<NEW_LINE>handle.createUpdate(String.format("IF NOT EXISTS (SELECT * FROM sys.indexes WHERE name = '%s') " + "BEGIN " + "CREATE NONCLUSTERED INDEX \"%s\" ON \"%s\" (%s) " + "END", indexesMap.getKey(), indexesMap.getKey(), tableIndexesMap.getKey(), indexesMap.getValue().stream().map(word -> "\"" + word + "\"").collect(Collectors.joining(","<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
)))).execute();
1,394,991
protected void initEnvironment() {<NEW_LINE>if (props == null) {<NEW_LINE>_logger.debug("PROVIDER_URL {}", providerUrl);<NEW_LINE>_logger.debug("SECURITY_PRINCIPAL {}", principal);<NEW_LINE>// no log credentials<NEW_LINE>// _logger.trace("SECURITY_CREDENTIALS {}" , credentials);<NEW_LINE>// LDAP<NEW_LINE>props = new Properties();<NEW_LINE>props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");<NEW_LINE>props.<MASK><NEW_LINE>props.setProperty(Context.REFERRAL, referral);<NEW_LINE>props.setProperty(Context.SECURITY_AUTHENTICATION, "simple");<NEW_LINE>props.setProperty(Context.PROVIDER_URL, providerUrl);<NEW_LINE>if (domain.indexOf(".") > -1) {<NEW_LINE>activeDirectoryDomain = domain.substring(0, domain.indexOf("."));<NEW_LINE>} else {<NEW_LINE>activeDirectoryDomain = domain;<NEW_LINE>}<NEW_LINE>_logger.info("PROVIDER_DOMAIN:" + activeDirectoryDomain + " for " + domain);<NEW_LINE>String activeDirectoryPrincipal = activeDirectoryDomain + "\\" + principal;<NEW_LINE>_logger.debug("Active Directory SECURITY_PRINCIPAL : " + activeDirectoryPrincipal);<NEW_LINE>props.setProperty(Context.SECURITY_PRINCIPAL, activeDirectoryPrincipal);<NEW_LINE>props.setProperty(Context.SECURITY_CREDENTIALS, credentials);<NEW_LINE>if (ssl && providerUrl.toLowerCase().startsWith("ldaps")) {<NEW_LINE>_logger.info("ldaps security protocol.");<NEW_LINE>System.setProperty("javax.net.ssl.trustStore", trustStore);<NEW_LINE>System.setProperty("javax.net.ssl.trustStorePassword", trustStorePassword);<NEW_LINE>props.put(Context.SECURITY_PROTOCOL, "ssl");<NEW_LINE>}<NEW_LINE>props.put(Context.REFERRAL, "follow");<NEW_LINE>}<NEW_LINE>}
setProperty(Context.URL_PKG_PREFIXES, "com.sun.jndi.url");
211,037
public void read(org.apache.thrift.protocol.TProtocol prot, TableInfo struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet incoming = iprot.readBitSet(12);<NEW_LINE>if (incoming.get(0)) {<NEW_LINE>struct.recs = iprot.readI64();<NEW_LINE>struct.setRecsIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(1)) {<NEW_LINE>struct.recsInMemory = iprot.readI64();<NEW_LINE>struct.setRecsInMemoryIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(2)) {<NEW_LINE>struct<MASK><NEW_LINE>struct.setTabletsIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(3)) {<NEW_LINE>struct.onlineTablets = iprot.readI32();<NEW_LINE>struct.setOnlineTabletsIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(4)) {<NEW_LINE>struct.ingestRate = iprot.readDouble();<NEW_LINE>struct.setIngestRateIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(5)) {<NEW_LINE>struct.ingestByteRate = iprot.readDouble();<NEW_LINE>struct.setIngestByteRateIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(6)) {<NEW_LINE>struct.queryRate = iprot.readDouble();<NEW_LINE>struct.setQueryRateIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(7)) {<NEW_LINE>struct.queryByteRate = iprot.readDouble();<NEW_LINE>struct.setQueryByteRateIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(8)) {<NEW_LINE>struct.minors = new Compacting();<NEW_LINE>struct.minors.read(iprot);<NEW_LINE>struct.setMinorsIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(9)) {<NEW_LINE>struct.majors = new Compacting();<NEW_LINE>struct.majors.read(iprot);<NEW_LINE>struct.setMajorsIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(10)) {<NEW_LINE>struct.scans = new Compacting();<NEW_LINE>struct.scans.read(iprot);<NEW_LINE>struct.setScansIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(11)) {<NEW_LINE>struct.scanRate = iprot.readDouble();<NEW_LINE>struct.setScanRateIsSet(true);<NEW_LINE>}<NEW_LINE>}
.tablets = iprot.readI32();
704,680
private void initBuffer() {<NEW_LINE>logger.info("Initializing display (if last line in log then likely the game crashed from an issue with your " + "video card)");<NEW_LINE>if (!config.isVSync()) {<NEW_LINE>GLFW.glfwSwapInterval(0);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>String root = "org/terasology/icons/";<NEW_LINE>ClassLoader classLoader = getClass().getClassLoader();<NEW_LINE>BufferedImage icon16 = ImageIO.read(classLoader.getResourceAsStream(root + "gooey_sweet_16.png"));<NEW_LINE>BufferedImage icon32 = ImageIO.read(classLoader.getResourceAsStream(root + "gooey_sweet_32.png"));<NEW_LINE>BufferedImage icon64 = ImageIO.read(classLoader.getResourceAsStream(root + "gooey_sweet_64.png"));<NEW_LINE>BufferedImage icon128 = ImageIO.read(classLoader.getResourceAsStream(root + "gooey_sweet_128.png"));<NEW_LINE>GLFWImage.Buffer buffer = GLFWImage.create(4);<NEW_LINE>buffer.put(0, LwjglGraphicsUtil.convertToGLFWFormat(icon16));<NEW_LINE>buffer.put(1, LwjglGraphicsUtil.convertToGLFWFormat(icon32));<NEW_LINE>buffer.put(2, LwjglGraphicsUtil.convertToGLFWFormat(icon64));<NEW_LINE>buffer.put(3, LwjglGraphicsUtil.convertToGLFWFormat(icon128));<NEW_LINE>} catch (IOException | IllegalArgumentException e) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>display.setDisplayModeSetting(config.getDisplayModeSetting());<NEW_LINE>}
logger.warn("Could not set icon", e);
1,062,781
public WorkerPipeline.SourceStep<SimpleFeature> read() {<NEW_LINE>return next -> {<NEW_LINE>long id = 0;<NEW_LINE>// pass every element in every table through the profile<NEW_LINE>var tables = tableNames();<NEW_LINE>for (int i = 0; i < tables.size(); i++) {<NEW_LINE>String table = tables.get(i);<NEW_LINE>LOGGER.trace("Naturalearth loading " + i + "/" + tables.<MASK><NEW_LINE>try (Statement statement = conn.createStatement()) {<NEW_LINE>ResultSet rs = statement.executeQuery("select * from " + table + ";");<NEW_LINE>String[] column = new String[rs.getMetaData().getColumnCount()];<NEW_LINE>int geometryColumn = -1;<NEW_LINE>for (int c = 0; c < column.length; c++) {<NEW_LINE>String name = rs.getMetaData().getColumnName(c + 1);<NEW_LINE>column[c] = name;<NEW_LINE>if ("GEOMETRY".equals(name)) {<NEW_LINE>geometryColumn = c;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (geometryColumn >= 0) {<NEW_LINE>while (rs.next()) {<NEW_LINE>byte[] geometry = rs.getBytes(geometryColumn + 1);<NEW_LINE>if (geometry == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// create the feature and pass to next stage<NEW_LINE>Geometry latLonGeometry = GeoUtils.WKB_READER.read(geometry);<NEW_LINE>SimpleFeature readerGeometry = SimpleFeature.create(latLonGeometry, new HashMap<>(column.length - 1), sourceName, table, id);<NEW_LINE>for (int c = 0; c < column.length; c++) {<NEW_LINE>if (c != geometryColumn) {<NEW_LINE>Object value = rs.getObject(c + 1);<NEW_LINE>String key = column[c];<NEW_LINE>readerGeometry.setTag(key, value);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>next.accept(readerGeometry);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
size() + ": " + table);
1,329,846
public SamlIdentityProviderBuilder fromSettings(Environment env) {<NEW_LINE>final Settings settings = env.settings();<NEW_LINE>this.entityId = require(settings, IDP_ENTITY_ID);<NEW_LINE>this.ssoEndpoints = new HashMap<>();<NEW_LINE>this.sloEndpoints = new HashMap<>();<NEW_LINE>this.ssoEndpoints.put(SAML2_REDIRECT_BINDING_URI, requiredUrl(settings, IDP_SSO_REDIRECT_ENDPOINT));<NEW_LINE>if (IDP_SSO_POST_ENDPOINT.exists(settings)) {<NEW_LINE>this.ssoEndpoints.put(SAML2_POST_BINDING_URI<MASK><NEW_LINE>}<NEW_LINE>if (IDP_SLO_POST_ENDPOINT.exists(settings)) {<NEW_LINE>this.sloEndpoints.put(SAML2_POST_BINDING_URI, IDP_SLO_POST_ENDPOINT.get(settings));<NEW_LINE>}<NEW_LINE>if (IDP_SLO_REDIRECT_ENDPOINT.exists(settings)) {<NEW_LINE>this.sloEndpoints.put(SAML2_REDIRECT_BINDING_URI, IDP_SLO_REDIRECT_ENDPOINT.get(settings));<NEW_LINE>}<NEW_LINE>this.allowedNameIdFormats = new HashSet<>(IDP_ALLOWED_NAMEID_FORMATS.get(settings));<NEW_LINE>this.signingCredential = buildSigningCredential(env, settings, "xpack.idp.signing.");<NEW_LINE>this.metadataSigningCredential = buildSigningCredential(env, settings, "xpack.idp.metadata_signing.");<NEW_LINE>this.technicalContact = buildContactInfo(settings);<NEW_LINE>this.organization = buildOrganization(settings);<NEW_LINE>return this;<NEW_LINE>}
, IDP_SSO_POST_ENDPOINT.get(settings));
537,150
private void linkRuleToHashedBuckOut(BuildRule rule, SourcePathResolverAdapter pathResolver, boolean buckOutCompatLink, OutputLabel outputLabel, HashedBuckOutLinkMode linkMode) throws IOException {<NEW_LINE>Optional<Path> outputPath = PathUtils.getUserFacingOutputPath(pathResolver, rule, buckOutCompatLink, outputLabel, showOutputs);<NEW_LINE>if (!outputPath.isPresent()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Path absolutePathWithHash = outputPath.get().toAbsolutePath();<NEW_LINE>Optional<Path> maybeAbsolutePathWithoutHash = BuildPaths.removeHashFrom(<MASK><NEW_LINE>if (!maybeAbsolutePathWithoutHash.isPresent()) {<NEW_LINE>// hash was not found, for example `export_file` rule outputs files in source directory, not<NEW_LINE>// in buck-out<NEW_LINE>// so we don't create any links<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Path absolutePathWithoutHash = maybeAbsolutePathWithoutHash.get();<NEW_LINE>MostFiles.deleteRecursivelyIfExists(absolutePathWithoutHash);<NEW_LINE>Files.createDirectories(absolutePathWithoutHash.getParent());<NEW_LINE>switch(linkMode) {<NEW_LINE>case SYMLINK:<NEW_LINE>Files.createSymbolicLink(absolutePathWithoutHash, absolutePathWithHash);<NEW_LINE>break;<NEW_LINE>case HARDLINK:<NEW_LINE>boolean isDirectory;<NEW_LINE>try {<NEW_LINE>isDirectory = Files.readAttributes(absolutePathWithHash, BasicFileAttributes.class).isDirectory();<NEW_LINE>} catch (NoSuchFileException e) {<NEW_LINE>// Rule did not produce a file.<NEW_LINE>// It should not be possible, but it happens.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (isDirectory) {<NEW_LINE>Files.createSymbolicLink(absolutePathWithoutHash, absolutePathWithHash);<NEW_LINE>} else {<NEW_LINE>Files.createLink(absolutePathWithoutHash, absolutePathWithHash);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case NONE:<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}
absolutePathWithHash, rule.getBuildTarget());
135,355
public int compareTo(final Key<?> other) {<NEW_LINE>if (this.raw == other.raw) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>{<NEW_LINE>final int result = this.raw.getProjectId().compareTo(other.raw.getProjectId());<NEW_LINE>if (result != 0)<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>{<NEW_LINE>final int result = this.raw.getNamespace().compareTo(other.raw.getNamespace());<NEW_LINE>if (result != 0)<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>{<NEW_LINE>final int result = this.compareAncestors(other);<NEW_LINE>if (result != 0)<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>{<NEW_LINE>// Too bad PathElement and Key don't share any kind of interface grrr<NEW_LINE>final int result = this.getRaw().getKind().compareTo(other.<MASK><NEW_LINE>if (result != 0) {<NEW_LINE>return result;<NEW_LINE>} else if (this.raw.getNameOrId() == null && other.raw.getNameOrId() == null) {<NEW_LINE>return compareToWithIdentityHash(this.raw, other.raw);<NEW_LINE>} else if (this.raw.hasId()) {<NEW_LINE>return other.raw.hasId() ? Long.compare(this.raw.getId(), other.raw.getId()) : -1;<NEW_LINE>} else {<NEW_LINE>return other.raw.hasId() ? 1 : this.raw.getName().compareTo(other.raw.getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getRaw().getKind());
645,874
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {<NEW_LINE>DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();<NEW_LINE>WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);<NEW_LINE>if (warMetaData == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>JBossWebMetaData webMetaData = warMetaData.getMergedJBossWebMetaData();<NEW_LINE>if (webMetaData == null) {<NEW_LINE>webMetaData = new JBossWebMetaData();<NEW_LINE>warMetaData.setMergedJBossWebMetaData(webMetaData);<NEW_LINE>}<NEW_LINE>// otherwise<NEW_LINE>LoginConfigMetaData loginConfig = webMetaData.getLoginConfig();<NEW_LINE>try {<NEW_LINE>boolean webRequiresKC = loginConfig != null && "KEYCLOAK-SAML".equalsIgnoreCase(loginConfig.getAuthMethod());<NEW_LINE>boolean hasSubsystemConfig = Configuration.INSTANCE.isSecureDeployment(deploymentUnit);<NEW_LINE>if (hasSubsystemConfig || webRequiresKC) {<NEW_LINE>log.debug("Setting up KEYCLOAK-SAML auth method for WAR: " + deploymentUnit.getName());<NEW_LINE>// if secure-deployment configuration exists for web app, we force KEYCLOAK-SAML auth method on it<NEW_LINE>if (hasSubsystemConfig) {<NEW_LINE>addXMLData<MASK><NEW_LINE>if (loginConfig != null) {<NEW_LINE>loginConfig.setAuthMethod("KEYCLOAK-SAML");<NEW_LINE>// loginConfig.setRealmName(service.getRealmName(deploymentName));<NEW_LINE>} else {<NEW_LINE>log.warn("Failed to set up KEYCLOAK-SAML auth method for WAR: " + deploymentUnit.getName() + " (loginConfig == null)");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>addValve(webMetaData);<NEW_LINE>KeycloakLogger.ROOT_LOGGER.deploymentSecured(deploymentUnit.getName());<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new DeploymentUnitProcessingException("Failed to configure KeycloakSamlExtension from subsystem model", e);<NEW_LINE>}<NEW_LINE>}
(getXML(deploymentUnit), warMetaData);
441,806
public ESat isEntailed() {<NEW_LINE>int lb = index.getLB();<NEW_LINE>int ub = index.getUB();<NEW_LINE>int min = MAX_VALUE / 2;<NEW_LINE>int max = MIN_VALUE / 2;<NEW_LINE>int val = var.getLB();<NEW_LINE>boolean exists = false;<NEW_LINE>for (int i = lb; i <= ub; i = index.nextValue(i)) {<NEW_LINE><MASK><NEW_LINE>if (j >= 2 && j < vars.length) {<NEW_LINE>min = min(min, vars[j].getLB());<NEW_LINE>max = max(max, vars[j].getUB());<NEW_LINE>exists |= vars[j].contains(val);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (min > var.getUB() || max < var.getLB()) {<NEW_LINE>return ESat.FALSE;<NEW_LINE>}<NEW_LINE>if (var.isInstantiated() && !exists) {<NEW_LINE>return ESat.FALSE;<NEW_LINE>}<NEW_LINE>if (var.isInstantiated() && min == max) {<NEW_LINE>return ESat.TRUE;<NEW_LINE>}<NEW_LINE>return ESat.UNDEFINED;<NEW_LINE>}
int j = 2 + i - offset;
1,627,764
public ActivityTimedOutEventDetails unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ActivityTimedOutEventDetails activityTimedOutEventDetails = new ActivityTimedOutEventDetails();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("error", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>activityTimedOutEventDetails.setError(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("cause", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>activityTimedOutEventDetails.setCause(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 activityTimedOutEventDetails;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,252,407
void upgrade(File directory) {<NEW_LINE>synchronized (KinesisRecorder.this) {<NEW_LINE>final File recordsDir = new File(directory, Constants.RECORDS_DIRECTORY);<NEW_LINE>final File oldRecordsFile = new File(recordsDir, Constants.RECORDS_FILE_NAME);<NEW_LINE>if (!oldRecordsFile.isFile()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// iterate through all records in the old records file<NEW_LINE>final FileRecordStore frs = new FileRecordStore(directory, <MASK><NEW_LINE>final RecordIterator iterator = frs.iterator();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>try {<NEW_LINE>final JSONObject json = new JSONObject(iterator.next());<NEW_LINE>saveRecord(JSONRecordAdapter.getData(json).array(), JSONRecordAdapter.getStreamName(json));<NEW_LINE>} catch (final JSONException e) {<NEW_LINE>LOGGER.debug("caught exception", e);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>iterator.close();<NEW_LINE>} catch (final IOException e) {<NEW_LINE>LOGGER.debug("caught exception", e);<NEW_LINE>}<NEW_LINE>oldRecordsFile.delete();<NEW_LINE>}<NEW_LINE>}
Constants.RECORDS_FILE_NAME, Long.MAX_VALUE);
1,639,550
public void run() {<NEW_LINE>if (ServerRegistry.getInstance().getServerInstance(url) == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Target target = _retrieveTarget(null);<NEW_LINE>ServerDebugInfo sdi = getServerDebugInfo(target);<NEW_LINE>if (sdi == null) {<NEW_LINE>LOGGER.log(Level.FINE, "DebuggerInfo cannot be found for: " + ServerInstance.this);<NEW_LINE>// give it up<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>AttachingDICookie attCookie = (AttachingDICookie) session.lookupFirst(null, AttachingDICookie.class);<NEW_LINE>if (attCookie == null) {<NEW_LINE>LOGGER.log(Level.FINE, "AttachingDICookie cannot be found for: " + ServerInstance.this);<NEW_LINE>// give it up<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (ServerDebugInfo.TRANSPORT_SHMEM.equals(sdi.getTransport())) {<NEW_LINE><MASK><NEW_LINE>if (shmem != null && shmem.equalsIgnoreCase(sdi.getShmemName())) {<NEW_LINE>registerListener(session);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>String host = attCookie.getHostName();<NEW_LINE>if (host != null && isSameHost(host, sdi.getHost()) && attCookie.getPortNumber() == sdi.getPort()) {<NEW_LINE>registerListener(session);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
String shmem = attCookie.getSharedMemoryName();
1,339,556
public void read(org.apache.thrift.protocol.TProtocol iprot, ping_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TField schemeField;<NEW_LINE>iprot.readStructBegin();<NEW_LINE>while (true) {<NEW_LINE>schemeField = iprot.readFieldBegin();<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>switch(schemeField.id) {<NEW_LINE>case // CREDENTIALS<NEW_LINE>2:<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {<NEW_LINE>struct.credentials = new org.apache.accumulo.core.securityImpl.thrift.TCredentials();<NEW_LINE>struct.credentials.read(iprot);<NEW_LINE>struct.setCredentialsIsSet(true);<NEW_LINE>} else {<NEW_LINE>org.apache.thrift.protocol.TProtocolUtil.<MASK><NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);<NEW_LINE>}<NEW_LINE>iprot.readFieldEnd();<NEW_LINE>}<NEW_LINE>iprot.readStructEnd();<NEW_LINE>// check for required fields of primitive type, which can't be checked in the validate method<NEW_LINE>struct.validate();<NEW_LINE>}
skip(iprot, schemeField.type);
1,035,788
private static void addListenerStoreEntries(List<Map<String, String>> storeEntries, List<Map<String, String>> listenerStoreEntries) {<NEW_LINE>String instanceStore = storeEntries.get(0).get("store");<NEW_LINE>for (Map<String, String> listenerStoreEntry : listenerStoreEntries) {<NEW_LINE>// Add to list if unique store<NEW_LINE>if (!listenerStoreEntry.get("store").equals(instanceStore)) {<NEW_LINE>storeEntries.add(listenerStoreEntry);<NEW_LINE>} else {<NEW_LINE>// if store isn't unique, add name to "usedBy"<NEW_LINE>for (Map<String, String> storeEntry : storeEntries) {<NEW_LINE>if (storeEntry.get("alias").equals(listenerStoreEntry.get("alias"))) {<NEW_LINE>storeEntry.put("usedBy", storeEntry.get("usedBy") + "," <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
+ listenerStoreEntry.get("usedBy"));
1,138,918
private boolean copyDependencies() throws IOException {<NEW_LINE>boolean result = true;<NEW_LINE>projectCopy.setResourceRoot("${projectDir}");<NEW_LINE>List<ExternalDependency> dependencies = projectCopy.getExternalDependencies();<NEW_LINE>for (ExternalDependency dependency : dependencies) {<NEW_LINE>switch(dependency.getType()) {<NEW_LINE>case FILE:<NEW_LINE>File originalDependency = new File(dependency.getPath());<NEW_LINE>if (originalDependency.exists()) {<NEW_LINE>File targetDependency = new File(tmpDir, originalDependency.getName());<NEW_LINE>FileUtils.copyFile(originalDependency, targetDependency);<NEW_LINE>dependency.updatePath(targetDependency.getPath());<NEW_LINE>} else {<NEW_LINE>SoapUI.log.warn("Do not exists on local file system [" + originalDependency.getPath() + "]");<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case FOLDER:<NEW_LINE>originalDependency = new File(dependency.getPath());<NEW_LINE>File targetDependency = new File(tmpDir, originalDependency.getName());<NEW_LINE>targetDependency.mkdir();<NEW_LINE>FileUtils.<MASK><NEW_LINE>dependency.updatePath(targetDependency.getPath());<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
copyDirectory(originalDependency, targetDependency, false);
1,320,590
public BounceAction unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>BounceAction bounceAction = new BounceAction();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_LINE>while (true) {<NEW_LINE>XMLEvent xmlEvent = context.nextEvent();<NEW_LINE>if (xmlEvent.isEndDocument())<NEW_LINE>return bounceAction;<NEW_LINE>if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {<NEW_LINE>if (context.testExpression("TopicArn", targetDepth)) {<NEW_LINE>bounceAction.setTopicArn(StringStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("SmtpReplyCode", targetDepth)) {<NEW_LINE>bounceAction.setSmtpReplyCode(StringStaxUnmarshaller.getInstance<MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("StatusCode", targetDepth)) {<NEW_LINE>bounceAction.setStatusCode(StringStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("Message", targetDepth)) {<NEW_LINE>bounceAction.setMessage(StringStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("Sender", targetDepth)) {<NEW_LINE>bounceAction.setSender(StringStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>} else if (xmlEvent.isEndElement()) {<NEW_LINE>if (context.getCurrentDepth() < originalDepth) {<NEW_LINE>return bounceAction;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
().unmarshall(context));
200,491
public OResultSet syncPull(OCommandContext ctx, int nRecords) throws OTimeoutException {<NEW_LINE>getPrev().ifPresent(x -> x.syncPull(ctx, nRecords));<NEW_LINE>return new OResultSet() {<NEW_LINE><NEW_LINE>private int internalNext = 0;<NEW_LINE><NEW_LINE>private void fetchNext() {<NEW_LINE>if (nextResult != null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>ORecordId nextRid = iterator.next();<NEW_LINE>if (nextRid == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>OIdentifiable nextDoc = (OIdentifiable) ctx.getDatabase().load(nextRid);<NEW_LINE>if (nextDoc == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>nextResult = new OResultInternal();<NEW_LINE>((OResultInternal) nextResult).setElement(nextDoc);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean hasNext() {<NEW_LINE>if (internalNext >= nRecords) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (nextResult == null) {<NEW_LINE>fetchNext();<NEW_LINE>}<NEW_LINE>return nextResult != null;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public OResult next() {<NEW_LINE>if (!hasNext()) {<NEW_LINE>throw new IllegalStateException();<NEW_LINE>}<NEW_LINE>internalNext++;<NEW_LINE>OResult result = nextResult;<NEW_LINE>nextResult = null;<NEW_LINE>ctx.setVariable(<MASK><NEW_LINE>return result;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void close() {<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Optional<OExecutionPlan> getExecutionPlan() {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Map<String, Long> getQueryStats() {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
"$current", result.toElement());
951,583
final ReplaceIamInstanceProfileAssociationResult executeReplaceIamInstanceProfileAssociation(ReplaceIamInstanceProfileAssociationRequest replaceIamInstanceProfileAssociationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(replaceIamInstanceProfileAssociationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ReplaceIamInstanceProfileAssociationRequest> request = null;<NEW_LINE>Response<ReplaceIamInstanceProfileAssociationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ReplaceIamInstanceProfileAssociationRequestMarshaller().marshall(super.beforeMarshalling(replaceIamInstanceProfileAssociationRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ReplaceIamInstanceProfileAssociation");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<ReplaceIamInstanceProfileAssociationResult> responseHandler = new StaxResponseHandler<<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
ReplaceIamInstanceProfileAssociationResult>(new ReplaceIamInstanceProfileAssociationResultStaxUnmarshaller());
959,442
public Optional<SOTrx> retrieveRecordSOTrx(final String tableName, final String whereClause) {<NEW_LINE>if (Check.isEmpty(tableName, true)) {<NEW_LINE>log.error("No TableName");<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>if (Check.isEmpty(whereClause, true)) {<NEW_LINE>log.error("No Where Clause");<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Extract the SQL to select the IsSOTrx column<NEW_LINE>final POInfo poInfo = POInfo.getPOInfo(tableName);<NEW_LINE>final String sqlSelectIsSOTrx;<NEW_LINE>// Case: tableName has the "IsSOTrx" column<NEW_LINE>if (poInfo != null && poInfo.isPhysicalColumn("IsSOTrx")) {<NEW_LINE>sqlSelectIsSOTrx = "SELECT IsSOTrx FROM " + tableName + " WHERE " + whereClause;<NEW_LINE>} else // Case: tableName does NOT have the "IsSOTrx" column but ends with "Line", so we will check the parent table.<NEW_LINE>if (tableName.endsWith("Line")) {<NEW_LINE>final String parentTableName = tableName.substring(0, tableName.indexOf("Line"));<NEW_LINE>final POInfo parentPOInfo = POInfo.getPOInfo(parentTableName);<NEW_LINE>if (parentPOInfo != null && parentPOInfo.isPhysicalColumn("IsSOTrx")) {<NEW_LINE>// metas: use IN instead of EXISTS as the subquery should be highly selective<NEW_LINE>sqlSelectIsSOTrx = "SELECT IsSOTrx FROM " + parentTableName + " h WHERE h." + parentTableName + "_ID IN (SELECT l." + parentTableName + "_ID FROM " + tableName + " l WHERE " + whereClause + ")";<NEW_LINE>} else {<NEW_LINE>sqlSelectIsSOTrx = null;<NEW_LINE>}<NEW_LINE>} else // Fallback: no IsSOTrx<NEW_LINE>{<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Fetch IsSOTrx value if possible<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>try {<NEW_LINE>pstmt = DB.prepareStatement(sqlSelectIsSOTrx, ITrx.TRXNAME_None);<NEW_LINE>pstmt.setMaxRows(1);<NEW_LINE>rs = pstmt.executeQuery();<NEW_LINE>if (rs.next()) {<NEW_LINE>final boolean isSOTrx = DisplayType.toBoolean(rs.getString(1));<NEW_LINE>return SOTrx.optionalOfBoolean(isSOTrx);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>} catch (final Exception ex) {<NEW_LINE>final SQLException sqlEx = DBException.extractSQLExceptionOrNull(ex);<NEW_LINE>log.trace("Error while checking isSOTrx (SQL: {})", sqlSelectIsSOTrx, sqlEx);<NEW_LINE>return Optional.empty();<NEW_LINE>} finally {<NEW_LINE>close(rs, pstmt);<NEW_LINE>rs = null;<NEW_LINE>pstmt = null;<NEW_LINE>}<NEW_LINE>}
log.trace("No records were found to fetch the IsSOTrx from SQL: {}", sqlSelectIsSOTrx);
1,145,490
private List<Node> cleanEmptyClinitReferences(Multimap<String, Node> clinitReferences) {<NEW_LINE>final List<Node> newChangedScopes = new ArrayList<>();<NEW_LINE>// resolveReplacement step above should not require any particular iteration order of the<NEW_LINE>// emptiedClinitMethods but we are using LinkedHashMap to be extra safe.<NEW_LINE>for (Entry<String, Node> clinitReplacementEntry : emptiedClinitMethods.entrySet()) {<NEW_LINE>String clinitName = clinitReplacementEntry.getKey();<NEW_LINE>Node replacement = clinitReplacementEntry.getValue();<NEW_LINE>Collection<Node> references = clinitReferences.removeAll(clinitName);<NEW_LINE>for (Node reference : references) {<NEW_LINE>Node changedScope = NodeUtil.getEnclosingChangeScopeRoot(reference.getParent());<NEW_LINE>if (replacement == null) {<NEW_LINE>NodeUtil.deleteFunctionCall(reference, compiler);<NEW_LINE>} else {<NEW_LINE>replacement = replacement.cloneTree();<NEW_LINE>reference.replaceWith(replacement);<NEW_LINE>compiler.reportChangeToChangeScope(changedScope);<NEW_LINE>clinitReferences.put<MASK><NEW_LINE>}<NEW_LINE>newChangedScopes.add(changedScope);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return newChangedScopes;<NEW_LINE>}
(getClinitMethodName(replacement), replacement);
1,661,786
static <T extends Trait> Set<String> deduceOperationResponseHeaders(Context<T> context, OperationObject operationObject, OperationShape shape, CorsTrait cors) {<NEW_LINE>// The deduced response headers of an operation consist of any headers<NEW_LINE>// returned by security schemes, any headers returned by the protocol,<NEW_LINE>// and any headers explicitly modeled on the operation.<NEW_LINE>Set<String> result = new <MASK><NEW_LINE>result.addAll(cors.getAdditionalExposedHeaders());<NEW_LINE>result.addAll(context.getOpenApiProtocol().getProtocolResponseHeaders(context, shape));<NEW_LINE>result.addAll(context.getAllSecuritySchemeResponseHeaders());<NEW_LINE>// Include all headers found in the generated OpenAPI response.<NEW_LINE>for (ResponseObject responseObject : operationObject.getResponses().values()) {<NEW_LINE>result.addAll(responseObject.getHeaders().keySet());<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
TreeSet<>(String.CASE_INSENSITIVE_ORDER);
726,759
public void rangeNotification(IntSeqKey conditionPath, ContextControllerConditionNonHA originEndpoint, EventBean optionalTriggeringEvent, Map<String, Object> optionalTriggeringPattern, EventBean optionalTriggeringEventPattern, Map<String, Object> optionalPatternForInclusiveEval, Map<String, Object> terminationProperties) {<NEW_LINE>IntSeqKey parentPath = conditionPath.removeFromEnd();<NEW_LINE>Object <MASK><NEW_LINE>ContextControllerKeyedSvcEntry removed = keyedSvc.keyRemove(parentPath, getterKey);<NEW_LINE>if (removed == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// remember the terminating event, we don't want it to initiate a new partition<NEW_LINE>ContextControllerKeyedImpl.this.lastTerminatingEvent = optionalTriggeringEvent != null ? optionalTriggeringEvent : optionalTriggeringEventPattern;<NEW_LINE>realization.contextPartitionTerminate(conditionPath.removeFromEnd(), removed.getSubpathOrCPId(), ContextControllerKeyedImpl.this, terminationProperties, false, null);<NEW_LINE>removed.getTerminationCondition().deactivate();<NEW_LINE>}
getterKey = factory.getGetterKey(partitionKey);
1,192,830
public List<SDVariable> doDiff(List<SDVariable> f1) {<NEW_LINE>// Jaccard distance: https://en.wikipedia.org/wiki/Jaccard_index#Generalized_Jaccard_similarity_and_distance<NEW_LINE>// J(x,y) = 1 - sum_i min(x_i, y_i) / sum_i max(x_i, y_i)<NEW_LINE>SDVariable min = sameDiff.math.min(larg(), rarg());<NEW_LINE>SDVariable max = sameDiff.math.max(larg(), rarg());<NEW_LINE>SDVariable sumMax = max.sum(true, dimensions);<NEW_LINE>SDVariable sumMin = min.sum(true, dimensions);<NEW_LINE>DataType d = arg().dataType();<NEW_LINE>SDVariable xIsMin = sameDiff.eq(min, larg()).castTo(d);<NEW_LINE>SDVariable xIsMax = sameDiff.eq(max, larg()).castTo(d);<NEW_LINE>SDVariable yIsMin = sameDiff.eq(min, rarg<MASK><NEW_LINE>SDVariable yIsMax = sameDiff.eq(max, rarg()).castTo(d);<NEW_LINE>SDVariable sqSumMax = sameDiff.math.square(sumMax);<NEW_LINE>SDVariable dldx = xIsMax.mul(sumMin).sub(xIsMin.mul(sumMax)).div(sqSumMax);<NEW_LINE>SDVariable dldy = yIsMax.mul(sumMin).sub(yIsMin.mul(sumMax)).div(sqSumMax);<NEW_LINE>SDVariable bcGradOut;<NEW_LINE>if (keepDims || dimensions == null || dimensions.length == 0 || (dimensions.length == 1 && dimensions[0] == Integer.MAX_VALUE)) {<NEW_LINE>// KeepDims or full array reduction - already broadcastable<NEW_LINE>bcGradOut = f1.get(0);<NEW_LINE>} else {<NEW_LINE>bcGradOut = SameDiffUtils.reductionBroadcastableWithOrigShape(arg(), sameDiff.constant(Nd4j.createFromArray(dimensions)), f1.get(0));<NEW_LINE>}<NEW_LINE>return Arrays.asList(dldx.mul(bcGradOut), dldy.mul(bcGradOut));<NEW_LINE>}
()).castTo(d);
574,104
private void addCommentLikeActionForCommentNotification(Context context, NotificationCompat.Builder builder, String noteId) {<NEW_LINE>// adding comment like action<NEW_LINE>Intent commentLikeIntent = getCommentActionIntent(context);<NEW_LINE>commentLikeIntent.addCategory(KEY_CATEGORY_COMMENT_LIKE);<NEW_LINE>commentLikeIntent.putExtra(NotificationsProcessingService.ARG_ACTION_TYPE, NotificationsProcessingService.ARG_ACTION_LIKE);<NEW_LINE>if (noteId != null) {<NEW_LINE>commentLikeIntent.<MASK><NEW_LINE>}<NEW_LINE>commentLikeIntent.putExtra(NotificationsProcessingService.ARG_NOTE_BUNDLE, mGCMMessageHandler.getCurrentNoteBundleForNoteId(noteId));<NEW_LINE>PendingIntent commentLikePendingIntent = getCommentActionPendingIntentForService(context, commentLikeIntent);<NEW_LINE>builder.addAction(R.drawable.ic_star_white_24dp, context.getText(R.string.like), commentLikePendingIntent);<NEW_LINE>}
putExtra(NotificationsProcessingService.ARG_NOTE_ID, noteId);
1,595,936
/* Helpers */<NEW_LINE>private void insertRecordToTmpCollection(final MongodbWriteConfig writeConfig, final AirbyteMessage message) {<NEW_LINE>try {<NEW_LINE>final AirbyteRecordMessage recordMessage = message.getRecord();<NEW_LINE>final Map<String, Object> result = objectMapper.convertValue(recordMessage.getData(), new TypeReference<>() {<NEW_LINE>});<NEW_LINE>final var newDocumentDataHashCode = UUID.nameUUIDFromBytes(DigestUtils.md5Hex(Jsons.toBytes(recordMessage.getData())).getBytes()).toString();<NEW_LINE>final var newDocument = new Document();<NEW_LINE>newDocument.put(AIRBYTE_DATA, new Document(result));<NEW_LINE>newDocument.put(AIRBYTE_DATA_HASH, newDocumentDataHashCode);<NEW_LINE>newDocument.put(AIRBYTE_EMITTED_AT, new LocalDateTime().toString());<NEW_LINE>final <MASK><NEW_LINE>final var documentsHash = writeConfig.getDocumentsHash();<NEW_LINE>if (!documentsHash.contains(newDocumentDataHashCode)) {<NEW_LINE>collection.insertOne(newDocument);<NEW_LINE>documentsHash.add(newDocumentDataHashCode);<NEW_LINE>} else {<NEW_LINE>LOGGER.info("Object with hashCode = {} already exist in table {}.", newDocumentDataHashCode, writeConfig.getCollectionName());<NEW_LINE>}<NEW_LINE>} catch (final RuntimeException e) {<NEW_LINE>LOGGER.error("Got an error while writing message:" + e.getMessage());<NEW_LINE>LOGGER.error(String.format("Failed to process a message for Streams numbers: %s, SyncMode: %s, CollectionName: %s, TmpCollectionName: %s, AirbyteMessage: %s", catalog.getStreams().size(), writeConfig.getSyncMode(), writeConfig.getCollectionName(), writeConfig.getTmpCollectionName(), message));<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>}
var collection = writeConfig.getCollection();
302,871
private void performWorkload(BaseSubscriber<PojoizedJson> baseSubscriber, long i) throws InterruptedException {<NEW_LINE>Mono<PojoizedJson> result;<NEW_LINE>int clientIndex = (int) (i % clientDocsMap.size());<NEW_LINE>CosmosAsyncClient client = (CosmosAsyncClient) clientDocsMap.keySet().toArray()[clientIndex];<NEW_LINE>int docIndex = (int) i % clientDocsMap.get(client).size();<NEW_LINE>PojoizedJson doc = clientDocsMap.get(client).get(docIndex);<NEW_LINE><MASK><NEW_LINE>result = client.getDatabase(configuration.getDatabaseId()).getContainer(configuration.getCollectionId()).readItem(doc.getId(), new PartitionKey(partitionKeyValue), PojoizedJson.class).map(CosmosItemResponse::getItem);<NEW_LINE>concurrencyControlSemaphore.acquire();<NEW_LINE>AsyncReadBenchmark.LatencySubscriber<PojoizedJson> latencySubscriber = new AsyncReadBenchmark.LatencySubscriber<>(baseSubscriber);<NEW_LINE>latencySubscriber.context = latency.time();<NEW_LINE>result.subscribeOn(Schedulers.parallel()).subscribe(latencySubscriber);<NEW_LINE>}
String partitionKeyValue = doc.getId();
1,084,563
public static void initOpenTelemetry() throws Exception {<NEW_LINE>if (!Config.enable_tracing) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String traceExportUrl = Config.trace_export_url;<NEW_LINE>SpanExporter spanExporter;<NEW_LINE>if (DorisTraceExporter.collector.name().equalsIgnoreCase(Config.trace_exporter)) {<NEW_LINE>spanExporter = oltpExporter(traceExportUrl);<NEW_LINE>} else if (DorisTraceExporter.zipkin.name().equalsIgnoreCase(Config.trace_exporter)) {<NEW_LINE>spanExporter = zipkinExporter(traceExportUrl);<NEW_LINE>} else {<NEW_LINE>throw new Exception("unknown value " + Config.trace_exporter + " of trace_exporter in fe.conf");<NEW_LINE>}<NEW_LINE>String serviceName = "FRONTEND:" + Env.getCurrentEnv().getSelfNode().first;<NEW_LINE>Resource serviceNameResource = Resource.create(Attributes.of(AttributeKey.stringKey("service.name"), serviceName));<NEW_LINE>// Send a batch of spans if ScheduleDelay time or MaxExportBatchSize is reached<NEW_LINE>BatchSpanProcessor spanProcessor = BatchSpanProcessor.builder(spanExporter).setScheduleDelay(100, TimeUnit.MILLISECONDS).setMaxExportBatchSize(1000).build();<NEW_LINE>SdkTracerProvider tracerProvider = SdkTracerProvider.builder().addSpanProcessor(spanProcessor).setResource(Resource.getDefault().merge<MASK><NEW_LINE>openTelemetry = OpenTelemetrySdk.builder().setTracerProvider(tracerProvider).setPropagators(ContextPropagators.create(W3CTraceContextPropagator.getInstance())).build();<NEW_LINE>// add a shutdown hook to shut down the SDK<NEW_LINE>Runtime.getRuntime().addShutdownHook(new Thread(tracerProvider::shutdown));<NEW_LINE>}
(serviceNameResource)).build();
1,579,527
private static void printType(ConfiguredType configuredType, Map<String, ConfiguredType> typesMap, int nesting, boolean listStart) {<NEW_LINE>String spaces = <MASK><NEW_LINE>Set<ConfiguredProperty> properties = configuredType.properties();<NEW_LINE>boolean isListStart = listStart;<NEW_LINE>for (ConfiguredProperty property : properties) {<NEW_LINE>if (property.key() != null && property.key().contains(".*.")) {<NEW_LINE>// this is a nested key, must be resolved by the parent list node<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>printProperty(property, properties, typesMap, nesting, isListStart);<NEW_LINE>isListStart = false;<NEW_LINE>}<NEW_LINE>List<String> inherited = configuredType.inherited();<NEW_LINE>for (String inheritedTypeName : inherited) {<NEW_LINE>ConfiguredType inheritedType = typesMap.get(inheritedTypeName);<NEW_LINE>if (inheritedType == null) {<NEW_LINE>System.out.println(spaces + "# Missing inherited type: " + inheritedTypeName);<NEW_LINE>} else {<NEW_LINE>printType(inheritedType, typesMap, nesting, false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
" ".repeat(nesting * 2);
1,265,820
private void initValues(List<ClassPathSupport.Item> list) {<NEW_LINE>Set<ClientModuleItem> items = new TreeSet<ClientModuleItem>();<NEW_LINE>for (Project p : EarProjectProperties.getApplicationSubprojects(list, J2eeModule.Type.WAR)) {<NEW_LINE>items.add(new ClientModuleItem(ProjectUtils.getInformation(p).getName(), false));<NEW_LINE>}<NEW_LINE>for (Project p : EarProjectProperties.getApplicationSubprojects(list, J2eeModule.Type.CAR)) {<NEW_LINE>items.add(new ClientModuleItem(ProjectUtils.getInformation(p).getName(), true));<NEW_LINE>}<NEW_LINE>values = <MASK><NEW_LINE>EditableProperties ep = project.getAntProjectHelper().getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);<NEW_LINE>String clientModuleURI = ep.getProperty(EarProjectProperties.CLIENT_MODULE_URI);<NEW_LINE>String appClient = ep.getProperty(EarProjectProperties.APPLICATION_CLIENT);<NEW_LINE>if (!setSelectedItem(clientModuleURI, appClient)) {<NEW_LINE>setSelectedItem(values.size() > 0 ? values.get(0) : null);<NEW_LINE>}<NEW_LINE>}
new ArrayList<ClientModuleItem>(items);
576,057
private // refactored to use a common method.<NEW_LINE>void loadOnlyEjbCreateMethod(List<CallbackInterceptor>[] metaArray, int numPostConstructFrameworkCallbacks) {<NEW_LINE>int sz = lcAnnotationClasses.length;<NEW_LINE>for (int i = 0; i < sz; i++) {<NEW_LINE>if (lcAnnotationClasses[i] != PostConstruct.class) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>boolean needToScan = true;<NEW_LINE>if (metaArray[i] != null) {<NEW_LINE>List<CallbackInterceptor> al = metaArray[i];<NEW_LINE>needToScan = (al.size() == numPostConstructFrameworkCallbacks);<NEW_LINE>}<NEW_LINE>if (!needToScan) {<NEW_LINE>// We already have found a @PostConstruct method<NEW_LINE>// So just ignore any ejbCreate() method<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Method method = beanClass.getMethod(pre30LCMethodNames[i], (Class[]) null);<NEW_LINE>if (method != null) {<NEW_LINE>CallbackInterceptor meta = new BeanCallbackInterceptor(method);<NEW_LINE>metaArray<MASK><NEW_LINE>_logger.log(Level.FINE, "**##[ejbCreate] bean has 2.x style ejbCreate: " + meta);<NEW_LINE>}<NEW_LINE>} catch (NoSuchMethodException nsmEx) {<NEW_LINE>// TODO: Log exception<NEW_LINE>// Error for a 2.x bean????<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
[i].add(meta);
1,188,778
public String createMessage(CompilationInfo info, Diagnostic d, int offset, TreePath treePath, Data<Void> data) {<NEW_LINE>Tree t = treePath.getLeaf();<NEW_LINE>if (t.getKind() != Tree.Kind.MEMBER_SELECT) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>TypeMirror mt = info.getTrees().getTypeMirror(treePath);<NEW_LINE>if (!Utilities.isValidType(mt)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Collection<TypeMirror> unreachables = Collections.emptyList();<NEW_LINE>if (mt.getKind() == TypeKind.EXECUTABLE) {<NEW_LINE>ExecutableType etype = (ExecutableType) mt;<NEW_LINE>Collection<TypeMirror> toCheck = new ArrayList<>();<NEW_LINE>toCheck.addAll(etype.getParameterTypes());<NEW_LINE>toCheck.add(etype.getReturnType());<NEW_LINE>toCheck.<MASK><NEW_LINE>V v = new V(info);<NEW_LINE>for (TypeMirror m : toCheck) {<NEW_LINE>m.accept(v, null);<NEW_LINE>}<NEW_LINE>unreachables = v.unknownDeclaredTypes;<NEW_LINE>}<NEW_LINE>if (unreachables.isEmpty()) {<NEW_LINE>// I don't know - something else which makes the type erroneous ?<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>switch(unreachables.size()) {<NEW_LINE>case 1:<NEW_LINE>return Bundle.ERR_Unreachable_Type_1(unreachables.iterator().next());<NEW_LINE>case 2:<NEW_LINE>Iterator<TypeMirror> it = unreachables.iterator();<NEW_LINE>return Bundle.ERR_Unreachable_Type_2(it.next(), it.next());<NEW_LINE>default:<NEW_LINE>return Bundle.ERR_Unreachable_Type_2(unreachables.iterator().next(), unreachables.size());<NEW_LINE>}<NEW_LINE>}
addAll(etype.getThrownTypes());
482,570
final UpdateDatasetEntriesResult executeUpdateDatasetEntries(UpdateDatasetEntriesRequest updateDatasetEntriesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateDatasetEntriesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateDatasetEntriesRequest> request = null;<NEW_LINE>Response<UpdateDatasetEntriesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateDatasetEntriesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateDatasetEntriesRequest));<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, "LookoutVision");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateDatasetEntries");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateDatasetEntriesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateDatasetEntriesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1,820,342
private void write(ElfHeader.EIClass eiClass, ByteBuffer buffer) {<NEW_LINE>if (eiClass == ElfHeader.EIClass.ELFCLASS32) {<NEW_LINE>Elf.Elf32.putElf32Half(buffer, (short) vn_version);<NEW_LINE>Elf.Elf32.putElf32Half(buffer, (short) vn_cnt);<NEW_LINE>Elf.Elf32.putElf32Word(buffer, (int) vn_file);<NEW_LINE>Elf.Elf32.putElf32Word(buffer, (int) vn_aux);<NEW_LINE>Elf.Elf32.putElf32Word(buffer, (int) vn_next);<NEW_LINE>} else {<NEW_LINE>Elf.Elf64.putElf64Half(buffer, (short) vn_version);<NEW_LINE>Elf.Elf64.putElf64Half<MASK><NEW_LINE>Elf.Elf64.putElf64Word(buffer, (int) vn_file);<NEW_LINE>Elf.Elf64.putElf64Word(buffer, (int) vn_aux);<NEW_LINE>Elf.Elf64.putElf64Word(buffer, (int) vn_next);<NEW_LINE>}<NEW_LINE>}
(buffer, (short) vn_cnt);
826,425
private void tablePopupApply(ActionEvent actionEvent) {<NEW_LINE>StringBuilder stringBuffer = new StringBuilder();<NEW_LINE>stringBuffer.append("\n");<NEW_LINE>String title = tablePopupTitle.textProperty().getValue();<NEW_LINE>// Table title<NEW_LINE>if (!"".equals(title))<NEW_LINE>stringBuffer.append(".").append(title).append("\n");<NEW_LINE>// Table options<NEW_LINE>stringBuffer.append("[width=\"");<NEW_LINE>String width = tablePopupWidth.textProperty().getValue();<NEW_LINE>if ("".equals(width))<NEW_LINE>stringBuffer.append("100%");<NEW_LINE>else<NEW_LINE>stringBuffer.append(width);<NEW_LINE>stringBuffer.append("\"");<NEW_LINE>if (tablePopupHeader.isSelected() && tablePopupFooter.isSelected())<NEW_LINE>stringBuffer.append(",").append("options=\"header,footer\"").append("]");<NEW_LINE>else if (tablePopupHeader.isSelected())<NEW_LINE>stringBuffer.append(",").append("options=\"header\"").append("]");<NEW_LINE>else if (tablePopupFooter.isSelected())<NEW_LINE>stringBuffer.append(",").append("options=\"footer\"").append("]");<NEW_LINE>else<NEW_LINE>stringBuffer.append("]");<NEW_LINE>stringBuffer.append("\n");<NEW_LINE>Integer row = 1;<NEW_LINE>Integer column = 1;<NEW_LINE>try {<NEW_LINE>row = Integer.valueOf(tablePopupRows.textProperty().getValue());<NEW_LINE>column = Integer.valueOf(tablePopupColumns.textProperty().getValue());<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>}<NEW_LINE>stringBuffer.append("|====================\n");<NEW_LINE>for (int i = 0; i < row; i++) {<NEW_LINE>for (int j = 0; j < column; j++) {<NEW_LINE>stringBuffer.append("| " + initialValue.getText() + " ");<NEW_LINE>}<NEW_LINE>stringBuffer.append("\n");<NEW_LINE>}<NEW_LINE>stringBuffer.append("|====================");<NEW_LINE>current.<MASK><NEW_LINE>}
insertEditorValue(stringBuffer.toString());
1,769,291
public void run() {<NEW_LINE>liveSnippets = <MASK><NEW_LINE>prepareDeclarations();<NEW_LINE>createStatementsText();<NEW_LINE>prepareImports();<NEW_LINE>try {<NEW_LINE>FileObject replaced = targetFolder.getFileObject(className, "java");<NEW_LINE>if (replaced != null) {<NEW_LINE>replaced.delete();<NEW_LINE>}<NEW_LINE>javaFile = createJavaFile();<NEW_LINE>JavaSource src = JavaSource.forFileObject(javaFile);<NEW_LINE>if (src == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>src.runModificationTask(wc -> {<NEW_LINE>wc.toPhase(JavaSource.Phase.RESOLVED);<NEW_LINE>this.copy = wc;<NEW_LINE>copyImports();<NEW_LINE>}).commit();<NEW_LINE>// reformat<NEW_LINE>EditorCookie editor = javaFile.getLookup().lookup(EditorCookie.class);<NEW_LINE>Document d = editor.openDocument();<NEW_LINE>Reformat r = Reformat.get(d);<NEW_LINE>r.lock();<NEW_LINE>try {<NEW_LINE>r.reformat(0, d.getLength());<NEW_LINE>} finally {<NEW_LINE>r.unlock();<NEW_LINE>}<NEW_LINE>// not organize those imports; must run a separate task, so the<NEW_LINE>// analyzer sees the text:<NEW_LINE>src.runModificationTask(wc -> {<NEW_LINE>wc.toPhase(JavaSource.Phase.RESOLVED);<NEW_LINE>this.copy = wc;<NEW_LINE>SourceChangeUtils.doOrganizeImports(copy, null, true);<NEW_LINE>}).commit();<NEW_LINE>editor.saveDocument();<NEW_LINE>} catch (IOException ex) {<NEW_LINE>error = ex;<NEW_LINE>} catch (BadLocationException ex) {<NEW_LINE>error = ex;<NEW_LINE>}<NEW_LINE>}
shellSession.getSnippets(true, true);
290,846
public void commit(boolean onSave) {<NEW_LINE>final Model model = getModel();<NEW_LINE>final String comments = FormHelper.trimTrailingSpaces(commentsSource.getDocument().get());<NEW_LINE>model.setAttribute(MODEL_COMMENTS, comments);<NEW_LINE>// TLCUIActivator.getDefault().logDebug("Main page commit");<NEW_LINE>// closed formula<NEW_LINE>String closedFormula = FormHelper.trimTrailingSpaces(this.specSource.getDocument().get());<NEW_LINE>model.setAttribute(MODEL_BEHAVIOR_CLOSED_SPECIFICATION, closedFormula);<NEW_LINE>// init formula<NEW_LINE>String initFormula = FormHelper.trimTrailingSpaces(this.initFormulaSource.getDocument().get());<NEW_LINE>model.setAttribute(MODEL_BEHAVIOR_SEPARATE_SPECIFICATION_INIT, initFormula);<NEW_LINE>// next formula<NEW_LINE>String nextFormula = FormHelper.trimTrailingSpaces(this.nextFormulaSource.getDocument().get());<NEW_LINE>model.setAttribute(MODEL_BEHAVIOR_SEPARATE_SPECIFICATION_NEXT, nextFormula);<NEW_LINE>// fairness formula<NEW_LINE>// String fairnessFormula =<NEW_LINE>// FormHelper.trimTrailingSpaces(this.fairnessFormulaSource.getDocument().get());<NEW_LINE>// model.setAttribute(MODEL_BEHAVIOR_SEPARATE_SPECIFICATION_FAIRNESS,<NEW_LINE>// fairnessFormula);<NEW_LINE>// mode<NEW_LINE>model.setAttribute(MODEL_BEHAVIOR_SPEC_TYPE, getModelConstantForSpecSelection());<NEW_LINE>// check deadlock<NEW_LINE>boolean checkDeadlock = this.checkDeadlockButton.getSelection();<NEW_LINE>model.setAttribute(MODEL_CORRECTNESS_CHECK_DEADLOCK, checkDeadlock);<NEW_LINE>final TLCConsumptionProfile profile = getSelectedTLCProfile();<NEW_LINE>final String profileValue = (profile != null) ? profile.getPreferenceValue() : CUSTOM_TLC_PROFILE_PREFERENCE_VALUE;<NEW_LINE>model.setAttribute(TLC_RESOURCES_PROFILE, profileValue);<NEW_LINE>model.setAttribute(LAUNCH_NUMBER_OF_WORKERS, workerThreadCount.get());<NEW_LINE>model.setAttribute(LAUNCH_MAX_HEAP_SIZE, heapPercentage.get());<NEW_LINE>// run in distributed mode<NEW_LINE>if ((profile != null) && profile.profileIsForRemoteWorkers()) {<NEW_LINE>model.setAttribute(LAUNCH_DISTRIBUTED, profile.getPreferenceValue());<NEW_LINE>} else {<NEW_LINE>model.setAttribute(LAUNCH_DISTRIBUTED, LAUNCH_DISTRIBUTED_NO);<NEW_LINE>}<NEW_LINE>String resultMailAddress = this.resultMailAddressText.getText();<NEW_LINE>model.setAttribute(LAUNCH_DISTRIBUTED_RESULT_MAIL_ADDRESS, resultMailAddress);<NEW_LINE>// distributed FPSet count<NEW_LINE>model.setAttribute(LAUNCH_DISTRIBUTED_FPSET_COUNT, distributedFPSetCountSpinner.getSelection());<NEW_LINE>// distributed FPSet count<NEW_LINE>model.setAttribute(LAUNCH_DISTRIBUTED_NODES_COUNT, distributedNodesCountSpinner.getSelection());<NEW_LINE>// network interface<NEW_LINE>String iface = "";<NEW_LINE>final int index = this.networkInterfaceCombo.getSelectionIndex();<NEW_LINE>if (index == -1) {<NEW_LINE>// Normally, the user selects an address from the provided list.<NEW_LINE>// This branch handles the case where the user manually entered an<NEW_LINE>// address. We don't verify it though.<NEW_LINE>iface <MASK><NEW_LINE>} else {<NEW_LINE>iface = this.networkInterfaceCombo.getItem(index);<NEW_LINE>}<NEW_LINE>model.setAttribute(LAUNCH_DISTRIBUTED_INTERFACE, iface);<NEW_LINE>// invariants<NEW_LINE>List<String> serializedList = FormHelper.getSerializedInput(invariantsTable);<NEW_LINE>model.setAttribute(MODEL_CORRECTNESS_INVARIANTS, serializedList);<NEW_LINE>// properties<NEW_LINE>serializedList = FormHelper.getSerializedInput(propertiesTable);<NEW_LINE>model.setAttribute(MODEL_CORRECTNESS_PROPERTIES, serializedList);<NEW_LINE>// constants<NEW_LINE>List<String> constants = FormHelper.getSerializedInput(constantTable);<NEW_LINE>model.setAttribute(MODEL_PARAMETER_CONSTANTS, constants);<NEW_LINE>// variables<NEW_LINE>String variables = ModelHelper.createVariableList(SemanticHelper.getRootModuleNode());<NEW_LINE>model.setAttribute(MODEL_BEHAVIOR_VARS, variables);<NEW_LINE>super.commit(onSave);<NEW_LINE>}
= this.networkInterfaceCombo.getText();
1,360,809
public static void toJSON(OutputWriter jsonOutputWriter, StageInstanceModel model, String pipelineName, String pipelineCounter) {<NEW_LINE>jsonOutputWriter.addLinks(linkWriter -> {<NEW_LINE>linkWriter.addLink("self", Routes.Stage.self(pipelineName, pipelineCounter, model.getName()<MASK><NEW_LINE>}).add("name", model.getName()).add("counter", model.getCounter()).add("status", model.getState().name()).add("approved_by", model.getApprovedBy()).add("scheduled_at", model.getScheduledDate());<NEW_LINE>if (model.getState().stageResult() == StageResult.Cancelled) {<NEW_LINE>jsonOutputWriter.add("cancelled_by", model.getCancelledBy() == null ? "GoCD" : model.getCancelledBy());<NEW_LINE>}<NEW_LINE>if (model.getPreviousStage() != null) {<NEW_LINE>jsonOutputWriter.addChild("previous_stage", childWriter -> {<NEW_LINE>StageRepresenter.toJSON(childWriter, model.getPreviousStage(), pipelineName, pipelineCounter);<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
, model.getCounter()));
958,244
public Object execute(final NodeModel node, PrintStream outStream, IFreeplaneScriptErrorHandler errorHandler, ScriptContext scriptContext) {<NEW_LINE>try {<NEW_LINE>if (errorsInScript != null && compileTimeStrategy.canUseOldCompiledScript()) {<NEW_LINE>throw new ExecuteScriptException(errorsInScript.getMessage(), errorsInScript);<NEW_LINE>}<NEW_LINE>final PrintStream oldOut = System.out;<NEW_LINE>ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();<NEW_LINE>try {<NEW_LINE>AccessController.doPrivileged(new PrivilegedAction<Void>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Void run() {<NEW_LINE>final ScriptingSecurityManager scriptingSecurityManager = createScriptingSecurityManager(outStream);<NEW_LINE>scriptClassLoader.setSecurityManager(scriptingSecurityManager);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>Thread.currentThread().setContextClassLoader(scriptClassLoader);<NEW_LINE>final SimpleScriptContext context = createScriptContext(node, scriptContext, outStream);<NEW_LINE>if (compilationEnabled && engine instanceof Compilable) {<NEW_LINE>compileAndCache((Compilable) engine);<NEW_LINE>System.setOut(outStream);<NEW_LINE>return compiledScript.eval(context);<NEW_LINE>} else {<NEW_LINE>System.setOut(outStream);<NEW_LINE>return engine.eval(<MASK><NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>System.setOut(oldOut);<NEW_LINE>Thread.currentThread().setContextClassLoader(contextClassLoader);<NEW_LINE>}<NEW_LINE>} catch (final ScriptException e) {<NEW_LINE>handleScriptRuntimeException(e, outStream, errorHandler);<NEW_LINE>// :fixme: This throw is only reached, if<NEW_LINE>// handleScriptRuntimeException<NEW_LINE>// does not raise an exception. Should it be here at all?<NEW_LINE>// And if: Shouldn't it raise an ExecuteScriptException?<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>} catch (final Throwable e) {<NEW_LINE>IMapSelection selection = Controller.getCurrentController().getSelection();<NEW_LINE>if (selection != null && node != null && selection.getMap() == node.getMap() && node.hasVisibleContent(selection.getFilter())) {<NEW_LINE>Controller.getCurrentModeController().getMapController().select(node);<NEW_LINE>}<NEW_LINE>throw new ExecuteScriptException(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
scriptSource.getScript(), context);
1,561,274
public void run(RegressionEnvironment env) {<NEW_LINE>String[] <MASK><NEW_LINE>SupportEvalBuilder builder = new SupportEvalBuilder("SupportBean_ST0_Container");<NEW_LINE>builder.expression(fields[0], "contained.selectFrom(x => key0).sequenceEqual(contained.selectFrom(y => id))");<NEW_LINE>builder.statementConsumer(stmt -> assertTypesAllSame(stmt.getEventType(), fields, EPTypePremade.BOOLEANBOXED.getEPType()));<NEW_LINE>builder.assertion(SupportBean_ST0_Container.make3Value("I1,E1,0", "I2,E2,0")).expect(fields, false);<NEW_LINE>builder.assertion(SupportBean_ST0_Container.make3Value("I3,I3,0", "X4,X4,0")).expect(fields, true);<NEW_LINE>builder.assertion(SupportBean_ST0_Container.make3Value("I3,I3,0", "X4,Y4,0")).expect(fields, false);<NEW_LINE>builder.assertion(SupportBean_ST0_Container.make3Value("I3,I3,0", "Y4,X4,0")).expect(fields, false);<NEW_LINE>builder.run(env);<NEW_LINE>}
fields = "c0".split(",");
867,029
public void removeColumnItems(int column) {<NEW_LINE>// Firstly, remove columns from visible recyclerViews.<NEW_LINE>// To be able provide removing animation, we need to notify just for given column position.<NEW_LINE>CellRecyclerView[] visibleRecyclerViews = mTableView<MASK><NEW_LINE>for (CellRecyclerView cellRowRecyclerView : visibleRecyclerViews) {<NEW_LINE>if (cellRowRecyclerView != null) {<NEW_LINE>AbstractRecyclerViewAdapter adapter = (AbstractRecyclerViewAdapter) cellRowRecyclerView.getAdapter();<NEW_LINE>if (adapter != null) {<NEW_LINE>adapter.deleteItem(column);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Lets change the model list silently<NEW_LINE>// Create a new list which the column is already removed.<NEW_LINE>List<List<C>> cellItems = new ArrayList<>();<NEW_LINE>for (int i = 0; i < mItemList.size(); i++) {<NEW_LINE>List<C> rowList = new ArrayList<>((List<C>) mItemList.get(i));<NEW_LINE>if (rowList.size() > column) {<NEW_LINE>rowList.remove(column);<NEW_LINE>}<NEW_LINE>cellItems.add(rowList);<NEW_LINE>}<NEW_LINE>// Change data without notifying. Because we already did for visible recyclerViews.<NEW_LINE>setItems((List<C>) cellItems, false);<NEW_LINE>}
.getCellLayoutManager().getVisibleCellRowRecyclerViews();
1,316,699
public boolean onLongClick(View v) {<NEW_LINE>String link;<NEW_LINE>boolean displayPic = !picUrl.equals("");<NEW_LINE>if (displayPic) {<NEW_LINE>link = picUrl;<NEW_LINE>} else {<NEW_LINE>link = otherUrl.split(" ")[0];<NEW_LINE>}<NEW_LINE>Log.v("tweet_page", "clicked");<NEW_LINE>Intent viewTweet = new Intent(context, TweetPager.class);<NEW_LINE>viewTweet.putExtra("name", name);<NEW_LINE>viewTweet.putExtra("screenname", screenname);<NEW_LINE>viewTweet.putExtra("time", time);<NEW_LINE><MASK><NEW_LINE>viewTweet.putExtra("retweeter", fRetweeter);<NEW_LINE>viewTweet.putExtra("webpage", link);<NEW_LINE>viewTweet.putExtra("other_links", otherUrl);<NEW_LINE>viewTweet.putExtra("picture", displayPic);<NEW_LINE>viewTweet.putExtra("tweetid", id);<NEW_LINE>viewTweet.putExtra("proPic", profilePic);<NEW_LINE>viewTweet.putExtra("users", users);<NEW_LINE>viewTweet.putExtra("hashtags", hashtags);<NEW_LINE>context.startActivity(viewTweet);<NEW_LINE>return false;<NEW_LINE>}
viewTweet.putExtra("tweet", tweetText);
361,715
public void startNewFragment(final PlanFragment fragment, final DrillbitContext drillbitContext) throws UserRpcException {<NEW_LINE>logger.debug("Received remote fragment start instruction: {}", fragment);<NEW_LINE>try {<NEW_LINE>final FragmentContextImpl fragmentContext = new FragmentContextImpl(drillbitContext, fragment, drillbitContext.getFunctionImplementationRegistry());<NEW_LINE>final FragmentStatusReporter statusReporter = new FragmentStatusReporter(fragmentContext);<NEW_LINE>final FragmentExecutor fragmentExecutor = new FragmentExecutor(fragmentContext, fragment, statusReporter);<NEW_LINE>// we either need to start the fragment if it is a leaf fragment, or set up a fragment manager if it is non leaf.<NEW_LINE>if (fragment.getLeafFragment()) {<NEW_LINE>bee.addFragmentRunner(fragmentExecutor);<NEW_LINE>} else {<NEW_LINE>// isIntermediate, store for incoming data.<NEW_LINE>final NonRootFragmentManager manager = new NonRootFragmentManager(fragment, fragmentExecutor, statusReporter);<NEW_LINE>drillbitContext.<MASK><NEW_LINE>}<NEW_LINE>} catch (final ExecutionSetupException ex) {<NEW_LINE>throw new UserRpcException(drillbitContext.getEndpoint(), "Failed to create fragment context", ex);<NEW_LINE>} catch (final Exception e) {<NEW_LINE>throw new UserRpcException(drillbitContext.getEndpoint(), "Failure while trying to start remote fragment", e);<NEW_LINE>} catch (final OutOfMemoryError t) {<NEW_LINE>if (t.getMessage().startsWith("Direct buffer")) {<NEW_LINE>throw new UserRpcException(drillbitContext.getEndpoint(), "Out of direct memory while trying to start remote fragment", t);<NEW_LINE>} else {<NEW_LINE>throw t;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getWorkBus().addFragmentManager(manager);
940,880
private void drawPaintersImpl(com.codename1.ui.Graphics g, Component par, Component c, int x, int y, int w, int h) {<NEW_LINE>if (par == null) {<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>if (par.getStyle().getBgTransparency() != ((byte) 0xFF)) {<NEW_LINE>drawPainters(g, par.getParent(), par, x, y, w, h);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!par.isVisible()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int transX = par.getAbsoluteX<MASK><NEW_LINE>int transY = par.getAbsoluteY() + par.getScrollY();<NEW_LINE>g.translate(transX, transY);<NEW_LINE>if (par.isBorderPainted()) {<NEW_LINE>Border b = par.getBorder();<NEW_LINE>if (b.isBackgroundPainter()) {<NEW_LINE>g.translate(-par.getX(), -par.getY());<NEW_LINE>par.paintBorderBackground(g);<NEW_LINE>par.paintBorder(g);<NEW_LINE>g.translate(par.getX() - transX, par.getY() - transY);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Painter p = par.getStyle().getBgPainter();<NEW_LINE>if (p != null) {<NEW_LINE>Rectangle rect;<NEW_LINE>if (painterBounds == null) {<NEW_LINE>painterBounds = new Rectangle(0, 0, par.getWidth(), par.getHeight());<NEW_LINE>rect = painterBounds;<NEW_LINE>} else {<NEW_LINE>rect = painterBounds;<NEW_LINE>rect.getSize().setWidth(par.getWidth());<NEW_LINE>rect.getSize().setHeight(par.getHeight());<NEW_LINE>}<NEW_LINE>p.paint(g, rect);<NEW_LINE>}<NEW_LINE>par.paintBackground(g);<NEW_LINE>((Container) par).paintIntersecting(g, c, x, y, w, h, false, 0);<NEW_LINE>g.translate(-transX, -transY);<NEW_LINE>}
() + par.getScrollX();
1,547,022
private static SparqlComponent possibleSparqlValidator(Graph shapesGraph, Node valNode, List<Parameter> params, /* for reporting */<NEW_LINE>Node constraintComponentNode) {<NEW_LINE>// Check for SHACL-JS<NEW_LINE>Node xJSFunctionName = G.getZeroOrOneSP(shapesGraph, valNode, SHACL.jsFunctionName);<NEW_LINE>if (xJSFunctionName != null)<NEW_LINE>Log.warn(ConstraintComponents.class, "Found javascript validator - ignored (JavaScript not currently supported)");<NEW_LINE>// One of sh:select or sh:ask.<NEW_LINE>Node xSelect = G.getZeroOrOneSP(shapesGraph, valNode, SHACL.select);<NEW_LINE>Node xAsk = G.getZeroOrOneSP(shapesGraph, valNode, SHACL.ask);<NEW_LINE>if (xSelect == null && xAsk == null)<NEW_LINE>return null;<NEW_LINE>if (xSelect != null && xAsk != null)<NEW_LINE>throw new ShaclParseException("SparqlConstraintComponent: Multiple SPARQL queries: " + displayStr(constraintComponentNode));<NEW_LINE>String prefixes = <MASK><NEW_LINE>String queryString = firstNonNull(xSelect, xAsk).getLiteralLexicalForm().trim();<NEW_LINE>String message = asString(G.getZeroOrOneSP(shapesGraph, valNode, SHACL.message));<NEW_LINE>if (!prefixes.isEmpty())<NEW_LINE>queryString = prefixes + "\n" + queryString;<NEW_LINE>boolean isSelect = (xSelect != null);<NEW_LINE>SparqlComponent cs = SparqlComponent.constraintComponent(constraintComponentNode, queryString, params, message);<NEW_LINE>if (cs.getQuery().isSelectType() != isSelect)<NEW_LINE>throw new ShaclParseException("Query type does not match property");<NEW_LINE>return cs;<NEW_LINE>}
ShLib.prefixes(shapesGraph, valNode);
615,581
private void tryMergePreviousGap(final long thisSeek) throws IOException {<NEW_LINE>// this is called after a record has been removed. That may cause that a new<NEW_LINE>// empty record was surrounded by gaps. We merge with a previous gap, if this<NEW_LINE>// is also empty, but don't do that recursively<NEW_LINE>// If this is successful, it removes the given marker for thisSeed and<NEW_LINE>// because of this, this method MUST be called AFTER tryMergeNextGaps was called.<NEW_LINE>// first find the gap entry for the closest gap in front of the give gap<NEW_LINE>SortedMap<Long, Integer> head = this.free.headMap(thisSeek);<NEW_LINE>if (head.isEmpty())<NEW_LINE>return;<NEW_LINE>long previousSeek = head.lastKey().longValue();<NEW_LINE>int previousSize = head.get(previousSeek).intValue();<NEW_LINE>// check if this is directly in front<NEW_LINE>if (previousSeek + previousSize + 4 == thisSeek) {<NEW_LINE>// right in front! merge the gaps<NEW_LINE>Integer thisSize = this.free.get(thisSeek);<NEW_LINE>assert thisSize != null;<NEW_LINE>mergeGaps(previousSeek, previousSize, <MASK><NEW_LINE>}<NEW_LINE>}
thisSeek, thisSize.intValue());
628,598
public JDBCStatement prepareUniqueConstraintsLoadStatement(@NotNull JDBCSession session, @NotNull GenericStructContainer owner, @Nullable GenericTableBase forParent) throws SQLException {<NEW_LINE>JDBCPreparedStatement dbStat;<NEW_LINE>dbStat = session.prepareStatement("SELECT K.CONSTRAINT_NAME AS PK_NAME, K.TABLE_NAME, K.COLUMN_POSITION AS KEY_SEQ, K.COLUMN_NAME, tc.CONSTRAINT_TYPE, '' AS CHECK_CLAUSE FROM QSYS2.SYSKEYCST K\n" + "LEFT OUTER JOIN \"SYSIBM\".TABLE_CONSTRAINTS tc ON tc.CONSTRAINT_SCHEMA = K.CONSTRAINT_SCHEMA AND tc.CONSTRAINT_NAME = K.CONSTRAINT_NAME\n" + "WHERE K.CONSTRAINT_SCHEMA = ?" + (forParent != null ? " AND K.TABLE_NAME = ?" : "") + "\nUNION ALL" + "\nSELECT cc.CONSTRAINT_NAME AS PK_NAME, tc.TABLE_NAME, 0 as KEY_SEQ, '' as COLUMN_NAME, 'CHECK' AS CONSTRAINT_TYPE, cc.CHECK_CLAUSE FROM QSYS2.CHECK_CONSTRAINTS cc\n" + "LEFT OUTER JOIN \"SYSIBM\".TABLE_CONSTRAINTS tc ON tc.CONSTRAINT_SCHEMA = cc.CONSTRAINT_SCHEMA AND tc.CONSTRAINT_NAME = cc.CONSTRAINT_NAME\n" + "WHERE cc.CONSTRAINT_SCHEMA = ?" + (forParent != null ? " AND tc.TABLE_NAME = ?" : ""));<NEW_LINE>if (forParent != null) {<NEW_LINE>String schemaName = forParent.getSchema().getName();<NEW_LINE>String tableName = forParent.getName();<NEW_LINE>dbStat.setString(1, schemaName);<NEW_LINE>dbStat.setString(2, tableName);<NEW_LINE>dbStat.setString(3, schemaName);<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>String ownerName = owner.getName();<NEW_LINE>dbStat.setString(1, ownerName);<NEW_LINE>dbStat.setString(2, ownerName);<NEW_LINE>}<NEW_LINE>return dbStat;<NEW_LINE>}
dbStat.setString(4, tableName);
1,487,333
public void execute(String commandName, ConsoleInput ci, List args) {<NEW_LINE>if (args.isEmpty()) {<NEW_LINE>printconsolehelp(ci.out);<NEW_LINE>} else {<NEW_LINE>String subcommand = (String) args.get(0);<NEW_LINE>IConsoleCommand cmd = (IConsoleCommand) commands.get(subcommand);<NEW_LINE>if (cmd != null) {<NEW_LINE>List newargs = new ArrayList(args);<NEW_LINE>newargs.remove(0);<NEW_LINE>cmd.<MASK><NEW_LINE>// if (cmd.getHelpExtra())<NEW_LINE>} else if (subcommand.equalsIgnoreCase("torrents") || subcommand.equalsIgnoreCase("t")) {<NEW_LINE>ci.out.println("> -----");<NEW_LINE>ci.out.println("# [state] PercentDone Name (Filesize) ETA\r\n\tDownSpeed / UpSpeed\tDownloaded/Uploaded\tConnectedSeeds(total) / ConnectedPeers(total)");<NEW_LINE>ci.out.println();<NEW_LINE>ci.out.println("States:");<NEW_LINE>ci.out.println(" > Downloading");<NEW_LINE>ci.out.println(" * Seeding");<NEW_LINE>ci.out.println(" ! Stopped");<NEW_LINE>ci.out.println(" . Waiting (for allocation/checking)");<NEW_LINE>ci.out.println(" : Ready");<NEW_LINE>ci.out.println(" - Queued");<NEW_LINE>ci.out.println(" A Allocating");<NEW_LINE>ci.out.println(" C Checking");<NEW_LINE>ci.out.println(" E Error");<NEW_LINE>ci.out.println(" I Initializing");<NEW_LINE>ci.out.println(" ? Unknown");<NEW_LINE>ci.out.println("> -----");<NEW_LINE>} else<NEW_LINE>printconsolehelp(ci.out);<NEW_LINE>}<NEW_LINE>}
printHelp(ci.out, newargs);