content stringlengths 40 137k |
|---|
"public void test() {\n ApplicationContext applicationContext = new ClassPathXmlApplicationContext(\"String_Node_Str\");\n DemoDao demoDao = applicationContext.getBean(DemoDao.class);\n Demo demo = new Demo();\n demo.setId(61L);\n demo.setAge(new ArrayList<>());\n demo.setDate(new Date());\n demoDao.index(demo);\n demoDao.update();\n boolean b = demoDao.bulk();\n System.out.println(b);\n List<Demo> list = demoDao.mget();\n System.out.println(JSON.toJSON(list));\n}\n"
|
"protected void hide() {\n synchronized (this) {\n Display.getDefault().syncExec(new Runnable() {\n\n public void run() {\n shell.setVisible(false);\n visible = false;\n text = null;\n bounds = null;\n currentX = -1;\n currentY = -1;\n }\n });\n }\n}\n"
|
"private File getJarLocation() {\n String path = ModuleLoader.class.getProtectionDomain().getCodeSource().getLocation().getPath();\n try {\n String decodedPath = URLDecoder.decode(path, \"String_Node_Str\");\n return new File(decodedPath).getParentFile();\n } catch (UnsupportedEncodingException uee) {\n LogUtils.getInstance().getLogger().error(\"String_Node_Str\" + uee);\n }\n return null;\n}\n"
|
"public Field deserialize(JsonElement element, Type type, JsonDeserializationContext gsonContext) throws JsonParseException {\n if (element == null || element.isJsonNull()) {\n return null;\n }\n JsonObject jsonObject = element.getAsJsonObject();\n if (!jsonObject.has(\"String_Node_Str\")) {\n jsonObject.add(\"String_Node_Str\", new JsonArray());\n }\n Field.Type typeEnum = Field.Type.undefined;\n JsonElement fieldType = jsonObject.get(\"String_Node_Str\");\n if (fieldType != null && !fieldType.isJsonNull()) {\n try {\n typeEnum = Field.Type.valueOf(fieldType.getAsString());\n } catch (IllegalArgumentException e) {\n }\n }\n if (typeEnum == Field.Type.undefined) {\n jsonObject.addProperty(\"String_Node_Str\", Field.Type.undefined.name());\n }\n return gsonContext.deserialize(jsonObject, typeEnum.getFieldClass());\n}\n"
|
"public void testLogMessageWithExceptionArgument() throws IOException {\n LOGGER.log(Level.SEVERE, ERROR_READING_TEST_CONF_FILE_ID, new Object[] { TEST_CONF_FILE, new Exception(TEST_EXCEPTION_MESSAGE) });\n String[] expectedContents = new String[] { CANNOT_READ_TEST_CONFIGURATION_FILE_MSG + TEST_CONF_FILE, TEST_EXCEPTION_MESSAGE };\n validateLogContents(ULF_LOG, expectedContents);\n validateLogContents(ODL_LOG, expectedContents);\n System.out.println(\"String_Node_Str\");\n}\n"
|
"public static void logToQueries(PrintWriter pw, File input, Boolean onlyComplexQueries, Map<String, Long> map) {\n FileInputStream fis = null;\n BufferedReader br = null;\n String line;\n try {\n fis = new FileInputStream(input);\n br = new BufferedReader(new InputStreamReader(fis, Charset.forName(\"String_Node_Str\")));\n while ((line = br.readLine()) != null) {\n int index = line.indexOf(\"String_Node_Str\");\n int lastIndex = line.indexOf(\"String_Node_Str\", index + 1);\n String line2 = line.substring(index, lastIndex);\n String graph = null;\n Pattern p = Pattern.compile(\"String_Node_Str\");\n Matcher m = p.matcher(line2);\n if (m.find()) {\n String complete = m.group();\n graph = complete.substring(complete.indexOf(\"String_Node_Str\") + 1, complete.lastIndexOf(\"String_Node_Str\"));\n graph = URLDecoder.decode(graph, \"String_Node_Str\");\n }\n List<String> tokens = Arrays.asList(line.split(\"String_Node_Str\"));\n String prequery = \"String_Node_Str\";\n for (int j = 0; j < tokens.size(); j++) {\n if (tokens.get(j).contains(\"String_Node_Str\")) {\n prequery = tokens.get(j).replaceFirst(\"String_Node_Str\", \"String_Node_Str\");\n }\n }\n line = prequery.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n if ((index = line.indexOf(\"String_Node_Str\")) >= 0)\n line = line.substring(0, index);\n try {\n line = URLDecoder.decode(line, \"String_Node_Str\");\n } catch (Exception e) {\n log.warning(\"String_Node_Str\" + line);\n LogHandler.writeStackTrace(log, e, Level.WARNING);\n }\n line = line.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n line = queryVarRename(line);\n Query q = QuerySorter.isSPARQL(line);\n try {\n if (q == null && !QuerySorter.isSPARQLUpdate(line)) {\n log.warning(\"String_Node_Str\" + line);\n QueryException e = new QueryException();\n LogHandler.writeStackTrace(log, e, Level.WARNING);\n continue;\n }\n Byte[] features = LogSolution.getFeatureVector(line, LogSolution.getFeatures());\n int count = LogSolution.countTriplesInQuery(line);\n String feat2 = \"String_Node_Str\";\n for (int i = 0; i < features.length - 1; i++) {\n feat2 += features[i] + \"String_Node_Str\";\n }\n feat2 += features[features.length - 1];\n Long n = map.get(feat2 + \"String_Node_Str\" + count);\n if (n == null)\n n = 0L;\n map.put(features + \"String_Node_Str\" + count, n + 1);\n if (q != null) {\n if (graph != null) {\n q.addGraphURI(graph);\n }\n line = q.toString().replace(\"String_Node_Str\", \"String_Node_Str\");\n }\n if (onlyComplexQueries) {\n if (countTriplesInQuery(line) <= 1) {\n continue;\n }\n Boolean cont = false;\n for (String feat : getFeatures()) {\n if (line.contains(feat)) {\n cont = true;\n break;\n }\n }\n if (!cont)\n continue;\n }\n pw.println(line.replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\").replaceAll(\"String_Node_Str\", \"String_Node_Str\"));\n } catch (QueryException e) {\n }\n }\n pw.flush();\n } catch (IOException e) {\n LogHandler.writeStackTrace(log, e, Level.SEVERE);\n } finally {\n try {\n fis.close();\n br.close();\n } catch (IOException e) {\n LogHandler.writeStackTrace(log, e, Level.SEVERE);\n }\n }\n}\n"
|
"public static void performBackup(Context context, ParcelFileDescriptor oldSnapshot, ParcelFileDescriptor newSnapshot, BackupDataOutput data, String[] prefGroups) {\n final int N = prefGroups.length;\n String[] files = new String[N];\n for (int i = 0; i < N; i++) {\n files[i] = context.getSharedPrefsFile(prefGroups[i]).getAbsolutePath();\n }\n FileBackupHelper.performBackup_checked(oldSnapshot, data, newSnapshot, files, prefGroups);\n}\n"
|
"public void onEntityUpdate() {\n if (!firstUpdateDone) {\n firstUpdate();\n firstUpdateDone = true;\n }\n if (!worldObj.isRemote && needsUpdate) {\n updateDataServer();\n needsUpdate = false;\n }\n if (worldObj.isRemote) {\n updateDataClient();\n energyFX += energySpendPerCycle;\n if (energyFX >= 10) {\n energyFX = 0;\n Minecraft.getMinecraft().effectRenderer.addEffect(new EntityRobotEnergyFX(worldObj, posX + steamDx * 0.25, posY + steamDy * 0.25, posZ + steamDz * 0.25, steamDx * 0.05, steamDy * 0.05, steamDz * 0.05, energySpendPerCycle * 0.75F < 1 ? 1 : energySpendPerCycle * 0.75F));\n }\n }\n if (currentDockingStation != null) {\n motionX = 0;\n motionY = 0;\n motionZ = 0;\n posX = currentDockingStation.x() + 0.5F + currentDockingStation.side().offsetX * 0.5F;\n posY = currentDockingStation.y() + 0.5F + currentDockingStation.side().offsetY * 0.5F;\n posZ = currentDockingStation.z() + 0.5F + currentDockingStation.side().offsetZ * 0.5F;\n }\n if (!worldObj.isRemote) {\n if (linkedDockingStation == null) {\n linkedDockingStation = RobotRegistry.getRegistry(worldObj).getStation(linkedDockingStationIndex.x, linkedDockingStationIndex.y, linkedDockingStationIndex.z, linkedDockingStationSide);\n linkedDockingStationIndex = null;\n if (linkedDockingStation == null || linkedDockingStation.robotTaking() != this) {\n setDead();\n return;\n }\n }\n if (currentDockingStationIndex != null && currentDockingStation == null) {\n currentDockingStation = (DockingStation) RobotRegistry.getRegistry(worldObj).getStation(currentDockingStationIndex.x, currentDockingStationIndex.y, currentDockingStationIndex.z, currentDockingStationSide);\n currentDockingStationIndex = null;\n }\n if (linkedDockingStation != null) {\n mainAI.cycle();\n if (energySpendPerCycle != (float) mainAI.getActiveAI().getEnergyCost()) {\n energySpendPerCycle = (float) mainAI.getActiveAI().getEnergyCost();\n needsUpdate = true;\n }\n if (mjStored <= 0) {\n setDead();\n }\n }\n }\n super.onEntityUpdate();\n}\n"
|
"public static void writeKeysToContacts(Context context) {\n ContentResolver resolver = context.getContentResolver();\n Cursor cursor = resolver.query(KeychainContract.KeyRings.buildUnifiedKeyRingsUri(), KEYS_TO_CONTACT_PROJECTION, null, null, null);\n if (cursor != null) {\n while (cursor.moveToNext()) {\n String[] userId = KeyRing.splitUserId(cursor.getString(0));\n String fingerprint = PgpKeyHelper.convertFingerprintToHex(cursor.getBlob(1));\n String keyIdShort = PgpKeyHelper.convertKeyIdToHexShort(cursor.getLong(2));\n long masterKeyId = cursor.getLong(3);\n int rawContactId = -1;\n Cursor raw = resolver.query(ContactsContract.RawContacts.CONTENT_URI, RAW_CONTACT_ID_PROJECTION, FIND_RAW_CONTACT_SELECTION, new String[] { Constants.PACKAGE_NAME, fingerprint }, null, null);\n if (raw != null) {\n if (raw.moveToNext()) {\n rawContactId = raw.getInt(0);\n }\n raw.close();\n }\n ArrayList<ContentProviderOperation> ops = new ArrayList<ContentProviderOperation>();\n if (rawContactId == -1) {\n ops.add(ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI).withValue(ContactsContract.RawContacts.ACCOUNT_NAME, context.getString(R.string.app_name)).withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, Constants.PACKAGE_NAME).withValue(ContactsContract.RawContacts.SOURCE_ID, fingerprint).build());\n if (userId[0] != null) {\n ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI).withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0).withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE).withValue(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME, userId[0]).build());\n }\n if (userId[1] != null) {\n ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI).withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0).withValue(ContactsContract.Data.MIMETYPE, ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE).withValue(ContactsContract.CommonDataKinds.Email.DATA, userId[1]).build());\n }\n ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI).withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, 0).withValue(ContactsContract.Data.MIMETYPE, Constants.CUSTOM_CONTACT_DATA_MIME_TYPE).withValue(ContactsContract.Data.DATA1, String.format(context.getString(R.string.contact_show_key), keyIdShort)).withValue(ContactsContract.Data.DATA2, masterKeyId).build());\n }\n try {\n resolver.applyBatch(ContactsContract.AUTHORITY, ops);\n } catch (RemoteException e) {\n e.printStackTrace();\n } catch (OperationApplicationException e) {\n e.printStackTrace();\n }\n }\n cursor.close();\n }\n}\n"
|
"public ICategoryProvider getCategoryProvider(Object input) {\n return AttributesUtil.createCategoryProvider(new String[] { null, CATEGORY_KEY_COMMENTS, CATEGORY_KEY_ADVANCEPROPERTY }, new String[] { CATEGORY_KEY_GENERAL }, new String[] { Messages.getString(\"String_Node_Str\") }, new Class[] { CubePage.class });\n}\n"
|
"private static void copyDQDroolsToSrc(ProcessItem processItem) {\n if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQItemService.class)) {\n ITDQItemService tdqItemService = (ITDQItemService) GlobalServiceRegister.getDefault().getService(ITDQItemService.class);\n if (tdqItemService == null) {\n return;\n }\n try {\n ExportFileResource resouece = new ExportFileResource();\n BuildExportManager.getInstance().exportDependencies(resouece, processItem);\n if (resouece.getAllResources().isEmpty()) {\n return;\n }\n final Iterator<String> relativepath = resouece.getRelativePathList().iterator();\n String pathStr = \"String_Node_Str\";\n IRunProcessService runProcessService = CorePlugin.getDefault().getRunProcessService();\n ITalendProcessJavaProject talendProcessJavaProject = runProcessService.getTalendJobJavaProject(processItem.getProperty());\n IFolder targetFolder = talendProcessJavaProject.getResourcesFolder();\n if (targetFolder.exists()) {\n IFolder survFolder = targetFolder.getFolder(new Path(pathStr));\n if (survFolder.exists()) {\n survFolder.delete(true, null);\n }\n while (relativepath.hasNext()) {\n String relativePath = relativepath.next();\n Set<URL> sources = resouece.getResourcesByRelativePath(relativePath);\n for (URL sourceUrl : sources) {\n File currentResource = new File(org.talend.commons.utils.io.FilesUtils.getFileRealPath(sourceUrl.getPath()));\n if (currentResource.exists()) {\n FilesUtils.copyDirectory(currentResource, new File(targetFolder.getLocation().toPortableString() + File.separator + pathStr));\n }\n }\n }\n }\n } catch (Exception exc) {\n log.error(exc);\n }\n }\n}\n"
|
"protected Map<String, Object> createSecStorageVmInstance2(long dataCenterId) {\n long startEventId = saveStartedEvent(User.UID_SYSTEM, Account.ACCOUNT_ID_SYSTEM, EventTypes.EVENT_SSVM_CREATE, \"String_Node_Str\" + dataCenterId, 0);\n HostVO secHost = _hostDao.findSecondaryStorageHost(dataCenterId);\n if (secHost == null) {\n String msg = \"String_Node_Str\" + dataCenterId + \"String_Node_Str\";\n s_logger.warn(msg);\n saveFailedEvent(User.UID_SYSTEM, Account.ACCOUNT_ID_SYSTEM, EventTypes.EVENT_SSVM_CREATE, msg, startEventId);\n throw new CloudRuntimeException(msg);\n }\n _secHostUuid = secHost.getGuid();\n _nfsShare = secHost.getStorageUrl();\n long id = _secStorageVmDao.getNextInSequence(Long.class, \"String_Node_Str\");\n String name = VirtualMachineName.getSystemVmName(id, _instance, \"String_Node_Str\").intern();\n Account systemAcct = _accountMgr.getSystemAccount();\n DataCenterDeployment plan = new DataCenterDeployment(dataCenterId);\n List<NetworkOfferingVO> defaultOffering = _networkMgr.getSystemAccountNetworkOfferings(NetworkOfferingVO.SystemVmPublicNetwork);\n List<NetworkOfferingVO> offerings = _networkMgr.getSystemAccountNetworkOfferings(NetworkOfferingVO.SystemVmControlNetwork, NetworkOfferingVO.SystemVmManagementNetwork);\n List<Pair<NetworkVO, NicProfile>> networks = new ArrayList<Pair<NetworkVO, NicProfile>>(offerings.size() + 1);\n NicProfile defaultNic = new NicProfile();\n defaultNic.setDefaultNic(true);\n defaultNic.setDeviceId(2);\n try {\n networks.add(new Pair<NetworkVO, NicProfile>(_networkMgr.setupNetwork(systemAcct, defaultOffering.get(0), plan, null, null, false).get(0), defaultNic));\n for (NetworkOfferingVO offering : offerings) {\n networks.add(new Pair<NetworkVO, NicProfile>(_networkMgr.setupNetwork(systemAcct, offering, plan, null, null, false).get(0), null));\n }\n } catch (ConcurrentOperationException e) {\n s_logger.info(\"String_Node_Str\" + e);\n return new HashMap<String, Object>();\n }\n SecondaryStorageVmVO secStorageVm = new SecondaryStorageVmVO(id, _serviceOffering.getId(), name, _template.getId(), _template.getGuestOSId(), dataCenterId, systemAcct.getDomainId(), systemAcct.getId());\n try {\n secStorageVm = _itMgr.allocate(secStorageVm, _template, _serviceOffering, networks, plan, null, systemAcct);\n } catch (InsufficientCapacityException e) {\n s_logger.warn(\"String_Node_Str\", e);\n throw new CloudRuntimeException(\"String_Node_Str\", e);\n } catch (ResourceUnavailableException e) {\n s_logger.warn(\"String_Node_Str\", e);\n throw new CloudRuntimeException(\"String_Node_Str\", e);\n }\n Map<String, Object> context = new HashMap<String, Object>();\n context.put(\"String_Node_Str\", secStorageVm.getId());\n return context;\n}\n"
|
"public void updateAggregateData(long contactId) {\n if (!mEnabled) {\n return;\n }\n final SQLiteDatabase db = mOpenHelper.getWritableDatabase();\n final ContentValues values = new ContentValues();\n computeAggregateData(db, contactId, values);\n db.update(Tables.CONTACTS, values, Contacts._ID + \"String_Node_Str\" + contactId, null);\n mAggregatedPresenceReplace.bindLong(1, contactId);\n mAggregatedPresenceReplace.bindLong(2, contactId);\n mAggregatedPresenceReplace.execute();\n}\n"
|
"public void testRecursion_GR531_2() {\n runNegativeTest(new String[] { \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" }, \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n}\n"
|
"public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5) {\n if (!world.isRemote) {\n if (this.getEnergy(itemStack) > energyCost && world.getWorldTime() % 20 == 0) {\n this.discharge(itemStack, 1 * energyCost, true);\n }\n }\n}\n"
|
"public void prepareTestInstance(TestContext testContext) throws Exception {\n StartModule startModuleAnnotation = testContext.getTestClass().getAnnotation(StartModule.class);\n if (startModuleAnnotation != null) {\n if (!lastClassRun.equals(testContext.getTestClass().getSimpleName())) {\n lastClassRun = testContext.getTestClass().getSimpleName();\n if (!Context.isSessionOpen())\n Context.openSession();\n String modulesToLoad = StringUtils.join(startModuleAnnotation.value(), \"String_Node_Str\");\n Properties props = BaseContextSensitiveTest.runtimeProperties;\n props.setProperty(ModuleConstants.RUNTIMEPROPERTY_MODULE_LIST_TO_LOAD, modulesToLoad);\n try {\n ModuleUtil.startup(props);\n } catch (Exception e) {\n System.out.println(\"String_Node_Str\");\n e.printStackTrace(System.out);\n throw e;\n }\n Assert.assertTrue(\"String_Node_Str\" + testContext.getTestClass().getSimpleName() + \"String_Node_Str\" + ModuleFactory.getStartedModules().size() + \"String_Node_Str\" + startModuleAnnotation.value().length, startModuleAnnotation.value().length <= ModuleFactory.getStartedModules().size());\n GenericApplicationContext ctx = new GenericApplicationContext(testContext.getApplicationContext());\n XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader(ctx);\n xmlReader.loadBeanDefinitions(new ClassPathResource(\"String_Node_Str\"));\n ctx.refresh();\n }\n }\n}\n"
|
"private void drawImage(IMovable movable, Image image) {\n ShortPoint2D pos = movable.getPos();\n short x = pos.getX();\n short y = pos.getY();\n drawMovableAt(movable, image, x, y);\n}\n"
|
"public Object clone(Workspace workspace) throws CloneNotSupportedException {\n AFDXESs newObject = (AFDXESs) super.clone(workspace);\n newObject._afdxVLinksQueue = new LinkedHashMap();\n newObject._afdxSchedMuxsQueue = new HashMap();\n newObject._virtualLinkTable = new HashMap();\n newObject._portToVirtualLinks = new HashMap();\n newObject._lastEmissionTable = new HashMap();\n newObject._nextFireTime = _nextFireTime;\n newObject._bitRate = _bitRate;\n return newObject;\n}\n"
|
"public void testCannotGetAnotherConsumersCerts() {\n consumerResource.bind(consumer.getUuid(), pool.getId(), null, null, 1, null, null);\n consumerResource.bind(consumer.getUuid(), pool.getId(), null, null, 1, null, null);\n consumerResource.bind(consumer.getUuid(), pool.getId(), null, null, 1, null, null);\n Consumer evilConsumer = TestUtil.createConsumer(standardSystemType, owner);\n consumerCurator.create(evilConsumer);\n setupPrincipal(new ConsumerPrincipal(evilConsumer));\n securityInterceptor.enable();\n crudInterceptor.enable();\n assertEquals(0, consumerResource.getEntitlementCertificates(consumer.getUuid(), null).size());\n}\n"
|
"private void capturePreview() {\n final CameraFile cf;\n try {\n cf = cameraGphoto.capturePreview();\n } catch (CameraException e) {\n LOGGER.error(\"String_Node_Str\", e);\n setStop(true);\n return;\n }\n if (cf == null) {\n LOGGER.error(\"String_Node_Str\");\n return;\n }\n String imagePath = tempStoragePath + \"String_Node_Str\" + +camera.getId() + \"String_Node_Str\";\n try {\n cf.save(new File(imagePath).getAbsolutePath());\n } catch (CameraException e) {\n LOGGER.error(\"String_Node_Str\", imagePath, e);\n setStop(true);\n } finally {\n CameraUtils.closeQuietly(cf);\n }\n try {\n imageProcessor.processPreview(imagePath);\n } catch (ServiceException e) {\n if (!shouldStop) {\n LOGGER.error(\"String_Node_Str\", e);\n }\n }\n}\n"
|
"private void configureTls() {\n if (tlsEnabled == false) {\n return;\n try {\n TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());\n trustManagerFactory.init(keyStore);\n X509TrustManager defaultTrustManager = (X509TrustManager) trustManagerFactory.getTrustManagers()[0];\n context = SSLContext.getInstance(sslContext);\n context.init(null, new TrustManager[] { defaultTrustManager }, null);\n sslSocketFactory = context.getSocketFactory();\n ((HttpsURLConnection) connection).setSSLSocketFactory(sslSocketFactory);\n if (strictHostVerification == false) {\n ((HttpsURLConnection) connection).setHostnameVerifier(new SoapHostnameVerifier());\n }\n } catch (GeneralSecurityException e) {\n throw new SoapClientException(\"String_Node_Str\", e);\n }\n}\n"
|
"public void transformFrequencies(final Object spectrum, final float sampleRate, final int offset, final int powOf2NearestLength, final int length, final float soundLevelInDB) {\n final int percent = (int) Math.floor(100.0 * (offset / this.step) / (this.input.getSamplesLength() / this.step));\n if (percent > Math.floor(100.0 * ((offset - this.step) / this.step) / (this.input.getSamplesLength() / this.step))) {\n this.log(new LogEvent(PeakFindSoundTransformEventCode.ITERATION_IN_PROGRESS, (int) (offset / this.step), (int) Math.ceil(this.input.getSamplesLength() / this.step), percent));\n }\n float f0 = 0;\n if (soundLevelInDB > 30 || this.note) {\n final float[] peaks = new float[10];\n for (int i = 1; i <= 10; i++) {\n peaks[i - 1] = this.f0(spectrum, sampleRate, i);\n }\n Arrays.sort(peaks);\n f0 = this.bestCandidate(peaks);\n }\n if (this.note) {\n this.detectedNoteVolume = soundLevelInDB;\n }\n this.loudestfreqs[(int) (offset / this.step)] = f0;\n}\n"
|
"private static int endgameKQKP(Board board, boolean whiteDominant) {\n long ranks12 = whiteDominant ? BitboardUtils.R1 | BitboardUtils.R2 : BitboardUtils.R7 | BitboardUtils.R8;\n long pawn = board.pawns;\n long pawnZone;\n if ((BitboardUtils.A & pawn) != 0) {\n pawnZone = (BitboardUtils.FILES_LEFT[3]) & ranks12;\n } else if ((BitboardUtils.C & pawn) != 0) {\n pawnZone = (BitboardUtils.FILES_LEFT[4]) & ranks12;\n } else if ((BitboardUtils.F & pawn) != 0) {\n pawnZone = (BitboardUtils.FILES_RIGHT[3]) & ranks12;\n } else if ((BitboardUtils.F & pawn) != 0) {\n pawnZone = (BitboardUtils.FILES_RIGHT[4]) & ranks12;\n } else {\n return Evaluator.NO_VALUE;\n }\n long dominantKing = board.kings & (whiteDominant ? board.whites : board.blacks);\n long otherKing = board.kings & (whiteDominant ? board.blacks : board.whites);\n int dominantKingIndex = BitboardUtils.square2Index(dominantKing);\n int pawnIndex = BitboardUtils.square2Index(pawn);\n if ((pawnZone & otherKing) != 0 && BitboardUtils.distance(dominantKingIndex, pawnIndex) >= 2) {\n return Evaluator.DRAW;\n }\n return Evaluator.NO_VALUE;\n}\n"
|
"public void run() {\n try {\n startup();\n if (this.train instanceof ResilientPropagation) {\n ResilientPropagation rprop = (ResilientPropagation) this.train;\n }\n while (!this.cancel) {\n this.iteration++;\n this.lastError = this.train.getError();\n if (this.resetOption.get() != -1) {\n MLMethod method = null;\n if (getEncogObject() instanceof ProjectEGFile) {\n method = (MLMethod) ((ProjectEGFile) getEncogObject()).getObject();\n }\n if (method == null) {\n EncogWorkBench.displayError(\"String_Node_Str\", \"String_Node_Str\");\n return;\n }\n switch(this.resetOption.get()) {\n case 0:\n if (this.getEncogObject() instanceof MLResettable) {\n ((MLResettable) this.getEncogObject()).reset();\n } else {\n EncogWorkBench.displayError(\"String_Node_Str\", \"String_Node_Str\");\n }\n break;\n case 1:\n (new Distort(0.01)).randomize((MLMethod) getEncogObject());\n break;\n case 2:\n (new Distort(0.05)).randomize((MLMethod) getEncogObject());\n break;\n case 3:\n (new Distort(0.1)).randomize((MLMethod) getEncogObject());\n break;\n case 4:\n (new Distort(0.15)).randomize((MLMethod) getEncogObject());\n break;\n case 5:\n (new Distort(0.20)).randomize((MLMethod) getEncogObject());\n break;\n case 6:\n (new Distort(0.50)).randomize((MLMethod) getEncogObject());\n break;\n }\n this.resetOption.set(-1);\n }\n this.train.iteration();\n this.currentError = this.train.getError();\n if (this.currentError < this.maxError) {\n this.status = \"String_Node_Str\";\n this.cancel = true;\n }\n if (this.train.isTrainingDone()) {\n this.status = \"String_Node_Str\";\n this.cancel = true;\n }\n this.errorImprovement = (this.lastError - this.currentError) / this.lastError;\n if (System.currentTimeMillis() - this.lastUpdate > 1000 || this.cancel) {\n redraw();\n }\n final Date now = new Date();\n if (now.getTime() - this.performanceLast.getTime() > 60000) {\n this.performanceLast = now;\n this.performanceCount = this.iteration - this.performanceLastIteration;\n this.performanceLastIteration = this.iteration;\n }\n }\n this.train.finishTraining();\n shutdown();\n stopped();\n if (this.shouldExit) {\n dispose();\n }\n } catch (Throwable t) {\n shutdown();\n stopped();\n dispose();\n }\n}\n"
|
"private Type getReturnType(ErrorContext logger, RFMethod method) {\n logger = logger.setMethod(method);\n final String[] returnType = { objectType.getInternalName() };\n String signature = method.getSignature();\n final int expectedCount;\n if (method.getReturnType().equals(instanceRequestIntf)) {\n expectedCount = 2;\n } else if (method.getReturnType().equals(requestIntf)) {\n expectedCount = 1;\n } else {\n logger.spam(\"String_Node_Str\" + signature);\n return Type.getObjectType(returnType[0]);\n }\n new SignatureReader(signature).accept(new SignatureAdapter() {\n public SignatureVisitor visitReturnType() {\n return new SignatureAdapter() {\n int count;\n public SignatureVisitor visitTypeArgument(char wildcard) {\n if (++count == expectedCount) {\n return new SignatureAdapter() {\n public void visitClassType(String name) {\n returnType[0] = name;\n }\n };\n }\n return super.visitTypeArgument(wildcard);\n }\n };\n }\n });\n logger.spam(\"String_Node_Str\" + returnType[0]);\n return Type.getObjectType(returnType[0]);\n}\n"
|
"public Domain getUserDomian() {\n if (getBinsData() != null) {\n List<SliceEntity> tableData = (List<SliceEntity>) getBinsData();\n Domain userDomain = DomainHelper.createDomain(\"String_Node_Str\");\n for (SliceEntity entity : tableData) {\n try {\n double min = TextFormatFactory.createLocalFormatValue(entity.getLowValue()).doubleValue();\n double max = TextFormatFactory.createLocalFormatValue(entity.getHighValue()).doubleValue();\n RangeRestriction rangeRestriction = DomainHelper.createRealRangeRestriction(min, max);\n userDomain.getRanges().add(rangeRestriction);\n } catch (Exception e) {\n }\n }\n return userDomain;\n }\n return null;\n}\n"
|
"public JSType negate() {\n if (isTop() || isUnknown()) {\n return this;\n }\n if (isTruthy()) {\n return FALSY;\n } else if (isFalsy()) {\n return TRUTHY;\n } else if (objs == null && typeVar == null) {\n return new JSType(TOP_SCALAR_MASK & ~mask);\n }\n return UNKNOWN.removeType(this);\n}\n"
|
"private void loadSection0() {\n if (((PreferencesActivity) getActivity()).getRestartActivity()) {\n ((PreferencesActivity) getActivity()).restartActivity(getActivity());\n }\n addPreferencesFromResource(R.xml.color_prefs);\n if (Build.VERSION.SDK_INT >= 21) {\n findPreference(KEY_COLOREDNAV).setEnabled(true);\n }\n}\n"
|
"public void decreasRowSpanInDesign() {\n data.decreasRowSpanInDesign();\n}\n"
|
"public byte[] serializeData(E data) throws SerializeException {\n checkIfBuildCalled();\n try {\n return gson.toJson(data, Data.class).getBytes();\n } catch (JsonParseException e) {\n throw new SerializeException(e);\n }\n}\n"
|
"public void testGroovyBug() {\n runConformTest(new String[] { \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" }, \"String_Node_Str\");\n}\n"
|
"private void validateMessageSize(long messageSize) throws ProtocolDecoderException {\n if (maxMessageSize > 0 && (messageSize < 0 || messageSize > maxMessageSize)) {\n throw new WSMessageTooLongException(String.format(\"String_Node_Str\", messageSize, maxMessageSize));\n }\n}\n"
|
"private void onRemoveLeadingScoreColumns(RemoveLeadingScoreColumnsEvent event) {\n List<ARankColumnModel> columns = this.table.getColumns();\n boolean hasOne = false;\n Collection<ARankColumnModel> toremove = new ArrayList<>();\n for (ARankColumnModel col : columns) {\n if (col instanceof ScoreRankColumnModel || col instanceof StackedRankColumnModel || col instanceof MaxRankColumnModel) {\n hasOne = true;\n toremove.add(col);\n } else if (hasOne)\n break;\n }\n for (ARankColumnModel col : toremove) {\n table.remove(col);\n }\n}\n"
|
"protected void onResume() {\n super.onResume();\n IntentFilter filter = new IntentFilter();\n filter.addAction(TalkServerIntent.INTENT_NEW_MESSAGES.toString());\n registerReceiver(receiver, filter);\n setContentView(R.layout.main);\n talkListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n public void onItemClick(AdapterView<?> parentView, View childView, int position, long id) {\n GeoCamTalkMessage msg = adapter.getTalkMessage(position);\n if (msg.hasAudio()) {\n try {\n UIUtils.playAudio(getApplicationContext(), msg, player, siteAuth);\n } catch (Exception e) {\n UIUtils.displayException(getApplicationContext(), e, \"String_Node_Str\");\n }\n }\n }\n });\n populateListView();\n super.onResume();\n}\n"
|
"public static IProject getRootProject() {\n IProjectAdapterService projectAdapter = (IProjectAdapterService) GlobalServiceRegister.getDefault().getService(IProjectAdapterService.class);\n IProject rootProject = null;\n try {\n IProjectAdapterService projectAdapter = (IProjectAdapterService) GlobalServiceRegister.getDefault().getService(IProjectAdapterService.class);\n if (projectAdapter != null) {\n rootProject = projectAdapter.getRootProject();\n }\n } catch (RuntimeException e) {\n Log.warn(e, e);\n rootProject = ResourcesPlugin.getWorkspace().getRoot().getProject(DEFAULT_PROJECT_NAME);\n }\n PluginConstant.setRootProjectName(rootProject.getName());\n return rootProject;\n}\n"
|
"public void registerRecordPerspective(RecordPerspective recordPerspective) {\n if (recordPerspective.getPerspectiveID() == null)\n throw new IllegalStateException(\"String_Node_Str\" + recordPerspective);\n if (!recordPerspective.getIdType().equals(dataDomain.getRecordIDType()))\n throw new IllegalStateException(\"String_Node_Str\" + recordPerspective.getIdType());\n hashRecordPerspectives.put(recordPerspective.getID(), recordPerspective);\n if (recordPerspective.isDefault()) {\n if (defaultRecordPerspective != null)\n throw new IllegalStateException(\"String_Node_Str\");\n defaultRecordPerspective = recordPerspective;\n }\n DataDomainUpdateEvent event = new DataDomainUpdateEvent(dataDomain);\n event.setSender(this);\n GeneralManager.get().getEventPublisher().triggerEvent(event);\n}\n"
|
"private boolean isBatteryUpdateInteresting(int batteryStatus, int batteryLevel) {\n final boolean isPluggedIn = isPluggedIn(batteryStatus);\n final boolean wasPluggedIn = isPluggedIn(mBatteryStatus);\n final boolean stateChangedWhilePluggedIn = wasPluggedIn == true && isPluggedIn == true && (mBatteryStatus != batteryStatus);\n if (wasPluggedIn != isPluggedIn || stateChangedWhilePluggedIn) {\n return true;\n }\n if (mBatteryLevel != batteryLevel) {\n return true;\n }\n if (!isPluggedIn) {\n if (isBatteryLow(batteryLevel) && batteryLevel != mBatteryLevel) {\n return true;\n }\n }\n return false;\n}\n"
|
"public void shouldExecuteRaiseAnExceptionIfTheListOfSolutionsIsNull() {\n exception.expect(JMetalException.class);\n exception.expectMessage(containsString(\"String_Node_Str\"));\n NaryTournamentSelection<IntegerSolution> selection = new NaryTournamentSelection<>();\n List<IntegerSolution> population;\n population = null;\n selection.execute(population);\n}\n"
|
"public int offset_and_kind() {\n return this.buffer.getInt(this.buffer_offset * 8);\n}\n"
|
"public void preInitialize(AbstractSession session) throws DescriptorException {\n getAttributeAccessor().setIsWriteOnly(this.isWriteOnly());\n getAttributeAccessor().setIsReadOnly(this.isReadOnly());\n super.preInitialize(session);\n ArrayList<XMLMapping> mappingsList = new ArrayList<XMLMapping>();\n mappingsList.addAll(getChoiceElementMappings().values());\n for (XMLMapping next : getChoiceElementMappingsByClass().values()) {\n if (!(mappingsList.contains(next))) {\n mappingsList.add(next);\n }\n }\n for (XMLMapping next : getChoiceElementMappingsByClass().values()) {\n if (!(mappingsList.contains(next))) {\n mappingsList.add(next);\n }\n }\n Iterator<XMLMapping> mappings = mappingsList.iterator();\n while (mappings.hasNext()) {\n DatabaseMapping nextMapping = (DatabaseMapping) mappings.next();\n nextMapping.setAttributeName(this.getAttributeName());\n if (nextMapping.getAttributeAccessor() == temporaryAccessor) {\n nextMapping.setAttributeAccessor(getAttributeAccessor());\n }\n nextMapping.setIsReadOnly(this.isReadOnly());\n ((XMLMapping) nextMapping).setIsWriteOnly(this.isWriteOnly());\n nextMapping.setDescriptor(getDescriptor());\n nextMapping.preInitialize(session);\n }\n}\n"
|
"void injectMembers(T t, Errors errors, InternalContext context, boolean toolableOnly) {\n for (int i = 0, size = memberInjectors.size(); i < size; i++) {\n SingleMemberInjector injector = memberInjectors.get(i);\n if (!toolableOnly || injector.getInjectionPoint().isToolable()) {\n injector.inject(errors, context, t);\n }\n }\n if (!toolableOnly) {\n for (MembersInjector<? super T> userMembersInjector : userMembersInjectors) {\n try {\n userMembersInjector.injectMembers(t);\n } catch (RuntimeException e) {\n errors.errorInUserInjector(userMembersInjector, typeLiteral, e);\n }\n }\n }\n}\n"
|
"private boolean matches(INode element, int lastSelectorItemInd) {\n if (!(element instanceof IElementNode)) {\n return false;\n }\n if (lastSelectorItemInd < 0) {\n return true;\n }\n boolean isPseudoElement = element instanceof CssPseudoElementNode;\n for (int i = lastSelectorItemInd; i >= 0; i--) {\n if (isPseudoElement && i < lastSelectorItemInd) {\n element = element.parentNode();\n isPseudoElement = false;\n }\n ICssSelectorItem currentItem = selectorItems.get(i);\n if (currentItem instanceof CssSeparatorSelectorItem) {\n char separator = ((CssSeparatorSelectorItem) currentItem).getSeparator();\n switch(separator) {\n case '>':\n return matches(element.parentNode(), i - 1);\n case ' ':\n {\n INode parent = element.parentNode();\n while (parent != null) {\n boolean parentMatches = matches(parent, i - 1);\n if (parentMatches) {\n return true;\n } else {\n parent = parent.parentNode();\n }\n }\n return false;\n }\n case '~':\n {\n INode parent = element.parentNode();\n if (parent != null) {\n int indexOfElement = parent.childNodes().indexOf(element);\n for (int j = indexOfElement - 1; j >= 0; j--) {\n if (matches(parent.childNodes().get(j), i - 1)) {\n return true;\n }\n }\n }\n return false;\n }\n case '+':\n {\n INode parent = element.parentNode();\n if (parent != null) {\n int indexOfElement = parent.childNodes().indexOf(element);\n INode previousElement = null;\n for (int j = indexOfElement - 1; j >= 0; j--) if (parent.childNodes().get(j) instanceof IElementNode) {\n previousElement = parent.childNodes().get(j);\n break;\n }\n if (previousElement != null)\n return indexOfElement > 0 && matches(previousElement, i - 1);\n }\n return false;\n }\n default:\n return false;\n }\n } else {\n if (!currentItem.matches(element)) {\n return false;\n }\n }\n }\n return true;\n}\n"
|
"public void onDraw(Canvas canvas, int centerX, int centerY) {\n if (!mVisible) {\n return;\n }\n mArcBounds = new RectF(centerX - mProgressRadius, centerY - mProgressRadius, centerX + mProgressRadius, centerY + mProgressRadius);\n canvas.drawCircle(centerX, centerY, mProgressRadius, mProgressBasePaint);\n canvas.drawArc(mArcBounds, -90, mProgressAngleDegrees, false, mProgressPaint);\n if (mProgressAngleDegrees == 360 && System.currentTimeMillis() > mTimeToHide) {\n mVisible = false;\n if (mVisibilityListener != null) {\n mVisibilityListener.onHidden();\n }\n }\n}\n"
|
"protected ProjectRepairFacade getProjectConfiguration(String location, String projectIdentifier, String method, List<String> failingTestCases, String dependencies, boolean srcWithMain) throws Exception {\n if (projectIdentifier == null || projectIdentifier.equals(\"String_Node_Str\")) {\n File locFile = new File(location);\n projectIdentifier = locFile.getName();\n }\n String projectUnderRepairKeyFolder = File.separator + method + \"String_Node_Str\" + projectIdentifier + File.separator;\n String workingdir = ConfigurationProperties.getProperty(\"String_Node_Str\");\n String workingDirForSource = workingdir + projectUnderRepairKeyFolder + \"String_Node_Str\";\n String workingDirForBytecode = workingdir + projectUnderRepairKeyFolder + \"String_Node_Str\";\n String originalProjectRoot = location + File.separator;\n ProjectConfiguration properties = new ProjectConfiguration();\n properties.setWorkingDirRoot(workingdir + projectUnderRepairKeyFolder);\n properties.setWorkingDirForSource(workingDirForSource);\n properties.setWorkingDirForBytecode(workingDirForBytecode);\n properties.setFixid(projectIdentifier);\n properties.setOriginalProjectRootDir(originalProjectRoot);\n determineSourceFolders(properties, srcWithMain, originalProjectRoot);\n if (dependencies != null) {\n properties.setDependencies(dependencies);\n }\n if (!ConfigurationProperties.getPropertyBool(\"String_Node_Str\")) {\n String originalBin = determineBinFolder(originalProjectRoot, ConfigurationProperties.getProperty(\"String_Node_Str\"));\n properties.setOriginalAppBinDir(originalBin);\n String originalBinTest = determineBinFolder(originalProjectRoot, ConfigurationProperties.getProperty(\"String_Node_Str\"));\n properties.setOriginalTestBinDir(originalBinTest);\n }\n properties.setFailingTestCases(failingTestCases);\n properties.setPackageToInstrument(ConfigurationProperties.getProperty(\"String_Node_Str\"));\n properties.setDataFolder(ConfigurationProperties.getProperty(\"String_Node_Str\"));\n ProjectRepairFacade ce = new ProjectRepairFacade(properties);\n return ce;\n}\n"
|
"private File pathToFile(Path path) {\n if (!path.isAbsolute()) {\n curPath = new Path(getWorkingDirectory(), path);\n }\n return new File(path.toUri().getPath());\n}\n"
|
"public void loadPipe(ItemPipe par1, int id, Class<? extends Pipe> par2) {\n try {\n Pipe pipe = (Pipe) par2.getConstructor(new Class[] { Integer.TYPE }).newInstance(new Object[] { Integer.valueOf(id) });\n MinecraftForgeClient.registerItemRenderer(par1.itemID, ItemRenderSpmodCore.instance);\n if (pipe != null) {\n par1.setPipesIcons(pipe.getIconProvider());\n par1.setPipeIconIndex(pipe.getIconIndex(ForgeDirection.UNKNOWN));\n }\n } catch (Exception e) {\n }\n}\n"
|
"private void set(Property lastProperty, DataObject lastDataObject, int numInLastProperty, Object value, boolean convertValue) {\n if (numInLastProperty == -1) {\n if (lastDataObject != null) {\n if (convertValue) {\n DataHelper dataHelper = ((SDODataObject) lastDataObject).getType().getHelperContext().getDataHelper();\n value = dataHelper.convert(lastProperty, value);\n }\n lastDataObject.set(lastProperty, value);\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n } else {\n List objects = lastDataObject.getList(lastProperty);\n if (convertValue) {\n value = DataHelper.INSTANCE.convert(lastProperty.getType(), value);\n }\n Sequence seq = lastDataObject.getSequence();\n if (seq != null) {\n seq.setValue(numInLastProperty, value);\n } else {\n objects.set(numInLastProperty, value);\n }\n }\n}\n"
|
"public CodeLocation getLocation() {\n return this.location;\n}\n"
|
"public UserTO executeWorkflow(final UserTO userTO, final String taskId) throws WorkflowException, NotFoundException, UnauthorizedRoleException, PropagationException {\n LOG.debug(\"String_Node_Str\", taskId, userTO.getId());\n WorkflowResult<Long> updated = wfAdapter.execute(userTO, taskId);\n List<PropagationTask> tasks = propagationManager.getUpdateTaskIds(updated, null);\n propagationManager.execute(tasks);\n notificationManager.createTasks(updated);\n final UserTO savedTO = dataBinder.getUserTO(updated.getResult());\n LOG.debug(\"String_Node_Str\", savedTO);\n return savedTO;\n}\n"
|
"public void creationTest() throws RecognitionException, SQLException, IOException {\n RdfViewSystemOld.initSparqlifyFunctions();\n DatatypeSystem datatypeSystem = SparqlifyUtils.createDefaultDatatypeSystem();\n SqlTranslator sqlTranslator = new SqlTranslatorImpl(datatypeSystem);\n DataSource dataSource = SparqlifyUtils.createTestDatabase();\n Connection conn = dataSource.getConnection();\n Map<String, String> typeAlias = MapReader.readFile(new File(\"String_Node_Str\"));\n SqlExprSerializer serExpr = null;\n SqlFunctionSerializer serFn = null;\n ViewDefinitionFactory vdf = SparqlifyUtils.createViewDefinitionFactory(conn, typeAlias);\n ViewDefinition personView = vdf.create(\"String_Node_Str\");\n ViewDefinition deptView = vdf.create(\"String_Node_Str\");\n ViewDefinition personToDeptView = vdf.create(\"String_Node_Str\");\n ViewDefinition personAgeView = vdf.create(\"String_Node_Str\");\n ViewDefinition personAndAgeView = vdf.create(\"String_Node_Str\");\n CandidateViewSelector candidateViewSelector = new CandidateViewSelectorImpl();\n candidateViewSelector.addView(personView);\n candidateViewSelector.addView(deptView);\n candidateViewSelector.addView(personAndAgeView);\n SparqlSqlRewriter rewriter = SparqlifyUtils.createTestRewriter(candidateViewSelector, datatypeSystem);\n QueryExecutionFactory qef = new QueryExecutionFactorySparqlifyDs(rewriter, dataSource);\n {\n QueryExecution qe = qef.createQueryExecution(\"String_Node_Str\");\n ResultSet rs = qe.execSelect();\n String rsStr = ResultSetFormatter.asText(rs);\n System.out.println(rsStr);\n }\n}\n"
|
"public void removeConflicts(String txId, Iterable<String> paths) {\n Optional<RocksDBReference> dbRefOpt = getDb(txId);\n if (!dbRefOpt.isPresent()) {\n return;\n }\n try (RocksDBReference dbRef = dbRefOpt.get();\n WriteOptions writeOptions = new WriteOptions();\n WriteBatch batch = new WriteBatch()) {\n writeOptions.setSync(true);\n for (String path : paths) {\n dbRef.db().remove(writeOptions, key(path));\n }\n writeOptions.sync();\n } catch (RocksDBException e) {\n propagate(e);\n }\n}\n"
|
"public void testSMGetMissAll() {\n try {\n keyList = new ArrayList<String>();\n for (int i = 0; i < 10; i++) {\n mc.delete(KEY + i).get();\n keyList.add(KEY + i);\n }\n } catch (Exception e) {\n fail(e.getMessage());\n }\n SMGetMode smgetMode = SMGetMode.UNIQUE;\n SMGetFuture<List<SMGetElement<Object>>> oldFuture = mc.asyncBopSortMergeGet(keyList, 1, 2, ElementFlagFilter.DO_NOT_FILTER, 0, 10);\n try {\n List<SMGetElement<Object>> map = oldFuture.get(1000L, TimeUnit.SECONDS);\n Assert.assertTrue(map.isEmpty());\n Assert.assertEquals(oldFuture.getMissedKeyList().toString(), 10, oldFuture.getMissedKeyList().size());\n } catch (Exception e) {\n oldFuture.cancel(true);\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n SMGetFuture<List<SMGetElement<Object>>> future = mc.asyncBopSortMergeGet(keyList, 1, 2, ElementFlagFilter.DO_NOT_FILTER, 10, smgetMode);\n try {\n List<SMGetElement<Object>> map = future.get(1000L, TimeUnit.SECONDS);\n Assert.assertTrue(map.isEmpty());\n Assert.assertEquals(future.getMissedKeys().toString(), 10, future.getMissedKeys().size());\n } catch (Exception e) {\n future.cancel(true);\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n}\n"
|
"public QName getTypeRef() {\n if (this.relationshipType.getDerivedFrom() != null) {\n return this.relationshipType.getDerivedFrom().getTypeRef();\n }\n return null;\n}\n"
|
"public void build(Progress p) throws IOException, JobFailedException, JobCancelledException {\n if (p != null) {\n p.starting();\n }\n MapOp mo = _inputs.get(0);\n String inputPath = null;\n if (mo instanceof VectorReaderMapOp) {\n VectorReaderMapOp vmo = (VectorReaderMapOp) mo;\n inputPath = vmo.getOutputName();\n }\n PgQueryDriver pgd = new PgQueryDriver();\n pgd.setUsername(_username);\n pgd.setPassword(_password);\n pgd.setDbConnection(_dbconnection);\n pgd.run(createConfiguration(), new Path(inputPath), new Path(_outputName), p, jobListener);\n _output = new BasicInputFormatDescriptor(_outputName);\n if (p != null) {\n p.complete();\n }\n}\n"
|
"public void putAll(Map<? extends K, ? extends V> map, final boolean replaceExistingValues) {\n ensureOpen();\n long start = statisticsEnabled() ? System.nanoTime() : 0;\n long now = System.currentTimeMillis();\n if (map.containsKey(null)) {\n throw new NullPointerException(\"String_Node_Str\");\n }\n CacheException exception = null;\n RICacheEventEventDispatcher<K, V> dispatcher = new RICacheEventEventDispatcher<K, V>();\n try {\n boolean isWriteThrough = configuration.isWriteThrough() && cacheWriter != null;\n ArrayList<Cache.Entry<? extends K, ? extends V>> entriesToWrite = new ArrayList<Cache.Entry<? extends K, ? extends V>>();\n HashSet<K> keysToPut = new HashSet<K>();\n for (Map.Entry<? extends K, ? extends V> entry : map.entrySet()) {\n K key = entry.getKey();\n V value = entry.getValue();\n if (value == null) {\n throw new NullPointerException(\"String_Node_Str\" + key + \"String_Node_Str\");\n }\n lockManager.lock(key);\n keysToPut.add(key);\n if (isWriteThrough) {\n entriesToWrite.add(new RIEntry<K, V>(key, value));\n }\n }\n if (isWriteThrough) {\n try {\n cacheWriter.writeAll(entriesToWrite);\n } catch (CacheException e) {\n exception = e;\n }\n for (Entry entry : entriesToWrite) {\n keysToPut.remove(entry.getKey());\n }\n }\n for (K key : keysToPut) {\n V value = map.get(key);\n Object internalKey = keyConverter.toInternal(key);\n Object internalValue = valueConverter.toInternal(value);\n RICachedValue cachedValue = entries.get(internalKey);\n boolean isExpired = cachedValue != null && cachedValue.isExpiredAt(now);\n if (cachedValue == null || isExpired) {\n if (isExpired) {\n V expiredValue = valueConverter.fromInternal(cachedValue.get());\n dispatcher.addEvent(CacheEntryExpiredListener.class, new RICacheEntryEvent<K, V>(this, key, expiredValue));\n }\n Duration duration;\n try {\n duration = expiryPolicy.getTTLForCreatedEntry(new RIEntry<K, V>(key, value));\n } catch (Throwable t) {\n duration = getDefaultDuration();\n }\n long expiryTime = duration.getAdjustedTime(now);\n cachedValue = new RICachedValue(internalValue, now, expiryTime);\n entries.put(internalKey, cachedValue);\n dispatcher.addEvent(CacheEntryCreatedListener.class, new RICacheEntryEvent<K, V>(this, key, value));\n } else if (replaceExistingValues) {\n V oldValue = valueConverter.fromInternal(cachedValue.get());\n try {\n Duration duration = expiryPolicy.getTTLForModifiedEntry(new RIEntry<K, V>(key, value, oldValue));\n if (duration != null) {\n long expiryTime = duration.getAdjustedTime(now);\n cachedValue.setExpiryTime(expiryTime);\n }\n } catch (Throwable t) {\n }\n cachedValue.setInternalValue(internalValue, now);\n dispatcher.addEvent(CacheEntryUpdatedListener.class, new RICacheEntryEvent<K, V>(this, key, value, oldValue));\n }\n }\n } finally {\n for (Map.Entry<? extends K, ? extends V> entry : map.entrySet()) {\n K key = entry.getKey();\n V value = entry.getValue();\n lockManager.unLock(key);\n }\n }\n dispatcher.dispatch(cacheEntryListenerRegistrations.values());\n if (statisticsEnabled()) {\n statistics.increaseCachePuts(map.size());\n statistics.addPutTimeNano(System.nanoTime() - start);\n }\n if (exception != null) {\n throw exception;\n }\n}\n"
|
"public void modifyText(ModifyEvent e) {\n try {\n if (index == 2) {\n boolean isUniqueName = isUnique(tx.getText(), data);\n if (!isUniqueName)\n updateStatus(getMiscStatus(IStatus.ERROR, Messages.getString(\"String_Node_Str\")));\n else\n updateStatus(getOKStatus());\n }\n Object txText = tx.getText();\n if (tx.getText().trim().length() == 0)\n txText = null;\n Utility.setProperty(data, cellProperties[index], txText);\n } catch (Exception e1) {\n ExceptionHandler.handle(e1);\n }\n}\n"
|
"public static void tearDownAfterClass() throws Exception {\n if (checkIfServerRunning()) {\n node.close();\n }\n KunderaMetadata.INSTANCE.setApplicationMetadata(null);\n}\n"
|
"public TypeInfo createTypeInfoFor(JavaClass javaClass) {\n if (javaClass == null) {\n return null;\n }\n if (typeInfo.containsKey(javaClass.getQualifiedName())) {\n return typeInfo.get(javaClass.getQualifiedName());\n }\n TypeInfo info = null;\n if (javaClass.isEnum()) {\n info = new EnumTypeInfo(helper);\n } else {\n info = new TypeInfo(helper);\n }\n if (helper.isAnnotationPresent(javaClass, XmlTransient.class)) {\n info.setTransient(true);\n }\n JavaMethod factoryMethod = this.factoryMethods.get(javaClass.getRawName());\n if (factoryMethod != null) {\n info.setFactoryMethodName(factoryMethod.getName());\n info.setObjectFactoryClassName(factoryMethod.getOwningClass().getRawName());\n JavaClass[] paramTypes = factoryMethod.getParameterTypes();\n if (paramTypes != null && paramTypes.length > 0) {\n String[] paramTypeNames = new String[paramTypes.length];\n for (int i = 0; i < paramTypes.length; i++) {\n paramTypeNames[i] = paramTypes[i].getRawName();\n }\n info.setFactoryMethodParamTypes(paramTypeNames);\n }\n }\n JavaPackage pack = javaClass.getPackage();\n if (helper.isAnnotationPresent(pack, XmlJavaTypeAdapters.class)) {\n XmlJavaTypeAdapters adapters = (XmlJavaTypeAdapters) helper.getAnnotation(pack, XmlJavaTypeAdapters.class);\n XmlJavaTypeAdapter[] adapterArray = adapters.value();\n for (XmlJavaTypeAdapter next : adapterArray) {\n JavaClass adapterClass = helper.getJavaClass(next.value());\n JavaClass boundType = helper.getJavaClass(next.type());\n if (boundType != null) {\n info.addAdapterClass(adapterClass, boundType);\n } else {\n }\n }\n }\n if (helper.isAnnotationPresent(javaClass, XmlJavaTypeAdapters.class)) {\n XmlJavaTypeAdapters adapters = (XmlJavaTypeAdapters) helper.getAnnotation(javaClass, XmlJavaTypeAdapters.class);\n XmlJavaTypeAdapter[] adapterArray = adapters.value();\n for (XmlJavaTypeAdapter next : adapterArray) {\n JavaClass adapterClass = helper.getJavaClass(next.value());\n JavaClass boundType = helper.getJavaClass(next.type());\n if (boundType != null) {\n info.addAdapterClass(adapterClass, boundType);\n }\n }\n }\n NamespaceInfo packageNamespace = getNamespaceInfoForPackage(pack);\n if (helper.isAnnotationPresent(pack, XmlSchemaTypes.class)) {\n XmlSchemaTypes types = (XmlSchemaTypes) helper.getAnnotation(pack, XmlSchemaTypes.class);\n XmlSchemaType[] typeArray = types.value();\n for (XmlSchemaType next : typeArray) {\n processSchemaType(next);\n }\n } else if (helper.isAnnotationPresent(pack, XmlSchemaType.class)) {\n processSchemaType((XmlSchemaType) helper.getAnnotation(pack, XmlSchemaType.class));\n }\n String[] propOrder = new String[] { \"String_Node_Str\" };\n String typeName = \"String_Node_Str\";\n if (helper.isAnnotationPresent(javaClass, XmlType.class)) {\n XmlType typeAnnotation = (XmlType) helper.getAnnotation(javaClass, XmlType.class);\n typeName = typeAnnotation.name();\n if (typeName.equals(\"String_Node_Str\")) {\n typeName = getSchemaTypeNameForClassName(javaClass.getName());\n }\n propOrder = typeAnnotation.propOrder();\n if (!typeAnnotation.namespace().equals(\"String_Node_Str\")) {\n info.setClassNamespace(typeAnnotation.namespace());\n } else {\n info.setClassNamespace(packageNamespace.getNamespace());\n }\n Class factoryClass = typeAnnotation.factoryClass();\n if (factoryClass != DEFAULT.class) {\n String factoryMethodName = typeAnnotation.factoryMethod();\n if (factoryMethodName == null || factoryMethodName.equals(\"String_Node_Str\")) {\n throw org.eclipse.persistence.exceptions.JAXBException.factoryClassWithoutFactoryMethod(javaClass.getName());\n }\n info.setFactoryMethodName(factoryMethodName);\n info.setObjectFactoryClassName(factoryClass.getCanonicalName());\n } else {\n String factoryMethodName = typeAnnotation.factoryMethod();\n if (factoryMethodName != null && !factoryMethodName.equals(\"String_Node_Str\")) {\n JavaMethod method = javaClass.getDeclaredMethod(factoryMethodName, new JavaClass[] {});\n if (method == null) {\n throw org.eclipse.persistence.exceptions.JAXBException.factoryMethodNotDeclared(factoryMethodName, javaClass.getName());\n }\n info.setFactoryMethodName(factoryMethodName);\n info.setObjectFactoryClassName(javaClass.getRawName());\n }\n }\n } else {\n typeName = getSchemaTypeNameForClassName(javaClass.getName());\n info.setClassNamespace(packageNamespace.getNamespace());\n }\n info.setPropOrder(propOrder);\n info.setSchemaTypeName(typeName);\n if (info.isEnumerationType()) {\n addEnumTypeInfo(javaClass, ((EnumTypeInfo) info));\n return info;\n }\n typeInfoClasses.add(javaClass);\n typeInfo.put(javaClass.getQualifiedName(), info);\n if (typeName != null && !(\"String_Node_Str\".equals(typeName))) {\n QName typeQName = new QName(packageNamespace.getNamespace(), typeName);\n boolean containsQName = typeQNames.contains(typeQName);\n if (containsQName) {\n throw JAXBException.nameCollision(typeQName.getNamespaceURI(), typeQName.getLocalPart());\n } else {\n typeQNames.add(typeQName);\n }\n }\n if (helper.isAnnotationPresent(javaClass, XmlAccessorType.class)) {\n XmlAccessorType accessorType = (XmlAccessorType) helper.getAnnotation(javaClass, XmlAccessorType.class);\n info.setAccessType(accessorType.value());\n } else {\n info.setAccessType(packageNamespace.getAccessType());\n }\n JavaClass superClass = (JavaClass) javaClass.getSuperclass();\n if (shouldGenerateTypeInfo(superClass)) {\n createTypeInfoFor(superClass);\n }\n info.setProperties(getPropertiesForClass(javaClass, info));\n XmlAccessorOrder order = null;\n if (helper.isAnnotationPresent(pack, XmlAccessorOrder.class)) {\n order = (XmlAccessorOrder) helper.getAnnotation(pack, XmlAccessorOrder.class);\n }\n if (helper.isAnnotationPresent(javaClass, XmlAccessorOrder.class)) {\n order = (XmlAccessorOrder) helper.getAnnotation(javaClass, XmlAccessorOrder.class);\n }\n if (order != null) {\n info.orderProperties(order.value());\n }\n ArrayList<Property> properties = info.getPropertyList();\n for (Property property : properties) {\n JavaClass propertyType = property.getType();\n if (this.isCollectionType(property)) {\n JavaClass gType = property.getGenericType();\n if (gType != null) {\n if (gType.hasActualTypeArguments()) {\n propertyType = helper.getJavaClass(gType.getRawName());\n } else if (gType instanceof JavaClass) {\n propertyType = (JavaClass) gType;\n }\n }\n } else if (propertyType.isArray()) {\n propertyType = (JavaClass) propertyType.getComponentType();\n }\n if (helper.isAnnotationPresent(property.getElement(), XmlElement.class)) {\n XmlElement element = (XmlElement) helper.getAnnotation(property.getElement(), XmlElement.class);\n if (element.type() != XmlElement.DEFAULT.class) {\n propertyType = helper.getJavaClass(element.type());\n property.setType(propertyType);\n }\n if (!element.defaultValue().equals(\"String_Node_Str\")) {\n property.setDefaultValue(element.defaultValue());\n }\n validateElementIsInPropOrder(info, property.getPropertyName());\n }\n if (helper.isAnnotationPresent(property.getElement(), XmlID.class)) {\n if (!areEquals(property.getType(), String.class)) {\n throw JAXBException.invalidId(property.getPropertyName());\n }\n if (info.isIDSet()) {\n }\n info.setIDProperty(property);\n }\n if (helper.isAnnotationPresent(property.getElement(), XmlIDREF.class)) {\n xmlIdRefProps.add(property);\n }\n if (helper.isAnnotationPresent(property.getElement(), XmlJavaTypeAdapter.class)) {\n XmlJavaTypeAdapter adapter = (XmlJavaTypeAdapter) helper.getAnnotation(property.getElement(), XmlJavaTypeAdapter.class);\n JavaClass adapterClass = helper.getJavaClass(adapter.value());\n property.setAdapterClass(adapterClass);\n propertyType = property.getValueType();\n }\n if (shouldGenerateTypeInfo(propertyType)) {\n createTypeInfoFor(propertyType);\n }\n }\n if (info.getFactoryMethodName() == null && info.getObjectFactoryClassName() == null) {\n JavaConstructor zeroArgConstructor = javaClass.getDeclaredConstructor(new JavaClass[] {});\n if (zeroArgConstructor == null) {\n throw org.eclipse.persistence.exceptions.JAXBException.factoryMethodOrConstructorRequired(javaClass.getName());\n }\n }\n validatePropOrderForInfo(info);\n return info;\n}\n"
|
"public void testDSASignatureVerification() throws Exception {\n runTestSignatureVerification(mocker.getComponentUnderTest().getInstance(true, privateKey), mocker.getComponentUnderTest().getInstance(false, publicKey));\n}\n"
|
"public static ObjectStream<NameSample> getNameStream(final String inputData, final String aLang, final String aCorpusFormat) throws IOException {\n ObjectStream<NameSample> samples = null;\n if (aCorpusFormat.equalsIgnoreCase(\"String_Node_Str\")) {\n ObjectStream<String> nameStream = InputOutputUtils.readInputData(inputData);\n if (aLang.equalsIgnoreCase(\"String_Node_Str\")) {\n samples = new Conll03NameSampleStream(Conll03NameSampleStream.LANGUAGE.EN, nameStream, types);\n } else if (aLang.equalsIgnoreCase(\"String_Node_Str\")) {\n samples = new Conll03NameSampleStream(Conll03NameSampleStream.LANGUAGE.DE, nameStream, types);\n }\n } else if (aCorpusFormat.equalsIgnoreCase(\"String_Node_Str\")) {\n ObjectStream<String> nameStream = InputOutputUtils.readInputData(inputData);\n if (aLang.equalsIgnoreCase(\"String_Node_Str\")) {\n samples = new Conll02NameSampleStream(Conll02NameSampleStream.LANGUAGE.ES, nameStream, types);\n } else if (aLang.equalsIgnoreCase(\"String_Node_Str\")) {\n samples = new Conll02NameSampleStream(Conll02NameSampleStream.LANGUAGE.NL, nameStream, types);\n }\n } else if (aCorpusFormat.equalsIgnoreCase(\"String_Node_Str\")) {\n ObjectStream<String> nameStream = InputOutputUtils.readInputData(inputData);\n samples = new EvalitaNameSampleStream(EvalitaNameSampleStream.LANGUAGE.IT, nameStream, types);\n } else if (aCorpusFormat.equalsIgnoreCase(\"String_Node_Str\")) {\n ObjectStream<String> nameStream = InputOutputUtils.readInputData(inputData);\n samples = new GermEval2014OuterNameStream(nameStream);\n } else if (aCorpusFormat.equalsIgnoreCase(\"String_Node_Str\")) {\n ObjectStream<String> nameStream = InputOutputUtils.readInputData(inputData);\n samples = new GermEval2014InnerNameStream(nameStream);\n } else if (aCorpusFormat.equalsIgnoreCase(\"String_Node_Str\")) {\n ObjectStream<String> nameStream = InputOutputUtils.readInputData(inputData);\n samples = new NameSampleDataStream(nameStream);\n } else {\n System.err.println(\"String_Node_Str\");\n System.exit(1);\n }\n return samples;\n}\n"
|
"private MethodDeclaration makePreMethod(ClassScope scope, ExplicitConstructorCall explicitConstructorCall) {\n EclipseWorld world = EclipseWorld.fromScopeLookupEnvironment(scope);\n TypeX aspectTypeX = EclipseWorld.fromBinding(binding.declaringClass);\n TypeX targetTypeX = EclipseWorld.fromBinding(onTypeBinding);\n ArrayBinding objectArrayBinding = scope.createArray(scope.getJavaLangObject(), 1);\n MethodDeclaration pre = new MethodDeclaration(compilationResult);\n pre.modifiers = AccPublic | AccStatic;\n pre.returnType = AstUtil.makeTypeReference(objectArrayBinding);\n pre.selector = NameMangler.postIntroducedConstructor(aspectTypeX, targetTypeX).toCharArray();\n pre.arguments = AstUtil.copyArguments(this.arguments);\n pre.scope = new MethodScope(scope, pre, true);\n pre.binding = world.makeMethodBinding(AjcMemberMaker.preIntroducedConstructor(aspectTypeX, targetTypeX, world.fromBindings(binding.parameters)));\n pre.bindArguments();\n pre.bindThrownExceptions();\n if (explicitConstructorCall == null) {\n pre.statements = new Statement[] {};\n } else {\n pre.statements = new Statement[] { explicitConstructorCall };\n }\n InterTypeScope newParent = new InterTypeScope(scope, onTypeBinding);\n pre.scope.parent = newParent;\n pre.resolveStatements(newParent);\n int nParams = pre.arguments.length;\n MethodBinding explicitConstructor = null;\n if (explicitConstructorCall != null) {\n explicitConstructor = explicitConstructorCall.binding;\n if (explicitConstructor.alwaysNeedsAccessMethod()) {\n explicitConstructor = explicitConstructor.getAccessMethod(true);\n }\n }\n int nExprs;\n if (explicitConstructor == null)\n nExprs = 0;\n else\n nExprs = explicitConstructor.parameters.length;\n ArrayInitializer init = new ArrayInitializer();\n init.expressions = new Expression[nExprs + nParams];\n int index = 0;\n for (int i = 0; i < nExprs; i++) {\n if (i >= explicitConstructorCall.arguments.length) {\n init.expressions[index++] = new NullLiteral(0, 0);\n continue;\n }\n Expression arg = explicitConstructorCall.arguments[i];\n ResolvedMember conversionMethod = AjcMemberMaker.toObjectConversionMethod(world.fromBinding(explicitConstructorCall.binding.parameters[i]));\n if (conversionMethod != null) {\n arg = new KnownMessageSend(world.makeMethodBindingForCall(conversionMethod), new CastExpression(new NullLiteral(0, 0), AstUtil.makeTypeReference(world.makeTypeBinding(AjcMemberMaker.CONVERSIONS_TYPE))), new Expression[] { arg });\n }\n init.expressions[index++] = arg;\n }\n for (int i = 0; i < nParams; i++) {\n LocalVariableBinding binding = pre.arguments[i].binding;\n Expression arg = AstUtil.makeResolvedLocalVariableReference(binding);\n ResolvedMember conversionMethod = AjcMemberMaker.toObjectConversionMethod(world.fromBinding(binding.type));\n if (conversionMethod != null) {\n arg = new KnownMessageSend(world.makeMethodBindingForCall(conversionMethod), new CastExpression(new NullLiteral(0, 0), AstUtil.makeTypeReference(world.makeTypeBinding(AjcMemberMaker.CONVERSIONS_TYPE))), new Expression[] { arg });\n }\n init.expressions[index++] = arg;\n }\n init.binding = objectArrayBinding;\n ArrayAllocationExpression newArray = new ArrayAllocationExpression();\n newArray.initializer = init;\n newArray.type = AstUtil.makeTypeReference(scope.getJavaLangObject());\n newArray.dimensions = new Expression[1];\n newArray.constant = NotAConstant;\n pre.statements = new Statement[] { new ReturnStatement(newArray, 0, 0) };\n return pre;\n}\n"
|
"public boolean isOwningNode(XPathFragment xPathFragment) {\n if (isMarshalNodeValue()) {\n if (xmlCollectionReferenceMapping.usesSingleNode()) {\n return xPathFragment.nameIsText() || xPathFragment.isAttribute();\n }\n XPathFragment nextFragment = xPathFragment.getNextFragment();\n return (nextFragment != null) && (nextFragment.nameIsText() || nextFragment.isAttribute());\n }\n XPathFragment nextFragment = xPathFragment.getNextFragment();\n return (nextFragment != null) && (nextFragment.nameIsText() || nextFragment.isAttribute());\n}\n"
|
"public boolean apply(EObject input) {\n boolean ret = false;\n if (input instanceof Diff && !(input instanceof ResourceAttachmentChange)) {\n final Diff diff = (Diff) input;\n final Conflict conflict = diff.getConflict();\n if (conflict == null) {\n final EObject grandParent = diff.getMatch().eContainer();\n if (grandParent instanceof Match) {\n ImmutableSet<EObject> containementDifferenceValues = MatchItemProviderSpec.containmentReferencesValues((Match) grandParent);\n if (MatchItemProviderSpec.matchOfContainmentDiff(containementDifferenceValues).apply(diff.getMatch())) {\n ret = true;\n }\n }\n }\n }\n return ret;\n}\n"
|
"public String parseSftpPath(String a) {\n if (a.contains(\"String_Node_Str\"))\n return \"String_Node_Str\" + a.substring(a.lastIndexOf(\"String_Node_Str\") + 1, a.length());\n else\n return a;\n}\n"
|
"public void end(IReportContent report) {\n engine.complete();\n boolean isRTLSheet = false;\n String reportOrientation = report.getDesign().getReportDesign().getBidiOrientation();\n if (\"String_Node_Str\".equalsIgnoreCase(reportOrientation))\n isRTLSheet = true;\n ExcelWriter writer = new ExcelWriter(out, context, isRTLSheet);\n writer.writeDeclarations();\n writer.writeDocumentProperties(report);\n writer.declareStyles(engine.getStyleMap());\n writer.defineNames(engine.getNamesRefer());\n startSheet(writer);\n int count = 0;\n if (tempWriter != null) {\n tempWriter.close(false);\n File file = new File(tempfilePath);\n writer.insertSheet(file);\n file.delete();\n }\n if (engine.getRowCount() != 0) {\n startSheet(writer);\n while (count < engine.getRowCount()) {\n outputData(engine.getRow(count), writer);\n count++;\n }\n outputData(engine.getRow(count), writer);\n count++;\n }\n endSheet(writer);\n writer.close(true);\n sheetIndex = 1;\n}\n"
|
"public void setInstanceWeight(int index, double weight) {\n if (weight == 1.0) {\n if (instWeights == null) {\n return;\n }\n Instance instance = get(index);\n Double value = instWeights.get(instance);\n if (value == null || value.doubleValue() == weight) {\n return;\n }\n instWeights.remove(instance);\n } else {\n if (instWeights == null) {\n instWeights = new HashMap<Instance, Double>();\n instWeights.put(get(index), weight);\n }\n}\n"
|
"public static List<ProtocolProviderService> getTelephonyProviders() {\n return GuiActivator.getRegisteredProviders(OperationSetBasicTelephony.class);\n}\n"
|
"public String getBasePath() {\n if (basePath == null) {\n basePath = fileSrc.substring(6);\n }\n return basePath;\n}\n"
|
"public void run() {\n while (running) {\n try {\n reader = new jline.console.ConsoleReader();\n reader.addCompleter(new FileNameCompleter());\n reader.setPrompt(\"String_Node_Str\");\n String line;\n PrintWriter out = new PrintWriter(System.out);\n while ((line = reader.readLine(\"String_Node_Str\")) != null) {\n if (Nexus.getInstance() != null) {\n if (line.equalsIgnoreCase(\"String_Node_Str\") || line.equalsIgnoreCase(\"String_Node_Str\") || line.equalsIgnoreCase(\"String_Node_Str\") || line.equalsIgnoreCase(\"String_Node_Str\")) {\n Nexus.getInstance().endProcess();\n } else if (line.toLowerCase().startsWith(\"String_Node_Str\")) {\n if (line.contains(\"String_Node_Str\")) {\n String[] parts = line.split(\"String_Node_Str\");\n String channel = parts[1];\n Nexus.LOGGER.info(\"String_Node_Str\" + channel);\n Nexus.getInstance().sendIRC().joinChannel(channel);\n } else {\n Nexus.LOGGER.info(\"String_Node_Str\");\n }\n }\n }\n out.flush();\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (reader != null) {\n try {\n reader.getTerminal().restore();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n}\n"
|
"protected boolean checkForForbiddenWords(IndexerConfig indexerConfig, Multiset<String> reasonsForRejection, List<String> excludedWords, SearchResultItem item) {\n for (String forbiddenWord : excludedWords) {\n if (forbiddenWord.contains(\"String_Node_Str\") || forbiddenWord.contains(\"String_Node_Str\") || indexerConfig.getHost().contains(\"String_Node_Str\")) {\n if (item.getTitle().toLowerCase().contains(forbiddenWord.toLowerCase())) {\n reasonsForRejection.add(\"String_Node_Str\");\n logger.debug(MARKER, \"String_Node_Str\", forbiddenWord, item.getTitle());\n return false;\n }\n } else {\n List<String> titleWords = getTitleWords(item);\n Optional<String> found = titleWords.stream().filter(x -> x.equals(forbiddenWord)).findFirst();\n if (found.isPresent()) {\n logger.debug(\"String_Node_Str\", found.get());\n reasonsForRejection.add(\"String_Node_Str\");\n return false;\n }\n }\n }\n return true;\n}\n"
|
"public void setDAG(DAG dag) {\n if (dag != null)\n throw new IllegalStateException(\"String_Node_Str\");\n Variables variables = new Variables();\n word = variables.newSparseMultionomialVariable(attributes.getAttributeByName(wordDocumentName));\n topicIndicator = variables.newMultinomialVariable(\"String_Node_Str\", nTopics);\n dagLDA = new DAG(variables);\n dagLDA.setName(\"String_Node_Str\");\n dagLDA.getParentSet(word).addParent(topicIndicator);\n List<EF_ConditionalDistribution> dists = dagLDA.getParentSets().stream().map(pSet -> pSet.getMainVar().getDistributionType().<EF_ConditionalDistribution>newEFConditionalDistribution(pSet.getParents())).collect(Collectors.toList());\n ef_learningmodel = new EF_LearningBayesianNetwork(dists);\n this.ef_learningmodel.getListOfParametersVariables().stream().forEach(var -> this.replicatedVariables.put(var, false));\n this.ef_learningmodel.getListOfNonParameterVariables().stream().forEach(var -> this.replicatedVariables.put(var, true));\n dirichletMixingTopics = ef_learningmodel.getDistribution(topicIndicator).getConditioningVariables().get(0);\n this.replicatedVariables.put(dirichletMixingTopics, true);\n this.nonReplicatedVariablesList = this.replicatedVariables.entrySet().stream().filter(entry -> !entry.getValue()).map(entry -> entry.getKey()).sorted((a, b) -> a.getVarID() - b.getVarID()).collect(Collectors.toList());\n for (int i = 0; i < nTopics; i++) {\n ef_learningmodel.getDistribution(dirichletMixingTopics).getNaturalParameters().set(i, 0.1);\n }\n for (Variable variable : this.nonReplicatedVariablesList) {\n NaturalParameters vec = this.ef_learningmodel.getDistribution(variable).getNaturalParameters();\n for (int i = 0; i < vec.size(); i++) {\n vec.set(i, 0.01);\n }\n }\n}\n"
|
"public void testCallCountOneServiceNoOperationAnotherConsumer() throws ServiceException {\n long duration = 60 * 6;\n int aggregationPeriod = 20;\n int expectedSum = 4;\n CriteriaInfo criteriaInfo = new CriteriaInfo();\n criteriaInfo.setMetricName(\"String_Node_Str\");\n criteriaInfo.setServiceName(srvcAdminName);\n criteriaInfo.setRoleType(\"String_Node_Str\");\n criteriaInfo.setConsumerName(\"String_Node_Str\");\n List<MetricGraphData> response = queryprovider.getMetricValue(criteriaInfo, sixMinutesAgo, duration, aggregationPeriod, \"String_Node_Str\");\n assertNotNull(response);\n assertEquals(\"String_Node_Str\", duration / aggregationPeriod, response.size());\n int sum = 0;\n for (MetricGraphData metricGraphData : response) {\n sum += metricGraphData.getCount();\n }\n assertEquals(\"String_Node_Str\" + expectedSum, expectedSum, sum);\n}\n"
|
"public static IntMap buildIntMap(String line, Minecart cart, Direction d) {\n log.info(\"String_Node_Str\" + line + \"String_Node_Str\");\n String temp = \"String_Node_Str\";\n IntMap map = new IntMap();\n boolean isNegate = false;\n for (int b = 0; b < line.length(); b++) {\n char c = line.charAt(b);\n if (Character.isDigit(c)) {\n temp += c;\n continue;\n }\n if (b == 0) {\n if (line.length() >= 2 && line.charAt(1) == '+') {\n switch(c) {\n case 'n':\n if (d != Direction.NORTH) {\n return null;\n }\n break;\n case 's':\n if (d != Direction.SOUTH) {\n return null;\n }\n break;\n case 'e':\n if (d != Direction.EAST) {\n return null;\n }\n break;\n case 'w':\n if (d != Direction.WEST) {\n return null;\n }\n break;\n }\n b = 1;\n continue;\n }\n }\n switch(c) {\n case ' ':\n case ':':\n String[] tempsplit = temp.split(\"String_Node_Str\");\n if (tempsplit.length >= 2 && tempsplit.length % 2 == 0) {\n try {\n int start = Integer.parseInt(tempsplit[0]);\n int end = Integer.parseInt(tempsplit[1]);\n Bukkit.getServer().broadcastMessage(\"String_Node_Str\" + start + \"String_Node_Str\" + end + \"String_Node_Str\" + isNegate);\n map.setRange(start, (byte) 0, start, (byte) 0, Integer.MAX_VALUE, isNegate);\n break;\n } catch (NumberFormatException e) {\n log.severe(\"String_Node_Str\");\n Bukkit.getServer().broadcastMessage(\"String_Node_Str\");\n return null;\n }\n }\n tempsplit = temp.split(\"String_Node_Str\");\n if (tempsplit.length >= 2) {\n try {\n int id = Integer.parseInt(tempsplit[0]);\n byte datavalue = Byte.parseByte(tempsplit[1]);\n Bukkit.getServer().broadcastMessage(\"String_Node_Str\" + id + \"String_Node_Str\" + datavalue + \"String_Node_Str\" + isNegate);\n map.setInt(id, datavalue, 0, isNegate);\n break;\n } catch (NumberFormatException e) {\n log.severe(\"String_Node_Str\");\n Bukkit.getServer().broadcastMessage(\"String_Node_Str\");\n return null;\n }\n }\n tempsplit = temp.split(\"String_Node_Str\");\n if (tempsplit.length >= 2) {\n try {\n int id = Integer.parseInt(tempsplit[0]);\n int amount = Integer.parseInt(tempsplit[1]);\n Bukkit.getServer().broadcastMessage(\"String_Node_Str\" + id + \"String_Node_Str\" + amount + \"String_Node_Str\" + isNegate);\n map.setInt(id, (byte) 0, amount, isNegate);\n break;\n } catch (NumberFormatException e) {\n log.severe(\"String_Node_Str\");\n Bukkit.getServer().broadcastMessage(\"String_Node_Str\");\n return null;\n }\n }\n try {\n int id = Integer.parseInt(temp);\n Bukkit.getServer().broadcastMessage(\"String_Node_Str\" + id + \"String_Node_Str\" + isNegate);\n map.setInt(id, (byte) 0, 0, isNegate);\n } catch (NumberFormatException e) {\n log.severe(\"String_Node_Str\");\n Bukkit.getServer().broadcastMessage(\"String_Node_Str\");\n return null;\n }\n isNegate = false;\n temp = \"String_Node_Str\";\n break;\n case ';':\n temp += \"String_Node_Str\";\n break;\n case '@':\n temp += \"String_Node_Str\";\n break;\n case '-':\n temp += \"String_Node_Str\";\n break;\n case '!':\n isNegate = true;\n break;\n default:\n break;\n }\n }\n return map;\n}\n"
|
"private boolean getIgnoreActionUpEvent() {\n if (this.mBaseEditor == null) {\n return false;\n }\n try {\n return this.mIgnoreActionUpEventField.getBoolean(this.mEditor);\n } catch (Exception e) {\n return false;\n }\n}\n"
|
"public static void requestPinShortcut(final Context context, final Intent shortcutIntent, final String title, final String urlAsShortcutId, final Bitmap bitmap) {\n final Bitmap icon;\n final Resources resources = context.getResources();\n final char representativeCharacter = FavIconUtils.getRepresentativeCharacter(urlAsShortcutId);\n if (bitmap == null) {\n icon = FavIconUtils.getInitialBitmap(resources, null, representativeCharacter);\n } else {\n icon = FavIconUtils.getRefinedShortcutIcon(resources, bitmap, representativeCharacter);\n }\n String label = title;\n if (TextUtils.isEmpty(title)) {\n label = urlAsShortcutId;\n }\n final ShortcutInfoCompat shortcut = new ShortcutInfoCompat.Builder(context, urlAsShortcutId).setShortLabel(label).setIcon(IconCompat.createWithBitmap(icon)).setIntent(shortcutIntent).build();\n final Intent showHome = new Intent(Intent.ACTION_MAIN);\n showHome.addCategory(Intent.CATEGORY_HOME);\n showHome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n final PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, showHome, PendingIntent.FLAG_UPDATE_CURRENT);\n final IntentSender intentSender = pendingIntent.getIntentSender();\n updateShortcut26(context, shortcut);\n if (ShortcutManagerCompat.isRequestPinShortcutSupported(context)) {\n ShortcutManagerCompat.requestPinShortcut(context, shortcut, intentSender);\n }\n}\n"
|
"public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {\n Card card = game.getCard(objectId);\n if (card != null && affectedControllerId.equals(card.getOwnerId()) && game.getState().getZone(card.getId()) == Zone.EXILED) {\n UbaMaskExiledCardsWatcher watcher = (UbaMaskExiledCardsWatcher) game.getState().getWatchers().get(UbaMaskExiledCardsWatcher.class.getName());\n if (watcher != null) {\n List<MageObjectReference> exiledThisTurn = watcher.getUbaMaskExiledCardsThisTurn(affectedControllerId);\n return exiledThisTurn != null && exiledThisTurn.contains(new MageObjectReference(card, game));\n }\n }\n return false;\n}\n"
|
"public IDockerHostConfig getDockerHostConfig() {\n final ImageRunSelectionModel selectionModel = this.imageRunSelectionPage.getModel();\n final ImageRunResourceVolumesVariablesModel resourcesModel = this.imageRunResourceVolumesPage.getModel();\n final DockerHostConfig.Builder hostConfigBuilder = new DockerHostConfig.Builder();\n if (selectionModel.isPublishAllPorts()) {\n hostConfigBuilder.publishAllPorts(true);\n } else {\n final Map<String, List<IDockerPortBinding>> portBindings = new HashMap<>();\n for (Iterator<ExposedPortModel> iterator = selectionModel.getExposedPorts().iterator(); iterator.hasNext(); ) {\n final ExposedPortModel exposedPort = iterator.next();\n if (!selectionModel.getSelectedPorts().contains(exposedPort)) {\n continue;\n }\n final DockerPortBinding portBinding = new DockerPortBinding(exposedPort.getHostAddress(), exposedPort.getHostPort());\n portBindings.put(exposedPort.getContainerPort() + exposedPort.getPortType(), Arrays.<IDockerPortBinding>asList(portBinding));\n }\n hostConfigBuilder.portBindings(portBindings);\n }\n final List<String> links = new ArrayList<>();\n for (Iterator<ContainerLinkModel> iterator = selectionModel.getLinks().iterator(); iterator.hasNext(); ) {\n final ContainerLinkModel link = iterator.next();\n links.add(link.getContainerName() + ':' + link.getContainerAlias());\n }\n hostConfigBuilder.links(links);\n final List<String> volumesFrom = new ArrayList<>();\n final List<String> binds = new ArrayList<>();\n for (Iterator<DataVolumeModel> iterator = resourcesModel.getDataVolumes().iterator(); iterator.hasNext(); ) {\n final DataVolumeModel dataVolume = iterator.next();\n if (!resourcesModel.getSelectedDataVolumes().contains(dataVolume)) {\n continue;\n }\n switch(dataVolume.getMountType()) {\n case HOST_FILE_SYSTEM:\n String bind = LaunchConfigurationUtils.convertToUnixPath(dataVolume.getHostPathMount()) + ':' + dataVolume.getContainerPath() + \"String_Node_Str\";\n if (dataVolume.isReadOnly()) {\n bind += \"String_Node_Str\";\n }\n binds.add(bind);\n break;\n case CONTAINER:\n volumesFrom.add(dataVolume.getContainerMount());\n break;\n default:\n break;\n }\n }\n hostConfigBuilder.binds(binds);\n hostConfigBuilder.volumesFrom(volumesFrom);\n if (resourcesModel.isEnableResourceLimitations()) {\n hostConfigBuilder.memory(resourcesModel.getMemoryLimit() * MB);\n hostConfigBuilder.cpuShares(resourcesModel.getCpuShareWeight());\n }\n return hostConfigBuilder.build();\n}\n"
|
"public static void main(String[] args) throws Exception {\n Console console = JCommander.getConsole();\n Log4jUtils.setRootLevel(LogLevel.NONE);\n ResourceBundle cliBundle = PropertyResourceBundle.getBundle(\"String_Node_Str\");\n final CliConfig cliConfig = new CliConfig();\n JCommander jCommander = new JCommander(cliConfig, cliBundle, args);\n jCommander.setColumnSize(Integer.MAX_VALUE);\n if (cliConfig.isHelp()) {\n jCommander.usage();\n System.exit(0);\n }\n if (cliConfig.isHelpParam()) {\n console.println(cliBundle.getString(\"String_Node_Str\"));\n ConfigUtils.printParamDescriptionFromConfigSchema(console, 0);\n System.exit(0);\n }\n final Config config = CliConfigUtils.readConfig(cliConfig);\n if (cliConfig.isPrintConfig()) {\n ConfigUtils.printYamlConfig(config, console);\n System.exit(0);\n }\n if (cliConfig.isPrintXmlConfig()) {\n ConfigUtils.printXmlConfig(config, console);\n System.exit(0);\n }\n if (config.getGeneric().getLog4j2File() != null) {\n Log4jUtils.reconfigure(config.getGeneric().getLog4j2File());\n } else {\n Log4jUtils.setRootLevel(config.getGeneric().getLogLevel());\n if (config.getGeneric().getLogPackages() != null) {\n Log4jUtils.setLogPackages(config.getGeneric().getLogPackages());\n }\n if (config.getGeneric().getLogFile() != null) {\n Log4jUtils.appendToLogFile(config.getGeneric().getLogFile());\n }\n }\n ConfigUtils.parseToropassFile(config);\n if (config.getBackend().isPostgresLike()) {\n Postgres postgres = config.getBackend().asPostgres();\n if (cliConfig.isAskForPassword()) {\n console.print(\"String_Node_Str\");\n postgres.setPassword(readPwd());\n }\n }\n try {\n Clock clock = Clock.systemDefaultZone();\n Service server;\n if (config.getProtocol().getMongo().getReplication() == null || config.getProtocol().getMongo().getReplication().isEmpty()) {\n ToroDbServer toroDbServer = ToroDbServer.create(config, clock);\n toroDbServer.startAsync();\n toroDbServer.awaitRunning();\n server = toroDbServer;\n } else {\n ToroDbiServer toroDbiServer = ToroDbiServer.create(config, clock);\n toroDbiServer.startAsync();\n toroDbiServer.awaitTerminated();\n server = toroDbiServer;\n }\n Runtime.getRuntime().addShutdownHook(new Thread(() -> {\n server.stopAsync();\n server.awaitTerminated();\n }));\n } catch (CreationException ex) {\n ex.getErrorMessages().stream().forEach(m -> {\n if (m.getCause() != null)\n LOGGER.error(m.getCause().getMessage());\n else\n LOGGER.error(m.getMessage());\n });\n System.exit(1);\n } catch (Throwable ex) {\n LOGGER.error(\"String_Node_Str\", ex);\n Throwable rootCause = Throwables.getRootCause(ex);\n String causeMessage = rootCause.getMessage();\n JCommander.getConsole().println(\"String_Node_Str\" + causeMessage);\n System.exit(1);\n }\n}\n"
|
"private void sortModList() {\n FMLLog.fine(\"String_Node_Str\");\n try {\n BiMap<String, ArtifactVersion> modVersions = HashBiMap.create();\n for (ModContainer mod : getActiveModList()) {\n modVersions.put(mod.getModId(), mod.getProcessedVersion());\n }\n for (ModContainer mod : getActiveModList()) {\n Map<String, ArtifactVersion> names = Maps.uniqueIndex(mod.getRequirements(), new Function<ArtifactVersion, String>() {\n public String apply(ArtifactVersion v) {\n return v.getLabel();\n }\n });\n Set<String> missingMods = Sets.difference(names.keySet(), modVersions.keySet());\n Set<ArtifactVersion> versionMissingMods = Sets.newHashSet();\n if (!missingMods.isEmpty()) {\n FMLLog.severe(\"String_Node_Str\", mod.getModId(), mod.getName(), missingMods);\n throw new MissingModsException(missingMods);\n }\n ImmutableList<ArtifactVersion> allDeps = ImmutableList.<ArtifactVersion>builder().addAll(mod.getDependants()).addAll(mod.getDependencies()).build();\n for (ArtifactVersion v : allDeps) {\n missingMods = Sets.newHashSet();\n if (modVersions.containsKey(v.getLabel())) {\n if (!v.containsVersion(modVersions.get(v.getLabel()))) {\n missingMods.add(v);\n }\n }\n }\n if (!missingMods.isEmpty()) {\n FMLLog.severe(\"String_Node_Str\", mod.getModId(), mod.getName(), missingMods);\n throw new MissingModsException(missingMods);\n }\n }\n FMLLog.fine(\"String_Node_Str\");\n ModSorter sorter = new ModSorter(getActiveModList(), namedMods);\n try {\n FMLLog.fine(\"String_Node_Str\");\n mods = sorter.sort();\n FMLLog.fine(\"String_Node_Str\");\n } catch (ModSortingException sortException) {\n FMLLog.severe(\"String_Node_Str\");\n FMLLog.severe(\"String_Node_Str\", sortException.getExceptionData().getVisitedNodes());\n FMLLog.severe(\"String_Node_Str\", sortException.getExceptionData().getFirstBadNode());\n FMLLog.log(Level.SEVERE, sortException, \"String_Node_Str\");\n throw new LoaderException(sortException);\n }\n } finally {\n FMLLog.fine(\"String_Node_Str\");\n for (ModContainer mod : getActiveModList()) {\n if (!mod.isImmutable()) {\n FMLLog.fine(\"String_Node_Str\", mod.getModId(), mod.getName(), mod.getVersion(), mod.getSource().getName(), mod.getSortingRules());\n }\n }\n if (mods.size() == 0) {\n FMLLog.fine(\"String_Node_Str\");\n }\n }\n}\n"
|
"public void update(float delta) {\n currentTime += delta;\n if (isFinish() && cb != null) {\n ActionCallbackQueue.add(cb);\n cb = null;\n cb2.onEvent();\n }\n}\n"
|
"public PeriodFormatterBuilder appendSeparatorIfFieldsAfter(String text) {\n return appendSeparator(text, text, null, false, true);\n}\n"
|
"private void validateRange(IntegerRange range, Integer... numbers) {\n Iterator<Integer> iterator = range.iterator();\n for (Integer number : numbers) {\n assertTrue(iterator.hasNext());\n assertEquals(number, iterator.next());\n }\n assertFalse(iterator.hasNext());\n}\n"
|
"public static List<RevisionInfo> getRevisionList(String category, String version) throws Exception {\n StringBuffer url = new StringBuffer();\n url.append(REVISION_LIST_URL).append(\"String_Node_Str\").append(category).append(\"String_Node_Str\");\n String[] branch = getBranch(version);\n if (branch != null) {\n url.append(StringUtils.join(branch, \"String_Node_Str\"));\n String jsonContent = sendGetRequest(url.toString());\n System.out.println(url);\n return parseJsonObject(jsonContent, RevisionInfo.class);\n }\n return Collections.EMPTY_LIST;\n}\n"
|
"public int read(byte[] buf, int off, int length) {\n if (remainingBlanks <= 0 && remainingNonBlanks <= 0) {\n return -1;\n }\n int nonBlankLength = (int) Math.min(remainingNonBlanks, (long) length);\n fillBuffer(nonBlankLength);\n int read = 0;\n int bOff = alphabet.nextByteToRead(0);\n if (nonBlankLength <= (buffer.length - bOff)) {\n System.arraycopy(buffer, bOff, buf, off, nonBlankLength);\n remainingNonBlanks -= nonBlankLength;\n read = nonBlankLength;\n alphabet.nextByteToRead(nonBlankLength);\n } else {\n int toRead = 0;\n while (remainingNonBlanks > 0 && read < nonBlankLength) {\n bOff = alphabet.nextByteToRead(toRead);\n toRead = Math.min(buffer.length - bOff, nonBlankLength - read);\n System.arraycopy(buffer, bOff, buf, off + read, toRead);\n remainingNonBlanks -= toRead;\n read += toRead;\n }\n bOff = alphabet.nextByteToRead(toRead);\n }\n if (read < length && remainingBlanks > 0) {\n read += fillBlanks(buf, off + read, length - read);\n }\n return read;\n}\n"
|
"public void disconnect() {\n ID groupID = getConnectedID();\n fireContainerEvent(new ContainerDisconnectingEvent(this.getID(), groupID));\n synchronized (getConnectLock()) {\n if (isConnected()) {\n try {\n multiuserchat.leave();\n } catch (Exception e) {\n traceStack(\"String_Node_Str\", e);\n }\n }\n connectionState = DISCONNECTED;\n remoteServerID = null;\n if (containerHelper != null)\n containerHelper.setRoomID(null);\n this.connection = null;\n }\n fireContainerEvent(new ContainerDisconnectedEvent(this.getID(), groupID));\n}\n"
|
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_landing);\n useDoubleBackPressed = true;\n addActions();\n facebookHelper = new FacebookHelper(this, savedInstanceState, new FacebookSessionStatusCallback());\n initVersionName();\n}\n"
|
"public boolean checkPasswordAuth() {\n boolean status = false;\n Connection c = null;\n try {\n c = new Connection(host, port);\n c.connect();\n if (logger.isLoggable(Level.FINER)) {\n logger.finer(\"String_Node_Str\");\n }\n status = c.authenticateWithPassword(userName, password);\n if (status) {\n logger.finer(\"String_Node_Str\" + userName + \"String_Node_Str\" + host + \"String_Node_Str\");\n }\n } catch (IOException ioe) {\n if (logger.isLoggable(Level.FINER)) {\n ioe.printStackTrace();\n }\n } finally {\n if (c != null) {\n c.close();\n }\n }\n return status;\n}\n"
|
"public void run() {\n try {\n q.take();\n } catch (InterruptedException e) {\n fail();\n }\n}\n"
|
"public String getJobTracker() {\n return getRealValue(this.jobTracker);\n}\n"
|
"public void execute(HttpServletRequest request, HttpServletResponse response, String uriPrefix) {\n final String origUri = request.getRequestURI();\n String restPart = origUri.substring(uriPrefix.length());\n try {\n restPart = URLDecoder.decode(restPart, \"String_Node_Str\");\n } catch (UnsupportedEncodingException e) {\n log.error(\"String_Node_Str\", e);\n }\n String[] split = restPart.split(\"String_Node_Str\");\n if (split.length % 2 != 0) {\n DispatcherAction.sendBadRequest(origUri, response);\n log.warn(\"String_Node_Str\" + restPart);\n return;\n }\n String businessPath = \"String_Node_Str\";\n for (int i = 0; i < split.length; i = i + 2) {\n String key = split[i];\n if (key != null && key.startsWith(\"String_Node_Str\")) {\n key = key.replace(\"String_Node_Str\", \"String_Node_Str\");\n }\n String value = split[i + 1];\n businessPath += \"String_Node_Str\" + key + \"String_Node_Str\" + value + \"String_Node_Str\";\n }\n if (log.isDebug()) {\n log.debug(\"String_Node_Str\" + origUri);\n log.debug(\"String_Node_Str\" + restPart);\n log.debug(\"String_Node_Str\" + businessPath);\n }\n try {\n BusinessControl bc = BusinessControlFactory.getInstance().createFromString(businessPath);\n if (!bc.hasContextEntry()) {\n DispatcherAction.sendBadRequest(origUri, response);\n return;\n }\n } catch (Exception e) {\n DispatcherAction.sendBadRequest(origUri, response);\n log.warn(\"String_Node_Str\" + origUri, e);\n return;\n }\n UserSession usess = UserSession.getUserSession(request);\n UserRequest ureq = null;\n try {\n ureq = new UserRequest(uriPrefix, request, response);\n } catch (NumberFormatException nfe) {\n if (log.isDebug()) {\n log.debug(\"String_Node_Str\" + request.getPathInfo());\n }\n DispatcherAction.sendBadRequest(request.getPathInfo(), response);\n return;\n }\n String xOlatToken = ureq.getParameter(RestSecurityHelper.SEC_TOKEN);\n if (xOlatToken != null) {\n RestSecurityBean securityBean = (RestSecurityBean) CoreSpringFactory.getBean(RestSecurityBean.class);\n Identity restIdentity = securityBean.getIdentity(xOlatToken);\n if (log.isDebug()) {\n if (restIdentity == null)\n log.debug(\"String_Node_Str\" + RestSecurityHelper.SEC_TOKEN + \"String_Node_Str\");\n else\n log.debug(\"String_Node_Str\" + RestSecurityHelper.SEC_TOKEN + \"String_Node_Str\" + restIdentity.getName());\n }\n if (restIdentity != null) {\n if (!usess.isAuthenticated() || !restIdentity.equalsByPersistableKey(usess.getIdentity())) {\n int loginStatus = AuthHelper.doLogin(restIdentity, RestSecurityHelper.SEC_TOKEN, ureq);\n if (loginStatus == AuthHelper.LOGIN_OK) {\n UserDeletionManager.getInstance().setIdentityAsActiv(restIdentity);\n } else {\n DispatcherAction.redirectToDefaultDispatcher(response);\n }\n } else if (Windows.getWindows(usess).getAttribute(\"String_Node_Str\") == null) {\n Window currentWindow = AuthHelper.createAuthHome(ureq).getWindow();\n currentWindow.setUriPrefix(WebappHelper.getServletContextPath() + DispatcherAction.PATH_AUTHENTICATED);\n Windows ws = Windows.getWindows(ureq);\n ws.registerWindow(currentWindow);\n }\n }\n }\n boolean auth = usess.isAuthenticated();\n if (auth) {\n setBusinessPathInUserSession(usess, businessPath);\n if (Windows.getWindows(usess).getAttribute(\"String_Node_Str\") == null) {\n AuthHelper.createAuthHome(ureq);\n String url = getRedirectToURL(usess) + \"String_Node_Str\" + usess.getSessionInfo().getSession().getId();\n DispatcherAction.redirectTo(response, url);\n } else {\n String url = getRedirectToURL(usess);\n DispatcherAction.redirectTo(response, url);\n }\n } else {\n setBusinessPathInUserSession(usess, businessPath);\n String invitationAccess = ureq.getParameter(AuthenticatedDispatcher.INVITATION);\n if (invitationAccess != null && LoginModule.isInvitationEnabled()) {\n Locale guestLoc = getLang(ureq);\n int loginStatus = AuthHelper.doInvitationLogin(invitationAccess, ureq, guestLoc);\n if (loginStatus == AuthHelper.LOGIN_OK) {\n Identity invite = usess.getIdentity();\n UserDeletionManager.getInstance().setIdentityAsActiv(invite);\n String url = getRedirectToURL(usess);\n DispatcherAction.redirectTo(response, url);\n } else if (loginStatus == AuthHelper.LOGIN_NOTAVAILABLE) {\n DispatcherAction.redirectToServiceNotAvailable(response);\n } else {\n DispatcherAction.redirectToDefaultDispatcher(response);\n }\n } else {\n String guestAccess = ureq.getParameter(AuthenticatedDispatcher.GUEST);\n if (guestAccess == null || !LoginModule.isGuestLoginLinksEnabled()) {\n DispatcherAction.redirectToDefaultDispatcher(response);\n return;\n } else if (guestAccess.equals(AuthenticatedDispatcher.TRUE)) {\n Locale guestLoc = getLang(ureq);\n int loginStatus = AuthHelper.doAnonymousLogin(ureq, guestLoc);\n if (loginStatus == AuthHelper.LOGIN_OK) {\n String url = getRedirectToURL(usess);\n DispatcherAction.redirectTo(response, url);\n } else if (loginStatus == AuthHelper.LOGIN_NOTAVAILABLE) {\n DispatcherAction.redirectToServiceNotAvailable(response);\n } else {\n DispatcherAction.redirectToDefaultDispatcher(response);\n }\n }\n }\n }\n}\n"
|
"private soot.Local getUnaryLocal(polyglot.ast.Unary unary) {\n polyglot.ast.Expr expr = unary.expr();\n polyglot.ast.Unary.Operator op = unary.operator();\n if (op == polyglot.ast.Unary.POST_INC) {\n soot.Local retLocal = generateLocal(expr.type());\n soot.Value sootExpr = base().createExpr(expr);\n soot.jimple.AssignStmt preStmt = soot.jimple.Jimple.v().newAssignStmt(retLocal, sootExpr);\n body.getUnits().add(preStmt);\n soot.jimple.AddExpr addExpr = soot.jimple.Jimple.v().newAddExpr(sootExpr, getConstant(retLocal.getType(), 1));\n Util.addLnPosTags(addExpr.getOp1Box(), expr.position());\n soot.Local local = generateLocal(expr.type());\n soot.jimple.AssignStmt stmt = soot.jimple.Jimple.v().newAssignStmt(local, addExpr);\n body.getUnits().add(stmt);\n Util.addLnPosTags(stmt, expr.position());\n soot.jimple.AssignStmt aStmt = soot.jimple.Jimple.v().newAssignStmt(sootExpr, local);\n body.getUnits().add(aStmt);\n Util.addLnPosTags(aStmt, expr.position());\n Util.addLnPosTags(aStmt, unary.position());\n if ((expr instanceof polyglot.ast.Field) || (expr instanceof polyglot.ast.ArrayAccess)) {\n if ((expr instanceof polyglot.ast.Field) && (needsPrivateAccessor((polyglot.ast.Field) expr) || needsProtectedAccessor((polyglot.ast.Field) expr))) {\n handlePrivateFieldSet((polyglot.ast.Field) expr, local);\n } else {\n soot.Value actualUnaryExpr = createLHS(expr);\n soot.jimple.AssignStmt s = soot.jimple.Jimple.v().newAssignStmt(actualUnaryExpr, local);\n body.getUnits().add(s);\n Util.addLnPosTags(s, expr.position());\n Util.addLnPosTags(s.getLeftOpBox(), expr.position());\n }\n }\n return retLocal;\n } else if (op == polyglot.ast.Unary.POST_DEC) {\n soot.Local retLocal = generateLocal(expr.type());\n soot.Value sootExpr = base().createExpr(expr);\n soot.jimple.AssignStmt preStmt = soot.jimple.Jimple.v().newAssignStmt(retLocal, sootExpr);\n body.getUnits().add(preStmt);\n soot.jimple.SubExpr subExpr = soot.jimple.Jimple.v().newSubExpr(sootExpr, getConstant(retLocal.getType(), 1));\n Util.addLnPosTags(subExpr.getOp1Box(), expr.position());\n soot.Local local = generateLocal(expr.type());\n soot.jimple.AssignStmt stmt = soot.jimple.Jimple.v().newAssignStmt(local, subExpr);\n body.getUnits().add(stmt);\n Util.addLnPosTags(stmt, expr.position());\n soot.jimple.AssignStmt aStmt = soot.jimple.Jimple.v().newAssignStmt(sootExpr, local);\n body.getUnits().add(aStmt);\n Util.addLnPosTags(aStmt, expr.position());\n Util.addLnPosTags(aStmt, unary.position());\n if ((expr instanceof polyglot.ast.Field) || (expr instanceof polyglot.ast.ArrayAccess)) {\n soot.Value actualUnaryExpr = createLHS(expr);\n soot.jimple.AssignStmt s = soot.jimple.Jimple.v().newAssignStmt(actualUnaryExpr, local);\n body.getUnits().add(s);\n Util.addLnPosTags(s, expr.position());\n Util.addLnPosTags(s.getLeftOpBox(), expr.position());\n }\n return retLocal;\n } else if (op == polyglot.ast.Unary.PRE_INC) {\n soot.Value sootExpr = base().createExpr(expr);\n soot.jimple.AddExpr addExpr = soot.jimple.Jimple.v().newAddExpr(sootExpr, getConstant(sootExpr.getType(), 1));\n Util.addLnPosTags(addExpr.getOp1Box(), expr.position());\n soot.Local local = generateLocal(expr.type());\n soot.jimple.AssignStmt stmt = soot.jimple.Jimple.v().newAssignStmt(local, addExpr);\n body.getUnits().add(stmt);\n Util.addLnPosTags(stmt, expr.position());\n if ((expr instanceof polyglot.ast.Field) || (expr instanceof polyglot.ast.ArrayAccess) || (expr instanceof polyglot.ast.Local)) {\n soot.Value actualUnaryExpr = createLHS(expr);\n body.getUnits().add(soot.jimple.Jimple.v().newAssignStmt(actualUnaryExpr, local));\n }\n return local;\n } else if (op == polyglot.ast.Unary.PRE_DEC) {\n soot.Value sootExpr = base().createExpr(expr);\n soot.jimple.SubExpr subExpr = soot.jimple.Jimple.v().newSubExpr(sootExpr, getConstant(sootExpr.getType(), 1));\n Util.addLnPosTags(subExpr.getOp1Box(), expr.position());\n soot.Local local = generateLocal(expr.type());\n soot.jimple.AssignStmt stmt = soot.jimple.Jimple.v().newAssignStmt(local, subExpr);\n body.getUnits().add(stmt);\n Util.addLnPosTags(stmt, expr.position());\n if ((expr instanceof polyglot.ast.Field) || (expr instanceof polyglot.ast.ArrayAccess) || (expr instanceof polyglot.ast.Local)) {\n soot.Value actualUnaryExpr = createLHS(expr);\n body.getUnits().add(soot.jimple.Jimple.v().newAssignStmt(actualUnaryExpr, local));\n }\n return local;\n } else if (op == polyglot.ast.Unary.BIT_NOT) {\n soot.jimple.IntConstant int1 = soot.jimple.IntConstant.v(-1);\n soot.Local retLocal = generateLocal(expr.type());\n soot.Value sootExpr = base().createExpr(expr);\n soot.jimple.XorExpr xor = soot.jimple.Jimple.v().newXorExpr(sootExpr, getConstant(sootExpr.getType(), -1));\n Util.addLnPosTags(xor.getOp1Box(), expr.position());\n soot.jimple.Stmt assign1 = soot.jimple.Jimple.v().newAssignStmt(retLocal, xor);\n body.getUnits().add(assign1);\n Util.addLnPosTags(assign1, unary.position());\n return retLocal;\n } else if (op == polyglot.ast.Unary.NEG) {\n soot.Value sootExpr;\n if (expr instanceof polyglot.ast.NumLit) {\n int intVal = (int) ((polyglot.ast.NumLit) expr).longValue();\n sootExpr = soot.jimple.IntConstant.v(-intVal);\n } else if (expr instanceof polyglot.ast.FloatLit) {\n double doubleVal = ((polyglot.ast.FloatLit) expr).value();\n if (((polyglot.ast.FloatLit) expr).kind() == polyglot.ast.FloatLit.DOUBLE) {\n sootExpr = soot.jimple.DoubleConstant.v(-doubleVal);\n } else {\n sootExpr = soot.jimple.FloatConstant.v(-(float) doubleVal);\n }\n } else {\n soot.Value local = base().createExpr(expr);\n soot.jimple.NegExpr negExpr = soot.jimple.Jimple.v().newNegExpr(local);\n sootExpr = negExpr;\n Util.addLnPosTags(negExpr.getOpBox(), expr.position());\n }\n soot.Local retLocal = generateLocal(expr.type());\n soot.jimple.Stmt assign = soot.jimple.Jimple.v().newAssignStmt(retLocal, sootExpr);\n body.getUnits().add(assign);\n Util.addLnPosTags(assign, expr.position());\n return retLocal;\n } else if (op == polyglot.ast.Unary.POS) {\n soot.Local retLocal = generateLocal(expr.type());\n soot.Value sootExpr = base().createExpr(expr);\n soot.jimple.Stmt assign = soot.jimple.Jimple.v().newAssignStmt(retLocal, sootExpr);\n body.getUnits().add(assign);\n Util.addLnPosTags(assign, expr.position());\n return retLocal;\n } else if (op == polyglot.ast.Unary.NOT) {\n soot.Value local = base().createExpr(expr);\n if (local instanceof soot.jimple.ConditionExpr) {\n local = handleCondBinExpr((soot.jimple.ConditionExpr) local);\n }\n soot.jimple.NeExpr neExpr = soot.jimple.Jimple.v().newNeExpr(local, getConstant(local.getType(), 0));\n soot.jimple.Stmt noop1 = soot.jimple.Jimple.v().newNopStmt();\n soot.jimple.Stmt ifStmt = soot.jimple.Jimple.v().newIfStmt(neExpr, noop1);\n body.getUnits().add(ifStmt);\n Util.addLnPosTags(ifStmt, expr.position());\n soot.Local retLocal = lg.generateLocal(local.getType());\n soot.jimple.Stmt assign1 = soot.jimple.Jimple.v().newAssignStmt(retLocal, getConstant(retLocal.getType(), 1));\n body.getUnits().add(assign1);\n Util.addLnPosTags(assign1, expr.position());\n soot.jimple.Stmt noop2 = soot.jimple.Jimple.v().newNopStmt();\n soot.jimple.Stmt goto1 = soot.jimple.Jimple.v().newGotoStmt(noop2);\n body.getUnits().add(goto1);\n body.getUnits().add(noop1);\n soot.jimple.Stmt assign2 = soot.jimple.Jimple.v().newAssignStmt(retLocal, getConstant(retLocal.getType(), 0));\n body.getUnits().add(assign2);\n Util.addLnPosTags(assign2, expr.position());\n body.getUnits().add(noop2);\n return retLocal;\n } else {\n throw new RuntimeException(\"String_Node_Str\");\n }\n}\n"
|
"public Err doBackgroundWork(DiagAsyncTask task) {\n DB db = DB.get();\n db.beginTransaction();\n try {\n for (long mid : vids) {\n DB.Err err = db.insertVideoToPlaylist(dstPlid, mid);\n if (DB.Err.NO_ERR != err) {\n if (DB.Err.DUPLICATED != err)\n return Err.DB_DUPLICATED;\n else if (1 == vids.length && !move)\n return Err.map(err);\n }\n if (move) {\n if (UiUtils.isUserPlaylist(plid))\n db.deleteVideoFrom(plid, mid);\n else\n db.deleteVideoExcept(plid, mid);\n }\n }\n db.setTransactionSuccessful();\n } finally {\n db.endTransaction();\n }\n return Err.NO_ERR;\n}\n"
|
"public float getHeight() {\n return (float) line.bounds.getHeight() * sizeFactor;\n}\n"
|
"public void handleEvent(AEvent event) {\n StatisticsPValueReductionEvent pValueReductionEvent = null;\n if (event instanceof StatisticsPValueReductionEvent) {\n pValueReductionEvent = (StatisticsPValueReductionEvent) event;\n handler.oneSidedTTest(pValueReductionEvent.getSets());\n }\n}\n"
|
"public boolean isUpgradeableNow() {\n if (isBlocked()) {\n log.debug(\"String_Node_Str\" + name + \"String_Node_Str\");\n return false;\n }\n if (currentTile != null) {\n if (currentTile.isUpgradeable()) {\n return true;\n } else {\n log.debug(\"String_Node_Str\" + name + \"String_Node_Str\" + currentTile.getId() + \"String_Node_Str\");\n return false;\n }\n }\n log.debug(\"String_Node_Str\" + name);\n return false;\n}\n"
|
"public HttpUriRequest getRedirect(HttpRequest httpRequest, HttpResponse httpResponse, HttpContext httpContext) throws ProtocolException {\n String redirectUrl = httpResponse.getFirstHeader(\"String_Node_Str\").getValue();\n HttpUriRequest uriRequest;\n HttpRequest origin = requestWrapper.getOriginal();\n if (origin instanceof HttpPut) {\n uriRequest = new HttpPut(redirectUrl);\n ((HttpPut) uriRequest).setEntity(((HttpPut) httpRequest).getEntity());\n } else if (httpRequest instanceof HttpPost) {\n uriRequest = new HttpPost(redirectUrl);\n ((HttpPost) uriRequest).setEntity(((HttpPost) httpRequest).getEntity());\n } else if (httpRequest instanceof HttpDelete) {\n uriRequest = new HttpDelete(redirectUrl);\n } else {\n uriRequest = new HttpGet(redirectUrl);\n }\n return uriRequest;\n}\n"
|
"private void onBluetoothClick() {\n if (VDBG)\n log(\"String_Node_Str\");\n if (isBluetoothAvailable()) {\n if (isBluetoothAudioConnected()) {\n disconnectBluetoothAudio();\n } else {\n if (PhoneUtils.isSpeakerOn(this)) {\n PhoneUtils.turnOnSpeaker(this, false, true);\n }\n connectBluetoothAudio();\n }\n } else {\n Log.w(LOG_TAG, \"String_Node_Str\");\n }\n}\n"
|
"public void run() {\n try {\n if (dataKey != null) {\n key = toObject(dataKey);\n }\n if (dataValue != null) {\n value = ThreadContext.get().toObject(dataValue);\n }\n ListenerManager.get().callListeners(this);\n } catch (final Exception e) {\n e.printStackTrace();\n }\n}\n"
|
"protected SearchRequestResult parse_search(String html, int page) throws OpacErrorException {\n Document doc = Jsoup.parse(html);\n updateSearchSetValue(doc);\n if (doc.select(\"String_Node_Str\").size() > 0) {\n if (doc.select(\"String_Node_Str\").text().trim().equals(\"String_Node_Str\")) {\n return new SearchRequestResult(new ArrayList<SearchResult>(), 0, 1, 1);\n } else {\n throw new OpacErrorException(doc.select(\"String_Node_Str\").first().text().trim());\n }\n }\n reusehtml = html;\n int results_total = -1;\n String resultnumstr = doc.select(\"String_Node_Str\").first().text();\n Pattern p = Pattern.compile(\"String_Node_Str\");\n Matcher m = p.matcher(resultnumstr);\n if (m.find()) {\n resultnumstr = m.group();\n }\n if (resultnumstr.contains(\"String_Node_Str\")) {\n results_total = Integer.parseInt(resultnumstr.replaceAll(\"String_Node_Str\", \"String_Node_Str\"));\n } else if (resultnumstr.contains(\"String_Node_Str\")) {\n results_total = Integer.parseInt(resultnumstr.replaceAll(\"String_Node_Str\", \"String_Node_Str\"));\n } else {\n results_total = Integer.parseInt(resultnumstr);\n }\n List<SearchResult> results = new ArrayList<SearchResult>();\n if (results_total == 1) {\n try {\n DetailledItem singleResult = parse_result(html);\n SearchResult sr = new SearchResult();\n sr.setType(getMediaTypeInSingleResult(html));\n sr.setInnerhtml(\"String_Node_Str\" + singleResult.getTitle() + \"String_Node_Str\" + singleResult.getDetails().get(0).getContent());\n results.add(sr);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n Elements table = doc.select(\"String_Node_Str\");\n Elements links = doc.select(\"String_Node_Str\");\n boolean haslink = false;\n for (int i = 0; i < links.size(); i++) {\n Element node = links.get(i);\n if (node.hasAttr(\"String_Node_Str\") & node.attr(\"String_Node_Str\").contains(\"String_Node_Str\") && !haslink) {\n haslink = true;\n try {\n List<NameValuePair> anyurl = URLEncodedUtils.parse(new URI(node.attr(\"String_Node_Str\")), getDefaultEncoding());\n for (NameValuePair nv : anyurl) {\n if (nv.getName().equals(\"String_Node_Str\")) {\n break;\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n for (int i = 0; i < table.size(); i++) {\n Element tr = table.get(i);\n SearchResult sr = new SearchResult();\n if (tr.select(\"String_Node_Str\").size() > 0) {\n String[] fparts = tr.select(\"String_Node_Str\").get(0).attr(\"String_Node_Str\").split(\"String_Node_Str\");\n String fname = fparts[fparts.length - 1];\n if (data.has(\"String_Node_Str\")) {\n try {\n sr.setType(MediaType.valueOf(data.getJSONObject(\"String_Node_Str\").getString(fname)));\n } catch (JSONException e) {\n sr.setType(defaulttypes.get(fname.toLowerCase(Locale.GERMAN).replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\")));\n } catch (IllegalArgumentException e) {\n sr.setType(defaulttypes.get(fname.toLowerCase(Locale.GERMAN).replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\")));\n }\n } else {\n sr.setType(defaulttypes.get(fname.toLowerCase(Locale.GERMAN).replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\")));\n }\n }\n Element middlething = tr.child(2);\n List<Node> children = middlething.childNodes();\n int childrennum = children.size();\n List<String[]> strings = new ArrayList<String[]>();\n for (int ch = 0; ch < childrennum; ch++) {\n Node node = children.get(ch);\n if (node instanceof TextNode) {\n String text = ((TextNode) node).text().trim();\n if (text.length() > 3)\n strings.add(new String[] { \"String_Node_Str\", \"String_Node_Str\", text });\n } else if (node instanceof Element) {\n List<Node> subchildren = node.childNodes();\n for (int j = 0; j < subchildren.size(); j++) {\n Node subnode = subchildren.get(j);\n if (subnode instanceof TextNode) {\n String text = ((TextNode) subnode).text().trim();\n if (text.length() > 3)\n strings.add(new String[] { ((Element) node).tag().getName(), \"String_Node_Str\", text, ((Element) node).className(), ((Element) node).attr(\"String_Node_Str\") });\n } else if (subnode instanceof Element) {\n String text = ((Element) subnode).text().trim();\n if (text.length() > 3)\n strings.add(new String[] { ((Element) node).tag().getName(), ((Element) subnode).tag().getName(), text, ((Element) node).className(), ((Element) node).attr(\"String_Node_Str\") });\n }\n }\n }\n }\n StringBuilder description = new StringBuilder();\n int k = 0;\n for (String[] part : strings) {\n if (part[0] == \"String_Node_Str\" && k == 0) {\n description.append(\"String_Node_Str\" + part[2] + \"String_Node_Str\");\n } else if (k < 3) {\n description.append(\"String_Node_Str\" + part[2]);\n }\n k++;\n }\n sr.setInnerhtml(description.toString());\n sr.setNr(10 * (page - 1) + i);\n sr.setId(null);\n results.add(sr);\n }\n resultcount = results.size();\n return new SearchRequestResult(results, results_total, page);\n}\n"
|
"public void generateFiled(PsiElementFactory mFactory, PsiClass mClass, InnerClassEntity classEntity) {\n if (generate) {\n StringBuilder filedSb = new StringBuilder();\n String filedName = getGenerateFieldName();\n if (!TextUtils.isEmpty(classEntity.getExtra())) {\n filedSb.append(classEntity.getExtra()).append(\"String_Node_Str\");\n classEntity.setExtra(null);\n }\n if (!filedName.equals(getKey()) || Config.getInstant().isUseSerializedName()) {\n filedSb.append(Config.getInstant().geFullNameAnnotation().replaceAll(\"String_Node_Str\", getKey()));\n }\n if (Config.getInstant().isFieldPrivateMode()) {\n filedSb.append(\"String_Node_Str\").append(getFullNameType()).append(\"String_Node_Str\").append(filedName).append(\"String_Node_Str\");\n } else {\n filedSb.append(\"String_Node_Str\").append(getGenerType()).append(\"String_Node_Str\").append(filedName).append(\"String_Node_Str\");\n }\n mClass.add(mFactory.createFieldFromText(filedSb.toString(), mClass));\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.