idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
687,815
private DataStore create(@Nonnull AuthenticatedUser user, @Nonnull DataStoreOptions options, @Nullable ClientInfo clientInfo) {<NEW_LINE>Persistence.Connection connection;<NEW_LINE>if (clientInfo != null) {<NEW_LINE>connection = persistence.newConnection(clientInfo);<NEW_LINE>} else {<NEW_LINE>connection = persistence.newConnection();<NEW_LINE>}<NEW_LINE>connection.login(user);<NEW_LINE>// Note: the user's custom properties (if provided) override any matching properties previously<NEW_LINE>// set in DataStoreOptions. This is intentional to give the AuthenticatedUser data more<NEW_LINE>// authority.<NEW_LINE>Map<String, String> customProperties = user.customProperties();<NEW_LINE>if (customProperties != null && !customProperties.isEmpty()) {<NEW_LINE>options = DataStoreOptions.builder().from(options).putAllCustomProperties(customProperties).build();<NEW_LINE>}<NEW_LINE>if (options.customProperties() != null) {<NEW_LINE>connection.<MASK><NEW_LINE>}<NEW_LINE>return create(connection, options);<NEW_LINE>}
setCustomProperties(options.customProperties());
1,748,381
public void afterFetchNodes() {<NEW_LINE>logDebug("afterFetchNodes");<NEW_LINE>// Set toolbar<NEW_LINE>tB = findViewById(R.id.toolbar_provider);<NEW_LINE>// Set app bar layout<NEW_LINE>aBL = findViewById(R.id.app_bar_layout_provider);<NEW_LINE>AppBarLayout.LayoutParams params = (AppBarLayout.LayoutParams) tB.getLayoutParams();<NEW_LINE>params.setMargins(0, 0, 0, 0);<NEW_LINE>showAB(tB);<NEW_LINE>cancelButton = findViewById(R.id.cancel_button);<NEW_LINE>cancelButton.setOnClickListener(this);<NEW_LINE>attachButton = findViewById(R.id.attach_button);<NEW_LINE>attachButton.setOnClickListener(this);<NEW_LINE>activateButton(false);<NEW_LINE>// TABS section<NEW_LINE>tabLayoutProvider = findViewById(R.id.sliding_tabs_provider);<NEW_LINE>viewPagerProvider = findViewById(R.id.provider_tabs_pager);<NEW_LINE>if (mTabsAdapterProvider == null) {<NEW_LINE>mTabsAdapterProvider = new ProviderPageAdapter(getSupportFragmentManager(), this);<NEW_LINE>viewPagerProvider.setAdapter(mTabsAdapterProvider);<NEW_LINE>tabLayoutProvider.setupWithViewPager(viewPagerProvider);<NEW_LINE>}<NEW_LINE>viewPagerProvider.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {<NEW_LINE><NEW_LINE>public void onPageScrollStateChanged(int state) {<NEW_LINE>}<NEW_LINE><NEW_LINE>public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {<NEW_LINE>}<NEW_LINE><NEW_LINE>public void onPageSelected(int position) {<NEW_LINE>logDebug("onTabChanged TabId: " + position);<NEW_LINE>if (position == CLOUD_TAB) {<NEW_LINE>tabShown = CLOUD_TAB;<NEW_LINE>cloudDriveProviderFragment = (CloudDriveProviderFragment) getSupportFragmentManager().findFragmentByTag(getFragmentTag(R.id.provider_tabs_pager, CLOUD_TAB));<NEW_LINE>if (cloudDriveProviderFragment != null) {<NEW_LINE>if (cloudDriveProviderFragment.getParentHandle() == INVALID_HANDLE || cloudDriveProviderFragment.getParentHandle() == megaApi.getRootNode().getHandle()) {<NEW_LINE>aB.setTitle(getString(R.string<MASK><NEW_LINE>} else {<NEW_LINE>aB.setTitle(megaApi.getNodeByHandle(cloudDriveProviderFragment.getParentHandle()).getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (position == INCOMING_TAB) {<NEW_LINE>tabShown = INCOMING_TAB;<NEW_LINE>incomingSharesProviderFragment = (IncomingSharesProviderFragment) getSupportFragmentManager().findFragmentByTag(getFragmentTag(R.id.provider_tabs_pager, INCOMING_TAB));<NEW_LINE>if (incomingSharesProviderFragment != null) {<NEW_LINE>if (incomingSharesProviderFragment.getDeepBrowserTree() == 0) {<NEW_LINE>aB.setTitle(getString(R.string.file_provider_title).toUpperCase());<NEW_LINE>} else {<NEW_LINE>aB.setTitle(incomingSharesProviderFragment.name);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
.file_provider_title).toUpperCase());
898,154
private void init() {<NEW_LINE>if (radiusDEG > 90) {<NEW_LINE>// --spans more than half the globe<NEW_LINE>assert enclosingBox.getWidth() == 360;<NEW_LINE>double backDistDEG = 180 - radiusDEG;<NEW_LINE>if (backDistDEG > 0) {<NEW_LINE>double backRadius = 180 - radiusDEG;<NEW_LINE>double backX = DistanceUtils.normLonDEG(getCenter().getX() + 180);<NEW_LINE>double backY = DistanceUtils.normLatDEG(getCenter().getY() + 180);<NEW_LINE>// Shrink inverseCircle as small as possible to avoid accidental overlap.<NEW_LINE>// Note that this is tricky business to come up with a value small enough<NEW_LINE>// but not too small or else numerical conditioning issues become a problem.<NEW_LINE>backRadius -= Math.max(Math.ulp(Math.abs(backY) + backRadius), Math.ulp(Math.abs(backX) + backRadius));<NEW_LINE>if (inverseCircle != null) {<NEW_LINE>inverseCircle.reset(backX, backY, backRadius);<NEW_LINE>} else {<NEW_LINE>inverseCircle = new GeoCircle(ctx.makePoint(backX, backY), backRadius, ctx);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// whole globe<NEW_LINE>inverseCircle = null;<NEW_LINE>}<NEW_LINE>// although probably not used<NEW_LINE>horizAxisY <MASK><NEW_LINE>} else {<NEW_LINE>inverseCircle = null;<NEW_LINE>double _horizAxisY = ctx.getDistCalc().calcBoxByDistFromPt_yHorizAxisDEG(getCenter(), radiusDEG, ctx);<NEW_LINE>// some rare numeric conditioning cases can cause this to be barely beyond the box<NEW_LINE>if (_horizAxisY > enclosingBox.getMaxY()) {<NEW_LINE>horizAxisY = enclosingBox.getMaxY();<NEW_LINE>} else if (_horizAxisY < enclosingBox.getMinY()) {<NEW_LINE>horizAxisY = enclosingBox.getMinY();<NEW_LINE>} else {<NEW_LINE>horizAxisY = _horizAxisY;<NEW_LINE>}<NEW_LINE>// assert enclosingBox.relate_yRange(horizAxis,horizAxis,ctx).intersects();<NEW_LINE>}<NEW_LINE>}
= getCenter().getY();
1,013,197
private Collection<? extends IPath> globalFolders() {<NEW_LINE>List<IPath> dirs = new ArrayList<IPath>();<NEW_LINE>// FIXME Handle properly on Windows...<NEW_LINE>Map<String, String> env = ShellExecutable.getEnvironment(location);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>String <MASK><NEW_LINE>if (nodePath != null) {<NEW_LINE>// Split like PATH and add to dirs<NEW_LINE>String pathENV = PathUtil.convertPATH(nodePath);<NEW_LINE>String[] paths = pathENV.split(File.pathSeparator);<NEW_LINE>for (String path : paths) {<NEW_LINE>dirs.add(Path.fromOSString(path));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// $NON-NLS-1$<NEW_LINE>String home = env.get("HOME");<NEW_LINE>if (home != null) {<NEW_LINE>IPath homePath = Path.fromOSString(home);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>dirs.add(homePath.append(".node_modules"));<NEW_LINE>// $NON-NLS-1$<NEW_LINE>dirs.add(homePath.append(".node_libraries"));<NEW_LINE>}<NEW_LINE>// Grab node_prefix setting!<NEW_LINE>try {<NEW_LINE>IPath modulesPath = getModulesPath();<NEW_LINE>if (modulesPath != null) {<NEW_LINE>dirs.add(modulesPath);<NEW_LINE>}<NEW_LINE>} catch (CoreException e) {<NEW_LINE>IdeLog.logError(JSCorePlugin.getDefault(), e);<NEW_LINE>}<NEW_LINE>return dirs;<NEW_LINE>}
nodePath = env.get("NODE_PATH");
1,325,771
private BLangLambdaFunction createLambdaFunction(Location pos, TypeNode returnType, BLangReturn returnNode, boolean isPassthrough) {<NEW_LINE>// function(_Frame frame) ... and ref to frame<NEW_LINE>BType frameType = getFrameTypeSymbol().type;<NEW_LINE>BVarSymbol frameSymbol = new BVarSymbol(0, names.fromString(FRAME_PARAMETER_NAME), this.env.scope.owner.pkgID, frameType, this.env.scope.owner, pos, VIRTUAL);<NEW_LINE>BLangSimpleVariable frameVariable = ASTBuilderUtil.createVariable(pos, null, <MASK><NEW_LINE>BLangVariableReference frameVarRef = ASTBuilderUtil.createVariableRef(pos, frameSymbol);<NEW_LINE>// lambda body<NEW_LINE>BLangBlockFunctionBody body = (BLangBlockFunctionBody) TreeBuilder.createBlockFunctionBodyNode();<NEW_LINE>// add `return x;`<NEW_LINE>if (returnNode != null) {<NEW_LINE>// passthrough will return same frame parameter<NEW_LINE>if (isPassthrough) {<NEW_LINE>returnNode.setExpression(frameVarRef);<NEW_LINE>}<NEW_LINE>body.addStatement(returnNode);<NEW_LINE>}<NEW_LINE>return createLambdaFunction(pos, Lists.of(frameVariable), returnType, body);<NEW_LINE>}
frameSymbol.type, null, frameSymbol);
1,073,721
private List<String> queryArguments() {<NEW_LINE>if (ARGMAX > 0) {<NEW_LINE>// Get arguments via sysctl(3)<NEW_LINE>int[] mib = new int[4];<NEW_LINE>// CTL_KERN<NEW_LINE>mib[0] = 1;<NEW_LINE>// KERN_PROC<NEW_LINE>mib[1] = 14;<NEW_LINE>// KERN_PROC_ARGS<NEW_LINE>mib[2] = 7;<NEW_LINE>mib[3] = getProcessID();<NEW_LINE>// Allocate memory for arguments<NEW_LINE>Memory m = new Memory(ARGMAX);<NEW_LINE>size_t.ByReference size = new size_t.ByReference(new size_t(ARGMAX));<NEW_LINE>// Fetch arguments<NEW_LINE>if (FreeBsdLibc.INSTANCE.sysctl(mib, mib.length, m, size, null, size_t.ZERO) == 0) {<NEW_LINE>return Collections.unmodifiableList(ParseUtil.parseByteArrayToStrings(m.getByteArray(0, size.getValue(<MASK><NEW_LINE>} else {<NEW_LINE>LOG.warn("Failed sysctl call for process arguments (kern.proc.args), process {} may not exist. Error code: {}", getProcessID(), Native.getLastError());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return Collections.emptyList();<NEW_LINE>}
).intValue())));
726,145
public static void main(String[] args) {<NEW_LINE>Loader.loadNativeLibraries();<NEW_LINE>// [START solver]<NEW_LINE>MPSolver solver = MPSolver.createSolver("GLOP");<NEW_LINE>// [END solver]<NEW_LINE>// [START variables]<NEW_LINE>double infinity = java.lang.Double.POSITIVE_INFINITY;<NEW_LINE>// x and y are continuous non-negative variables.<NEW_LINE>MPVariable x = solver.makeNumVar(0.0, infinity, "x");<NEW_LINE>MPVariable y = solver.makeNumVar(0.0, infinity, "y");<NEW_LINE>System.out.println("Number of variables = " + solver.numVariables());<NEW_LINE>// [END variables]<NEW_LINE>// [START constraints]<NEW_LINE>// x + 2*y <= 14.<NEW_LINE>MPConstraint c0 = solver.makeConstraint(-infinity, 14.0, "c0");<NEW_LINE>c0.setCoefficient(x, 1);<NEW_LINE>c0.setCoefficient(y, 2);<NEW_LINE>// 3*x - y >= 0.<NEW_LINE>MPConstraint c1 = solver.makeConstraint(0.0, infinity, "c1");<NEW_LINE>c1.setCoefficient(x, 3);<NEW_LINE>c1.setCoefficient(y, -1);<NEW_LINE>// x - y <= 2.<NEW_LINE>MPConstraint c2 = solver.makeConstraint(-infinity, 2.0, "c2");<NEW_LINE>c2.setCoefficient(x, 1);<NEW_LINE>c2.setCoefficient(y, -1);<NEW_LINE>System.out.println("Number of constraints = " + solver.numConstraints());<NEW_LINE>// [END constraints]<NEW_LINE>// [START objective]<NEW_LINE>// Maximize 3 * x + 4 * y.<NEW_LINE>MPObjective objective = solver.objective();<NEW_LINE>objective.setCoefficient(x, 3);<NEW_LINE><MASK><NEW_LINE>objective.setMaximization();<NEW_LINE>// [END objective]<NEW_LINE>// [START solve]<NEW_LINE>final MPSolver.ResultStatus resultStatus = solver.solve();<NEW_LINE>// [END solve]<NEW_LINE>// [START print_solution]<NEW_LINE>if (resultStatus == MPSolver.ResultStatus.OPTIMAL) {<NEW_LINE>System.out.println("Solution:");<NEW_LINE>System.out.println("Objective value = " + objective.value());<NEW_LINE>System.out.println("x = " + x.solutionValue());<NEW_LINE>System.out.println("y = " + y.solutionValue());<NEW_LINE>} else {<NEW_LINE>System.err.println("The problem does not have an optimal solution!");<NEW_LINE>}<NEW_LINE>// [END print_solution]<NEW_LINE>// [START advanced]<NEW_LINE>System.out.println("\nAdvanced usage:");<NEW_LINE>System.out.println("Problem solved in " + solver.wallTime() + " milliseconds");<NEW_LINE>System.out.println("Problem solved in " + solver.iterations() + " iterations");<NEW_LINE>// [END advanced]<NEW_LINE>}
objective.setCoefficient(y, 4);
1,282,928
protected java.util.Date _parseDate(JsonParser p, DeserializationContext ctxt) throws IOException {<NEW_LINE>if (_customFormat != null) {<NEW_LINE>if (p.hasToken(JsonToken.VALUE_STRING)) {<NEW_LINE>String str = p.getText().trim();<NEW_LINE>if (str.isEmpty()) {<NEW_LINE>final CoercionAction <MASK><NEW_LINE>switch(// note: Fail handled above<NEW_LINE>act) {<NEW_LINE>case AsEmpty:<NEW_LINE>return new java.util.Date(0L);<NEW_LINE>case AsNull:<NEW_LINE>case TryConvert:<NEW_LINE>default:<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>synchronized (_customFormat) {<NEW_LINE>try {<NEW_LINE>return _customFormat.parse(str);<NEW_LINE>} catch (ParseException e) {<NEW_LINE>return (java.util.Date) ctxt.handleWeirdStringValue(handledType(), str, "expected format \"%s\"", _formatString);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return super._parseDate(p, ctxt);<NEW_LINE>}
act = _checkFromStringCoercion(ctxt, str);
922,959
// ===================================================================================<NEW_LINE>// Basic Override<NEW_LINE>// ==============<NEW_LINE>@Override<NEW_LINE>protected String doBuildColumnString(String dm) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(dm).append(available);<NEW_LINE>sb.append(dm).append(boost);<NEW_LINE>sb.append(dm).append(configParameter);<NEW_LINE>sb.append(dm).append(createdBy);<NEW_LINE>sb.append(dm).append(createdTime);<NEW_LINE>sb.append(dm).append(depth);<NEW_LINE>sb.append(dm).append(description);<NEW_LINE>sb.append(dm).append(excludedDocPaths);<NEW_LINE>sb.append(dm).append(excludedPaths);<NEW_LINE>sb.append(dm).append(includedDocPaths);<NEW_LINE>sb.append(dm).append(includedPaths);<NEW_LINE>sb.append(dm).append(intervalTime);<NEW_LINE>sb.append(dm).append(maxAccessCount);<NEW_LINE>sb.append(dm).append(name);<NEW_LINE>sb.append(dm).append(numOfThread);<NEW_LINE>sb.append<MASK><NEW_LINE>sb.append(dm).append(permissions);<NEW_LINE>sb.append(dm).append(sortOrder);<NEW_LINE>sb.append(dm).append(timeToLive);<NEW_LINE>sb.append(dm).append(updatedBy);<NEW_LINE>sb.append(dm).append(updatedTime);<NEW_LINE>sb.append(dm).append(virtualHosts);<NEW_LINE>if (sb.length() > dm.length()) {<NEW_LINE>sb.delete(0, dm.length());<NEW_LINE>}<NEW_LINE>sb.insert(0, "{").append("}");<NEW_LINE>return sb.toString();<NEW_LINE>}
(dm).append(paths);
1,842,011
PackingPlan buildNewPackingPlan(Map<String, Integer> changeRequests, PackingPlan currentPackingPlan) {<NEW_LINE>Map<String, Integer> componentDeltas = new HashMap<>();<NEW_LINE>Map<String, Integer> componentCounts = currentPackingPlan.getComponentCounts();<NEW_LINE>for (String compName : changeRequests.keySet()) {<NEW_LINE>if (!componentCounts.containsKey(compName)) {<NEW_LINE>throw new IllegalArgumentException(String.format("Invalid component name in scale up diagnosis: %s. Valid components include: %s", compName, Arrays.toString(componentCounts.keySet().toArray(new String[componentCounts.keySet().size()]))));<NEW_LINE>}<NEW_LINE>Integer <MASK><NEW_LINE>int delta = newValue - componentCounts.get(compName);<NEW_LINE>if (delta == 0) {<NEW_LINE>LOG.info(String.format("New parallelism for %s is unchanged: %d", compName, newValue));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>componentDeltas.put(compName, delta);<NEW_LINE>}<NEW_LINE>// Create an instance of the packing class<NEW_LINE>IRepacking packing = getRepackingClass(Context.repackingClass(config));<NEW_LINE>Topology topology = physicalPlanProvider.get().getTopology();<NEW_LINE>try {<NEW_LINE>packing.initialize(config, topology);<NEW_LINE>return packing.repack(currentPackingPlan, componentDeltas);<NEW_LINE>} finally {<NEW_LINE>SysUtils.closeIgnoringExceptions(packing);<NEW_LINE>}<NEW_LINE>}
newValue = changeRequests.get(compName);
644,968
public static void sendSupportInfo(final String text, final ActivityBase context) {<NEW_LINE>Util.log(null, Log.WARN, text);<NEW_LINE>if (Util.hasValidFingerPrint(context) && !"Genymotion".equals(Build.MANUFACTURER)) {<NEW_LINE>AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);<NEW_LINE>alertDialogBuilder.setTitle(R.string.app_name);<NEW_LINE>alertDialogBuilder.setMessage(R.string.msg_support_info);<NEW_LINE>alertDialogBuilder.setIcon(context.getThemed(R.attr.icon_launcher));<NEW_LINE>alertDialogBuilder.setPositiveButton(context.getString(android.R.string.ok), new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int _which) {<NEW_LINE>String ourVersion = Util.getSelfVersionName(context);<NEW_LINE>StringBuilder sb = new StringBuilder(text);<NEW_LINE>sb.insert(0, "\r\n");<NEW_LINE>sb.insert(0, String.format("Id: %s\r\n", Build.ID));<NEW_LINE>sb.insert(0, String.format("Display: %s\r\n", Build.DISPLAY));<NEW_LINE>sb.insert(0, String.format("Host: %s\r\n", Build.HOST));<NEW_LINE>sb.insert(0, String.format("Device: %s\r\n", Build.DEVICE));<NEW_LINE>sb.insert(0, String.format("Product: %s\r\n", Build.PRODUCT));<NEW_LINE>sb.insert(0, String.format("Model: %s\r\n", Build.MODEL));<NEW_LINE>sb.insert(0, String.format("Manufacturer: %s\r\n", Build.MANUFACTURER));<NEW_LINE>sb.insert(0, String.format("Brand: %s\r\n", Build.BRAND));<NEW_LINE>sb.insert(0, "\r\n");<NEW_LINE>sb.insert(0, String.format("Android: %s (SDK %d)\r\n", Build.VERSION.RELEASE, Build.VERSION.SDK_INT));<NEW_LINE>sb.insert(0, String.format("XPrivacy: %s\r\n", ourVersion));<NEW_LINE>Intent sendEmail = new Intent(Intent.ACTION_SEND);<NEW_LINE>sendEmail.setType("message/rfc822");<NEW_LINE>sendEmail.putExtra(Intent.EXTRA_EMAIL, new String[] { "marcel+support@faircode.eu" });<NEW_LINE>sendEmail.putExtra(Intent.EXTRA_SUBJECT, "XPrivacy " + ourVersion + "/" + Build.VERSION.RELEASE + " support info");<NEW_LINE>sendEmail.putExtra(Intent.EXTRA_TEXT, sb.toString());<NEW_LINE>try {<NEW_LINE>context.startActivity(sendEmail);<NEW_LINE>} catch (Throwable ex) {<NEW_LINE>Util.bug(null, ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>alertDialogBuilder.setNegativeButton(context.getString(android.R.string.cancel), new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int which) {<NEW_LINE>}<NEW_LINE>});<NEW_LINE><MASK><NEW_LINE>alertDialog.show();<NEW_LINE>}<NEW_LINE>}
AlertDialog alertDialog = alertDialogBuilder.create();
582,522
public void analyze(Analyzer analyzer) throws AnalysisException, UserException {<NEW_LINE>super.analyze(analyzer);<NEW_LINE>// check operation privilege<NEW_LINE>if (!Env.getCurrentEnv().getAuth().checkGlobalPriv(ConnectContext.get(), PrivPredicate.ADMIN)) {<NEW_LINE>ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR, "ADMIN");<NEW_LINE>}<NEW_LINE>if (dbName == null) {<NEW_LINE>dbName = analyzer.getDefaultDb();<NEW_LINE>} else {<NEW_LINE>if (Strings.isNullOrEmpty(analyzer.getClusterName())) {<NEW_LINE>ErrorReport.reportAnalysisException(ErrorCode.ERR_CLUSTER_NAME_NULL);<NEW_LINE>}<NEW_LINE>dbName = ClusterNamespace.getFullName(analyzer.getClusterName(), dbName);<NEW_LINE>}<NEW_LINE>if (Strings.isNullOrEmpty(dbName)) {<NEW_LINE>ErrorReport.reportAnalysisException(ErrorCode.ERR_NO_DB_ERROR);<NEW_LINE>}<NEW_LINE>if (Strings.isNullOrEmpty(fileName)) {<NEW_LINE>throw new AnalysisException("File name is not specified");<NEW_LINE>}<NEW_LINE>Optional<String> optional = properties.keySet().stream().filter(entity -> !PROP_CATALOG.equals<MASK><NEW_LINE>if (optional.isPresent()) {<NEW_LINE>throw new AnalysisException(optional.get() + " is invalid property");<NEW_LINE>}<NEW_LINE>catalogName = properties.get(PROP_CATALOG);<NEW_LINE>if (Strings.isNullOrEmpty(catalogName)) {<NEW_LINE>throw new AnalysisException("catalog name is missing");<NEW_LINE>}<NEW_LINE>}
(entity)).findFirst();
667,816
public boolean isSubsetOf(JSONObject little, JSONObject big) {<NEW_LINE>for (Object key : little.keySet()) {<NEW_LINE>Object littleValue = little.get(key);<NEW_LINE>Object bigValue = big.get(key);<NEW_LINE>// Key is not found in JSON log data<NEW_LINE>if (littleValue != null && bigValue == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if ((bigValue instanceof Long) || (bigValue instanceof Integer) || (bigValue instanceof Float)) {<NEW_LINE>bigValue = bigValue.toString();<NEW_LINE>}<NEW_LINE>// Looking for leaf, but key in JSON data is not a leaf<NEW_LINE>if (littleValue instanceof String && !(bigValue instanceof String)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Search pattern is incorrect -too many keys<NEW_LINE>if (!(littleValue instanceof String) && bigValue instanceof String) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Found two leaves in JSON data, compare values and return false if not matched<NEW_LINE>if (littleValue instanceof String && bigValue instanceof String) {<NEW_LINE>if (!valueIsEqual(littleValue, bigValue))<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Not comparing leaves, so keep looking<NEW_LINE>if (littleValue instanceof JSONObject && bigValue instanceof JSONObject) {<NEW_LINE>boolean subresult = isSubsetOf((JSONObject<MASK><NEW_LINE>if (!subresult)<NEW_LINE>// no match<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Return true when all traversed and match found<NEW_LINE>return true;<NEW_LINE>}
) littleValue, (JSONObject) bigValue);
1,560,305
protected void doCollectElementEvaluations(JRPrintPage page, List<JRPrintElement> elements, final ElementEvaluationsCollector collector, boolean clearEmpty) {<NEW_LINE>FillPageKey pageKey = new FillPageKey(page);<NEW_LINE>for (Map.Entry<JREvaluationTime, LinkedHashMap<FillPageKey, LinkedMap<Object, EvaluationBoundAction>>> boundMapEntry : actionsMap.entrySet()) {<NEW_LINE>final JREvaluationTime evaluationTime = boundMapEntry.getKey();<NEW_LINE>LinkedHashMap<FillPageKey, LinkedMap<Object, EvaluationBoundAction>> map = boundMapEntry.getValue();<NEW_LINE>synchronized (map) {<NEW_LINE>final LinkedMap<Object, EvaluationBoundAction> actionsMap = map.get(pageKey);<NEW_LINE>if (actionsMap != null && !actionsMap.isEmpty()) {<NEW_LINE>// FIXME optimize for pages with a single virtual block<NEW_LINE>// create a deep element visitor<NEW_LINE>PrintElementVisitor<Void> visitor = new UniformPrintElementVisitor<Void>(true) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected void visitElement(JRPrintElement element, Void arg) {<NEW_LINE>// remove the action from the map because we're saving it as part of the page.<NEW_LINE>// ugly cast but acceptable for now.<NEW_LINE>ElementEvaluationAction action = (ElementEvaluationAction) actionsMap.remove(element);<NEW_LINE>if (action != null) {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug(id + " collecting evaluation " + evaluationTime + " of element " + element);<NEW_LINE>}<NEW_LINE>collector.collect(element, action.element, evaluationTime);<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected void visitFrameElements(List<JRPrintElement> elements, Void arg) {<NEW_LINE>if (!(elements instanceof VirtualizableElementList)) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>for (JRPrintElement element : elements) {<NEW_LINE>element.accept(visitor, null);<NEW_LINE>}<NEW_LINE>if (clearEmpty && actionsMap.isEmpty()) {<NEW_LINE>map.remove(pageKey);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
super.visitFrameElements(elements, arg);
1,057,757
public static void trainAndTest(Path trainPath, Path testPath, Path modelRoot, Path reportPath) throws IOException {<NEW_LINE>NerDataSet trainingSet = NerDataSet.load(trainPath, AnnotationStyle.BRACKET);<NEW_LINE>Log.info(trainingSet.info());<NEW_LINE>NerDataSet testSet = NerDataSet.load(testPath, AnnotationStyle.BRACKET);<NEW_LINE>Log.info(testSet.info());<NEW_LINE>TurkishMorphology morphology = TurkishMorphology.createWithDefaults();<NEW_LINE>PerceptronNer ner = new PerceptronNerTrainer(morphology).train(trainingSet, testSet, 7, 0.1f);<NEW_LINE>Files.createDirectories(modelRoot);<NEW_LINE>ner.saveModelAsText(modelRoot);<NEW_LINE>Log.info("Testing %d sentences.", testSet.sentences.size());<NEW_LINE>NerDataSet <MASK><NEW_LINE>PerceptronNerTrainer.evaluationReport(testSet, testResult, reportPath);<NEW_LINE>Log.info("Done.");<NEW_LINE>}
testResult = ner.evaluate(testSet);
787,595
public ListenableFuture<BuildOutput> compile(BlazeContext context, Label label, FastBuildState buildState, Set<File> modifiedFiles) {<NEW_LINE>checkState(buildState.completedBuildOutput().isPresent());<NEW_LINE>BuildOutput buildOutput = buildState.completedBuildOutput().get();<NEW_LINE>checkState(buildOutput.blazeData().containsKey(label));<NEW_LINE>return ConcurrencyUtil.getAppExecutorService().submit(() -> {<NEW_LINE>BlazeConsoleWriter writer = new BlazeConsoleWriter(blazeConsoleService);<NEW_LINE>ChangedSourceInfo changedSourceInfo = getPathsToCompile(context, label, buildOutput.blazeData(), modifiedFiles);<NEW_LINE>if (!changedSourceInfo.pathsToCompile.isEmpty()) {<NEW_LINE>CompileInstructions instructions = CompileInstructions.builder().outputDirectory(buildState.compilerOutputDirectory()).classpath(ImmutableList.of(buildOutput.deployJar())).filesToCompile(changedSourceInfo.pathsToCompile).annotationProcessorClassNames(changedSourceInfo.annotationProcessorClassNames).annotationProcessorClasspath(changedSourceInfo.annotationProcessorClasspath).outputWriter(writer).build();<NEW_LINE>for (FastBuildCompilationModification modification : FastBuildCompilationModification.EP_NAME.getExtensions()) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>compilerFactory.getCompilerFor(label, buildOutput.blazeData()).compile(context, instructions);<NEW_LINE>} else {<NEW_LINE>context.output(new PrintOutput("No modified files to compile."));<NEW_LINE>}<NEW_LINE>return buildOutput;<NEW_LINE>});<NEW_LINE>}
instructions = modification.modifyInstructions(instructions);
397,620
protected long[] readMV4x4(int miCol, int miRow, int blSz, VPXBooleanDecoder decoder, DecodingContext c, int packedRefFrames) {<NEW_LINE>int subMode0 = readInterMode(miCol, miRow, blSz, decoder, c);<NEW_LINE>long mvl0 = readSub0(miCol, miRow, blSz, <MASK><NEW_LINE>int subMode1 = readInterMode(miCol, miRow, blSz, decoder, c);<NEW_LINE>long mvl1 = readSub12(miCol, miRow, blSz, decoder, c, mvl0, subMode1, 1, packedRefFrames);<NEW_LINE>int subMode2 = readInterMode(miCol, miRow, blSz, decoder, c);<NEW_LINE>long mvl2 = readSub12(miCol, miRow, blSz, decoder, c, mvl0, subMode2, 2, packedRefFrames);<NEW_LINE>int subMode3 = readInterMode(miCol, miRow, blSz, decoder, c);<NEW_LINE>long mvl3 = readMvSub3(miCol, miRow, blSz, decoder, c, mvl0, mvl1, mvl2, subMode3, packedRefFrames);<NEW_LINE>updateMVLineBuffers(miCol, miRow, blSz, c, mvl3);<NEW_LINE>updateMVLineBuffers4x4(miCol, miRow, blSz, c, mvl1, mvl2);<NEW_LINE>// int subModes = (subMode0 << 24) | (subMode1 << 16) | (subMode2 << 8) | subMode3;<NEW_LINE>return new long[] { mvl0, mvl1, mvl2, mvl3 };<NEW_LINE>}
decoder, c, subMode0, packedRefFrames);
539,061
public static HashTree generateHashTree(ApiScenarioWithBLOBs item, Map<String, String> planEnvMap, JmeterRunRequestDTO runRequest) {<NEW_LINE>HashTree jmeterHashTree = new HashTree();<NEW_LINE>MsTestPlan testPlan = new MsTestPlan();<NEW_LINE>testPlan.setHashTree(new LinkedList<>());<NEW_LINE>try {<NEW_LINE>MsThreadGroup group = new MsThreadGroup();<NEW_LINE>group.setLabel(item.getName());<NEW_LINE>group.setName(runRequest.getReportId());<NEW_LINE>MsScenario scenario = JSONObject.parseObject(item.getScenarioDefinition(), MsScenario.class);<NEW_LINE>group.setOnSampleError(scenario.getOnSampleError());<NEW_LINE>if (planEnvMap != null && planEnvMap.size() > 0) {<NEW_LINE>scenario.setEnvironmentMap(planEnvMap);<NEW_LINE>} else {<NEW_LINE>setScenarioEnv(scenario, item);<NEW_LINE>}<NEW_LINE>GenerateHashTreeUtil.parse(item.getScenarioDefinition(), scenario);<NEW_LINE>group.setEnableCookieShare(scenario.isEnableCookieShare());<NEW_LINE>LinkedList<MsTestElement> scenarios = new LinkedList<>();<NEW_LINE>scenarios.add(scenario);<NEW_LINE>group.setHashTree(scenarios);<NEW_LINE>testPlan.<MASK><NEW_LINE>} catch (Exception ex) {<NEW_LINE>RemakeReportService remakeReportService = CommonBeanFactory.getBean(RemakeReportService.class);<NEW_LINE>remakeReportService.remake(runRequest);<NEW_LINE>ResultDTO dto = new ResultDTO();<NEW_LINE>BeanUtils.copyBean(dto, runRequest);<NEW_LINE>CommonBeanFactory.getBean(ApiExecutionQueueService.class).queueNext(dto);<NEW_LINE>}<NEW_LINE>ParameterConfig config = new ParameterConfig();<NEW_LINE>config.setScenarioId(item.getId());<NEW_LINE>config.setReportType(runRequest.getReportType());<NEW_LINE>testPlan.toHashTree(jmeterHashTree, testPlan.getHashTree(), config);<NEW_LINE>return jmeterHashTree;<NEW_LINE>}
getHashTree().add(group);
770,715
public void render() {<NEW_LINE>if (!cached) {<NEW_LINE>cached = true;<NEW_LINE>count = 0;<NEW_LINE>spriteCache.clear();<NEW_LINE>final float extraWidth = viewBounds.width * overCache;<NEW_LINE>final float extraHeight = viewBounds.height * overCache;<NEW_LINE>cacheBounds.x = viewBounds.x - extraWidth;<NEW_LINE>cacheBounds<MASK><NEW_LINE>cacheBounds.width = viewBounds.width + extraWidth * 2;<NEW_LINE>cacheBounds.height = viewBounds.height + extraHeight * 2;<NEW_LINE>for (MapLayer layer : map.getLayers()) {<NEW_LINE>spriteCache.beginCache();<NEW_LINE>if (layer instanceof TiledMapTileLayer) {<NEW_LINE>renderTileLayer((TiledMapTileLayer) layer);<NEW_LINE>} else if (layer instanceof TiledMapImageLayer) {<NEW_LINE>renderImageLayer((TiledMapImageLayer) layer);<NEW_LINE>}<NEW_LINE>spriteCache.endCache();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (blending) {<NEW_LINE>Gdx.gl.glEnable(GL20.GL_BLEND);<NEW_LINE>Gdx.gl.glBlendFunc(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);<NEW_LINE>}<NEW_LINE>spriteCache.begin();<NEW_LINE>MapLayers mapLayers = map.getLayers();<NEW_LINE>for (int i = 0, j = mapLayers.getCount(); i < j; i++) {<NEW_LINE>MapLayer layer = mapLayers.get(i);<NEW_LINE>if (layer.isVisible()) {<NEW_LINE>spriteCache.draw(i);<NEW_LINE>renderObjects(layer);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>spriteCache.end();<NEW_LINE>if (blending)<NEW_LINE>Gdx.gl.glDisable(GL20.GL_BLEND);<NEW_LINE>}
.y = viewBounds.y - extraHeight;
1,275,359
public static DescribeSnapshotsResponse unmarshall(DescribeSnapshotsResponse describeSnapshotsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSnapshotsResponse.setRequestId(_ctx.stringValue("DescribeSnapshotsResponse.RequestId"));<NEW_LINE>describeSnapshotsResponse.setTotalCount(_ctx.integerValue("DescribeSnapshotsResponse.TotalCount"));<NEW_LINE>describeSnapshotsResponse.setPageSize(_ctx.integerValue("DescribeSnapshotsResponse.PageSize"));<NEW_LINE>describeSnapshotsResponse.setPageNumber<MASK><NEW_LINE>List<Snapshot> snapshots = new ArrayList<Snapshot>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeSnapshotsResponse.Snapshots.Length"); i++) {<NEW_LINE>Snapshot snapshot = new Snapshot();<NEW_LINE>snapshot.setCreateTime(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots[" + i + "].CreateTime"));<NEW_LINE>snapshot.setDescription(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots[" + i + "].Description"));<NEW_LINE>snapshot.setProgress(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots[" + i + "].Progress"));<NEW_LINE>snapshot.setRemainTime(_ctx.integerValue("DescribeSnapshotsResponse.Snapshots[" + i + "].RemainTime"));<NEW_LINE>snapshot.setRetentionDays(_ctx.integerValue("DescribeSnapshotsResponse.Snapshots[" + i + "].RetentionDays"));<NEW_LINE>snapshot.setSnapshotId(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots[" + i + "].SnapshotId"));<NEW_LINE>snapshot.setSnapshotName(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots[" + i + "].SnapshotName"));<NEW_LINE>snapshot.setSourceFileSystemId(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots[" + i + "].SourceFileSystemId"));<NEW_LINE>snapshot.setSourceFileSystemSize(_ctx.longValue("DescribeSnapshotsResponse.Snapshots[" + i + "].SourceFileSystemSize"));<NEW_LINE>snapshot.setStatus(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots[" + i + "].Status"));<NEW_LINE>snapshot.setEncryptType(_ctx.integerValue("DescribeSnapshotsResponse.Snapshots[" + i + "].EncryptType"));<NEW_LINE>snapshot.setSourceFileSystemVersion(_ctx.stringValue("DescribeSnapshotsResponse.Snapshots[" + i + "].SourceFileSystemVersion"));<NEW_LINE>snapshots.add(snapshot);<NEW_LINE>}<NEW_LINE>describeSnapshotsResponse.setSnapshots(snapshots);<NEW_LINE>return describeSnapshotsResponse;<NEW_LINE>}
(_ctx.integerValue("DescribeSnapshotsResponse.PageNumber"));
1,645,553
final GetContextKeysForCustomPolicyResult executeGetContextKeysForCustomPolicy(GetContextKeysForCustomPolicyRequest getContextKeysForCustomPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getContextKeysForCustomPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetContextKeysForCustomPolicyRequest> request = null;<NEW_LINE>Response<GetContextKeysForCustomPolicyResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetContextKeysForCustomPolicyRequestMarshaller().marshall(super.beforeMarshalling(getContextKeysForCustomPolicyRequest));<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, "IAM");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetContextKeysForCustomPolicy");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<GetContextKeysForCustomPolicyResult> responseHandler = new StaxResponseHandler<GetContextKeysForCustomPolicyResult>(new GetContextKeysForCustomPolicyResultStaxUnmarshaller());<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());
1,113,610
public static /*<NEW_LINE>// FileChannel.transferTo() seems to fail under certain linux configurations.<NEW_LINE>public static boolean copyFile( final File _source, final File _dest ) {<NEW_LINE>FileChannel source = null;<NEW_LINE>FileChannel dest = null;<NEW_LINE>try {<NEW_LINE>if( _source.length() < 1L ) {<NEW_LINE>throw new IOException( _source.getAbsolutePath() + " does not exist or is 0-sized" );<NEW_LINE>}<NEW_LINE>source = newInputStream( _source ).getChannel();<NEW_LINE>dest = newOutputStream( _dest ).getChannel();<NEW_LINE><NEW_LINE>source.transferTo(0, source.size(), dest);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>catch (Exception e) {<NEW_LINE>Debug.out( e );<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>finally {<NEW_LINE>try {<NEW_LINE>if (source <MASK><NEW_LINE>if (dest != null) dest.close();<NEW_LINE>}<NEW_LINE>catch (Exception ignore) {}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>*/<NEW_LINE>boolean copyFileWithDates(File from_file, File to_file) {<NEW_LINE>FileTime from_last_modified = null;<NEW_LINE>FileTime from_last_access = null;<NEW_LINE>FileTime from_created = null;<NEW_LINE>try {<NEW_LINE>BasicFileAttributeView from_attributes_view = Files.getFileAttributeView(from_file.toPath(), BasicFileAttributeView.class);<NEW_LINE>BasicFileAttributes from_attributes = from_attributes_view.readAttributes();<NEW_LINE>from_last_modified = from_attributes.lastModifiedTime();<NEW_LINE>from_last_access = from_attributes.lastAccessTime();<NEW_LINE>from_created = from_attributes.creationTime();<NEW_LINE>} catch (Throwable e) {<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>File parent = to_file.getParentFile();<NEW_LINE>if (!parent.exists()) {<NEW_LINE>parent.mkdirs();<NEW_LINE>}<NEW_LINE>copyFile(newFileInputStream(from_file), newFileOutputStream(to_file));<NEW_LINE>try {<NEW_LINE>BasicFileAttributeView to_attributes_view = Files.getFileAttributeView(to_file.toPath(), BasicFileAttributeView.class);<NEW_LINE>to_attributes_view.setTimes(from_last_modified, from_last_access, from_created);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>}<NEW_LINE>return (true);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>Debug.out("Copy failed for " + from_file, e);<NEW_LINE>return (false);<NEW_LINE>}<NEW_LINE>}
!= null) source.close();
1,074,106
public static void openBrowser(String command, final Lookup context, final AndroidBrowser.Kind kind, final Project project, final BrowserSupport support) throws IllegalArgumentException {<NEW_LINE>final WebKitDebuggingSupport build = WebKitDebuggingSupport.getDefault();<NEW_LINE>if (COMMAND_RUN.equals(command) || COMMAND_RUN_SINGLE.equals(command)) {<NEW_LINE>try {<NEW_LINE>final String urlString = build.getUrl(project, context);<NEW_LINE>if (urlString == null) {<NEW_LINE>DialogDisplayer.getDefault().notify(new DialogDescriptor.Message<MASK><NEW_LINE>CustomizerProvider2 cust = project.getLookup().lookup(CustomizerProvider2.class);<NEW_LINE>// NOI18N<NEW_LINE>cust.showCustomizer("RUN", null);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final URL urL = new URL(urlString);<NEW_LINE>FileObject f = build.getFile(project, context);<NEW_LINE>support.load(urL, f);<NEW_LINE>} catch (MalformedURLException ex) {<NEW_LINE>Exceptions.printStackTrace(ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(Bundle.ERR_StartFileNotFound()));
756,222
static HttpHandler updatesHandler(DataSource db) {<NEW_LINE>Objects.requireNonNull(db);<NEW_LINE>return exchange -> {<NEW_LINE>var worlds = new World[getQueries(exchange)];<NEW_LINE>try (var connection = db.getConnection()) {<NEW_LINE>try (var statement = connection.prepareStatement("SELECT * FROM world WHERE id = ?")) {<NEW_LINE>for (int i = 0; i < worlds.length; i++) {<NEW_LINE>statement.setInt(1, randomWorldNumber());<NEW_LINE>try (var resultSet = statement.executeQuery()) {<NEW_LINE>resultSet.next();<NEW_LINE>var id = resultSet.getInt("id");<NEW_LINE>var randomNumber = resultSet.getInt("randomnumber");<NEW_LINE>worlds[i] <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>var updateSql = new StringJoiner(", ", "UPDATE world SET randomnumber = temp.randomnumber FROM (VALUES ", " ORDER BY 1) AS temp(id, randomnumber) WHERE temp.id = world.id");<NEW_LINE>for (var world : worlds) {<NEW_LINE>updateSql.add("(?, ?)");<NEW_LINE>}<NEW_LINE>try (var statement = connection.prepareStatement(updateSql.toString())) {<NEW_LINE>var i = 0;<NEW_LINE>for (var world : worlds) {<NEW_LINE>world.randomNumber = randomWorldNumber();<NEW_LINE>statement.setInt(++i, world.id);<NEW_LINE>statement.setInt(++i, world.randomNumber);<NEW_LINE>}<NEW_LINE>statement.executeUpdate();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>sendJson(exchange, worlds);<NEW_LINE>};<NEW_LINE>}
= new World(id, randomNumber);
1,621,143
public Collection<DynamicRecord> add(long labelId, NodeStore nodeStore, DynamicRecordAllocator allocator, CursorContext cursorContext, StoreCursors storeCursors, MemoryTracker memoryTracker) {<NEW_LINE>nodeStore.ensureHeavy(node, firstDynamicLabelRecordId(node.getLabelField()), storeCursors);<NEW_LINE>long[] existingLabelIds = getDynamicLabelsArray(node.getUsedDynamicLabelRecords(), nodeStore.getDynamicLabelStore(), storeCursors);<NEW_LINE>long[] newLabelIds = LabelIdArray.concatAndSort(existingLabelIds, labelId);<NEW_LINE>Collection<DynamicRecord> existingRecords = node.getDynamicLabelRecords();<NEW_LINE>List<DynamicRecord> changedDynamicRecords = allocateRecordsForDynamicLabels(node.getId(), newLabelIds, new ReusableRecordsCompositeAllocator(existingRecords<MASK><NEW_LINE>node.setLabelField(dynamicPointer(changedDynamicRecords), changedDynamicRecords);<NEW_LINE>return changedDynamicRecords;<NEW_LINE>}
, allocator), cursorContext, memoryTracker);
1,375,435
private void exportTemplateAccounts(XmlSerializer xmlSerializer, Collection<Account> accountList) throws IOException {<NEW_LINE>for (Account account : accountList) {<NEW_LINE>xmlSerializer.startTag(null, GncXmlHelper.TAG_ACCOUNT);<NEW_LINE>xmlSerializer.attribute(null, GncXmlHelper.ATTR_KEY_VERSION, GncXmlHelper.BOOK_VERSION);<NEW_LINE>// account name<NEW_LINE>xmlSerializer.startTag(null, GncXmlHelper.TAG_ACCT_NAME);<NEW_LINE>xmlSerializer.text(account.getName());<NEW_LINE>xmlSerializer.endTag(null, GncXmlHelper.TAG_ACCT_NAME);<NEW_LINE>// account guid<NEW_LINE>xmlSerializer.startTag(null, GncXmlHelper.TAG_ACCT_ID);<NEW_LINE>xmlSerializer.attribute(null, GncXmlHelper.ATTR_KEY_TYPE, GncXmlHelper.ATTR_VALUE_GUID);<NEW_LINE>xmlSerializer.text(account.getUID());<NEW_LINE>xmlSerializer.endTag(null, GncXmlHelper.TAG_ACCT_ID);<NEW_LINE>// account type<NEW_LINE>xmlSerializer.startTag(null, GncXmlHelper.TAG_ACCT_TYPE);<NEW_LINE>xmlSerializer.text(account.getAccountType().name());<NEW_LINE>xmlSerializer.endTag(null, GncXmlHelper.TAG_ACCT_TYPE);<NEW_LINE>// commodity<NEW_LINE>xmlSerializer.startTag(null, GncXmlHelper.TAG_ACCT_COMMODITY);<NEW_LINE>xmlSerializer.startTag(null, GncXmlHelper.TAG_COMMODITY_SPACE);<NEW_LINE>xmlSerializer.text("template");<NEW_LINE>xmlSerializer.endTag(null, GncXmlHelper.TAG_COMMODITY_SPACE);<NEW_LINE>xmlSerializer.startTag(null, GncXmlHelper.TAG_COMMODITY_ID);<NEW_LINE>String acctCurrencyCode = "template";<NEW_LINE>xmlSerializer.text(acctCurrencyCode);<NEW_LINE>xmlSerializer.endTag(null, GncXmlHelper.TAG_COMMODITY_ID);<NEW_LINE>xmlSerializer.endTag(null, GncXmlHelper.TAG_ACCT_COMMODITY);<NEW_LINE>// commodity scu<NEW_LINE>xmlSerializer.<MASK><NEW_LINE>xmlSerializer.text("1");<NEW_LINE>xmlSerializer.endTag(null, GncXmlHelper.TAG_COMMODITY_SCU);<NEW_LINE>if (account.getAccountType() != AccountType.ROOT && mRootTemplateAccount != null) {<NEW_LINE>xmlSerializer.startTag(null, GncXmlHelper.TAG_PARENT_UID);<NEW_LINE>xmlSerializer.attribute(null, GncXmlHelper.ATTR_KEY_TYPE, GncXmlHelper.ATTR_VALUE_GUID);<NEW_LINE>xmlSerializer.text(mRootTemplateAccount.getUID());<NEW_LINE>xmlSerializer.endTag(null, GncXmlHelper.TAG_PARENT_UID);<NEW_LINE>}<NEW_LINE>xmlSerializer.endTag(null, GncXmlHelper.TAG_ACCOUNT);<NEW_LINE>}<NEW_LINE>}
startTag(null, GncXmlHelper.TAG_COMMODITY_SCU);
1,647,930
public void marshall(UpdateFlowOutputRequest updateFlowOutputRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (updateFlowOutputRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(updateFlowOutputRequest.getCidrAllowList(), CIDRALLOWLIST_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(updateFlowOutputRequest.getDestination(), DESTINATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateFlowOutputRequest.getEncryption(), ENCRYPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateFlowOutputRequest.getFlowArn(), FLOWARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateFlowOutputRequest.getMaxLatency(), MAXLATENCY_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateFlowOutputRequest.getMediaStreamOutputConfigurations(), MEDIASTREAMOUTPUTCONFIGURATIONS_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateFlowOutputRequest.getMinLatency(), MINLATENCY_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateFlowOutputRequest.getOutputArn(), OUTPUTARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateFlowOutputRequest.getPort(), PORT_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateFlowOutputRequest.getProtocol(), PROTOCOL_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateFlowOutputRequest.getRemoteId(), REMOTEID_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateFlowOutputRequest.getSenderControlPort(), SENDERCONTROLPORT_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateFlowOutputRequest.getSenderIpAddress(), SENDERIPADDRESS_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateFlowOutputRequest.getSmoothingLatency(), SMOOTHINGLATENCY_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateFlowOutputRequest.getStreamId(), STREAMID_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateFlowOutputRequest.getVpcInterfaceAttachment(), VPCINTERFACEATTACHMENT_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
updateFlowOutputRequest.getDescription(), DESCRIPTION_BINDING);
1,452,876
// Convert tabular data to (nested) maps. Path access is allowed here<NEW_LINE>private Object convertToMaps(TabularData pTd, Stack<String> pExtraArgs, ObjectToJsonConverter pConverter) throws AttributeNotFoundException {<NEW_LINE>JSONObject ret = new JSONObject();<NEW_LINE>TabularType type = pTd.getTabularType();<NEW_LINE>List<String> indexNames = type.getIndexNames();<NEW_LINE>boolean found = false;<NEW_LINE>for (CompositeData cd : (Collection<CompositeData>) pTd.values()) {<NEW_LINE>Stack<String> path = (Stack<String>) pExtraArgs.clone();<NEW_LINE>try {<NEW_LINE>JSONObject targetJSONObject = ret;<NEW_LINE>// TODO: Check whether all keys can be represented as simple types. If not, well<NEW_LINE>// we dont do any magic and return the tabular data as an array.<NEW_LINE>for (int i = 0; i < indexNames.size() - 1; i++) {<NEW_LINE>Object indexValue = pConverter.extractObject(cd.get(indexNames.get(i)), null, true);<NEW_LINE>targetJSONObject = getNextMap(targetJSONObject, indexValue);<NEW_LINE>}<NEW_LINE>Object row = pConverter.extractObject(cd, path, true);<NEW_LINE>String finalIndex = indexNames.get(indexNames.size() - 1);<NEW_LINE>Object finalIndexValue = pConverter.extractObject(cd.get<MASK><NEW_LINE>targetJSONObject.put(finalIndexValue, row);<NEW_LINE>found = true;<NEW_LINE>} catch (ValueFaultHandler.AttributeFilteredException exp) {<NEW_LINE>// Ignoring filtered attributes<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!pTd.isEmpty() && !found) {<NEW_LINE>throw new ValueFaultHandler.AttributeFilteredException();<NEW_LINE>}<NEW_LINE>return ret;<NEW_LINE>}
(finalIndex), null, true);
1,637,918
public Object evaluate(EditorAdaptor vim, Queue<String> command) {<NEW_LINE>if (command.isEmpty()) {<NEW_LINE>try {<NEW_LINE>new ListUserCommandsCommand().execute(vim);<NEW_LINE>} catch (CommandExecutionException e) {<NEW_LINE>vim.getUserInterfaceService().setErrorMessage(e.getMessage());<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String name = command.poll();<NEW_LINE>if (Character.isLowerCase(name.charAt(0))) {<NEW_LINE>vim.getUserInterfaceService().setErrorMessage("User defined commands must start with an uppercase letter");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (command.isEmpty()) {<NEW_LINE>try {<NEW_LINE>new ListUserCommandsCommand<MASK><NEW_LINE>} catch (CommandExecutionException e) {<NEW_LINE>vim.getUserInterfaceService().setErrorMessage(e.getMessage());<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String args = "";<NEW_LINE>while (command.size() > 0) args += command.poll() + " ";<NEW_LINE>// add this command to the mappings for future use<NEW_LINE>vim.getPlatformSpecificStateProvider().getCommands().addUserDefined(name, args);<NEW_LINE>return null;<NEW_LINE>}
(name).execute(vim);
101,702
Object readInto(VirtualFrame frame, PSSLSocket self, int len, Object bufferObj, @CachedLibrary("bufferObj") PythonBufferAcquireLibrary bufferAcquireLib, @CachedLibrary(limit = "1") PythonBufferAccessLibrary bufferLib, @Cached SSLOperationNode sslOperationNode) {<NEW_LINE>Object buffer = bufferAcquireLib.acquireWritableWithTypeError(bufferObj, "read", frame, this);<NEW_LINE>try {<NEW_LINE>int bufferLen = bufferLib.getBufferLength(buffer);<NEW_LINE>int toReadLen = len;<NEW_LINE>if (len <= 0 || len > bufferLen) {<NEW_LINE>toReadLen = bufferLen;<NEW_LINE>}<NEW_LINE>if (toReadLen == 0) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>byte[] bytes;<NEW_LINE>boolean directWrite = bufferLib.hasInternalByteArray(buffer);<NEW_LINE>if (directWrite) {<NEW_LINE>bytes = bufferLib.getInternalByteArray(buffer);<NEW_LINE>} else {<NEW_LINE>bytes = new byte[toReadLen];<NEW_LINE>}<NEW_LINE>ByteBuffer output = PythonUtils.wrapByteBuffer(bytes, 0, toReadLen);<NEW_LINE>sslOperationNode.<MASK><NEW_LINE>PythonUtils.flipBuffer(output);<NEW_LINE>int readBytes = PythonUtils.getBufferRemaining(output);<NEW_LINE>if (!directWrite) {<NEW_LINE>bufferLib.readIntoByteArray(buffer, 0, bytes, 0, readBytes);<NEW_LINE>}<NEW_LINE>return readBytes;<NEW_LINE>} finally {<NEW_LINE>bufferLib.release(buffer, frame, this);<NEW_LINE>}<NEW_LINE>}
read(frame, self, output);
1,303,524
ArrayList<Object> new80() /* reduce AAfullmethodbody5MethodBody */<NEW_LINE>{<NEW_LINE>@SuppressWarnings("hiding")<NEW_LINE>ArrayList<Object> nodeList = new ArrayList<Object>();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList3 = pop();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList2 = pop();<NEW_LINE>@SuppressWarnings("unused")<NEW_LINE>ArrayList<Object> nodeArrayList1 = pop();<NEW_LINE>PMethodBody pmethodbodyNode1;<NEW_LINE>{<NEW_LINE>// Block<NEW_LINE>TLBrace tlbraceNode2;<NEW_LINE>LinkedList<Object> listNode3 = new LinkedList<Object>();<NEW_LINE>LinkedList<Object> listNode4 = new LinkedList<Object>();<NEW_LINE>LinkedList<Object> listNode6 = new LinkedList<Object>();<NEW_LINE>TRBrace trbraceNode7;<NEW_LINE>tlbraceNode2 = (TLBrace) nodeArrayList1.get(0);<NEW_LINE>{<NEW_LINE>// Block<NEW_LINE>}<NEW_LINE>{<NEW_LINE>// Block<NEW_LINE>}<NEW_LINE>{<NEW_LINE>// Block<NEW_LINE>LinkedList<Object> listNode5 = new LinkedList<Object>();<NEW_LINE>listNode5 = (LinkedList) nodeArrayList2.get(0);<NEW_LINE>if (listNode5 != null) {<NEW_LINE>listNode6.addAll(listNode5);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>trbraceNode7 = (<MASK><NEW_LINE>pmethodbodyNode1 = new AFullMethodBody(tlbraceNode2, listNode3, listNode4, listNode6, trbraceNode7);<NEW_LINE>}<NEW_LINE>nodeList.add(pmethodbodyNode1);<NEW_LINE>return nodeList;<NEW_LINE>}
TRBrace) nodeArrayList3.get(0);
1,836,518
public ModelAndView alarmAddForm(HttpSession session, HttpServletResponse response, HttpServletRequest request) {<NEW_LINE>String clusterAlias = session.getAttribute(KConstants.SessionAlias.CLUSTER_ALIAS).toString();<NEW_LINE>ModelAndView mav = new ModelAndView();<NEW_LINE>String <MASK><NEW_LINE>String topic = request.getParameter("ke_alarm_consumer_topic");<NEW_LINE>String lag = request.getParameter("ke_topic_lag");<NEW_LINE>String alarmLevel = request.getParameter("ke_alarm_cluster_level");<NEW_LINE>String alarmMaxTimes = request.getParameter("ke_alarm_cluster_maxtimes");<NEW_LINE>String alarmGroup = request.getParameter("ke_alarm_cluster_group");<NEW_LINE>AlarmConsumerInfo alarmConsumer = new AlarmConsumerInfo();<NEW_LINE>alarmConsumer.setGroup(group);<NEW_LINE>alarmConsumer.setAlarmGroup(alarmGroup);<NEW_LINE>alarmConsumer.setAlarmLevel(alarmLevel);<NEW_LINE>alarmConsumer.setAlarmMaxTimes(Integer.parseInt(alarmMaxTimes));<NEW_LINE>alarmConsumer.setAlarmTimes(0);<NEW_LINE>alarmConsumer.setCluster(clusterAlias);<NEW_LINE>alarmConsumer.setCreated(CalendarUtils.getDate());<NEW_LINE>alarmConsumer.setIsEnable("Y");<NEW_LINE>alarmConsumer.setIsNormal("Y");<NEW_LINE>alarmConsumer.setLag(Long.parseLong(lag));<NEW_LINE>alarmConsumer.setModify(CalendarUtils.getDate());<NEW_LINE>alarmConsumer.setTopic(topic);<NEW_LINE>int code = alertService.insertAlarmConsumer(alarmConsumer);<NEW_LINE>if (code > 0) {<NEW_LINE>session.removeAttribute("Alarm_Submit_Status");<NEW_LINE>session.setAttribute("Alarm_Submit_Status", "Insert success.");<NEW_LINE>mav.setViewName("redirect:/alarm/add/success");<NEW_LINE>} else {<NEW_LINE>session.removeAttribute("Alarm_Submit_Status");<NEW_LINE>session.setAttribute("Alarm_Submit_Status", "Insert failed.");<NEW_LINE>mav.setViewName("redirect:/alarm/add/failed");<NEW_LINE>}<NEW_LINE>return mav;<NEW_LINE>}
group = request.getParameter("ke_alarm_consumer_group");
719,297
public void timeoutMethod(Timer t) {<NEW_LINE>svLogger.info("--> Entered " + CLASS_NAME + ".timeoutMethod");<NEW_LINE>try {<NEW_LINE>svLogger.info("--> Timer t = " + t);<NEW_LINE>String infoKey = (String) t.getInfo();<NEW_LINE>svLogger.info("--> infoKey = " + infoKey);<NEW_LINE>TimerData td = TimerData.svIntEventMap.get(infoKey);<NEW_LINE>svLogger.info("--> svIntEventMap = " + TimerData.svIntEventMap);<NEW_LINE>svLogger.info("--> td = " + td);<NEW_LINE>String eventTag = "::" + this + ".timeoutMethod:" + t.getInfo();<NEW_LINE>svLogger.info("--> eventTag = " + eventTag);<NEW_LINE><MASK><NEW_LINE>td.setIsFired(true);<NEW_LINE>svTimerLatch.countDown();<NEW_LINE>} finally {<NEW_LINE>svLogger.info("<-- Exiting " + CLASS_NAME + ".timeoutMethod");<NEW_LINE>}<NEW_LINE>}
TimerData.addIntEvent(t, eventTag);
1,568,712
public void visit(BLangWhile astWhileStmt) {<NEW_LINE>BIRBasicBlock currentEnclLoopBB = this.env.enclLoopBB;<NEW_LINE>BIRBasicBlock currentEnclLoopEndBB = this.env.enclLoopEndBB;<NEW_LINE>// Create a basic block for the while expression.<NEW_LINE>BIRBasicBlock whileExprBB = new BIRBasicBlock(this.env.nextBBId(names));<NEW_LINE>addToTrapStack(whileExprBB);<NEW_LINE>this.env.enclBasicBlocks.add(whileExprBB);<NEW_LINE>// Insert a GOTO instruction as the terminal instruction into current basic block.<NEW_LINE>this.env.enclBB.terminator = new BIRTerminator.GOTO(null, whileExprBB, this.currentScope);<NEW_LINE>// Visit condition expression<NEW_LINE>this.env.enclBB = whileExprBB;<NEW_LINE>astWhileStmt.expr.accept(this);<NEW_LINE>BIROperand whileExprResult = this.env.targetOperand;<NEW_LINE>// Create the basic block for the while-body block.<NEW_LINE>BIRBasicBlock whileBodyBB = new BIRBasicBlock(this.env.nextBBId(names));<NEW_LINE>addToTrapStack(whileBodyBB);<NEW_LINE>this.env.enclBasicBlocks.add(whileBodyBB);<NEW_LINE>// Create the basic block for the statements that comes after the while statement.<NEW_LINE>BIRBasicBlock whileEndBB = new BIRBasicBlock(this.env.nextBBId(names));<NEW_LINE>addToTrapStack(whileEndBB);<NEW_LINE>// Add the branch instruction to the while expression basic block.<NEW_LINE>this.env.enclBB.terminator = new BIRTerminator.Branch(astWhileStmt.pos, whileExprResult, whileBodyBB, whileEndBB, this.currentScope);<NEW_LINE>// Visit while body<NEW_LINE>this.env.enclBB = whileBodyBB;<NEW_LINE>this.env.enclLoopBB = whileExprBB;<NEW_LINE>this.env.enclLoopEndBB = whileEndBB;<NEW_LINE>this.env.unlockVars.push(new BIRLockDetailsHolder());<NEW_LINE>astWhileStmt.body.accept(this);<NEW_LINE>this.env.unlockVars.pop();<NEW_LINE>if (this.env.enclBB.terminator == null) {<NEW_LINE>this.env.enclBB.terminator = new BIRTerminator.GOTO(<MASK><NEW_LINE>}<NEW_LINE>this.env.enclBasicBlocks.add(whileEndBB);<NEW_LINE>this.env.enclBB = whileEndBB;<NEW_LINE>this.env.enclLoopBB = currentEnclLoopBB;<NEW_LINE>this.env.enclLoopEndBB = currentEnclLoopEndBB;<NEW_LINE>}
null, whileExprBB, this.currentScope);
1,437,802
public static String textLocalPlan(ExecutionContext context, RelNode relNode, ExecutorMode type) {<NEW_LINE>if (context.getMemoryPool() == null) {<NEW_LINE>context.setMemoryPool(MemoryManager.getInstance().createQueryMemoryPool(WorkloadUtil.isApWorkload(context.getWorkloadType()), context.getTraceId(), context.getExtraCmds()));<NEW_LINE>}<NEW_LINE>int parallelism = ExecUtils.getParallelismForLocal(context);<NEW_LINE>boolean isSpill = MemorySetting.ENABLE_SPILL && context.getParamManager().getBoolean(ConnectionParams.ENABLE_SPILL);<NEW_LINE>LocalExecutionPlanner planner = new LocalExecutionPlanner(context, null, parallelism, parallelism, 1, context.getParamManager().getInt(ConnectionParams.PREFETCH_SHARDS), MoreExecutors.directExecutor(), isSpill ? new MemorySpillerFactory() : null, null, null, type == ExecutorMode.MPP);<NEW_LINE>List<DataType> columns = CalciteUtils.getTypes(relNode.getRowType());<NEW_LINE>OutputBufferMemoryManager localBufferManager = planner.createLocalMemoryManager();<NEW_LINE>LocalBufferExecutorFactory factory = new LocalBufferExecutorFactory(localBufferManager, columns, 1);<NEW_LINE>List<PipelineFactory> pipelineFactories = planner.plan(relNode, factory, localBufferManager, context.getTraceId());<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>builder.append("ExecutorMode: ").append(type).append<MASK><NEW_LINE>for (PipelineFactory pipelineFactory : pipelineFactories) {<NEW_LINE>builder.append(formatPipelineFragment(pipelineFactory, context.getParams().getCurrentParameter()));<NEW_LINE>}<NEW_LINE>return builder.toString();<NEW_LINE>}
(" ").append("\n");
223,380
public void initTeam(Long teamId, String operator) {<NEW_LINE>String teamDefaultRepo = System.getenv("TEAM_DEFAULT_REPO");<NEW_LINE>String teamDefaultRegistry = System.getenv("TEAM_DEFAULT_REGISTRY");<NEW_LINE>String teamDefaultAccount = System.getenv("TEAM_DEFAULT_ACCOUNT");<NEW_LINE>if (!StringUtils.isEmpty(teamDefaultRepo)) {<NEW_LINE>String repo = new String(Base64.getDecoder().decode(teamDefaultRepo));<NEW_LINE>TeamRepo teamRepo = JSONObject.<MASK><NEW_LINE>teamRepo.setGmtCreate(System.currentTimeMillis() / 1000);<NEW_LINE>teamRepo.setGmtModified(System.currentTimeMillis() / 1000);<NEW_LINE>teamRepo.setCreator(operator);<NEW_LINE>teamRepo.setLastModifier(operator);<NEW_LINE>teamRepo.setTeamId(teamId);<NEW_LINE>teamRepoRepository.saveAndFlush(teamRepo);<NEW_LINE>}<NEW_LINE>if (!StringUtils.isEmpty(teamDefaultRegistry)) {<NEW_LINE>String registry = new String(Base64.getDecoder().decode(teamDefaultRegistry));<NEW_LINE>TeamRegistry teamRegistry = JSONObject.parseObject(registry, TeamRegistry.class);<NEW_LINE>teamRegistry.setGmtCreate(System.currentTimeMillis() / 1000);<NEW_LINE>teamRegistry.setGmtModified(System.currentTimeMillis() / 1000);<NEW_LINE>teamRegistry.setCreator(operator);<NEW_LINE>teamRegistry.setLastModifier(operator);<NEW_LINE>teamRegistry.setTeamId(teamId);<NEW_LINE>teamRegistryRepository.saveAndFlush(teamRegistry);<NEW_LINE>}<NEW_LINE>if (!StringUtils.isEmpty(teamDefaultAccount)) {<NEW_LINE>String account = new String(Base64.getDecoder().decode(teamDefaultAccount));<NEW_LINE>TeamAccount teamAccount = JSONObject.parseObject(account, TeamAccount.class);<NEW_LINE>teamAccount.setGmtCreate(System.currentTimeMillis() / 1000);<NEW_LINE>teamAccount.setGmtModified(System.currentTimeMillis() / 1000);<NEW_LINE>teamAccount.setCreator(operator);<NEW_LINE>teamAccount.setLastModifier(operator);<NEW_LINE>teamAccount.setTeamId(teamId);<NEW_LINE>teamAccountRepository.saveAndFlush(teamAccount);<NEW_LINE>}<NEW_LINE>}
parseObject(repo, TeamRepo.class);
151,016
private String printToken(Token token) {<NEW_LINE>int modeAsInt = _combinedParser.getTokenMode(token);<NEW_LINE>String mode = _combinedParser.getLexer().getModeNames()[modeAsInt];<NEW_LINE>String rawTokenText = token.getText();<NEW_LINE>String tokenText = BatfishCombinedParser.escape(rawTokenText);<NEW_LINE>int tokenType = token.getType();<NEW_LINE>String channel = token.getChannel() == Lexer.HIDDEN ? "(HIDDEN) " : "";<NEW_LINE>String tokenName;<NEW_LINE><MASK><NEW_LINE>int col = token.getCharPositionInLine();<NEW_LINE>if (tokenType == -1) {<NEW_LINE>tokenName = "EOF";<NEW_LINE>} else {<NEW_LINE>tokenName = _combinedParser.getParser().getVocabulary().getSymbolicName(tokenType);<NEW_LINE>tokenText = "'" + tokenText + "'";<NEW_LINE>}<NEW_LINE>return " line " + line + ":" + col + " " + channel + " " + tokenName + ":" + tokenText + (!"DEFAULT_MODE".equals(mode) ? " <== mode:" + mode : "");<NEW_LINE>}
int line = token.getLine();
1,065,820
private CookieSerializer createDefaultCookieSerializer() {<NEW_LINE>DefaultCookieSerializer cookieSerializer = new DefaultCookieSerializer();<NEW_LINE>if (this.servletContext != null) {<NEW_LINE>SessionCookieConfig sessionCookieConfig = null;<NEW_LINE>try {<NEW_LINE>sessionCookieConfig = this.servletContext.getSessionCookieConfig();<NEW_LINE>} catch (UnsupportedOperationException ex) {<NEW_LINE>this.logger.warn("Unable to obtain SessionCookieConfig: " + ex.getMessage());<NEW_LINE>}<NEW_LINE>if (sessionCookieConfig != null) {<NEW_LINE>if (sessionCookieConfig.getName() != null) {<NEW_LINE>cookieSerializer.setCookieName(sessionCookieConfig.getName());<NEW_LINE>}<NEW_LINE>if (sessionCookieConfig.getDomain() != null) {<NEW_LINE>cookieSerializer.setDomainName(sessionCookieConfig.getDomain());<NEW_LINE>}<NEW_LINE>if (sessionCookieConfig.getPath() != null) {<NEW_LINE>cookieSerializer.setCookiePath(sessionCookieConfig.getPath());<NEW_LINE>}<NEW_LINE>if (sessionCookieConfig.getMaxAge() != -1) {<NEW_LINE>cookieSerializer.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (this.usesSpringSessionRememberMeServices) {<NEW_LINE>cookieSerializer.setRememberMeRequestAttribute(SpringSessionRememberMeServices.REMEMBER_ME_LOGIN_ATTR);<NEW_LINE>}<NEW_LINE>return cookieSerializer;<NEW_LINE>}
setCookieMaxAge(sessionCookieConfig.getMaxAge());
1,108,658
static void countNeighbors(UByteIndexer idx) {<NEW_LINE>long iMax = idx.size(0);<NEW_LINE>long jMax = idx.size(1);<NEW_LINE>long kMax = idx.size(2);<NEW_LINE>byte[] neighbors = new byte[26];<NEW_LINE>for (long k = 0; k < kMax; k++) {<NEW_LINE>for (long i = 0; i < iMax; i++) {<NEW_LINE>for (long j = 0; j < jMax; j++) {<NEW_LINE>if (idx.get(i, j, k) == (byte) 0)<NEW_LINE>continue;<NEW_LINE>boolean checkBounds = i == 0 || j == 0 || k == 0 || i == iMax - 1 || j == jMax - 1 || k == kMax - 1;<NEW_LINE>int bitMask;<NEW_LINE>if (checkBounds)<NEW_LINE>bitMask = getNeighborsWithBoundsCheck(idx, i, j, k, <MASK><NEW_LINE>else<NEW_LINE>bitMask = getNeighbors(idx, i, j, k, neighbors);<NEW_LINE>int n = Integer.bitCount(bitMask) + 1;<NEW_LINE>idx.put(i, j, k, n);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
iMax, jMax, kMax, neighbors);
1,177,790
public static <T> void parseFunctionClass(Class<T> clazz) {<NEW_LINE>if (Modifier.isAbstract(clazz.getModifiers()))<NEW_LINE>throw new IllegalArgumentException("Function class must be concrete! Class: " + clazz.getSimpleName());<NEW_LINE>T instance;<NEW_LINE>try {<NEW_LINE>instance = clazz.getConstructor().newInstance();<NEW_LINE>} catch (ReflectiveOperationException e) {<NEW_LINE>throw new IllegalArgumentException("Couldn't create instance of given " + clazz + ". Make sure default constructor is available", e);<NEW_LINE>}<NEW_LINE>Method[] methodz = clazz.getDeclaredMethods();<NEW_LINE>for (Method method : methodz) {<NEW_LINE>if (!method.isAnnotationPresent(ScarpetFunction.class))<NEW_LINE>continue;<NEW_LINE>if (method.getExceptionTypes().length != 0)<NEW_LINE>throw new IllegalArgumentException("Annotated method '" + method.getName(<MASK><NEW_LINE>ParsedFunction function = new ParsedFunction(method, instance);<NEW_LINE>functionList.add(function);<NEW_LINE>}<NEW_LINE>}
) + "', provided in '" + clazz + "' must not declare checked exceptions");
809,995
public void generic(Request request, StreamObserver<Response> responseObserver) {<NEW_LINE>SofaRequest sofaRequest = TracingContextKey.getKeySofaRequest().get(Context.current());<NEW_LINE>String methodName = sofaRequest.getMethodName();<NEW_LINE>String interfaceName = sofaRequest.getInterfaceName();<NEW_LINE>ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();<NEW_LINE>try {<NEW_LINE>Class proxyClass = ClassTypeUtils.getClass(interfaceName);<NEW_LINE>ClassLoader interfaceClassLoader = proxyClass.getClassLoader();<NEW_LINE>Thread.currentThread().setContextClassLoader(interfaceClassLoader);<NEW_LINE>Class[] argTypes = getArgTypes(request);<NEW_LINE>Serializer serializer = SerializerFactory.getSerializer(request.getSerializeType());<NEW_LINE>Method declaredMethod = <MASK><NEW_LINE>Object[] invokeArgs = getInvokeArgs(request, argTypes, serializer);<NEW_LINE>// fill sofaRequest<NEW_LINE>sofaRequest.setMethod(declaredMethod);<NEW_LINE>sofaRequest.setMethodArgs(invokeArgs);<NEW_LINE>sofaRequest.setMethodArgSigs(ClassTypeUtils.getTypeStrs(argTypes, true));<NEW_LINE>SofaResponse response = invoker.invoke(sofaRequest);<NEW_LINE>Object ret = getAppResponse(declaredMethod, response);<NEW_LINE>Response.Builder builder = Response.newBuilder();<NEW_LINE>builder.setSerializeType(request.getSerializeType());<NEW_LINE>builder.setType(declaredMethod.getReturnType().getName());<NEW_LINE>builder.setData(ByteString.copyFrom(serializer.encode(ret, null).array()));<NEW_LINE>Response build = builder.build();<NEW_LINE>responseObserver.onNext(build);<NEW_LINE>responseObserver.onCompleted();<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOGGER.error("Invoke " + methodName + " error:", e);<NEW_LINE>throw new SofaRpcRuntimeException(e);<NEW_LINE>} finally {<NEW_LINE>Thread.currentThread().setContextClassLoader(oldClassLoader);<NEW_LINE>}<NEW_LINE>}
proxyClass.getDeclaredMethod(methodName, argTypes);
27,996
private void handleNewIntent(NewIntentData data) {<NEW_LINE>Intent intent;<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) {<NEW_LINE>intent = ReferrerIntent.ctor.newInstance(<MASK><NEW_LINE>} else {<NEW_LINE>intent = data.intent;<NEW_LINE>}<NEW_LINE>if (ActivityThread.performNewIntents != null) {<NEW_LINE>ActivityThread.performNewIntents.call(VirtualCore.mainThread(), data.token, Collections.singletonList(intent));<NEW_LINE>} else {<NEW_LINE>if (BuildCompat.isQ()) {<NEW_LINE>ActivityThread.handleNewIntent.call(VirtualCore.mainThread(), data.token, Collections.singletonList(intent));<NEW_LINE>} else {<NEW_LINE>ActivityThreadNMR1.performNewIntents.call(VirtualCore.mainThread(), data.token, Collections.singletonList(intent), true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
data.intent, data.creator);
132,302
private // This is based heavily on the Apple sample code for dealing with this issue<NEW_LINE>void macOSXRegistration() {<NEW_LINE>if (isMacOSX()) {<NEW_LINE>try {<NEW_LINE>Class<?> osxAdapter = ClassLoader.<MASK><NEW_LINE>Class<?>[] defArgs = { TregexGUI.class };<NEW_LINE>Method registerMethod = osxAdapter.getDeclaredMethod("registerMacOSXApplication", defArgs);<NEW_LINE>if (registerMethod != null) {<NEW_LINE>Object[] args = { this };<NEW_LINE>registerMethod.invoke(osxAdapter, args);<NEW_LINE>}<NEW_LINE>defArgs[0] = boolean.class;<NEW_LINE>Method prefsEnableMethod = osxAdapter.getDeclaredMethod("enablePrefs", defArgs);<NEW_LINE>if (prefsEnableMethod != null) {<NEW_LINE>Object[] args = { Boolean.TRUE };<NEW_LINE>prefsEnableMethod.invoke(osxAdapter, args);<NEW_LINE>}<NEW_LINE>} catch (NoClassDefFoundError e) {<NEW_LINE>// This will be thrown first if the OSXAdapter is loaded on a system without the EAWT<NEW_LINE>// because OSXAdapter extends ApplicationAdapter in its def<NEW_LINE>log.info("This version of Mac OS X does not support the Apple EAWT. Application Menu handling has been disabled (" + e + ")");<NEW_LINE>} catch (ClassNotFoundException e) {<NEW_LINE>// This shouldn't be reached; if there's a problem with the OSXAdapter we should get the<NEW_LINE>// above NoClassDefFoundError first.<NEW_LINE>log.info("This version of Mac OS X does not support the Apple EAWT. Application Menu handling has been disabled (" + e + ")");<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.info("Exception while loading the OSXAdapter:");<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getSystemClassLoader().loadClass("edu.stanford.nlp.trees.tregex.gui.OSXAdapter");
410,471
protected void doStart() throws Exception {<NEW_LINE>if (!_dsProvided) {<NEW_LINE>boolean blankCustomnamespace = StringUtil.isBlank(getNamespace());<NEW_LINE>boolean blankCustomHost = StringUtil.isBlank(getHost());<NEW_LINE>boolean blankCustomProjectId = StringUtil.isBlank(getProjectId());<NEW_LINE>if (blankCustomnamespace && blankCustomHost && blankCustomProjectId)<NEW_LINE>_datastore = DatastoreOptions.getDefaultInstance().getService();<NEW_LINE>else {<NEW_LINE>DatastoreOptions.<MASK><NEW_LINE>if (!blankCustomnamespace)<NEW_LINE>builder.setNamespace(getNamespace());<NEW_LINE>if (!blankCustomHost)<NEW_LINE>builder.setHost(getHost());<NEW_LINE>if (!blankCustomProjectId)<NEW_LINE>builder.setProjectId(getProjectId());<NEW_LINE>_datastore = builder.build().getService();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (_model == null) {<NEW_LINE>_model = new EntityDataModel();<NEW_LINE>addBean(_model, true);<NEW_LINE>}<NEW_LINE>_keyFactory = _datastore.newKeyFactory().setKind(_model.getKind());<NEW_LINE>_indexesPresent = checkIndexes();<NEW_LINE>if (!_indexesPresent)<NEW_LINE>LOG.warn("Session indexes not uploaded, falling back to less efficient queries");<NEW_LINE>super.doStart();<NEW_LINE>}
Builder builder = DatastoreOptions.newBuilder();
1,330,782
final CreateIngestionResult executeCreateIngestion(CreateIngestionRequest createIngestionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createIngestionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateIngestionRequest> request = null;<NEW_LINE>Response<CreateIngestionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateIngestionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createIngestionRequest));<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.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateIngestion");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateIngestionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateIngestionResultJsonUnmarshaller());<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.SERVICE_ID, "QuickSight");
1,263,933
private final void sortByNames() {<NEW_LINE>for (int i = 1; i < this.names.length; i++) {<NEW_LINE>int cmp = this.names[0].compareTo(this.names[i]);<NEW_LINE>if (cmp == 0) {<NEW_LINE>Assert.fail("Field name " + this.names[0] + " occurs multiple times" + " in set of records.", getSource());<NEW_LINE>} else if (cmp > 0) {<NEW_LINE>UniqueString <MASK><NEW_LINE>this.names[0] = this.names[i];<NEW_LINE>this.names[i] = ts;<NEW_LINE>Value tv = this.values[0];<NEW_LINE>this.values[0] = this.values[i];<NEW_LINE>this.values[i] = tv;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int i = 2; i < this.names.length; i++) {<NEW_LINE>int j = i;<NEW_LINE>UniqueString st = this.names[i];<NEW_LINE>Value val = this.values[i];<NEW_LINE>int cmp;<NEW_LINE>while ((cmp = st.compareTo(this.names[j - 1])) < 0) {<NEW_LINE>this.names[j] = this.names[j - 1];<NEW_LINE>this.values[j] = this.values[j - 1];<NEW_LINE>j--;<NEW_LINE>}<NEW_LINE>if (cmp == 0) {<NEW_LINE>Assert.fail("Field name " + this.names[i] + " occurs multiple times" + " in set of records.", getSource());<NEW_LINE>}<NEW_LINE>this.names[j] = st;<NEW_LINE>this.values[j] = val;<NEW_LINE>}<NEW_LINE>}
ts = this.names[0];
204,776
static private List<JavaProblem> checkForMissingBraces(PreprocSketch ps) {<NEW_LINE>List<JavaProblem> problems = new ArrayList<>(0);<NEW_LINE>for (int tabIndex = 0; tabIndex < ps.tabStartOffsets.length; tabIndex++) {<NEW_LINE>int tabStartOffset = ps.tabStartOffsets[tabIndex];<NEW_LINE>int tabEndOffset = (tabIndex < ps.tabStartOffsets.length - 1) ? ps.tabStartOffsets[tabIndex + 1] : ps.scrubbedPdeCode.length();<NEW_LINE>int[] braceResult = SourceUtil.checkForMissingBraces(ps.scrubbedPdeCode, tabStartOffset, tabEndOffset);<NEW_LINE>if (braceResult[0] != 0) {<NEW_LINE>JavaProblem problem = new JavaProblem(braceResult[0] < 0 ? Language.interpolate("editor.status.missing.left_curly_bracket") : Language.interpolate("editor.status.missing.right_curly_bracket"), JavaProblem.ERROR, tabIndex, braceResult[1]);<NEW_LINE>problem.setPDEOffsets(braceResult[3]<MASK><NEW_LINE>problems.add(problem);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (problems.isEmpty()) {<NEW_LINE>return problems;<NEW_LINE>}<NEW_LINE>int problemTabIndex = problems.get(0).getTabIndex();<NEW_LINE>IProblem missingBraceProblem = // Ignore if it is at the end of file<NEW_LINE>Arrays.stream(ps.compilationUnit.getProblems()).filter(ErrorChecker::isMissingBraceProblem).filter(// Ignore if the tab number does not match our detected tab number<NEW_LINE>p -> p.getSourceEnd() + 1 < ps.javaCode.length()).filter(p -> problemTabIndex == ps.mapJavaToSketch(p).tabIndex).findFirst().orElse(null);<NEW_LINE>// Prefer ECJ problem, shows location more accurately<NEW_LINE>if (missingBraceProblem != null) {<NEW_LINE>JavaProblem p = convertIProblem(missingBraceProblem, ps);<NEW_LINE>if (p != null) {<NEW_LINE>problems.clear();<NEW_LINE>problems.add(p);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return problems;<NEW_LINE>}
, braceResult[3] + 1);
1,378,164
public SolverReturnStatus update(BoundVariables.Builder bindings) {<NEW_LINE>if (!bindings.containsTypeVariable(typeParameter)) {<NEW_LINE>if (!typeVariableConstraint.canBind(actualType)) {<NEW_LINE>return SolverReturnStatus.UNSOLVABLE;<NEW_LINE>}<NEW_LINE>bindings.setTypeVariable(typeParameter, actualType);<NEW_LINE>return SolverReturnStatus.CHANGED;<NEW_LINE>}<NEW_LINE>Type <MASK><NEW_LINE>Optional<Type> commonSuperType = functionAndTypeManager.getCommonSuperType(originalType, actualType);<NEW_LINE>if (!commonSuperType.isPresent()) {<NEW_LINE>return SolverReturnStatus.UNSOLVABLE;<NEW_LINE>}<NEW_LINE>if (!typeVariableConstraint.canBind(commonSuperType.get())) {<NEW_LINE>// This check must not be skipped even if commonSuperType is equal to originalType<NEW_LINE>return SolverReturnStatus.UNSOLVABLE;<NEW_LINE>}<NEW_LINE>if (commonSuperType.get().equals(originalType) || (originalType instanceof TypeWithName && commonSuperType.get().equals(((TypeWithName) originalType).getType()))) {<NEW_LINE>return SolverReturnStatus.UNCHANGED_SATISFIED;<NEW_LINE>}<NEW_LINE>bindings.setTypeVariable(typeParameter, commonSuperType.get());<NEW_LINE>return SolverReturnStatus.CHANGED;<NEW_LINE>}
originalType = bindings.getTypeVariable(typeParameter);
1,718,683
private List<ItemEntity> createAudioChangeItems() {<NEW_LINE>List<ItemEntity> list = new ArrayList<>();<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_original), R.drawable.audio_effect_setting_changetype_original_open, AUDIO_VOICECHANGER_TYPE_0));<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_child), R.drawable.audio_effect_setting_changetype_child, AUDIO_VOICECHANGER_TYPE_1));<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_luoli), R<MASK><NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_dashu), R.drawable.audio_effect_setting_changetype_dashu, AUDIO_VOICECHANGER_TYPE_3));<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_metal), R.drawable.audio_effect_setting_changetype_metal, AUDIO_VOICECHANGER_TYPE_4));<NEW_LINE>// list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_sick), R.drawable.audio_effect_setting_changetype_sick, AUDIO_VOICECHANGER_TYPE_5));<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_foreign), R.drawable.audio_effect_setting_changetype_foreign, AUDIO_VOICECHANGER_TYPE_6));<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_kunsou), R.drawable.audio_effect_setting_changetype_kunsou, AUDIO_VOICECHANGER_TYPE_7));<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_feizai), R.drawable.audio_effect_setting_changetype_feizai, AUDIO_VOICECHANGER_TYPE_8));<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_dianliu), R.drawable.audio_effect_setting_changetype_dianliu, AUDIO_VOICECHANGER_TYPE_9));<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_machine), R.drawable.audio_effect_setting_changetype_machine, AUDIO_VOICECHANGER_TYPE_10));<NEW_LINE>list.add(new ItemEntity(getResources().getString(R.string.audio_effect_setting_changetype_kongling), R.drawable.audio_effect_setting_changetype_kongling, AUDIO_VOICECHANGER_TYPE_11));<NEW_LINE>list.get(0).mIsSelected = true;<NEW_LINE>return list;<NEW_LINE>}
.drawable.audio_effect_setting_changetype_luoli, AUDIO_VOICECHANGER_TYPE_2));
1,785,135
final UpdateClusterConfigurationResult executeUpdateClusterConfiguration(UpdateClusterConfigurationRequest updateClusterConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateClusterConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateClusterConfigurationRequest> request = null;<NEW_LINE>Response<UpdateClusterConfigurationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateClusterConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateClusterConfigurationRequest));<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(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Kafka");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateClusterConfiguration");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateClusterConfigurationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateClusterConfigurationResultJsonUnmarshaller());<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.SIGNING_REGION, getSigningRegion());
943,851
final AddRegionResult executeAddRegion(AddRegionRequest addRegionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(addRegionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<AddRegionRequest> request = null;<NEW_LINE>Response<AddRegionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new AddRegionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(addRegionRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Directory Service");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AddRegion");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<AddRegionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AddRegionResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
125,276
private QueryIterator resultsToQueryIterator(Binding binding, Node subj, Node score, Node literal, Node graph, Node prop, Collection<TextHit> results, ExecutionContext execCxt) {<NEW_LINE>log.trace("resultsToQueryIterator CALLED with results: {}", results);<NEW_LINE>Var sVar = Var.isVar(subj) ? Var.alloc(subj) : null;<NEW_LINE>Var scoreVar = (score == null) ? null : Var.alloc(score);<NEW_LINE>Var literalVar = (literal == null) ? null : Var.alloc(literal);<NEW_LINE>Var graphVar = (graph == null) ? null : Var.alloc(graph);<NEW_LINE>Var propVar = (prop == null) ? null : Var.alloc(prop);<NEW_LINE>Function<TextHit, Binding> converter = (TextHit hit) -> {<NEW_LINE>if (score == null && literal == null)<NEW_LINE>return sVar != null ? BindingFactory.binding(binding, sVar, hit.getNode()) : BindingFactory.binding(binding);<NEW_LINE>BindingBuilder bmap = Binding.builder(binding);<NEW_LINE>addIf(bmap, sVar, hit.getNode());<NEW_LINE>addIf(bmap, scoreVar, NodeFactoryExtra.floatToNode(hit.getScore()));<NEW_LINE>addIf(bmap, literalVar, hit.getLiteral());<NEW_LINE>addIf(bmap, graphVar, hit.getGraph());<NEW_LINE>addIf(bmap, propVar, hit.getProp());<NEW_LINE>log.trace("resultsToQueryIterator RETURNING bmap: {}", bmap);<NEW_LINE>return bmap.build();<NEW_LINE>};<NEW_LINE>Iterator<Binding> bIter = Iter.map(<MASK><NEW_LINE>QueryIterator qIter = QueryIterPlainWrapper.create(bIter, execCxt);<NEW_LINE>return qIter;<NEW_LINE>}
results.iterator(), converter);
403,129
public Request<VerifyUserAttributeRequest> marshall(VerifyUserAttributeRequest verifyUserAttributeRequest) {<NEW_LINE>if (verifyUserAttributeRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(VerifyUserAttributeRequest)");<NEW_LINE>}<NEW_LINE>Request<VerifyUserAttributeRequest> request = new DefaultRequest<MASK><NEW_LINE>String target = "AWSCognitoIdentityProviderService.VerifyUserAttribute";<NEW_LINE>request.addHeader("X-Amz-Target", target);<NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>String uriResourcePath = "/";<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>try {<NEW_LINE>StringWriter stringWriter = new StringWriter();<NEW_LINE>AwsJsonWriter jsonWriter = JsonUtils.getJsonWriter(stringWriter);<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (verifyUserAttributeRequest.getAccessToken() != null) {<NEW_LINE>String accessToken = verifyUserAttributeRequest.getAccessToken();<NEW_LINE>jsonWriter.name("AccessToken");<NEW_LINE>jsonWriter.value(accessToken);<NEW_LINE>}<NEW_LINE>if (verifyUserAttributeRequest.getAttributeName() != null) {<NEW_LINE>String attributeName = verifyUserAttributeRequest.getAttributeName();<NEW_LINE>jsonWriter.name("AttributeName");<NEW_LINE>jsonWriter.value(attributeName);<NEW_LINE>}<NEW_LINE>if (verifyUserAttributeRequest.getCode() != null) {<NEW_LINE>String code = verifyUserAttributeRequest.getCode();<NEW_LINE>jsonWriter.name("Code");<NEW_LINE>jsonWriter.value(code);<NEW_LINE>}<NEW_LINE>jsonWriter.endObject();<NEW_LINE>jsonWriter.close();<NEW_LINE>String snippet = stringWriter.toString();<NEW_LINE>byte[] content = snippet.getBytes(UTF8);<NEW_LINE>request.setContent(new StringInputStream(snippet));<NEW_LINE>request.addHeader("Content-Length", Integer.toString(content.length));<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t);<NEW_LINE>}<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE>request.addHeader("Content-Type", "application/x-amz-json-1.1");<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
<VerifyUserAttributeRequest>(verifyUserAttributeRequest, "AmazonCognitoIdentityProvider");
187,937
private void onFinishHelper(EVCacheEvent e, Throwable t) {<NEW_LINE>Object clientSpanObj = e.getAttribute(CLIENT_SPAN_ATTRIBUTE_KEY);<NEW_LINE>// Return if the previously saved Client Span is null<NEW_LINE>if (clientSpanObj == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Span clientSpan = (Span) clientSpanObj;<NEW_LINE>try {<NEW_LINE>if (t != null) {<NEW_LINE>this.safeTag(clientSpan, EVCacheTracingTags.ERROR, t.toString());<NEW_LINE>}<NEW_LINE>String status = e.getStatus();<NEW_LINE>this.safeTag(<MASK><NEW_LINE>long latency = this.getDurationInMicroseconds(e.getDurationInMillis());<NEW_LINE>clientSpan.tag(EVCacheTracingTags.LATENCY, String.valueOf(latency));<NEW_LINE>int ttl = e.getTTL();<NEW_LINE>clientSpan.tag(EVCacheTracingTags.DATA_TTL, String.valueOf(ttl));<NEW_LINE>CachedData cachedData = e.getCachedData();<NEW_LINE>if (cachedData != null) {<NEW_LINE>int cachedDataSize = cachedData.getData().length;<NEW_LINE>clientSpan.tag(EVCacheTracingTags.DATA_SIZE, String.valueOf(cachedDataSize));<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>clientSpan.finish();<NEW_LINE>}<NEW_LINE>}
clientSpan, EVCacheTracingTags.STATUS, status);
163,424
public void actionPerformed(ActionEvent e) {<NEW_LINE>final GPColorChooser colorChooser = new GPColorChooser();<NEW_LINE>OkAction okAction = new OkAction() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent arg0) {<NEW_LINE>Color color = colorChooser.getColor();<NEW_LINE>label.setBackground(color);<NEW_LINE>option.setValue(color);<NEW_LINE>List<Color> recentColors = GPColorChooser.getRecentColors();<NEW_LINE>// If we already have such color in the recent list then we remove it<NEW_LINE>// If we failed to remove selected color (=> it was not in the list)<NEW_LINE>// and the list is long enough then we remove colors from the tail<NEW_LINE>if (!recentColors.remove(color) && recentColors.size() == 10) {<NEW_LINE>recentColors.remove(9);<NEW_LINE>}<NEW_LINE>recentColors.add(0, color);<NEW_LINE>GPColorChooser.setRecentColors(recentColors);<NEW_LINE>if (onOk.get() != null) {<NEW_LINE>onOk.get().run();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>final CancelAction cancelAction = new CancelAction() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>super.actionPerformed(e);<NEW_LINE>if (onCancel.get() != null) {<NEW_LINE>onCancel.get().run();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>colorChooser.<MASK><NEW_LINE>Dialog dialog = myUiFacade.createDialog(colorChooser.buildComponent(), new Action[] { okAction, cancelAction }, myi18n.getColorChooserTitle(option));<NEW_LINE>dialog.show();<NEW_LINE>}
setColor(colorButton.getBackground());
936,618
/*<NEW_LINE>* use ScopeCleanupMarker dereferencing strategy to detect scope closure, add<NEW_LINE>* new entry to scopedCleanupActions map<NEW_LINE>*<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public Boolean visitScope(Scope scope) {<NEW_LINE>final Provider<ScopeCleanupMarker> scopedMarkerProvider;<NEW_LINE>if (scope.equals(Scopes.SINGLETON) || (scope instanceof AbstractScope && ((AbstractScope) scope).isSingletonScope())) {<NEW_LINE>scopedMarkerProvider = Providers.of(scopeCleaner.singletonMarker);<NEW_LINE>} else if (scope.equals(Scopes.NO_SCOPE)) {<NEW_LINE>return visitNoScoping();<NEW_LINE>} else {<NEW_LINE>scopedMarkerProvider = scope.scope(ScopeCleanupMarker.MARKER_KEY, scopeCleaner);<NEW_LINE>}<NEW_LINE>ScopeCleanupMarker marker = scopedMarkerProvider.get();<NEW_LINE>marker.getCleanupAction().add(scopedMarkerProvider, <MASK><NEW_LINE>return true;<NEW_LINE>}
new ManagedInstanceAction(injectee, lifecycleActions));
1,344,750
private void drawOutline(MatrixStack matrixStack, int x1, int x2, int y1, int y2) {<NEW_LINE>Matrix4f matrix = matrixStack.peek().getPositionMatrix();<NEW_LINE>BufferBuilder bufferBuilder = Tessellator.getInstance().getBuffer();<NEW_LINE>float[] acColor = gui.getAcColor();<NEW_LINE>RenderSystem.setShaderColor(acColor[0], acColor[1]<MASK><NEW_LINE>bufferBuilder.begin(VertexFormat.DrawMode.DEBUG_LINE_STRIP, VertexFormats.POSITION);<NEW_LINE>bufferBuilder.vertex(matrix, x1, y1, 0).next();<NEW_LINE>bufferBuilder.vertex(matrix, x1, y2, 0).next();<NEW_LINE>bufferBuilder.vertex(matrix, x2, y2, 0).next();<NEW_LINE>bufferBuilder.vertex(matrix, x2, y1, 0).next();<NEW_LINE>bufferBuilder.vertex(matrix, x1, y1, 0).next();<NEW_LINE>bufferBuilder.end();<NEW_LINE>BufferRenderer.draw(bufferBuilder);<NEW_LINE>}
, acColor[2], 0.5F);
150,090
private void saveGameLog(GameEndView gameEndView) {<NEW_LINE>String dir = "gamelogs";<NEW_LINE>File saveDir = new File(dir);<NEW_LINE>// Here comes the existence check<NEW_LINE>if (!saveDir.exists()) {<NEW_LINE>saveDir.mkdirs();<NEW_LINE>}<NEW_LINE>// get game log<NEW_LINE>try {<NEW_LINE>if (gameEndView.getMatchView().getGames().size() > 0) {<NEW_LINE>GamePanel gamePanel = MageFrame.getGame(gameEndView.getMatchView().getGames().get(gameEndView.getMatchView().getGames().size() - 1));<NEW_LINE>if (gamePanel != null) {<NEW_LINE>SimpleDateFormat sdf = new SimpleDateFormat();<NEW_LINE>sdf.applyPattern("yyyyMMdd_HHmmss");<NEW_LINE>String fileName = new StringBuilder(dir).append(File.separator).append(sdf.format(gameEndView.getStartTime())).append('_').append(gameEndView.getMatchView().getGameType()).append('_').append(gameEndView.getMatchView().getGames().size()).append(".txt").toString();<NEW_LINE>PrintWriter out = new PrintWriter(fileName);<NEW_LINE>out.<MASK><NEW_LINE>out.close();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (FileNotFoundException ex) {<NEW_LINE>JOptionPane.showMessageDialog(this, "Error while writing game log to file\n\n" + ex, "Error writing gamelog", JOptionPane.ERROR_MESSAGE);<NEW_LINE>}<NEW_LINE>}
print(gamePanel.getGameLog());
1,592,029
public void testSetByteProperty_TCP_SecOff(HttpServletRequest request, HttpServletResponse response) throws Throwable {<NEW_LINE>JMSContext jmsContextQCFTCP = qcfTCP.createContext();<NEW_LINE>emptyQueue(qcfTCP, queue1);<NEW_LINE>JMSConsumer jmsConsumer = jmsContextQCFTCP.createConsumer(queue1);<NEW_LINE>JMSProducer jmsProducer = jmsContextQCFTCP.createProducer();<NEW_LINE>Message msg = jmsContextQCFTCP.createMessage();<NEW_LINE>String propName = "MyProp";<NEW_LINE>byte propValue1 = 21;<NEW_LINE>msg.setByteProperty(propName, propValue1);<NEW_LINE>byte propValue2 = 100;<NEW_LINE>jmsProducer.setProperty(propName, propValue2);<NEW_LINE>jmsProducer.send(queue1, msg);<NEW_LINE>byte actualPropValue = jmsConsumer.receive<MASK><NEW_LINE>boolean testFailed = false;<NEW_LINE>if (actualPropValue != propValue2) {<NEW_LINE>testFailed = true;<NEW_LINE>}<NEW_LINE>jmsConsumer.close();<NEW_LINE>jmsContextQCFTCP.close();<NEW_LINE>if (testFailed) {<NEW_LINE>throw new Exception("testSetByteProperty_TCP_SecOff failed");<NEW_LINE>}<NEW_LINE>}
(30000).getByteProperty(propName);
618,210
// suppressed warning about method length; this is simply populating a map, which while tedious,<NEW_LINE>// isn't incredibly complex<NEW_LINE>@SuppressWarnings("java:S138")<NEW_LINE>private Map<ValueType, Mapping<?, ?>> loadValueTypes() {<NEW_LINE>final Map<ValueType, Mapping<?, ?>> mapping = new EnumMap<>(ValueType.class);<NEW_LINE>mapping.put(ValueType.DECISION, new Mapping<>(DecisionRecordValue.class, DecisionIntent.class));<NEW_LINE>mapping.put(ValueType.DECISION_EVALUATION, new Mapping<>(DecisionEvaluationRecordValue.class, DecisionEvaluationIntent.class));<NEW_LINE>mapping.put(ValueType.DECISION_REQUIREMENTS, new Mapping<>(DecisionRequirementsRecordValue.class, DecisionRequirementsIntent.class));<NEW_LINE>mapping.put(ValueType.DEPLOYMENT, new Mapping<>(DeploymentRecordValue.class, DeploymentIntent.class));<NEW_LINE>mapping.put(ValueType.DEPLOYMENT_DISTRIBUTION, new Mapping<>(DeploymentDistributionRecordValue.class, DeploymentDistributionIntent.class));<NEW_LINE>mapping.put(ValueType.ERROR, new Mapping<>(ErrorRecordValue.class, ErrorIntent.class));<NEW_LINE>mapping.put(ValueType.INCIDENT, new Mapping<>(IncidentRecordValue.class, IncidentIntent.class));<NEW_LINE>mapping.put(ValueType.JOB, new Mapping<>(JobRecordValue.class, JobIntent.class));<NEW_LINE>mapping.put(ValueType.JOB_BATCH, new Mapping<>(JobBatchRecordValue.class, JobBatchIntent.class));<NEW_LINE>mapping.put(ValueType.MESSAGE, new Mapping<>(MessageRecordValue.class, MessageIntent.class));<NEW_LINE>mapping.put(ValueType.MESSAGE_START_EVENT_SUBSCRIPTION, new Mapping<>(MessageStartEventSubscriptionRecordValue.class, MessageStartEventSubscriptionIntent.class));<NEW_LINE>mapping.put(ValueType.MESSAGE_SUBSCRIPTION, new Mapping<>(MessageSubscriptionRecordValue<MASK><NEW_LINE>mapping.put(ValueType.PROCESS, new Mapping<>(Process.class, ProcessIntent.class));<NEW_LINE>mapping.put(ValueType.PROCESS_EVENT, new Mapping<>(ProcessEventRecordValue.class, ProcessEventIntent.class));<NEW_LINE>mapping.put(ValueType.PROCESS_INSTANCE, new Mapping<>(ProcessInstanceRecordValue.class, ProcessInstanceIntent.class));<NEW_LINE>mapping.put(ValueType.PROCESS_INSTANCE_CREATION, new Mapping<>(ProcessInstanceCreationRecordValue.class, ProcessInstanceCreationIntent.class));<NEW_LINE>mapping.put(ValueType.PROCESS_INSTANCE_RESULT, new Mapping<>(ProcessInstanceResultRecordValue.class, ProcessInstanceResultIntent.class));<NEW_LINE>mapping.put(ValueType.PROCESS_MESSAGE_SUBSCRIPTION, new Mapping<>(ProcessMessageSubscriptionRecordValue.class, ProcessMessageSubscriptionIntent.class));<NEW_LINE>mapping.put(ValueType.TIMER, new Mapping<>(TimerRecordValue.class, TimerIntent.class));<NEW_LINE>mapping.put(ValueType.VARIABLE, new Mapping<>(VariableRecordValue.class, VariableIntent.class));<NEW_LINE>mapping.put(ValueType.VARIABLE_DOCUMENT, new Mapping<>(VariableDocumentRecordValue.class, VariableDocumentIntent.class));<NEW_LINE>return mapping;<NEW_LINE>}
.class, MessageSubscriptionIntent.class));
141,107
static Type of(PlannerVertex.Type from, PlannerVertex.Type to, StructureEdge.Native<?, ?> structureEdge) {<NEW_LINE>Encoding.Edge.Type encoding = structureEdge.encoding().asType();<NEW_LINE>switch(encoding) {<NEW_LINE>case SUB:<NEW_LINE>return new Type.Sub(from.asType(), to.asType(), structureEdge.isTransitive());<NEW_LINE>case OWNS:<NEW_LINE>return new Type.Owns(from.asType(), to.asType(), false);<NEW_LINE>case OWNS_KEY:<NEW_LINE>return new Type.Owns(from.asType(), to.asType(), true);<NEW_LINE>case PLAYS:<NEW_LINE>return new Type.Plays(from.asType(<MASK><NEW_LINE>case RELATES:<NEW_LINE>return new Type.Relates(from.asType(), to.asType());<NEW_LINE>default:<NEW_LINE>throw TypeDBException.of(UNRECOGNISED_VALUE);<NEW_LINE>}<NEW_LINE>}
), to.asType());
1,607,880
public boolean onKeyDown(int keyCode, KeyEvent event) {<NEW_LINE>switch(keyCode) {<NEW_LINE>case KeyEvent.KEYCODE_MEDIA_REWIND:<NEW_LINE>case KeyEvent.KEYCODE_DPAD_LEFT:<NEW_LINE>{<NEW_LINE>fragment = CarouselFragment.newInstance(selectedCarouselItemIndex - 1);<NEW_LINE>FragmentTransaction ft = getFragmentManager().beginTransaction();<NEW_LINE>ft.replace(R.id.carousel, fragment);<NEW_LINE>ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);<NEW_LINE>ft.commit();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD:<NEW_LINE>case KeyEvent.KEYCODE_DPAD_RIGHT:<NEW_LINE>{<NEW_LINE>fragment = <MASK><NEW_LINE>FragmentTransaction ft = getFragmentManager().beginTransaction();<NEW_LINE>ft.replace(R.id.carousel, fragment);<NEW_LINE>ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);<NEW_LINE>ft.commit();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case KeyEvent.KEYCODE_DPAD_DOWN:<NEW_LINE>{<NEW_LINE>fragment = CarouselFragment.newInstance(selectedCarouselItemIndex);<NEW_LINE>FragmentTransaction ft = getFragmentManager().beginTransaction();<NEW_LINE>ft.replace(R.id.carousel, fragment);<NEW_LINE>ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);<NEW_LINE>ft.commit();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case KeyEvent.KEYCODE_DPAD_UP:<NEW_LINE>{<NEW_LINE>FragmentTransaction ft = getFragmentManager().beginTransaction();<NEW_LINE>ft.hide(fragment);<NEW_LINE>ft.commit();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return super.onKeyDown(keyCode, event);<NEW_LINE>}
CarouselFragment.newInstance(selectedCarouselItemIndex + 1);
869,077
static void writeVarInt(DataOutput dos, int v) throws IOException {<NEW_LINE>if (v < 0) {<NEW_LINE>throw new IllegalArgumentException("Out of bounds: " + v);<NEW_LINE>}<NEW_LINE>int val = v;<NEW_LINE>if ((val & 0xFFFFFF80) == 0) {<NEW_LINE>dos.write(val);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>dos.write(0x80 | (0x7F & val));<NEW_LINE>val >>= 7;<NEW_LINE>if ((val & 0xFFFFFF80) == 0) {<NEW_LINE>dos.write(val);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>dos.write(0x80 | (0x7F & val));<NEW_LINE>val >>= 7;<NEW_LINE>if ((val & 0xFFFFFF80) == 0) {<NEW_LINE>dos.write(val);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>dos.write(0x80 | (0x7F & val));<NEW_LINE>val >>= 7;<NEW_LINE>if ((val & 0xFFFFFF00) == 0) {<NEW_LINE>dos.write(val);<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
throw new IllegalArgumentException("Out of bounds: " + v);
468,882
public static String convert(final int n) {<NEW_LINE>// System.out.println("n = " + n);<NEW_LINE>if (n == 0) {<NEW_LINE>return "zero";<NEW_LINE>}<NEW_LINE>if (n < 0) {<NEW_LINE>return "minus " + convert(-n);<NEW_LINE>}<NEW_LINE>if (n < 20) {<NEW_LINE>return units[n];<NEW_LINE>}<NEW_LINE>if (n < 100) {<NEW_LINE>return tens[n / 10] + ((n % 10 != 0) ? " " : "") + units[n % 10];<NEW_LINE>}<NEW_LINE>if (n < 1000) {<NEW_LINE>return units[n / 100] + " hundred" + ((n % 100 != 0) ? " " : "") + convert(n % 100);<NEW_LINE>}<NEW_LINE>if (n < 1000000) {<NEW_LINE>return convert(n / 1000) + " thousand" + ((n % 1000 != 0) ? " " : "") + convert(n % 1000);<NEW_LINE>}<NEW_LINE>if (n < 1000000000) {<NEW_LINE>return convert(n / 1000000) + " million" + ((n % 1000000 != 0) ? " " : "") + convert(n % 1000000);<NEW_LINE>}<NEW_LINE>return convert(n / 1000000000) + " billion" + ((n % 1000000000 != 0) ? " " : ""<MASK><NEW_LINE>}
) + convert(n % 1000000000);
1,581,017
/*<NEW_LINE>* Open an asset.<NEW_LINE>*<NEW_LINE>* The data could be in any asset path. Each asset path could be:<NEW_LINE>* - A directory on disk.<NEW_LINE>* - A Zip archive, uncompressed or compressed.<NEW_LINE>*<NEW_LINE>* If the file is in a directory, it could have a .gz suffix, meaning it is compressed.<NEW_LINE>*<NEW_LINE>* We should probably reject requests for "illegal" filenames, e.g. those<NEW_LINE>* with illegal characters or "../" backward relative paths.<NEW_LINE>*/<NEW_LINE>public Asset open(final String fileName, AccessMode mode) {<NEW_LINE>synchronized (mLock) {<NEW_LINE>LOG_FATAL_IF(mAssetPaths.isEmpty(), "No assets added to AssetManager");<NEW_LINE>String8 assetName = new String8(kAssetsRoot);<NEW_LINE>assetName.appendPath(fileName);<NEW_LINE><MASK><NEW_LINE>while (i > 0) {<NEW_LINE>i--;<NEW_LINE>ALOGV("Looking for asset '%s' in '%s'\n", assetName.string(), mAssetPaths.get(i).path.string());<NEW_LINE>Asset pAsset = openNonAssetInPathLocked(assetName.string(), mode, mAssetPaths.get(i));<NEW_LINE>if (pAsset != null) {<NEW_LINE>return Objects.equals(pAsset, kExcludedAsset) ? null : pAsset;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
int i = mAssetPaths.size();
34,193
public void iterationStart(LoopIterationEvent iterEvent) {<NEW_LINE>FileServer server = FileServer.getFileServer();<NEW_LINE>final JMeterContext context = getThreadContext();<NEW_LINE>String delim = getDelimiter();<NEW_LINE>if ("\\t".equals(delim)) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>// Make it easier to enter a Tab // $NON-NLS-1$<NEW_LINE>delim = "\t";<NEW_LINE>} else if (delim.isEmpty()) {<NEW_LINE>log.debug("Empty delimiter, will use ','");<NEW_LINE>delim = ",";<NEW_LINE>}<NEW_LINE>if (vars == null) {<NEW_LINE>initVars(server, context, delim);<NEW_LINE>}<NEW_LINE>// TODO: fetch this once as per vars above?<NEW_LINE>JMeterVariables threadVars = context.getVariables();<NEW_LINE>String[] lineValues = {};<NEW_LINE>try {<NEW_LINE>if (getQuotedData()) {<NEW_LINE>lineValues = server.getParsedLine(alias, recycle, firstLineIsNames || ignoreFirstLine, delim.charAt(0));<NEW_LINE>} else {<NEW_LINE>String line = server.readLine(alias, recycle, firstLineIsNames || ignoreFirstLine);<NEW_LINE>lineValues = JOrphanUtils.split(line, delim, false);<NEW_LINE>}<NEW_LINE>for (int a = 0; a < vars.length && a < lineValues.length; a++) {<NEW_LINE>threadVars.put(vars[a], lineValues[a]);<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>// treat the same as EOF<NEW_LINE>log.error(e.toString());<NEW_LINE>}<NEW_LINE>if (lineValues.length == 0) {<NEW_LINE>// i.e. EOF<NEW_LINE>if (getStopThread()) {<NEW_LINE>throw new JMeterStopThreadException("End of file:" + getFilename() + " detected for CSV DataSet:" + getName() + " configured with stopThread:" + getStopThread() + ", recycle:" + getRecycle());<NEW_LINE>}<NEW_LINE>for (String var : vars) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
threadVars.put(var, EOFVALUE);
705,335
public void requiredActionChallenge(RequiredActionContext context) {<NEW_LINE>UserProfileProvider provider = context.getSession().getProvider(UserProfileProvider.class);<NEW_LINE>UserProfile profile = provider.create(UserProfileContext.UPDATE_PROFILE, context.getUser());<NEW_LINE>try {<NEW_LINE>profile.validate();<NEW_LINE>context.success();<NEW_LINE>} catch (ValidationException ve) {<NEW_LINE>List<FormMessage> errors = Validation.getFormErrorsFromValidation(ve.getErrors());<NEW_LINE>MultivaluedMap<String, String> parameters;<NEW_LINE>if (context.getHttpRequest().getHttpMethod().equalsIgnoreCase(HttpMethod.GET)) {<NEW_LINE>parameters = new MultivaluedHashMap<>();<NEW_LINE>} else {<NEW_LINE>parameters = context<MASK><NEW_LINE>}<NEW_LINE>context.challenge(createResponse(context, parameters, errors));<NEW_LINE>EventBuilder event = context.getEvent().clone();<NEW_LINE>event.event(EventType.VERIFY_PROFILE);<NEW_LINE>event.detail("fields_to_update", collectFields(errors));<NEW_LINE>event.success();<NEW_LINE>}<NEW_LINE>}
.getHttpRequest().getDecodedFormParameters();
530,857
public void invokeSlackWebhook() {<NEW_LINE>RestTemplate restTemplate = new RestTemplate();<NEW_LINE>RichMessage richMessage = new RichMessage("Just to test Slack's incoming webhooks.");<NEW_LINE>// set attachments<NEW_LINE>Attachment[] attachments = new Attachment[1];<NEW_LINE>attachments<MASK><NEW_LINE>attachments[0].setText("Some data relevant to your users.");<NEW_LINE>richMessage.setAttachments(attachments);<NEW_LINE>// For debugging purpose only<NEW_LINE>try {<NEW_LINE>logger.debug("Reply (RichMessage): {}", new ObjectMapper().writeValueAsString(richMessage));<NEW_LINE>} catch (JsonProcessingException e) {<NEW_LINE>logger.debug("Error parsing RichMessage: ", e);<NEW_LINE>}<NEW_LINE>// Always remember to send the encoded message to Slack<NEW_LINE>try {<NEW_LINE>restTemplate.postForEntity(slackIncomingWebhookUrl, richMessage.encodedMessage(), String.class);<NEW_LINE>} catch (RestClientException e) {<NEW_LINE>logger.error("Error posting to Slack Incoming Webhook: ", e);<NEW_LINE>}<NEW_LINE>}
[0] = new Attachment();
887,810
public void write(JmeExporter ex) throws IOException {<NEW_LINE>OutputCapsule oc = ex.getCapsule(this);<NEW_LINE>oc.write(components, "components", 0);<NEW_LINE>oc.write(usage, "usage", Usage.Dynamic);<NEW_LINE>oc.write(bufType, "buffer_type", null);<NEW_LINE>oc.write(format, "format", Format.Float);<NEW_LINE>oc.write(normalized, "normalized", false);<NEW_LINE>oc.write(offset, "offset", 0);<NEW_LINE>oc.write(stride, "stride", 0);<NEW_LINE>oc.write(instanceSpan, "instanceSpan", 0);<NEW_LINE>String dataName = "data" + format.name();<NEW_LINE>Buffer roData = getDataReadOnly();<NEW_LINE>switch(format) {<NEW_LINE>case Float:<NEW_LINE>oc.write((FloatBuffer) roData, dataName, null);<NEW_LINE>break;<NEW_LINE>case Short:<NEW_LINE>case UnsignedShort:<NEW_LINE>oc.write((ShortBuffer) roData, dataName, null);<NEW_LINE>break;<NEW_LINE>case UnsignedByte:<NEW_LINE>case Byte:<NEW_LINE>case Half:<NEW_LINE>oc.write((<MASK><NEW_LINE>break;<NEW_LINE>case Int:<NEW_LINE>case UnsignedInt:<NEW_LINE>oc.write((IntBuffer) roData, dataName, null);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new IOException("Unsupported export buffer format: " + format);<NEW_LINE>}<NEW_LINE>}
ByteBuffer) roData, dataName, null);
827,058
private String methodDefinition(JavaMethod method) {<NEW_LINE>StringBuilder methodBuilder = new StringBuilder();<NEW_LINE>JavaType returnType = method.getReturnType();<NEW_LINE>String simpleReturn = returnType.getCanonicalName();<NEW_LINE>String returnClass = returnType.getGenericCanonicalName();<NEW_LINE>returnClass = returnClass.replace(simpleReturn, JavaClassUtil.getClassSimpleName(simpleReturn));<NEW_LINE>String[] arrays = DocClassUtil.getSimpleGicName(returnClass);<NEW_LINE>for (String str : arrays) {<NEW_LINE>if (str.contains("[")) {<NEW_LINE>str = str.substring(0, str.indexOf("["));<NEW_LINE>}<NEW_LINE>String[] generics = str.split("[<,]");<NEW_LINE>for (String generic : generics) {<NEW_LINE>if (generic.contains("extends")) {<NEW_LINE>String className = generic.substring(generic<MASK><NEW_LINE>returnClass = returnClass.replace(className, JavaClassUtil.getClassSimpleName(className));<NEW_LINE>}<NEW_LINE>if (generic.length() != 1 && !generic.contains("extends")) {<NEW_LINE>returnClass = returnClass.replaceAll(generic, JavaClassUtil.getClassSimpleName(generic));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>methodBuilder.append(returnClass).append(" ");<NEW_LINE>List<String> params = new ArrayList<>();<NEW_LINE>List<JavaParameter> parameters = method.getParameters();<NEW_LINE>for (JavaParameter parameter : parameters) {<NEW_LINE>params.add(parameter.getType().getGenericValue() + " " + parameter.getName());<NEW_LINE>}<NEW_LINE>methodBuilder.append(method.getName()).append("(").append(String.join(", ", params)).append(")");<NEW_LINE>return methodBuilder.toString();<NEW_LINE>}
.lastIndexOf(" ") + 1);
1,794,679
final StartModelPackagingJobResult executeStartModelPackagingJob(StartModelPackagingJobRequest startModelPackagingJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startModelPackagingJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<StartModelPackagingJobRequest> request = null;<NEW_LINE>Response<StartModelPackagingJobResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new StartModelPackagingJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startModelPackagingJobRequest));<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, "StartModelPackagingJob");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<StartModelPackagingJobResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartModelPackagingJobResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
1,320,067
public static void uninstallJdk(int version) {<NEW_LINE>Path jdkDir = JdkManager.getInstalledJdk(version);<NEW_LINE>if (jdkDir != null) {<NEW_LINE>int defaultJdk = getDefaultJdk();<NEW_LINE>if (Util.isWindows()) {<NEW_LINE>// On Windows we have to check nobody is currently using the JDK or we could<NEW_LINE>// be causing all kinds of trouble<NEW_LINE>try {<NEW_LINE>Path jdkTmpDir = jdkDir.getParent().resolve(jdkDir.getFileName().toString() + ".tmp");<NEW_LINE>Util.deletePath(jdkTmpDir, true);<NEW_LINE><MASK><NEW_LINE>jdkDir = jdkTmpDir;<NEW_LINE>} catch (IOException ex) {<NEW_LINE>Util.warnMsg("Cannot uninstall JDK " + version + ", it's being used");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Util.deletePath(jdkDir, false);<NEW_LINE>if (defaultJdk == version) {<NEW_LINE>Optional<Integer> newver = nextInstalledJdk(version);<NEW_LINE>if (!newver.isPresent()) {<NEW_LINE>newver = prevInstalledJdk(version);<NEW_LINE>}<NEW_LINE>if (newver.isPresent()) {<NEW_LINE>setDefaultJdk(newver.get());<NEW_LINE>} else {<NEW_LINE>removeDefaultJdk();<NEW_LINE>Util.infoMsg("Default JDK unset");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
Files.move(jdkDir, jdkTmpDir);
1,696,120
private void testSynthesizeFromDatagrams(LinkedList<HnmDatagram> datagrams, int startIndex, int endIndex, DataOutputStream output) throws IOException {<NEW_LINE>HntmSynthesizer s = new HntmSynthesizer();<NEW_LINE>// TODO: These should come from timeline and user choices...<NEW_LINE>HntmAnalyzerParams hnmAnalysisParams = new HntmAnalyzerParams();<NEW_LINE>HntmSynthesizerParams synthesisParams = new HntmSynthesizerParams();<NEW_LINE>BasicProsodyModifierParams pmodParams = new BasicProsodyModifierParams();<NEW_LINE>int samplingRateInHz = this.getSampleRate();<NEW_LINE>int totalFrm = 0;<NEW_LINE>int i;<NEW_LINE>float originalDurationInSeconds = 0.0f;<NEW_LINE>float deltaTimeInSeconds;<NEW_LINE>for (i = startIndex; i <= endIndex; i++) {<NEW_LINE>HnmDatagram datagram;<NEW_LINE>try {<NEW_LINE>datagram = datagrams.get(i);<NEW_LINE>} catch (IndexOutOfBoundsException e) {<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>if (datagram != null && datagram instanceof HnmDatagram) {<NEW_LINE>totalFrm++;<NEW_LINE>// deltaTimeInSeconds = SignalProcUtils.sample2time(((HnmDatagram)datagrams.get(i)).getDuration(),<NEW_LINE>// samplingRateInHz);<NEW_LINE>deltaTimeInSeconds = datagram.frame.deltaAnalysisTimeInSeconds;<NEW_LINE>originalDurationInSeconds += deltaTimeInSeconds;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>HntmSpeechSignal hnmSignal = new HntmSpeechSignal(totalFrm, samplingRateInHz, originalDurationInSeconds);<NEW_LINE>int frameCount = 0;<NEW_LINE>float tAnalysisInSeconds = 0.0f;<NEW_LINE>for (i = startIndex; i <= endIndex; i++) {<NEW_LINE>HnmDatagram datagram;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>} catch (IndexOutOfBoundsException e) {<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>if (datagram != null && datagram instanceof HnmDatagram) {<NEW_LINE>// tAnalysisInSeconds += SignalProcUtils.sample2time(((HnmDatagram)datagrams.get(i)).getDuration(),<NEW_LINE>// samplingRateInHz);<NEW_LINE>tAnalysisInSeconds += datagram.getFrame().deltaAnalysisTimeInSeconds;<NEW_LINE>if (frameCount < totalFrm) {<NEW_LINE>hnmSignal.frames[frameCount] = new HntmSpeechFrame(datagram.getFrame());<NEW_LINE>hnmSignal.frames[frameCount].tAnalysisInSeconds = tAnalysisInSeconds;<NEW_LINE>frameCount++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>HntmSynthesizedSignal ss = null;<NEW_LINE>if (totalFrm > 0) {<NEW_LINE>ss = s.synthesize(hnmSignal, null, null, pmodParams, null, hnmAnalysisParams, synthesisParams);<NEW_LINE>FileUtils.writeBinaryFile(ArrayUtils.copyDouble2Short(ss.output), output);<NEW_LINE>if (ss.output != null) {<NEW_LINE>// why is this done here?<NEW_LINE>ss.output = MathUtils.multiply(ss.output, 1.0 / 32768.0);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}
datagram = datagrams.get(i);
1,434,515
private List<Slice> extractSlice(MonitorDataFrame mdf) {<NEW_LINE>List<Slice> list = new ArrayList<>();<NEW_LINE>Map<String, List<Map>> frames = mdf.getDatas();<NEW_LINE>String appgroup = mdf.getExt("appgroup");<NEW_LINE>String pid = mdf.getExt("pid");<NEW_LINE>for (Map.Entry<String, List<Map>> frame : frames.entrySet()) {<NEW_LINE>List<Map> servers = frame.getValue();<NEW_LINE>for (Map server : servers) {<NEW_LINE>String meId = (String) server.get("MEId");<NEW_LINE>List<Map> instances = (List<Map>) server.get("Instances");<NEW_LINE>for (Map ins : instances) {<NEW_LINE>String id = (String) ins.get("id");<NEW_LINE>Map values = (Map) ins.get("values");<NEW_LINE>values.put("ip", mdf.getIP());<NEW_LINE>values.put("host", mdf.getHost());<NEW_LINE>if (pid != null) {<NEW_LINE>values.put("pid", pid);<NEW_LINE>}<NEW_LINE>values.put("appgroup", appgroup);<NEW_LINE>String key = frame.getKey() + RuntimeNotifyCatcher.STRATEGY_SEPARATOR + meId + RuntimeNotifyCatcher.STRATEGY_SEPARATOR + id;<NEW_LINE>Slice slice = new Slice(key, mdf.getTimeFlag());<NEW_LINE>slice.setArgs(values);<NEW_LINE>slice.setMdf(mdf);<NEW_LINE>list.add(slice);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (log.isDebugEnable()) {<NEW_LINE>log.debug(this, <MASK><NEW_LINE>}<NEW_LINE>return list;<NEW_LINE>}
"RuntimeNotify Extract Slices: slices size=" + list.size());
1,530,821
void deserialize(TaskMonitor monitor) throws IOException, PdbException, CancelledException {<NEW_LINE>int streamNumber;<NEW_LINE>PdbByteReader reader;<NEW_LINE>PdbDebugInfo debugInfo = pdb.getDebugInfo();<NEW_LINE>if (debugInfo == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>streamNumber = debugInfo.getSymbolRecordsStreamNumber();<NEW_LINE>if (streamNumber <= 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>reader = pdb.getReaderForStreamNumber(streamNumber, monitor);<NEW_LINE>symbolsByOffset = deserializeSymbolRecords(pdb, reader, monitor);<NEW_LINE>for (AbstractModuleInformation module : debugInfo.moduleInformationList) {<NEW_LINE>streamNumber = module.getStreamNumberDebugInformation();<NEW_LINE>if (streamNumber != 0xffff) {<NEW_LINE>// System.out.println("\n\nStreamNumber: " + streamNumber);<NEW_LINE>reader = pdb.getReaderForStreamNumber(streamNumber, monitor);<NEW_LINE>// TODO: do not know what this value is.<NEW_LINE><MASK><NEW_LINE>int sizeDebug = module.getSizeLocalSymbolsDebugInformation();<NEW_LINE>// TODO: seems right, but need to evaluate this<NEW_LINE>sizeDebug -= x;<NEW_LINE>PdbByteReader debugReader = reader.getSubPdbByteReader(sizeDebug);<NEW_LINE>Map<Long, AbstractMsSymbol> oneModuleSymbolsByOffset = deserializeSymbolRecords(pdb, debugReader, monitor);<NEW_LINE>moduleSymbolsByOffset.add(oneModuleSymbolsByOffset);<NEW_LINE>// TODO: figure out the rest of the bytes in the stream<NEW_LINE>// As of 20190618: feel that this is where we will find C11Lines or C13Lines<NEW_LINE>// information.<NEW_LINE>// PdbByteReader rest = reader.getSubPdbByteReader(reader.numRemaining());<NEW_LINE>// System.out.println(rest.dump());<NEW_LINE>} else {<NEW_LINE>moduleSymbolsByOffset.add(new TreeMap<>());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
int x = reader.parseInt();
1,014,502
private void writeImageSize(@NonNull final BluetoothGattCharacteristic characteristic, final int imageSize) throws DeviceDisconnectedException, DfuException, UploadAbortedException {<NEW_LINE>mReceivedData = null;<NEW_LINE>mError = 0;<NEW_LINE>mImageSizeInProgress = true;<NEW_LINE>characteristic.setWriteType(BluetoothGattCharacteristic.WRITE_TYPE_NO_RESPONSE);<NEW_LINE>characteristic.setValue(new byte[4]);<NEW_LINE>characteristic.setValue(<MASK><NEW_LINE>mService.sendLogBroadcast(DfuBaseService.LOG_LEVEL_VERBOSE, "Writing to characteristic " + characteristic.getUuid());<NEW_LINE>mService.sendLogBroadcast(DfuBaseService.LOG_LEVEL_DEBUG, "gatt.writeCharacteristic(" + characteristic.getUuid() + ")");<NEW_LINE>mGatt.writeCharacteristic(characteristic);<NEW_LINE>// We have to wait for confirmation<NEW_LINE>try {<NEW_LINE>synchronized (mLock) {<NEW_LINE>while ((mImageSizeInProgress && mConnected && mError == 0 && !mAborted) || mPaused) mLock.wait();<NEW_LINE>}<NEW_LINE>} catch (final InterruptedException e) {<NEW_LINE>loge("Sleeping interrupted", e);<NEW_LINE>}<NEW_LINE>if (mAborted)<NEW_LINE>throw new UploadAbortedException();<NEW_LINE>if (!mConnected)<NEW_LINE>throw new DeviceDisconnectedException("Unable to write Image Size: device disconnected");<NEW_LINE>if (mError != 0)<NEW_LINE>throw new DfuException("Unable to write Image Size", mError);<NEW_LINE>}
imageSize, BluetoothGattCharacteristic.FORMAT_UINT32, 0);
433,922
private void checkKafkaProperties() throws AnalysisException {<NEW_LINE>Optional<String> optional = properties.keySet().stream().filter(entity -> !CONFIGURABLE_PROPERTIES_SET.contains(entity)).filter(entity -> !entity.startsWith("property.")).findFirst();<NEW_LINE>if (optional.isPresent()) {<NEW_LINE>throw new AnalysisException(optional.get() + " is invalid kafka custom property");<NEW_LINE>}<NEW_LINE>// check partitions<NEW_LINE>final String kafkaPartitionsString = properties.get(CreateRoutineLoadStmt.KAFKA_PARTITIONS_PROPERTY);<NEW_LINE>if (kafkaPartitionsString != null) {<NEW_LINE>if (!properties.containsKey(CreateRoutineLoadStmt.KAFKA_OFFSETS_PROPERTY)) {<NEW_LINE>throw new AnalysisException("Partition and offset must be specified at the same time");<NEW_LINE>}<NEW_LINE>CreateRoutineLoadStmt.analyzeKafkaPartitionProperty(kafkaPartitionsString, Maps.newHashMap(), kafkaPartitionOffsets);<NEW_LINE>} else {<NEW_LINE>if (properties.containsKey(CreateRoutineLoadStmt.KAFKA_OFFSETS_PROPERTY)) {<NEW_LINE>throw new AnalysisException("Missing kafka partition info");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// check offset<NEW_LINE>String kafkaOffsetsString = properties.get(CreateRoutineLoadStmt.KAFKA_OFFSETS_PROPERTY);<NEW_LINE>if (kafkaOffsetsString != null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>// check custom properties<NEW_LINE>CreateRoutineLoadStmt.analyzeCustomProperties(properties, customKafkaProperties);<NEW_LINE>}
CreateRoutineLoadStmt.analyzeKafkaOffsetProperty(kafkaOffsetsString, kafkaPartitionOffsets);
1,563,890
private void addBuildPane() {<NEW_LINE>buildTxGridPane = new GridPane();<NEW_LINE>gridPane.add(buildTxGridPane, 1, rowIndex);<NEW_LINE>int rowIndexA = 0;<NEW_LINE>buyerSignatureAsHex = addInputTextField(buildTxGridPane, ++rowIndexA, "buyerSignatureAsHex");<NEW_LINE>sellerSignatureAsHex = addInputTextField(buildTxGridPane, ++rowIndexA, "sellerSignatureAsHex");<NEW_LINE>// spacer<NEW_LINE>buildTxGridPane.add(new Label(""), 0, ++rowIndexA);<NEW_LINE>finalSignedTxHex = new BisqTextArea();<NEW_LINE>finalSignedTxHex.setEditable(false);<NEW_LINE>finalSignedTxHex.setWrapText(true);<NEW_LINE>finalSignedTxHex.setPrefSize(800, 250);<NEW_LINE>buildTxGridPane.add(finalSignedTxHex, 0, ++rowIndexA);<NEW_LINE>// spacer<NEW_LINE>buildTxGridPane.add(new Label(""), 0, ++rowIndexA);<NEW_LINE><MASK><NEW_LINE>Button buttonBroadcast = new AutoTooltipButton("Broadcast");<NEW_LINE>HBox hBox = new HBox(12, buttonBuild, buttonBroadcast);<NEW_LINE>hBox.setAlignment(Pos.BASELINE_CENTER);<NEW_LINE>hBox.setPrefWidth(800);<NEW_LINE>buildTxGridPane.add(hBox, 0, ++rowIndexA);<NEW_LINE>buttonBuild.setOnAction(e -> {<NEW_LINE>finalSignedTxHex.setText(buildFinalTx(false));<NEW_LINE>});<NEW_LINE>buttonBroadcast.setOnAction(e -> {<NEW_LINE>finalSignedTxHex.setText(buildFinalTx(true));<NEW_LINE>});<NEW_LINE>}
Button buttonBuild = new AutoTooltipButton("Build");
976,425
public void morseCodeFinished() {<NEW_LINE>try {<NEW_LINE>logger.debug("currentSequence {}", currentSequence);<NEW_LINE>if (currentSequence >= sequenceLength) {<NEW_LINE>round++;<NEW_LINE>logger.<MASK><NEW_LINE>if (round < repeats) {<NEW_LINE>// for repeats currentSequence must be 0 because the initial Tone<NEW_LINE>currentSequence = 0;<NEW_LINE>// was send<NEW_LINE>// from outside of the listener<NEW_LINE>} else {<NEW_LINE>// we are done<NEW_LINE>logger.debug("beep done");<NEW_LINE>setSwitchState(OnOffValue.OFF);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>logger.debug("currentSequence {}, sequenceLength {}", currentSequence, sequenceLength);<NEW_LINE>}<NEW_LINE>logger.debug("morse code {} frequency {}", morseCodes[currentSequence], frequencies[currentSequence]);<NEW_LINE>tinkerforgeDevice.morseCode(morseCodes[currentSequence], frequencies[currentSequence]);<NEW_LINE>currentSequence++;<NEW_LINE>} catch (TimeoutException e) {<NEW_LINE>TinkerforgeErrorHandler.handleError(mbricklet, TinkerforgeErrorHandler.TF_TIMEOUT_EXCEPTION, e);<NEW_LINE>} catch (NotConnectedException e) {<NEW_LINE>TinkerforgeErrorHandler.handleError(mbricklet, TinkerforgeErrorHandler.TF_NOT_CONNECTION_EXCEPTION, e);<NEW_LINE>}<NEW_LINE>}
debug("round {} repeat {}", round, repeats);
1,330,250
public static QueryResourceInventoryResponse unmarshall(QueryResourceInventoryResponse queryResourceInventoryResponse, UnmarshallerContext context) {<NEW_LINE>queryResourceInventoryResponse.setRequestId(context.stringValue("QueryResourceInventoryResponse.RequestId"));<NEW_LINE>queryResourceInventoryResponse.setCode(context.integerValue("QueryResourceInventoryResponse.Code"));<NEW_LINE>queryResourceInventoryResponse.setMessage(context.stringValue("QueryResourceInventoryResponse.Message"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setLastUpdate(context.stringValue("QueryResourceInventoryResponse.Data.LastUpdate"));<NEW_LINE>List<Cluster> clusters = new ArrayList<Cluster>();<NEW_LINE>for (int i = 0; i < context.lengthValue("QueryResourceInventoryResponse.Data.Clusters.Length"); i++) {<NEW_LINE>Cluster cluster = new Cluster();<NEW_LINE>cluster.setStatus(context.stringValue("QueryResourceInventoryResponse.Data.Clusters[" + i + "].Status"));<NEW_LINE>cluster.setCluster(context.stringValue("QueryResourceInventoryResponse.Data.Clusters[" + i + "].Cluster"));<NEW_LINE>cluster.setMachineRoom(context.stringValue("QueryResourceInventoryResponse.Data.Clusters[" + i + "].MachineRoom"));<NEW_LINE>cluster.setRegion(context.stringValue("QueryResourceInventoryResponse.Data.Clusters[" + i + "].Region"));<NEW_LINE>List<ResourceParameter> resourceParameters = new ArrayList<ResourceParameter>();<NEW_LINE>for (int j = 0; j < context.lengthValue("QueryResourceInventoryResponse.Data.Clusters[" + i + "].ResourceParameters.Length"); j++) {<NEW_LINE>ResourceParameter resourceParameter = new ResourceParameter();<NEW_LINE>resourceParameter.setParaName(context.stringValue("QueryResourceInventoryResponse.Data.Clusters[" + i + "].ResourceParameters[" + j + "].ParaName"));<NEW_LINE>resourceParameter.setParaValue(context.stringValue("QueryResourceInventoryResponse.Data.Clusters[" + i + "].ResourceParameters[" + j + "].ParaValue"));<NEW_LINE>resourceParameters.add(resourceParameter);<NEW_LINE>}<NEW_LINE>cluster.setResourceParameters(resourceParameters);<NEW_LINE>List<ResourceInventory> resourceInventories = new ArrayList<ResourceInventory>();<NEW_LINE>for (int j = 0; j < context.lengthValue("QueryResourceInventoryResponse.Data.Clusters[" + i + "].ResourceInventories.Length"); j++) {<NEW_LINE>ResourceInventory resourceInventory = new ResourceInventory();<NEW_LINE>resourceInventory.setTotal(context.longValue("QueryResourceInventoryResponse.Data.Clusters[" + i + "].ResourceInventories[" + j + "].Total"));<NEW_LINE>resourceInventory.setAvailable(context.longValue("QueryResourceInventoryResponse.Data.Clusters[" + i + "].ResourceInventories[" + j + "].Available"));<NEW_LINE>resourceInventory.setUsed(context.longValue("QueryResourceInventoryResponse.Data.Clusters[" + i + "].ResourceInventories[" + j + "].Used"));<NEW_LINE>resourceInventory.setResourceType(context.stringValue("QueryResourceInventoryResponse.Data.Clusters[" + i <MASK><NEW_LINE>resourceInventories.add(resourceInventory);<NEW_LINE>}<NEW_LINE>cluster.setResourceInventories(resourceInventories);<NEW_LINE>clusters.add(cluster);<NEW_LINE>}<NEW_LINE>data.setClusters(clusters);<NEW_LINE>queryResourceInventoryResponse.setData(data);<NEW_LINE>return queryResourceInventoryResponse;<NEW_LINE>}
+ "].ResourceInventories[" + j + "].ResourceType"));
1,488,280
public static void main(String[] args) throws TwilioRestException {<NEW_LINE>TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);<NEW_LINE>String[] randomMessages = { "Working hard", "Gotta ship this feature", "Someone fucked the system again" };<NEW_LINE>int randomIndex = new Random().nextInt(randomMessages.length);<NEW_LINE>String finalMessage = (randomMessages[randomIndex]);<NEW_LINE>List<NameValuePair> params = new ArrayList<NameValuePair>();<NEW_LINE>params.add(new BasicNameValuePair<MASK><NEW_LINE>params.add(new BasicNameValuePair("From", YOUR_NUMBER));<NEW_LINE>params.add(new BasicNameValuePair("To", HER_NUMBER));<NEW_LINE>MessageFactory messageFactory = client.getAccount().getMessageFactory();<NEW_LINE>Message message = messageFactory.create(params);<NEW_LINE>System.out.println(message.getSid());<NEW_LINE>}
("Body", "Late at work. " + finalMessage));
1,116,541
private SolidFireUtil.SolidFireVolume createClone(SolidFireUtil.SolidFireConnection sfConnection, long dataObjectId, VolumeInfo volumeInfo, long sfAccountId, long storagePoolId, DataObjectType dataObjectType) {<NEW_LINE>String sfNewVolumeName = volumeInfo.getName();<NEW_LINE>long sfVolumeId = Long.MIN_VALUE;<NEW_LINE>long sfSnapshotId = Long.MIN_VALUE;<NEW_LINE>if (dataObjectType == DataObjectType.SNAPSHOT) {<NEW_LINE>SnapshotDetailsVO snapshotDetails = snapshotDetailsDao.findDetail(dataObjectId, SolidFireUtil.SNAPSHOT_ID);<NEW_LINE>if (snapshotDetails != null && snapshotDetails.getValue() != null) {<NEW_LINE>sfSnapshotId = Long.parseLong(snapshotDetails.getValue());<NEW_LINE>}<NEW_LINE>snapshotDetails = snapshotDetailsDao.findDetail(dataObjectId, SolidFireUtil.VOLUME_ID);<NEW_LINE>sfVolumeId = Long.parseLong(snapshotDetails.getValue());<NEW_LINE>} else if (dataObjectType == DataObjectType.TEMPLATE) {<NEW_LINE>// get the cached template on this storage<NEW_LINE>VMTemplateStoragePoolVO templatePoolRef = vmTemplatePoolDao.findByPoolTemplate(storagePoolId, dataObjectId, null);<NEW_LINE>if (templatePoolRef != null) {<NEW_LINE>sfVolumeId = Long.parseLong(templatePoolRef.getLocalDownloadPath());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (sfVolumeId <= 0) {<NEW_LINE>throw new CloudRuntimeException("Unable to find SolidFire volume for the following data-object ID: " + dataObjectId + " and data-object type: " + dataObjectType);<NEW_LINE>}<NEW_LINE>final long newSfVolumeId = SolidFireUtil.createClone(sfConnection, sfVolumeId, sfSnapshotId, sfAccountId, SolidFireUtil.getSolidFireVolumeName(sfNewVolumeName), getVolumeAttributes(volumeInfo));<NEW_LINE>final Iops iops = getIops(volumeInfo.getMinIops(), <MASK><NEW_LINE>SolidFireUtil.modifyVolume(sfConnection, newSfVolumeId, null, null, iops.getMinIops(), iops.getMaxIops(), iops.getBurstIops());<NEW_LINE>return SolidFireUtil.getVolume(sfConnection, newSfVolumeId);<NEW_LINE>}
volumeInfo.getMaxIops(), storagePoolId);
165,814
protected void execute(Terminal terminal, OptionSet options, Environment env) throws Exception {<NEW_LINE>String username = parseUsername(arguments.values(options), env.settings());<NEW_LINE>char[] passwordHash = getPasswordHash(terminal, env, passwordOption.value(options));<NEW_LINE>Path file = FileUserPasswdStore.resolveFile(env);<NEW_LINE>FileAttributesChecker attributesChecker = new FileAttributesChecker(file);<NEW_LINE>Map<String, char[]> users = FileUserPasswdStore.parseFile(file, null, env.settings());<NEW_LINE>if (users == null) {<NEW_LINE>throw new UserException(ExitCodes.CONFIG, "Configuration file [" + file + "] is missing");<NEW_LINE>}<NEW_LINE>if (users.containsKey(username) == false) {<NEW_LINE>throw new UserException(ExitCodes.NO_USER, "User [" + username + "] doesn't exist");<NEW_LINE>}<NEW_LINE>// make modifiable<NEW_LINE>users = new HashMap<>(users);<NEW_LINE><MASK><NEW_LINE>FileUserPasswdStore.writeFile(users, file);<NEW_LINE>attributesChecker.check(terminal);<NEW_LINE>}
users.put(username, passwordHash);
812,435
final DeleteCustomRoutingListenerResult executeDeleteCustomRoutingListener(DeleteCustomRoutingListenerRequest deleteCustomRoutingListenerRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteCustomRoutingListenerRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteCustomRoutingListenerRequest> request = null;<NEW_LINE>Response<DeleteCustomRoutingListenerResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteCustomRoutingListenerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteCustomRoutingListenerRequest));<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(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Global Accelerator");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteCustomRoutingListener");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteCustomRoutingListenerResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteCustomRoutingListenerResultJsonUnmarshaller());<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.SIGNING_REGION, getSigningRegion());
1,127,404
public static StarlarkBazelModule create(AbridgedModule module, ModuleExtension extension, RepositoryMapping repoMapping, @Nullable ModuleExtensionUsage usage) throws ExternalDepsException {<NEW_LINE>LabelConverter labelConverter = new LabelConverter(createModuleRootLabel(module.getCanonicalRepoName()), repoMapping);<NEW_LINE>ImmutableList<Tag> tags = usage == null ? ImmutableList.of() : usage.getTags();<NEW_LINE>HashMap<String, ArrayList<TypeCheckedTag>> typeCheckedTags = new HashMap<>();<NEW_LINE>for (String tagClassName : extension.getTagClasses().keySet()) {<NEW_LINE>typeCheckedTags.put(tagClassName, new ArrayList<>());<NEW_LINE>}<NEW_LINE>for (Tag tag : tags) {<NEW_LINE>TagClass tagClass = extension.getTagClasses().get(tag.getTagName());<NEW_LINE>if (tagClass == null) {<NEW_LINE>throw ExternalDepsException.withMessage(Code.BAD_MODULE, "The module extension defined at %s does not have a tag class named %s, but its use is" + " attempted at %s", extension.getLocation(), tag.getTagName(<MASK><NEW_LINE>}<NEW_LINE>// Now we need to type-check the attribute values and convert them into "build language types"<NEW_LINE>// (for example, String to Label).<NEW_LINE>typeCheckedTags.get(tag.getTagName()).add(TypeCheckedTag.create(tagClass, tag, labelConverter));<NEW_LINE>}<NEW_LINE>return new StarlarkBazelModule(module.getName(), module.getVersion().getOriginal(), new Tags(Maps.transformValues(typeCheckedTags, StarlarkList::immutableCopyOf)));<NEW_LINE>}
), tag.getLocation());
1,597,635
public static GetDBTopologyResponse unmarshall(GetDBTopologyResponse getDBTopologyResponse, UnmarshallerContext _ctx) {<NEW_LINE>getDBTopologyResponse.setRequestId<MASK><NEW_LINE>getDBTopologyResponse.setSuccess(_ctx.booleanValue("GetDBTopologyResponse.Success"));<NEW_LINE>getDBTopologyResponse.setErrorMessage(_ctx.stringValue("GetDBTopologyResponse.ErrorMessage"));<NEW_LINE>getDBTopologyResponse.setErrorCode(_ctx.stringValue("GetDBTopologyResponse.ErrorCode"));<NEW_LINE>DBTopology dBTopology = new DBTopology();<NEW_LINE>dBTopology.setLogicDbId(_ctx.longValue("GetDBTopologyResponse.DBTopology.LogicDbId"));<NEW_LINE>dBTopology.setLogicDbName(_ctx.stringValue("GetDBTopologyResponse.DBTopology.LogicDbName"));<NEW_LINE>dBTopology.setSearchName(_ctx.stringValue("GetDBTopologyResponse.DBTopology.SearchName"));<NEW_LINE>dBTopology.setAlias(_ctx.stringValue("GetDBTopologyResponse.DBTopology.Alias"));<NEW_LINE>dBTopology.setDbType(_ctx.stringValue("GetDBTopologyResponse.DBTopology.DbType"));<NEW_LINE>dBTopology.setEnvType(_ctx.stringValue("GetDBTopologyResponse.DBTopology.EnvType"));<NEW_LINE>List<DBTopologyInfo> dBTopologyInfoList = new ArrayList<DBTopologyInfo>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetDBTopologyResponse.DBTopology.DBTopologyInfoList.Length"); i++) {<NEW_LINE>DBTopologyInfo dBTopologyInfo = new DBTopologyInfo();<NEW_LINE>dBTopologyInfo.setDbId(_ctx.longValue("GetDBTopologyResponse.DBTopology.DBTopologyInfoList[" + i + "].DbId"));<NEW_LINE>dBTopologyInfo.setSchemaName(_ctx.stringValue("GetDBTopologyResponse.DBTopology.DBTopologyInfoList[" + i + "].SchemaName"));<NEW_LINE>dBTopologyInfo.setCatalogName(_ctx.stringValue("GetDBTopologyResponse.DBTopology.DBTopologyInfoList[" + i + "].CatalogName"));<NEW_LINE>dBTopologyInfo.setSearchName(_ctx.stringValue("GetDBTopologyResponse.DBTopology.DBTopologyInfoList[" + i + "].SearchName"));<NEW_LINE>dBTopologyInfo.setDbType(_ctx.stringValue("GetDBTopologyResponse.DBTopology.DBTopologyInfoList[" + i + "].DbType"));<NEW_LINE>dBTopologyInfo.setEnvType(_ctx.stringValue("GetDBTopologyResponse.DBTopology.DBTopologyInfoList[" + i + "].EnvType"));<NEW_LINE>dBTopologyInfo.setInstanceId(_ctx.longValue("GetDBTopologyResponse.DBTopology.DBTopologyInfoList[" + i + "].InstanceId"));<NEW_LINE>dBTopologyInfo.setRegionId(_ctx.stringValue("GetDBTopologyResponse.DBTopology.DBTopologyInfoList[" + i + "].RegionId"));<NEW_LINE>dBTopologyInfo.setInstanceResourceId(_ctx.stringValue("GetDBTopologyResponse.DBTopology.DBTopologyInfoList[" + i + "].InstanceResourceId"));<NEW_LINE>dBTopologyInfo.setInstanceSource(_ctx.stringValue("GetDBTopologyResponse.DBTopology.DBTopologyInfoList[" + i + "].InstanceSource"));<NEW_LINE>dBTopologyInfoList.add(dBTopologyInfo);<NEW_LINE>}<NEW_LINE>dBTopology.setDBTopologyInfoList(dBTopologyInfoList);<NEW_LINE>getDBTopologyResponse.setDBTopology(dBTopology);<NEW_LINE>return getDBTopologyResponse;<NEW_LINE>}
(_ctx.stringValue("GetDBTopologyResponse.RequestId"));
823,757
public static String stringForMessageListDate(long date) {<NEW_LINE>try {<NEW_LINE>date *= 1000;<NEW_LINE>Calendar rightNow = Calendar.getInstance();<NEW_LINE>int day = <MASK><NEW_LINE>rightNow.setTimeInMillis(date);<NEW_LINE>int dateDay = rightNow.get(Calendar.DAY_OF_YEAR);<NEW_LINE>if (Math.abs(System.currentTimeMillis() - date) >= 31536000000L) {<NEW_LINE>return getInstance().formatterYear.format(new Date(date));<NEW_LINE>} else {<NEW_LINE>int dayDiff = dateDay - day;<NEW_LINE>if (dayDiff == 0 || dayDiff == -1 && System.currentTimeMillis() - date < 60 * 60 * 8 * 1000) {<NEW_LINE>return getInstance().formatterDay.format(new Date(date));<NEW_LINE>} else if (dayDiff > -7 && dayDiff <= -1) {<NEW_LINE>return getInstance().formatterWeek.format(new Date(date));<NEW_LINE>} else {<NEW_LINE>return getInstance().formatterDayMonth.format(new Date(date));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>FileLog.e(e);<NEW_LINE>}<NEW_LINE>return "LOC_ERR";<NEW_LINE>}
rightNow.get(Calendar.DAY_OF_YEAR);
1,115,271
public void doText(SubmissionViewHolder holder, Submission submission, Context mContext, String baseSub, boolean full) {<NEW_LINE>SpannableStringBuilder t = SubmissionCache.getTitleLine(submission, mContext);<NEW_LINE>SpannableStringBuilder l = SubmissionCache.getInfoLine(submission, mContext, baseSub);<NEW_LINE>SpannableStringBuilder c = SubmissionCache.getCrosspostLine(submission, mContext);<NEW_LINE>int[] textSizeAttr = new int[] { R.attr.font_cardtitle, R.attr.font_cardinfo };<NEW_LINE>TypedArray a = mContext.obtainStyledAttributes(textSizeAttr);<NEW_LINE>int textSizeT = a.getDimensionPixelSize(0, 18);<NEW_LINE>int textSizeI = <MASK><NEW_LINE>t.setSpan(new AbsoluteSizeSpan(textSizeT), 0, t.length(), 0);<NEW_LINE>l.setSpan(new AbsoluteSizeSpan(textSizeI), 0, l.length(), 0);<NEW_LINE>SpannableStringBuilder s = new SpannableStringBuilder();<NEW_LINE>if (SettingValues.titleTop) {<NEW_LINE>s.append(t);<NEW_LINE>s.append("\n");<NEW_LINE>s.append(l);<NEW_LINE>} else {<NEW_LINE>s.append(l);<NEW_LINE>s.append("\n");<NEW_LINE>s.append(t);<NEW_LINE>}<NEW_LINE>if (!full && c != null) {<NEW_LINE>c.setSpan(new AbsoluteSizeSpan(textSizeI), 0, c.length(), 0);<NEW_LINE>s.append("\n");<NEW_LINE>s.append(c);<NEW_LINE>}<NEW_LINE>a.recycle();<NEW_LINE>holder.title.setText(s);<NEW_LINE>}
a.getDimensionPixelSize(1, 14);
264,232
public static boolean saveFile(File file, String[] lines, boolean append) {<NEW_LINE>boolean error = false;<NEW_LINE>if (file != null && lines != null && lines.length > 0) {<NEW_LINE>BufferedWriter bw = null;<NEW_LINE>try {<NEW_LINE>bw = new BufferedWriter(<MASK><NEW_LINE>// Add new line before appending.<NEW_LINE>if (append) {<NEW_LINE>bw.newLine();<NEW_LINE>}<NEW_LINE>int i;<NEW_LINE>for (i = 0; i < lines.length - 1; i++) {<NEW_LINE>bw.write(lines[i]);<NEW_LINE>bw.newLine();<NEW_LINE>}<NEW_LINE>bw.write(lines[i]);<NEW_LINE>} catch (IOException | NullPointerException ex) {<NEW_LINE>Log.e(LOG_TAG, "Error while writing to '" + file.getName() + "' file.", ex);<NEW_LINE>error = true;<NEW_LINE>} finally {<NEW_LINE>if (bw != null) {<NEW_LINE>try {<NEW_LINE>bw.close();<NEW_LINE>} catch (IOException e) {<NEW_LINE>Log.e(LOG_TAG, "Error while closing file.", e);<NEW_LINE>error = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>error = true;<NEW_LINE>}<NEW_LINE>return !error;<NEW_LINE>}
new FileWriter(file, append));
8,780
public boolean visit(TypeDeclaration node) {<NEW_LINE>if (this.tm.isFake(node))<NEW_LINE>return true;<NEW_LINE>handleToken(node.getName(<MASK><NEW_LINE>List<TypeParameter> typeParameters = node.typeParameters();<NEW_LINE>handleTypeParameters(typeParameters);<NEW_LINE>if (!node.isInterface() && !node.superInterfaceTypes().isEmpty()) {<NEW_LINE>// fix for: class A<E> extends ArrayList<String>implements Callable<String><NEW_LINE>handleToken(node.getName(), TokenNameimplements, true, false);<NEW_LINE>}<NEW_LINE>handleToken(node.getName(), TokenNameLBRACE, this.options.insert_space_before_opening_brace_in_type_declaration, false);<NEW_LINE>handleCommas(node.superInterfaceTypes(), this.options.insert_space_before_comma_in_superinterfaces, this.options.insert_space_after_comma_in_superinterfaces);<NEW_LINE>return true;<NEW_LINE>}
), TokenNameIdentifier, true, false);
1,049,376
// ***********************************************************************************<NEW_LINE>// METHODS<NEW_LINE>// ***********************************************************************************<NEW_LINE>@Override<NEW_LINE>public void propagate(int evtmask) throws ContradictionException {<NEW_LINE>for (int i = 0; i < nInts; i++) {<NEW_LINE>ints[i].updateBounds(offSet1, <MASK><NEW_LINE>}<NEW_LINE>for (int i = 0; i < nInts; i++) {<NEW_LINE>int ub = ints[i].getUB();<NEW_LINE>for (int j = ints[i].getLB(); j <= ub; j = ints[i].nextValue(j)) {<NEW_LINE>if (!sets[j - offSet1].getUB().contains(i + offSet2)) {<NEW_LINE>ints[i].removeValue(j, this);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (ints[i].isInstantiated()) {<NEW_LINE>sets[ints[i].getValue() - offSet1].force(i + offSet2, this);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int i = 0; i < nSets; i++) {<NEW_LINE>ISetIterator iter = sets[i].getUB().iterator();<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>int j = iter.nextInt();<NEW_LINE>if (j < offSet2 || j > nInts - 1 + offSet2 || !ints[j - offSet2].contains(i + offSet1)) {<NEW_LINE>sets[i].remove(j, this);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>iter = sets[i].getLB().iterator();<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>ints[iter.nextInt() - offSet2].instantiateTo(i + offSet1, this);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int i = 0; i < nSets; i++) {<NEW_LINE>sdm[i].startMonitoring();<NEW_LINE>}<NEW_LINE>for (int i = 0; i < nInts; i++) {<NEW_LINE>idm[i].startMonitoring();<NEW_LINE>}<NEW_LINE>}
nSets - 1 + offSet1, this);
344,073
// visible for testing<NEW_LINE>static String toJavaVersionString(int[] version) {<NEW_LINE>final StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(version[0]).append('.');<NEW_LINE>sb.append(version[<MASK><NEW_LINE>sb.append(version[2]);<NEW_LINE>if (version.length > 3 && version[3] > 0)<NEW_LINE>sb.append('_').append(version[3]);<NEW_LINE>if (version.length > 4 && version[4] != 0) {<NEW_LINE>final String pre;<NEW_LINE>switch(version[4]) {<NEW_LINE>case -1:<NEW_LINE>pre = "rc";<NEW_LINE>break;<NEW_LINE>case -2:<NEW_LINE>pre = "beta";<NEW_LINE>break;<NEW_LINE>case -3:<NEW_LINE>pre = "ea";<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>pre = "?";<NEW_LINE>}<NEW_LINE>sb.append('-').append(pre);<NEW_LINE>}<NEW_LINE>return sb.toString();<NEW_LINE>}
1]).append('.');
1,689,846
/* This function picks up itemsets that have enough outlier support and risk ratio in the current pane<NEW_LINE>* (a.k.a. itemsets that can be promoted) and starts tracking their occurrences in the window.<NEW_LINE>*<NEW_LINE>* Variables affected:<NEW_LINE>* - trackingMap: record that we start tracking new frequent itemsets in this pane<NEW_LINE>* - outlierItemsetPaneCount, inlierItemsetPaneCount, outlierItemsetWindowCount, inlierItemsetWindowCount:<NEW_LINE>* add new frequent itemset counts<NEW_LINE>*/<NEW_LINE>private void addNewFrequent() {<NEW_LINE>// Return when the outlier population is too small, otherwise all<NEW_LINE>// outlying combos in the current pane might get tracked<NEW_LINE>if (minOutlierSupport * outlierItemsets.size() < 1) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>double minSupport = Math.ceil(minOutlierSupport * outlierItemsets.size());<NEW_LINE>HashMap<Integer, Double> inlierPaneSingletonCount = new ExactCount().count(inlierItemsets).getCounts();<NEW_LINE>// Get new frequent itemsets in outliers<NEW_LINE>FPGrowth fpGrowth = new FPGrowth();<NEW_LINE>List<ItemsetWithCount> frequent = fpGrowth.getItemsetsWithSupportCount(outlierItemsets, minSupport);<NEW_LINE>List<ItemsetWithCount> newFrequent = new ArrayList<>();<NEW_LINE>for (ItemsetWithCount iwc : frequent) {<NEW_LINE>Set<Integer> itemset = iwc.getItems();<NEW_LINE>if (!outlierItemsetWindowCount.containsKey(itemset)) {<NEW_LINE>newFrequent.add(iwc);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Get support in the inlier transactions<NEW_LINE>List<ItemsetWithCount> newFrequentInlierCounts = fpGrowth.getCounts(inlierItemsets, inlierPaneSingletonCount, inlierPaneSingletonCount.keySet(), newFrequent);<NEW_LINE>for (int i = 0; i < newFrequent.size(); i++) {<NEW_LINE>ItemsetWithCount iiwc = newFrequentInlierCounts.get(i);<NEW_LINE>ItemsetWithCount oiwc = newFrequent.get(i);<NEW_LINE>double exposedInlierCount = iiwc.getCount();<NEW_LINE>double exposedOutlierCount = oiwc.getCount();<NEW_LINE>double rr = RiskRatio.compute(exposedInlierCount, exposedOutlierCount, inlierItemsets.size(), outlierItemsets.size());<NEW_LINE>if (rr >= minRiskRatio) {<NEW_LINE>Set<Integer<MASK><NEW_LINE>trackItemset(itemset, exposedOutlierCount, exposedInlierCount);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
> itemset = iiwc.getItems();
717,169
public void marshall(ReplicationSet replicationSet, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (replicationSet == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(replicationSet.getCreatedBy(), CREATEDBY_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationSet.getCreatedTime(), CREATEDTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationSet.getDeletionProtected(), DELETIONPROTECTED_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationSet.getLastModifiedBy(), LASTMODIFIEDBY_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationSet.getLastModifiedTime(), LASTMODIFIEDTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationSet.getRegionMap(), REGIONMAP_BINDING);<NEW_LINE>protocolMarshaller.marshall(replicationSet.getStatus(), STATUS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
replicationSet.getArn(), ARN_BINDING);
256,901
private List<PHPDocVarTypeTag> findMethodParams(String description, int startOfDescription) {<NEW_LINE>List<PHPDocVarTypeTag> result = new ArrayList();<NEW_LINE>int position = startOfDescription;<NEW_LINE>ParametersExtractor parametersExtractor = ParametersExtractorImpl.create();<NEW_LINE>String parameters = parametersExtractor.extract(description);<NEW_LINE>position += parametersExtractor.getPosition();<NEW_LINE>if (parameters.length() > 0) {<NEW_LINE>// NOI18N<NEW_LINE>String[] tokens = parameters.split("[,]+");<NEW_LINE>String paramName;<NEW_LINE>for (String token : tokens) {<NEW_LINE>paramName = getVaribleName(token.trim());<NEW_LINE>if (paramName != null) {<NEW_LINE>int startOfParamName = findStartOfDocNode(<MASK><NEW_LINE>if (startOfParamName != -1) {<NEW_LINE>PHPDocNode paramNameNode = new PHPDocNode(startOfParamName, startOfParamName + paramName.length(), paramName);<NEW_LINE>List<PHPDocTypeNode> types = token.trim().indexOf(' ') > -1 ? findTypes(token, position, description, startOfDescription) : Collections.EMPTY_LIST;<NEW_LINE>result.add(new PHPDocVarTypeTag(position, startOfParamName + paramName.length(), PHPDocTag.Type.PARAM, token, types, paramNameNode));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>position = position + token.length() + 1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
description, startOfDescription, paramName, position);
501,428
public void registerScriptPlugin(String type, String objectId) {<NEW_LINE>ScriptObject <MASK><NEW_LINE>if (object == null) {<NEW_LINE>object = new ScriptObject(objectId, this);<NEW_LINE>mObjects.put(objectId, object);<NEW_LINE>}<NEW_LINE>switch(type) {<NEW_LINE>case ScriptObject.TYPE_RESOLVER:<NEW_LINE>mResolverPluginFactory.registerPlugin(object, this);<NEW_LINE>PipeLine.get().onPluginLoaded(this);<NEW_LINE>break;<NEW_LINE>case ScriptObject.TYPE_COLLECTION:<NEW_LINE>mCollectionPluginFactory.registerPlugin(object, this);<NEW_LINE>break;<NEW_LINE>case ScriptObject.TYPE_INFOPLUGIN:<NEW_LINE>mInfoPluginFactory.registerPlugin(object, this);<NEW_LINE>break;<NEW_LINE>case ScriptObject.TYPE_CHARTSPROVIDER:<NEW_LINE>mChartsProviderPluginFactory.registerPlugin(object, this);<NEW_LINE>break;<NEW_LINE>case ScriptObject.TYPE_PLAYLISTGENERATOR:<NEW_LINE>mPlaylistGeneratorFactory.registerPlugin(object, this);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>Log.e(TAG, "registerScriptPlugin - ScriptAccount:" + mName + ", ScriptPlugin type not supported!");<NEW_LINE>}<NEW_LINE>}
object = mObjects.get(objectId);
1,682,409
public Iterable<WindowedValue<InputT>> processElementInReadyWindows(WindowedValue<InputT> elem) {<NEW_LINE>if (views.isEmpty()) {<NEW_LINE>// When there are no side inputs, we can preserve the compressed representation.<NEW_LINE>underlying.processElement(elem);<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>ImmutableList.Builder<WindowedValue<InputT><MASK><NEW_LINE>for (WindowedValue<InputT> windowElem : elem.explodeWindows()) {<NEW_LINE>BoundedWindow mainInputWindow = Iterables.getOnlyElement(windowElem.getWindows());<NEW_LINE>if (isReady(mainInputWindow)) {<NEW_LINE>// When there are any side inputs, we have to process the element in each window<NEW_LINE>// individually, to disambiguate access to per-window side inputs.<NEW_LINE>underlying.processElement(windowElem);<NEW_LINE>} else {<NEW_LINE>notReadyWindows.add(mainInputWindow);<NEW_LINE>pushedBack.add(windowElem);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return pushedBack.build();<NEW_LINE>}
> pushedBack = ImmutableList.builder();
526,818
protected void trainModel() throws LibrecException {<NEW_LINE>for (int iter = 1; iter <= numIterations; iter++) {<NEW_LINE>loss = 0.0d;<NEW_LINE>for (MatrixEntry matrixEntry : trainMatrix) {<NEW_LINE>// user userIdx<NEW_LINE>int userIdx = matrixEntry.row();<NEW_LINE>// item itemIdx<NEW_LINE>int itemIdx = matrixEntry.column();<NEW_LINE>// real rating on item itemIdx rated by user userIdx<NEW_LINE>double realRating = matrixEntry.get();<NEW_LINE>double <MASK><NEW_LINE>double error = realRating - predictRating;<NEW_LINE>loss += error * error;<NEW_LINE>// update user and item bias<NEW_LINE>double userBiasValue = userBiases.get(userIdx);<NEW_LINE>userBiases.plus(userIdx, learnRate * (error - regBias * userBiasValue));<NEW_LINE>loss += regBias * userBiasValue * userBiasValue;<NEW_LINE>double itemBiasValue = itemBiases.get(itemIdx);<NEW_LINE>itemBiases.plus(itemIdx, learnRate * (error - regBias * itemBiasValue));<NEW_LINE>loss += regBias * itemBiasValue * itemBiasValue;<NEW_LINE>// update user and item factors<NEW_LINE>for (int factorIdx = 0; factorIdx < numFactors; factorIdx++) {<NEW_LINE>double userFactorValue = userFactors.get(userIdx, factorIdx);<NEW_LINE>double itemFactorValue = itemFactors.get(itemIdx, factorIdx);<NEW_LINE>userFactors.plus(userIdx, factorIdx, learnRate * (error * itemFactorValue - regUser * userFactorValue));<NEW_LINE>itemFactors.plus(itemIdx, factorIdx, learnRate * (error * userFactorValue - regItem * itemFactorValue));<NEW_LINE>loss += regUser * userFactorValue * userFactorValue + regItem * itemFactorValue * itemFactorValue;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>loss *= 0.5d;<NEW_LINE>if (isConverged(iter) && earlyStop) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>updateLRate(iter);<NEW_LINE>}<NEW_LINE>}
predictRating = predict(userIdx, itemIdx);
1,317,297
public void actionPerformed(@Nonnull AnActionEvent e) {<NEW_LINE>Project project = <MASK><NEW_LINE>VcsLogDataPack dataPack = myFilterModel.getDataPack();<NEW_LINE>VcsLogFileFilter filter = myFilterModel.getFilter();<NEW_LINE>Collection<VirtualFile> files;<NEW_LINE>if (filter == null || filter.getStructureFilter() == null) {<NEW_LINE>files = Collections.emptySet();<NEW_LINE>} else {<NEW_LINE>files = ContainerUtil.mapNotNull(filter.getStructureFilter().getFiles(), filePath -> {<NEW_LINE>// for now, ignoring non-existing paths<NEW_LINE>return filePath.getVirtualFile();<NEW_LINE>});<NEW_LINE>}<NEW_LINE>VcsStructureChooser chooser = new VcsStructureChooser(project, "Select Files or Folders to Filter by", files, new ArrayList<>(dataPack.getLogProviders().keySet()));<NEW_LINE>if (chooser.showAndGet()) {<NEW_LINE>VcsLogStructureFilterImpl structureFilter = new VcsLogStructureFilterImpl(new HashSet<VirtualFile>(chooser.getSelectedFiles()));<NEW_LINE>myFilterModel.setFilter(new VcsLogFileFilter(structureFilter, null));<NEW_LINE>myHistory.add(structureFilter);<NEW_LINE>}<NEW_LINE>}
e.getRequiredData(CommonDataKeys.PROJECT);
1,106,750
public R visit(final CompilationUnit n, final A arg) {<NEW_LINE>R result;<NEW_LINE>{<NEW_LINE>result = n.getImports().accept(this, arg);<NEW_LINE>if (result != null)<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>if (n.getModule().isPresent()) {<NEW_LINE>result = n.getModule().get(<MASK><NEW_LINE>if (result != null)<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>if (n.getPackageDeclaration().isPresent()) {<NEW_LINE>result = n.getPackageDeclaration().get().accept(this, arg);<NEW_LINE>if (result != null)<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>{<NEW_LINE>result = n.getTypes().accept(this, arg);<NEW_LINE>if (result != null)<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>if (n.getComment().isPresent()) {<NEW_LINE>result = n.getComment().get().accept(this, arg);<NEW_LINE>if (result != null)<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
).accept(this, arg);