content
stringlengths
40
137k
"public static boolean rename(File src, String newName) {\n if (src == null || newName == null)\n return false;\n if (src.exists()) {\n File newFile = new File(src.getParent() + \"String_Node_Str\" + newName);\n if (newFile.exists())\n return false;\n Files.makeDir(newFile.getParentFile());\n return src.renameTo(newFile);\n }\n return false;\n}\n"
"public void testPassThroughCacheMergePolicy() {\n String cacheName = randomMapName();\n Config config = newConfig();\n HazelcastInstance h1 = Hazelcast.newHazelcastInstance(config);\n HazelcastInstance h2 = Hazelcast.newHazelcastInstance(config);\n TestMemberShipListener memberShipListener = new TestMemberShipListener(1);\n h2.getCluster().addMembershipListener(memberShipListener);\n CountDownLatch mergeBlockingLatch = new CountDownLatch(1);\n TestLifeCycleListener lifeCycleListener = new TestLifeCycleListener(1, mergeBlockingLatch);\n h2.getLifecycleService().addLifecycleListener(lifeCycleListener);\n closeConnectionBetween(h1, h2);\n assertOpenEventually(memberShipListener.latch);\n assertClusterSizeEventually(1, h1);\n assertClusterSizeEventually(1, h2);\n CachingProvider cachingProvider1 = HazelcastServerCachingProvider.createCachingProvider(h1);\n CachingProvider cachingProvider2 = HazelcastServerCachingProvider.createCachingProvider(h2);\n CacheManager cacheManager1 = cachingProvider1.getCacheManager();\n CacheManager cacheManager2 = cachingProvider2.getCacheManager();\n CacheConfig cacheConfig = newCacheConfig(cacheName, PassThroughCacheMergePolicy.class.getName());\n Cache cache1 = cacheManager1.createCache(cacheName, cacheConfig);\n Cache cache2 = cacheManager2.createCache(cacheName, cacheConfig);\n String key = generateKeyOwnedBy(h1);\n cache1.put(key, \"String_Node_Str\");\n cache2.put(key, \"String_Node_Str\");\n assertOpenEventually(lifeCycleListener.latch);\n assertClusterSizeEventually(2, h1);\n assertClusterSizeEventually(2, h2);\n Cache cacheTest = cacheManager2.getCache(cacheName);\n assertEquals(\"String_Node_Str\", cacheTest.get(key));\n}\n"
"protected static void initializeAndStartService(CConfiguration cConf) throws Exception {\n injector = Guice.createInjector(new ConfigModule(cConf), new DiscoveryRuntimeModule().getInMemoryModules(), new NonCustomLocationUnitTestModule().getModule(), new NamespaceClientRuntimeModule().getInMemoryModules(), new SystemDatasetRuntimeModule().getInMemoryModules(), new TransactionInMemoryModule(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AuthenticationContextModules().getMasterModule(), new AbstractModule() {\n protected void configure() {\n bind(MetricsCollectionService.class).to(NoOpMetricsCollectionService.class).in(Singleton.class);\n install(new FactoryModuleBuilder().implement(DatasetDefinitionRegistry.class, DefaultDatasetDefinitionRegistry.class).build(DatasetDefinitionRegistryFactory.class));\n bind(RemoteDatasetFramework.class);\n }\n });\n AuthorizationEnforcer authEnforcer = injector.getInstance(AuthorizationEnforcer.class);\n authEnforcementService = injector.getInstance(AuthorizationEnforcementService.class);\n authEnforcementService.startAndWait();\n AuthenticationContext authenticationContext = injector.getInstance(AuthenticationContext.class);\n DiscoveryService discoveryService = injector.getInstance(DiscoveryService.class);\n discoveryServiceClient = injector.getInstance(DiscoveryServiceClient.class);\n dsFramework = injector.getInstance(RemoteDatasetFramework.class);\n txManager = injector.getInstance(TransactionManager.class);\n txManager.startAndWait();\n TransactionSystemClient txSystemClient = injector.getInstance(TransactionSystemClient.class);\n TransactionSystemClientService txSystemClientService = new DelegatingTransactionSystemClientService(txSystemClient);\n NamespacedLocationFactory namespacedLocationFactory = injector.getInstance(NamespacedLocationFactory.class);\n SystemDatasetInstantiatorFactory datasetInstantiatorFactory = new SystemDatasetInstantiatorFactory(locationFactory, dsFramework, cConf);\n Impersonator impersonator = new DefaultImpersonator(cConf, null, null);\n DatasetAdminService datasetAdminService = new DatasetAdminService(dsFramework, cConf, locationFactory, datasetInstantiatorFactory, new NoOpMetadataStore(), impersonator);\n ImmutableSet<HttpHandler> handlers = ImmutableSet.<HttpHandler>of(new DatasetAdminOpHTTPHandler(datasetAdminService));\n MetricsCollectionService metricsCollectionService = injector.getInstance(MetricsCollectionService.class);\n opExecutorService = new DatasetOpExecutorService(cConf, discoveryService, metricsCollectionService, handlers);\n opExecutorService.startAndWait();\n Map<String, DatasetModule> defaultModules = injector.getInstance(Key.get(new TypeLiteral<Map<String, DatasetModule>>() {\n }, Names.named(\"String_Node_Str\")));\n ImmutableMap<String, DatasetModule> modules = ImmutableMap.<String, DatasetModule>builder().putAll(defaultModules).putAll(DatasetMetaTableUtil.getModules()).build();\n registryFactory = injector.getInstance(DatasetDefinitionRegistryFactory.class);\n inMemoryDatasetFramework = new InMemoryDatasetFramework(registryFactory, modules);\n DiscoveryExploreClient exploreClient = new DiscoveryExploreClient(discoveryServiceClient, authenticationContext);\n ExploreFacade exploreFacade = new ExploreFacade(exploreClient, cConf);\n namespaceAdmin = injector.getInstance(NamespaceAdmin.class);\n namespaceAdmin.create(NamespaceMeta.DEFAULT);\n NamespaceQueryAdmin namespaceQueryAdmin = injector.getInstance(NamespaceQueryAdmin.class);\n TransactionExecutorFactory txExecutorFactory = new DynamicTransactionExecutorFactory(txSystemClient);\n DatasetTypeManager typeManager = new DatasetTypeManager(cConf, locationFactory, txSystemClientService, txExecutorFactory, inMemoryDatasetFramework, impersonator);\n DatasetOpExecutor opExecutor = new InMemoryDatasetOpExecutor(dsFramework);\n DatasetInstanceManager instanceManager = new DatasetInstanceManager(txSystemClientService, txExecutorFactory, inMemoryDatasetFramework);\n PrivilegesManager privilegesManager = injector.getInstance(PrivilegesManager.class);\n DatasetTypeService typeService = new DatasetTypeService(typeManager, namespaceAdmin, namespacedLocationFactory, authEnforcer, privilegesManager, authenticationContext, cConf, impersonator, txSystemClientService, inMemoryDatasetFramework, txExecutorFactory, defaultModules);\n instanceService = new DatasetInstanceService(typeService, instanceManager, opExecutor, exploreFacade, namespaceQueryAdmin, authEnforcer, privilegesManager, authenticationContext);\n service = new DatasetService(cConf, discoveryService, discoveryServiceClient, metricsCollectionService, opExecutor, new HashSet<DatasetMetricsReporter>(), typeService, instanceService);\n service.startAndWait();\n waitForService(Constants.Service.DATASET_EXECUTOR);\n waitForService(Constants.Service.DATASET_MANAGER);\n Locations.mkdirsIfNotExists(namespacedLocationFactory.get(Id.Namespace.DEFAULT));\n}\n"
"public void setRenditionKindMapping(Map<String, List<String>> renditionKinds) {\n this.kindToThumbnailNames = renditionKinds;\n for (Entry<String, List<String>> entry : renditionKinds.entrySet()) {\n CMISRenditionKind kind = CMISRenditionKind.valueOfLabel(entry.getKey());\n for (String thumbnailName : entry.getValue()) {\n thumbnailNamesToKind.put(thumbnailName, kind);\n }\n }\n}\n"
"public Shell createWindow(final Display display) {\n Shell activeShell = display.getActiveShell();\n int style = SWT.DIALOG_TRIM | SWT.MIN | SWT.MAX | SWT.RESIZE;\n if (activeShell == null) {\n mapperShell = new Shell(mapperShell, style);\n } else {\n mapperShell = new Shell(activeShell, style);\n }\n mapperShell.addShellListener(new ShellListener() {\n public void shellActivated(ShellEvent e) {\n }\n public void shellClosed(ShellEvent e) {\n if (editor != null && editor.isDirty() && !closeWithoutPrompt) {\n boolean closeWindow = MessageDialog.openConfirm(mapperShell, \"String_Node_Str\", Messages.getString(\"String_Node_Str\"));\n if (!closeWindow) {\n e.doit = false;\n } else {\n prepareClosing(SWT.CANCEL);\n }\n }\n }\n public void shellDeactivated(ShellEvent e) {\n }\n public void shellDeiconified(ShellEvent e) {\n }\n public void shellIconified(ShellEvent e) {\n }\n });\n mapperShell.setMaximized(true);\n mapperShell.setImage(CoreImageProvider.getComponentIcon(mapperComponent.getComponent(), ICON_SIZE.ICON_32));\n IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault().getService(IBrandingService.class);\n String productName = brandingService.getFullProductName();\n mapperShell.setText(productName + \"String_Node_Str\" + mapperComponent.getComponent().getName() + \"String_Node_Str\" + mapperComponent.getUniqueName());\n GridLayout parentLayout = new GridLayout(1, true);\n mapperShell.setLayout(parentLayout);\n mainSashForm = new SashForm(mapperShell, SWT.SMOOTH | SWT.VERTICAL);\n GridData mainSashFormGridData = new GridData(GridData.FILL_BOTH);\n mainSashForm.setLayoutData(mainSashFormGridData);\n datasViewSashForm = new SashForm(mainSashForm, SWT.SMOOTH | SWT.HORIZONTAL | SWT.BORDER);\n editor = new XmlMapEditor(mapperManager);\n editor.createPartControl(datasViewSashForm);\n if (copyOfMapData.getVarTables().isEmpty()) {\n VarTable varTable1 = XmlmapFactory.eINSTANCE.createVarTable();\n varTable1.setName(\"String_Node_Str\");\n varTable1.setMinimized(true);\n copyOfMapData.getVarTables().add(varTable1);\n }\n editor.setContent(copyOfMapData);\n tabFolderEditors = new TabFolderEditors(mainSashForm, mapperManager, SWT.BORDER);\n mainSashForm.setWeights(new int[] { 70, 30 });\n footerComposite = new FooterComposite(mapperShell, this);\n footerComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n mapperShell.addDisposeListener(new DisposeListener() {\n public void widgetDisposed(DisposeEvent e) {\n ColorProviderMapper.releaseColors();\n FontProviderMapper.releaseFonts();\n ImageProviderMapper.releaseImages();\n }\n });\n editor.makeDefaultSelection();\n mapperShell.open();\n return mapperShell;\n}\n"
"public void onPersonSelected(Person person) {\n PersonDetailFragment personDetailFragment = getDetailFragment();\n long personID = person.getPersonID();\n int localTableBlogID = person.getLocalTableBlogId();\n boolean isFollower = person.isFollower();\n boolean isViewer = person.isViewer();\n if (personDetailFragment == null) {\n personDetailFragment = PersonDetailFragment.newInstance(personID, localTableBlogID);\n } else {\n personDetailFragment.setPersonDetails(personID, localTableBlogID);\n }\n if (!personDetailFragment.isAdded()) {\n AnalyticsUtils.trackWithCurrentBlogDetails(AnalyticsTracker.Stat.OPENED_PERSON);\n FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.fragment_container, personDetailFragment, KEY_PERSON_DETAIL_FRAGMENT);\n fragmentTransaction.addToBackStack(null);\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.setTitle(\"String_Node_Str\");\n }\n removeToolbarElevation();\n fragmentTransaction.commit();\n }\n}\n"
"public TableCell<Profile.PairLogoRelativeRectangle, Boolean> call(TableColumn<Profile.PairLogoRelativeRectangle, Boolean> p) {\n return new LogoButtonCell(imageHandler, logoList, pservice, windowManager.getStage(), selectedProfile.getId(), previewLogo, txLogoName);\n}\n"
"public void startRequest(MRCRequest rq) {\n try {\n final openRequest rqArgs = (openRequest) rq.getRequestArgs();\n final VolumeManager vMan = master.getVolumeManager();\n final FileAccessManager faMan = master.getFileAccessManager();\n Path p = new Path(rqArgs.getPath());\n VolumeInfo volume = vMan.getVolumeByName(p.getComp(0));\n StorageManager sMan = vMan.getStorageManager(volume.getId());\n PathResolver res = new PathResolver(sMan, p);\n faMan.checkSearchPermission(sMan, res, rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n AtomicDBUpdate update = sMan.createAtomicDBUpdate(master, rq);\n FileMetadata file = null;\n try {\n res.checkIfFileDoesNotExist();\n if ((rqArgs.getFlags() & FileAccessManager.O_CREAT) != 0 && (rqArgs.getFlags() & FileAccessManager.O_EXCL) != 0)\n res.checkIfFileExistsAlready();\n file = res.getFile();\n String target = sMan.getSoftlinkTarget(file.getId());\n if (target != null) {\n rqArgs.setPath(target);\n p = new Path(target);\n if (!vMan.hasVolume(p.getComp(0))) {\n finishRequest(rq, new ErrorRecord(ErrorClass.USER_EXCEPTION, ErrNo.ENOENT, \"String_Node_Str\" + target + \"String_Node_Str\"));\n return;\n }\n volume = vMan.getVolumeByName(p.getComp(0));\n sMan = vMan.getStorageManager(volume.getId());\n res = new PathResolver(sMan, p);\n file = res.getFile();\n }\n if (file.isDirectory())\n throw new UserException(ErrNo.EISDIR, \"String_Node_Str\");\n if (file.isReadOnly() && ((rqArgs.getFlags() & (FileAccessManager.O_RDWR | FileAccessManager.O_WRONLY | FileAccessManager.O_TRUNC | FileAccessManager.O_APPEND)) != 0))\n throw new UserException(ErrNo.EPERM, \"String_Node_Str\");\n faMan.checkPermission(rqArgs.getFlags(), sMan, file, res.getParentDirId(), rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n } catch (UserException exc) {\n if (exc.getErrno() == ErrNo.ENOENT && (rqArgs.getFlags() & FileAccessManager.O_CREAT) != 0) {\n faMan.checkPermission(FileAccessManager.O_WRONLY, sMan, res.getParentDir(), res.getParentsParentId(), rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n long fileId = sMan.getNextFileId();\n int time = (int) (TimeSync.getGlobalTime() / 1000);\n file = sMan.createFile(fileId, res.getParentDirId(), res.getFileName(), time, time, time, rq.getDetails().userId, rq.getDetails().groupIds.get(0), rqArgs.getMode(), rqArgs.getAttributes(), 0, false, 0, 0, update);\n sMan.setLastFileId(fileId, update);\n } else\n throw exc;\n }\n int trEpoch = file.getEpoch();\n if ((rqArgs.getFlags() & FileAccessManager.O_TRUNC) != 0) {\n file.setIssuedEpoch(file.getIssuedEpoch() + 1);\n trEpoch = file.getIssuedEpoch();\n sMan.setMetadata(file, FileMetadata.RC_METADATA, update);\n }\n XLocList xLocList = file.getXLocList();\n XLocSet xLocSet = null;\n if (xLocList == null || xLocList.getReplicaCount() == 0) {\n Replica replica = MRCHelper.createReplica(null, sMan, master.getOSDStatusManager(), volume, res.getParentDirId(), rqArgs.getPath(), ((InetSocketAddress) rq.getRPCRequest().getClientIdentity()).getAddress());\n ReplicaSet replicas = new ReplicaSet();\n replicas.add(replica);\n xLocSet = new XLocSet(replicas, 0, file.isReadOnly() ? Constants.REPL_UPDATE_PC_RONLY : Constants.REPL_UPDATE_PC_NONE, 0);\n file.setXLocList(Converter.xLocSetToXLocList(sMan, xLocSet));\n sMan.setMetadata(file, FileMetadata.XLOC_METADATA, update);\n } else {\n xLocSet = Converter.xLocListToXLocSet(xLocList);\n Capability cap = new Capability(volume.getId() + \"String_Node_Str\" + file.getId(), rqArgs.getFlags(), TimeSync.getGlobalTime() / 1000 + Capability.DEFAULT_VALIDITY, ((InetSocketAddress) rq.getRPCRequest().getClientIdentity()).getAddress().getHostAddress(), trEpoch, master.getConfig().getCapabilitySecret());\n MRCHelper.updateFileTimes(res.getParentsParentId(), file, !master.getConfig().isNoAtime(), true, true, sMan, update);\n MRCHelper.updateFileTimes(res.getParentsParentId(), res.getParentDir(), false, true, true, sMan, update);\n if (!master.getConfig().isNoAtime())\n MRCHelper.updateFileTimes(res.getParentsParentId(), res.getParentDir(), true, false, false, sMan, update);\n rq.setResponse(new openResponse(new FileCredentials(xLocSet, cap.getXCap())));\n update.execute();\n } catch (UserException exc) {\n Logging.logMessage(Logging.LEVEL_TRACE, this, exc);\n finishRequest(rq, new ErrorRecord(ErrorClass.USER_EXCEPTION, exc.getErrno(), exc.getMessage(), exc));\n } catch (Throwable exc) {\n finishRequest(rq, new ErrorRecord(ErrorClass.INTERNAL_SERVER_ERROR, \"String_Node_Str\", exc));\n }\n}\n"
"public void testCreateModel() throws MLHttpClientException, IOException {\n createModel(analysisId, versionSetId);\n}\n"
"private void fixLongJumps(List<BuilderInstruction> instructions, LabelAssigner labelAssigner, StmtVisitor stmtV) {\n boolean hasChanged;\n l0: do {\n hasChanged = false;\n Map<Label, Integer> labelToInsOffset = new HashMap<Label, Integer>();\n for (int i = 0; i < instructions.size(); i++) {\n BuilderInstruction bi = instructions.get(i);\n Stmt origStmt = stmtV.getStmtForInstruction(bi);\n if (origStmt != null) {\n Label lbl = labelAssigner.getLabelUnsafe(origStmt);\n if (lbl != null) {\n labelToInsOffset.put(lbl, i);\n }\n }\n }\n for (int j = 0; j < instructions.size(); j++) {\n BuilderInstruction bj = instructions.get(j);\n if (bj instanceof BuilderOffsetInstruction) {\n BuilderOffsetInstruction boj = (BuilderOffsetInstruction) bj;\n Label targetLbl = boj.getTarget();\n Integer offset = labelToInsOffset.get(targetLbl);\n if (offset == null)\n continue;\n Insn jumpInsn = stmtV.getInsnForInstruction(boj);\n if (jumpInsn instanceof InsnWithOffset) {\n InsnWithOffset offsetInsn = (InsnWithOffset) jumpInsn;\n int distance = getDistanceBetween(instructions, j, offset);\n if (Math.abs(distance) > offsetInsn.getMaxJumpOffset()) {\n insertIntermediateJump(offset, j, stmtV, instructions, labelAssigner);\n hasChanged = true;\n continue l0;\n }\n }\n }\n }\n }\n}\n"
"public void undimBackground() {\n if (fileTable.hasFocus())\n newColor = backgroundColor;\n else\n scrollPane.getViewport().setBackground(unfocusedBackgroundColor);\n}\n"
"public <T> Queue<T> build() {\n return new BasicQueue<>(this.getName(), this.getPollWait(), this.getPollTimeUnit(), this.getEnqueueTimeout(), this.getEnqueueTimeoutTimeUnit(), this.getBatchSize(), this.getQueueClass(), this.isCheckIfBusy(), this.getSize(), this.getCheckEvery(), this.isTryTransfer(), this.getUnableToEnqueueHandler());\n}\n"
"public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {\n String sourceUrl = (String) request.getAttribute(AbstractGatewayFilter.SOURCE_REQUEST_CONTEXT_URL_ATTRIBUTE_NAME);\n String topologyName = getTopologyName(sourceUrl);\n String serviceName = getServiceName();\n Subject subject = Subject.getSubject(AccessController.getContext());\n Principal primaryPrincipal = (Principal) subject.getPrincipals(PrimaryPrincipal.class).toArray()[0];\n String primaryUser = primaryPrincipal.getName();\n String impersonatedUser = null;\n Object[] impersonations = subject.getPrincipals(ImpersonatedPrincipal.class).toArray();\n if (impersonations != null && impersonations.length > 0) {\n impersonatedUser = ((Principal) impersonations[0]).getName();\n }\n String user = (impersonatedUser != null) ? impersonatedUser : primaryUser;\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\" + primaryUser + \"String_Node_Str\" + impersonatedUser + \"String_Node_Str\" + user);\n }\n Object[] groupObjects = subject.getPrincipals(GroupPrincipal.class).toArray();\n Set<String> groups = new HashSet<String>();\n for (Object obj : groupObjects) {\n groups.add(((Principal) obj).getName());\n }\n String clientIp = request.getRemoteAddr();\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\" + primaryUser + \"String_Node_Str\" + impersonatedUser + \"String_Node_Str\" + user + \"String_Node_Str\" + groups + \"String_Node_Str\" + clientIp);\n }\n RangerAccessRequest accessRequest = new KnoxRangerPlugin.RequestBuilder().service(serviceName).topology(topologyName).user(user).groups(groups).clientIp(clientIp).build();\n RangerAccessResult result = plugin.isAccessAllowed(accessRequest);\n boolean accessAllowed = result != null && result.getIsAllowed();\n boolean audited = result != null && result.getIsAudited();\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\" + accessAllowed);\n LOG.debug(\"String_Node_Str\" + audited);\n }\n if (accessAllowed) {\n chain.doFilter(request, response);\n } else {\n sendForbidden((HttpServletResponse) response);\n }\n}\n"
"protected void configure() {\n bind(TableRefFactory.class).to(TableRefFactoryImpl.class).asEagerSingleton();\n int maxCriticalAttempts = 100;\n int maxInfrequentAttempts = 5;\n int maxFrequentAttempts = 100;\n int maxDefaultAttempts = 10;\n bind(Retrier.class).toInstance(new SmartRetrier(attempts -> attempts >= maxCriticalAttempts, attempts -> attempts >= maxInfrequentAttempts, attempts -> attempts >= maxFrequentAttempts, attempts -> attempts >= maxDefaultAttempts, CoreModule::millisToWait));\n}\n"
"private void handleUrlSymlinkRequest(HttpExchange exchange, boolean internalCall, JSONObject internalResp, String linksToUrl) {\n try {\n String tailResources = getTailResourceUri(exchange, true);\n tailResources = getTailResourceUri(exchange, false);\n String thisUrl = linksToUrl + tailResources;\n logger.info(\"String_Node_Str\" + thisUrl);\n StringBuffer serverRespBuffer = new StringBuffer();\n HttpURLConnection is4Conn = is4ServerGet(thisUrl, serverRespBuffer);\n if (is4Conn != null) {\n String requestUri = exchangeJSON.getString(\"String_Node_Str\");\n if (requestUri.contains(\"String_Node_Str\"))\n requestUri = requestUri.substring(0, requestUri.indexOf(\"String_Node_Str\"));\n if (requestUri.contains(\"String_Node_Str\") && !requestUri.endsWith(\"String_Node_Str\")) {\n JSONObject fixedServerResp = new JSONObject();\n String localUri = URI + tailResources;\n fixedServerResp.put(localUri, serverRespBuffer.toString());\n sendResponse(exchange, is4Conn.getResponseCode(), fixedServerResp.toString(), internalCall, internalResp);\n } else {\n sendResponse(exchange, is4Conn.getResponseCode(), serverRespBuffer.toString(), internalCall, internalResp);\n }\n is4Conn.disconnect();\n } else {\n sendResponse(exchange, 504, null, internalCall, internalResp);\n }\n } catch (Exception e) {\n logger.log(Level.WARNING, \"String_Node_Str\", e);\n sendResponse(exchange, 504, null, internalCall, internalResp);\n }\n}\n"
"private void updateMasterBroker(String serverName, String oldMasterBroker, String newMasterBroker) throws Exception {\n MQJMXConnectorInfo mqInfo = getMQJMXConnectorInfo(serverName, config, serverContext, domain, connectorRuntime);\n try {\n MBeanServerConnection mbsc = mqInfo.getMQMBeanServerConnection();\n ObjectName on = new ObjectName(CLUSTER_CONFIG_MBEAN_NAME);\n Object[] params = null;\n String[] signature = new String[] { \"String_Node_Str\", \"String_Node_Str\" };\n params = new Object[] { oldMasterBroker, newMasterBroker };\n result = (CompositeData) mbsc.invoke(on, \"String_Node_Str\", params, signature);\n } catch (Exception e) {\n logAndHandleException(e, \"String_Node_Str\");\n } finally {\n try {\n if (mqInfo != null) {\n mqInfo.closeMQMBeanServerConnection();\n }\n } catch (Exception e) {\n handleException(e);\n }\n }\n}\n"
"public void testIssue290() throws Exception {\n String mapName = \"String_Node_Str\";\n Config config = new XmlConfigBuilder().build();\n MapConfig mapConfig = new MapConfig();\n mapConfig.setName(mapName);\n mapConfig.setTimeToLiveSeconds(1);\n config.getMapConfigs().put(mapName, mapConfig);\n HazelcastInstance h1 = Hazelcast.newHazelcastInstance(config);\n try {\n IMap<Object, Object> m1 = h1.getMap(mapName);\n m1.put(1, 1);\n assertEquals(1, m1.get(1));\n assertEquals(1, m1.get(1));\n Thread.sleep(1050);\n assertEquals(null, m1.get(1));\n m1.put(1, 1);\n assertEquals(1, m1.get(1));\n } finally {\n h1.getLifecycleService().shutdown();\n }\n}\n"
"public Object doPostServiceReference(HttpContext httpContext, HttpServletRequest request, String body) throws Exception {\n EasySOAApiSession api = EasySOALocalApiFactory.createLocalApi(SessionFactory.getSession(request));\n Map<String, String> params = getFirstValues(request.getParameterMap());\n try {\n EasySOADocument doc = api.notifyServiceReference(params);\n result.put(\"String_Node_Str\", doc.getId());\n } catch (Exception e) {\n appendError(e.getMessage());\n }\n return getFormattedResult();\n}\n"
"public void writePortableData(EntityPlayer player, NBTTagCompound tag) {\n if (!canPlayerAccess(player)) {\n return;\n }\n RedstoneControlHelper.setItemStackTagRS(tag, this);\n tag.setInteger(\"String_Node_Str\", frequency);\n tag.setByte(\"String_Node_Str\", modeItem);\n tag.setByte(\"String_Node_Str\", modeFluid);\n tag.setByte(\"String_Node_Str\", modeEnergy);\n}\n"
"private void onCompoundKey(TableInfo tableInfo) throws InvalidRequestException, TException, SchemaDisagreementException {\n CQLTranslator translator = new CQLTranslator();\n String columnFamilyQuery = CQLTranslator.CREATE_COLUMNFAMILY_QUERY;\n columnFamilyQuery = StringUtils.replace(columnFamilyQuery, CQLTranslator.COLUMN_FAMILY, translator.ensureCase(new StringBuilder(), tableInfo.getTableName()).toString());\n List<ColumnInfo> columns = tableInfo.getColumnMetadatas();\n Properties props = getColumnFamilyProperties(tableInfo);\n StringBuilder queryBuilder = new StringBuilder();\n onCompositeColumns(translator, columns, queryBuilder);\n List<EmbeddedColumnInfo> compositeColumns = tableInfo.getEmbeddedColumnMetadatas();\n EmbeddableType compoEmbeddableType = compositeColumns.get(0).getEmbeddable();\n onCompositeColumns(translator, compositeColumns.get(0).getColumns(), queryBuilder);\n if (queryBuilder.length() > 0) {\n queryBuilder.deleteCharAt(queryBuilder.length() - 1);\n columnFamilyQuery = StringUtils.replace(columnFamilyQuery, CQLTranslator.COLUMNS, queryBuilder.toString());\n queryBuilder = new StringBuilder(columnFamilyQuery);\n }\n queryBuilder.append(translator.ADD_PRIMARYKEY_CLAUSE);\n Field[] fields = tableInfo.getTableIdType().getDeclaredFields();\n StringBuilder primaryKeyBuilder = new StringBuilder();\n for (Field f : fields) {\n Attribute attribute = compoEmbeddableType.getAttribute(f.getName());\n translator.appendColumnName(primaryKeyBuilder, ((AbstractAttribute) attribute).getJPAColumnName());\n primaryKeyBuilder.append(\"String_Node_Str\");\n }\n primaryKeyBuilder.deleteCharAt(primaryKeyBuilder.length() - 1);\n queryBuilder = new StringBuilder(StringUtils.replace(queryBuilder.toString(), CQLTranslator.COLUMNS, primaryKeyBuilder.toString()));\n setColumnFamilyProperties(null, getColumnFamilyProperties(tableInfo), queryBuilder);\n cassandra_client.set_cql_version(CassandraPropertyReader.csmd != null ? CassandraPropertyReader.csmd.getCqlVersion() : CassandraConstants.CQL_VERSION_3_0);\n try {\n cassandra_client.execute_cql_query(ByteBuffer.wrap(queryBuilder.toString().getBytes(Constants.CHARSET_UTF8)), Compression.NONE);\n } catch (UnsupportedEncodingException e) {\n log.error(\"String_Node_Str\" + databaseName + \"String_Node_Str\" + e.getMessage());\n throw new SchemaGenerationException(\"String_Node_Str\" + databaseName, e, \"String_Node_Str\", databaseName);\n } catch (UnavailableException e) {\n log.error(\"String_Node_Str\" + databaseName + \"String_Node_Str\" + e.getMessage());\n throw new SchemaGenerationException(\"String_Node_Str\" + databaseName, e, \"String_Node_Str\", databaseName);\n } catch (TimedOutException e) {\n log.error(\"String_Node_Str\" + databaseName + \"String_Node_Str\" + e.getMessage());\n throw new SchemaGenerationException(\"String_Node_Str\" + databaseName, e, \"String_Node_Str\", databaseName);\n }\n}\n"
"public void initializeNew() {\n if (!rootSchemaDef.hasStereotype(\"String_Node_Str\"))\n createStereotype(rootSchemaDef, \"String_Node_Str\", Fields.UNKNOWN, null);\n ProtocolHandlers<Protocol, Format> protocolHandlers = getProtocolHandlers();\n for (Protocol protocol : protocolHandlers.getProtocols()) rootSchemaDef.addProtocolProperties(protocol, protocolHandlers.getProtocolProperties(protocol));\n FormatHandlers<Protocol, Format> formatHandlers = getFormatHandlers();\n for (Format format : formatHandlers.getFormats()) rootSchemaDef.addFormatProperties(format, formatHandlers.getFormatProperties(format));\n}\n"
"public void testFindByKernelBundle() {\n this.bundles = getBundles();\n this.regionBundleFindHook.find(getBundleContext(KERNEL_BUNDLE_INDEX), this.bundles);\n assertBundlePresent(SYSTEM_BUNDLE_INDEX, KERNEL_BUNDLE_INDEX);\n}\n"
"public void testLatchMigration() throws InterruptedException {\n TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(5);\n HazelcastInstance hz1 = factory.newHazelcastInstance(new Config());\n HazelcastInstance hz2 = factory.newHazelcastInstance(new Config());\n final ICountDownLatch latch1 = hz1.getCountDownLatch(\"String_Node_Str\");\n latch1.trySetCount(10);\n Thread.sleep(500);\n final ICountDownLatch latch2 = hz2.getCountDownLatch(\"String_Node_Str\");\n Assert.assertEquals(10, latch2.getCount());\n latch2.countDown();\n Assert.assertEquals(9, latch1.getCount());\n hz1.getLifecycleService().shutdown();\n Assert.assertEquals(9, latch2.getCount());\n HazelcastInstance hz3 = factory.newHazelcastInstance(new Config());\n final ICountDownLatch latch3 = hz3.getCountDownLatch(\"String_Node_Str\");\n latch3.countDown();\n Assert.assertEquals(8, latch3.getCount());\n hz2.getLifecycleService().shutdown();\n latch3.countDown();\n Assert.assertEquals(7, latch3.getCount());\n HazelcastInstance hz4 = factory.newHazelcastInstance(new Config());\n HazelcastInstance hz5 = factory.newHazelcastInstance(new Config());\n Thread.sleep(250);\n hz3.getLifecycleService().shutdown();\n final ICountDownLatch latch4 = hz4.getCountDownLatch(\"String_Node_Str\");\n Assert.assertEquals(7, latch4.getCount());\n final ICountDownLatch latch5 = hz5.getCountDownLatch(\"String_Node_Str\");\n latch5.countDown();\n Assert.assertEquals(6, latch5.getCount());\n latch5.countDown();\n Assert.assertEquals(5, latch4.getCount());\n Assert.assertEquals(5, latch5.getCount());\n}\n"
"public void testInheritanceQuery() {\n EntityManager em = createEntityManager();\n beginTransaction(em);\n LargeProject project = new LargeProject();\n em.persist(project);\n commitTransaction(em);\n clearCache();\n ClassDescriptor descriptor = getServerSession().getClassDescriptor(Project.class);\n ReadAllQuery query = new ReadAllQuery(Project.class);\n ExpressionBuilder b = query.getExpressionBuilder();\n query.addArgument(\"String_Node_Str\", Integer.class);\n ReportQuery subQuery = new ReportQuery();\n subQuery.setReferenceClass(Project.class);\n SQLCall selectIdsCall = new SQLCall();\n String subSelect = \"String_Node_Str\";\n selectIdsCall.setSQLString(subSelect);\n subQuery.setCall(selectIdsCall);\n Expression expr = b.get(\"String_Node_Str\").in(subQuery);\n query.setSelectionCriteria(expr);\n Vector params = new Vector(1);\n params.add(new Integer(1));\n List res = (List) getServerSession().executeQuery(query, params);\n assertTrue(res.size() == 1);\n}\n"
"protected void openAnotherVersion(final RepositoryNode node, final boolean readonly) {\n try {\n if (node.getObject() != null) {\n Item item = node.getObject().getProperty().getItem();\n IWorkbenchPage page = getActivePage();\n IEditorPart editorPart = null;\n RepositoryEditorInput fileEditorInput = null;\n ICodeGeneratorService codeGenService = (ICodeGeneratorService) GlobalServiceRegister.getDefault().getService(ICodeGeneratorService.class);\n if (item instanceof ProcessItem) {\n ProcessItem processItem = (ProcessItem) item;\n fileEditorInput = new ProcessEditorInput(processItem, true, false, readonly);\n } else if (item instanceof BusinessProcessItem) {\n BusinessProcessItem businessProcessItem = (BusinessProcessItem) item;\n IFile file = CorePlugin.getDefault().getDiagramModelService().getDiagramFileAndUpdateResource(page, businessProcessItem);\n fileEditorInput = new RepositoryEditorInput(file, businessProcessItem);\n } else if (item instanceof RoutineItem) {\n RoutineItem routineItem = (RoutineItem) item;\n ITalendSynchronizer routineSynchronizer = codeGenService.createRoutineSynchronizer();\n IFile file = null;\n ProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();\n String lastVersion = factory.getLastVersion(routineItem.getProperty().getId()).getVersion();\n String curVersion = routineItem.getProperty().getVersion();\n if (curVersion != null && curVersion.equals(lastVersion)) {\n file = routineSynchronizer.getFile(routineItem);\n } else {\n file = routineSynchronizer.getRoutinesFile(routineItem);\n }\n fileEditorInput = new RoutineEditorInput(file, routineItem);\n } else if (item instanceof SQLPatternItem) {\n SQLPatternItem patternItem = (SQLPatternItem) item;\n ISQLPatternSynchronizer SQLPatternSynchronizer = codeGenService.getSQLPatternSynchronizer();\n SQLPatternSynchronizer.syncSQLPattern(patternItem, true);\n IFile file = SQLPatternSynchronizer.getSQLPatternFile(patternItem);\n fileEditorInput = new RepositoryEditorInput(file, patternItem);\n }\n if (fileEditorInput != null) {\n editorPart = page.findEditor(fileEditorInput);\n if (editorPart == null) {\n fileEditorInput.setRepositoryNode(node);\n if (item instanceof ProcessItem) {\n page.openEditor(fileEditorInput, MultiPageTalendEditor.ID, readonly);\n } else if (item instanceof BusinessProcessItem) {\n CorePlugin.getDefault().getDiagramModelService().openBusinessDiagramEditor(page, fileEditorInput);\n } else {\n ECodeLanguage lang = ((RepositoryContext) CorePlugin.getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY)).getProject().getLanguage();\n String talendEditorID = \"String_Node_Str\" + lang.getCaseName() + \"String_Node_Str\";\n page.openEditor(fileEditorInput, talendEditorID);\n }\n } else {\n page.activate(editorPart);\n }\n } else {\n try {\n if (item instanceof JobScriptItem) {\n IProject fsProject = ResourceModelUtils.getProject(ProjectManager.getInstance().getCurrentProject());\n openXtextEditor(node, fsProject, readonly);\n }\n } catch (PersistenceException e) {\n ExceptionHandler.process(e);\n }\n }\n }\n } catch (PartInitException e) {\n MessageBoxExceptionHandler.process(e);\n } catch (PersistenceException e) {\n MessageBoxExceptionHandler.process(e);\n } catch (SystemException e) {\n MessageBoxExceptionHandler.process(e);\n }\n}\n"
"public static Object[] filterOutDuplicatedElems(XSDNamedComponent[] checkedElements) {\n List<XSDNamedComponent> list = new ArrayList<XSDNamedComponent>();\n for (XSDNamedComponent el : checkedElements) {\n boolean exist = false;\n for (XSDNamedComponent xsdEl : list) {\n if (xsdEl.getName().equals(el.getName()) && xsdEl.getTargetNamespace() != null && el.getTargetNamespace() != null && xsdEl.getTargetNamespace().equals(el.getTargetNamespace())) {\n exist = true;\n break;\n } else if (xsdEl.getName().equals(el.getName()) && xsdEl.getTargetNamespace() == null && el.getTargetNamespace() == null) {\n exist = true;\n break;\n }\n }\n if (!exist && ((el.getTargetNamespace() != null && !el.getTargetNamespace().equals(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001)) || el.getTargetNamespace() == null)) {\n list.add(el);\n }\n }\n return list.toArray(new Object[] {});\n}\n"
"public Set<Entity> getCandidateEntities(String s) {\n Set<Entity> res = trie.get(s);\n return res == null ? new HashSet<Entity>() : trie.get(s);\n}\n"
"public void deviceInformationTypeTest4() {\n List<DeviceInformation> allDevicesInformation = message.devices;\n DeviceInformation deviceInformation = allDevicesInformation.get(5);\n assertEquals(DeviceType.ShutterContact, deviceInformation.getDeviceType());\n}\n"
"public boolean doInteraction(Object arg) {\n Configuration configuration = JDUtilities.getConfiguration();\n retries++;\n logger.info(\"String_Node_Str\" + retries);\n String ipBefore;\n String ipAfter;\n RouterData routerData = configuration.getRouterData();\n if (routerData == null) {\n this.setCallCode(Interaction.INTERACTION_CALL_ERROR);\n return false;\n }\n String routerIP = routerData.getRouterIP();\n String routerUsername = configuration.getRouterUsername();\n String routerPassword = configuration.getRouterPassword();\n int routerPort = routerData.getRouterPort();\n String login = routerData.getLogin();\n String disconnect = routerData.getDisconnect();\n String connect = routerData.getConnect();\n int waitTime = configuration.getWaitForIPCheck();\n if (routerUsername != null && routerPassword != null)\n Authenticator.setDefault(new InternalAuthenticator(routerUsername, routerPassword));\n String routerPage;\n if (routerPort <= 0)\n routerPage = \"String_Node_Str\" + routerIP + \"String_Node_Str\";\n else\n routerPage = \"String_Node_Str\" + routerIP + \"String_Node_Str\" + routerPort + \"String_Node_Str\";\n RequestInfo requestInfo = null;\n ipBefore = getIPAddress(routerPage, routerData);\n logger.fine(\"String_Node_Str\" + ipBefore);\n if (login != null && !login.equals(\"String_Node_Str\")) {\n login.replaceAll(VAR_USERNAME, routerUsername);\n login.replaceAll(VAR_PASSWORD, routerPassword);\n requestInfo = doThis(\"String_Node_Str\", isAbsolute(login) ? login : routerPage + login, requestInfo, routerData.getLoginRequestProperties(), routerData.getLoginPostParams(), routerData.getLoginType());\n if (requestInfo == null) {\n logger.severe(\"String_Node_Str\");\n this.setCallCode(Interaction.INTERACTION_CALL_ERROR);\n return false;\n } else if (!requestInfo.isOK()) {\n logger.severe(\"String_Node_Str\" + requestInfo.getResponseCode());\n this.setCallCode(Interaction.INTERACTION_CALL_ERROR);\n return false;\n }\n }\n requestInfo = doThis(\"String_Node_Str\", isAbsolute(disconnect) ? disconnect : routerPage + disconnect, requestInfo, routerData.getDisconnectRequestProperties(), routerData.getDisconnectPostParams(), routerData.getDisconnectType());\n if (requestInfo == null) {\n logger.severe(\"String_Node_Str\");\n this.setCallCode(Interaction.INTERACTION_CALL_ERROR);\n return false;\n } else if (!requestInfo.isOK()) {\n logger.severe(\"String_Node_Str\" + requestInfo.getResponseCode());\n this.setCallCode(Interaction.INTERACTION_CALL_ERROR);\n return false;\n }\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n }\n logger.fine(\"String_Node_Str\");\n requestInfo = doThis(\"String_Node_Str\", isAbsolute(connect) ? connect : routerPage + connect, null, routerData.getConnectRequestProperties(), routerData.getConnectPostParams(), routerData.getConnectType());\n if (requestInfo == null) {\n logger.severe(\"String_Node_Str\");\n this.setCallCode(Interaction.INTERACTION_CALL_ERROR);\n return false;\n } else if (!requestInfo.isOK()) {\n logger.severe(\"String_Node_Str\" + requestInfo.getResponseCode());\n this.setCallCode(Interaction.INTERACTION_CALL_ERROR);\n return false;\n }\n if (waitTime > 0) {\n logger.fine(\"String_Node_Str\" + waitTime + \"String_Node_Str\");\n try {\n Thread.sleep(waitTime * 1000);\n } catch (InterruptedException e) {\n }\n }\n ipAfter = getIPAddress(routerPage, routerData);\n logger.fine(\"String_Node_Str\" + ipAfter);\n if (ipBefore == null || ipAfter == null || ipBefore.equals(ipAfter)) {\n logger.severe(\"String_Node_Str\");\n if (retries < HTTPReconnect.MAX_RETRIES && (retries < configuration.getReconnectRetries() || configuration.getReconnectRetries() <= 0)) {\n return doInteraction(arg);\n }\n this.setCallCode(Interaction.INTERACTION_CALL_ERROR);\n retries = 0;\n return false;\n }\n this.setCallCode(Interaction.INTERACTION_CALL_SUCCESS);\n retries = 0;\n return true;\n}\n"
"public void visit(ASTNode[] nodes, SourceUnit source) {\n checkNodesForAnnotationAndType(nodes[0], nodes[1]);\n ClassNode classNode = (ClassNode) nodes[1];\n if (!classNode.implementsInterface(MVC_HANDLER_TYPE)) {\n apply(classNode);\n }\n}\n"
"private void finishScanCycle() {\n LogManager.d(TAG, \"String_Node_Str\");\n try {\n mCycledLeScanCallback.onCycleEnd();\n if (mScanning) {\n if (getBluetoothAdapter() != null) {\n if (getBluetoothAdapter().isEnabled()) {\n long now = System.currentTimeMillis();\n if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && mBetweenScanPeriod + mScanPeriod < ANDROID_N_MIN_SCAN_CYCLE_MILLIS && now - mLastScanStopTime < ANDROID_N_MIN_SCAN_CYCLE_MILLIS) {\n LogManager.d(TAG, \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + (ANDROID_N_MIN_SCAN_CYCLE_MILLIS - (now - mLastScanStopTime)) + \"String_Node_Str\");\n } else {\n try {\n LogManager.d(TAG, \"String_Node_Str\");\n finishScan();\n mLastScanStopTime = now;\n } catch (Exception e) {\n LogManager.w(e, TAG, \"String_Node_Str\");\n }\n }\n }\n mLastScanCycleEndTime = SystemClock.elapsedRealtime();\n } else {\n LogManager.d(TAG, \"String_Node_Str\");\n }\n }\n mNextScanCycleStartTime = getNextScanStartTime();\n if (mScanningEnabled) {\n scanLeDevice(true);\n }\n }\n if (!mScanningEnabled) {\n LogManager.d(TAG, \"String_Node_Str\");\n mScanCyclerStarted = false;\n cancelWakeUpAlarm();\n }\n}\n"
"public void onCreate(Bundle savedInstanceState) {\n surveyManager = new SurveyManager(this);\n super.onCreate(savedInstanceState);\n lrzId = Utils.getSetting(this, Const.LRZ_ID, \"String_Node_Str\");\n registerReceiver(connectivityChangeReceiver, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));\n if (NetUtils.isConnected(this)) {\n findViewsById();\n setUpTabHost();\n setUpSpinner();\n setUpSelectTargets();\n submitAndTabListeners();\n userAllowed();\n unregisterReceiver(connectivityChangeReceiver);\n } else {\n setContentView(R.layout.layout_no_internet);\n}\n"
"public Usr addUser(String firstname, String lastname, String password, int pensum, SystemRole role, double holiday) throws WaktuGeneralException {\n EntityManager em = PersistenceController.getInstance().getEMF().createEntityManager();\n Usr newUsr = new Usr(generateUsername(firstname, lastname), firstname, lastname, Md5.hash(password), pensum, role, holiday);\n try {\n em.getTransaction().begin();\n em.persist(newUsr);\n em.getTransaction().commit();\n } catch (IllegalStateException e) {\n throw new WaktuGeneralException(\"String_Node_Str\");\n } catch (IllegalArgumentException e) {\n throw new WaktuGeneralException(\"String_Node_Str\");\n } catch (Exception e) {\n throw new WaktuGeneralException(\"String_Node_Str\");\n } finally {\n em.close();\n }\n add.emit(newUsr);\n logger.info(\"String_Node_Str\" + newUsr + \"String_Node_Str\");\n return newUsr;\n}\n"
"public void listContextsByPrefix(HttpRequest request, HttpResponder responder, final String scope, final String context, String search) throws IOException {\n try {\n if (search == null || !search.equals(\"String_Node_Str\")) {\n responder.sendJson(HttpResponseStatus.BAD_REQUEST, \"String_Node_Str\");\n return;\n }\n MetricsScope metricsScope = MetricsScope.valueOf(scope.toUpperCase());\n if (metricsScope == null) {\n responder.sendJson(HttpResponseStatus.BAD_REQUEST, \"String_Node_Str\" + MetricsScope.SYSTEM + \"String_Node_Str\" + MetricsScope.USER + \"String_Node_Str\");\n return;\n }\n responder.sendJson(HttpResponseStatus.OK, getNextContext(metricsScope, context));\n } catch (OperationException e) {\n LOG.warn(\"String_Node_Str\", e);\n responder.sendStatus(HttpResponseStatus.INTERNAL_SERVER_ERROR);\n }\n}\n"
"public static EventHandlerChain<DeleteLoadbalancerEvent> onDeleteLoadbalancer() {\n return (new EventHandlerChainDelete()).build();\n}\n"
"public void onUpdate() {\n super.onUpdate();\n if (world.isRemote) {\n boolean hasFuel = (this.getLiquidAmount() > 0 || !Config.isFuelRequired(gauge));\n if (ConfigSound.soundEnabled) {\n if (this.horn == null) {\n this.horn = ImmersiveRailroading.proxy.newSound(this.getDefinition().horn, false, 100, gauge);\n this.idle = ImmersiveRailroading.proxy.newSound(this.getDefinition().idle, true, 80, gauge);\n }\n if (hasFuel) {\n if (!idle.isPlaying() && getTurnedOn() && Config.isFuelRequired(gauge)) {\n this.idle.play(getPositionVector());\n } else {\n this.idle.play(getPositionVector());\n }\n if (idle.isPlaying() && getTurnedOn() == false) {\n idle.stop();\n }\n } else {\n if (idle.isPlaying()) {\n idle.stop();\n }\n }\n if (this.getDataManager().get(HORN) != 0 && !horn.isPlaying()) {\n horn.play(getPositionVector());\n }\n float absThrottle = Math.abs(this.getThrottle());\n if (this.soundThrottle > absThrottle && getEngineTemperature() > 70 && getTurnedOn()) {\n this.soundThrottle -= Math.min(0.01f, this.soundThrottle - absThrottle);\n } else if (this.soundThrottle < absThrottle && getEngineTemperature() > 70 && getTurnedOn()) {\n this.soundThrottle += Math.min(0.01f, absThrottle - this.soundThrottle);\n }\n if (horn.isPlaying()) {\n horn.setPosition(getPositionVector());\n horn.setVelocity(getVelocity());\n horn.update();\n }\n if (idle.isPlaying()) {\n idle.setPitch(0.7f + this.soundThrottle / 4);\n idle.setVolume(Math.max(0.1f, this.soundThrottle));\n idle.setPosition(getPositionVector());\n idle.setVelocity(getVelocity());\n idle.update();\n }\n }\n if (!ConfigGraphics.particlesEnabled) {\n return;\n }\n Vec3d fakeMotion = new Vec3d(this.motionX, this.motionY, this.motionZ);\n List<RenderComponent> exhausts = this.getDefinition().getComponents(RenderComponentType.DIESEL_EXHAUST_X, gauge);\n float throttle = Math.abs(this.getThrottle());\n if (exhausts != null && throttle > 0 && hasFuel && getEngineTemperature() > 70 && getTurnedOn()) {\n for (RenderComponent exhaust : exhausts) {\n Vec3d particlePos = this.getPositionVector().add(VecUtil.rotateYaw(exhaust.center(), this.rotationYaw + 180)).addVector(0, 0.35 * gauge.scale(), 0);\n double smokeMod = (1 + Math.min(1, Math.max(0.2, Math.abs(this.getCurrentSpeed().minecraft()) * 2))) / 2;\n EntitySmokeParticle sp = new EntitySmokeParticle(world, (int) (40 * (1 + throttle) * smokeMod), throttle, throttle, exhaust.width());\n particlePos = particlePos.subtract(fakeMotion);\n sp.setPosition(particlePos.x, particlePos.y, particlePos.z);\n sp.setVelocity(fakeMotion.x, fakeMotion.y + 0.4 * gauge.scale(), fakeMotion.z);\n world.spawnEntity(sp);\n }\n }\n return;\n }\n if (this.getLiquidAmount() > 0) {\n float burnTime = BurnUtil.getBurnTime(this.getLiquid());\n if (burnTime == 0) {\n burnTime = 200;\n }\n burnTime *= getDefinition().getFuelEfficiency() / 100f;\n burnTime *= (Config.ConfigBalance.locoDieselFuelEfficiency / 100f);\n float heatUpSpeed = 0.0029167f * Config.ConfigBalance.dieselLocoHeatTimeScale;\n if (getTurnedOn()) {\n if (getEngineTemperature() < 150 && this.getLiquidAmount() > 0) {\n setEngineTemperature(getEngineTemperature() + heatUpSpeed);\n theTank.drain(1, true);\n }\n if (getEngineTemperature() > 150) {\n setEngineTemperature(150);\n }\n } else {\n if (getEngineTemperature() > 0) {\n setEngineTemperature(getEngineTemperature() - 0.02f);\n }\n if (getEngineTemperature() < 0) {\n setEngineTemperature(0);\n }\n }\n float consumption = Math.abs(getThrottle()) + 0.05f;\n consumption *= 100;\n consumption *= gauge.scale();\n internalBurn -= consumption;\n if (canTurnOnOff == false) {\n tick++;\n if (tick == turnOnOffDelay) {\n tick = 0;\n canTurnOnOff = true;\n }\n }\n }\n}\n"
"public PortletPreference[] getDefaultPreferences() {\n if (defaultPreferences == null) {\n PortletDD portletDD = getPortletDefinition();\n PortletPreferencesDD prefsDD = portletDD.getPortletPreferences();\n if (prefsDD != null) {\n List prefs = new ArrayList();\n for (Iterator it = prefsDD.getPortletPreferences().iterator(); it.hasNext(); ) {\n PortletPreferenceDD prefDD = (PortletPreferenceDD) it.next();\n String[] values = (String[]) prefDD.getValues().toArray(new String[prefDD.getValues().size()]);\n PortletPreferenceImpl pref = new PortletPreferenceImpl(prefDD.getName(), values, prefDD.isReadOnly());\n prefs.add(pref);\n }\n }\n }\n return prefs;\n}\n"
"public int doWork(final List<String> args) {\n if (this.bedFile == null || !this.bedFile.exists()) {\n LOG.error(\"String_Node_Str\");\n return -1;\n }\n if (args.isEmpty()) {\n LOG.error(\"String_Node_Str\");\n return -1;\n }\n if (this.minCoverages.isEmpty()) {\n this.minCoverages.add(0);\n }\n final String NO_PARTITION = \"String_Node_Str\";\n BufferedReader bedIn = null;\n final List<SamReader> samReaders = new ArrayList<>(args.size());\n PrintWriter pw = null;\n ReferenceGenome referenceGenome = null;\n ReferenceContig referenceContig = null;\n try {\n final BedLineCodec codec = new BedLineCodec();\n final Set<String> all_partitions = new TreeSet<>();\n bedIn = IOUtils.openFileForBufferedReading(this.bedFile);\n SAMSequenceDictionary dict = null;\n for (final String filename : IOUtils.unrollFiles(args)) {\n LOG.info(filename);\n final SamReader samReader = super.openSamReader(filename);\n if (!samReader.hasIndex()) {\n LOG.error(filename + \"String_Node_Str\");\n samReader.close();\n return -1;\n }\n final SAMFileHeader samFileheader = samReader.getFileHeader();\n if (samFileheader == null) {\n LOG.error(\"String_Node_Str\" + filename);\n return -1;\n }\n final List<SAMReadGroupRecord> readGroups = samFileheader.getReadGroups();\n if (readGroups == null || readGroups.isEmpty()) {\n LOG.warn(\"String_Node_Str\" + filename);\n all_partitions.add(NO_PARTITION);\n } else {\n for (final SAMReadGroupRecord rg : readGroups) {\n all_partitions.add(this.partition.apply(rg, NO_PARTITION));\n }\n }\n final SAMSequenceDictionary d = samFileheader.getSequenceDictionary();\n if (d == null) {\n samReader.close();\n LOG.error(JvarkitException.BamDictionaryMissing.getMessage(filename));\n return -1;\n }\n samReaders.add(samReader);\n if (dict == null) {\n dict = d;\n } else if (!SequenceUtil.areSequenceDictionariesEqual(d, dict)) {\n LOG.error(JvarkitException.DictionariesAreNotTheSame.getMessage(d, dict));\n return -1;\n }\n }\n if (samReaders.isEmpty()) {\n LOG.error(\"String_Node_Str\");\n return -1;\n }\n if (!StringUtil.isBlank(this.faidxUri)) {\n referenceGenome = new ReferenceGenomeFactory().open(this.faidxUri);\n }\n pw = super.openFileOrStdoutAsPrintWriter(this.outputFile);\n pw.print(\"String_Node_Str\" + this.partition.name() + (referenceGenome == null ? \"String_Node_Str\" : \"String_Node_Str\"));\n pw.print(\"String_Node_Str\");\n for (final int MIN_COVERAGE : this.minCoverages) {\n pw.print(\"String_Node_Str\" + MIN_COVERAGE + \"String_Node_Str\" + MIN_COVERAGE + \"String_Node_Str\" + MIN_COVERAGE + \"String_Node_Str\" + MIN_COVERAGE);\n }\n pw.println();\n String line = null;\n while ((line = bedIn.readLine()) != null) {\n if (line.isEmpty() || line.startsWith(\"String_Node_Str\"))\n continue;\n final BedLine bedLine = codec.decode(line);\n if (bedLine == null)\n continue;\n if (dict.getSequence(bedLine.getContig()) == null) {\n LOG.error(\"String_Node_Str\" + line);\n return -1;\n }\n if (bedLine.getStart() > bedLine.getEnd()) {\n LOG.info(\"String_Node_Str\" + bedLine);\n continue;\n }\n if (referenceGenome != null && (referenceContig == null || !referenceContig.hasName(bedLine.getContig()))) {\n referenceContig = referenceGenome.getContig(bedLine.getContig());\n }\n final Map<String, IntervalStat> sample2stats = new HashMap<>(all_partitions.size());\n for (final String rgId : all_partitions) {\n sample2stats.put(rgId, new IntervalStat(bedLine));\n }\n for (final SamReader samReader : samReaders) {\n final SAMRecordIterator r = samReader.queryOverlapping(bedLine.getContig(), bedLine.getStart(), bedLine.getEnd());\n while (r.hasNext()) {\n final SAMRecord rec = r.next();\n if (rec.getReadUnmappedFlag())\n continue;\n if (this.filter.filterOut(rec))\n continue;\n if (!rec.getReferenceName().equals(bedLine.getContig()))\n continue;\n final String partition;\n final SAMReadGroupRecord group = rec.getReadGroup();\n if (group == null) {\n partition = NO_PARTITION;\n } else {\n final String name = this.partition.apply(group);\n partition = (StringUtil.isBlank(name) ? NO_PARTITION : name);\n }\n IntervalStat stat = sample2stats.get(partition);\n if (stat == null) {\n stat = new IntervalStat(bedLine);\n sample2stats.put(partition, stat);\n }\n stat.visit(rec);\n }\n r.close();\n }\n final OptionalInt gcPercentInt = (referenceContig == null ? OptionalInt.empty() : referenceContig.getGCPercent(bedLine.getStart() - 1, bedLine.getEnd()).getGCPercentAsInteger());\n for (final String partitionName : sample2stats.keySet()) {\n final IntervalStat stat = sample2stats.get(partitionName);\n Arrays.sort(stat.counts);\n pw.print(bedLine.getContig() + \"String_Node_Str\" + (bedLine.getStart() - 1) + \"String_Node_Str\" + (bedLine.getEnd()) + \"String_Node_Str\" + stat.counts.length + \"String_Node_Str\" + partitionName);\n if (referenceGenome != null) {\n pw.print(\"String_Node_Str\");\n if (gcPercentInt.isPresent())\n pw.print(gcPercentInt.getAsInt());\n }\n pw.print(\"String_Node_Str\" + stat.counts[0] + \"String_Node_Str\" + stat.counts[stat.counts.length - 1]);\n for (final int MIN_COVERAGE : this.minCoverages) {\n final IntUnaryOperator depthAdjuster = (D) -> (D <= MIN_COVERAGE ? 0 : D);\n final int count_no_coverage = (int) Arrays.stream(stat.counts).filter(D -> depthAdjuster.applyAsInt(D) <= 0).count();\n final double mean = Percentile.average().evaluate(Arrays.stream(stat.counts).map(depthAdjuster));\n final double median_depth = Percentile.median().evaluate(Arrays.stream(stat.counts).map(depthAdjuster));\n pw.print(\"String_Node_Str\" + mean + \"String_Node_Str\" + median_depth + \"String_Node_Str\" + count_no_coverage + \"String_Node_Str\" + (int) (((stat.counts.length - count_no_coverage) / (double) stat.counts.length) * 100.0));\n }\n pw.println();\n }\n }\n pw.flush();\n pw.close();\n pw = null;\n LOG.info(\"String_Node_Str\");\n return RETURN_OK;\n } catch (final Exception err) {\n LOG.error(err);\n return -1;\n } finally {\n CloserUtil.close(referenceGenome);\n CloserUtil.close(pw);\n CloserUtil.close(bedIn);\n CloserUtil.close(samReaders);\n }\n}\n"
"public synchronized void addDataSet(FlowerPower fp, String seriesId) throws Exception {\n if ((fp.getBatteryLevelTimestamp() > 0) && isEnabled(TIMESERIES_TYPE_BATTERY, seriesId)) {\n if (fp.getBatteryLevel() >= 0)\n seriesToBePersisted.get(TIMESERIES_TYPE_BATTERY + \"String_Node_Str\" + seriesId).addMeasurement(fp.getBatteryLevelTimestamp(), (float) fp.getBatteryLevel());\n }\n if ((fp.getTemperatureTimestamp() > 0) && isEnabled(TIMESERIES_TYPE_TEMPERATURE, seriesId)) {\n seriesToBePersisted.get(TIMESERIES_TYPE_TEMPERATURE + \"String_Node_Str\" + seriesId).addMeasurement(fp.getTemperatureTimestamp(), (float) fp.getTemperature());\n }\n if ((fp.getSunlightTimestamp() > 0) && isEnabled(TIMESERIES_TYPE_SUNLIGHT, seriesId)) {\n seriesToBePersisted.get(TIMESERIES_TYPE_SUNLIGHT + \"String_Node_Str\" + seriesId).addMeasurement(fp.getSunlightTimestamp(), (float) fp.getSunlight());\n }\n if ((fp.getSoilMoistureTimestamp() > 0) && isEnabled(TIMESERIES_TYPE_SOILMOISTURE, seriesId)) {\n seriesToBePersisted.get(TIMESERIES_TYPE_SOILMOISTURE + \"String_Node_Str\" + seriesId).addMeasurement(fp.getSoilMoistureTimestamp(), (float) fp.getSoilMoisture());\n }\n}\n"
"private void createPropertyAccessor(ClassNode classNode, PropertyNode fxProperty, FieldNode fxFieldShortName, Expression initExp) {\n FieldExpression fieldExpression = new FieldExpression(fxFieldShortName);\n ArgumentListExpression ctorArgs = initExp == null ? ArgumentListExpression.EMPTY_ARGUMENTS : new ArgumentListExpression(initExp);\n BlockStatement block = new BlockStatement();\n ClassNode fxType = fxProperty.getType();\n ClassNode implNode = PROPERTY_IMPL_MAP.get(fxType);\n if (implNode == null) {\n if (fxType.getTypeClass() == SIMPLE_LIST_PROPERTY_CNODE.getTypeClass()) {\n if (initExp != null && initExp instanceof ListExpression || (initExp instanceof CastExpression && (((CastExpression) initExp).getType().equals(LIST_TYPE) || ((CastExpression) initExp).getType().declaresInterface(LIST_TYPE))) || (initExp instanceof ConstructorCallExpression && (((ConstructorCallExpression) initExp).getType().equals(LIST_TYPE) || ((ConstructorCallExpression) initExp).getType().declaresInterface(LIST_TYPE)))) {\n ctorArgs = new ArgumentListExpression(new MethodCallExpression(new ClassExpression(FXCOLLECTIONS_CNODE), \"String_Node_Str\", ctorArgs));\n }\n implNode = fxType;\n } else if (fxType.getTypeClass() == SIMPLE_MAP_PROPERTY_CNODE.getTypeClass()) {\n if (initExp != null) {\n if (initExp instanceof MapExpression || (initExp instanceof CastExpression && (((CastExpression) initExp).getType().equals(MAP_TYPE) || ((CastExpression) initExp).getType().declaresInterface(MAP_TYPE))) || (initExp instanceof ConstructorCallExpression && (((ConstructorCallExpression) initExp).getType().equals(MAP_TYPE) || ((ConstructorCallExpression) initExp).getType().declaresInterface(MAP_TYPE)))) {\n ctorArgs = new ArgumentListExpression(new MethodCallExpression(new ClassExpression(FXCOLLECTIONS_CNODE), \"String_Node_Str\", ctorArgs));\n }\n }\n implNode = fxType;\n } else if (fxType.getTypeClass() == SIMPLE_SET_PROPERTY_CNODE.getTypeClass()) {\n if (initExp != null) {\n if ((initExp instanceof CastExpression && (((CastExpression) initExp).getType().equals(SET_TYPE) || ((CastExpression) initExp).getType().declaresInterface(SET_TYPE))) || (initExp instanceof ConstructorCallExpression && (((ConstructorCallExpression) initExp).getType().equals(SET_TYPE) || ((ConstructorCallExpression) initExp).getType().declaresInterface(SET_TYPE)))) {\n ctorArgs = new ArgumentListExpression(new MethodCallExpression(new ClassExpression(FXCOLLECTIONS_CNODE), \"String_Node_Str\", ctorArgs));\n }\n }\n implNode = fxType;\n } else {\n implNode = makeClassSafe(SIMPLE_OBJECT_PROPERTY_CNODE);\n GenericsType[] origGenerics = fxProperty.getType().getGenericsTypes();\n implNode.setGenericsTypes(origGenerics);\n }\n }\n Expression initExpression = new ConstructorCallExpression(implNode, ctorArgs);\n IfStatement ifStmt = new IfStatement(new BooleanExpression(new BinaryExpression(fieldExpression, Token.newSymbol(Types.COMPARE_EQUAL, 0, 0), ConstantExpression.NULL)), new ExpressionStatement(new BinaryExpression(fieldExpression, Token.newSymbol(Types.EQUAL, 0, 0), initExpression)), EmptyStatement.INSTANCE);\n block.addStatement(ifStmt);\n block.addStatement(new ReturnStatement(fieldExpression));\n String getterName = getFXPropertyGetterName(fxProperty);\n MethodNode accessor = new MethodNode(getterName, fxProperty.getModifiers(), fxProperty.getType(), Parameter.EMPTY_ARRAY, ClassNode.EMPTY_ARRAY, block);\n accessor.setSynthetic(true);\n classNode.addMethod(accessor);\n block = new BlockStatement();\n VariableExpression thisExpression = VariableExpression.THIS_EXPRESSION;\n ArgumentListExpression emptyArguments = ArgumentListExpression.EMPTY_ARGUMENTS;\n MethodCallExpression getProperty = new MethodCallExpression(thisExpression, getterName, emptyArguments);\n block.addStatement(new ReturnStatement(getProperty));\n String javaFXPropertyFunction = fxProperty.getName();\n accessor = new MethodNode(javaFXPropertyFunction, fxProperty.getModifiers(), fxProperty.getType(), Parameter.EMPTY_ARRAY, ClassNode.EMPTY_ARRAY, block);\n accessor.setSynthetic(true);\n classNode.addMethod(accessor);\n block = new BlockStatement();\n thisExpression = VariableExpression.THIS_EXPRESSION;\n emptyArguments = ArgumentListExpression.EMPTY_ARGUMENTS;\n getProperty = new MethodCallExpression(thisExpression, getterName, emptyArguments);\n block.addStatement(new ReturnStatement(getProperty));\n javaFXPropertyFunction = fxProperty.getName().replace(\"String_Node_Str\", \"String_Node_Str\");\n accessor = new MethodNode(javaFXPropertyFunction, fxProperty.getModifiers(), fxProperty.getType(), Parameter.EMPTY_ARRAY, ClassNode.EMPTY_ARRAY, block);\n accessor.setSynthetic(true);\n classNode.addMethod(accessor);\n}\n"
"public <E> List<E> doQuery(MappedStatement ms, Object parameterObject, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) throws SQLException {\n Statement stmt = null;\n try {\n flushStatements();\n Configuration configuration = ms.getConfiguration();\n StatementHandler handler = configuration.newStatementHandler(wrapper, ms, parameterObject, rowBounds, resultHandler, boundSql);\n Connection connection = getConnection(ms.getStatementLog());\n stmt = handler.prepare(connection);\n handler.parameterize(stmt);\n return handler.<E>query(stmt, resultHandler);\n } finally {\n closeStatement(stmt);\n }\n}\n"
"public String toString() {\n StringBuilder sb = new StringBuilder(\"String_Node_Str\");\n boolean first = true;\n for (int cnt = 0; cnt < end - start; cnt++) {\n if (!first) {\n sb.append(\"String_Node_Str\");\n } else {\n first = false;\n }\n sb.append(Integer.toHexString(getByte(cnt) & 0xFF));\n }\n return sb.toString();\n}\n"
"public static INDArray toOffsetZeroCopy(INDArray arr) {\n if (arr.isRowVector()) {\n if (arr instanceof IComplexNDArray) {\n IComplexNDArray ret = Nd4j.createComplex(arr.shape());\n for (int i = 0; i < ret.length(); i++) ret.putScalar(i, ((IComplexNDArray) arr).getComplex(i));\n return ret;\n } else {\n INDArray ret = Nd4j.create(arr.shape());\n for (int i = 0; i < ret.length(); i++) ret.putScalar(i, arr.getDouble(i));\n return ret;\n }\n }\n if (arr instanceof IComplexNDArray) {\n IComplexNDArray ret = Nd4j.createComplex(arr.shape());\n for (int i = 0; i < ret.slices(); i++) ret.putSlice(i, arr.slice(i));\n return ret;\n } else {\n if (arr.offset() == 0 && arr.data().allocationMode() == AllocationMode.HEAP && arr.length() == arr.data().length() && arr.ordering() == Nd4j.order() && strideDescendingCAscendingF(arr.ordering(), arr.stride())) {\n Object array = arr.data().array();\n if (array instanceof float[]) {\n float[] orig = (float[]) array;\n float[] out = Arrays.copyOf(orig, orig.length);\n DataBuffer floatBuffer = Nd4j.createBuffer(out);\n int[] newShape = arr.shape();\n newShape = Arrays.copyOf(newShape, newShape.length);\n int[] newStride = arr.stride();\n newStride = Arrays.copyOf(newStride, newStride.length);\n return Nd4j.create(floatBuffer, newShape, newStride, 0, arr.ordering());\n } else if (array instanceof double[]) {\n double[] orig = (double[]) array;\n double[] out = Arrays.copyOf(orig, orig.length);\n DataBuffer doubleBuffer = Nd4j.createBuffer(out);\n int[] newShape = arr.shape();\n newShape = Arrays.copyOf(newShape, newShape.length);\n int[] newStride = arr.stride();\n newStride = Arrays.copyOf(newStride, newStride.length);\n return Nd4j.create(doubleBuffer, newShape, newStride, 0, arr.ordering());\n }\n }\n INDArray ret = Nd4j.create(arr.shape());\n for (int i = 0; i < arr.vectorsAlongDimension(0); i++) {\n ret.vectorAlongDimension(i, 0).assign(arr.vectorAlongDimension(i, 0));\n }\n return ret;\n }\n}\n"
"private void processNodes(Element ele, boolean needEscape, HashMap cssStyles, IContent content) {\n int level = 0;\n for (Node node = ele.getFirstChild(); node != null; node = node.getNextSibling()) {\n if (node.getNodeName().equals(\"String_Node_Str\")) {\n if (node.getFirstChild() instanceof Element) {\n processNodes((Element) node.getFirstChild(), checkEscapeSpace(node), cssStyles, content);\n }\n } else if (node.getNodeName().equals(\"String_Node_Str\")) {\n if (node.getFirstChild() instanceof Element) {\n processNodes((Element) node.getFirstChild(), needEscape, cssStyles, content);\n }\n } else if (node.getNodeType() == Node.TEXT_NODE) {\n ILabelContent label = new LabelContent((ReportContent) content.getReportContent());\n addChild(content, label);\n label.setText(node.getNodeValue());\n StyleDeclaration inlineStyle = new StyleDeclaration(content.getCSSEngine());\n inlineStyle.setProperty(IStyle.STYLE_DISPLAY, CSSValueConstants.INLINE_VALUE);\n Node pNode = node.getParentNode();\n if (pNode != null) {\n if (\"String_Node_Str\".equalsIgnoreCase(pNode.getNodeName()) || \"String_Node_Str\".equalsIgnoreCase(pNode.getNodeName())) {\n inlineStyle.setProperty(IStyle.STYLE_TEXT_UNDERLINE, IStyle.UNDERLINE_VALUE);\n } else if (\"String_Node_Str\".equalsIgnoreCase(pNode.getNodeName())) {\n inlineStyle.setProperty(IStyle.STYLE_TEXT_LINETHROUGH, IStyle.LINE_THROUGH_VALUE);\n } else if (\"String_Node_Str\".equalsIgnoreCase(pNode.getNodeName())) {\n inlineStyle.setProperty(IStyle.STYLE_VERTICAL_ALIGN, IStyle.BOTTOM_VALUE);\n } else if (\"String_Node_Str\".equalsIgnoreCase(pNode.getNodeName())) {\n inlineStyle.setProperty(IStyle.STYLE_VERTICAL_ALIGN, IStyle.TOP_VALUE);\n }\n }\n label.setInlineStyle(inlineStyle);\n if (action != null) {\n label.setHyperlinkAction(action);\n }\n } else if (node.getNodeType() == Node.ELEMENT_NODE) {\n handleElement((Element) node, needEscape, cssStyles, content, ++level);\n }\n }\n}\n"
"public void refreshUsersList() {\n MXDataHandler dataHandler = (MXDataHandler) mDataHandler;\n Collection<User> users = dataHandler.getStore().getUsers();\n for (User user : users) {\n user.setDataHandler(dataHandler);\n }\n}\n"
"private final InsertImpl<R> values0(List<Field<?>> values) {\n if (fields.size() == 0) {\n fields.addAll(into.getFields());\n }\n if (fields.size() != values.size()) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n getDelegate().newRecord();\n for (int i = 0; i < fields.size(); i++) {\n getDelegate().addValue((Field<Void>) fields.get(i), (Field<Void>) values.get(i));\n }\n return this;\n}\n"
"private void removeDecrCandidates(Continuation cont, RefCountType type, Set<Var> candidates) {\n if (type == RefCountType.READERS) {\n for (Var v : cont.requiredVars(false)) {\n candidates.remove(v);\n }\n }\n if (isForeachLoop(cont)) {\n AbstractForeachLoop loop = (AbstractForeachLoop) cont;\n for (RefCount rc : loop.getStartIncrements()) {\n if (rc.type == type) {\n candidates.remove(rc.var);\n }\n }\n }\n}\n"
"public void configure(Set<Parameter> stepParameters) throws EoulsanException {\n for (Parameter p : stepParameters) {\n if (FORMAT_PARAMETER.equals(p.getName())) {\n final DataFormatRegistry registry = DataFormatRegistry.getInstance();\n for (String formatName : Splitter.on(',').split(p.getValue())) {\n final DataFormat format = registry.getDataFormatFromName(formatName);\n if (format != null)\n this.formats.add(format);\n }\n }\n }\n if (this.formats.isEmpty())\n throw new EoulsanException(\"String_Node_Str\");\n}\n"
"public int[] getColumnCoordinatesInRange(int start, int end) {\n int startColumnIndex = getColumnIndexByCoordinate(start);\n int endColumnIndex = getColumnIndexByCoordinate(end);\n List<Integer> list = columnCoordinates.subList(startColumnIndex, endColumnIndex + 1);\n int length = list.size();\n int[] columnCoordinates = new int[length];\n for (int i = 0; i <= length; i++) {\n columnCoordinates[i] = list.get(i);\n }\n return columnCoordinates;\n}\n"
"public boolean onPreferenceChange(Preference preference, Object newValue) {\n float min = Float.parseFloat((String) newValue);\n float max = Float.parseFloat(terrainMaxPreference.getValue());\n if (min > max) {\n terrainMaxPreference.setValue(terrainMinPreference.getValue());\n }\n return true;\n}\n"
"public void loadImage() {\n if (image_url.startsWith(\"String_Node_Str\")) {\n closeAsync();\n localAsync = new LocalAsync();\n localAsync.execute(image_url);\n getActivity().invalidateOptionsMenu();\n } else if (image_url.startsWith(\"String_Node_Str\")) {\n Bitmap selectedBitmap;\n try {\n selectedBitmap = NewIssueFragment.downscaleAndReadBitmap(getActivity(), Uri.parse(image_url));\n imageView.setImageBitmap(selectedBitmap);\n showLoading(false);\n } catch (FileNotFoundException e) {\n Toast.makeText(getActivity(), \"String_Node_Str\", Toast.LENGTH_LONG).show();\n getActivity().finish();\n }\n } else {\n Toast.makeText(getActivity(), \"String_Node_Str\", Toast.LENGTH_LONG).show();\n getActivity().finish();\n }\n}\n"
"protected BoundingBox computeBox(IDisplayServer xs, RunTimeContext rtc) throws ChartException {\n Label la = getLabel().copyInstance();\n final String sPreviousValue = la.getCaption().getValue();\n la.getCaption().setValue(rtc.externalizedMessage(sPreviousValue));\n la.setEllipsis(1);\n Map<Label, LabelLimiter> mapLimiter = rtc.getState(RunTimeContext.StateKey.LABEL_LIMITER_LOOKUP_KEY);\n LabelLimiter lbLimiter = mapLimiter.get(getLabel());\n lbLimiter.computeWrapping(xs, la);\n int iTitileAnchor = getAnchor().getValue();\n EnumSet<LabelLimiter.Option> option = iTitileAnchor == Anchor.EAST || iTitileAnchor == Anchor.WEST ? EnumSet.of(LabelLimiter.Option.FIX_HEIGHT) : EnumSet.of(LabelLimiter.Option.FIX_WIDTH);\n LabelLimiter lbLimiterNew = lbLimiter.limitLabelSize(xs, la, option);\n mapLimiter.put(getLabel(), lbLimiterNew);\n return lbLimiterNew.getBounding(null);\n}\n"
"protected boolean visit(IResourceDelta delta, Collection<Runnable> runnables) {\n VisitResourceHelper visitHelper = new VisitResourceHelper(delta);\n boolean merged = ProjectRepositoryNode.getInstance().getMergeRefProject();\n Set<RepositoryNode> topLevelNodes = getTopLevelNodes();\n boolean visitChildren = false;\n for (final RepositoryNode repoNode : topLevelNodes) {\n IPath topLevelNodeWorkspaceRelativePath = topLevelNodeToPathMap.get(repoNode);\n if (topLevelNodeWorkspaceRelativePath != null && visitHelper.valid(topLevelNodeWorkspaceRelativePath, merged)) {\n valid = true;\n if (viewer instanceof RepoViewCommonViewer) {\n runnables.add(new Runnable() {\n public void run() {\n refreshTopLevelNode(repoNode);\n }\n });\n }\n }\n }\n return valid;\n}\n"
"public void clearCraftingGrid() {\n for (int i = 0; i < 9; i++) {\n inventory[getMatrixOffset() + i] = null;\n }\n PacketHandler.sendToServer(CoFHTileInfoPacket.getTileInfoPacket(this).addByte(PacketInfoID.CLEAR_GRID.ordinal()));\n}\n"
"public void testGetJsonWithResources() throws NoSuchFieldException, ClassNotFoundException {\n IdsHelper.loadValues(com.scurab.android.anuitorsample.R.class);\n String s = IdsHelper.toJson(Robolectric.application.getResources());\n HashMap hashMap = new Gson().fromJson(s, HashMap.class);\n List<LinkedTreeMap> list = (List<LinkedTreeMap>) hashMap.get(\"String_Node_Str\");\n boolean hasSource = false;\n for (LinkedTreeMap v : list) {\n assertNotNull(v.get(\"String_Node_Str\"));\n assertNotNull(v.get(\"String_Node_Str\"));\n hasSource |= v.containsKey(\"String_Node_Str\");\n }\n assertTrue(hasSource);\n}\n"
"public StringBuilder toString(StringBuilder sb) {\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n if (resourceDef != null) {\n resourceDef.toString(sb);\n }\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n if (policyResource != null) {\n policyResource.toString(sb);\n }\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\").append(optionsString).append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\").append(optIgnoreCase).append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\").append(optWildCard).append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n if (policyValues != null) {\n for (String value : policyValues) {\n sb.append(value).append(\"String_Node_Str\");\n }\n }\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\").append(policyIsExcludes).append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\").append(isMatchAny).append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n if (options != null) {\n for (Map.Entry<String, String> e : options.entrySet()) {\n sb.append(e.getKey()).append(\"String_Node_Str\").append(e.getValue()).append(OPTIONS_SEP);\n }\n }\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n return sb;\n}\n"
"private FetchResult fetch(Git git, String label) {\n FetchCommand fetch = git.fetch();\n fetch.setRemote(\"String_Node_Str\");\n fetch.setTagOpt(TagOpt.FETCH_TAGS);\n setTimeout(fetch);\n try {\n setCredentialsProvider(fetch);\n FetchResult result = fetch.call();\n if (result.getTrackingRefUpdates() != null && result.getTrackingRefUpdates().size() > 0) {\n logger.info(\"String_Node_Str\" + label + \"String_Node_Str\" + result.getTrackingRefUpdates().size() + \"String_Node_Str\");\n }\n return result;\n } catch (Exception ex) {\n this.logger.warn(\"String_Node_Str\" + label + \"String_Node_Str\" + git.getRepository().getConfig().getString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n return null;\n }\n}\n"
"public int readInt() throws IOException {\n timeStart();\n try {\n int i = 0;\n i |= (readCacheByte() & 0xFF) << 24;\n i |= (readCacheByte() & 0xFF) << 16;\n i |= (readCacheByte() & 0xFF) << 8;\n i |= (readCacheByte() & 0xFF) << 0;\n return i;\n } finally {\n timeEnd();\n }\n}\n"
"public void unlock(CharSequence name) {\n long thread = Thread.currentThread().getId();\n Entry e = entries.get(name);\n if (e == null) {\n notifyListener(thread, name, PoolListener.EV_NOT_LOCKED);\n return;\n }\n if (e.owner == thread) {\n if (e.writer != null) {\n notifyListener(thread, name, PoolListener.EV_NOT_LOCKED);\n throw CairoException.instance(0).put(\"String_Node_Str\").put(name).put(\"String_Node_Str\");\n }\n entries.remove(name);\n }\n if (e.lockFd != -1) {\n ff.close(e.lockFd);\n }\n notifyListener(thread, name, PoolListener.EV_UNLOCKED);\n}\n"
"public void attributeChanged(Attribute attribute) throws IllegalActionException {\n if (attribute == directorClass) {\n Director director = getDirector();\n String className = directorClass.stringValue();\n if (director == null || !director.getClass().getName().equals(className)) {\n try {\n Class.forName(className);\n } catch (ClassNotFoundException e) {\n throw new IllegalActionException(this, null, e, \"String_Node_Str\");\n }\n ChangeRequest request = new ChangeRequest(this, \"String_Node_Str\") {\n\n protected void _execute() throws Exception {\n Class newDirectorClass = Class.forName(newDirectorClassName);\n Constructor newDirectorConstructor = newDirectorClass.getConstructor(new Class[] { CompositeEntity.class, String.class });\n FSMDirector newDirector = (FSMDirector) newDirectorConstructor.newInstance(new Object[] { ModalModel.this, uniqueName(\"String_Node_Str\") });\n newDirector.setPersistent(false);\n newDirector.controllerName.setExpression(\"String_Node_Str\");\n if (director != null && director.getContainer() == ModalModel.this) {\n director.setContainer(null);\n }\n }\n };\n requestChange(request);\n }\n}\n"
"public void testEncodedDefaultSignatureVerification() throws Exception {\n Signer signer = factory.getInstance(true, privateKey);\n Signer verifier = factory.getInstance(false, publicKey, signer.getEncoded());\n runTestSignatureVerification(signer, verifier);\n}\n"
"public void onMessage(String channel, String sender, String login, String hostname, String message) {\n if (message.trim().startsWith(pref)) {\n message = message.replaceFirst(Matcher.quoteReplacement(pref), \"String_Node_Str\");\n String[] parts = message.split(\"String_Node_Str\");\n String first = parts[0];\n String result = \"String_Node_Str\";\n for (int i = 1; i < parts.length; i++) {\n if (result.length() != 0)\n result += \"String_Node_Str\";\n result += parts[i];\n }\n if ((first.equalsIgnoreCase((\"String_Node_Str\")) || message.equalsIgnoreCase(\"String_Node_Str\")) && sender.equalsIgnoreCase(\"String_Node_Str\")) {\n System.exit(0);\n } else if (first.equalsIgnoreCase(\"String_Node_Str\")) {\n try {\n System.out.println(\"String_Node_Str\");\n Main.reLoad();\n System.out.println(\"String_Node_Str\");\n Main.bot.sendMessage(channel, \"String_Node_Str\");\n } catch (Throwable e) {\n e.printStackTrace();\n }\n } else if (first.equalsIgnoreCase(\"String_Node_Str\")) {\n String toprint = \"String_Node_Str\";\n if (Main.helpmap.containsKey(result)) {\n toprint = Main.helpmap.get(result);\n } else {\n for (Map.Entry<String, String> entry : Main.helpmap.entrySet()) {\n toprint += entry.getKey() + \"String_Node_Str\";\n }\n }\n Main.bot.sendMessage(channel, toprint);\n } else if (Main.cmdmap.containsKey(first)) {\n try {\n Method met = (Method) Main.cmdmap.get(first);\n met.invoke((BasePlugin) Main.classmap.get(first), channel, sender, login, hostname, result);\n } catch (Throwable e) {\n e.printStackTrace();\n }\n }\n }\n}\n"
"public void afterFindBy(By by, WebElement element, WebDriver driver) {\n ((SearchingEventListener) dispatcher).afterFindBy(by, element, driver);\n}\n"
"protected void buildAndExecuteRestOfQuery(int userId, Filter filter, Set<Dimension> dimensions, final List<Bucket> buckets, StringBuilder from, StringBuilder columns, StringBuilder where, StringBuilder groupBy, int nextColumnIndex, Bundler valueBundler) {\n final List<Bundler> bundlers = new ArrayList<Bundler>();\n bundlers.add(valueBundler);\n StringBuilder dimColumns = new StringBuilder();\n for (Dimension dimension : dimensions) {\n if (dimension.getType() == DimensionType.Activity) {\n dimColumns.append(\"String_Node_Str\");\n bundlers.add(new OrderedEntityBundler(dimension, nextColumnIndex));\n nextColumnIndex += 3;\n } else if (dimension.getType() == DimensionType.ActivityCategory) {\n dimColumns.append(\"String_Node_Str\");\n bundlers.add(new SimpleBundler(dimension, nextColumnIndex));\n nextColumnIndex += 1;\n } else if (dimension.getType() == DimensionType.Database) {\n dimColumns.append(\"String_Node_Str\");\n bundlers.add(new EntityBundler(dimension, nextColumnIndex));\n nextColumnIndex += 2;\n } else if (dimension.getType() == DimensionType.Partner) {\n dimColumns.append(\"String_Node_Str\");\n bundlers.add(new EntityBundler(dimension, nextColumnIndex));\n nextColumnIndex += 2;\n } else if (dimension.getType() == DimensionType.Indicator) {\n dimColumns.append(\"String_Node_Str\");\n bundlers.add(new OrderedEntityBundler(dimension, nextColumnIndex));\n nextColumnIndex += 3;\n } else if (dimension.getType() == DimensionType.IndicatorCategory) {\n dimColumns.append(\"String_Node_Str\");\n bundlers.add(new SimpleBundler(dimension, nextColumnIndex));\n nextColumnIndex += 1;\n } else if (dimension instanceof DateDimension) {\n DateDimension dateDim = (DateDimension) dimension;\n if (dateDim.getUnit() == DateUnit.YEAR) {\n dimColumns.append(\"String_Node_Str\");\n bundlers.add(new YearBundler(dimension, nextColumnIndex));\n nextColumnIndex += 1;\n } else if (dateDim.getUnit() == DateUnit.MONTH) {\n dimColumns.append(\"String_Node_Str\");\n bundlers.add(new MonthBundler(dimension, nextColumnIndex));\n nextColumnIndex += 2;\n } else if (dateDim.getUnit() == DateUnit.QUARTER) {\n dimColumns.append(\"String_Node_Str\").append(dialect.formatQuarterFunction(\"String_Node_Str\"));\n bundlers.add(new QuarterBundler(nextColumnIndex, dimension));\n nextColumnIndex += 2;\n }\n } else if (dimension instanceof AdminDimension) {\n AdminDimension adminDim = (AdminDimension) dimension;\n String tableAlias = \"String_Node_Str\" + adminDim.getLevelId();\n from.append(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\").append(adminDim.getLevelId()).append(\"String_Node_Str\").append(tableAlias).append(\"String_Node_Str\").append(tableAlias).append(\"String_Node_Str\");\n dimColumns.append(\"String_Node_Str\").append(tableAlias).append(\"String_Node_Str\").append(\"String_Node_Str\").append(tableAlias).append(\"String_Node_Str\");\n bundlers.add(new EntityBundler(adminDim, nextColumnIndex));\n nextColumnIndex += 2;\n } else if (dimension instanceof AttributeGroupDimension) {\n AttributeGroupDimension attrGroupDim = (AttributeGroupDimension) dimension;\n List<Integer> attributeIds = attrGroupDim.getAttributeIds();\n int count = 0;\n for (Integer attributeId : attributeIds) {\n String tableAlias = \"String_Node_Str\" + attributeId;\n from.append(\"String_Node_Str\" + \"String_Node_Str\" + tableAlias + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\").append(attributeId).append(\"String_Node_Str\").append(tableAlias).append(\"String_Node_Str\").append(tableAlias).append(\"String_Node_Str\");\n dimColumns.append(\"String_Node_Str\").append(tableAlias).append(\"String_Node_Str\").append(tableAlias).append(\"String_Node_Str\");\n count++;\n }\n Log.debug(\"String_Node_Str\" + count);\n bundlers.add(new AttributeBundler(dimension, nextColumnIndex, count));\n nextColumnIndex += count;\n }\n }\n columns.append(dimColumns);\n groupBy.append(dimColumns);\n where.append(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n appendVisibilityFilter(where, userId);\n final List<Object> parameters = new ArrayList<Object>();\n if (filter.getMinDate() != null) {\n where.append(\"String_Node_Str\");\n parameters.add(new java.sql.Date(filter.getMinDate().getTime()));\n }\n if (filter.getMaxDate() != null) {\n where.append(\"String_Node_Str\");\n parameters.add(new java.sql.Date(filter.getMaxDate().getTime()));\n }\n for (DimensionType type : filter.getRestrictedDimensions()) {\n if (type == DimensionType.Indicator) {\n appendIdCriteria(where, \"String_Node_Str\", filter.getRestrictions(type), parameters);\n } else if (type == DimensionType.Activity) {\n appendIdCriteria(where, \"String_Node_Str\", filter.getRestrictions(type), parameters);\n } else if (type == DimensionType.Database) {\n appendIdCriteria(where, \"String_Node_Str\", filter.getRestrictions(type), parameters);\n } else if (type == DimensionType.Partner) {\n appendIdCriteria(where, \"String_Node_Str\", filter.getRestrictions(type), parameters);\n } else if (type == DimensionType.AdminLevel) {\n where.append(\"String_Node_Str\" + \"String_Node_Str\");\n appendIdCriteria(where, \"String_Node_Str\", filter.getRestrictions(type), parameters);\n where.append(\"String_Node_Str\");\n }\n }\n final StringBuilder sql = new StringBuilder();\n sql.append(\"String_Node_Str\").append(columns).append(\"String_Node_Str\").append(from).append(\"String_Node_Str\").append(where).append(\"String_Node_Str\").append(groupBy);\n Session session = ((HibernateEntityManager) em).getSession();\n System.out.println(sql.toString());\n session.doWork(new Work() {\n public void execute(Connection connection) throws SQLException {\n PreparedStatement stmt = connection.prepareStatement(sql.toString());\n for (int i = 0; i != parameters.size(); ++i) {\n stmt.setObject(i + 1, parameters.get(i));\n }\n ResultSet rs = stmt.executeQuery();\n while (rs.next()) {\n Bucket bucket = new Bucket();\n for (Bundler bundler : bundlers) {\n bundler.bundle(rs, bucket);\n }\n buckets.add(bucket);\n }\n }\n });\n}\n"
"protected void act(Game game) {\n if (actions == null || actions.isEmpty()) {\n pass(game);\n } else {\n boolean usedStack = false;\n while (actions.peek() != null) {\n Ability ability = actions.poll();\n logger.info(new StringBuilder(\"String_Node_Str\").append(game.getPlayer(playerId).getName()).append(\"String_Node_Str\").append(ability.toString()).toString());\n if (ability.getTargets().size() > 0) {\n for (Target target : ability.getTargets()) {\n for (UUID id : target.getTargets()) {\n target.updateTarget(id, game);\n }\n }\n Player player = game.getPlayer(ability.getFirstTarget());\n if (player != null) {\n logger.info(\"String_Node_Str\" + player.getName());\n }\n }\n this.activateAbility((ActivatedAbility) ability, game);\n if (ability.isUsesStack()) {\n usedStack = true;\n }\n if (!suggested.isEmpty() && !(ability instanceof PassAbility)) {\n Iterator<String> it = suggested.iterator();\n while (it.hasNext()) {\n Card card = game.getCard(ability.getSourceId());\n String action = it.next();\n logger.info(\"String_Node_Str\" + action + \"String_Node_Str\" + card);\n if (action.equals(card.getName())) {\n logger.info(\"String_Node_Str\" + action);\n it.remove();\n }\n }\n }\n }\n if (usedStack) {\n pass(game);\n }\n }\n}\n"
"static final AutoScale computeScale(IDisplayServer xs, OneAxis ax, DataSetIterator dsi, int iType, double dStart, double dEnd, Scale scModel, AxisOrigin axisOrigin, FormatSpecifier fs, RunTimeContext rtc, int direction, double zoomFactor, int iMarginPercent) throws ChartException {\n final Label la = ax.getLabel();\n final int iLabelLocation = ax.getLabelPosition();\n final int iOrientation = ax.getOrientation();\n DataElement oMinimum = scModel.getMin();\n DataElement oMaximum = scModel.getMax();\n final Double oStep = scModel.isSetStep() ? new Double(scModel.getStep()) : null;\n final Integer oStepNumber = scModel.isSetStepNumber() ? new Integer(scModel.getStepNumber()) : null;\n AutoScale sc = null;\n AutoScale scCloned = null;\n final Object oMinValue, oMaxValue;\n final boolean bIsPercent = ax.getModelAxis().isPercent();\n if ((iType & TEXT) == TEXT || ax.isCategoryScale()) {\n sc = new AutoScale(iType);\n sc.fs = fs;\n sc.rtc = rtc;\n sc.bCategoryScale = true;\n sc.bAxisLabelStaggered = ax.isAxisLabelStaggered();\n sc.iLabelShowingInterval = ax.getLableShowingInterval();\n sc.bTickBetweenCategories = ax.isTickBwtweenCategories();\n sc.dZoomFactor = zoomFactor;\n sc.iMarginPercent = iMarginPercent;\n sc.setData(dsi);\n sc.setDirection(direction);\n sc.computeTicks(xs, ax.getLabel(), iLabelLocation, iOrientation, dStart, dEnd, false, null);\n oMinValue = null;\n oMaxValue = null;\n } else if ((iType & LINEAR) == LINEAR) {\n Object oValue;\n double dValue, dMinValue = Double.MAX_VALUE, dMaxValue = -Double.MAX_VALUE;\n dsi.reset();\n double dPrecision = 0;\n while (dsi.hasNext()) {\n oValue = dsi.next();\n if (oValue == null) {\n continue;\n }\n dValue = ((Double) oValue).doubleValue();\n if (dValue < dMinValue)\n dMinValue = dValue;\n if (dValue > dMaxValue)\n dMaxValue = dValue;\n dPrecision = getPrecision(dPrecision, dValue, fs, rtc.getULocale(), bIsPercent);\n }\n if (axisOrigin != null && axisOrigin.getType().equals(IntersectionType.VALUE_LITERAL) && axisOrigin.getValue() instanceof NumberDataElement) {\n double origin = asDouble(axisOrigin.getValue()).doubleValue();\n if (oMinimum == null && origin < dMinValue) {\n oMinimum = axisOrigin.getValue();\n }\n if (oMaximum == null && origin > dMaxValue) {\n oMaximum = axisOrigin.getValue();\n }\n }\n final double dAbsMax = Math.abs(dMaxValue);\n final double dAbsMin = Math.abs(dMinValue);\n double dStep = Math.max(dAbsMax, dAbsMin);\n double dDelta = dMaxValue - dMinValue;\n if (dDelta == 0) {\n dStep = dPrecision;\n } else {\n dStep = Math.floor(Math.log(dDelta) / LOG_10);\n dStep = Math.pow(10, dStep);\n if (dStep < dPrecision) {\n dStep = dPrecision;\n }\n }\n sc = new AutoScale(iType, new Double(0), new Double(0));\n sc.setStep(new Double(dStep));\n sc.oStepNumber = oStepNumber;\n sc.setData(dsi);\n sc.setDirection(direction);\n sc.fs = fs;\n sc.rtc = rtc;\n sc.bAxisLabelStaggered = ax.isAxisLabelStaggered();\n sc.iLabelShowingInterval = ax.getLableShowingInterval();\n sc.bTickBetweenCategories = ax.isTickBwtweenCategories();\n sc.dZoomFactor = zoomFactor;\n sc.dPrecision = dPrecision;\n sc.iMarginPercent = iMarginPercent;\n setNumberMinMaxToScale(sc, oMinimum, oMaximum, rtc, ax);\n setStepToScale(sc, oStep, oStepNumber, rtc);\n oMinValue = new Double(dMinValue);\n oMaxValue = new Double(dMaxValue);\n sc.updateAxisMinMax(oMinValue, oMaxValue);\n } else if ((iType & LOGARITHMIC) == LOGARITHMIC) {\n Object oValue;\n double dValue, dMinValue = Double.MAX_VALUE, dMaxValue = -Double.MAX_VALUE;\n if ((iType & PERCENT) == PERCENT) {\n dMinValue = 0;\n dMaxValue = 100;\n } else {\n dsi.reset();\n while (dsi.hasNext()) {\n oValue = dsi.next();\n if (oValue == null) {\n continue;\n }\n dValue = ((Double) oValue).doubleValue();\n if (dValue < dMinValue)\n dMinValue = dValue;\n if (dValue > dMaxValue)\n dMaxValue = dValue;\n }\n if (axisOrigin != null && axisOrigin.getType().equals(IntersectionType.VALUE_LITERAL) && axisOrigin.getValue() instanceof NumberDataElement) {\n double origin = asDouble(axisOrigin.getValue()).doubleValue();\n if (oMinimum == null && origin < dMinValue) {\n oMinimum = axisOrigin.getValue();\n }\n if (oMaximum == null && origin > dMaxValue) {\n oMaximum = axisOrigin.getValue();\n }\n }\n if (dMinValue == 0) {\n dMinValue = dMaxValue > 0 ? 1 : -1;\n }\n }\n sc = new AutoScale(iType, new Double(0), new Double(0));\n sc.oStep = new Double(10);\n sc.oStepNumber = oStepNumber;\n sc.fs = fs;\n sc.rtc = rtc;\n sc.bAxisLabelStaggered = ax.isAxisLabelStaggered();\n sc.iLabelShowingInterval = ax.getLableShowingInterval();\n sc.bTickBetweenCategories = ax.isTickBwtweenCategories();\n sc.dZoomFactor = zoomFactor;\n sc.iMarginPercent = iMarginPercent;\n sc.setData(dsi);\n sc.setDirection(direction);\n setNumberMinMaxToScale(sc, oMinimum, oMaximum, rtc, ax);\n setStepToScale(sc, oStep, oStepNumber, rtc);\n oMinValue = new Double(dMinValue);\n oMaxValue = new Double(dMaxValue);\n sc.updateAxisMinMax(oMinValue, oMaxValue);\n if ((iType & PERCENT) == PERCENT) {\n sc.bStepFixed = true;\n sc.bMaximumFixed = true;\n sc.bMinimumFixed = true;\n sc.computeTicks(xs, ax.getLabel(), iLabelLocation, iOrientation, dStart, dEnd, false, null);\n return sc;\n }\n } else if ((iType & DATE_TIME) == DATE_TIME) {\n Calendar cValue;\n Calendar caMin = null, caMax = null;\n dsi.reset();\n while (dsi.hasNext()) {\n cValue = (Calendar) dsi.next();\n if (cValue == null) {\n continue;\n }\n if (caMin == null) {\n caMin = cValue;\n }\n if (caMax == null) {\n caMax = cValue;\n }\n if (cValue.before(caMin))\n caMin = cValue;\n else if (cValue.after(caMax))\n caMax = cValue;\n }\n oMinValue = new CDateTime(caMin);\n oMaxValue = new CDateTime(caMax);\n if (axisOrigin != null && axisOrigin.getType().equals(IntersectionType.VALUE_LITERAL) && axisOrigin.getValue() instanceof DateTimeDataElement) {\n CDateTime origin = asDateTime(axisOrigin.getValue());\n if (oMinimum == null && origin.before(oMinValue)) {\n oMinimum = axisOrigin.getValue();\n }\n if (oMaximum == null && origin.after(oMaxValue)) {\n oMaximum = axisOrigin.getValue();\n }\n }\n int iUnit;\n if (oStep != null || oStepNumber != null) {\n iUnit = ChartUtil.convertUnitTypeToCalendarConstant(scModel.getUnit());\n } else {\n iUnit = CDateTime.getPreferredUnit((CDateTime) oMinValue, (CDateTime) oMaxValue);\n }\n if (iUnit == 0)\n iUnit = Calendar.SECOND;\n CDateTime cdtMinAxis = ((CDateTime) oMinValue).backward(iUnit, 1);\n CDateTime cdtMaxAxis = ((CDateTime) oMaxValue).forward(iUnit, 1);\n cdtMinAxis.clearBelow(iUnit);\n cdtMaxAxis.clearBelow(iUnit);\n sc = new AutoScale(DATE_TIME, cdtMinAxis, cdtMaxAxis);\n sc.oStep = new Integer(1);\n sc.oStepNumber = oStepNumber;\n sc.oUnit = new Integer(iUnit);\n sc.iMinUnit = oMinValue.equals(oMaxValue) ? getUnitId(iUnit) : getMinUnitId(fs, rtc);\n sc.setDirection(direction);\n sc.fs = fs;\n sc.rtc = rtc;\n sc.bAxisLabelStaggered = ax.isAxisLabelStaggered();\n sc.iLabelShowingInterval = ax.getLableShowingInterval();\n sc.bTickBetweenCategories = ax.isTickBwtweenCategories();\n sc.dZoomFactor = zoomFactor;\n sc.iMarginPercent = iMarginPercent;\n if (oMinimum != null) {\n if (oMinimum instanceof DateTimeDataElement) {\n sc.oMinimum = ((DateTimeDataElement) oMinimum).getValueAsCDateTime();\n sc.oMinimumFixed = ((DateTimeDataElement) oMinimum).getValueAsCDateTime();\n } else {\n throw new ChartException(ChartEnginePlugin.ID, ChartException.GENERATION, \"String_Node_Str\", new Object[] { oMinimum, ax.getModelAxis().getType().getName() }, Messages.getResourceBundle(rtc.getULocale()));\n }\n sc.bMinimumFixed = true;\n }\n if (oMaximum != null) {\n if (oMaximum instanceof DateTimeDataElement) {\n sc.oMaximum = ((DateTimeDataElement) oMaximum).getValueAsCDateTime();\n sc.oMaximumFixed = ((DateTimeDataElement) oMaximum).getValueAsCDateTime();\n } else {\n throw new ChartException(ChartEnginePlugin.ID, ChartException.GENERATION, \"String_Node_Str\", new Object[] { sc.oMaximum, ax.getModelAxis().getType().getName() }, Messages.getResourceBundle(rtc.getULocale()));\n }\n sc.bMaximumFixed = true;\n }\n if (sc.bMaximumFixed && sc.bMinimumFixed) {\n if (((CDateTime) sc.oMinimum).after(sc.oMaximum)) {\n throw new ChartException(ChartEnginePlugin.ID, ChartException.GENERATION, \"String_Node_Str\", new Object[] { sc.oMinimum, sc.oMaximum }, Messages.getResourceBundle(rtc.getULocale()));\n }\n }\n setStepToScale(sc, oStep, oStepNumber, rtc);\n sc.updateAxisMinMax(oMinValue, oMaxValue);\n } else {\n oMinValue = null;\n oMaxValue = null;\n }\n sc.bLabelWithinAxes = ax.getModelAxis().isLabelWithinAxes();\n if ((iType & TEXT) != TEXT && !ax.isCategoryScale()) {\n sc.computeTicks(xs, la, iLabelLocation, iOrientation, dStart, dEnd, false, null);\n dStart = sc.dStart;\n dEnd = sc.dEnd;\n boolean bFirstFit = sc.checkFit(xs, la, iLabelLocation);\n boolean bFits = bFirstFit;\n boolean bZoomSuccess = false;\n for (int i = 0; bFits == bFirstFit && i < 50; i++) {\n bZoomSuccess = true;\n scCloned = (AutoScale) sc.clone();\n if (sc.bStepFixed || rtc.getScale() != null && rtc.getScale().isShared()) {\n break;\n }\n if (bFirstFit) {\n if (!bFits) {\n break;\n }\n bZoomSuccess = sc.zoomIn();\n } else {\n if (!bFits && sc.getTickCordinates().size() == 2) {\n break;\n }\n bZoomSuccess = sc.zoomOut();\n }\n if (!bZoomSuccess)\n break;\n sc.updateAxisMinMax(oMinValue, oMaxValue);\n sc.computeTicks(xs, la, iLabelLocation, iOrientation, dStart, dEnd, false, null);\n bFits = sc.checkFit(xs, la, iLabelLocation);\n if (!bFits && sc.getTickCordinates().size() == 2) {\n sc = scCloned;\n break;\n }\n }\n if (scCloned != null && bFirstFit && bZoomSuccess) {\n sc = scCloned;\n }\n updateSharedScaleContext(rtc, iType, sc.tmpSC);\n }\n sc.setData(dsi);\n return sc;\n}\n"
"public JsonNode migrate(final JsonNode input) throws SwaggerTransformException {\n Objects.requireNonNull(input, \"String_Node_Str\");\n final ObjectNode ret = input.deepCopy();\n JsonNode node;\n for (final String memberName : memberNames) {\n node = input.path(memberName);\n if (node.isMissingNode())\n continue;\n if (node.isContainerNode())\n throw new SwaggerTransformException(\"String_Node_Str\" + \"String_Node_Str\");\n if (!node.isTextual())\n ret.put(memberName, node.asText());\n }\n return ret;\n}\n"
"public boolean needsToCache(IBaseDataSetDesign dataSetDesign, int cacheOption, int alwaysCacheRowCount) {\n return needsToDteCache() || DataSetCacheUtil.needsToCache(dataSetDesign, cacheOption, alwaysCacheRowCount);\n}\n"
"public void testSimple() {\n ApplicationContext applicationContext = new ClassPathXmlApplicationContext(\"String_Node_Str\");\n IdService idService = (IdService) applicationContext.getBean(\"String_Node_Str\");\n long id = idService.genId();\n Id ido = idService.expId(id);\n long id1 = idService.makeId(ido.getVersion(), ido.getType(), ido.getGenMethod(), ido.getTime(), ido.getSeq(), ido.getMachine());\n System.err.println(id + \"String_Node_Str\" + ido);\n AssertJUnit.assertEquals(id, id1);\n}\n"
"private String getCompletedStringForQuantiles(Indicator indicator, Expression sqlExpression, String colName, String table, List<String> whereExpression) throws AnalysisExecutionException {\n String catalogOrSchema = getCatalogOrSchemaName(indicator.getAnalyzedElement());\n long count = getCount(cachedAnalysis, colName, table, catalogOrSchema, whereExpression);\n if (count == -1) {\n this.errorMessage = Messages.getString(\"String_Node_Str\", dbms().toQualifiedName(catalogOrSchema, null, colName));\n return null;\n }\n if (count == 0) {\n this.errorMessage = Messages.getString(\"String_Node_Str\", dbms().toQualifiedName(catalogOrSchema, null, colName));\n throw new AnalysisExecutionException(errorMessage);\n }\n Long midleCount = getOffsetInLimit(indicator, count);\n Integer nbRow = getNbReturnedRows(indicator, count);\n long nPlusSkip = midleCount + nbRow;\n return dbms().fillGenericQueryWithColumnTableLimitOffset(sqlExpression.getBody(), colName, table, String.valueOf(nbRow), String.valueOf(midleCount), String.valueOf(nPlusSkip));\n}\n"
"private void parseAttribute(final Attributes atts, final String attrName) throws SAXException {\n String attrValue = atts.getValue(attrName);\n String filename = null;\n final String attrClass = atts.getValue(ATTRIBUTE_NAME_CLASS);\n final String attrScope = atts.getValue(ATTRIBUTE_NAME_SCOPE);\n final String attrFormat = atts.getValue(ATTRIBUTE_NAME_FORMAT);\n final String attrType = atts.getValue(ATTRIBUTE_NAME_TYPE);\n final String codebase = atts.getValue(ATTRIBUTE_NAME_CODEBASE);\n if (attrValue == null) {\n return;\n }\n if (ATTRIBUTE_NAME_CONREF.equals(attrName) || ATTRIBUTE_NAME_CONKEYREF.equals(attrName)) {\n hasConRef = true;\n } else if (ATTRIBUTE_NAME_HREF.equals(attrName)) {\n if (attrClass != null && PR_D_CODEREF.matches(attrClass)) {\n hasCodeRef = true;\n } else {\n hasHref = true;\n }\n } else if (ATTRIBUTE_NAME_KEYREF.equals(attrName)) {\n hasKeyRef = true;\n }\n if (ATTRIBUTE_NAME_KEYS.equals(attrName) && attrValue.length() != 0) {\n String target = atts.getValue(ATTRIBUTE_NAME_HREF);\n final String keyRef = atts.getValue(ATTRIBUTE_NAME_KEYREF);\n final String copy_to = atts.getValue(ATTRIBUTE_NAME_COPY_TO);\n if (!StringUtils.isEmptyString(copy_to)) {\n target = copy_to;\n }\n if (target == null) {\n target = \"String_Node_Str\";\n }\n final String temp = target;\n for (final String key : attrValue.split(\"String_Node_Str\")) {\n if (!keysDefMap.containsKey(key) && !key.equals(\"String_Node_Str\")) {\n if (target != null && target.length() != 0) {\n if (attrScope != null && (attrScope.equals(\"String_Node_Str\") || attrScope.equals(\"String_Node_Str\"))) {\n exKeysDefMap.put(key, target);\n keysDefMap.put(key, new KeyDef(key, target, null));\n } else {\n String tail = \"String_Node_Str\";\n if (target.indexOf(SHARP) != -1) {\n tail = target.substring(target.indexOf(SHARP));\n target = target.substring(0, target.indexOf(SHARP));\n }\n if (new File(target).isAbsolute()) {\n target = FileUtils.getRelativePathFromMap(rootFilePath, target);\n }\n target = FileUtils.normalizeDirectory(currentDir, target);\n keysDefMap.put(key, new KeyDef(key, target + tail, null));\n }\n } else if (!StringUtils.isEmptyString(keyRef)) {\n keysRefMap.put(key, keyRef);\n } else {\n keysDefMap.put(key, new KeyDef(key, null, null));\n }\n } else {\n final Properties prop = new Properties();\n prop.setProperty(\"String_Node_Str\", key);\n prop.setProperty(\"String_Node_Str\", target);\n logger.logInfo(MessageUtils.getMessage(\"String_Node_Str\", prop).toString());\n }\n target = temp;\n }\n }\n if (\"String_Node_Str\".equalsIgnoreCase(attrScope) || \"String_Node_Str\".equalsIgnoreCase(attrScope) || attrValue.indexOf(COLON_DOUBLE_SLASH) != -1 || attrValue.startsWith(SHARP)) {\n return;\n }\n if (attrValue.startsWith(\"String_Node_Str\") && attrValue.indexOf(\"String_Node_Str\") == -1) {\n attrValue = attrValue.substring(\"String_Node_Str\".length());\n if (UNIX_SEPARATOR.equals(File.separator)) {\n attrValue = UNIX_SEPARATOR + attrValue;\n }\n }\n final File target = new File(attrValue);\n if (target.isAbsolute() && !ATTRIBUTE_NAME_DATA.equals(attrName)) {\n attrValue = FileUtils.getRelativePathFromMap(rootFilePath, attrValue);\n } else if (ATTRIBUTE_NAME_DATA.equals(attrName)) {\n if (!StringUtils.isEmptyString(codebase)) {\n filename = FileUtils.normalizeDirectory(codebase, attrValue);\n } else {\n filename = FileUtils.normalizeDirectory(currentDir, attrValue);\n }\n } else {\n filename = FileUtils.normalizeDirectory(currentDir, attrValue);\n }\n if (filename != null) {\n try {\n filename = URLDecoder.decode(filename, UTF8);\n } catch (final UnsupportedEncodingException e) {\n }\n }\n if (MAP_TOPICREF.matches(attrClass)) {\n if (ATTR_TYPE_VALUE_SUBJECT_SCHEME.equalsIgnoreCase(attrType)) {\n schemeSet.add(filename);\n }\n if (INDEX_TYPE_ECLIPSEHELP.equals(transtype)) {\n if (attrFormat == null || ATTR_FORMAT_VALUE_DITA.equalsIgnoreCase(attrFormat)) {\n if (attrName.equals(ATTRIBUTE_NAME_HREF)) {\n topicHref = filename;\n topicHref = topicHref.replace(WINDOWS_SEPARATOR, UNIX_SEPARATOR);\n if (attrValue.lastIndexOf(SHARP) != -1) {\n final int position = attrValue.lastIndexOf(SHARP);\n topicId = attrValue.substring(position + 1);\n } else {\n if (FileUtils.isDITAFile(topicHref)) {\n topicId = topicHref + QUESTION;\n }\n }\n }\n } else {\n topicHref = \"String_Node_Str\";\n topicId = \"String_Node_Str\";\n }\n }\n }\n if ((\"String_Node_Str\".equals(attrType) && ATTRIBUTE_NAME_DATA.equals(attrName)) || attrClass != null && PR_D_CODEREF.matches(attrClass)) {\n subsidiarySet.add(filename);\n return;\n }\n if (filename != null && FileUtils.isValidTarget(filename.toLowerCase()) && (StringUtils.isEmptyString(atts.getValue(ATTRIBUTE_NAME_COPY_TO)) || !FileUtils.isTopicFile(atts.getValue(ATTRIBUTE_NAME_COPY_TO).toLowerCase()) || (atts.getValue(ATTRIBUTE_NAME_CHUNK) != null && atts.getValue(ATTRIBUTE_NAME_CHUNK).contains(\"String_Node_Str\"))) && !ATTRIBUTE_NAME_CONREF.equals(attrName) && !ATTRIBUTE_NAME_COPY_TO.equals(attrName) && (canResolved() || FileUtils.isSupportedImageFile(filename.toLowerCase()))) {\n if (attrFormat != null) {\n nonConrefCopytoTargets.add(filename + STICK + attrFormat);\n } else {\n nonConrefCopytoTargets.add(filename);\n }\n }\n if (attrFormat != null && !ATTR_FORMAT_VALUE_DITA.equalsIgnoreCase(attrFormat)) {\n return;\n }\n if (ATTRIBUTE_NAME_HREF.equals(attrName) && FileUtils.isTopicFile(filename) && canResolved()) {\n hrefTargets.add(new File(filename).getPath());\n toOutFile(new File(filename).getPath());\n if (chunkLevel > 0 && chunkToNavLevel == 0 && topicGroupLevel == 0 && relTableLevel == 0) {\n chunkTopicSet.add(filename);\n } else {\n hrefTopicSet.add(filename);\n }\n }\n if (ATTRIBUTE_NAME_CONREF.equals(attrName) && FileUtils.isDITAFile(filename)) {\n conrefTargets.add(filename);\n toOutFile(new File(filename).getPath());\n }\n if (ATTRIBUTE_NAME_COPY_TO.equals(attrName) && FileUtils.isTopicFile(filename)) {\n final String href = atts.getValue(ATTRIBUTE_NAME_HREF);\n if (StringUtils.isEmptyString(href)) {\n final StringBuffer buff = new StringBuffer();\n buff.append(\"String_Node_Str\");\n buff.append(filename);\n buff.append(\"String_Node_Str\");\n logger.logWarn(buff.toString());\n } else if (copytoMap.get(filename) != null) {\n final Properties prop = new Properties();\n prop.setProperty(\"String_Node_Str\", href);\n prop.setProperty(\"String_Node_Str\", filename);\n logger.logWarn(MessageUtils.getMessage(\"String_Node_Str\", prop).toString());\n ignoredCopytoSourceSet.add(href);\n } else if (!(atts.getValue(ATTRIBUTE_NAME_CHUNK) != null && atts.getValue(ATTRIBUTE_NAME_CHUNK).contains(\"String_Node_Str\"))) {\n copytoMap.put(filename, FileUtils.normalizeDirectory(currentDir, href));\n }\n final String pathWithoutID = FileUtils.resolveFile(currentDir, attrValue);\n if (chunkLevel > 0 && chunkToNavLevel == 0 && topicGroupLevel == 0) {\n chunkTopicSet.add(pathWithoutID);\n } else {\n hrefTopicSet.add(pathWithoutID);\n }\n }\n if (ATTRIBUTE_NAME_CONACTION.equals(attrName)) {\n if (attrValue.equals(\"String_Node_Str\") || attrValue.equals(\"String_Node_Str\")) {\n hasconaction = true;\n }\n }\n}\n"
"public String toString() {\n if (this.indexes.size() == 0) {\n return \"String_Node_Str\";\n }\n final StringBuffer buf = new StringBuffer();\n for (int i = 0; i < indexes.size(); i++) {\n if (buf.length() == 0) {\n buf.append(\"String_Node_Str\");\n } else {\n buf.append(\"String_Node_Str\");\n }\n buf.append(this.indexes.get(i));\n if (this.types.get(i) != null) {\n buf.append(\"String_Node_Str\");\n buf.append(this.types.get(i).getName());\n }\n buf.append(\"String_Node_Str\");\n buf.append(this.orders.get(i).name());\n }\n buf.append(\"String_Node_Str\");\n return buf.toString();\n}\n"
"public void testOneThreadGetRelease() throws Exception {\n final JournalMetadata<?> m = theFactory.getConfiguration().buildWithRootLocation(new JournalStructure(\"String_Node_Str\").$date(\"String_Node_Str\").$());\n CachingWriterFactory wf = theFactory.getCachingWriterFactory();\n JournalWriter x;\n JournalWriter y;\n x = wf.writer(s);\n try {\n Assert.assertEquals(0, wf.countFreeWriters());\n Assert.assertNotNull(x);\n Assert.assertTrue(x.isOpen());\n Assert.assertTrue(x == wf.writer(s));\n } finally {\n x.close();\n }\n Assert.assertEquals(1, wf.countFreeWriters());\n y = wf.writer(s);\n try {\n Assert.assertNotNull(y);\n Assert.assertTrue(y.isOpen());\n Assert.assertTrue(y == x);\n } finally {\n y.close();\n }\n Assert.assertEquals(1, wf.countFreeWriters());\n}\n"
"public ScriptInfo generateScriptInfo(SourceGeneratorLocalData localData, List<GraphTargetItem> commands) throws ParseException, CompilationException {\n ScriptInfo si = new ScriptInfo();\n localData.currentScript = si;\n Trait[] traitArr = generateTraitsPhase1(null, null, false, localData, commands, si.traits);\n generateTraitsPhase2(new ArrayList<String>(), null, commands, traitArr, new ArrayList<Integer>(), localData);\n MethodInfo mi = new MethodInfo(new int[0], 0, 0, 0, new ValueKind[0], new int[0]);\n MethodBody mb = new MethodBody();\n mb.method_info = abc.addMethodInfo(mi);\n mb.code = new AVM2Code();\n mb.code.code.add(ins(new GetLocal0Ins()));\n mb.code.code.add(ins(new PushScopeIns()));\n int traitScope = 2;\n Map<Trait, Integer> initScopes = new HashMap<>();\n for (Trait t : si.traits.traits) {\n if (t instanceof TraitClass) {\n TraitClass tc = (TraitClass) t;\n List<Integer> parents = new ArrayList<>();\n if (localData.documentClass) {\n mb.code.code.add(ins(new GetScopeObjectIns(), 0));\n traitScope++;\n } else {\n NamespaceSet nsset = new NamespaceSet(new int[] { abc.constants.constant_multiname.get(tc.name_index).namespace_index });\n mb.code.code.add(ins(new FindPropertyStrictIns(), abc.constants.getMultinameId(new Multiname(Multiname.MULTINAME, abc.constants.constant_multiname.get(tc.name_index).name_index, 0, abc.constants.getNamespaceSetId(nsset, true), 0, new ArrayList<Integer>()), true)));\n }\n if (abc.instance_info.get(tc.class_info).isInterface()) {\n mb.code.code.add(ins(new PushNullIns()));\n } else {\n parentNamesAddNames(abc, allABCs, abc.instance_info.get(tc.class_info).name_index, parents, new ArrayList<String>(), new ArrayList<String>());\n for (int i = parents.size() - 1; i >= 1; i--) {\n mb.code.code.add(ins(new GetLexIns(), parents.get(i)));\n mb.code.code.add(ins(new PushScopeIns()));\n traitScope++;\n }\n mb.code.code.add(ins(new GetLexIns(), parents.get(1)));\n }\n mb.code.code.add(ins(new NewClassIns(), tc.class_info));\n if (!abc.instance_info.get(tc.class_info).isInterface()) {\n for (int i = parents.size() - 1; i >= 1; i--) {\n mb.code.code.add(ins(new PopScopeIns()));\n }\n }\n mb.code.code.add(ins(new InitPropertyIns(), tc.name_index));\n initScopes.put(t, traitScope);\n traitScope = 1;\n }\n }\n mb.code.code.add(ins(new ReturnVoidIns()));\n mb.autoFillStats(abc, localData.documentClass ? 1 : 0, false);\n abc.addMethodBody(mb);\n si.init_index = mb.method_info;\n localData.pkg = null;\n generateTraitsPhase3(1, false, null, null, false, localData, commands, si.traits, traitArr, initScopes);\n return si;\n}\n"
"public void onDataConnectionStateChanged(int state, int networkType) {\n mDataState = state;\n updateDataNetType(networkType);\n updateDataIcon();\n updateSignalStrength();\n}\n"
"public boolean isSymmetric(OWLObjectProperty property) {\n String query = \"String_Node_Str\" + property.toStringID() + \"String_Node_Str\" + OWL2.SymmetricProperty.getURI() + \"String_Node_Str\";\n return qef.createQueryExecution(query).execAsk();\n}\n"
"protected void prepareQuery() throws DataException {\n try {\n IBinding[] bindings = null;\n if (this.queryDefn.getSourceQuery() instanceof SubqueryLocator) {\n IQueryDefinition baseQueryDefn = getBaseQueryDefinition((SubqueryLocator) (queryDefn.getSourceQuery()));\n if (engine.getContext().getDocReader().exists(baseQueryDefn.getQueryResultsID() + \"String_Node_Str\" + DATA_STREAM_POST_FIX)) {\n this.queryResults = PreparedQueryUtil.newInstance(engine, baseQueryDefn, this.appContext).execute(null);\n } else\n this.queryResults = engine.getQueryResults(baseQueryDefn.getQueryResultsID());\n IQueryDefinition queryDefinition = queryResults.getPreparedQuery().getReportQueryDefn();\n if (queryDefn.getSourceQuery() instanceof SubqueryLocator) {\n ArrayList<IBinding> bindingList = new ArrayList<IBinding>();\n getSubQueryBindings(queryDefinition, ((SubqueryLocator) queryDefn.getSourceQuery()).getName(), bindingList);\n addQueryBindings(bindingList, queryDefinition.getBindings());\n bindings = bindingList.toArray(new IBinding[0]);\n } else {\n bindings = (IBinding[]) (queryDefinition.getBindings().values().toArray(new IBinding[0]));\n }\n } else {\n if (((IQueryDefinition) queryDefn.getSourceQuery()).getQueryResultsID() == null) {\n newPreDataEnige();\n this.queryResults = PreparedQueryUtil.newInstance(preDataEngine, (IQueryDefinition) queryDefn.getSourceQuery(), this.appContext).execute(null);\n } else {\n this.queryResults = PreparedQueryUtil.newInstance(engine, (IQueryDefinition) queryDefn.getSourceQuery(), this.appContext).execute(null);\n }\n if (queryResults != null && queryResults.getPreparedQuery() != null) {\n IQueryDefinition queryDefinition = queryResults.getPreparedQuery().getReportQueryDefn();\n bindings = (IBinding[]) queryDefinition.getBindings().values().toArray(new IBinding[0]);\n } else {\n bindings = new IBinding[0];\n }\n }\n if (!hasBinding) {\n for (int i = 0; i < bindings.length; i++) {\n IBinding binding = bindings[i];\n if (!this.queryDefn.getBindings().containsKey(binding.getBindingName()))\n this.queryDefn.addBinding(new Binding(binding.getBindingName(), new ScriptExpression(ExpressionUtil.createJSDataSetRowExpression(binding.getBindingName()), binding.getDataType())));\n }\n }\n } catch (BirtException e) {\n throw DataException.wrap(e);\n }\n}\n"
"private void setlocal(LuaState vm) {\n LuaState threadVm = vm;\n if (vm.gettop() >= 5) {\n threadVm = vm.checkthread(2).vm;\n vm.remove(2);\n }\n int level = vm.checkint(2);\n int local = vm.checkint(3);\n vm.settop(4);\n LString name = setlocal(threadVm, threadVm.cc - (level - 1), local);\n vm.resettop();\n vm.pushlvalue(name);\n}\n"
"protected void updatePublicContentView(Entry entry, StatusBarNotification sbn) {\n final RemoteViews publicContentView = entry.cachedPublicContentView;\n View inflatedView = entry.getPublicContentView();\n if (entry.autoRedacted && publicContentView != null && inflatedView != null) {\n final boolean disabledByPolicy = !adminAllowsUnredactedNotifications(entry.notification.getUserId());\n publicContentView.setTextViewText(android.R.id.title, mContext.getString(disabledByPolicy ? com.android.internal.R.string.notification_hidden_by_policy_text : com.android.internal.R.string.notification_hidden_text));\n publicContentView.reapply(sbn.getPackageContext(mContext), entry.getPublicContentView(), mOnClickHandler);\n }\n}\n"
"public RandomAccessView get(DataOutput out, int offset, int length) throws IOException {\n if (offset >= 0 && offset < this.size && length >= 0 && offset + length < this.size) {\n out.write(this.memory, this.offset + offset, length);\n return this;\n } else {\n throw new IndexOutOfBoundsException();\n }\n}\n"
"protected void beforeHookedMethod(MethodHookParam param) throws Throwable {\n XSharedPreferences prefs = new XSharedPreferences(nlpFix.class.getPackage().getName());\n prefs.reload();\n String wakeLockName = (String) param.args[2];\n if (wakeLockName.equals(\"String_Node_Str\")) {\n int collectorMaxFreq = tryParseInt(prefs.getString(\"String_Node_Str\", \"String_Node_Str\"));\n collectorMaxFreq *= 1000;\n if (collectorMaxFreq != 0) {\n final long now = SystemClock.elapsedRealtime();\n long timeSinceLastWakelock = now - mLastNlpCollectorWakelock;\n if (timeSinceLastWakelock < collectorMaxFreq) {\n XposedBridge.log(\"String_Node_Str\" + timeSinceLastWakelock + \"String_Node_Str\" + collectorMaxFreq);\n param.setResult(null);\n } else {\n XposedBridge.log(dt + \"String_Node_Str\" + collectorMaxFreq);\n mLastNlpCollectorWakelock = now;\n }\n }\n } else if (wakeLockName.equals(\"String_Node_Str\")) {\n int nlpMaxFreq = tryParseInt(prefs.getString(\"String_Node_Str\", \"String_Node_Str\"));\n nlpMaxFreq *= 1000;\n if (nlpMaxFreq != 0) {\n final long now = SystemClock.elapsedRealtime();\n long timeSinceLastWakelock = now - mLastNlpWakelock;\n if (timeSinceLastWakelock < nlpMaxFreq) {\n XposedBridge.log(\"String_Node_Str\" + timeSinceLastWakelock + \"String_Node_Str\" + nlpMaxFreq);\n param.setResult(null);\n } else {\n XposedBridge.log(\"String_Node_Str\");\n mLastNlpWakelock = now;\n }\n }\n }\n}\n"
"public static int[] convertNameToCoordinates(String namedCoordinate) {\n if (StringUtils.equalsIgnoreCase(namedCoordinate, \"String_Node_Str\")) {\n return new int[] { BOARD_SIZE, BOARD_SIZE };\n } else {\n int x = alphabet.indexOf(namedCoordinate.charAt(0));\n if (x < 0) {\n return new int[] { BOARD_SIZE, BOARD_SIZE };\n }\n int y;\n try {\n y = Integer.parseInt(namedCoordinate.substring(1)) - 1;\n } catch (NumberFormatException e) {\n return new int[] { BOARD_SIZE, BOARD_SIZE };\n }\n return new int[] { x, y };\n }\n}\n"
"public void testAcsii() throws IOException {\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n TableFormatterConfig config = new TableFormatterConfig(Locale.US, \"String_Node_Str\");\n AsciiTableFormatterFactory factory = new AsciiTableFormatterFactory();\n try (TableFormatter formatter = factory.create(new OutputStreamWriter(bos, StandardCharsets.UTF_8), \"String_Node_Str\", config, COLUMNS)) {\n write(formatter);\n }\n assertEquals(new String(bos.toByteArray(), StandardCharsets.UTF_8), \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n}\n"
"protected boolean calculateEnabled() {\n if (getSelectedObjects().isEmpty()) {\n return false;\n }\n Object s = getSelectedObjects().get(0);\n if (s instanceof List && !((List) s).isEmpty()) {\n List selectedarts = (List) s;\n Object obj = selectedarts.get(selectedarts.size() - 1);\n if (obj instanceof OutputTreeNodeEditPart) {\n nodePart = (OutputTreeNodeEditPart) obj;\n OutputTreeNode model = (OutputTreeNode) nodePart.getModel();\n if (NodeType.NAME_SPACE.equals(model.getNodeType()) || !(model.eContainer() instanceof OutputTreeNode) || model.isChoice() || model.isSubstitution()) {\n return false;\n }\n if (!XmlMapUtil.isExpressionEditable(model)) {\n return false;\n }\n AbstractInOutTree abstractTree = XmlMapUtil.getAbstractInOutTree(model);\n if (abstractTree instanceof OutputXmlTree) {\n OutputXmlTree outputTree = ((OutputXmlTree) abstractTree);\n if (outputTree.isAllInOne()) {\n return false;\n }\n if (isInputMultiLoops && outputTree.isMultiLoops()) {\n return false;\n }\n }\n if (!model.isAggregate()) {\n setText(\"String_Node_Str\");\n } else {\n setText(\"String_Node_Str\");\n }\n } else {\n return false;\n }\n }\n return true;\n}\n"
"private void printCube(CubeCursor cursor, List columnEdgeBindingNames, List rowEdgeBindingNames, String measureBindingNames, String columnAggr, String rowAggr, String overallAggr) throws Exception {\n this.printCube(cursor, columnEdgeBindingNames, rowEdgeBindingNames, measureBindingNames, columnAggr, rowAggr, overallAggr, true);\n}\n"
"public void setState(boolean showing) {\n cancel();\n boolean animate = curPanel.isAnimationEnabled;\n if (curPanel.animType != AnimationType.CENTER && !showing) {\n animate = false;\n }\n this.showing = showing;\n if (showing) {\n nativePreviewHandlerRegistration = Event.addNativePreviewHandler(new NativePreviewHandler() {\n\n public void execute() {\n run(ANIMATION_DURATION);\n }\n });\n } else {\n onInstantaneousRun();\n }\n}\n"
"private void startAppFreezingScreenLocked(AppWindowToken wtoken) {\n if (DEBUG_ORIENTATION)\n logWithStack(TAG, \"String_Node_Str\" + wtoken.appToken + \"String_Node_Str\" + wtoken.hidden + \"String_Node_Str\" + wtoken.mAppAnimator.freezingScreen);\n if (!wtoken.hiddenRequested) {\n if (!wtoken.mAppAnimator.freezingScreen) {\n wtoken.mAppAnimator.freezingScreen = true;\n wtoken.mAppAnimator.lastFreezeDuration = 0;\n mAppsFreezingScreen++;\n if (mAppsFreezingScreen == 1) {\n startFreezingDisplayLocked(false, 0, 0);\n mH.removeMessages(H.APP_FREEZE_TIMEOUT);\n mH.sendEmptyMessageDelayed(H.APP_FREEZE_TIMEOUT, 2000);\n }\n }\n final int N = wtoken.allAppWindows.size();\n for (int i = 0; i < N; i++) {\n WindowState w = wtoken.allAppWindows.get(i);\n w.mAppFreezing = true;\n }\n }\n}\n"
"public void Annotate(String description, Location loc) throws Exception {\n Date now;\n if (useSatelliteTime) {\n now = new Date(loc.getTime());\n } else {\n now = new Date();\n }\n String dateTimeString = Utilities.GetIsoDateTime(now);\n Gpx10AnnotateHandler annotateHandler = new Gpx10AnnotateHandler(description, gpxFile, loc, dateTimeString);\n Utilities.LogDebug(String.format(\"String_Node_Str\", EXECUTOR.getQueue().size()));\n EXECUTOR.execute(annotateHandler);\n}\n"
"public void addFunds(FundsAddedCommand command) {\n Request request = requestRepository.findOne(command.getRequestId()).orElseThrow(() -> new RuntimeException(\"String_Node_Str\"));\n Fund fund = Fund.builder().amountInWei(command.getAmountInWei()).requestId(command.getRequestId()).token(command.getToken()).timestamp(command.getTimestamp()).funder(command.getFunderAddress()).build();\n Optional<PendingFund> pendingFund = pendingFundRepository.findByTransactionHash(command.getTransactionId());\n if (pendingFund.isPresent()) {\n fund.setFunderUserId(pendingFund.get().getUserId());\n }\n fund = fundRepository.saveAndFlush(fund);\n cacheManager.getCache(\"String_Node_Str\").evict(fund.getRequestId());\n if (request.getStatus() == RequestStatus.OPEN) {\n request.setStatus(RequestStatus.FUNDED);\n request = requestRepository.saveAndFlush(request);\n }\n eventPublisher.publishEvent(new RequestFundedEvent(command.getTransactionId(), mappers.map(Fund.class, FundDto.class, fund), mappers.map(Request.class, RequestDto.class, request), command.getTimestamp()));\n}\n"
"public MapKey withKeyAsLong(long value) {\n key.startAddress = kPos;\n key.appendAddress = kPos + keyDataOffset;\n if (key.appendAddress + 8 > kLimit) {\n resize(8);\n }\n Unsafe.getUnsafe().putLong(key.appendAddress, value);\n key.appendAddress += 8;\n return key;\n}\n"
"void updateGridLabels(double startValue, double endValue, double gridDensity, GridScaleType scale_mode) {\n int scale_mode_id = scale_mode.getValue();\n double[][] gridPoints = gridPointsArray[scale_mode_id];\n StringBuilder[] gridPointsStr = gridPointsStrArray[scale_mode_id];\n double[] oldGridPointBoundary = oldGridPointBoundaryArray[scale_mode_id];\n genLinearGridPoints(gridPoints, startValue, endValue, gridDensity, scale_mode_id);\n double[] gridPointsBig = gridPoints[0];\n boolean needUpdate = false;\n if (gridPointsBig.length != gridPointsStr.length) {\n gridPointsStrArray[scale_mode_id] = new StringBuffer[gridPointsBig.length];\n gridPointsStr = gridPointsStrArray[scale_mode_id];\n for (int i = 0; i < gridPointsBig.length; i++) {\n gridPointsStr[i] = new StringBuffer();\n }\n if (scale_mode_id == 0) {\n gridPoints2Str = gridPointsStr;\n } else {\n gridPoints2StrDB = gridPointsStr;\n }\n needUpdate = true;\n }\n if (gridPointsBig.length > 0 && (needUpdate || gridPointsBig[0] != oldGridPointBoundary[0] || gridPointsBig[gridPointsBig.length - 1] != oldGridPointBoundary[1])) {\n oldGridPointBoundary[0] = gridPointsBig[0];\n oldGridPointBoundary[1] = gridPointsBig[gridPointsBig.length - 1];\n for (int i = 0; i < gridPointsStr.length; i++) {\n gridPointsStr[i].setLength(0);\n if (Math.abs(gridPointsBig[i]) >= 10) {\n gridPointsStr[i].append(largeFormatter.format(gridPointsBig[i]));\n } else if (gridPointsBig[i] != 0) {\n gridPointsStr[i].append(smallFormatter.format(gridPointsBig[i]));\n } else {\n gridPointsStr[i].append(\"String_Node_Str\");\n }\n }\n }\n}\n"
"public String toConf() {\n StringBuffer buf = new StringBuffer();\n if (value != null) {\n buf.append(getName());\n buf.append('=');\n if (allowsContinuation()) {\n String text = getConfValue(value);\n String[] lines = StringUtil.splitAll(text, '\\n');\n for (int i = 0; i < lines.length; i++) {\n if (i > 0) {\n buf.append(\"String_Node_Str\");\n }\n buf.append(lines[i]);\n }\n buf.append('\\n');\n } else {\n buf.append(value.toString());\n buf.append('\\n');\n }\n } else if (type.equals(ConfigEntryType.CIPHER_KEY)) {\n buf.append(getName());\n buf.append('=');\n }\n if (values != null) {\n if (type.equals(ConfigEntryType.HISTORY)) {\n Iterator iter = values.iterator();\n while (iter.hasNext()) {\n String text = (String) iter.next();\n buf.append(getName());\n buf.append('_');\n buf.append(text.replaceFirst(\"String_Node_Str\", \"String_Node_Str\"));\n buf.append('\\n');\n }\n } else {\n Iterator iter = values.iterator();\n while (iter.hasNext()) {\n String text = (String) iter.next();\n buf.append(getName());\n buf.append('=');\n buf.append(text);\n buf.append('\\n');\n }\n }\n }\n return buf.toString();\n}\n"
"private void findPose() {\n final List<DMatch> matchesList = mMatches.toList();\n if (matchesList.size() < 4) {\n return;\n }\n List<KeyPoint> referenceKeypointsList = mReferenceKeypoints.toList();\n List<KeyPoint> sceneKeypointsList = mSceneKeypoints.toList();\n double maxDist = 0.0;\n double minDist = Double.MAX_VALUE;\n for (DMatch match : matchesList) {\n double dist = match.distance;\n if (dist < minDist) {\n minDist = dist;\n }\n if (dist > maxDist) {\n maxDist = dist;\n }\n }\n if (minDist > 50.0) {\n mTargetFound = false;\n return;\n } else if (minDist > 25.0) {\n return;\n }\n ArrayList<Point> goodReferencePointsList = new ArrayList<Point>();\n ArrayList<Point> goodScenePointsList = new ArrayList<Point>();\n double maxGoodMatchDist = 1.75 * minDist;\n for (final DMatch match : matchesList) {\n if (match.distance < maxGoodMatchDist) {\n goodReferencePointsList.add(referenceKeypointsList.get(match.trainIdx).pt);\n goodScenePointsList.add(sceneKeypointsList.get(match.queryIdx).pt);\n }\n }\n if (goodReferencePointsList.size() < 4 || goodScenePointsList.size() < 4) {\n return;\n }\n final MatOfPoint2f goodReferencePoints = new MatOfPoint2f();\n goodReferencePoints.fromList(goodReferencePointsList);\n final MatOfPoint2f goodScenePoints = new MatOfPoint2f();\n goodScenePoints.fromList(goodScenePointsList);\n final Mat homography = Calib3d.findHomography(goodReferencePoints, goodScenePoints);\n Core.perspectiveTransform(mReferenceCorners, mCandidateSceneCorners, homography);\n mCandidateSceneCorners.convertTo(mIntSceneCorners, CvType.CV_32S);\n if (Imgproc.isContourConvex(mIntSceneCorners)) {\n return;\n }\n final double[] sceneCorner0 = mCandidateSceneCorners.get(0, 0);\n final double[] sceneCorner1 = mCandidateSceneCorners.get(1, 0);\n final double[] sceneCorner2 = mCandidateSceneCorners.get(2, 0);\n final double[] sceneCorner3 = mCandidateSceneCorners.get(3, 0);\n mSceneCorners2D.fromArray(new Point(sceneCorner0[0], sceneCorner0[1]), new Point(sceneCorner1[0], sceneCorner1[1]), new Point(sceneCorner2[0], sceneCorner2[1]), new Point(sceneCorner3[0], sceneCorner3[1]));\n final MatOfDouble projection = mCameraProjectionAdapter.getmProjectionCV();\n Calib3d.solvePnP(mReferenceCorners3D, mSceneCorners2D, projection, mDistCoeffs, mRVec, mTVec);\n final double[] rVecArray = mRVec.toArray();\n rVecArray[0] *= -1.0;\n mRVec.fromArray(rVecArray);\n Calib3d.Rodrigues(mRVec, mRotation);\n final double[] tVecArray = mTVec.toArray();\n mGLPose[0] = (float) mRotation.get(0, 0)[0];\n mGLPose[1] = (float) mRotation.get(0, 1)[0];\n mGLPose[2] = (float) mRotation.get(0, 2)[0];\n mGLPose[3] = 0f;\n mGLPose[4] = (float) mRotation.get(1, 0)[0];\n mGLPose[5] = (float) mRotation.get(1, 1)[0];\n mGLPose[6] = (float) mRotation.get(1, 2)[0];\n mGLPose[7] = 0f;\n mGLPose[8] = (float) mRotation.get(2, 0)[0];\n mGLPose[9] = (float) mRotation.get(2, 1)[0];\n mGLPose[10] = (float) mRotation.get(2, 2)[0];\n mGLPose[11] = 0f;\n mGLPose[12] = (float) tVecArray[0];\n mGLPose[13] = -(float) tVecArray[1];\n mGLPose[14] = -(float) tVecArray[2];\n mGLPose[15] = 1f;\n mTargetFound = true;\n}\n"
"public boolean isGivenTimestampInSelectedWindow(long timestamp) {\n boolean returnedValue = true;\n if ((timestamp < fullExperimentCanvas.getCurrentWindow().getTimestampOfLeftPosition()) || (timestamp > fullExperimentCanvas.getCurrentWindow().getTimestampOfRightPosition())) {\n returnedValue = false;\n }\n return returnedValue;\n}\n"
"protected void _updateOutputTokenProductionRates(TypedCompositeActor actor) throws IllegalActionException {\n Iterator refineOutPorts = actor.outputPortList().iterator();\n ComponentEntity refineOutPortContainer = (ComponentEntity) actor.getContainer();\n while (refineOutPorts.hasNext()) {\n IOPort refineOutPort = (IOPort) refineOutPorts.next();\n if (_debug_info)\n System.out.println(getName() + \"String_Node_Str\" + refineOutPort.getFullName());\n Iterator outPortsOutside = refineOutPort.deepConnectedOutPortList().iterator();\n if (!outPortsOutside.hasNext()) {\n throw new IllegalActionException(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n }\n while (outPortsOutside.hasNext()) {\n IOPort outputPortOutside = (IOPort) outPortsOutside.next();\n if (_debug_info)\n System.out.println(getName() + \"String_Node_Str\" + \"String_Node_Str\" + outputPortOutside.getFullName());\n ComponentEntity thisPortContainer = (ComponentEntity) outputPortOutside.getContainer();\n if (thisPortContainer.getFullName() == refineOutPortContainer.getFullName()) {\n if (_debug_info)\n System.out.println(getName() + \"String_Node_Str\" + \"String_Node_Str\" + outputPortOutside.getFullName());\n List listOfPorts = refineOutPort.insidePortList();\n int refineOutPortRate;\n if (listOfPorts.isEmpty()) {\n refineOutPortRate = 0;\n } else {\n IOPort portWithRateInfo = (IOPort) listOfPorts.get(0);\n refineOutPortRate = _getTokenProductionRate(portWithRateInfo);\n }\n if (_debug_info)\n System.out.println(getName() + \"String_Node_Str\" + refineOutPortRate);\n _setTokenProductionRate(refineOutPortContainer, outputPortOutside, refineOutPortRate);\n }\n }\n }\n}\n"
"private void collectDumpInfoFromParcelFLOCK(Parcel in, PrintWriter pw, String date, boolean isCompactOutput) {\n StringBuilder sb = new StringBuilder(512);\n if (isCompactOutput) {\n sb.append(\"String_Node_Str\");\n sb.append(CHECKIN_VERSION);\n sb.append(',');\n } else {\n sb.append(\"String_Node_Str\");\n }\n sb.append(date);\n int vers = in.readInt();\n if (vers != VERSION) {\n sb.append(\"String_Node_Str\");\n pw.println(sb.toString());\n return;\n }\n pw.println(sb.toString());\n int N = in.readInt();\n while (N > 0) {\n N--;\n String pkgName = in.readString();\n if (pkgName == null) {\n break;\n }\n sb.setLength(0);\n PkgUsageStatsExtended pus = new PkgUsageStatsExtended(in);\n if (isCompactOutput) {\n sb.append(\"String_Node_Str\");\n sb.append(pkgName);\n sb.append(',');\n sb.append(pus.mLaunchCount);\n sb.append(\"String_Node_Str\");\n sb.append(pus.mUsageTime);\n sb.append('\\n');\n final int NC = pus.mLaunchTimes.size();\n if (NC > 0) {\n for (Map.Entry<String, TimeStats> ent : pus.mLaunchTimes.entrySet()) {\n sb.append(\"String_Node_Str\");\n sb.append(ent.getKey());\n TimeStats times = ent.getValue();\n for (int i = 0; i < NUM_LAUNCH_TIME_BINS; i++) {\n sb.append(\"String_Node_Str\");\n sb.append(times.times[i]);\n }\n sb.append('\\n');\n }\n }\n } else {\n sb.append(\"String_Node_Str\");\n sb.append(pkgName);\n sb.append(\"String_Node_Str\");\n sb.append(pus.mLaunchCount);\n sb.append(\"String_Node_Str\");\n sb.append(pus.mUsageTime);\n sb.append(\"String_Node_Str\");\n sb.append('\\n');\n final int NC = pus.mLaunchTimes.size();\n if (NC > 0) {\n for (Map.Entry<String, TimeStats> ent : pus.mLaunchTimes.entrySet()) {\n sb.append(\"String_Node_Str\");\n sb.append(ent.getKey());\n TimeStats times = ent.getValue();\n int lastBin = 0;\n boolean first = true;\n for (int i = 0; i < NUM_LAUNCH_TIME_BINS - 1; i++) {\n if (times.times[i] != 0) {\n sb.append(first ? \"String_Node_Str\" : \"String_Node_Str\");\n sb.append(lastBin);\n sb.append('-');\n sb.append(LAUNCH_TIME_BINS[i]);\n sb.append('=');\n sb.append(times.times[i]);\n first = false;\n }\n lastBin = LAUNCH_TIME_BINS[i];\n }\n if (times.times[NUM_LAUNCH_TIME_BINS - 1] != 0) {\n sb.append(first ? \"String_Node_Str\" : \"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n sb.append(lastBin);\n sb.append('=');\n sb.append(times.times[NUM_LAUNCH_TIME_BINS - 1]);\n }\n sb.append('\\n');\n }\n }\n }\n pw.write(sb.toString());\n }\n}\n"
"public LinkedList<ForgeDirection> getPossibleMovements(EntityData data) {\n LinkedList<ForgeDirection> result = new LinkedList<ForgeDirection>();\n data.blacklist.add(data.input.getOpposite());\n for (ForgeDirection o : ForgeDirection.VALID_DIRECTIONS) {\n if (!data.blacklist.contains(o) && container.pipe.outputOpen(o))\n if (canReceivePipeObjects(o, data.item))\n result.add(o);\n }\n if (result.size() == 0 && allowBouncing) {\n if (canReceivePipeObjects(data.input.getOpposite(), data.item))\n result.add(data.input.getOpposite());\n }\n if (this.container.pipe instanceof IPipeTransportItemsHook) {\n Position pos = new Position(xCoord, yCoord, zCoord, data.input);\n result = ((IPipeTransportItemsHook) this.container.pipe).filterPossibleMovements(result, pos, data.item);\n }\n return result;\n}\n"
"protected Statement visitMsgFallbackGroupNode(MsgFallbackGroupNode node) {\n MsgNode msg = node.getMsg();\n MsgPartsAndIds idAndParts = MsgUtils.buildMsgPartsAndComputeMsgIdForDualFormat(msg);\n ImmutableList<String> escapingDirectives = node.getEscapingDirectiveNames();\n Statement renderDefault = getMsgCompiler().compileMessage(id, msg, escapingDirectives);\n if (node.hasFallbackMsg()) {\n MsgNode fallback = node.getFallbackMsg();\n long fallbackId = MsgUtils.computeMsgIdForDualFormat(node.getChild(1));\n IfBlock ifAvailableRenderDefault = IfBlock.create(variableLookup.getRenderContext().invoke(MethodRef.RENDER_CONTEXT_USE_PRIMARY_MSG, constant(id), constant(fallbackId)), renderDefault);\n return ControlFlow.ifElseChain(ImmutableList.of(ifAvailableRenderDefault), Optional.of(getMsgCompiler().compileMessage(fallbackId, fallback, escapingDirectives)));\n } else {\n return renderDefault;\n }\n}\n"
"protected ATTRIBUTE_ITEM getItem(String[] attributePath, boolean create) {\n ATTRIBUTE_ITEM item = null;\n CoreAttributeGroup<ATTRIBUTE_ITEM, DESCRIPTOR> currentGroup = (CoreAttributeGroup) this;\n for (int index = 0; index < attributePath.length; index++) {\n String attrName = attributePath[index];\n item = currentGroup.getItems().get(attrName);\n if (item == null) {\n if (!create) {\n if (this.superClassGroup != null) {\n return (ATTRIBUTE_ITEM) this.superClassGroup.getItem(attributePath, create);\n }\n return null;\n }\n item = (ATTRIBUTE_ITEM) newItem(currentGroup, attrName);\n currentGroup.getItems().put(attrName, item);\n }\n if (item.getGroup() == null && index < (attributePath.length - 1)) {\n if (!create) {\n return null;\n }\n CoreAttributeGroup newGroup = newGroup(attrName, currentGroup);\n item.setRootGroup(newGroup);\n }\n currentGroup = item.getGroup();\n }\n return item;\n}\n"
"public void sendToAll(FMLProxyPacket pkt) {\n channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALL);\n channels.get(Side.SERVER).writeAndFlush(pkt).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);\n}\n"