content
stringlengths
40
137k
"public void processEdge(final Link edge, final Spot from, final Spot to, final DepthFirstSearch<Spot, Link> search) {\n tmp.set(displacement.getDouble(edge));\n dr.add(tmp);\n n.inc();\n}\n"
"public ResIterator getGroups() {\n return this.infModel.listSubjectsWithProperty(RDF.type, Omn.Group);\n}\n"
"private Color[] createColorMap(Display display) {\n return new Color[] { new Color(display, 0, 0, 0), new Color(display, 154, 50, 0), new Color(display, 51, 51, 0), new Color(display, 0, 50, 0), new Color(display, 0, 50, 100), new Color(display, 0, 0, 128), new Color(display, 51, 51, 153), new Color(display, 51, 51, 51), new Color(display, 128, 0, 0), new Color(display, 255, 102, 0), new Color(display, 124, 124, 0), new Color(display, 0, 128, 0), new Color(display, 0, 128, 128), new Color(display, 0, 0, 255), new Color(display, 102, 102, 153), new Color(display, 128, 128, 128), new Color(display, 255, 0, 0), new Color(display, 255, 153, 0), new Color(display, 154, 204, 0), new Color(display, 51, 153, 102), new Color(display, 51, 204, 204), new Color(display, 51, 102, 255), new Color(display, 128, 0, 128), new Color(display, 145, 145, 145), new Color(display, 255, 0, 255), new Color(display, 255, 204, 0), new Color(display, 255, 255, 0), new Color(display, 0, 255, 0), new Color(display, 0, 255, 255), new Color(display, 0, 204, 255), new Color(display, 154, 50, 102), new Color(display, 192, 192, 192), new Color(display, 253, 153, 204), new Color(display, 255, 204, 153), new Color(display, 255, 255, 153), new Color(display, 204, 255, 204), new Color(display, 204, 255, 255), new Color(display, 153, 204, 255), new Color(display, 204, 153, 255), new Color(display, 255, 255, 255) };\n}\n"
"public Object invokeAny(Collection tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {\n throw new UnsupportedOperationException();\n}\n"
"public void fire() throws IllegalActionException {\n super.fire();\n if ((_nStates != _transitionMatrix.length) || (_nStates != _priors.length) || (_nCategories != _B0[0].length)) {\n throw new IllegalActionException(this, \"String_Node_Str\");\n }\n boolean converged = _EMParameterEstimation();\n Token[] pTokens = new Token[_nStates];\n for (int i = 0; i < _nStates; i++) {\n pTokens[i] = new DoubleToken(pi_new[i]);\n }\n transitionMatrix.send(0, new DoubleMatrixToken(A_new));\n emissionEstimates.send(0, new DoubleMatrixToken(B_new));\n priorEstimates.send(0, new ArrayToken(pTokens));\n}\n"
"public void onMessageReceived(RemoteMessage remoteMessage) {\n if (remoteMessage.getData() != null) {\n try {\n PushMessage pushMessage = new PushMessage();\n pushMessage.setSubject(remoteMessage.getData().get(\"String_Node_Str\"));\n pushMessage.setSignature(remoteMessage.getData().get(\"String_Node_Str\"));\n byte[] base64DecodedSubject = android.util.Base64.decode(pushMessage.getSubject(), Base64.DEFAULT);\n byte[] base64DecodedSignature = android.util.Base64.decode(pushMessage.getSignature(), Base64.DEFAULT);\n PushUtils pushUtils = new PushUtils();\n PrivateKey privateKey = (PrivateKey) pushUtils.readKeyFromFile(false);\n try {\n SignatureVerification signatureVerification = pushUtils.verifySignature(base64DecodedSignature, base64DecodedSubject);\n if (signatureVerification.isSignatureValid()) {\n Cipher cipher = Cipher.getInstance(\"String_Node_Str\");\n cipher.init(Cipher.DECRYPT_MODE, privateKey);\n byte[] decryptedSubject = cipher.doFinal(base64DecodedSubject);\n DecryptedPushMessage decryptedPushMessage = LoganSquare.parse(new String(decryptedSubject), DecryptedPushMessage.class);\n if (decryptedPushMessage.getApp().equals(\"String_Node_Str\")) {\n int smallIcon;\n Bitmap largeIcon;\n String category = \"String_Node_Str\";\n int priority = Notification.PRIORITY_DEFAULT;\n Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Intent intent = new Intent(this, CallActivity.class);\n BundleBuilder bundleBuilder = new BundleBuilder(new Bundle());\n bundleBuilder.putString(\"String_Node_Str\", decryptedPushMessage.getId());\n bundleBuilder.putParcelable(\"String_Node_Str\", Parcels.wrap(signatureVerification.getUserEntity()));\n bundleBuilder.putBoolean(\"String_Node_Str\", true);\n intent.putExtras(bundleBuilder.build());\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);\n NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n switch(decryptedPushMessage.getType()) {\n case \"String_Node_Str\":\n smallIcon = R.drawable.ic_call_black_24dp;\n category = Notification.CATEGORY_CALL;\n priority = Notification.PRIORITY_HIGH;\n soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);\n break;\n case \"String_Node_Str\":\n smallIcon = R.drawable.ic_notifications_black_24dp;\n category = Notification.CATEGORY_CALL;\n priority = Notification.PRIORITY_HIGH;\n break;\n case \"String_Node_Str\":\n smallIcon = R.drawable.ic_chat_black_24dp;\n category = Notification.CATEGORY_MESSAGE;\n break;\n default:\n smallIcon = R.drawable.ic_logo;\n }\n largeIcon = BitmapFactory.decodeResource(getResources(), smallIcon);\n CRC32 crc32 = new CRC32();\n Notification.Builder notificationBuilder = new Notification.Builder(this).setSmallIcon(smallIcon).setLargeIcon(largeIcon).setColor(getColor(R.color.colorPrimary)).setCategory(category).setPriority(priority).setWhen(Calendar.getInstance().getTimeInMillis()).setShowWhen(true).setSubText(signatureVerification.getUserEntity().getDisplayName()).setContentTitle(decryptedPushMessage.getSubject()).setSound(soundUri).setAutoCancel(true);\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {\n String groupName = String.format(getResources().getString(R.string.nc_notification_channel), signatureVerification.getUserEntity().getDisplayName(), signatureVerification.getUserEntity().getBaseUrl());\n crc32.update(groupName.getBytes());\n NotificationUtils.createNotificationChannelGroup(notificationManager, Long.toString(crc32.getValue()), groupName);\n if (category.equals(Notification.CATEGORY_CALL)) {\n NotificationUtils.createNotificationChannel(notificationManager, NotificationUtils.NOTIFICATION_CHANNEL_CALLS, getResources().getString(R.string.nc_notification_channel_calls), getResources().getString(R.string.nc_notification_channel_calls_description), true, NotificationManager.IMPORTANCE_HIGH);\n notificationBuilder.setChannelId(NotificationUtils.NOTIFICATION_CHANNEL_CALLS);\n } else {\n NotificationUtils.createNotificationChannel(notificationManager, NotificationUtils.NOTIFICATION_CHANNEL_MESSAGES, getResources().getString(R.string.nc_notification_channel_messages), getResources().getString(R.string.nc_notification_channel_messages_description), true, NotificationManager.IMPORTANCE_DEFAULT);\n notificationBuilder.setChannelId(NotificationUtils.NOTIFICATION_CHANNEL_MESSAGES);\n }\n notificationBuilder.setGroup(Long.toString(crc32.getValue()));\n }\n notificationBuilder.setContentIntent(pendingIntent);\n String stringForCrc = decryptedPushMessage.getSubject() + \"String_Node_Str\" + signatureVerification.getUserEntity().getDisplayName() + \"String_Node_Str\" + signatureVerification.getUserEntity().getBaseUrl();\n crc32 = new CRC32();\n crc32.update(stringForCrc.getBytes());\n notificationManager.notify((int) crc32.getValue(), notificationBuilder.build());\n }\n }\n } catch (NoSuchAlgorithmException e1) {\n Log.d(TAG, \"String_Node_Str\" + e1.getLocalizedMessage());\n } catch (NoSuchPaddingException e1) {\n Log.d(TAG, \"String_Node_Str\" + e1.getLocalizedMessage());\n } catch (InvalidKeyException e1) {\n Log.d(TAG, \"String_Node_Str\" + e1.getLocalizedMessage());\n }\n } catch (Exception exception) {\n Log.d(TAG, \"String_Node_Str\" + exception.getLocalizedMessage());\n }\n } else {\n Log.d(TAG, \"String_Node_Str\");\n }\n}\n"
"public void start(Context context) {\n this.listOfForms = new Map();\n this.formIDs = new Vector();\n getXForms();\n if (context.getElement(\"String_Node_Str\") != null) {\n User loggedInUser = (User) context.getElement(\"String_Node_Str\");\n if (loggedInUser.isAdminUser())\n this.formsList.addCommand(CMD_ADD_USER);\n }\n this.positionToId = this.formsList.loadView(listOfForms);\n parent.setDisplay(this, this.formsList);\n this.context = context;\n}\n"
"public ResultSet getTables(String catalog, String schema, String tableNamePattern, String[] types) throws SQLException {\n String hiveCat = catalog;\n if (StringUtils.isBlank(hiveCat)) {\n hiveCat = HIVE_SCHEMA_DEFAULT;\n }\n String[] hiveTypes = types;\n if (hiveTypes == null) {\n hiveTypes = new String[0];\n }\n ClassLoader currCL = Thread.currentThread().getContextClassLoader();\n Thread.currentThread().setContextClassLoader(classLoader);\n EmbeddedHiveResultSet tableResultSet = new EmbeddedHiveResultSet();\n tableResultSet.setMetadata(TABLE_META);\n List<String[]> list = new ArrayList<String[]>();\n tableResultSet.setData(list);\n if (hiveObject != null) {\n try {\n Class hiveClass = hiveObject.getClass();\n Method method = hiveClass.getDeclaredMethod(\"String_Node_Str\");\n Object hiveConf = method.invoke(hiveObject);\n Class hiveConfClass = hiveConf.getClass();\n Class confVarClass = null;\n for (Class curClass : hiveConfClass.getClasses()) {\n if (curClass.getSimpleName().equals(\"String_Node_Str\")) {\n confVarClass = curClass;\n break;\n }\n }\n if (confVarClass != null) {\n Object confVar = null;\n for (Object curConfVar : confVarClass.getEnumConstants()) {\n if (curConfVar.toString().equals(\"String_Node_Str\")) {\n confVar = curConfVar;\n break;\n }\n }\n if (confVar != null) {\n Method setIntVarMethod = hiveConfClass.getDeclaredMethod(\"String_Node_Str\", confVarClass, int.class);\n int timeout = 15;\n if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {\n IDesignerCoreService designerService = (IDesignerCoreService) GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);\n timeout = designerService.getDesignerCorePreferenceStore().getInt(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT);\n }\n setIntVarMethod.invoke(hiveConf, confVar, timeout);\n }\n }\n Object tables = ReflectionUtils.invokeMethod(hiveObject, \"String_Node_Str\", new Object[] { catalog });\n if (tables instanceof List) {\n List<String> tableList = (List<String>) tables;\n for (String tableName : tableList) {\n String tableType = getTableType(catalog, tableName);\n if (tableType != null) {\n String[] array = new String[] { \"String_Node_Str\", catalog, tableName, tableType, \"String_Node_Str\" };\n list.add(array);\n }\n }\n }\n } catch (Exception e) {\n throw new SQLException(e);\n } finally {\n Thread.currentThread().setContextClassLoader(currCL);\n }\n }\n return tableResultSet;\n}\n"
"public static boolean sendMessage(DBAccessor dba, final Context context, Entry message) {\n try {\n if (dba.isTrustedContact(message.getNumber()) && ConversationView.sharedPrefs.getBoolean(QuickPrefsActivity.NATIVE_SAVE_SETTING_KEY, true) && !message.isExchange()) {\n if (SMSUtility.cryptoEngine == null) {\n SMSUtility.cryptoEngine = new Encryption(SMSUtility.getUser(dba, null));\n }\n Number number = dba.getNumber(format(message.getNumber()));\n Log.v(\"String_Node_Str\", message.getMessage());\n final String encrypted = CryptoEngine.encrypt(number, message.getMessage());\n Log.v(\"String_Node_Str\", encrypted);\n sendSMS(context, new Entry(message.getNumber(), encrypted, message.getId(), message.getExchange()));\n dba.updateEncryptNonce(number);\n if (ConversationView.sharedPrefs.getBoolean(QuickPrefsActivity.SHOW_ENCRYPT_SETTING_KEY, false)) {\n sendToSelf(context, message.getNumber(), encrypted, ConversationView.SENT);\n dba.addNewMessage(new Message(encrypted, true, Message.SENT_ENCRYPTED), message.getNumber(), false);\n }\n sendToSelf(context, message.getNumber(), message.getMessage(), ConversationView.SENT);\n Toast.makeText(context, R.string.encrypted_message_sent, Toast.LENGTH_SHORT).show();\n } else {\n sendSMS(context, message);\n sendToSelf(context, message.getNumber(), message.getMessage(), ConversationView.SENT);\n Toast.makeText(context, R.string.message_sent, Toast.LENGTH_SHORT).show();\n }\n return true;\n } catch (InvalidCipherTextException e) {\n Toast.makeText(context, R.string.failed_to_encrypt, Toast.LENGTH_LONG).show();\n e.printStackTrace();\n BugSenseHandler.sendExceptionMessage(\"String_Node_Str\", \"String_Node_Str\", e);\n return false;\n } catch (final Exception e) {\n Toast.makeText(context, R.string.failed_to_sent, Toast.LENGTH_LONG).show();\n e.printStackTrace();\n BugSenseHandler.sendExceptionMessage(\"String_Node_Str\", \"String_Node_Str\", e);\n return false;\n }\n}\n"
"public void testDimensionGetAll() throws IOException, BirtException {\n ILevelDefn[] levelDefs = new ILevelDefn[4];\n levelDefs[0] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n levelDefs[1] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n levelDefs[2] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n levelDefs[3] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n IDocumentManager documentManager = DocumentManagerFactory.createFileDocumentManager();\n IDimension dimension = DimensionFactory.createDimension(\"String_Node_Str\", documentManager, new FourLevelDataset(), levelDefs, false);\n assertEquals(dimension.isTime(), false);\n IHierarchy hierarchy = dimension.getHierarchy();\n assertEquals(hierarchy.getName(), \"String_Node_Str\");\n Dimension realDimension = (Dimension) dimension;\n IDiskArray result = realDimension.getAllRows(new StopSign());\n for (int i = 0; i < result.size(); i++) {\n DimensionRow dimRow = (DimensionRow) (result.get(i));\n assertEquals(dimRow.getMembers()[0].getKeyValues()[0], FourLevelDataset.Level1Col[i]);\n assertEquals(dimRow.getMembers()[1].getKeyValues()[0], FourLevelDataset.Level2Col[i]);\n assertEquals(dimRow.getMembers()[2].getKeyValues()[0], FourLevelDataset.Level3Col[i]);\n assertEquals(dimRow.getMembers()[3].getKeyValues()[0], FourLevelDataset.Level4Col[i]);\n }\n}\n"
"private void _setUpMonitoring() {\n setLastPongToken(new PongToken(System.currentTimeMillis()));\n _pingPongExecutor = Executors.newSingleThreadScheduledExecutor();\n _pingPongFuture = _pingPongExecutor.scheduleAtFixedRate(new Runnable() {\n\n public void run() {\n try {\n long msTime = System.currentTimeMillis();\n _tokenPublisher.sendToken(new PingToken(msTime), null);\n _LOGGER.info(\"String_Node_Str\");\n long latency = msTime - _getLastPongToken().getTimestamp();\n if (latency > _PING_PERIOD * 2) {\n _pingPonglatency = latency;\n }\n if (_timeoutPeriod > 0) {\n if (latency > _timeoutPeriod) {\n fireModelConnectionExpired();\n }\n }\n } catch (Throwable e) {\n fireModelException(\"String_Node_Str\", e);\n }\n }\n }, 0, _PING_PERIOD, TimeUnit.MILLISECONDS);\n}\n"
"static void configureJDKLogger(Logger jdkLogger, UnnamedLogger loggerConfig) {\n int minLogLevelACS;\n try {\n minLogLevelACS = Math.min(loggerConfig.getMinLogLevel(), loggerConfig.getMinLogLevelLocal());\n AcsLogLevel minLogLevelJDK = AcsLogLevel.fromAcsCoreLevel(minLogLevelACS);\n jdkLogger.setLevel(minLogLevelJDK);\n } catch (Exception ex) {\n jdkLogger.log(Level.INFO, \"String_Node_Str\", ex);\n }\n}\n"
"public Collection<ExpectedSlotStatus> getAllExpectedStates() {\n List<ExpectedSlotStatus> slots = newArrayList();\n if (isDomainCreated()) {\n try {\n String query = String.format(\"String_Node_Str\", domainName);\n SelectResult select = simpleDb.select(new SelectRequest(query, true));\n for (Item item : select.getItems()) {\n ExpectedSlotStatus expectedSlotStatus = loadSlotStatus(item);\n if (expectedSlotStatus != null) {\n slots.add(expectedSlotStatus);\n }\n }\n expectedStateStoreUp();\n } catch (Exception e) {\n expectedStateStoreDown(e);\n }\n }\n return slots;\n}\n"
"private static void assertBooleanDefaultValue(final DTCellValue52 dcv) {\n if (dcv.getBooleanValue() == null) {\n dcv.setBooleanValue(Boolean.valueOf(dcv.getStringValue()));\n }\n}\n"
"protected void buildHighlightedEnzymeNodeDisplayList() {\n iHighlightedEnzymeNodeDisplayListId = gl.glGenLists(1);\n fPathwayNodeWidth = refRenderStyle.getEnzymeNodeWidth() / 2.0f * fScalingFactorX;\n fPathwayNodeHeight = refRenderStyle.getEnzymeNodeHeight() / 2.0f * fScalingFactorY;\n gl.glNewList(iHighlightedEnzymeNodeDisplayListId, GL.GL_COMPILE);\n gl.glScaled(1.2f, 1.2f, 1.2f);\n fillNodeDisplayList();\n gl.glScaled(1.0f / 1.1f, 1.0f / 1.1f, 1.0f / 1.1f);\n gl.glEndList();\n}\n"
"public static final void main(String[] argv) {\n commonInit();\n finishInit();\n if (Config.LOGV)\n Slog.d(TAG, \"String_Node_Str\");\n}\n"
"protected static String makeSetName(final char opener, final ArrayList<Term> arg, final char closer) {\n StringBuilder name = new StringBuilder(16).append(opener);\n if (arg.size() == 0) {\n } else {\n name.append(arg.get(0).getName());\n for (int i = 1; i < arg.size(); i++) {\n name.append(Symbols.ARGUMENT_SEPARATOR);\n name.append(arg.get(i).getName());\n }\n }\n name.append(closer);\n return name.toString();\n}\n"
"static DatumShiftGridFile<Angle, Angle> getOrLoad(final Path latitudeShifts, final Path longitudeShifts) throws FactoryException {\n final Path rlat = DataDirectory.DATUM_CHANGES.resolve(latitudeShifts).toAbsolutePath();\n final Path rlon = DataDirectory.DATUM_CHANGES.resolve(longitudeShifts).toAbsolutePath();\n final Object key = new AbstractMap.SimpleImmutableEntry<>(rlat, rlon);\n DatumShiftGridFile<?, ?> grid = DatumShiftGridFile.CACHE.peek(key);\n if (grid == null) {\n final Cache.Handler<DatumShiftGridFile<?, ?>> handler = DatumShiftGridFile.CACHE.lock(key);\n try {\n grid = handler.peek();\n if (grid == null) {\n final Loader loader;\n Path file = latitudeShifts;\n try {\n final ByteBuffer buffer = ByteBuffer.allocate(4096).order(ByteOrder.LITTLE_ENDIAN);\n final FloatBuffer fb = buffer.asFloatBuffer();\n try (final ReadableByteChannel in = Files.newByteChannel(rlat)) {\n DatumShiftGridLoader.log(NADCON.class, CharSequences.commonPrefix(latitudeShifts.toString(), longitudeShifts.toString()).toString() + '…');\n loader = new Loader(in, buffer, file);\n loader.readGrid(fb, null, longitudeShifts);\n }\n buffer.clear();\n file = longitudeShifts;\n try (final ReadableByteChannel in = Files.newByteChannel(rlon)) {\n new Loader(in, buffer, file).readGrid(fb, loader, null);\n }\n } catch (IOException | NoninvertibleTransformException | RuntimeException e) {\n final String message = Errors.format(Errors.Keys.CanNotParseFile_2, \"String_Node_Str\", file);\n if (e instanceof NoSuchFileException) {\n throw new MissingFactoryResourceException(message, e);\n } else {\n throw new FactoryDataException(message, e);\n }\n }\n grid = DatumShiftGridCompressed.compress(loader.grid, null, loader.grid.accuracy);\n grid = grid.useSharedData();\n }\n } finally {\n handler.putAndUnlock(grid);\n }\n }\n return grid.castTo(Angle.class, Angle.class);\n}\n"
"private static WordXmlPictureE10 createWordXmlPictureFromE10(WordprocessingMLPackage wmlPackage, String imageDirPath, NodeIterator wpict) {\n WordXmlPictureE10 converter = new WordXmlPictureE10(wmlPackage, wpict);\n converter.findShape();\n if (converter.shape == null) {\n log.error(\"String_Node_Str\");\n return null;\n }\n converter.readStandardAttributes(converter.shape);\n converter.readDimensions(converter.style);\n converter.findImageData();\n if (converter.imageData == null) {\n log.error(\"String_Node_Str\");\n return null;\n }\n String imgRelId = converter.imageData.getOtherAttributes().get(new QName(\"String_Node_Str\", \"String_Node_Str\"));\n if (imgRelId != null && !imgRelId.equals(\"String_Node_Str\")) {\n converter.handleImageRel(imgRelId, imageDirPath);\n }\n return converter;\n}\n"
"protected void performSaveAs(IProgressMonitor progressMonitor) {\n Shell shell = getSite().getShell();\n final IEditorInput input = getEditorInput();\n IDocumentProvider provider = getDocumentProvider();\n IEditorInput newInput;\n if (input instanceof IURIEditorInput && !(input instanceof IFileEditorInput)) {\n super.performSaveAs(progressMonitor);\n return;\n }\n IProject rootProject = SQLExplorerPlugin.getDefault().getRootProject();\n final IFolder defaultValidFolder = rootProject.getFolder(\"String_Node_Str\").getFolder(\"String_Node_Str\");\n ILabelProvider lp = new WorkbenchLabelProvider();\n ITreeContentProvider cp = new WorkbenchContentProvider();\n FolderSelectionDialog dialog = new FolderSelectionDialog(shell, lp, cp);\n dialog.setTitle(\"String_Node_Str\");\n dialog.setMessage(\"String_Node_Str\");\n dialog.setInput(rootProject);\n dialog.addFilter(new ViewerFilter() {\n public boolean select(Viewer viewer, Object parentElement, Object element) {\n if (element instanceof IFolder) {\n IFolder folder = (IFolder) element;\n if (\"String_Node_Str\".equals(folder.getName()) || \"String_Node_Str\".equals(folder.getName())) {\n return true;\n } else {\n return defaultValidFolder.getFullPath().isPrefixOf(folder.getFullPath()) && !folder.getName().endsWith(SVN_FOLDER_NAME);\n }\n }\n return false;\n }\n });\n dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));\n if (dialog.open() == Window.CANCEL) {\n if (progressMonitor != null)\n progressMonitor.setCanceled(true);\n return;\n }\n Object elements = dialog.getResult()[0];\n String fileName = getValidFileName(dialog.getFileName());\n IResource elem = (IResource) elements;\n if (elem instanceof IFolder) {\n IPath filePath = ((IFolder) elem).getFullPath();\n filePath = filePath.append(fileName);\n if (filePath == null) {\n if (progressMonitor != null)\n progressMonitor.setCanceled(true);\n return;\n }\n IWorkspace workspace = ResourcesPlugin.getWorkspace();\n IFile file = workspace.getRoot().getFile(filePath);\n while (fileExist(file)) {\n InputDialog inputDialog = new InputDialog(getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\", filePath.lastSegment(), null);\n if (inputDialog.open() == InputDialog.CANCEL) {\n return;\n } else {\n IPath lseg = filePath.removeLastSegments(1);\n IPath append = lseg.append(inputDialog.getValue());\n file = workspace.getRoot().getFile(append);\n }\n }\n newInput = new FileEditorInput(file);\n if (provider == null) {\n return;\n }\n boolean success = false;\n try {\n provider.aboutToChange(newInput);\n file = createIFile(file, getViewer().getDocument().get());\n newInput = new FileEditorInput(file);\n success = true;\n } catch (CoreException x) {\n final IStatus status = x.getStatus();\n if (status == null || status.getSeverity() != IStatus.CANCEL) {\n String title = \"String_Node_Str\";\n String msg = \"String_Node_Str\";\n MessageDialog.openError(shell, title, msg);\n }\n } finally {\n provider.changed(newInput);\n if (success)\n setInput(newInput);\n }\n if (progressMonitor != null)\n progressMonitor.setCanceled(!success);\n }\n}\n"
"public int getShardAddress(String user) {\n int shardCount = FacebookRPCNode.getShardAddresses().size();\n int hash = (int) Character.toLowerCase(user.charAt(0)) - 'a';\n return 1 + (hash * shardCount) / 26;\n}\n"
"public boolean performFinish() {\n final List<ItemRecord> itemRecords = getCheckedElements();\n for (ItemRecord itemRecord : itemRecords) {\n Item item = itemRecord.getProperty().getItem();\n if (item instanceof JobletProcessItem) {\n needToRefreshPalette = true;\n }\n saveDocumentation(item);\n IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();\n if (item.getState().isLocked()) {\n try {\n factory.unlock(item);\n } catch (PersistenceException e) {\n ExceptionHandler.process(e);\n } catch (LoginException e) {\n ExceptionHandler.process(e);\n }\n }\n ERepositoryStatus status = factory.getStatus(item);\n if (status != null && status == ERepositoryStatus.LOCK_BY_USER) {\n try {\n factory.unlock(item);\n } catch (PersistenceException e) {\n ExceptionHandler.process(e);\n } catch (LoginException e) {\n ExceptionHandler.process(e);\n }\n }\n }\n try {\n IRunnableWithProgress op = new IRunnableWithProgress() {\n public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {\n IPath destinationPath = null;\n String contentType = \"String_Node_Str\";\n if (rNode != null && rNode.getType().equals(ENodeType.SIMPLE_FOLDER)) {\n destinationPath = RepositoryNodeUtilities.getPath(rNode);\n contentType = rNode.getContentType().name();\n }\n repositoryUtil.setErrors(false);\n repositoryUtil.clear();\n repositoryUtil.importItemRecords(manager, itemRecords, monitor, overwrite, destinationPath, contentType);\n if (repositoryUtil.hasErrors()) {\n throw new InvocationTargetException(new PersistenceException(\"String_Node_Str\"));\n }\n }\n };\n new ProgressMonitorDialog(getShell()).run(true, true, op);\n } catch (InvocationTargetException e) {\n Throwable targetException = e.getTargetException();\n if (repositoryUtil.getRoutineExtModulesMap().isEmpty()) {\n if (targetException instanceof PersistenceException) {\n MessageDialog.openWarning(getShell(), Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"));\n }\n }\n } catch (InterruptedException e) {\n }\n ResourcesManager curManager = (ResourcesManager) this.manager;\n if (curManager instanceof ProviderManager)\n curManager.closeResource();\n selectedItems = null;\n itemRecords.clear();\n return true;\n}\n"
"private void handleCreateNewWorkflow(Collection<TeamWorkFlowArtifact> teamArts, String title) throws OseeCoreException {\n IAtsUser user = AtsClientService.get().getUserService().getCurrentUser();\n List<IAtsTeamWorkflow> teamWfs = new LinkedList<>();\n for (TeamWorkFlowArtifact teamArt : getDefaultTeamWorkflows()) {\n teamWfs.add(teamArt);\n }\n DuplicateWorkflowAtStartStateOperation op = new DuplicateWorkflowAtStartStateOperation(teamWfs, title, user, AtsClientService.get());\n IValidatingOperation operation = op;\n XResultData results = validateAndRun(operation);\n if (!results.isErrors()) {\n for (IAtsTeamWorkflow newTeamArt : op.getResults().values()) {\n WorkflowEditor.editArtifact((Artifact) newTeamArt);\n }\n }\n}\n"
"public void addEventListener(final String eventName, final LeoObject function) {\n switch(eventName.toLowerCase()) {\n case \"String_Node_Str\":\n {\n this.dispatcher.addEventListener(BombDisarmedEvent.class, new BombDisarmedListener() {\n public void onBombDisarmedEvent(BombDisarmedEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n case \"String_Node_Str\":\n {\n this.dispatcher.addEventListener(BombExplodedEvent.class, new BombExplodedListener() {\n public void onBombExplodedEvent(BombExplodedEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n case \"String_Node_Str\":\n {\n addEventListener(BombPlantedEvent.class, new BombPlantedListener() {\n\n public void onBombPlanted(BombPlantedEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n case \"String_Node_Str\":\n {\n this.dispatcher.addEventListener(FlagCapturedEvent.class, new FlagCapturedListener() {\n public void onFlagCapturedEvent(FlagCapturedEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n case \"String_Node_Str\":\n {\n this.dispatcher.addEventListener(FlagReturnedEvent.class, new FlagReturnedListener() {\n public void onFlagReturnedEvent(FlagReturnedEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n case \"String_Node_Str\":\n {\n this.dispatcher.addEventListener(FlagStolenEvent.class, new FlagStolenListener() {\n public void onFlagStolenEvent(FlagStolenEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n case \"String_Node_Str\":\n {\n this.dispatcher.addEventListener(GameEndEvent.class, new GameEndListener() {\n public void onGameEnd(GameEndEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n case \"String_Node_Str\":\n {\n this.dispatcher.addEventListener(KillRollEvent.class, new KillRollListener() {\n public void onKillRoll(KillRollEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n case \"String_Node_Str\":\n {\n this.dispatcher.addEventListener(KillStreakEvent.class, new KillStreakListener() {\n public void onKillStreak(KillStreakEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n case \"String_Node_Str\":\n {\n this.dispatcher.addEventListener(PlayerAwardEvent.class, new PlayerAwardListener() {\n public void onPlayerAward(PlayerAwardEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n case \"String_Node_Str\":\n {\n this.dispatcher.addEventListener(PlayerJoinedEvent.class, new PlayerJoinedListener() {\n public void onPlayerJoined(PlayerJoinedEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n case \"String_Node_Str\":\n {\n this.dispatcher.addEventListener(PlayerKilledEvent.class, new PlayerKilledListener() {\n public void onPlayerKilled(PlayerKilledEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n case \"String_Node_Str\":\n {\n this.dispatcher.addEventListener(PlayerLeftEvent.class, new PlayerLeftListener() {\n public void onPlayerLeft(PlayerLeftEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n case \"String_Node_Str\":\n {\n this.dispatcher.addEventListener(PlayerSpawnedEvent.class, new PlayerSpawnedListener() {\n public void onPlayerSpawned(PlayerSpawnedEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n case \"String_Node_Str\":\n {\n this.dispatcher.addEventListener(RoundEndedEvent.class, new RoundEndedListener() {\n public void onRoundEnded(RoundEndedEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n case \"String_Node_Str\":\n {\n this.dispatcher.addEventListener(RoundStartedEvent.class, new RoundStartedListener() {\n public void onRoundStarted(RoundStartedEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n case \"String_Node_Str\":\n {\n this.dispatcher.addEventListener(SoundEmittedEvent.class, new SoundEmitterListener() {\n public void onSoundEmitted(SoundEmittedEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n case \"String_Node_Str\":\n {\n this.dispatcher.addEventListener(SurvivorEvent.class, new SurvivorEventListener() {\n public void onSurvivorEvent(SurvivorEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n case \"String_Node_Str\":\n {\n this.dispatcher.addEventListener(TileRemovedEvent.class, new TileRemovedListener() {\n public void onTileRemoved(TileRemovedEvent event) {\n callFunction(eventName, function, event);\n }\n });\n break;\n }\n default:\n {\n Cons.println(\"String_Node_Str\" + eventName + \"String_Node_Str\");\n }\n }\n}\n"
"public int findPattern(String pattern, boolean backwards) throws IOException {\n Pattern p = Pattern.compile(\"String_Node_Str\" + pattern + \"String_Node_Str\");\n int currentBuffer = bufferPos;\n int currentLine = bufferLine;\n int startLine;\n int cursor = 0;\n if (backwards) {\n bufferLine = 0;\n startLine = 0;\n bufferPos = 0;\n } else {\n cursor = startLine = bufferPos = findLine(bufferLine);\n }\n int line = bufferLine;\n int lCount = lineWidth;\n byte[] buffer = new byte[1024];\n int read;\n while ((read = read(buffer)) != -1) {\n for (int i = 0; i < read; i++) {\n cursor++;\n switch(buffer[i]) {\n case '\\r':\n i++;\n case '\\n':\n line++;\n lCount = lineWidth;\n if (p.matcher(new String(curr.getChars(startLine, cursor - startLine - 1))).matches()) {\n return line;\n }\n startLine = cursor;\n }\n if (--lCount == 0) {\n line++;\n lCount = lineWidth;\n }\n }\n }\n bufferPos = currentBuffer;\n bufferLine = currentLine;\n return -1;\n}\n"
"public void receiveHit(float strength, ShortPoint2D attackerPos, byte attackingPlayer) {\n NewMovable attacker = getGrid().getMovable(attackerPos);\n if (attacker != null && attacker.getPlayer() == getPlayer()) {\n return;\n }\n if (doorHealth > 0) {\n doorHealth -= strength / Constants.DOOR_HIT_RESISTENCY_FACTOR;\n if (doorHealth <= 0) {\n doorHealth = 0;\n inFight = true;\n OccupyingBuilding.this.getGrid().getMapObjectsManager().addSelfDeletingMapObject(getPos(), EMapObjectType.GHOST, Constants.GHOST_PLAY_DURATION, getPlayer());\n pollNewDefender(attackerPos);\n }\n } else if (currDefender != null) {\n IAttackableMovable movable = currDefender.getSoldier().getMovable();\n movable.receiveHit(strength, attackerPos, attackingPlayer);\n if (movable.getHealth() <= 0) {\n if (occupiers.isEmpty()) {\n currDefender = null;\n changePlayerTo(attackerPos);\n } else {\n emptyPlaces.add(currDefender.place);\n searchedSoldiers.add(getSearchType(currDefender.getSoldier().getMovableType()));\n pollNewDefender();\n }\n }\n }\n OccupyingBuilding.this.getPlayer().showMessage(SimpleMessage.attacked(attackingPlayer, attackerPos));\n}\n"
"private void genSubQuery2() throws BirtException {\n QueryDefinition queryDefn = newReportQuery();\n SubqueryDefinition subQueryDefn = new SubqueryDefinition(subQueryName, queryDefn);\n queryDefn.addSubquery(subQueryDefn);\n prepareExprNameAndQuery(subQueryDefn);\n IQueryResults qr = myGenDataEngine.prepare(queryDefn).execute(scope);\n saveForPresentation(qr, rowBeArray, totalBeArray);\n IResultIterator ri = qr.getResultIterator();\n while (ri.next()) ;\n IResultIterator ri2 = ri.getSecondaryIterator(subQueryName, subScope);\n while (ri2.next()) {\n for (int i = 0; i < rowBeArray.length; i++) expectedValue.add(ri2.getValue(rowExprName[i]));\n for (int i = 0; i < totalBeArray.length; i++) expectedValue.add(ri2.getValue(totalExprName[i]));\n }\n ri2.close();\n qr.close();\n myGenDataEngine.shutdown();\n}\n"
"private void writeBorderProperty(String style, String color, CSSValue width, int margin) {\n writer.attribute(\"String_Node_Str\", WordUtil.parseBorderStyle(style));\n writer.attribute(\"String_Node_Str\", WordUtil.parseBorderSize(PropertyUtil.getDimensionValue(width)));\n writer.attribute(\"String_Node_Str\", validateBorderSpace(margin));\n writer.attribute(\"String_Node_Str\", WordUtil.parseColor(color));\n}\n"
"public String getCurrentTreatmentGroup(Patient patient) {\n String treatmentGroup = \"String_Node_Str\";\n try {\n Program program = Context.getProgramWorkflowService().getProgramByName(\"String_Node_Str\");\n List<PatientProgram> patientPrograms = Context.getProgramWorkflowService().getPatientPrograms(patient, program, null, null, null, null, false);\n ProgramWorkflow workflow = program.getWorkflowByName(\"String_Node_Str\");\n if (!patientPrograms.isEmpty()) {\n PatientState currentState = patientPrograms.get(0).getCurrentState(workflow);\n if (currentState != null && currentState.getActive()) {\n treatmentGroup = \"String_Node_Str\";\n treatmentGroup = currentState.getState().getConcept().getName().getName();\n treatmentGroup = treatmentGroup.replace(\"String_Node_Str\", \"String_Node_Str\");\n treatmentGroup = treatmentGroup.replace(\"String_Node_Str\", \"String_Node_Str\");\n treatmentGroup = treatmentGroup.trim();\n } else {\n treatmentGroup = \"String_Node_Str\";\n }\n } else {\n treatmentGroup = \"String_Node_Str\";\n }\n } catch (Exception e) {\n log.info(\"String_Node_Str\" + patient.getPatientId() + \"String_Node_Str\" + e.getCause() + \"String_Node_Str\" + e.getMessage() + \"String_Node_Str\");\n }\n return treatmentGroup;\n}\n"
"public void closeSessionIfTimeout(final String transportId, final String reason) {\n final ServerSession session = sessionsManager.getByTransportId(transportId);\n if (session == null) {\n log.warn(\"String_Node_Str\", label, transportId);\n } else {\n try {\n ScheduledFuture<?> lastStartedTimerFuture = taskScheduler.schedule(new Runnable() {\n public void run() {\n closeSession(session, reason);\n }\n }, new Date(System.currentTimeMillis() + session.getReconnectionTimeoutInMillis()));\n session.setCloseTimerTask(lastStartedTimerFuture);\n } catch (TaskRejectedException e) {\n log.warn(label + \"String_Node_Str\" + \"String_Node_Str\", session.getSessionId(), transportId);\n }\n }\n}\n"
"protected String processReport(ActionReporter ar) {\n StringBuilder result = new StringBuilder();\n String des = ar.getActionDescription();\n if (des == null) {\n des = \"String_Node_Str\";\n }\n final String message = ResourceUtil.encodeString((ar instanceof RestActionReporter) ? ((RestActionReporter) ar).getCombinedMessage() : ar.getMessage());\n if (message != null) {\n result.append(\"String_Node_Str\").append(des).append(\"String_Node_Str\").append(\"String_Node_Str\" + message + \"String_Node_Str\").append(\"String_Node_Str\");\n }\n if (ar.getActionExitCode() != ExitCode.SUCCESS) {\n result.append(\"String_Node_Str\" + ar.getActionExitCode().toString() + \"String_Node_Str\");\n }\n Properties properties = ar.getTopMessagePart().getProps();\n if (!properties.isEmpty()) {\n result.append(processProperties(properties));\n }\n Properties extraProperties = ar.getExtraProperties();\n if ((extraProperties != null) && (!extraProperties.isEmpty())) {\n if ((extraProperties.size() == 1) && (extraProperties.get(\"String_Node_Str\") != null)) {\n } else {\n result.append(getExtraProperties(extraProperties));\n }\n }\n List<ActionReport.MessagePart> children = ar.getTopMessagePart().getChildren();\n if (children.size() > 0) {\n result.append(processChildren(children));\n }\n List<ActionReporter> subReports = ar.getSubActionsReport();\n if (subReports.size() > 0) {\n result.append(processSubReports(subReports));\n }\n return result.toString();\n}\n"
"public static void startServer() throws IOException, URISyntaxException, InterruptedException {\n orchestrator.resetData();\n SonarScanner build = SonarScanner.create().setProjectKey(\"String_Node_Str\").setProjectName(\"String_Node_Str\").setProjectVersion(\"String_Node_Str\").setSourceEncoding(\"String_Node_Str\").setSourceDirs(\"String_Node_Str\").setProjectDir(FileLocation.of(\"String_Node_Str\").getFile()).setProfile(\"String_Node_Str\").setProperty(\"String_Node_Str\", \"String_Node_Str\");\n Tests.executeBuildWithExpectedWarnings(orchestrator, build);\n}\n"
"public void load() {\n genders.add(Gender.newGender(\"String_Node_Str\"));\n genders.add(Gender.newGender(\"String_Node_Str\"));\n}\n"
"private void updateRelatedView(Cursor related) {\n relatedContainer.removeAllViews();\n final int count = related.getCount();\n final int visibility = count > 0 ? View.VISIBLE : View.GONE;\n relatedParent.setVisibility(visibility);\n int index = 0;\n related.moveToPosition(-1);\n while (related.moveToNext() && index < 3) {\n View v = LayoutInflater.from(getActivity()).inflate(R.layout.item_related, this.relatedContainer, false);\n final long relatedShowId = Cursors.getLong(related, RelatedShowsColumns.RELATED_SHOW_ID);\n final String title = Cursors.getString(related, ShowColumns.TITLE);\n final String overview = Cursors.getString(related, ShowColumns.OVERVIEW);\n final float rating = Cursors.getFloat(related, ShowColumns.RATING);\n final int votes = Cursors.getInt(related, ShowColumns.VOTES);\n final String poster = ImageUri.create(ImageUri.ITEM_SHOW, ImageType.POSTER, relatedShowId);\n RemoteImageView posterView = (RemoteImageView) v.findViewById(R.id.related_poster);\n posterView.addTransformation(new CircleTransformation());\n posterView.setImage(poster);\n TextView titleView = (TextView) v.findViewById(R.id.related_title);\n titleView.setText(title);\n float convertedRating = rating / 10.0f;\n final String formattedRating = String.format(Locale.getDefault(), \"String_Node_Str\", convertedRating);\n String ratingText;\n if (votes >= 1000) {\n final float convertedVotes = votes / 1000.0f;\n final String formattedVotes = String.format(Locale.getDefault(), \"String_Node_Str\", convertedVotes);\n ratingText = getString(R.string.related_rating_thousands, formattedRating, formattedVotes);\n } else {\n ratingText = getString(R.string.related_rating, formattedRating, votes);\n }\n TextView ratingView = (TextView) v.findViewById(R.id.related_rating);\n ratingView.setText(ratingText);\n v.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n navigationListener.onDisplayShow(relatedShowId, title, overview, LibraryType.WATCHED);\n }\n });\n relatedContainer.addView(v);\n index++;\n }\n}\n"
"void writeLong(long value) {\n if (value == Long.MIN_VALUE) {\n write(STR_LONG_MIN_VALUE);\n return;\n }\n if (value < 0) {\n sb.append('-');\n value = -value;\n }\n int digitsWithoutComma = 0;\n tmpSb.setLength(0);\n do {\n digitsWithoutComma++;\n if (digitsWithoutComma == 4) {\n tmpSb.append(',');\n digitsWithoutComma = 1;\n }\n int mod = (int) (value % 10);\n tmpSb.append(DIGITS[mod]);\n value = value / 10;\n } while (value > 0);\n for (int k = tmpSb.length() - 1; k >= 0; k--) {\n char c = tmpSb.charAt(k);\n sb.append(c);\n }\n}\n"
"public String toString() {\n String result = \"String_Node_Str\" + _id;\n return result;\n}\n"
"public void testMapPutTtlWithListener() throws InterruptedException {\n Config cfg = new Config();\n TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(2);\n final HazelcastInstance[] instances = factory.newInstances(cfg);\n warmUpPartitions(instances);\n final int k = 10;\n final int putCount = 10000;\n final CountDownLatch latch = new CountDownLatch(k * putCount);\n final IMap map = instances[0].getMap(\"String_Node_Str\");\n final ExecutorService ex = Executors.newFixedThreadPool(k * 2);\n final AtomicBoolean error = new AtomicBoolean(false);\n final Set<Long> times = Collections.newSetFromMap(new ConcurrentHashMap<Long, Boolean>());\n map.addEntryListener(new EntryAdapter() {\n public void entryEvicted(final EntryEvent event) {\n ex.execute(new Runnable() {\n public void run() {\n final Long expectedEvictionTime = (Long) (event.getOldValue());\n long timeDifference = System.currentTimeMillis() - expectedEvictionTime;\n if (timeDifference > 5000) {\n error.set(true);\n times.add(timeDifference);\n }\n latch.countDown();\n }\n });\n }\n }, true);\n for (int i = 0; i < k; i++) {\n final int threadId = i;\n int ttl = (int) (Math.random() * 5000 + 3000);\n for (int j = 0; j < putCount; j++) {\n final long expectedEvictionTime = ttl + System.currentTimeMillis();\n map.put(j + putCount * threadId, expectedEvictionTime, ttl, TimeUnit.MILLISECONDS);\n }\n }\n}\n"
"public void update(int dockLevel) {\n mNotification.setLatestEventInfo(mContext, title, \"String_Node_Str\" + dockLevel + \"String_Node_Str\", null);\n mNotificationManager.notify(NOTIFICATION_DOCK, mNotification);\n}\n"
"public void subscribe() {\n consumer.addMessageListener(messageListener);\n consumer.subscribe(subscriptionListener);\n serverSession.checkWaitForLogout();\n}\n"
"public void testCase3() {\n final ExecutionTime et = ExecutionTime.forCron(parser.parse(\"String_Node_Str\"));\n final Optional<ZonedDateTime> lastExecution = et.lastExecution(currentDateTime);\n if (lastExecution.isPresent()) {\n final ZonedDateTime expected = ZonedDateTime.of(LocalDateTime.of(2015, 12, 31, 12, 00), ZoneId.systemDefault());\n Assert.assertEquals(expected, lastExecution.get());\n } else {\n fail(LAST_EXECUTION_NOT_PRESENT_ERROR);\n }\n}\n"
"public boolean parse(ParserManager pm, String value, IToken token) throws SyntaxError {\n if (this.mode == 0 || \"String_Node_Str\".equals(value) || \"String_Node_Str\".equals(value) && !this.isInMode(PARAMETERS_2)) {\n pm.popParser(true);\n return true;\n }\n if (this.isInMode(VALUE)) {\n if (this.parsePrimitive(value, token)) {\n this.mode = ACCESS;\n return true;\n } else if (\"String_Node_Str\".equals(value)) {\n this.mode = ACCESS;\n this.value = new ThisValue(token, this.context.getThisType());\n return true;\n } else if (\"String_Node_Str\".equals(value)) {\n this.mode = ACCESS;\n this.value = new SuperValue(token, this.context.getThisType());\n return true;\n } else if (\"String_Node_Str\".equals(value)) {\n this.mode = TUPLE_END;\n this.value = new TupleValue();\n if (!token.next().equals(\"String_Node_Str\")) {\n pm.pushParser(new ExpressionListParser(this.context, (IValueList) this.value));\n }\n return true;\n } else if (\"String_Node_Str\".equals(value)) {\n this.mode = VALUE_2;\n this.value = new StatementList(token);\n if (!token.next().equals(\"String_Node_Str\")) {\n pm.pushParser(new ExpressionListParser(this.context, (IValueList) this.value, true));\n }\n return true;\n } else if (\"String_Node_Str\".equals(value)) {\n ConstructorCall call = new ConstructorCall(token);\n this.mode = PARAMETERS;\n this.value = call;\n pm.pushParser(new TypeParser(this.context, call));\n return true;\n } else if (token.isType(IToken.TYPE_IDENTIFIER) && !token.next().isType(Token.TYPE_OPEN_BRACKET)) {\n this.mode = ACCESS;\n pm.pushParser(new TypeParser(this.context, this), true);\n return true;\n }\n this.mode = ACCESS;\n }\n if (this.isInMode(VALUE_2)) {\n if (\"String_Node_Str\".equals(value)) {\n this.value.expandPosition(token);\n this.mode = ACCESS;\n return true;\n }\n }\n if (this.isInMode(TUPLE_END)) {\n if (\"String_Node_Str\".equals(value)) {\n this.value.expandPosition(token);\n this.mode = ACCESS;\n return true;\n }\n }\n if (this.isInMode(STATEMENT)) {\n if (\"String_Node_Str\".equals(value)) {\n ReturnStatement statement = new ReturnStatement(token);\n this.value = statement;\n pm.pushParser(new ExpressionParser(this.context, statement));\n return true;\n } else if (\"String_Node_Str\".equals(value)) {\n IfStatement statement = new IfStatement(token);\n this.value = statement;\n pm.pushParser(new IfStatementParser(this.context, statement));\n return true;\n }\n }\n if (this.isInMode(ACCESS)) {\n if (\"String_Node_Str\".equals(value)) {\n this.mode = DOT_ACCESS;\n return true;\n }\n if (this.lazy && this.value != null) {\n pm.popParser(true);\n return true;\n }\n this.mode = DOT_ACCESS;\n }\n if (this.isInMode(DOT_ACCESS)) {\n if (token.isType(IToken.TYPE_IDENTIFIER)) {\n IToken next = token.next();\n if (next.isType(IToken.TYPE_OPEN_BRACKET)) {\n MethodCall call = new MethodCall(token, this.value, value);\n this.value = call;\n this.mode = PARAMETERS;\n return true;\n } else if (!next.isType(IToken.TYPE_IDENTIFIER) && !next.isType(IToken.TYPE_CLOSE_BRACKET) && !next.isType(IToken.TYPE_SYMBOL)) {\n MethodCall call = new MethodCall(token, this.value, value);\n call.setSugar(true);\n this.value = call;\n ExpressionParser parser = new ExpressionParser(this.context, this);\n parser.lazy = true;\n pm.pushParser(parser);\n return true;\n } else {\n FieldAccess access = new FieldAccess(token, this.value, value);\n this.value = access;\n this.mode = ACCESS;\n return true;\n }\n }\n }\n if (this.isInMode(PARAMETERS)) {\n if (\"String_Node_Str\".equals(value)) {\n pm.pushParser(new ExpressionListParser(this.context, (IValueList) this.value));\n this.mode = PARAMETERS_2;\n return true;\n }\n }\n if (this.isInMode(PARAMETERS_2)) {\n if (\"String_Node_Str\".equals(value)) {\n this.value.expandPosition(token);\n this.mode = ACCESS;\n return true;\n }\n }\n if (this.value != null) {\n this.value.expandPosition(token);\n pm.popParser(true);\n return true;\n }\n return false;\n}\n"
"public static String getBaseUnitName(int categoryIndex) {\n if (categoryIndex < 0 || categoryIndex >= _categories) {\n return \"String_Node_Str\";\n } else {\n return _baseNames[categoryIndex];\n }\n}\n"
"public void postConnect() {\n try {\n this.url = new URL(getID().toExternalForm());\n final MultiThreadedHttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager();\n httpClient = new HttpClient(connectionManager);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n}\n"
"private Set<RpslObjectReference> getReferencingObjects(final RpslObject rpslObject) {\n final Set<RpslObjectReference> referencing = Sets.newHashSet();\n for (final RpslAttribute attribute : rpslObject.findAttributes(OBJECT_REFERENCE_ATTRIBUTES)) {\n for (final CIString referenceValue : attribute.getReferenceValues()) {\n Set<ObjectType> objectTypes = attribute.getType().getReferences(referenceValue);\n if (attribute.getType() == AttributeType.SPONSORING_ORG) {\n objectTypes = Sets.newHashSet(ObjectType.ORGANISATION);\n }\n if (objectTypes.size() == 1) {\n referencing.add(new RpslObjectReference(new RpslObjectKey(ObjectTypeIds.getId(objectTypes.iterator().next()), referenceValue.toString()), new ArrayList<Integer>()));\n } else {\n switch(attribute.getType()) {\n case AUTH:\n break;\n default:\n referencing.add(new RpslObjectReference(new RpslObjectKey(DUMMY_OBJECT_TYPE_ID, referenceValue.toUpperCase()), new ArrayList<Integer>()));\n }\n }\n }\n }\n return referencing;\n}\n"
"public final byte[] dump() {\n int payloadLength = HEADER_LENGTH;\n byte[] opcodeSpecificData = getData();\n payloadLength += opcodeSpecificData.length;\n List<byte[]> optionsData = new ArrayList<>(options.size());\n for (PcpOption option : options) {\n byte[] optionData = option.dump();\n payloadLength += optionData.length;\n optionsData.add(optionData);\n }\n Validate.isTrue(payloadLength <= InternalUtils.MAX_UDP_PAYLOAD);\n byte[] data = new byte[payloadLength];\n data[0] = 2;\n data[1] = (byte) op;\n InternalUtils.shortToBytes(data, 2, (short) 0);\n InternalUtils.intToBytes(data, 4, (int) lifetime);\n byte[] selfAddressArr = NetworkUtils.convertToIpv6Array(internalIp);\n System.arraycopy(selfAddressArr, 0, data, 8, selfAddressArr.length);\n int offset = 24;\n System.arraycopy(opcodeSpecificData, 0, data, offset, opcodeSpecificData.length);\n offset += opcodeSpecificData.length;\n for (byte[] optionData : optionsData) {\n System.arraycopy(optionData, 0, data, offset, optionData.length);\n offset += optionData.length;\n }\n return data;\n}\n"
"public String toString() {\n return \"String_Node_Str\" + instructions;\n}\n"
"public void accept(Recipes recipes) throws Exception {\n if (recipes != null && recipes.getRecipes() != null) {\n if (!Thread.currentThread().isInterrupted()) {\n Timber.d(recipes.getCount().toString());\n getMvpView().reFreshRecipeList(recipes.getRecipes());\n }\n }\n}\n"
"private RelativeLayout createView() {\n RelativeLayout compound = new RelativeLayout(getActivity());\n LinearLayout listViewContainer = new LinearLayout(getActivity());\n listViewContainer.setOrientation(LinearLayout.VERTICAL);\n filterView = new FilterView(getActivity());\n filterView.setVisibility(View.GONE);\n listViewContainer.addView(filterView, Utils.MATCH_WRAP_PARAMS);\n if (viewMode == ThreadManager.ViewMode.LIST) {\n ListView list = new ListView(getActivity());\n listView = list;\n postAdapter = new PostAdapter(getActivity(), threadManager, listView, this);\n listView.setAdapter(postAdapter);\n list.setSelectionFromTop(loadable.listViewIndex, loadable.listViewTop);\n } else if (viewMode == ThreadManager.ViewMode.GRID) {\n GridView grid = new GridView(getActivity());\n grid.setNumColumns(GridView.AUTO_FIT);\n int postGridWidth = getActivity().getResources().getDimensionPixelSize(R.dimen.post_grid_width);\n grid.setColumnWidth(postGridWidth);\n listView = grid;\n postAdapter = new PostAdapter(getActivity(), threadManager, listView, this);\n listView.setAdapter(postAdapter);\n listView.setSelection(loadable.listViewIndex);\n }\n listView.setOnScrollListener(new OnScrollListener() {\n public void onScrollStateChanged(AbsListView view, int scrollState) {\n if (!isFiltering) {\n if (skipLogic != null) {\n skipLogic.onScrollStateChanged(view, scrollState);\n }\n }\n }\n public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {\n if (!isFiltering) {\n if (loadable != null) {\n int index = view.getFirstVisiblePosition();\n View v = view.getChildAt(0);\n int top = v == null ? 0 : v.getTop();\n if (index != 0 || top != 0) {\n loadable.listViewIndex = index;\n loadable.listViewTop = top;\n }\n }\n if (skipLogic != null) {\n skipLogic.onScroll(view, firstVisibleItem, visibleItemCount, totalItemCount);\n }\n }\n }\n });\n listViewContainer.addView(listView, Utils.MATCH_PARAMS);\n compound.addView(listViewContainer, Utils.MATCH_PARAMS);\n if (loadable.isThreadMode()) {\n skip = new ImageView(getActivity());\n skip.setImageResource(R.drawable.skip_arrow_down);\n skip.setVisibility(View.GONE);\n compound.addView(skip, Utils.WRAP_PARAMS);\n RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) skip.getLayoutParams();\n params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);\n params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);\n params.setMargins(0, 0, Utils.dp(8), Utils.dp(8));\n skip.setLayoutParams(params);\n skipLogic = new SkipLogic(skip, listView);\n }\n return compound;\n}\n"
"public void testReadIndex_LsFiles() throws Exception {\n final Map<String, CGitIndexRecord> ls = readLsFiles();\n final DirCache dc = new DirCache(index, FS.DETECTED);\n assertEquals(0, dc.getEntryCount());\n dc.read();\n assertEquals(ls.size(), dc.getEntryCount());\n {\n final Iterator<CGitIndexRecord> rItr = ls.values().iterator();\n for (int i = 0; rItr.hasNext(); i++) assertEqual(rItr.next(), dc.getEntry(i));\n }\n}\n"
"protected void notifyBlocksOfNeighborChange(EnumFacing side) {\n container.getWorld().notifyNeighborsOfStateChange(container.getPos().offset(side), BuildCraftTransport.genericPipeBlock);\n}\n"
"public void maybeLaunchModule(String moduleName, boolean forceLaunch) throws UnableToCompleteException {\n if (forceLaunch) {\n BrowserWidget browserWindow = getBrowserWindow();\n shell.compileForWebMode(moduleName, browserWindow.getUserAgent());\n launchUrl(getUrlSuffix(moduleName) + \"String_Node_Str\" + PROP_GWT_HYBRID_MODE);\n }\n}\n"
"public int getIndex(String uri, String localName) {\n for (int i = 0, size = attrs.size(); i < size; i++) {\n Attr item = attrs.get(i);\n try {\n if (item.getNamespaceURI().equals(uri) && item.getLocalName().equals(localName)) {\n return i;\n }\n } catch (Exception x) {\n }\n }\n return -1;\n}\n"
"public boolean apply(Game game, Ability source) {\n Permanent sourceObject = game.getPermanentOrLKIBattlefield(source.getSourceId());\n if (sourceObject != null) {\n Player controller = game.getPlayer(source.getControllerId());\n if (controller != null) {\n TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, true);\n if (target.canChoose(controller.getId(), game)) {\n controller.choose(Outcome.Sacrifice, target, source.getSourceId(), game);\n Permanent artifactSacrifice = game.getPermanent(target.getFirstTarget());\n if (artifactSacrifice != null) {\n return artifactSacrifice.sacrifice(source.getSourceId(), game);\n } else {\n permanent.tap(game);\n player.damage(4, source.getSourceId(), game, false, true);\n }\n }\n }\n return true;\n }\n return false;\n}\n"
"private byte[] runTransformers(String name, String transformedName, byte[] basicClass) {\n if (DEBUG_CLASSLOADING_FINER) {\n FMLLog.finest(\"String_Node_Str\", name, transformedName, (basicClass == null ? 0 : basicClass.length));\n for (IClassTransformer transformer : transformers) {\n String transName = transformer.getClass().getName();\n FMLLog.finest(\"String_Node_Str\", transName, (basicClass == null ? 0 : basicClass.length));\n basicClass = transformer.transform(name, transformedName, basicClass);\n FMLLog.finest(\"String_Node_Str\", transName, (basicClass == null ? 0 : basicClass.length));\n }\n FMLLog.finest(\"String_Node_Str\", name, transformedName, (basicClass == null ? 0 : basicClass.length));\n } else {\n for (IClassTransformer transformer : transformers) {\n basicClass = transformer.transform(name, transformedName, basicClass);\n }\n }\n return basicClass;\n}\n"
"public static void registerPluginAbilities(JavaPlugin plugin, String packagePrefix) {\n if (plugin == null) {\n return;\n }\n Class<?> pluginClass = plugin.getClass();\n ClassLoader loader = pluginClass.getClassLoader();\n ReflectionFactory rf = ReflectionFactory.getReflectionFactory();\n try {\n for (final ClassInfo info : ClassPath.from(loader).getAllClasses()) {\n if (!info.getPackageName().startsWith(packagePrefix)) {\n continue;\n }\n Class<?> clazz = null;\n try {\n clazz = info.load();\n if (!CoreAbility.class.isAssignableFrom(clazz) || clazz.isInterface() || Modifier.isAbstract(clazz.getModifiers())) {\n continue;\n }\n Constructor<?> objDef = CoreAbility.class.getDeclaredConstructor();\n Constructor<?> intConstr = rf.newConstructorForSerialization(clazz, objDef);\n ;\n CoreAbility ability = (CoreAbility) clazz.cast(intConstr.newInstance());\n if (ability == null || ability.getName() == null) {\n continue;\n } else if (!ability.isEnabled()) {\n plugin.getLogger().info(ability.getName() + \"String_Node_Str\");\n }\n } catch (Exception e) {\n } catch (Error e) {\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n}\n"
"public void fire() throws IllegalActionException {\n super.fire();\n for (PortParameter portParameter : attributeList(PortParameter.class)) {\n portParameter.update();\n }\n try {\n if (scriptIn.getWidth() > 0 && scriptIn.hasToken(0)) {\n String scriptValue = ((StringToken) scriptIn.get(0)).stringValue();\n _compiledScript = _context.compileString(scriptValue, getName(), 1, null);\n _compiledScript.exec(Context.getCurrentContext(), _scope);\n Object initializeFunction = _scope.get(\"String_Node_Str\", _scope);\n if (initializeFunction instanceof Function) {\n ((Function) initializeFunction).call(Context.getCurrentContext(), _scope, _global, null);\n }\n }\n Object fireFunction = _scope.get(\"String_Node_Str\", _scope);\n if (fireFunction instanceof Function) {\n for (IOPort port : _outputTokens.keySet()) {\n HashMap<Integer, Token> tokens = _outputTokens.get(port);\n for (Map.Entry<Integer, Token> entry : tokens.entrySet()) {\n port.send(entry.getKey(), entry.getValue());\n }\n }\n _outputTokens.clear();\n _inputTokens.clear();\n for (IOPort input : this.inputPortList()) {\n HashMap<Integer, Token> tokens = new HashMap<Integer, Token>();\n for (int i = 0; i < input.getWidth(); i++) {\n tokens.put(i, input.get(i));\n }\n _inputTokens.put(input, tokens);\n }\n _inFire = true;\n ((Function) fireFunction).call(Context.getCurrentContext(), _scope, _global, null);\n _inFire = false;\n }\n } catch (WrappedException ex) {\n Throwable original = ex.getWrappedException();\n throw new IllegalActionException(this, ex, \"String_Node_Str\" + ex.lineNumber() + \"String_Node_Str\" + original.getMessage());\n }\n}\n"
"private void createChildrenNode(Tree tree, TreeItemContainer parentItem, TreeColumn[] treeColumns, IIndicatorNode[] branchNodes) {\n boolean expanded = false;\n for (int i = 0; i < branchNodes.length; i++) {\n IIndicatorNode indicatorNode = branchNodes[i];\n if (!indicatorNode.getLabel().equals(\"String_Node_Str\")) {\n final TreeItemContainer treeItem;\n if (parentItem == null) {\n treeItem = new TreeItemContainer(tree, SWT.NONE, treeColumns.length);\n tree.setFocus();\n } else {\n treeItem = new TreeItemContainer(parentItem, SWT.NONE, treeColumns.length);\n }\n TreeEditor editor;\n Button checkButton;\n Button rowCheckButton = null;\n Button commonCheckButton;\n List<Button> rowButtonList = new ArrayList<Button>();\n for (int j = 0; j < treeColumns.length; j++) {\n IndicatorEnum indicatorEnum = indicatorNode.getIndicatorEnum();\n if (j == 0) {\n treeItem.setText(0, indicatorNode.getLabel());\n if (indicatorEnum != null) {\n treeItem.setData(INDICATORITEM, indicatorNode);\n }\n continue;\n } else if (j == 1 && treeColumns.length > 2) {\n editor = new TreeEditor(tree);\n rowCheckButton = new Button(tree, SWT.CHECK);\n rowCheckButton.addSelectionListener(new RowSelectButtonListener(j, treeItem, indicatorEnum, null));\n checkButtons.add(rowCheckButton);\n Color systemColor = tree.getDisplay().getSystemColor(SWT.COLOR_YELLOW);\n treeItem.setBackground(j, systemColor);\n rowCheckButton.setBackground(systemColor);\n commonCheckButton = rowCheckButton;\n } else {\n editor = new TreeEditor(tree);\n checkButton = new Button(tree, SWT.CHECK);\n checkButton.setData(indicatorNode);\n ModelElementIndicator pageIndicator = null;\n if (isUsePaging()) {\n int currentModelElement = this.pageSize * (this.currentPage - 1) + j - 2;\n pageIndicator = getResult()[currentModelElement];\n } else {\n pageIndicator = (ModelElementIndicator) treeColumns[j].getData();\n }\n boolean isMatch = isMatchCurrentIndicator(pageIndicator, indicatorNode);\n if (null != pageIndicator && pageIndicator.tempContains(indicatorEnum)) {\n if (isMatch) {\n checkButton.setSelection(true);\n expanded = true;\n }\n }\n checkButton.setEnabled(isMatch);\n checkButton.addSelectionListener(new ButtonSelectionListener(j, treeItem, indicatorEnum, pageIndicator));\n if (indicatorEnum != null) {\n checkButton.setToolTipText(DefaultMessagesImpl.getString(\"String_Node_Str\", indicatorEnum.getLabel(), pageIndicator.getElementName()));\n }\n checkButton.setData(MODELELEMENTINDICATORFLAG, pageIndicator);\n commonCheckButton = checkButton;\n rowButtonList.add(checkButton);\n checkButtons.add(checkButton);\n }\n commonCheckButton.pack();\n editor.minimumWidth = commonCheckButton.getSize().x;\n editor.horizontalAlignment = SWT.CENTER;\n editor.setEditor(commonCheckButton, treeItem, j);\n treeItem.setButton(j, commonCheckButton);\n }\n if (rowCheckButton != null) {\n boolean allChecked = true;\n rowCheckButton.setData(ROWINDICATORFLAG, rowButtonList);\n for (Button btn : rowButtonList) {\n if (!btn.getSelection()) {\n allChecked = false;\n }\n }\n rowCheckButton.setSelection(allChecked);\n }\n if (indicatorNode.hasChildren()) {\n createChildrenNode(tree, treeItem, treeColumns, indicatorNode.getChildren());\n }\n if (expanded) {\n TreeItem item = treeItem.getParentItem();\n while (null != item) {\n item.setExpanded(true);\n item = item.getParentItem();\n }\n }\n }\n }\n}\n"
"private static DataAdapter<?>[] getDataAdaptersInternal(final Class<?> implementingClass, final Configuration configuration) {\n final Map<String, String> input = configuration.getValByRegex(enumToConfKey(implementingClass, GeoWaveMetaStore.DATA_ADAPTER) + \"String_Node_Str\");\n if (input != null) {\n final List<DataAdapter<?>> adapters = new ArrayList<DataAdapter<?>>(input.size());\n for (final String dataAdapterStr : input.values()) {\n final byte[] dataAdapterBytes = ByteArrayUtils.byteArrayFromString(dataAdapterStr);\n adapters.add(PersistenceUtils.fromBinary(dataAdapterBytes, DataAdapter.class));\n }\n return adapters.toArray(new DataAdapter[adapters.size()]);\n }\n return new DataAdapter[] {};\n}\n"
"public Object execute(ExecutionEvent event) throws ExecutionException {\n FileLoadDataDialog loadDataFileDialog = new FileLoadDataDialog(new Shell());\n loadDataFileDialog.open();\n return null;\n}\n"
"public static int getCachedMessagesSize() {\n return CACHE().getCachedMessagesCount();\n}\n"
"public void subtract(double amount) {\n double balance = this.getBalance();\n double ending = balance - amount;\n math(amount, balance, ending);\n}\n"
"public void setModifiable(boolean flag) {\n masterEffigy()._modifiable = flag;\n}\n"
"public static void resetPropertyBinding(DataSetHandle dsHandle, Map dataSetMap, Map dataSourceMap) throws SemanticException {\n if (dsHandle.getExtends() != null) {\n return;\n }\n if (dsHandle instanceof JointDataSetHandle) {\n Iterator iter = ((JointDataSetHandle) dsHandle).dataSetsIterator();\n while (iter.hasNext()) {\n DataSetHandle ds = (DataSetHandle) iter.next();\n if (dsHandle != null) {\n resetPropertyBinding(ds, dataSetMap, dataSourceMap);\n }\n }\n } else {\n if (dsHandle instanceof OdaDataSetHandle) {\n if (dataSetMap.get(dsHandle.getName()) != null) {\n List pList = (List) dataSetMap.get(dsHandle.getName());\n for (int i = 0; i < pList.size(); i++) {\n PropertyBinding binding = (PropertyBinding) pList.get(i);\n dsHandle.clearProperty(binding.getName());\n }\n }\n if (dataSourceMap.get(dsHandle.getDataSource().getName()) != null) {\n List pList = (List) dataSourceMap.get(dsHandle.getDataSource().getName());\n for (int i = 0; i < pList.size(); i++) {\n PropertyBinding binding = (PropertyBinding) pList.get(i);\n dsHandle.getDataSource().setPropertyBinding(binding.getName(), binding.getValue());\n }\n }\n }\n }\n}\n"
"private int getExpressionBuilderStyle(int builderCommand) {\n if (builderCommand == COMMAND_EXPRESSION_DATA_BINDINGS) {\n return ChartExpressionProvider.CATEGORY_WITH_BIRT_VARIABLES | ChartExpressionProvider.CATEGORY_WITH_COLUMN_BINDINGS | ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS;\n } else if (builderCommand == COMMAND_EXPRESSION_CHART_DATAPOINTS) {\n return ChartExpressionProvider.CATEGORY_WITH_CHART_VARIABLES;\n } else if (builderCommand == COMMAND_EXPRESSION_TRIGGERS_DATAPOINTS) {\n return ChartExpressionProvider.CATEGORY_WITH_CHART_VARIABLES | ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS | ChartExpressionProvider.CATEGORY_WITH_JAVASCRIPT;\n } else if (builderCommand == COMMAND_EXPRESSION_TRIGGERS_SIMPLE) {\n return ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS;\n } else if (builderCommand == COMMAND_HYPERLINK) {\n return ChartExpressionProvider.CATEGORY_WITH_BIRT_VARIABLES | ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS;\n } else if (builderCommand == COMMAND_HYPERLINK_DATAPOINTS) {\n return ChartExpressionProvider.CATEGORY_WITH_BIRT_VARIABLES | ChartExpressionProvider.CATEGORY_WITH_COLUMN_BINDINGS | ChartExpressionProvider.CATEGORY_WITH_REPORT_PARAMS;\n }\n return ChartExpressionProvider.CATEGORY_BASE;\n}\n"
"public synchronized void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, final IProgressMonitor monitor) throws CoreException {\n RhogenDebugTarget target = null;\n setProcessFinished(false);\n rhodesLogHelper.stopLog();\n ConsoleHelper.cleanBuildConsole();\n setupConfigAttributes(configuration);\n if (m_projectName == null || m_projectName.length() == 0 || m_platformName == null || m_platformName.length() == 0) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(m_projectName);\n if (!project.isOpen()) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (mode.equals(ILaunchManager.DEBUG_MODE)) {\n ShowPerspectiveJob job = new ShowPerspectiveJob(\"String_Node_Str\", DebugConstants.debugPerspectiveId);\n job.run(monitor);\n RunExeHelper.killRhoSimulator();\n target = new RhogenDebugTarget(launch, null);\n }\n try {\n cleanSelectedPlatform(project, m_isClean);\n startBuildThread(project, mode, launch);\n while (true) {\n try {\n if (monitor.isCanceled()) {\n OSHelper.killProcess(\"String_Node_Str\");\n return;\n }\n if (getProcessFinished()) {\n break;\n }\n Thread.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n } catch (IllegalArgumentException e) {\n ConsoleHelper.consolePrint(e.getMessage());\n } catch (Exception e) {\n e.printStackTrace();\n }\n monitor.done();\n if (mode.equals(ILaunchManager.DEBUG_MODE)) {\n target.setProcess(m_debugProcess);\n launch.addDebugTarget(target);\n }\n}\n"
"public BigDecimal getDecimal() {\n try {\n if (data instanceof BigDecimal) {\n return (BigDecimal) data;\n } else if (getFieldType().equals(FieldType.BOOLEAN)) {\n return ((Boolean) data).booleanValue() ? BigDecimal.ONE : BigDecimal.ZERO;\n } else if (getFieldType().equals(FieldType.STRING)) {\n return new BigDecimal(data.toString());\n } else if (getFieldType().equals(FieldType.INTEGER) || getFieldType().equals(FieldType.REAL)) {\n return new BigDecimal(((Number) data).doubleValue());\n } else if (getFieldType().equals(FieldType.DATE)) {\n return new BigDecimal(((Date) data).getTime());\n }\n } catch (NumberFormatException e) {\n }\n return BigDecimal.ZERO;\n}\n"
"public void testLoadingNewTypeWhenNotDefined() throws IOException {\n TableDescriptor tableDescriptor = new TableDescriptor();\n tableDescriptor.setName(name);\n tableDescriptor.setTableUri(file.toURI().toString());\n TableContext context = TableContext.create(tableDescriptor);\n FieldManager fieldManager = context.getFieldManager();\n try {\n boolean result = fieldManager.addColumnDefinition(\"String_Node_Str\", \"String_Node_Str\", null, false, \"String_Node_Str\", false, null);\n fail(\"String_Node_Str\" + result + \"String_Node_Str\");\n } catch (IllegalArgumentException e) {\n }\n}\n"
"private String parsePackageHeaderInfo(Node headerInfoNode) {\n if (!MODULE_PACKAGEHEADER.equalsIgnoreCase(headerInfoNode.getNodeName()))\n throw new IllegalArgumentException(\"String_Node_Str\" + MODULE_PACKAGEHEADER);\n return ExportXmlUtils.parseCdataSection(headerNodeChildren.item(0));\n}\n"
"public CompiledCondition cloneCompiledCondition(String key) {\n Map<TimePeriod.Duration, CompiledCondition> copyOfWithinTableCompiledConditions = new HashMap<>();\n for (Map.Entry<TimePeriod.Duration, CompiledCondition> entry : withinTableCompiledConditions.entrySet()) {\n copyOfWithinTableCompiledConditions.put(entry.getKey(), entry.getValue().cloneCompiledCondition(key));\n }\n return new IncrementalAggregateCompileCondition(copyOfWithinTableCompiledConditions, inMemoryStoreCompileCondition.cloneCompiledCondition(key), onCompiledCondition.cloneCompiledCondition(key), tableMetaStreamEvent, aggregateMetaStreamEvent);\n}\n"
"public void checkExDoesNotRefRetiredException(ExceptionRef exRef) {\n EObject owner = objLookup.getStatefulOwner(exRef);\n ILifecycleStateResolver stateRes = new StateAttributeLifecycleStateResolver(owner.eResource().getResourceSet());\n LifecycleState ownerState = stateRes.getLifecycleState(owner);\n if (owner != null && stateRes.definesState(owner) && ownerState.isIsEnd() && exRef.getException().getState() != null && exRef.getException().getState().isIsEnd())\n error(\"String_Node_Str\" + ownerState.getName() + \"String_Node_Str\", ServiceDslPackage.Literals.EXCEPTION_REF__EXCEPTION);\n}\n"
"public void sequencesTest() {\n List<Sequence> sequences = new DataBaseServices().localSequences(dataBase);\n assertEquals(8, sequences.size());\n}\n"
"public View newView(Context context, Cursor cursor, ViewGroup parent) {\n return mFactory.inflate(android.R.layout.simple_list_item_multiple_choice, parent, false);\n}\n"
"protected Control createDialogArea(Composite parent) {\n parent.getShell().setText(this.title);\n Composite composite = (Composite) super.createDialogArea(parent);\n GridLayout layout = (GridLayout) composite.getLayout();\n layout.numColumns = 2;\n Label endpointsLabel = new Label(composite, SWT.NONE);\n endpointsLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n endpointsLabel.setText(\"String_Node_Str\");\n endpointsCombo = new ComboViewer(composite, SWT.NONE);\n endpointsCombo.setContentProvider(new ListContentProvider());\n endpointsCombo.setLabelProvider(new MDMServerLabelProvider());\n endpointsCombo.getCombo().setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n ((GridData) endpointsCombo.getCombo().getLayoutData()).widthHint = 400;\n MDMServerDef[] serverDefs = getInitMDMServers();\n endpointsCombo.setInput(serverDefs);\n Label descriptionLabel = new Label(composite, SWT.NONE);\n descriptionLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n descriptionLabel.setText(\"String_Node_Str\");\n descriptionLabel.setForeground(descriptionLabel.getDisplay().getSystemColor(SWT.COLOR_RED));\n descriptionLabel.setToolTipText(\"String_Node_Str\");\n descriptionText = new Text(composite, SWT.BORDER);\n descriptionText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n authenticationGroup = new Group(composite, SWT.NONE);\n authenticationGroup.setVisible(true);\n authenticationGroup.setText(\"String_Node_Str\");\n authenticationGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));\n authenticationGroup.setLayout(new GridLayout(2, false));\n Label usernameLabel = new Label(authenticationGroup, SWT.NONE);\n usernameLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n usernameLabel.setText(\"String_Node_Str\");\n userText = new Text(authenticationGroup, SWT.BORDER);\n userText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n userText.setDoubleClickEnabled(false);\n Label passwordLabel = new Label(authenticationGroup, SWT.NONE);\n passwordLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n passwordLabel.setText(\"String_Node_Str\");\n passwordText = new Text(authenticationGroup, SWT.PASSWORD | SWT.BORDER);\n passwordText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n if (Util.IsEnterPrise()) {\n Label universeLabel = new Label(composite, SWT.NONE);\n universeLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n universeLabel.setText(\"String_Node_Str\");\n universeCombo = new Combo(composite, SWT.NONE);\n universeCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n ((GridData) universeCombo.getLayoutData()).widthHint = 300;\n if (universes != null) {\n java.util.List<String> hostList = new ArrayList<String>();\n for (int i = 0; i < universes.size(); i++) {\n String host = universes.get(i).getPk();\n if (!hostList.contains(host)) {\n universeCombo.add(host);\n hostList.add(host);\n }\n }\n }\n }\n savePasswordButton = new Button(composite, SWT.CHECK);\n savePasswordButton.setText(\"String_Node_Str\");\n savePasswordButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));\n descCombo.addSelectionChangedListener(new ISelectionChangedListener() {\n\n public void selectionChanged(SelectionChangedEvent arg0) {\n onSelectMDMServer();\n }\n });\n endpointsCombo.setSelection(new StructuredSelection(serverDefs[0]));\n return composite;\n}\n"
"private String _getContent(File file) throws IOException {\n StringBuilder contents = new StringBuilder();\n BufferedReader input = new BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(file), java.nio.charset.Charset.defaultCharset()));\n try {\n String line = null;\n while ((line = input.readLine()) != null) {\n contents.append(line);\n contents.append(System.getProperty(\"String_Node_Str\"));\n }\n } finally {\n input.close();\n }\n return contents.toString();\n}\n"
"private void parseCentralDirectory() throws IOException, ZipException {\n positionAtCentralDirectory();\n byte[] cfh = new byte[CFH_LEN];\n byte[] signatureBytes = new byte[4];\n rais.readFully(signatureBytes);\n long sig = ZipLong.getValue(signatureBytes);\n final long cfhSig = ZipLong.getValue(CFH_SIG);\n boolean defaultEncodingSet = defaultEncoding != null;\n ByteArrayOutputStream encodingAccumulator = defaultEncodingSet ? null : new ByteArrayOutputStream();\n while (sig == cfhSig) {\n ZipEntryInfo entryInfo = new ZipEntryInfo();\n entryInfo.centralHeaderOffset = rais.getOffset() - 4;\n rais.readFully(cfh);\n ZipEntry ze = new ZipEntry();\n int versionMadeBy = ZipShort.getValue(cfh, 0);\n ze.setPlatform((versionMadeBy >> 8) & 0x0F);\n int gp = ZipShort.getValue(cfh, 4);\n boolean isUTF8 = (gp & 0x800) != 0;\n if (isUTF8) {\n entryInfo.encoding = UTF_8;\n if (Debug.ON)\n Debug.trace(\"String_Node_Str\");\n } else if (defaultEncodingSet) {\n entryInfo.encoding = defaultEncoding;\n if (Debug.ON)\n Debug.trace(\"String_Node_Str\" + defaultEncoding);\n } else {\n }\n entryInfo.hasDataDescriptor = (gp & 8) != 0;\n int method = ZipShort.getValue(cfh, 6);\n if (method != DEFLATED && method != STORED)\n throw new ZipException(\"String_Node_Str\");\n ze.setMethod(method);\n ze.setDosTime(ZipLong.getValue(cfh, 8));\n ze.setCrc(ZipLong.getValue(cfh, 12));\n ze.setCompressedSize(ZipLong.getValue(cfh, 16));\n ze.setSize(ZipLong.getValue(cfh, 20));\n int fileNameLen = ZipShort.getValue(cfh, 24);\n int extraLen = ZipShort.getValue(cfh, 26);\n int commentLen = ZipShort.getValue(cfh, 28);\n ze.setInternalAttributes(ZipShort.getValue(cfh, 32));\n ze.setExternalAttributes(ZipLong.getValue(cfh, 34));\n byte[] filename = new byte[fileNameLen];\n rais.readFully(filename);\n if (entryInfo.encoding != null) {\n setFilename(ze, getString(filename, entryInfo.encoding));\n } else {\n entryInfo.filename = filename;\n feedEncodingAccumulator(encodingAccumulator, filename);\n }\n entryInfo.headerOffset = ZipLong.getValue(cfh, 38);\n byte[] extra = new byte[extraLen];\n rais.readFully(extra);\n ze.setExtra(extra);\n byte[] comment = new byte[commentLen];\n rais.readFully(comment);\n if (entryInfo.encoding != null) {\n ze.setComment(getString(comment, entryInfo.encoding));\n } else {\n entryInfo.comment = comment;\n feedEncodingAccumulator(encodingAccumulator, comment);\n }\n entryInfo.centralHeaderLen = 46 + fileNameLen + extraLen + commentLen;\n ze.setEntryInfo(entryInfo);\n entries.add(ze);\n nameMap.put(ze.getName(), ze);\n rais.readFully(signatureBytes);\n sig = ZipLong.getValue(signatureBytes);\n }\n if (encodingAccumulator != null && encodingAccumulator.size() > 0) {\n int nbEntries = entries.size();\n String guessedEncoding = EncodingDetector.detectEncoding(encodingAccumulator.toByteArray());\n if (Debug.ON)\n Debug.trace(\"String_Node_Str\" + guessedEncoding);\n ZipEntry entry;\n ZipEntryInfo entryInfo;\n for (int i = 0; i < nbEntries; i++) {\n entry = (ZipEntry) entries.elementAt(i);\n entryInfo = entry.getEntryInfo();\n if (entryInfo.encoding != null)\n continue;\n entryInfo.encoding = guessedEncoding;\n entry.setName(getString(entryInfo.filename, guessedEncoding));\n entryInfo.filename = null;\n entry.setComment(getString(entryInfo.comment, guessedEncoding));\n entryInfo.comment = null;\n }\n }\n}\n"
"public static ReturnCode deleteRepOutputFolder(IFile reportFile) {\n ReturnCode rc = new ReturnCode(Boolean.TRUE);\n IFolder currentRportFolder = ReportUtils.getOutputFolder(reportFile);\n if (currentRportFolder != null && currentRportFolder.exists()) {\n try {\n currentRportFolder.delete(true, new NullProgressMonitor());\n } catch (CoreException e) {\n log.error(e, e);\n rc.setOk(Boolean.FALSE);\n rc.setMessage(e.getMessage());\n }\n };\n repositoryWorkUnit.setAvoidUnloadResources(true);\n ProxyRepositoryFactory.getInstance().executeRepositoryWorkUnit(repositoryWorkUnit);\n repositoryWorkUnit.throwPersistenceExceptionIfAny();\n return rc;\n}\n"
"private void loadStatsFromSource(final View view) {\n final UnbounceStatsCollection stats = UnbounceStatsCollection.getInstance();\n final Context c = getActivity();\n String duration = stats.getDurationAllowedFormatted(c, UnbounceStatsCollection.STAT_CURRENT);\n TextView textView = (TextView) view.findViewById(R.id.textLocalWakeTimeAllowed);\n textView.setText(duration);\n textView = (TextView) view.findViewById(R.id.textRunningSince);\n textView.setText(stats.getRunningSinceFormatted());\n textView = (TextView) view.findViewById(R.id.textLocalWakeAcquired);\n textView.setText(String.valueOf(stats.getTotalAllowedWakelockCount(c, UnbounceStatsCollection.STAT_CURRENT)));\n textView = (TextView) view.findViewById(R.id.textLocalWakeBlocked);\n textView.setText(String.valueOf(stats.getTotalBlockWakelockCount(c, UnbounceStatsCollection.STAT_CURRENT)));\n textView = (TextView) view.findViewById(R.id.textLocalWakeTimeBlocked);\n textView.setText(stats.getDurationBlockedFormatted(c, UnbounceStatsCollection.STAT_CURRENT));\n textView = (TextView) view.findViewById(R.id.textLocalAlarmsAcquired);\n textView.setText(String.valueOf(stats.getTotalAllowedAlarmCount(c, UnbounceStatsCollection.STAT_CURRENT)));\n textView = (TextView) view.findViewById(R.id.textLocalAlarmsBlocked);\n textView.setText(String.valueOf(stats.getTotalBlockAlarmCount(c, UnbounceStatsCollection.STAT_CURRENT)));\n stats.getStatsFromNetwork(c, new Handler() {\n public void handleMessage(Message msg) {\n TextView textView = (TextView) view.findViewById(R.id.textGlobalWakelockDurationAllowed);\n textView.setText(stats.getDurationAllowedFormatted(c, UnbounceStatsCollection.STAT_GLOBAL));\n textView = (TextView) view.findViewById(R.id.textGlobalWakelockAllowed);\n textView.setText(String.valueOf(stats.getTotalAllowedWakelockCount(c, UnbounceStatsCollection.STAT_GLOBAL)));\n textView = (TextView) view.findViewById(R.id.textGlobalWakelockBlocked);\n textView.setText(String.valueOf(stats.getTotalBlockWakelockCount(c, UnbounceStatsCollection.STAT_GLOBAL)));\n textView = (TextView) view.findViewById(R.id.textGlobalWakelockDurationBlocked);\n textView.setText(stats.getDurationBlockedFormatted(c, UnbounceStatsCollection.STAT_GLOBAL));\n textView = (TextView) view.findViewById(R.id.textGlobalAlarmAllowed);\n textView.setText(String.valueOf(stats.getTotalAllowedAlarmCount(c, UnbounceStatsCollection.STAT_GLOBAL)));\n textView = (TextView) view.findViewById(R.id.textGlobalAlarmBlocked);\n textView.setText(String.valueOf(stats.getTotalBlockAlarmCount(c, UnbounceStatsCollection.STAT_GLOBAL)));\n }\n });\n } else {\n textView = (TextView) view.findViewById(R.id.textGlobalWakelockDurationAllowed);\n textView.setText(getResources().getString(R.string.stat_disabled));\n textView = (TextView) view.findViewById(R.id.textGlobalWakelockAllowed);\n textView.setText(getResources().getString(R.string.stat_disabled));\n textView = (TextView) view.findViewById(R.id.textGlobalWakelockBlocked);\n textView.setText(getResources().getString(R.string.stat_disabled));\n textView = (TextView) view.findViewById(R.id.textGlobalWakelockDurationBlocked);\n textView.setText(getResources().getString(R.string.stat_disabled));\n textView = (TextView) view.findViewById(R.id.textGlobalAlarmAllowed);\n textView.setText(getResources().getString(R.string.stat_disabled));\n textView = (TextView) view.findViewById(R.id.textGlobalAlarmBlocked);\n textView.setText(getResources().getString(R.string.stat_disabled));\n }\n}\n"
"public String getText(SourceContact actionSource) {\n if (!name.equals(\"String_Node_Str\"))\n return text;\n String openAutomaticallyValue = MUCService.getChatRoomAutoOpenOption(((ChatRoomSourceContact) actionSource).getProvider(), ((ChatRoomSourceContact) actionSource).getChatRoomID());\n if (openAutomaticallyValue == null)\n openAutomaticallyValue = MUCService.OPEN_ON_IMPORTANT_MESSAGE;\n String openAutomaticallyKey = MUCService.autoOpenConfigValuesTexts.get(openAutomaticallyValue);\n return text + \"String_Node_Str\" + resources.getI18NString(openAutomaticallyKey) + \"String_Node_Str\";\n}\n"
"public String getExtractOption() {\n if (chkButton != null && !chkButton.isDisposed()) {\n return String.valueOf(chkButton.getSelection());\n } else {\n return null;\n }\n}\n"
"public void complexType(XSComplexType ct) {\n CClassInfo ctBean = selector.bindToType(ct, false);\n if (getCurrentBean() != ctBean)\n getCurrentBean().setBaseClass(ctBean);\n}\n"
"private static void writeAnnotationAttributes(Collection<AnnotationAttribute> annotationAttributes, XMLStreamWriter xmlStreamWriter) throws XMLStreamException {\n if (annotationAttributes != null) {\n for (AnnotationAttribute annotationAttribute : annotationAttributes) {\n xmlStreamWriter.writeAttribute(annotationAttribute.getPrefix(), annotationAttribute.getNamespace(), annotationAttribute.getName(), annotationAttribute.getText());\n if (!setNamespaces.contains(annotationAttribute.getNamespace())) {\n xmlStreamWriter.writeNamespace(annotationAttribute.getPrefix(), annotationAttribute.getNamespace());\n setNamespaces.add(annotationAttribute.getNamespace());\n }\n }\n }\n}\n"
"private Expression createUserProperty(DesignElementHandle handle, UserPropertyDefn userDef) {\n String propName = userDef.getName();\n String valueExpr = handle.getStringProperty(propName);\n switch(userDef.getTypeCode()) {\n case IPropertyType.SCRIPT_TYPE:\n case IPropertyType.EXPRESSION_TYPE:\n ExpressionHandle property = handle.getExpressionProperty(propName);\n if (property == null) {\n return null;\n }\n Object expression = property.getValue();\n if (expression == null) {\n expression = userDef.getDefault();\n }\n if (expression instanceof org.eclipse.birt.report.model.api.Expression) {\n return createExpression((org.eclipse.birt.report.model.api.Expression) expression);\n }\n return null;\n case IPropertyType.NUMBER_TYPE:\n case IPropertyType.INTEGER_TYPE:\n case IPropertyType.FLOAT_TYPE:\n return createConstant(DataType.DOUBLE_TYPE, valueExpr);\n case IPropertyType.BOOLEAN_TYPE:\n return createConstant(DataType.BOOLEAN_TYPE, valueExpr);\n case IPropertyType.DATE_TIME_TYPE:\n return createConstant(DataType.DATE_TYPE, valueExpr);\n default:\n return createConstant(DataType.STRING_TYPE, valueExpr);\n }\n}\n"
"public GreenMailUser setUser(String email, String login, String password) {\n GreenMailUser user = managers.getUserManager().getUser(login);\n if (null == user) {\n try {\n user = managers.getUserManager().createUser(email, login, password);\n } catch (UserException e) {\n throw new RuntimeException(e);\n }\n } else {\n user.setPassword(password);\n }\n return user;\n}\n"
"public void startUnmappedElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {\n if (xmlReader.getMediaType().isApplicationXML() && null == selfRecords && !isSelfRecord) {\n ErrorHandler errorHandler = xmlReader.getErrorHandler();\n if (null != errorHandler && unmarshaller.shouldWarnOnUnmappedElement()) {\n StringBuilder messageBuilder = new StringBuilder(\"String_Node_Str\");\n if (null != namespaceURI) {\n messageBuilder.append(namespaceURI);\n }\n messageBuilder.append(\"String_Node_Str\");\n messageBuilder.append(localName);\n messageBuilder.append(\"String_Node_Str\");\n List<XPathNode> nonAttributeChildren = xPathNode.getNonAttributeChildren();\n if (nonAttributeChildren == null || nonAttributeChildren.size() == 0) {\n messageBuilder.append(\"String_Node_Str\");\n } else {\n for (int x = 0, size = nonAttributeChildren.size(); x < size; x++) {\n XPathFragment nonAttributeChildXPathFragment = nonAttributeChildren.get(x).getXPathFragment();\n messageBuilder.append(\"String_Node_Str\");\n String nonAttributeChildXPathFragmentNamespaceURI = nonAttributeChildXPathFragment.getNamespaceURI();\n if (null != nonAttributeChildXPathFragmentNamespaceURI) {\n messageBuilder.append(nonAttributeChildXPathFragmentNamespaceURI);\n }\n messageBuilder.append('}');\n messageBuilder.append(nonAttributeChildXPathFragment.getLocalName());\n messageBuilder.append('>');\n if (x < size - 1) {\n messageBuilder.append(',');\n }\n }\n }\n errorHandler.warning(new SAXParseException(messageBuilder.toString(), getDocumentLocator()));\n }\n }\n if ((null != selfRecords) || (null == xmlReader) || isSelfRecord()) {\n if (-1 == unmappedLevel) {\n this.unmappedLevel = this.levelIndex;\n }\n return;\n }\n Class unmappedContentHandlerClass = unmarshaller.getUnmappedContentHandlerClass();\n UnmappedContentHandler unmappedContentHandler;\n if (null == unmappedContentHandlerClass) {\n unmappedContentHandler = DEFAULT_UNMAPPED_CONTENT_HANDLER;\n } else {\n try {\n PrivilegedNewInstanceFromClass privilegedNewInstanceFromClass = new PrivilegedNewInstanceFromClass(unmappedContentHandlerClass);\n unmappedContentHandler = (UnmappedContentHandler) privilegedNewInstanceFromClass.run();\n } catch (ClassCastException e) {\n throw XMLMarshalException.unmappedContentHandlerDoesntImplement(e, unmappedContentHandlerClass.getName());\n } catch (IllegalAccessException e) {\n throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName());\n } catch (InstantiationException e) {\n throw XMLMarshalException.errorInstantiatingUnmappedContentHandler(e, unmappedContentHandlerClass.getName());\n }\n }\n UnmappedContentHandlerWrapper unmappedContentHandlerWrapper = new UnmappedContentHandlerWrapper(this, unmappedContentHandler);\n unmappedContentHandlerWrapper.startElement(namespaceURI, localName, qName, atts);\n xmlReader.setContentHandler(unmappedContentHandlerWrapper);\n xmlReader.setLexicalHandler(unmappedContentHandlerWrapper);\n}\n"
"public Cohort getPatientsHavingNumericObs(TimeModifier timeModifier, Concept question, Concept groupingConcept, Date onOrAfter, Date onOrBefore, List<Location> locationList, List<EncounterType> encounterTypeList, Modifier modifier1, Double value1, Modifier modifier2, Double value2) {\n Integer questionConceptId = question == null ? null : question.getId();\n Integer groupingConceptId = groupingConcept == null ? null : groupingConcept.getId();\n if (groupingConceptId != null)\n throw new RuntimeException(\"String_Node_Str\");\n List<Integer> locationIds = null;\n if (locationList != null && locationList.size() > 0) {\n for (Location l : locationList) locationIds.add(l.getId());\n }\n List<Integer> encounterTypeIds = null;\n if (encounterTypeList != null && encounterTypeList.size() > 0) {\n for (EncounterType t : encounterTypeList) encounterTypeIds.add(t.getId());\n }\n String dateAndLocationSql = \"String_Node_Str\";\n String dateAndLocationSqlForSubquery = \"String_Node_Str\";\n if (onOrAfter != null) {\n dateSql += \"String_Node_Str\";\n dateSqlForSubquery += \"String_Node_Str\";\n }\n if (onOrBefore != null) {\n dateSql += \"String_Node_Str\";\n dateSqlForSubquery += \"String_Node_Str\";\n }\n boolean doSqlAggregation = timeModifier == TimeModifier.MIN || timeModifier == TimeModifier.MAX || timeModifier == TimeModifier.AVG;\n boolean doInvert = timeModifier == TimeModifier.NO;\n String valueSql = \"String_Node_Str\";\n if (doSqlAggregation) {\n valueSql = \"String_Node_Str\" + timeModifier.toString() + \"String_Node_Str\" + valueSql + \"String_Node_Str\";\n }\n List<String> valueClauses = new ArrayList<String>();\n if (value1 != null)\n valueClauses.add(valueSql + modifier1.getSqlRepresentation() + \"String_Node_Str\");\n if (value2 != null)\n valueClauses.add(valueSql + modifier2.getSqlRepresentation() + \"String_Node_Str\");\n if (locationIds != null)\n valueClauses.add(\"String_Node_Str\");\n if (encounterTypeIds != null)\n throw new RuntimeException(\"String_Node_Str\");\n StringBuilder sql = new StringBuilder();\n if (timeModifier == TimeModifier.ANY || timeModifier == TimeModifier.NO) {\n sql.append(\"String_Node_Str\");\n if (questionConceptId != null)\n sql.append(\"String_Node_Str\");\n sql.append(dateSql);\n } else if (timeModifier == TimeModifier.FIRST || timeModifier == TimeModifier.LAST) {\n boolean isFirst = timeModifier == PatientSetService.TimeModifier.FIRST;\n sql.append(\"String_Node_Str\");\n sql.append(\"String_Node_Str\");\n sql.append(\"String_Node_Str\");\n sql.append(\"String_Node_Str\" + (isFirst ? \"String_Node_Str\" : \"String_Node_Str\") + \"String_Node_Str\");\n sql.append(\"String_Node_Str\" + dateSqlForSubquery + \"String_Node_Str\");\n sql.append(\"String_Node_Str\");\n sql.append(\"String_Node_Str\");\n } else if (doSqlAggregation) {\n sql.append(\"String_Node_Str\");\n sql.append(\"String_Node_Str\" + dateSql);\n sql.append(\"String_Node_Str\");\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\" + timeModifier + \"String_Node_Str\");\n }\n if (valueClauses.size() > 0) {\n sql.append(doSqlAggregation ? \"String_Node_Str\" : \"String_Node_Str\");\n for (Iterator<String> i = valueClauses.iterator(); i.hasNext(); ) {\n sql.append(i.next());\n if (i.hasNext())\n sql.append(\"String_Node_Str\");\n }\n }\n log.debug(\"String_Node_Str\" + sql);\n System.out.println(\"String_Node_Str\" + sql);\n Query query = sessionFactory.getCurrentSession().createSQLQuery(sql.toString());\n query.setCacheMode(CacheMode.IGNORE);\n if (questionConceptId != null)\n query.setInteger(\"String_Node_Str\", questionConceptId);\n if (value1 != null)\n query.setDouble(\"String_Node_Str\", value1);\n if (value2 != null)\n query.setDouble(\"String_Node_Str\", value2);\n if (onOrAfter != null)\n query.setDate(\"String_Node_Str\", onOrAfter);\n if (onOrBefore != null)\n query.setDate(\"String_Node_Str\", onOrBefore);\n if (locationIds != null)\n query.setParameterList(\"String_Node_Str\", locationIds);\n Cohort ret;\n if (doInvert) {\n ret = Context.getPatientSetService().getAllPatients();\n ret.getMemberIds().removeAll(query.list());\n } else {\n ret = new Cohort(query.list());\n }\n return ret;\n}\n"
"public void testFaultyKms() throws Exception {\n KeyFormat format = KeyFormat.newBuilder().setTypeUrl(macTypeUrl).build();\n KeysetManager manager = new KeysetManager.Builder().setKeyFormat(format).build();\n manager.rotate();\n FaultyAead faultyAead = Registry.INSTANCE.getPrimitive(Registry.INSTANCE.newKey(KeyFormat.newBuilder().setTypeUrl(faultyAeadTypeUrl).build()));\n try {\n KeysetHandle unused = manager.getKeysetHandle(faultyAead);\n fail(\"String_Node_Str\");\n } catch (GeneralSecurityException e) {\n assertTrue(e.toString().contains(\"String_Node_Str\"));\n }\n}\n"
"public Set<ChunkLocation> keys() {\n synchronized (counters) {\n return counters.keySet();\n }\n}\n"
"public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {\n if (sourceId.equals(source.getSourceId())) {\n Card card = game.getCard(source.getSourceId());\n if (card != null && card.getOwnerId().equals(affectedControllerId) && game.getState().getZone(source.getSourceId()) == Zone.EXILED) {\n return true;\n }\n }\n return false;\n}\n"
"public <T> void setElements(Collection<T> elements) {\n try {\n this.elements = elements;\n suppressEvents = true;\n prevSelectionPos = -1;\n this.getRootChildren().removeAll();\n this.elements = elements;\n for (Binding b : expandBindings) {\n b.destroyBindings();\n }\n this.expandBindings.clear();\n for (TreeItemDropController d : this.dropHandlers) {\n XulDragController.getInstance().unregisterDropController(d);\n }\n dropHandlers.clear();\n if (elements == null || elements.size() == 0) {\n suppressEvents = false;\n updateUI();\n return;\n }\n try {\n if (table != null) {\n for (T o : elements) {\n XulTreeRow row = this.getRootChildren().addNewRow();\n int colSize = this.getColumns().getChildNodes().size();\n for (int x = 0; x < colSize; x++) {\n XulComponent col = this.getColumns().getColumn(x);\n XulTreeCol column = ((XulTreeCol) col);\n final XulTreeCell cell = (XulTreeCell) getDocument().createElement(\"String_Node_Str\");\n addBindings(column, (GwtTreeCell) cell, o);\n row.addCell(cell);\n }\n }\n } else {\n for (T o : elements) {\n XulTreeRow row = this.getRootChildren().addNewRow();\n ((XulTreeItem) row.getParent()).setBoundObject(o);\n addTreeChild(o, row);\n }\n }\n } catch (XulException e) {\n Window.alert(\"String_Node_Str\" + e);\n System.out.println(e.getMessage());\n e.printStackTrace();\n } catch (Exception e) {\n Window.alert(\"String_Node_Str\" + e);\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n suppressEvents = false;\n this.clearSelection();\n updateUI();\n } catch (Exception e) {\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n}\n"
"private void generateSummaryOutputs() throws Exception {\n log(\"String_Node_Str\");\n generateResourceReferences();\n generateDataFile();\n JsonObject data = new JsonObject();\n for (FetchedFile f : fileList) {\n for (FetchedResource r : f.getResources()) {\n if (r.getElement().fhirType().equals(\"String_Node_Str\")) {\n StructureDefinition sd = (StructureDefinition) r.getResource();\n JsonObject item = new JsonObject();\n data.add(sd.getId(), item);\n item.addProperty(\"String_Node_Str\", sd.getUrl());\n item.addProperty(\"String_Node_Str\", sd.getName());\n item.addProperty(\"String_Node_Str\", sd.getUserString(\"String_Node_Str\"));\n item.addProperty(\"String_Node_Str\", sd.getKind().toCode());\n item.addProperty(\"String_Node_Str\", sd.getType());\n item.addProperty(\"String_Node_Str\", sd.getBaseDefinition());\n StructureDefinition base = sd.hasBaseDefinition() ? context.fetchResource(StructureDefinition.class, sd.getBaseDefinition()) : null;\n if (base != null) {\n item.addProperty(\"String_Node_Str\", base.getName());\n item.addProperty(\"String_Node_Str\", base.getUserString(\"String_Node_Str\"));\n }\n item.addProperty(\"String_Node_Str\", sd.getStatus().toCode());\n item.addProperty(\"String_Node_Str\", sd.getDate().toString());\n item.addProperty(\"String_Node_Str\", sd.getPublisher());\n item.addProperty(\"String_Node_Str\", sd.getCopyright());\n item.addProperty(\"String_Node_Str\", sd.getDescription());\n if (sd.getContextType() != null)\n item.addProperty(\"String_Node_Str\", sd.getContextType().getDisplay());\n if (!sd.getContext().isEmpty()) {\n JsonArray contexts = new JsonArray();\n item.add(\"String_Node_Str\", contexts);\n for (StringType context : sd.getContext()) {\n contexts.add(new JsonPrimitive(context.asStringValue()));\n }\n }\n }\n }\n }\n for (FetchedResource r : examples) {\n FetchedResource baseRes = getResourceForUri(r.getExampleUri());\n if (baseRes == null)\n throw new Exception(\"String_Node_Str\" + r.getExampleUri() + \"String_Node_Str\" + r.getUrlTail());\n baseRes.addExample(r);\n }\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String json = gson.toJson(data);\n TextFile.stringToFile(json, Utilities.path(tempDir, \"String_Node_Str\", \"String_Node_Str\"));\n if (sourceIg.hasPage()) {\n JsonObject pages = new JsonObject();\n addPageDataRow(pages, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", breadCrumbForPage(sourceIg.getPage(), true), examples);\n addPageData(pages, sourceIg.getPage(), \"String_Node_Str\", \"String_Node_Str\", true);\n json = pages.toString();\n TextFile.stringToFile(json, Utilities.path(tempDir, \"String_Node_Str\", \"String_Node_Str\"));\n }\n}\n"
"public void testLastFieldOptionalNotAllowedOnSingleFieldDefinition() throws Exception {\n List<FieldDefinition> fields = Lists.newArrayList();\n fields.add(mockFieldDefinition3optional);\n new CronDefinition(fields, Sets.newHashSet(), enforceStrictRange, matchDayOfWeekAndDayOfMonth);\n}\n"
"private final Series findDesignTimeSeries(Series seRT) throws ChartException {\n final ChartWithAxes cwaRT = (ChartWithAxes) _iun.getRunTimeModel();\n final ChartWithAxes cwaDT = (ChartWithAxes) _iun.getDesignTimeModel();\n Series seDT = null;\n final Chart cmRT = _iun.getRunTimeModel();\n final Chart cmDT = _iun.getDesignTimeModel();\n if (cmDT instanceof ChartWithAxes) {\n final ChartWithAxes cwaRT = (ChartWithAxes) cmRT;\n final ChartWithAxes cwaDT = (ChartWithAxes) cmDT;\n Axis[] axaBase = cwaRT.getPrimaryBaseAxes();\n Axis axBase = axaBase[0];\n Axis[] axaOrthogonal = cwaRT.getOrthogonalAxes(axBase, true);\n EList elSD, elSE;\n SeriesDefinition sd;\n Series se = null;\n int i = -1, j = 0, k = 0;\n boolean bFound = false;\n elSD = axaBase[0].getSeriesDefinitions();\n for (j = 0; j < elSD.size(); j++) {\n sd = (SeriesDefinition) elSD.get(j);\n elSE = sd.getSeries();\n for (k = 0; k < elSE.size(); k++) {\n se = (Series) elSE.get(k);\n if (seRT == se) {\n bFound = true;\n break;\n }\n }\n if (bFound) {\n break;\n }\n }\n if (bFound) {\n break;\n }\n }\n if (!bFound) {\n throw new ChartException(ChartDeviceExtensionPlugin.ID, ChartException.OUT_OF_SYNC, \"String_Node_Str\", new Object[] { seRT }, ResourceBundle.getBundle(Messages.DEVICE_EXTENSION, getLocale()));\n }\n axaBase = cwaDT.getPrimaryBaseAxes();\n axBase = axaBase[0];\n axaOrthogonal = cwaDT.getOrthogonalAxes(axBase, true);\n elSD = axaOrthogonal[i].getSeriesDefinitions();\n sd = (SeriesDefinition) elSD.get(j);\n elSE = sd.getSeries();\n seDT = (Series) elSE.get(k);\n return seDT;\n}\n"
"private void removeUncheckedWhereRuleIndicator(Object[] ownedWhereRuleFiles, Object[] results, TableIndicator tableIndicator, IFolder whereRuleFolder) {\n ArrayList removeList = new ArrayList();\n for (Object file : ownedWhereRuleFiles) {\n boolean remove = true;\n for (Object result : results) {\n if (file.equals(result)) {\n remove = false;\n break;\n }\n }\n if (remove) {\n removeList.add(file);\n }\n }\n TableIndicatorUnit[] indicatorUnits = tableIndicator.getIndicatorUnits();\n for (TableIndicatorUnit unit : indicatorUnits) {\n IndicatorDefinition indicatorDefinition = unit.getIndicator().getIndicatorDefinition();\n if (indicatorDefinition instanceof WhereRule) {\n WhereRule wr = (WhereRule) indicatorDefinition;\n IFile whereRuleFile = ResourceFileMap.findCorrespondingFile(wr);\n for (Object obj : removeList) {\n IFile file = (IFile) obj;\n if (whereRuleFile.equals(file)) {\n tableIndicator.removeIndicatorUnit(unit);\n removeItemBranch(this.indicatorTreeItemMap.get(unit));\n deleteIndicatorItems(tableIndicator, unit);\n break;\n }\n }\n }\n }\n}\n"
"public void cleanDeletedObjects(int classID) {\n for (Octant o : leaves) {\n for (cleanObjectsIterator.setNode(o.getTree(classID)); cleanObjectsIterator.hasNext(); ) {\n ModelImpl obj = cleanObjectsIterator.next();\n if (!obj.isCacheMatching(cacheMarker)) {\n removeObject(classID, obj);\n obj.resetOctant();\n if (vizController.getVizConfig().isCleanDeletedModels()) {\n obj.cleanModel();\n }\n }\n }\n }\n}\n"
"public void testWorkflowCondition() throws Exception {\n String conditionalWorkflowApp = \"String_Node_Str\";\n String conditionalWorkflow = \"String_Node_Str\";\n HttpResponse response = deploy(ConditionalWorkflowApp.class, Constants.Gateway.API_VERSION_3_TOKEN, TEST_NAMESPACE2);\n Assert.assertEquals(200, response.getStatusLine().getStatusCode());\n Id.Program programId = Id.Program.from(TEST_NAMESPACE2, conditionalWorkflowApp, ProgramType.WORKFLOW, conditionalWorkflow);\n Map<String, String> runtimeArguments = Maps.newHashMap();\n File ifForkOneActionFile = new File(tmpFolder.newFolder() + \"String_Node_Str\");\n File ifForkOneActionDoneFile = new File(tmpFolder.newFolder() + \"String_Node_Str\");\n runtimeArguments.put(\"String_Node_Str\", ifForkOneActionFile.getAbsolutePath());\n runtimeArguments.put(\"String_Node_Str\", ifForkOneActionDoneFile.getAbsolutePath());\n File ifForkAnotherActionFile = new File(tmpFolder.newFolder() + \"String_Node_Str\");\n File ifForkAnotherActionDoneFile = new File(tmpFolder.newFolder() + \"String_Node_Str\");\n runtimeArguments.put(\"String_Node_Str\", ifForkAnotherActionFile.getAbsolutePath());\n runtimeArguments.put(\"String_Node_Str\", ifForkAnotherActionDoneFile.getAbsolutePath());\n File elseForkOneActionFile = new File(tmpFolder.newFolder() + \"String_Node_Str\");\n File elseForkOneActionDoneFile = new File(tmpFolder.newFolder() + \"String_Node_Str\");\n runtimeArguments.put(\"String_Node_Str\", elseForkOneActionFile.getAbsolutePath());\n runtimeArguments.put(\"String_Node_Str\", elseForkOneActionDoneFile.getAbsolutePath());\n File elseForkAnotherActionFile = new File(tmpFolder.newFolder() + \"String_Node_Str\");\n File elseForkAnotherActionDoneFile = new File(tmpFolder.newFolder() + \"String_Node_Str\");\n runtimeArguments.put(\"String_Node_Str\", elseForkAnotherActionFile.getAbsolutePath());\n runtimeArguments.put(\"String_Node_Str\", elseForkAnotherActionDoneFile.getAbsolutePath());\n File elseForkThirdActionFile = new File(tmpFolder.newFolder() + \"String_Node_Str\");\n File elseForkThirdActionDoneFile = new File(tmpFolder.newFolder() + \"String_Node_Str\");\n runtimeArguments.put(\"String_Node_Str\", elseForkThirdActionFile.getAbsolutePath());\n runtimeArguments.put(\"String_Node_Str\", elseForkThirdActionDoneFile.getAbsolutePath());\n runtimeArguments.put(\"String_Node_Str\", createConditionInput(\"String_Node_Str\", 2, 12));\n runtimeArguments.put(\"String_Node_Str\", new File(tmpFolder.newFolder(), \"String_Node_Str\").getAbsolutePath());\n setAndTestRuntimeArgs(programId, runtimeArguments);\n startProgram(programId);\n while (!(elseForkOneActionFile.exists() && elseForkAnotherActionFile.exists() && elseForkThirdActionFile.exists())) {\n TimeUnit.MILLISECONDS.sleep(50);\n }\n String runId = getRunIdOfRunningProgram(programId);\n verifyRunningProgramCount(programId, runId, 3);\n Assert.assertTrue(elseForkOneActionDoneFile.createNewFile());\n Assert.assertTrue(elseForkAnotherActionDoneFile.createNewFile());\n Assert.assertTrue(elseForkThirdActionDoneFile.createNewFile());\n verifyProgramRuns(programId, ProgramRunStatus.COMPLETED);\n List<RunRecord> workflowHistoryRuns = getProgramRuns(programId, ProgramRunStatus.COMPLETED);\n Id.Program recordVerifierProgramId = Id.Program.from(TEST_NAMESPACE2, conditionalWorkflowApp, ProgramType.MAPREDUCE, \"String_Node_Str\");\n List<RunRecord> recordVerifierRuns = getProgramRuns(recordVerifierProgramId, \"String_Node_Str\");\n Id.Program wordCountProgramId = Id.Program.from(TEST_NAMESPACE2, conditionalWorkflowApp, ProgramType.MAPREDUCE, \"String_Node_Str\");\n List<RunRecord> wordCountRuns = getProgramRuns(wordCountProgramId, \"String_Node_Str\");\n Assert.assertEquals(1, workflowHistoryRuns.size());\n Assert.assertEquals(1, recordVerifierRuns.size());\n Assert.assertEquals(0, wordCountRuns.size());\n runtimeArguments.put(\"String_Node_Str\", createConditionInput(\"String_Node_Str\", 10, 2));\n runtimeArguments.put(\"String_Node_Str\", new File(tmpFolder.newFolder(), \"String_Node_Str\").getAbsolutePath());\n runtimeArguments.put(\"String_Node_Str\", new File(tmpFolder.newFolder(), \"String_Node_Str\").getAbsolutePath());\n setAndTestRuntimeArgs(programId, runtimeArguments);\n startProgram(programId);\n while (!(ifForkOneActionFile.exists() && ifForkAnotherActionFile.exists())) {\n TimeUnit.MILLISECONDS.sleep(50);\n }\n runId = getRunIdOfRunningProgram(programId);\n verifyRunningProgramCount(programId, runId, 2);\n Assert.assertTrue(ifForkOneActionDoneFile.createNewFile());\n Assert.assertTrue(ifForkAnotherActionDoneFile.createNewFile());\n verifyProgramRuns(programId, \"String_Node_Str\", 1);\n workflowHistoryRuns = getProgramRuns(programId, \"String_Node_Str\");\n recordVerifierRuns = getProgramRuns(recordVerifierProgramId, \"String_Node_Str\");\n wordCountRuns = getProgramRuns(wordCountProgramId, \"String_Node_Str\");\n Assert.assertEquals(2, workflowHistoryRuns.size());\n Assert.assertEquals(2, recordVerifierRuns.size());\n Assert.assertEquals(1, wordCountRuns.size());\n}\n"
"public int hashCode() {\n return declaringClass.hashCode();\n}\n"
"public static void checkStoredImage(final Image.StaticDiskImage imgInfo) throws EucalyptusCloudException {\n if (imgInfo != null)\n try {\n Document inputSource = null;\n try {\n String[] imagePathParts = imgInfo.getManifestLocation().split(\"String_Node_Str\");\n inputSource = WalrusUtil.getManifestData(imgInfo.getOwner(), imagePathParts[0], imagePathParts[1]);\n } catch (EucalyptusCloudException e) {\n throw e;\n }\n XPath xpath = null;\n xpath = XPathFactory.newInstance().newXPath();\n String signature = null;\n try {\n signature = (String) xpath.evaluate(\"String_Node_Str\", inputSource, XPathConstants.STRING);\n } catch (XPathExpressionException e) {\n }\n if (imgInfo.getSignature() != null && !imgInfo.getSignature().equals(signature))\n throw new EucalyptusCloudException(\"String_Node_Str\");\n LOG.info(\"String_Node_Str\" + imgInfo.getImageLocation());\n try {\n if (imgInfo instanceof Image.StaticDiskImage) {\n WalrusUtil.triggerCaching((StaticDiskImage) imgInfo);\n }\n } catch (Exception e) {\n }\n } catch (EucalyptusCloudException e) {\n LOG.error(e);\n LOG.error(\"String_Node_Str\" + imgInfo.getImageLocation());\n throw new EucalyptusCloudException(\"String_Node_Str\" + imgInfo.getImageLocation());\n }\n}\n"
"public <T> T invokeEntryProcessor(K key, EntryProcessor<K, V, T> entryProcessor, Object... arguments) {\n checkStatusStarted();\n if (key == null) {\n throw new NullPointerException();\n }\n if (entryProcessor == null) {\n throw new NullPointerException();\n }\n long start = statisticsEnabled() ? System.nanoTime() : 0;\n T result = null;\n lockManager.lock(key);\n try {\n long now = System.currentTimeMillis();\n RICacheEventEventDispatcher<K, V> dispatcher = new RICacheEventEventDispatcher<K, V>();\n Object internalKey = keyConverter.toInternal(key);\n RICachedValue cachedValue = entries.get(internalKey);\n if (statisticsEnabled()) {\n if (cachedValue == null) {\n statistics.increaseCacheMisses(1);\n } else {\n statistics.increaseCacheHits(1);\n }\n }\n if (statisticsEnabled()) {\n statistics.addGetTimeNano(System.nanoTime() - start);\n }\n start = statisticsEnabled() ? System.nanoTime() : 0;\n EntryProcessorEntry entry = new EntryProcessorEntry(key, cachedValue, now, dispatcher);\n result = entryProcessor.process(entry, arguments);\n Duration duration;\n long expiryTime;\n switch(entry.operation) {\n case NONE:\n break;\n case CREATE:\n RIEntry<K, V> e = new RIEntry<K, V>(key, entry.value);\n writeCacheEntry(e);\n duration = expiryPolicy.getTTLForCreatedEntry(e);\n expiryTime = duration.getAdjustedTime(now);\n cachedValue = new RICachedValue(valueConverter.toInternal(entry.value), now, expiryTime);\n if (cachedValue.isExpiredAt(now)) {\n V previousValue = valueConverter.fromInternal(cachedValue.get());\n dispatcher.addEvent(CacheEntryExpiredListener.class, new RICacheEntryEvent<K, V>(this, key, previousValue));\n }\n entries.put(internalKey, cachedValue);\n dispatcher.addEvent(CacheEntryCreatedListener.class, new RICacheEntryEvent<K, V>(this, key, entry.value));\n if (statisticsEnabled()) {\n statistics.increaseCachePuts(1);\n statistics.addPutTimeNano(System.nanoTime() - start);\n }\n break;\n case UPDATE:\n e = new RIEntry<K, V>(key, entry.value);\n writeCacheEntry(e);\n duration = expiryPolicy.getTTLForModifiedEntry(e, new Duration(now, cachedValue.getExpiryTime()));\n expiryTime = duration.getAdjustedTime(now);\n V previousValue = valueConverter.fromInternal(cachedValue.get());\n cachedValue.setInternalValue(valueConverter.toInternal(entry.value), now);\n cachedValue.setExpiryTime(expiryTime);\n dispatcher.addEvent(CacheEntryUpdatedListener.class, new RICacheEntryEvent<K, V>(this, key, entry.value, previousValue));\n if (statisticsEnabled()) {\n statistics.increaseCachePuts(1);\n statistics.addPutTimeNano(System.nanoTime() - start);\n }\n break;\n case REMOVE:\n deleteCacheEntry(key);\n previousValue = valueConverter.fromInternal(cachedValue.get());\n entries.remove(internalKey);\n dispatcher.addEvent(CacheEntryRemovedListener.class, new RICacheEntryEvent<K, V>(this, key, previousValue));\n if (statisticsEnabled()) {\n statistics.increaseCacheRemovals(1);\n statistics.addRemoveTimeNano(System.nanoTime() - start);\n }\n break;\n default:\n break;\n }\n dispatcher.dispatch(cacheEntryListenerRegistrations.values());\n } finally {\n lockManager.unLock(key);\n }\n return result;\n}\n"
"public Boolean isForVirtualNetwork() {\n return forVirtualNetwork == null ? Boolean.TRUE : forVirtualNetwork;\n}\n"
"private URL getResource(String name, boolean fromJarsOnly) {\n if (logger.isLoggable(Level.FINER))\n logger.finer(\"String_Node_Str\" + name + \"String_Node_Str\");\n URL url = null;\n if (isResourceDelegate(name)) {\n if (logger.isLoggable(Level.FINER))\n logger.finer(\"String_Node_Str\" + parent);\n ClassLoader loader = parent;\n if (loader == null)\n loader = system;\n url = loader.getResource(name);\n if (url != null) {\n if (logger.isLoggable(Level.FINER))\n logger.finer(\"String_Node_Str\" + url.toString() + \"String_Node_Str\");\n return (url);\n }\n }\n url = findResource(name, fromJarsOnly);\n if (url != null) {\n ResourceEntry entry = resourceEntries.get(name);\n try {\n String repository = entry.codeBase.toString();\n if ((repository.endsWith(\"String_Node_Str\")) && !(name.endsWith(\"String_Node_Str\")) && !(name.endsWith(\"String_Node_Str\"))) {\n File resourceFile = new File(loaderDir, name);\n url = resourceFile.toURI().toURL();\n }\n } catch (Exception e) {\n }\n if (logger.isLoggable(Level.FINER))\n logger.finer(\"String_Node_Str\" + url.toString() + \"String_Node_Str\");\n return (url);\n }\n if (!delegate) {\n ClassLoader loader = parent;\n if (loader == null)\n loader = system;\n url = loader.getResource(name);\n if (url != null) {\n if (logger.isLoggable(Level.FINER))\n logger.finer(\"String_Node_Str\" + url.toString() + \"String_Node_Str\");\n return (url);\n }\n }\n if (logger.isLoggable(Level.FINER))\n logger.finer(\"String_Node_Str\");\n return (null);\n}\n"