content
stringlengths
40
137k
"public void processCommand(ICommandSender sender, String[] arguments) {\n if (arguments.length <= 0)\n throw new WrongUsageException(StringUtil.localizeAndFormat(\"String_Node_Str\", this.getCommandUsage(sender)));\n if (arguments[0].matches(\"String_Node_Str\")) {\n commandTrades(sender, arguments);\n return;\n } else if (arguments[0].matches(\"String_Node_Str\")) {\n commandVirtualize(sender, arguments);\n return;\n } else if (arguments[0].matches(\"String_Node_Str\")) {\n sendChatMessage(sender, StringUtil.localize(\"String_Node_Str\", this.getCommandName()));\n sendChatMessage(sender, StringUtil.localize(\"String_Node_Str\"));\n sendChatMessage(sender, StringUtil.localize(\"String_Node_Str\"));\n sendChatMessage(sender, StringUtil.localize(\"String_Node_Str\"));\n return;\n }\n throw new WrongUsageException(this.getCommandUsage(sender));\n}\n"
"public SnapshotVO createSnapshotImpl(Long volumeId, Long policyId, Long snapshotId) throws ResourceAllocationException {\n VolumeVO v = _volsDao.findById(volumeId);\n if (v != null && _volsDao.getHypervisorType(v.getId()).equals(HypervisorType.KVM)) {\n UserVmVO uservm = _vmDao.findById(v.getInstanceId());\n if (uservm != null) {\n UserVmVO vm = _vmDao.acquireInLockTable(uservm.getId(), 10);\n if (vm == null) {\n throw new CloudRuntimeException(\"String_Node_Str\" + volumeId + \"String_Node_Str\");\n }\n }\n }\n Long poolId = v.getPoolId();\n if (poolId == null) {\n throw new CloudRuntimeException(\"String_Node_Str\" + volumeId + \"String_Node_Str\");\n }\n VolumeVO volume = _volsDao.acquireInLockTable(volumeId, 10);\n if (volume == null) {\n volume = _volsDao.findById(volumeId);\n if (volume == null) {\n throw new CloudRuntimeException(\"String_Node_Str\" + volumeId + \"String_Node_Str\");\n } else {\n throw new CloudRuntimeException(\"String_Node_Str\" + volumeId + \"String_Node_Str\");\n }\n }\n if (_volsDao.getHypervisorType(volume.getId()).equals(HypervisorType.KVM)) {\n StoragePoolVO storagePool = _storagePoolDao.findById(volume.getPoolId());\n ClusterVO cluster = _clusterDao.findById(storagePool.getClusterId());\n List<HostVO> hosts = _hostDao.listByCluster(cluster.getId());\n if (hosts != null && !hosts.isEmpty()) {\n HostVO host = hosts.get(0);\n _hostDao.loadDetails(host);\n String hostOS = host.getDetail(\"String_Node_Str\");\n String hostOSVersion = host.getDetail(\"String_Node_Str\");\n if (!(hostOS != null && hostOS.equalsIgnoreCase(\"String_Node_Str\") && hostOSVersion != null && Integer.parseInt(hostOSVersion) >= 13)) {\n throw new CloudRuntimeException(\"String_Node_Str\" + hostOS + \"String_Node_Str\" + hostOSVersion + \"String_Node_Str\");\n }\n }\n }\n SnapshotVO snapshot = null;\n boolean backedUp = false;\n try {\n snapshot = createSnapshotOnPrimary(volume, policyId, snapshotId);\n if (snapshot != null && snapshot.getStatus() == Snapshot.Status.CreatedOnPrimary) {\n snapshotId = snapshot.getId();\n backedUp = backupSnapshotToSecondaryStorage(snapshot);\n if (!backedUp) {\n throw new CloudRuntimeException(\"String_Node_Str\" + snapshotId + \"String_Node_Str\");\n }\n }\n } catch (Exception e) {\n throw new CloudRuntimeException(\"String_Node_Str\" + e.toString());\n } finally {\n if (snapshotId != null) {\n postCreateSnapshot(volumeId, snapshotId, policyId, backedUp);\n }\n _volsDao.releaseFromLockTable(volumeId);\n }\n return snapshot;\n}\n"
"public Enumeration getAttributeNames(int scope) {\n if (scope == PortletSession.APPLICATION_SCOPE) {\n return httpSession.getAttributeNames();\n } else {\n Vector portletScopedNames = new Vector();\n for (Enumeration en = httpSession.getAttributeNames(); en.hasMoreElements(); ) {\n String name = (String) en.nextElement();\n if (isInCurrentPortletScope(name)) {\n portletScopedNames.add(PortletSessionUtil.decodeAttributeName(name));\n }\n }\n return portletAttributes.elements();\n }\n}\n"
"private List<Object[]> initDataSet(Indicator indicator, EMap<Indicator, AnalyzedDataSet> indicToRowMap, Object object) {\n AnalyzedDataSet analyzedDataSet = indicToRowMap.get(indicator);\n List<Object[]> valueObjectList = null;\n if (analyzedDataSet == null) {\n analyzedDataSet = AnalysisFactory.eINSTANCE.createAnalyzedDataSet();\n indicToRowMap.put(indicator, analyzedDataSet);\n analyzedDataSet.setDataCount(analysis.getParameters().getMaxNumberRows());\n analyzedDataSet.setRecordSize(0);\n }\n if (indicator instanceof FrequencyIndicator || indicator instanceof MinLengthIndicator || indicator instanceof MaxLengthIndicator) {\n Map<Object, List<Object[]>> valueObjectListMap = analyzedDataSet.getFrequencyData();\n if (valueObjectListMap == null) {\n valueObjectListMap = new HashMap<Object, List<Object[]>>();\n analyzedDataSet.setFrequencyData(valueObjectListMap);\n }\n String key = null;\n if (object == null) {\n key = SpecialValueDisplay.NULL_FIELD;\n } else if (indicator instanceof MinLengthIndicator || indicator instanceof MaxLengthIndicator) {\n key = String.valueOf(object.toString().length());\n } else if (object.equals(\"String_Node_Str\")) {\n key = \"String_Node_Str\";\n } else if (indicator instanceof PatternLowFreqIndicator) {\n key = ((PatternLowFreqIndicator) indicator).convertCharacters(object.toString());\n } else if (indicator instanceof PatternFreqIndicator) {\n key = ((PatternFreqIndicator) indicator).convertCharacters(object.toString());\n } else {\n key = object.toString();\n }\n valueObjectList = valueObjectListMap.get(key);\n if (valueObjectList == null) {\n valueObjectList = new ArrayList<Object[]>();\n valueObjectListMap.put(key, valueObjectList);\n }\n } else if (indicator.isInValidRow() || indicator.isValidRow()) {\n List<Object> patternData = analyzedDataSet.getPatternData();\n if (patternData == null) {\n patternData = new ArrayList<Object>();\n patternData.add(new ArrayList<Object[]>());\n patternData.add(new ArrayList<Object[]>());\n analyzedDataSet.setPatternData(patternData);\n }\n if (indicator.isInValidRow()) {\n if (patternData.get(AnalyzedDataSetImpl.INVALID_VALUE) instanceof List<?>) {\n valueObjectList = (ArrayList<Object[]>) patternData.get(AnalyzedDataSetImpl.INVALID_VALUE);\n }\n } else {\n valueObjectList = (ArrayList<Object[]>) patternData.get(AnalyzedDataSetImpl.VALID_VALUE);\n }\n } else {\n valueObjectList = analyzedDataSet.getData();\n if (valueObjectList == null) {\n valueObjectList = new ArrayList<Object[]>();\n analyzedDataSet.setData(valueObjectList);\n }\n }\n return valueObjectList;\n}\n"
"private void createCube(TabularCubeHandle cubeHandle, CubeMaterializer cubeMaterializer) throws IOException, BirtException, DataException {\n List measureNames = new ArrayList();\n List measureGroups = cubeHandle.getContents(CubeHandle.MEASURE_GROUPS_PROP);\n for (int i = 0; i < measureGroups.size(); i++) {\n MeasureGroupHandle mgh = (MeasureGroupHandle) measureGroups.get(i);\n List measures = mgh.getContents(MeasureGroupHandle.MEASURES_PROP);\n for (int j = 0; j < measures.size(); j++) {\n MeasureHandle measure = (MeasureHandle) measures.get(j);\n measureNames.add(measure.getName());\n }\n }\n IDimension[] dimensions = populateDimensions(cubeMaterializer, cubeHandle);\n String[][] factTableKey = new String[dimensions.length][];\n String[][] dimensionKey = new String[dimensions.length][];\n for (int i = 0; i < dimensions.length; i++) {\n TabularDimensionHandle dim = (TabularDimensionHandle) cubeHandle.getDimension(dimensions[i].getName());\n TabularHierarchyHandle hier = (TabularHierarchyHandle) dim.getDefaultHierarchy();\n if (cubeHandle.getDataSet().equals(hier.getDataSet())) {\n keyColumnNames[i] = dimensions[i].getHierarchy().getLevels()[dimensions[i].getHierarchy().getLevels().length - 1].getKeyNames();\n } else {\n Iterator it = cubeHandle.joinConditionsIterator();\n while (it.hasNext()) {\n DimensionConditionHandle dimCondHandle = (DimensionConditionHandle) it.next();\n if (dimCondHandle.getHierarchy().equals(hier)) {\n Iterator conditionIt = dimCondHandle.getJoinConditions().iterator();\n List keys = new ArrayList();\n while (conditionIt.hasNext()) {\n DimensionJoinConditionHandle joinCondition = (DimensionJoinConditionHandle) conditionIt.next();\n keys.add(joinCondition.getHierarchyKey());\n }\n keyColumnNames[i] = new String[keys.size()];\n for (int j = 0; j < keys.size(); j++) {\n keyColumnNames[i][j] = keys.get(j).toString();\n }\n }\n }\n }\n }\n cubeMaterializer.createCube(cubeHandle.getQualifiedName(), keyColumnNames, dimensions, new DataSetIterator(this, cubeHandle), this.toStringArray(measureNames), null);\n}\n"
"private void initFilter() {\n EntityMetadata metadata = KunderaMetadataManager.getEntityMetadata(entityClass);\n String indexName = metadata.getIndexName();\n if (null == filter) {\n return;\n }\n List<String> clauses = tokenize(filter, INTER_CLAUSE_PATTERN);\n clauses = parseFilterForBetweenClause(clauses, indexName);\n boolean newClause = true;\n for (String clause : clauses) {\n if (newClause) {\n List<String> tokens = tokenize(clause, INTRA_CLAUSE_PATTERN);\n if (tokens.size() != 3) {\n throw new PersistenceException(\"String_Node_Str\" + clause);\n }\n String property = tokens.get(0);\n property = property.substring((entityAlias + \"String_Node_Str\").length());\n String columnName = getColumnNameFromFieldName(metadata, property);\n columnName = indexName + \"String_Node_Str\" + columnName;\n String condition = tokens.get(1);\n if (!Arrays.asList(INTRA_CLAUSE_OPERATORS).contains(condition.toUpperCase())) {\n throw new JPQLParseException(\"String_Node_Str\" + clause);\n }\n filtersQueue.add(new FilterClause(property, condition, tokens.get(2)));\n newClause = false;\n } else {\n if (Arrays.asList(INTER_CLAUSE_OPERATORS).contains(clause.toUpperCase())) {\n filtersQueue.add(clause.toUpperCase());\n newClause = true;\n } else {\n throw new JPQLParseException(\"String_Node_Str\" + clause);\n }\n }\n }\n}\n"
"public boolean canBeTargetedBy(MageObject source, Game game) {\n if (this.hasLost() || this.hasLeft()) {\n return false;\n }\n if (source != null) {\n if (abilities.containsKey(ShroudAbility.getInstance().getId())) {\n return false;\n }\n if (abilities.containsKey(HexproofAbility.getInstance().getId())) {\n if (sourceControllerId != null && this.hasOpponent(sourceControllerId, game) && !game.getContinuousEffects().asThough(this.getId(), AsThoughEffectType.HEXPROOF, this.getId(), game)) {\n return false;\n }\n }\n if (hasProtectionFrom(source, game)) {\n return false;\n }\n }\n return true;\n}\n"
"public List<IComponent> filterNeededComponents(Item item, RepositoryNode seletetedNode, ERepositoryObjectType type) {\n List<IComponent> neededComponents = new ArrayList<IComponent>();\n if (!(item instanceof ExampleDemoConnectionItem)) {\n return neededComponents;\n }\n IComponentsService service = (IComponentsService) GlobalServiceRegister.getDefault().getService(IComponentsService.class);\n Collection<IComponent> components = service.getComponentsFactory().readComponents();\n for (IComponent component : components) {\n if (\"String_Node_Str\".equals(component.getName())) {\n neededComponents.add(component);\n }\n }\n return neededComponents;\n}\n"
"public void run() {\n if (operation == Installer.InstallerCallback.OPERATION_INSTALL) {\n PackageManagerCompat.setInstaller(mPm, app.id);\n }\n setSupportProgressBarIndeterminateVisibility(false);\n myAppObserver.onChange();\n}\n"
"protected ElementParameterType getParameterType(NodeType node, String paramName) {\n if (node != null && !hasAPI) {\n ElementParameterType apiParamType = ParameterUtilTool.findParameterType(node, \"String_Node_Str\");\n if (apiParamType == null) {\n ParameterUtilTool.addParameterType(node, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n }\n hasAPI = true;\n }\n String componentName = node.getComponentName();\n ElementParameterType paramType = ParameterUtilTool.findParameterType(node, paramName);\n if (node != null && paramType != null) {\n Object value = ParameterUtilTool.convertParameterValue(paramType);\n if (\"String_Node_Str\".equals(paramName)) {\n if (\"String_Node_Str\".equals(String.valueOf(value))) {\n paramType.setValue(\"String_Node_Str\");\n } else {\n paramType.setValue(\"String_Node_Str\");\n }\n }\n if (\"String_Node_Str\".equals(paramName) && \"String_Node_Str\".equals(componentName)) {\n ElementParameterType operation = ParameterUtilTool.findParameterType(node, \"String_Node_Str\");\n ElementParameterType leadSelector = ParameterUtilTool.findParameterType(node, \"String_Node_Str\");\n ElementParameterType batchSize = ParameterUtilTool.findParameterType(node, \"String_Node_Str\");\n if (operation != null && leadSelector != null) {\n Object operationValue = ParameterUtilTool.convertParameterValue(operation);\n Object leadSelectorValue = ParameterUtilTool.convertParameterValue(leadSelector);\n if (!(\"String_Node_Str\".equals(String.valueOf(operationValue)) && \"String_Node_Str\".equals(String.valueOf(leadSelectorValue))) && batchSize != null) {\n Object batchSizeValue = ParameterUtilTool.convertParameterValue(batchSize);\n paramType.setValue(String.valueOf(batchSizeValue));\n }\n }\n }\n if (\"String_Node_Str\".equals(paramName) && \"String_Node_Str\".equals(componentName)) {\n ElementParameterType operation = ParameterUtilTool.findParameterType(node, \"String_Node_Str\");\n ElementParameterType leadSelector = ParameterUtilTool.findParameterType(node, \"String_Node_Str\");\n ElementParameterType maxReturn = ParameterUtilTool.findParameterType(node, \"String_Node_Str\");\n if (operation != null && leadSelector != null) {\n Object operationValue = ParameterUtilTool.convertParameterValue(operation);\n Object leadSelectorValue = ParameterUtilTool.convertParameterValue(leadSelector);\n if (\"String_Node_Str\".equals(String.valueOf(operationValue)) && \"String_Node_Str\".equals(String.valueOf(leadSelectorValue)) && maxReturn != null) {\n Object maxReturnValue = ParameterUtilTool.convertParameterValue(maxReturn);\n paramType.setValue(maxReturnValue);\n }\n }\n }\n }\n return paramType;\n}\n"
"public void processTouchEvent(MotionEvent ev) {\n final int action = MotionEventCompat.getActionMasked(ev);\n final int actionIndex = MotionEventCompat.getActionIndex(ev);\n if (action == MotionEvent.ACTION_DOWN) {\n cancel();\n }\n if (mVelocityTracker == null) {\n mVelocityTracker = VelocityTracker.obtain();\n }\n mVelocityTracker.addMovement(ev);\n switch(action) {\n case MotionEvent.ACTION_DOWN:\n {\n final float x = ev.getX();\n final float y = ev.getY();\n final int pointerId = MotionEventCompat.getPointerId(ev, 0);\n final View toCapture = findTopChildUnder((int) x, (int) y);\n saveInitialMotion(x, y, pointerId);\n tryCaptureViewForDrag(toCapture, pointerId);\n final int edgesTouched = mInitialEdgesTouched[pointerId];\n if ((edgesTouched & mTrackingEdges) != 0) {\n mCallback.onEdgeTouched(edgesTouched & mTrackingEdges, pointerId);\n }\n break;\n }\n case MotionEventCompat.ACTION_POINTER_DOWN:\n {\n final int pointerId = MotionEventCompat.getPointerId(ev, actionIndex);\n final float x = MotionEventCompat.getX(ev, actionIndex);\n final float y = MotionEventCompat.getY(ev, actionIndex);\n saveInitialMotion(x, y, pointerId);\n if (mDragState == STATE_IDLE) {\n final View toCapture = findTopChildUnder((int) x, (int) y);\n tryCaptureViewForDrag(toCapture, pointerId);\n final int edgesTouched = mInitialEdgesTouched[pointerId];\n if ((edgesTouched & mTrackingEdges) != 0) {\n mCallback.onEdgeTouched(edgesTouched & mTrackingEdges, pointerId);\n }\n } else if (isCapturedViewUnder((int) x, (int) y)) {\n tryCaptureViewForDrag(mCapturedView, pointerId);\n }\n break;\n }\n case MotionEvent.ACTION_MOVE:\n {\n if (mDragState == STATE_DRAGGING) {\n final int index = MotionEventCompat.findPointerIndex(ev, mActivePointerId);\n final float x = MotionEventCompat.getX(ev, index);\n final float y = MotionEventCompat.getY(ev, index);\n final int idx = (int) (x - mLastMotionX[mActivePointerId]);\n final int idy = (int) (y - mLastMotionY[mActivePointerId]);\n dragTo(mCapturedView.getLeft() + idx, mCapturedView.getTop() + idy, idx, idy);\n saveLastMotion(ev);\n } else {\n final int pointerCount = MotionEventCompat.getPointerCount(ev);\n for (int i = 0; i < pointerCount; i++) {\n final int pointerId = MotionEventCompat.getPointerId(ev, i);\n final float x = MotionEventCompat.getX(ev, i);\n final float y = MotionEventCompat.getY(ev, i);\n final float dx = x - mInitialMotionX[pointerId];\n final float dy = y - mInitialMotionY[pointerId];\n reportNewEdgeDrags(dx, dy, pointerId);\n if (mDragState == STATE_DRAGGING) {\n break;\n }\n final View toCapture = findTopChildUnder((int) mInitialMotionX[pointerId], (int) mInitialMotionY[pointerId]);\n if (checkTouchSlop(toCapture, dx, dy) && tryCaptureViewForDrag(toCapture, pointerId)) {\n break;\n }\n }\n saveLastMotion(ev);\n }\n break;\n }\n case MotionEventCompat.ACTION_POINTER_UP:\n {\n final int pointerId = MotionEventCompat.getPointerId(ev, actionIndex);\n if (mDragState == STATE_DRAGGING && pointerId == mActivePointerId) {\n int newActivePointer = INVALID_POINTER;\n final int pointerCount = MotionEventCompat.getPointerCount(ev);\n for (int i = 0; i < pointerCount; i++) {\n final int id = MotionEventCompat.getPointerId(ev, i);\n if (id == mActivePointerId) {\n continue;\n }\n final float x = MotionEventCompat.getX(ev, i);\n final float y = MotionEventCompat.getY(ev, i);\n if (findTopChildUnder((int) x, (int) y) == mCapturedView && tryCaptureViewForDrag(mCapturedView, id)) {\n newActivePointer = mActivePointerId;\n break;\n }\n }\n if (newActivePointer == INVALID_POINTER) {\n releaseViewForPointerUp();\n }\n }\n clearMotionHistory(pointerId);\n break;\n }\n case MotionEvent.ACTION_UP:\n {\n if (mDragState == STATE_DRAGGING) {\n releaseViewForPointerUp();\n }\n cancel();\n break;\n }\n case MotionEvent.ACTION_CANCEL:\n {\n if (mDragState == STATE_DRAGGING) {\n dispatchViewReleased(0, 0);\n }\n cancel();\n break;\n }\n }\n}\n"
"public static int doInvitationLogin(String invitationToken, UserRequest ureq, Locale locale) {\n InvitationDAO invitationDao = CoreSpringFactory.getImpl(InvitationDAO.class);\n boolean hasPolicies = invitationDao.hasInvitations(invitationToken, new Date());\n if (!hasPolicies) {\n return LOGIN_DENIED;\n }\n UserManager um = UserManager.getInstance();\n BaseSecurity securityManager = BaseSecurityManager.getInstance();\n GroupDAO groupDao = CoreSpringFactory.getImpl(GroupDAO.class);\n Invitation invitation = invitationDao.findInvitation(invitationToken);\n if (invitation == null) {\n return LOGIN_DENIED;\n }\n Identity identity = um.findIdentityByEmail(invitation.getMail());\n if (identity != null) {\n SecurityGroup allUsers = securityManager.findSecurityGroupByName(Constants.GROUP_OLATUSERS);\n if (securityManager.isIdentityInSecurityGroup(identity, allUsers)) {\n return LOGIN_DENIED;\n } else {\n if (!groupDao.hasRole(invitation.getBaseGroup(), identity, GroupRoles.invitee.name())) {\n groupDao.addMembershipTwoWay(invitation.getBaseGroup(), identity, GroupRoles.invitee.name());\n DBFactory.getInstance().commit();\n }\n int result = doLogin(identity, BaseSecurityModule.getDefaultAuthProviderIdentifier(), ureq);\n if (ureq.getUserSession().getRoles().isInvitee()) {\n return result;\n }\n return LOGIN_DENIED;\n }\n }\n Collection<String> supportedLanguages = CoreSpringFactory.getImpl(I18nModule.class).getEnabledLanguageKeys();\n if (locale == null || !supportedLanguages.contains(locale.toString())) {\n locale = I18nModule.getDefaultLocale();\n }\n Identity invitee = invitationDao.createIdentityFrom(invitation, locale);\n return doLogin(invitee, BaseSecurityModule.getDefaultAuthProviderIdentifier(), ureq);\n}\n"
"private List<LogEntry> extractTransactionFromLog(long txId, long expectedVersion, ReadableByteChannel log) throws IOException {\n List<LogEntry> logEntryList = null;\n Map<Integer, List<LogEntry>> transactions = new HashMap<Integer, List<LogEntry>>();\n LogEntry entry;\n while ((entry = LogIoUtils.readEntry(buffer, log, cf)) != null && logEntryList == null) {\n if (entry instanceof LogEntry.Start) {\n List<LogEntry> list = new LinkedList<LogEntry>();\n list.add(entry);\n transactions.put(entry.getIdentifier(), list);\n } else if (entry instanceof LogEntry.Commit) {\n if (((LogEntry.Commit) entry).getTxId() == txId) {\n logEntryList = transactions.get(entry.getIdentifier());\n logEntryList.add(entry);\n } else {\n transactions.remove(entry.getIdentifier());\n }\n } else if (entry instanceof LogEntry.Command || entry instanceof LogEntry.Prepare) {\n List<LogEntry> list = transactions.get(entry.getIdentifier());\n if (list != null) {\n list.add(entry);\n }\n } else if (entry instanceof LogEntry.Done) {\n transactions.remove(entry.getIdentifier());\n } else {\n throw new RuntimeException(\"String_Node_Str\" + entry);\n }\n }\n if (logEntryList == null) {\n msgLog.logMessage(\"String_Node_Str\" + txId + \"String_Node_Str\" + expectedVersion);\n throw new IOException(\"String_Node_Str\" + txId + \"String_Node_Str\" + expectedVersion + \"String_Node_Str\" + \"String_Node_Str\" + this.logVersion + \"String_Node_Str\");\n }\n logEntryList.add(new LogEntry.Done(logEntryList.get(0).getIdentifier()));\n return logEntryList;\n}\n"
"protected void initialize(Axis1D parent) {\n this.children = new CopyOnWriteArraySet<Axis1D>();\n this.listeners = new CopyOnWriteArraySet<AxisListener1D>();\n this.setDefaults();\n this.setParent(parent);\n}\n"
"private IDocumentManager getDocumentManager(CubeQueryExecutor executor) throws DataException, IOException {\n if (executor.getContext().getMode() == DataEngineContext.DIRECT_PRESENTATION || executor.getContext().getMode() == DataEngineContext.MODE_GENERATION) {\n return DocumentManagerFactory.loadFileDocumentManager(executor.getContext().getTmpdir() + executor.getSession().getEngine().hashCode(), executor.getCubeQueryDefinition().getName());\n } else {\n return DocumentManagerFactory.createRADocumentManager(executor.getContext().getDocReader());\n }\n}\n"
"public void onPlayerTeleport(PlayerTeleportEvent event) {\n String worldTo = event.getTo().getWorld().getName();\n Player player = event.getPlayer();\n String worldFrom = event.getFrom().getWorld().getName();\n plugin.debugger.debugEvent(MultiInvEvent.WORLD_CHANGE, new String[] { player.getName(), worldFrom, worldTo });\n if (plugin.sharesMap.containsKey(worldTo)) {\n worldTo = plugin.sharesMap.get(worldTo);\n }\n if (plugin.sharesMap.containsKey(worldFrom)) {\n worldFrom = plugin.sharesMap.get(worldFrom);\n }\n if (!(worldTo.equals(worldFrom))) {\n plugin.playerInventory.storeWorldInventory(player, worldFrom);\n plugin.playerInventory.loadWorldInventory(player, worldTo);\n }\n}\n"
"public boolean onSingleTapUp(MotionEvent e) {\n select(mCurrentSelection, false);\n int index = computeSelectedIndex(e.getX(), e.getY());\n if (index >= 0 && index < mAllImages.getCount()) {\n if (mListener != null)\n mListener.onImageClicked(index);\n return true;\n }\n return false;\n}\n"
"public static VCard _createVCardFromXml(String xmlText) {\n VCard vCard = new VCard();\n try {\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n byte[] bytes;\n try {\n bytes = xmlText.getBytes(\"String_Node_Str\");\n } catch (UnsupportedEncodingException e) {\n bytes = xmlText.getBytes();\n }\n Document document = documentBuilder.parse(new ByteArrayInputStream(bytes));\n new VCardReader(vCard, document).initializeFields();\n } catch (Exception e) {\n e.printStackTrace(System.err);\n }\n return vCard;\n}\n"
"public void appendLine(Date date, String str) throws Exception {\n this.append(date, str + \"String_Node_Str\");\n}\n"
"public void getFilterType() {\n NullFilter target = new NullFilter(ColumnType.NULL);\n assertEquals(target.getFilterType(), FilterType.NULL);\n}\n"
"private void doUpdateEndDate(Spinner spinner, CommodityViewModel orderCommodityViewModel, TextView textViewStartDate, TextView textViewEndDate) {\n Integer orderReasonPosition = orderCommodityViewModel.getOrderReasonPosition();\n String item = ((OrderReason) spinner.getItemAtPosition(orderReasonPosition)).getReason();\n if (item.equalsIgnoreCase(ROUTINE)) {\n String startDate = textViewStartDate.getText().toString();\n populateEndDate(startDate, 30, textViewEndDate);\n textViewEndDate.setEnabled(false);\n } else {\n textViewEndDate.setEnabled(true);\n }\n}\n"
"public void bindView(View view, Context context, Cursor cursor) {\n final String screenshotURL = cursor.getString(cursor.getColumnIndex(\"String_Node_Str\"));\n final ImageView imageView = (ImageView) view.findViewById(R.id.theme_grid_item_image);\n imageView.setImageBitmap(null);\n WordPress.imageLoader.get(screenshotURL, new ImageListener() {\n public void onErrorResponse(VolleyError error) {\n }\n public void onResponse(ImageContainer response, boolean isImmediate) {\n if (response != null && response.getBitmap() != null)\n imageView.setImageBitmap(response.getBitmap());\n else\n imageView.setImageBitmap(null);\n }\n }, getGridWidth(context), getGridHeight(context));\n updateGridWidth(mContext, view);\n}\n"
"public void moveTaskToBottom(int taskId) {\n final long origId = Binder.clearCallingIdentity();\n try {\n synchronized (mWindowMap) {\n Task task = mTaskIdToTask.get(taskId);\n if (task == null) {\n Slog.e(TAG, \"String_Node_Str\" + taskId + \"String_Node_Str\");\n return;\n }\n final TaskStack stack = task.mStack;\n stack.moveTaskToBottom(task);\n task.getDisplayContent().moveStack(stack, false);\n moveStackWindowsLocked(stack);\n }\n } finally {\n Binder.restoreCallingIdentity(origId);\n }\n}\n"
"public void refresh() {\n Plugin.getDisplay().syncExec(new Runnable() {\n public void run() {\n getTreeViewer().refresh(true);\n }\n });\n}\n"
"public Integer evaluate() {\n switch(values.setDocument(docId)) {\n case 0:\n return null;\n case 1:\n return ((Long) values.nextValue()).intValue();\n default:\n throw new GroupByOnArrayUnsupportedException(columnName());\n }\n return ((Long) values.nextValue()).intValue();\n}\n"
"public void onReceive(Context context, Intent intent) {\n String action = intent.getAction();\n if (action.equalsIgnoreCase(Intent.ACTION_PACKAGE_ADDED) || action.equalsIgnoreCase(Intent.ACTION_PACKAGE_REPLACED)) {\n RouterServiceValidator.invalidateList(context);\n return;\n }\n if (!(action.equalsIgnoreCase(BOOT_COMPLETE) || action.equalsIgnoreCase(ACL_CONNECTED) || action.equalsIgnoreCase(STATE_CHANGED) || action.equalsIgnoreCase(USBTransport.ACTION_USB_ACCESSORY_ATTACHED) || action.equalsIgnoreCase(TransportConstants.START_ROUTER_SERVICE_ACTION))) {\n return;\n }\n if (action.equalsIgnoreCase(USBTransport.ACTION_USB_ACCESSORY_ATTACHED)) {\n Log.d(TAG, \"String_Node_Str\");\n intent.setAction(null);\n onSdlEnabled(context, intent);\n return;\n }\n boolean didStart = false;\n localRouterClass = defineLocalSdlRouterClass();\n if (action.equalsIgnoreCase(TransportConstants.START_ROUTER_SERVICE_ACTION)) {\n if (intent.hasExtra(TransportConstants.START_ROUTER_SERVICE_SDL_ENABLED_EXTRA)) {\n if (intent.getBooleanExtra(TransportConstants.START_ROUTER_SERVICE_SDL_ENABLED_EXTRA, false)) {\n String packageName = intent.getStringExtra(TransportConstants.START_ROUTER_SERVICE_SDL_ENABLED_APP_PACKAGE);\n final ComponentName componentName = intent.getParcelableExtra(TransportConstants.START_ROUTER_SERVICE_SDL_ENABLED_CMP_NAME);\n if (componentName != null) {\n RouterServiceValidator vlad = new RouterServiceValidator(context, componentName);\n if (vlad.validate()) {\n queuedService = componentName;\n intent.setAction(\"String_Node_Str\");\n onSdlEnabled(context, intent);\n } else {\n Log.w(TAG, \"String_Node_Str\" + componentName.getClassName());\n }\n }\n } else {\n }\n return;\n } else if (intent.getBooleanExtra(TransportConstants.PING_ROUTER_SERVICE_EXTRA, false)) {\n boolean altServiceWake = intent.getBooleanExtra(TransportConstants.BIND_REQUEST_TYPE_ALT_TRANSPORT, false);\n didStart = wakeUpRouterService(context, false, altServiceWake);\n }\n }\n if (intent.getAction().contains(\"String_Node_Str\")) {\n int state = intent.getIntExtra(\"String_Node_Str\", -1);\n if (state == BluetoothAdapter.STATE_OFF || state == BluetoothAdapter.STATE_TURNING_OFF) {\n return;\n } else if (state == BluetoothAdapter.STATE_TURNING_ON) {\n RouterServiceValidator.createTrustedListRequest(context, true);\n }\n }\n if (localRouterClass != null) {\n if (!didStart) {\n didStart = wakeUpRouterService(context, true, false);\n }\n Intent serviceIntent = new Intent(context, localRouterClass);\n SdlRouterService.LocalRouterService self = SdlRouterService.getLocalRouterService(serviceIntent, serviceIntent.getComponent());\n Intent restart = new Intent(SdlRouterService.REGISTER_NEWER_SERVER_INSTANCE_ACTION);\n restart.putExtra(LOCAL_ROUTER_SERVICE_EXTRA, self);\n restart.putExtra(LOCAL_ROUTER_SERVICE_DID_START_OWN, didStart);\n context.sendBroadcast(restart);\n }\n}\n"
"public RecordSource compileSource(JournalReaderFactory factory, CharSequence query) throws ParserException, JournalException {\n RecordSource rs = cache.peek(query);\n if (rs == null) {\n cache.put(query.toString(), rs = resetAndCompile(factory, query));\n } else {\n rs.reset();\n }\n return rs;\n}\n"
"private <T> boolean handleProcessEntry(FlowletProcessEntry<T> entry, BlockingQueue<FlowletProcessEntry<?>> processQueue) {\n if (!entry.shouldProcess()) {\n return false;\n }\n ProcessMethod<T> processMethod = entry.getProcessSpec().getProcessMethod();\n if (processMethod.needsInput()) {\n flowletContext.getProgramMetrics().increment(\"String_Node_Str\", 1);\n }\n TransactionContext txContext = dataFabricFacade.createTransactionManager();\n try {\n txContext.start();\n try {\n InputDatum<T> input = entry.getProcessSpec().getQueueReader().dequeue(0, TimeUnit.MILLISECONDS);\n if (!input.needProcess()) {\n entry.backOff();\n txContext.finish();\n return false;\n }\n entry.resetBackOff();\n ProcessMethod.ProcessResult<?> result = processMethod.invoke(input);\n postProcess(processMethodCallback(processQueue, entry, input), txContext, input, result);\n return true;\n } catch (Throwable t) {\n LOG.error(\"String_Node_Str\", flowletContext, t);\n try {\n txContext.abort();\n } catch (Throwable e) {\n LOG.error(\"String_Node_Str\", flowletContext, e);\n }\n }\n } catch (Throwable t) {\n LOG.error(\"String_Node_Str\", t);\n }\n return false;\n}\n"
"private void initChat() {\n QBChatService qbChatService;\n QBPrivateChatManager qbPrivateChatManager;\n qbChatService = QBChatService.getInstance();\n if (!qbChatService.isLoggedIn()) {\n loginToChat();\n }\n qbPrivateChatManager = qbChatService.getPrivateChatManager();\n qbPrivateChatManager.addPrivateChatManagerListener(this);\n qbPrivateChat = qbPrivateChatManager.createChat(opponentFriend.getId(), this);\n}\n"
"public void run() {\n try {\n topicSubscriber = new TopicSubscriber(Constants.TENANT_TOPIC);\n topicSubscriber.setMessageListener(new TenantEventMessageListener());\n Thread subscriberThread = new Thread(topicSubscriber);\n subscriberThread.start();\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\");\n }\n Thread receiverThread = new Thread(messageDelegator);\n receiverThread.start();\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\");\n }\n while (!terminated) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException ignore) {\n }\n }\n } catch (Exception e) {\n if (log.isErrorEnabled()) {\n log.error(\"String_Node_Str\", e);\n }\n }\n}\n"
"protected void onPostExecute(APIResponse.CODE c) {\n super.onPostExecute(c);\n if (event != null && activity != null) {\n activity.setActionBarTitle(event.getEventName());\n eventName.setText(event.getEventName());\n if (event.getDateString().isEmpty()) {\n activity.findViewById(R.id.event_date_container).setVisibility(View.GONE);\n } else {\n eventDate.setText(event.getDateString());\n }\n if (!event.getVenue().isEmpty()) {\n eventVenue.setText(event.getVenue());\n } else if (!event.getLocation().isEmpty()) {\n eventVenue.setText(event.getLocation());\n } else {\n eventVenue.setText(R.string.no_location_available);\n activity.findViewById(R.id.event_venue_container).setVisibility(View.GONE);\n }\n if (showNextMatch) {\n nextLayout.setVisibility(View.VISIBLE);\n if (nextLayout.getChildCount() > 1) {\n nextLayout.removeViewAt(1);\n }\n nextLayout.addView(next);\n }\n if (showLastMatch) {\n lastLayout.setVisibility(View.VISIBLE);\n if (lastLayout.getChildCount() > 1) {\n lastLayout.removeViewAt(1);\n }\n lastLayout.addView(last);\n }\n if (showRanks) {\n topTeamsContainer.setVisibility(View.VISIBLE);\n topTeams.setText(Html.fromHtml(topTeamsString));\n }\n if (showStats) {\n topOpr.setVisibility(View.VISIBLE);\n if (topOpr.getChildCount() > 1) {\n topOpr.removeViewAt(1);\n }\n topOpr.addView(stats);\n }\n View view = mFragment.getView();\n if (view != null) {\n view.findViewById(R.id.event_venue_nav_arrow).setVisibility(View.VISIBLE);\n view.setFocusable(true);\n view.setClickable(true);\n if (!event.getVenue().isEmpty()) {\n view.findViewById(R.id.event_venue_container).setTag(\"String_Node_Str\" + event.getVenue().replace(\"String_Node_Str\", \"String_Node_Str\"));\n } else if (!event.getLocation().isEmpty()) {\n view.findViewById(R.id.event_venue_container).setTag(\"String_Node_Str\" + event.getLocation().replace(\"String_Node_Str\", \"String_Node_Str\"));\n } else {\n view.findViewById(R.id.event_venue_container).setTag(null);\n view.findViewById(R.id.event_venue_nav_arrow).setVisibility(View.GONE);\n view.setFocusable(false);\n view.setClickable(false);\n }\n view.findViewById(R.id.event_website_button).setTag(!event.getWebsite().isEmpty() ? event.getWebsite() : \"String_Node_Str\" + event.getEventName());\n view.findViewById(R.id.event_twitter_button).setTag(\"String_Node_Str\" + event.getEventKey());\n view.findViewById(R.id.event_youtube_button).setTag(\"String_Node_Str\" + event.getEventKey());\n view.findViewById(R.id.event_cd_button).setTag(\"String_Node_Str\" + event.getEventKey());\n }\n if (c == APIResponse.CODE.OFFLINECACHE) {\n activity.showWarningMessage(activity.getString(R.string.warning_using_cached_data));\n }\n view = mFragment.getView();\n if (view != null) {\n view.findViewById(R.id.progress).setVisibility(View.GONE);\n view.findViewById(R.id.event_info_container).setVisibility(View.VISIBLE);\n }\n if (c == APIResponse.CODE.LOCAL && !isCancelled()) {\n PopulateEventInfo secondLoad = new PopulateEventInfo(mFragment, false);\n mFragment.updateTask(secondLoad);\n secondLoad.execute(eventKey);\n } else {\n if (mFragment instanceof RefreshListener) {\n Log.d(Constants.LOG_TAG, \"String_Node_Str\");\n activity.notifyRefreshComplete(mFragment);\n }\n }\n }\n}\n"
"public static <E> List<E> newArrayList(final Collection<? extends E> elements) {\n return new ArrayList<E>(elements);\n}\n"
"private String getFormatStr(IAtsTeamDefinition teamDef) throws OseeCoreException {\n if (teamDef != null) {\n Artifact artifact = new TeamDefinitionArtifactStore(teamDef).getArtifact();\n if (artifact != null) {\n String formatStr = artifact.getSoleAttributeValue(AtsAttributeTypes.ActionDetailsFormat, \"String_Node_Str\");\n if (Strings.isValid(formatStr)) {\n return formatStr;\n }\n }\n if (teamDef.getParentTeamDef() != null) {\n return getFormatStr(teamDef.getParentTeamDef());\n }\n }\n return null;\n}\n"
"public void transform(NodeType node) {\n String openBrStr = \"String_Node_Str\";\n String closeBrStr = \"String_Node_Str\";\n String openBrPattern = Pattern.quote(openBrStr);\n String closeBrPattern = Pattern.quote(closeBrStr);\n ProcessType item = (ProcessType) node.eContainer();\n for (Object o : item.getNode()) {\n NodeType nt = (NodeType) o;\n for (Object o1 : nt.getElementParameter()) {\n ElementParameterType t = (ElementParameterType) o1;\n if (\"String_Node_Str\".equals(t.getField()) && tableToCheck.equals(t.getName())) {\n List<ElementValueType> elementValues = (List<ElementValueType>) t.getElementValue();\n for (int i = 0; i < elementValues.size() - 1; i++) {\n ElementValueType nameCol = elementValues.get(i);\n String nameValue = nameCol.getValue();\n if (nameCol.getElementRef().equals(\"String_Node_Str\") && nameValue != null && fieldNames.contains(nameValue)) {\n ElementValueType valueCol = elementValues.get(++i);\n String value = valueCol != null ? valueCol.getValue().trim() : null;\n if (value != null && value.contains(openBrStr) || value.contains(closeBrStr)) {\n String newValue = value.replaceFirst(openBrPattern, \"String_Node_Str\").replaceFirst(closeBrPattern, \"String_Node_Str\");\n if (!value.equals(newValue)) {\n valueCol.setValue(newValue);\n }\n }\n }\n }\n }\n }\n }\n}\n"
"public void begin(GlimpseContext context) {\n GL3 gl = context.getGL().getGL3();\n this.useProgram(context.getGL(), true);\n if (this.handles == null) {\n this.handles = new ProgramHandles(gl, getShaderProgram().program());\n }\n gl.glEnableVertexAttribArray(this.handles.inXy);\n gl.glEnableVertexAttribArray(this.handles.inS);\n}\n"
"public void setTransactionIsolation(int level) throws SQLException {\n getDelegate().setTransactionIsolation(level);\n}\n"
"public AddressResponse address(AddressRequest addressRequest, String authorizationHeader) throws BaseException {\n String emailConfirmationToken = getEmailConfirmationToken(authorizationHeader);\n Optional<Investor> oInvestor = findInvestorOrThrowException(emailConfirmationToken);\n checkIfWalletAddressIsAlreadySet(oInvestor);\n String walletAddress = replacePrefixAddress(addressRequest.getAddress());\n String refundEthereumAddress = replacePrefixAddress(addressRequest.getRefundETH());\n String refundBitcoinAddress = addressRequest.getRefundBTC();\n if (walletAddress.isEmpty()) {\n throw new EthereumWalletAddressEmptyException();\n }\n if (!ethereumKeyGenerator.isValidAddress(walletAddress)) {\n throw new EthereumAddressInvalidException();\n }\n if (refundEthereumAddress != null && !refundEthereumAddress.isEmpty() && !ethereumKeyGenerator.isValidAddress(refundEthereumAddress)) {\n throw new EthereumAddressInvalidException();\n }\n if (refundBitcoinAddress != null && !refundBitcoinAddress.isEmpty() && !bitcoinKeyGenerator.isValidAddress(refundBitcoinAddress)) {\n throw new BitcoinAddressInvalidException();\n }\n Keys bitcoinKeys = bitcoinKeyGenerator.getKeys();\n Keys ethereumKeys = ethereumKeyGenerator.getKeys();\n try {\n Investor investor = oInvestor.get();\n investor.setWalletAddress(addPrefixEtherIfNotExist(walletAddress)).setPayInBitcoinAddress(bitcoinKeys.getAddressAsString()).setPayInBitcoinPrivateKey(Hex.toHexString(bitcoinKeys.getPrivateKey())).setPayInEtherAddress(ethereumKeys.getAddressAsString()).setPayInEtherPrivateKey(Hex.toHexString(ethereumKeys.getPrivateKey())).setRefundBitcoinAddress(refundBitcoinAddress).setRefundEtherAddress(addPrefixEtherIfNotExist(refundEthereumAddress));\n investorRepository.save(investor);\n mailService.sendSummaryEmail(investor);\n } catch (Exception e) {\n throw new UnexpectedException();\n }\n return new AddressResponse().setBtc(bitcoinKeys.getAddressAsString()).setEther(ethereumKeys.getAddressAsString());\n}\n"
"public void refresh() {\n List<Entry> entries = dataComp.retrieveAllEntries();\n if (!entries.isEmpty() && emptyLabel != null) {\n emptyLabel.dispose();\n emptyLabel = null;\n }\n for (int i = 0; i < entries.size(); i++) {\n Entry entry = dataComp.retrieveAllEntries().get(i);\n EntryComposite entryComp = entryMap.get(i);\n if (entryComp != null && !entry.getValue().equals(entryComp.entry.getValue())) {\n entryComp.entry.setValue(entry.getValue());\n }\n }\n int maxIterations = entries.size() > entryMap.size() ? entries.size() : entryMap.size();\n for (int i = 0; i < maxIterations; i++) {\n Entry entry = (i < entries.size() ? entries.get(i) : null);\n EntryComposite entryComp = (i < entryMap.size() ? entryMap.get(i) : null);\n String value = (entryComp != null ? entryComp.entry.getValue() : (entry != null ? entry.getValue() : \"String_Node_Str\"));\n if (entry == null || !entry.isReady()) {\n disposeEntry(i);\n continue;\n } else if (entryComp == null && entry.isReady()) {\n renderEntry(entry, i);\n entryComp = entryMap.get(i);\n entryComp.setEntryValue(value);\n entryComp.refresh();\n } else {\n for (int j = 0; j < entry.getAllowedValues().size(); j++) {\n String allowedValue = entry.getAllowedValues().get(j);\n if (!entryComp.entry.getAllowedValues().contains(allowedValue)) {\n disposeEntry(i);\n renderEntry(entry, i);\n entryComp = entryMap.get(i);\n entryComp.setEntryValue(value);\n entryComp.refresh();\n }\n }\n }\n }\n layout();\n return;\n}\n"
"public void testAccuracy() {\n int seed = 7364181;\n Random r = new Random(seed);\n int numItems = 1000000;\n int[] xs = new int[numItems];\n int maxScale = 20;\n for (int i = 0; i < numItems; i++) {\n int scale = r.nextInt(maxScale);\n xs[i] = r.nextInt(1 << scale);\n }\n double epsOfTotalCount = 0.0001;\n double confidence = 0.99;\n CountMinSketch sketch = new CountMinSketch(epsOfTotalCount, confidence, seed);\n for (int x : xs) {\n sketch.add(x, 1);\n }\n int[] actualFreq = new int[1 << maxScale];\n for (int x : xs) {\n actualFreq[x]++;\n }\n sketch = CountMinSketch.deserialize(CountMinSketch.serialize(sketch));\n int numErrors = 0;\n for (int i = 0; i < actualFreq.length; ++i) {\n double ratio = 1.0 * (sketch.estimateCount(i) - actualFreq[i]) / xs.length;\n if (ratio > 1.0001) {\n numErrors++;\n }\n }\n double pCorrect = 1 - 1.0 * numErrors / actualFreq.length;\n assertTrue(\"String_Node_Str\" + confidence + \"String_Node_Str\" + pCorrect, pCorrect > confidence);\n}\n"
"private String getMappedFieldName() {\n if (hasAnnotation(Property.class)) {\n Property mv = (Property) mappingAnnotations.get(Property.class);\n if (!mv.value().equals(Mapper.IGNORED_FIELDNAME))\n return mv.value();\n } else if (hasAnnotation(Reference.class)) {\n Reference mr = (Reference) mappingAnnotations.get(Reference.class);\n if (!mr.value().equals(Mapper.IGNORED_FIELDNAME))\n return mr.value();\n } else if (hasAnnotation(Embedded.class)) {\n Embedded me = (Embedded) mappingAnnotations.get(Embedded.class);\n if (!me.value().equals(Mapper.IGNORED_FIELDNAME))\n return me.value();\n } else if (hasAnnotation(Serialized.class)) {\n Serialized me = (Serialized) mappingAnnotations.get(Serialized.class);\n if (!me.value().equals(Mapper.IGNORED_FIELDNAME))\n return me.value();\n } else if (hasAnnotation(Id.class))\n return Mapper.ID_KEY;\n return this.field.getName();\n}\n"
"public void basicParameterValidation(String name, String description, String namespace) throws AnnotationValidationException {\n if (name.isEmpty()) {\n throw new AnnotationValidationException(MessageFormat.format(\"String_Node_Str\" + \"String_Node_Str\", extensionClassFullName));\n }\n if (description.isEmpty()) {\n throw new AnnotationValidationException(MessageFormat.format(\"String_Node_Str\" + \"String_Node_Str\", extensionClassFullName));\n }\n if (namespace.isEmpty()) {\n if (!CORE_PACKAGE_PATTERN.matcher(extensionClassFullName).find()) {\n throw new AnnotationValidationException(MessageFormat.format(\"String_Node_Str\" + \"String_Node_Str\", extensionClassFullName));\n }\n }\n}\n"
"protected void onMeasure(int widthSpec, int heightSpec) {\n int maxWidth = 0;\n int maxHeight = 0;\n for (int i = 0, n = mZoomRatios.length; i < n; ++i) {\n float value = mZoomRatios[i];\n Texture tex = StringTexture.newInstance(sZoomFormat.format(value), mFontSize, FONT_COLOR);\n if (maxWidth < tex.getWidth())\n maxWidth = tex.getWidth();\n if (maxHeight < tex.getHeight())\n maxHeight = tex.getHeight();\n }\n new MeasureHelper(this).setPreferredContentSize(maxWidth, maxHeight).measure(widthSpec, heightSpec);\n}\n"
"public void resolveBottomBorder() {\n if (rows.size() == 0) {\n return;\n }\n Row row = (Row) rows.getCurrent();\n HashSet cells = new HashSet();\n for (int i = 0; i < columnNumber; i++) {\n CellArea cell = row.getCell(start + i);\n if (cell != null) {\n if (cell instanceof DummyCell) {\n CellArea ref = ((DummyCell) cell).getCell();\n if (!cells.contains(ref)) {\n int width = resolveBottomBorder(ref);\n if (width > 0) {\n ref.setHeight(ref.getHeight() + width);\n }\n cells.add(ref);\n }\n cells.add(ref);\n }\n } else {\n if (!cells.contains(cell)) {\n int width = resolveBottomBorder(cell);\n if (width > 0) {\n cell.setHeight(cell.getHeight() + width);\n }\n cells.add(cell);\n }\n }\n }\n}\n"
"void backward(double[] a, int n) {\n if (n < 2) {\n return;\n }\n if (n > workspace.length) {\n workspace = new double[n];\n }\n int nh = n >> 1;\n int nh1 = nh - 1;\n workspace[0] = C * (a[nh1] - a[n - 1]);\n workspace[n - 1] = C * (a[nh1] + a[n - 1]);\n for (int i = 0, j = 1; i < nh1; i++) {\n workspace[j++] = C * (a[i] + a[i + nh]);\n workspace[j++] = C * (a[i] - a[i + nh]);\n }\n System.arraycopy(workspace, 0, a, 0, n);\n}\n"
"protected void updateProject(final List<ValueEventWrapper> values, final Integer projectId, UserExecutionContext context, String comment) throws CommandException {\n final Date historyDate = new Date();\n final User user = context.getUser();\n final Project project = em().find(Project.class, projectId);\n if (project != null) {\n if (!Handlers.isProjectEditable(project, user)) {\n throw new IllegalStateException();\n }\n } else {\n OrgUnit orgUnit = em().find(OrgUnit.class, projectId);\n if (!Handlers.isOrgUnitVisible(orgUnit, user)) {\n throw new IllegalStateException();\n }\n }\n final List<String> conflicts = searchForConflicts(project, values, context);\n boolean coreVersionHasBeenModified = false;\n for (final ValueEventWrapper valueEvent : values) {\n final FlexibleElementDTO source = valueEvent.getSourceElement();\n final FlexibleElement element = em().find(FlexibleElement.class, source.getId());\n final TripletValueDTO updateListValue = valueEvent.getTripletValue();\n final String updateSingleValue = valueEvent.getSingleValue();\n final Set<Integer> multivaluedIdsValue = valueEvent.getMultivaluedIdsValue();\n final boolean isProjectCountryChanged = valueEvent.isProjectCountryChanged();\n final Integer iterationId = valueEvent.getIterationId();\n LOG.debug(\"String_Node_Str\", source.getId(), source.getEntityName());\n LOG.debug(\"String_Node_Str\", valueEvent.getChangeType(), updateSingleValue, updateListValue, iterationId);\n coreVersionHasBeenModified = coreVersionHasBeenModified || element != null && element.isAmendable();\n if (source instanceof DefaultFlexibleElementDTO && !((DefaultFlexibleElementType.BUDGET.equals(((DefaultFlexibleElementDTO) source).getType())))) {\n final DefaultFlexibleElementDTO defaultElement = (DefaultFlexibleElementDTO) source;\n LOG.debug(\"String_Node_Str\", defaultElement.getType());\n final String oldValue = saveDefaultElement(projectId, defaultElement.getType(), updateSingleValue, isProjectCountryChanged);\n List<HistoryToken> results = null;\n if (element != null) {\n final TypedQuery<HistoryToken> query = em().createQuery(\"String_Node_Str\", HistoryToken.class);\n query.setParameter(\"String_Node_Str\", element.getId());\n query.setParameter(\"String_Node_Str\", projectId);\n results = query.getResultList();\n }\n if (results == null || results.isEmpty()) {\n final Date oldDate;\n final User oldOwner;\n if (project != null) {\n oldDate = project.getLastSchemaUpdate();\n oldOwner = project.getOwner();\n } else {\n oldDate = new Date(historyDate.getTime() - 1);\n oldOwner = null;\n }\n if (oldValue != null) {\n historize(oldDate, element, projectId, null, oldOwner, ValueEventChangeType.ADD, oldValue, null, null);\n }\n }\n historize(historyDate, element, projectId, null, user, ValueEventChangeType.EDIT, updateSingleValue, null, comment);\n continue;\n }\n final Value currentValue = retrieveOrCreateValue(projectId, source.getId(), iterationId, user);\n if (updateSingleValue != null) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\");\n }\n currentValue.setValue(updateSingleValue);\n historize(historyDate, element, projectId, iterationId, user, ValueEventChangeType.EDIT, updateSingleValue, null, comment);\n } else if (multivaluedIdsValue != null) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\");\n }\n Set<Integer> currentIds = new HashSet<>();\n if (currentValue != null && currentValue.getValue() != null && !currentValue.getValue().isEmpty()) {\n currentIds = new HashSet<>(ValueResultUtils.splitValuesAsInteger(currentValue.getValue()));\n } else {\n currentIds = Collections.emptySet();\n }\n switch(valueEvent.getChangeType()) {\n case ADD:\n currentIds.addAll(multivaluedIdsValue);\n break;\n case REMOVE:\n currentIds.removeAll(multivaluedIdsValue);\n break;\n case EDIT:\n currentIds = multivaluedIdsValue;\n break;\n default:\n throw new IllegalStateException();\n }\n String serializedValue = ValueResultUtils.mergeElements(new ArrayList<Integer>(currentIds));\n currentValue.setValue(serializedValue);\n if (valueEvent.getChangeType() == ValueEventChangeType.EDIT) {\n historize(historyDate, element, projectId, iterationId, user, valueEvent.getChangeType(), serializedValue, null, comment);\n } else {\n for (Integer id : multivaluedIdsValue) {\n historize(historyDate, element, projectId, iterationId, user, valueEvent.getChangeType(), String.valueOf(id), null, comment);\n }\n }\n } else {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\");\n }\n final List<Integer> ids = ValueResultUtils.splitValuesAsInteger(currentValue.getValue());\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\" + ids + \"String_Node_Str\");\n }\n switch(valueEvent.getChangeType()) {\n case ADD:\n onAdd(updateListValue, ids, currentValue, historyDate, element, projectId, iterationId, user, comment);\n break;\n case REMOVE:\n if (!onDelete(updateListValue, ids, currentValue, historyDate, element, projectId, iterationId, user, comment)) {\n continue;\n }\n break;\n case EDIT:\n onEdit(updateListValue, historyDate, element, projectId, iterationId, user, comment);\n break;\n default:\n LOG.debug(\"String_Node_Str\" + valueEvent.getChangeType() + \"String_Node_Str\");\n break;\n }\n LOG.debug(\"String_Node_Str\" + ids + \"String_Node_Str\");\n }\n em().merge(currentValue);\n }\n final Project updatedProject = em().find(Project.class, projectId);\n if (updatedProject != null) {\n OrgUnit newOrgUnit = updatedProject.getOrgUnit();\n if (newOrgUnit != null) {\n final UserPermissionPolicy permissionPolicy = injector.getInstance(UserPermissionPolicy.class);\n permissionPolicy.deleteUserPemissionByProject(projectId);\n permissionPolicy.updateUserPermissionByOrgUnit(newOrgUnit);\n }\n if (coreVersionHasBeenModified) {\n updatedProject.setAmendmentRevision(updatedProject.getAmendmentRevision() == null ? 2 : updatedProject.getAmendmentRevision() + 1);\n em().merge(updatedProject);\n }\n }\n if (!conflicts.isEmpty()) {\n throw new UpdateConflictException(updatedProject.toContainerInformation(), conflicts.toArray(new String[0]));\n }\n}\n"
"public void update() throws IOException {\n HttpServletRequest request = ServletActionContext.getRequest();\n HttpServletResponse resp = ServletActionContext.getResponse();\n Module module = new Module();\n module.setModuleCode(request.getParameter(\"String_Node_Str\"));\n module.setModuleName(request.getParameter(\"String_Node_Str\"));\n module.setModuleValue(request.getParameter(\"String_Node_Str\"));\n module.setLinkUrl(request.getParameter(\"String_Node_Str\"));\n module.setParentModule(request.getParameter(\"String_Node_Str\"));\n String sortIndexStr = request.getParameter(\"String_Node_Str\");\n if (sortIndexStr == null || sortIndexStr.isEmpty())\n sortIndexStr = \"String_Node_Str\";\n module.setSortIndex(Integer.parseInt(sortIndexStr));\n moduleService.modify(module);\n super.refreshMenu(ServletActionContext.getRequest().getSession());\n responseJTableData(resp, generateUpdateSuccessJSONStr());\n}\n"
"private Group getCorrectAltLocGroup(Character altLoc, String recordName, Character aminoCode1, String groupCode3, long seq_id) {\n List<Atom> atoms = current_group.getAtoms();\n if (atoms.size() > 0) {\n Atom a1 = atoms.get(0);\n if (a1.getAltLoc().equals(altLoc)) {\n return current_group;\n }\n }\n List<Group> altLocs = current_group.getAltLocs();\n for (Group altLocG : altLocs) {\n atoms = altLocG.getAtoms();\n if (atoms.size() > 0) {\n for (Atom a1 : atoms) {\n if (a1.getAltLoc().equals(altLoc)) {\n return altLocG;\n }\n }\n }\n }\n if (groupCode3.equals(current_group.getPDBName())) {\n if (current_group.getAtoms().size() == 0) {\n return current_group;\n Group altLocG = (Group) current_group.clone();\n current_group.addAltLoc(altLocG);\n return altLocG;\n }\n Group altLocG = getNewGroup(recordName, aminoCode1, seq_id, groupCode3);\n try {\n altLocG.setPDBName(groupCode3);\n } catch (PDBParseException e) {\n e.printStackTrace();\n }\n altLocG.setResidueNumber(current_group.getResidueNumber());\n current_group.addAltLoc(altLocG);\n return altLocG;\n}\n"
"public CSoarAgentWrapper CreateAgent(String name) {\n System.out.println(\"String_Node_Str\");\n throw new RuntimeException(\"String_Node_Str\");\n}\n"
"public boolean isSmall() {\n boolean small;\n if (buttonMode && StringUtils.isBlank(editPassword.getValue())) {\n small = false;\n } else {\n small = editPassword.getValue().length() < 6;\n }\n updateAfterValidation(!small);\n return small;\n}\n"
"public static void copy(final ParameterValueGroup values, final ParameterValueGroup destination) throws InvalidParameterNameException, InvalidParameterValueException {\n final Integer ZERO = 0;\n final Map<String, Integer> occurrences = new HashMap<>();\n for (final GeneralParameterValue value : values.values()) {\n final String name = value.getDescriptor().getName().getCode();\n final int occurrence = occurrences.getOrDefault(name, ZERO);\n if (value instanceof ParameterValueGroup) {\n final List<ParameterValueGroup> groups = destination.groups(name);\n copy((ParameterValueGroup) value, (occurrence < groups.size()) ? groups.get(occurrence) : destination.addGroup(name));\n } else {\n final ParameterValue<?> source = (ParameterValue<?>) value;\n final ParameterValue<?> target;\n if (occurrence == 0) {\n try {\n target = destination.parameter(name);\n } catch (ParameterNotFoundException cause) {\n throw new InvalidParameterNameException(Errors.format(Errors.Keys.UnexpectedParameter_1, name), cause, name);\n }\n } else {\n target = (ParameterValue<?>) getOrCreate(destination, name, occurrence);\n }\n final Object v = source.getValue();\n final Unit<?> unit = source.getUnit();\n if (unit == null) {\n target.setValue(v);\n } else if (v instanceof Number) {\n target.setValue(((Number) v).doubleValue(), unit);\n } else if (v instanceof double[]) {\n target.setValue((double[]) v, unit);\n } else if (v != target.getValue()) {\n throw new InvalidParameterValueException(Errors.format(Errors.Keys.IllegalArgumentValue_2, name, v), name, v);\n }\n }\n occurrences.put(name, occurrence + 1);\n }\n}\n"
"public static void main(String[] args) {\n int nThreads = (args.length == 0) ? 10 : Integer.parseInt(args[0]);\n final AllTest allTest = new AllTest(nThreads);\n allTest.start();\n Executors.newSingleThreadExecutor().execute(new Runnable() {\n public void run() {\n while (true) {\n try {\n Thread.sleep(STATS_SECONDS * ONE_SECOND);\n System.out.println(\"String_Node_Str\" + allTest.hazelcast.getCluster().getMembers().size());\n allTest.mapStats();\n allTest.qStats();\n allTest.topicStats();\n } catch (InterruptedException ignored) {\n return;\n }\n }\n }\n });\n}\n"
"public boolean equals(Object that) {\n if (that == null || this.getClass() != that.getClass()) {\n return false;\n }\n JsObjectLiteral thatLiteral = (JsObjectLiteral) that;\n return internable == thatLiteral.internable && properties.equals(thatLiteral.properties);\n}\n"
"private String newTransactionEndpointUrl() {\n logger.debug(\"String_Node_Str\", url);\n HttpPost request = new HttpPost(url);\n request.setHeader(new BasicHeader(HTTP.CONTENT_TYPE, \"String_Node_Str\"));\n CloseableHttpResponse response = executeRequest(request);\n Header location = response.getHeaders(\"String_Node_Str\")[0];\n return location.getValue();\n}\n"
"public void onListItemClick(ListView l, View v, int position, long id) {\n FileHolder item = (FileHolder) mAdapter.getItem(position);\n openInformingPathBar(item);\n}\n"
"private void addFilesTo(IResource resource, Collection<IResource> allKids) {\n if (resource instanceof IFile) {\n allKids.add(resource);\n return;\n }\n if (resource instanceof IFolder) {\n IFolder folder = (IFolder) resource;\n IResource[] kids = null;\n try {\n kids = folder.members();\n } catch (CoreException e) {\n e.printStackTrace();\n }\n addKids(allKids, kids);\n allKids.add(folder);\n return;\n }\n if (resource instanceof IProject) {\n IProject project = (IProject) resource;\n IResource[] kids = null;\n try {\n kids = project.members();\n } catch (CoreException e) {\n e.printStackTrace();\n }\n for (IResource irc : kids) {\n if (irc instanceof IFile) {\n allKids.add(irc);\n continue;\n }\n if (irc instanceof IFolder) {\n addFilesTo(irc, allKids);\n }\n }\n allKids.add(project);\n return;\n }\n}\n"
"public void staticLinkage() {\n BuildRuleResolver ruleResolver = new BuildRuleResolver();\n SourcePathResolver pathResolver = new SourcePathResolver(ruleResolver);\n BuildTarget target = BuildTargetFactory.newInstance(\"String_Node_Str\");\n BuildRuleParams params = BuildRuleParamsFactory.createTrivialBuildRuleParams(target);\n CxxPlatform cxxPlatform = DefaultCxxPlatforms.build(new CxxBuckConfig(new FakeBuckConfig()));\n BuildTarget staticPicLibraryTarget = BuildTarget.builder(params.getBuildTarget()).addFlavors(cxxPlatform.getFlavor(), CxxDescriptionEnhancer.STATIC_PIC_FLAVOR).build();\n ruleResolver.addToIndex(new FakeBuildRule(BuildRuleParamsFactory.createTrivialBuildRuleParams(staticPicLibraryTarget), pathResolver));\n CxxLibrary cxxLibrary = new CxxLibrary(params, ruleResolver, pathResolver, Predicates.<CxxPlatform>alwaysFalse(), Functions.constant(ImmutableMultimap.<CxxSource.Type, String>of()), Functions.constant(ImmutableList.<String>of()), Optional.<Pattern>absent(), Functions.constant(ImmutableSet.<Path>of()), NativeLinkable.Linkage.STATIC, false, Optional.<String>absent(), ImmutableSortedSet.<BuildTarget>of());\n assertThat(cxxLibrary.getSharedLibraries(cxxPlatform).entrySet(), Matchers.empty());\n assertThat(cxxLibrary.getPythonPackageComponents(cxxPlatform).getNativeLibraries().entrySet(), Matchers.empty());\n NativeLinkableInput expectedSharedNativeLinkableInput = NativeLinkableInput.of(ImmutableList.<SourcePath>of(new BuildTargetSourcePath(staticPicLibraryTarget)), ImmutableList.of(CxxDescriptionEnhancer.getStaticLibraryPath(target, cxxPlatform.getFlavor(), CxxSourceRuleFactory.PicType.PIC).toString()), ImmutableSet.<Path>of());\n assertEquals(expectedSharedNativeLinkableInput, cxxLibrary.getNativeLinkableInput(cxxPlatform, Linker.LinkableDepType.SHARED));\n}\n"
"public void performAction() {\n FileTable fileTable = mainFrame.getActiveTable();\n FileTableModel tableModel = fileTable.getFileTableModel();\n int nbRows = tableModel.getRowCount();\n for (int i = fileTable.getCurrentFolder().getParent() == null ? 0 : 1; i < nbRows; i++) tableModel.setRowMarked(i, true);\n fileTable.repaint();\n fileTable.fireMarkedFilesChangedEvent();\n}\n"
"public void fillContextMenu(IMenuManager menu) {\n TreeSelection treeSelection = ((TreeSelection) this.getContext().getSelection());\n List<IFile> selectedFiles = new ArrayList<IFile>();\n if (treeSelection.size() == 1) {\n Object obj = treeSelection.getFirstElement();\n if (obj instanceof IFolder) {\n selectedFolderName = ((IFolder) obj).getName();\n if (selectedFolderName.equals(DQStructureManager.PATTERNS)) {\n type = ExpressionType.REGEXP;\n } else if (selectedFolderName.equals(DQStructureManager.SQL_PATTERNS)) {\n type = ExpressionType.SQL_LIKE;\n }\n if (type != null) {\n menu.add(new CreatePatternAction((IFolder) obj, type));\n }\n } else if (obj instanceof IFile) {\n IFile file = (IFile) obj;\n if (file.getFileExtension().equalsIgnoreCase(EXTENSION_PATTERN)) {\n }\n }\n }\n boolean isSelectFile = computeSelectedFiles(treeSelection, selectedFiles);\n if (!isSelectFile && !selectedFiles.isEmpty()) {\n }\n}\n"
"public void setDeadline(Date deadline) {\n timer24hour.cancel();\n timer1hour.cancel();\n timer0hour.cancel();\n if (deadline != null) {\n final Date aDayBeforeTheDeadline = new Date(deadline.getTime());\n aDayBeforeTheDeadline.setHours(aDayBeforeTheDeadline.getHours() - 24);\n final Date anHourBeforeTheDeadline = new Date(deadline.getTime());\n anHourBeforeTheDeadline.setHours(anHourBeforeTheDeadline.getHours() - 1);\n final Date now = getNow();\n if (now.before(deadline)) {\n if (now.before(aDayBeforeTheDeadline)) {\n timer24hour.cancel();\n long diff = aDayBeforeTheDeadline.getTime() - now.getTime();\n final long diffHours = diff / (1000 * 60 * 60);\n LOG.info(\"String_Node_Str\" + diffHours + \"String_Node_Str\");\n if (diffHours < 24 * 3) {\n try {\n timer24hour.schedule((int) diff + (60 * 1000));\n } catch (Exception exception) {\n LOG.log(Level.FINER, \"String_Node_Str\" + exception.getMessage(), exception);\n }\n }\n }\n if (now.before(anHourBeforeTheDeadline)) {\n timer1hour.cancel();\n long diff = anHourBeforeTheDeadline.getTime() - now.getTime();\n final long diffMinutes = diff / (1000 * 60);\n LOG.info(\"String_Node_Str\" + diffMinutes + \"String_Node_Str\");\n if (diffMinutes < 3 * 24 * 60) {\n try {\n timer1hour.schedule((int) diff + (60 * 1000));\n } catch (Exception exception) {\n LOG.log(Level.FINER, \"String_Node_Str\" + exception.getMessage(), exception);\n }\n }\n }\n timer0hour.cancel();\n long diff = deadline.getTime() - now.getTime();\n final long diffMinutes = diff / (1000 * 60);\n LOG.info(\"String_Node_Str\" + diffMinutes + \"String_Node_Str\");\n if (diffMinutes < 3 * 24 * 60) {\n try {\n timer0hour.schedule((int) diff + (60 * 1000));\n } catch (Exception exception) {\n LOG.log(Level.FINER, \"String_Node_Str\" + exception.getMessage(), exception);\n }\n }\n }\n if (now.before(deadline)) {\n if (now.after(anHourBeforeTheDeadline)) {\n timer1hour.run();\n } else if (now.after(aDayBeforeTheDeadline)) {\n timer24hour.run();\n }\n } else {\n timer0hour.run();\n }\n }\n}\n"
"public void testMipmapGenerator() throws Exception {\n BoxMipmapGenerator boxMipmapGenerator = new BoxMipmapGenerator(z, false, Utils.PNG_FORMAT, boxWidth, boxHeight, boxDirectory, 0, 0, lastRow, 0, lastColumn, false);\n for (int row = 1; row < 3; row++) {\n for (int column = 2; column < 4; column++) {\n boxMipmapGenerator.addSource(row, column, new File(boxDirectory, \"String_Node_Str\" + z + \"String_Node_Str\" + row + \"String_Node_Str\" + column + \"String_Node_Str\"));\n }\n }\n boxMipmapGenerator = validateNextLevel(boxMipmapGenerator, new int[][] { { 0, 1 }, { 1, 1 } });\n boxMipmapGenerator = validateNextLevel(boxMipmapGenerator, new int[][] { { 0, 0 } });\n final Path overviewDirPath = Paths.get(boxDirectory.getAbsolutePath(), \"String_Node_Str\");\n final File overviewFile = new File(overviewDirPath.toFile(), z + \"String_Node_Str\").getAbsoluteFile();\n final boolean isOverviewGenerated = boxMipmapGenerator.generateOverview(overviewWidth, stackBounds, overviewFile);\n filesAndDirectoriesToDelete.add(overviewFile);\n Assert.assertTrue(\"String_Node_Str\", isOverviewGenerated);\n Assert.assertNotNull(\"String_Node_Str\" + overviewFile + \"String_Node_Str\" + boxMipmapGenerator.getSourceLevel(), overviewFile);\n Assert.assertTrue(\"String_Node_Str\" + overviewFile + \"String_Node_Str\" + boxMipmapGenerator.getSourceLevel() + \"String_Node_Str\", overviewFile.exists());\n filesAndDirectoriesToDelete.add(overviewFile.getParentFile());\n}\n"
"public Configuration build() throws IOException {\n List<Library> libs = new ArrayList<>();\n for (Library.Reference ref : libraries) {\n Library file = ref.getLibrary(uri, path, signer);\n for (Library l : libs) {\n if (Files.isSameFile(l.getPath(), file.getPath())) {\n throw new IllegalStateException(\"String_Node_Str\" + l.getPath());\n }\n }\n libs.add(file);\n }\n Configuration config = new Configuration();\n if (uri != null)\n config.baseUri = uri;\n if (path != null)\n config.basePath = path;\n config.updateHandler = updateHandler;\n config.launcher = launcher;\n config.libraries = libs;\n config.unmodifiableLibraries = Collections.unmodifiableList(config.libraries);\n config.properties = properties;\n config.unmodifiableProperties = Collections.unmodifiableList(config.properties);\n Map<String, String> resolved = PropertyUtils.extractPropertiesForCurrentMachine(systemProperties, properties);\n resolved = PropertyUtils.resolveDependencies(resolved);\n config.resolvedProperties = resolved;\n config.unmodifiableResolvedProperties = Collections.unmodifiableMap(config.resolvedProperties);\n return config;\n}\n"
"public static World getIslandWorld() {\n if (islandWorld == null) {\n if (Settings.useOwnGenerator) {\n islandWorld = Bukkit.getServer().getWorld(Settings.worldName);\n } else {\n islandWorld = WorldCreator.name(Settings.worldName).type(WorldType.FLAT).environment(World.Environment.NORMAL).generator(new ChunkGeneratorWorld()).createWorld();\n }\n if (Settings.createNether) {\n getNetherWorld();\n }\n if (!Settings.useOwnGenerator && Bukkit.getServer().getPluginManager().isPluginEnabled(\"String_Node_Str\")) {\n Bukkit.getLogger().info(\"String_Node_Str\");\n try {\n Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), \"String_Node_Str\" + Settings.worldName + \"String_Node_Str\" + plugin.getName());\n if (!Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), \"String_Node_Str\" + plugin.getName() + \"String_Node_Str\" + Settings.worldName)) {\n Bukkit.getLogger().severe(\"String_Node_Str\");\n }\n if (Settings.createNether) {\n if (Settings.newNether) {\n Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), \"String_Node_Str\" + Settings.worldName + \"String_Node_Str\" + plugin.getName());\n Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), \"String_Node_Str\" + plugin.getName() + \"String_Node_Str\" + Settings.worldName + \"String_Node_Str\");\n } else {\n Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), \"String_Node_Str\" + Settings.worldName + \"String_Node_Str\");\n }\n }\n } catch (Exception e) {\n Bukkit.getLogger().severe(\"String_Node_Str\" + plugin.getName() + \"String_Node_Str\");\n e.printStackTrace();\n Bukkit.getServer().getPluginManager().disablePlugin(plugin);\n }\n }\n }\n if (islandWorld != null) {\n islandWorld.setWaterAnimalSpawnLimit(Settings.waterAnimalSpawnLimit);\n islandWorld.setMonsterSpawnLimit(Settings.monsterSpawnLimit);\n islandWorld.setAnimalSpawnLimit(Settings.animalSpawnLimit);\n }\n return islandWorld;\n}\n"
"protected Dialog onCreateDialog(int id) {\n switch(id) {\n case DIALOG_SELECTTIME:\n Calendar oldTime = null;\n boolean travelAt = true;\n if (routeSearch.arrival > 0) {\n travelAt = false;\n oldTime = Calendar.getInstance();\n oldTime.setTimeInMillis(routeSearch.arrival);\n } else if (routeSearch.departure > 0) {\n oldTime = Calendar.getInstance();\n oldTime.setTimeInMillis(routeSearch.departure);\n }\n final Dialog dialog = new Dialog(this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.selectroute_dialog_timepick);\n final ArrayList<CharSequence> travelAtArriveBeforeItems = new ArrayList<CharSequence>();\n travelAtArriveBeforeItems.add(getText(R.string.travelAt));\n travelAtArriveBeforeItems.add(getText(R.string.arriveBefore));\n final Spinner travelAtArriveBeforeSpinner = (Spinner) dialog.findViewById(R.id.travelAtArriveBefore);\n final ArrayAdapter<CharSequence> travelAtArriveBeforeAdapter = new ArrayAdapter<CharSequence>(this, android.R.layout.simple_spinner_item, travelAtArriveBeforeItems);\n travelAtArriveBeforeAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n travelAtArriveBeforeSpinner.setAdapter(travelAtArriveBeforeAdapter);\n if (!travelAt) {\n travelAtArriveBeforeSpinner.setSelection(1);\n }\n final TimePicker timePicker = (TimePicker) dialog.findViewById(R.id.timePicker);\n View amPmView = ((ViewGroup) timePicker.getChildAt(0)).getChildAt(2);\n if (amPmView instanceof Button) {\n amPmView.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n Log.d(\"String_Node_Str\", \"String_Node_Str\");\n if (v instanceof Button) {\n if (((Button) v).getText().equals(\"String_Node_Str\")) {\n ((Button) v).setText(\"String_Node_Str\");\n if (timePicker.getCurrentHour() < 12) {\n timePicker.setCurrentHour(timePicker.getCurrentHour() + 12);\n }\n } else {\n ((Button) v).setText(\"String_Node_Str\");\n if (timePicker.getCurrentHour() >= 12) {\n timePicker.setCurrentHour(timePicker.getCurrentHour() - 12);\n }\n }\n }\n });\n }\n } else {\n timePicker.setIs24HourView(true);\n }\n if (oldTime != null) {\n timePicker.setCurrentHour(oldTime.get(Calendar.HOUR_OF_DAY));\n timePicker.setCurrentMinute(oldTime.get(Calendar.MINUTE));\n }\n final Spinner dayList = (Spinner) dialog.findViewById(R.id.dayList);\n final SimpleDateFormat DATEFORMAT = new SimpleDateFormat(\"String_Node_Str\");\n ArrayList<String> dateList = new ArrayList<String>();\n Calendar date = Calendar.getInstance();\n int positionOfOldTime = 0;\n for (int i = 0; i < 14; i++) {\n if (oldTime != null && date.get(Calendar.DAY_OF_YEAR) == oldTime.get(Calendar.DAY_OF_YEAR)) {\n positionOfOldTime = i;\n }\n dateList.add(DATEFORMAT.format(date.getTime()));\n date.add(Calendar.DAY_OF_YEAR, 1);\n }\n final ArrayAdapter<String> dayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, dateList);\n dayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n dayList.setAdapter(dayAdapter);\n dayList.setSelection(positionOfOldTime);\n final Button okButton = (Button) dialog.findViewById(R.id.okButton);\n okButton.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n try {\n boolean travelAt = travelAtArriveBeforeSpinner.getSelectedItemPosition() == 0;\n Date date = DATEFORMAT.parse(dayAdapter.getItem(dayList.getSelectedItemPosition()));\n date.setHours(timePicker.getCurrentHour());\n date.setMinutes(timePicker.getCurrentMinute());\n if (travelAt) {\n routeSearch.departure = date.getTime();\n routeSearch.arrival = 0;\n } else {\n routeSearch.departure = 0;\n routeSearch.arrival = date.getTime();\n }\n refreshMenu();\n dialog.dismiss();\n } catch (ParseException e) {\n }\n }\n });\n final Button resetButton = (Button) dialog.findViewById(R.id.resetButton);\n resetButton.setOnClickListener(new OnClickListener() {\n public void onClick(View arg0) {\n routeSearch.departure = 0;\n routeSearch.arrival = 0;\n refreshMenu();\n dialog.dismiss();\n }\n });\n return dialog;\n case DIALOG_TRANSPORTTYPES:\n final CharSequence[] transportItems = routeSearch.getTransportArray(this);\n final boolean[] checkedTransportItems = { true, true, true, true, true, true, true };\n AlertDialog.Builder transportBuilder = new AlertDialog.Builder(this);\n transportBuilder.setTitle(R.string.transportTypes);\n transportBuilder.setMultiChoiceItems(transportItems, checkedTransportItems, new DialogInterface.OnMultiChoiceClickListener() {\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n routeSearch.transportTypes[which] = isChecked;\n refreshMenu();\n }\n });\n final AlertDialog transportDialog = transportBuilder.create();\n transportDialog.setOnDismissListener(new OnDismissListener() {\n public void onDismiss(DialogInterface dialog) {\n int enabled = 0;\n for (int i = 0; i < 7; i++) {\n if (routeSearch.transportTypes[i]) {\n enabled++;\n }\n }\n if (enabled == 0) {\n for (int i = 0; i < 7; i++) {\n routeSearch.transportTypes[i] = true;\n }\n }\n }\n });\n return transportDialog;\n case DIALOG_CHANGEMARGIN:\n final CharSequence[] changeMarginItems = { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n AlertDialog.Builder changeBuilder = new AlertDialog.Builder(this);\n changeBuilder.setTitle(R.string.setChangeMargin);\n changeBuilder.setItems(changeMarginItems, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int item) {\n routeSearch.changeMargin = item + 1;\n refreshMenu();\n }\n });\n return changeBuilder.create();\n case DIALOG_CHANGEPRIORITY:\n final CharSequence[] priorityItems = { getText(R.string.shortTravel), getText(R.string.directRoute) };\n AlertDialog.Builder priorityBuilder = new AlertDialog.Builder(this);\n priorityBuilder.setTitle(R.string.prioritize);\n priorityBuilder.setItems(priorityItems, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int item) {\n if (item == 0) {\n routeSearch.changePunish = 2;\n } else {\n routeSearch.changePunish = 10;\n }\n refreshMenu();\n }\n });\n return priorityBuilder.create();\n case DIALOG_PROPOSALS:\n final CharSequence[] proposalItems = { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n AlertDialog.Builder changeProposals = new AlertDialog.Builder(this);\n changeProposals.setTitle(R.string.setProposals);\n changeProposals.setItems(proposalItems, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int item) {\n switch(item) {\n case 6:\n routeSearch.proposals = 15;\n break;\n case 5:\n routeSearch.proposals = 10;\n break;\n default:\n routeSearch.proposals = item + 1;\n }\n refreshMenu();\n }\n });\n return changeProposals.create();\n }\n return super.onCreateDialog(id);\n}\n"
"private Map<Integer, Double> getRankedTagListSocialBLLHybrid(int userID, Long timesString, double beta, double exponentSocial) {\n Map<Integer, Double> rankedList = new HashMap<Integer, Double>();\n String user = this.users.get(userID);\n List<String> friendList = network.get(user);\n HashMap<Integer, Double> tagRank = new HashMap<Integer, Double>();\n if (friendList != null) {\n for (String friend : friendList) {\n HashMap<Integer, ArrayList<Long>> tagTimestampMap = userTagTimes.get(friend);\n if (tagTimestampMap != null) {\n for (Integer tag : tagTimestampMap.keySet()) {\n ArrayList<Long> timestampList = tagTimestampMap.get(tag);\n for (Long timestampLong : timestampList) {\n if (timesString > timestampLong) {\n long duration = timesString - timestampLong;\n if (tagRank.containsKey(tag)) {\n tagRank.put(tag, tagRank.get(tag) + Math.pow(duration, (-1) * (exponentSocial)));\n } else {\n tagRank.put(tag, Math.pow(duration, (-0.5)));\n }\n }\n }\n }\n }\n }\n }\n double denom = 0.0;\n if (tagRank != null) {\n for (Map.Entry<Integer, Double> entry : tagRank.entrySet()) {\n if (entry != null) {\n double actVal = Math.log(entry.getValue());\n denom += Math.exp(actVal);\n entry.setValue(actVal);\n }\n }\n for (Map.Entry<Integer, Double> entry : tagRank.entrySet()) {\n if (entry != null) {\n double actVal = Math.exp(entry.getValue());\n entry.setValue(actVal / denom);\n }\n }\n }\n Map<Integer, Double> resultMap = this.bllMapTagValues.get(userID);\n Map<Integer, Double> sortedResultMap = new TreeMap<Integer, Double>(new DoubleMapComparator(resultMap));\n sortedResultMap.putAll(resultMap);\n if (userID == 0)\n System.out.println(sortedResultMap);\n sortedResultMap = new TreeMap<Integer, Double>(new DoubleMapComparator(tagRank));\n sortedResultMap.putAll(tagRank);\n if (userID == 0)\n System.out.println(sortedResultMap);\n for (Map.Entry<Integer, Double> entry : tagRank.entrySet()) {\n Double val = resultMap.get(entry.getKey());\n resultMap.put(entry.getKey(), val == null ? (beta) * entry.getValue().doubleValue() : (1 - beta) * val.doubleValue() + (beta) * entry.getValue().doubleValue());\n }\n sortedResultMap = new TreeMap<Integer, Double>(new DoubleMapComparator(resultMap));\n sortedResultMap.putAll(resultMap);\n if (userID == 0) {\n System.out.println(sortedResultMap);\n System.out.println(\"String_Node_Str\");\n }\n return sortedResultMap;\n}\n"
"public static void gracefulRackTopologyOutput(Map<String, String> racksTopology, String filename, String delimeter) throws Exception {\n List<Object> list = new ArrayList<Object>();\n if (racksTopology != null && racksTopology.size() > 0) {\n Iterator<Entry<String, String>> it = racksTopology.entrySet().iterator();\n Map.Entry<String, String> entry = null;\n String vmIP = \"String_Node_Str\";\n String rackPath = \"String_Node_Str\";\n while (it.hasNext()) {\n entry = (Map.Entry<String, String>) it.next();\n vmIP = entry.getKey();\n rackPath = entry.getValue();\n StringBuilder buff = new StringBuilder();\n list.add(buff.append(vmIP).append(\"String_Node_Str\").append(rackPath).toString());\n }\n }\n prettyOutputStrings(list, filename, delimeter);\n}\n"
"public void microaggregate(final int[][] data, final Data bufferOT, final int startMA, final int numMA, final MicroaggregateFunction[] functions) {\n Map<Distribution, Integer> cache = new HashMap<Distribution, Integer>();\n for (int row = 0; row < data.length; row++) {\n if (subset == null || subset.contains(row)) {\n final int[] key = data[row];\n final int hash = HashTableUtil.hashcode(key);\n final int index = hash & (buckets.length - 1);\n HashGroupifyEntry m = buckets[index];\n while ((m != null) && ((m.hashcode != hash) || !equalsIgnoringOutliers(key, m.key))) {\n m = m.next;\n }\n if (m == null) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n Distribution[] dis = m.distributions;\n int cnt = 0;\n for (int i = startMA; i < startMA + numMA; i++) {\n if (!cache.containsKey(dis[i])) {\n String result = functions[cnt].aggregate(dis[i]);\n int code = bufferOT.getDictionary().register(cnt, result);\n cache.put(dis[i], code);\n }\n bufferOT.getArray()[row][cnt] = cache.get(dis[i]);\n cnt++;\n }\n }\n }\n bufferOT.getDictionary().finalizeAll();\n}\n"
"protected boolean playManaHandling(Ability ability, ManaCost unpaid, Game game) {\n boolean spendAnyMana = game.getContinuousEffects().asThough(ability.getSourceId(), AsThoughEffectType.SPEND_OTHER_MANA, ability, ability.getControllerId(), game);\n ManaCost cost;\n List<MageObject> producers;\n if (unpaid instanceof ManaCosts) {\n ManaCosts<ManaCost> manaCosts = (ManaCosts<ManaCost>) unpaid;\n cost = manaCosts.get(manaCosts.size() - 1);\n producers = getSortedProducers((ManaCosts) unpaid, game);\n } else {\n cost = unpaid;\n producers = this.getAvailableManaProducers(game);\n producers.addAll(this.getAvailableManaProducersWithCost(game));\n }\n for (MageObject mageObject : producers) {\n ManaAbility: for (ActivatedManaAbilityImpl manaAbility : mageObject.getAbilities().getAvailableActivatedManaAbilities(Zone.BATTLEFIELD, game)) {\n int colored = 0;\n for (Mana mana : manaAbility.getNetMana(game)) {\n if (!unpaid.getMana().includesMana(mana)) {\n continue ManaAbility;\n }\n colored += mana.countColored();\n }\n if (colored > 1 && (cost instanceof ColoredManaCost)) {\n for (Mana netMana : manaAbility.getNetMana(game)) {\n if (cost.testPay(netMana)) {\n if (activateAbility(manaAbility, game)) {\n return true;\n }\n }\n }\n }\n }\n }\n for (MageObject mageObject : producers) {\n for (ManaAbility manaAbility : mageObject.getAbilities().getAvailableManaAbilities(Zone.BATTLEFIELD, game)) {\n if (cost instanceof ColoredManaCost) {\n for (Mana netMana : manaAbility.getNetMana(game)) {\n if (cost.testPay(netMana) || spendAnyMana) {\n if (activateAbility(manaAbility, game)) {\n return true;\n }\n }\n }\n }\n }\n for (ManaAbility manaAbility : mageObject.getAbilities().getAvailableManaAbilities(Zone.BATTLEFIELD, game)) {\n if (cost instanceof HybridManaCost) {\n for (Mana netMana : manaAbility.getNetMana(game)) {\n if (cost.testPay(netMana) || spendAnyMana) {\n if (activateAbility(manaAbility, game)) {\n return true;\n }\n }\n }\n }\n }\n for (ManaAbility manaAbility : mageObject.getAbilities().getAvailableManaAbilities(Zone.BATTLEFIELD, game)) {\n if (cost instanceof MonoHybridManaCost) {\n for (Mana netMana : manaAbility.getNetMana(game)) {\n if (cost.testPay(netMana) || spendAnyMana) {\n if (activateAbility(manaAbility, game)) {\n return true;\n }\n }\n }\n }\n }\n for (ManaAbility manaAbility : mageObject.getAbilities().getAvailableManaAbilities(Zone.BATTLEFIELD, game)) {\n if (cost instanceof ColorlessManaCost) {\n for (Mana netMana : manaAbility.getNetMana(game)) {\n if (cost.testPay(netMana) || spendAnyMana) {\n if (activateAbility(manaAbility, game)) {\n return true;\n }\n }\n }\n }\n }\n for (ManaAbility manaAbility : mageObject.getAbilities().getAvailableManaAbilities(Zone.BATTLEFIELD, game)) {\n if (cost instanceof GenericManaCost) {\n for (Mana netMana : manaAbility.getNetMana(game)) {\n if (cost.testPay(netMana) || spendAnyMana) {\n if (activateAbility(manaAbility, game)) {\n return true;\n }\n }\n }\n }\n }\n }\n if (cost instanceof PhyrexianManaCost) {\n if (cost.pay(null, game, null, playerId, false, null) || spendAnyMana) {\n return true;\n }\n }\n return false;\n}\n"
"public void run() {\n while ((!isInterrupted()) && (!stopped)) {\n long now = System.currentTimeMillis();\n if (now > (lastChecked + pruneFlushInterval)) {\n try {\n UserGroupInformation.getLoginUser().doAs(new PrivilegedExceptionAction<Void>() {\n\n public Void run() throws Exception {\n while (!pruneEntries.isEmpty()) {\n Map.Entry<byte[], Long> firstEntry = pruneEntries.firstEntry();\n dataJanitorState.savePruneUpperBoundForRegion(firstEntry.getKey(), firstEntry.getValue());\n pruneEntries.remove(firstEntry.getKey(), firstEntry.getValue());\n }\n while (!emptyRegions.isEmpty()) {\n Map.Entry<byte[], Long> firstEntry = emptyRegions.firstEntry();\n dataJanitorState.saveEmptyRegionForTime(firstEntry.getValue(), firstEntry.getKey());\n emptyRegions.remove(firstEntry.getKey(), firstEntry.getValue());\n }\n return null;\n }\n });\n } catch (IOException ex) {\n LOG.warn(\"String_Node_Str\" + tableName.getNameWithNamespaceInclAsString(), ex);\n }\n lastChecked = now;\n }\n try {\n TimeUnit.SECONDS.sleep(1);\n } catch (InterruptedException ex) {\n interrupt();\n break;\n }\n }\n LOG.info(\"String_Node_Str\");\n}\n"
"public static void main(String[] args) throws InterruptedException {\n Configuration CFG = Configuration.getInstance();\n CFG.setProperty(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n CFG.setProperty(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n Symbol symbol = Symbol.FW20M11;\n String name = symbol + \"String_Node_Str\";\n SignalGenerator<Quote> siggen = new MAVD(5, 10, 20);\n Paper paper = new Paper(symbol);\n RealTimeProvider provider = new FakeRealTimeProvider(symbol, null, null);\n final FuturesTrader trader = new FuturesTrader(name, siggen, paper, provider);\n trader.getObserver().setInterval(0);\n trader.getDecisionMaker().setNullHandler(new NullEventHandler() {\n public void handleNull(NullEvent ne) {\n trader.getObserver().stop();\n }\n });\n trader.trade();\n Thread.sleep(20000);\n}\n"
"public void run(AccountManagerFuture<Account[]> future) {\n int samlAccounts = 0;\n try {\n hasSAMLAccount = future.getResult().length > 0;\n } catch (OperationCanceledException e) {\n } catch (IOException e) {\n } catch (AuthenticatorException e) {\n }\n mEnableFallback = !hasSAMLAccount;\n if (mUnlockScreen == null) {\n Log.w(TAG, \"String_Node_Str\");\n } else if (mUnlockScreen instanceof UnlockScreen) {\n ((UnlockScreen) mUnlockScreen).setEnableFallback(true);\n }\n}\n"
"protected void reduce(final WritableComparable<?> key, final Iterable<Writable> values, final Context context) throws IOException, InterruptedException {\n try (CloseableIterator<GeoWaveData> data = ingestWithReducer.toGeoWaveData(key, primaryIndexId, globalVisibility, values)) {\n while (data.hasNext()) {\n final GeoWaveData d = data.next();\n context.write(d.getKey(), d.getValue());\n }\n }\n}\n"
"public boolean equals(Object object) {\n if (!(object instanceof PtidesEvent)) {\n return false;\n }\n PtidesEvent event = (PtidesEvent) object;\n return (super.equals(object) && event.token().equals(_token) && event.isPureEvent() == _isPureEvent && event.receiver() == _receiver && event.channel() == _channel && ((event.isPureEvent() && event.absoluteDeadline().equals(_absoluteDeadline)) || !event.isPureEvent()));\n}\n"
"public void test_termId() throws Exception {\n String[] words = { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n TermIdTrie t = buildSecondTrie(trieWithWords(words));\n Set<Integer> ids = new HashSet<Integer>();\n for (int i = 0; i < words.length; i++) {\n ids.add(i);\n }\n Assert.assertEquals(words.length, ids.size());\n for (String w : words) {\n ids.remove(t.getTermId(w));\n }\n Assert.assertEquals(0, ids.size());\n}\n"
"public void testGetSummoner() throws InterruptedException {\n try {\n Thread.sleep(1500);\n handler.getSummoner(SUMMONER_NAME_2);\n } catch (RequestException ex) {\n System.out.println(\"String_Node_Str\");\n ex.printStackTrace();\n }\n}\n"
"protected void onListItemClick(ListView l, View v, int position, long id) {\n final StationData station = (StationData) stationListAdapter.getItem(position);\n stationSelected(station);\n}\n"
"public void update(GameContainer container, StateBasedGame game, int delta) {\n if (Main.KEYDOWN[Input.KEY_Q] && !blockSelected) {\n inventory.prev();\n blockSelected = true;\n }\n if (Main.KEYDOWN[Input.KEY_E] && !blockSelected) {\n inventory.next();\n blockSelected = true;\n }\n if (!Main.KEYDOWN[Input.KEY_Q] && !Main.KEYDOWN[Input.KEY_E] && blockSelected) {\n blockSelected = false;\n }\n if (Main.KEYDOWN[Input.KEY_UP] || Main.KEYDOWN[Input.KEY_W] || Main.KEYDOWN[Input.KEY_SPACE]) {\n if (character.grounded) {\n character.applyForce(0, -Main.GU * 1600f);\n }\n }\n if (Main.KEYDOWN[Input.KEY_LEFT] || Main.KEYDOWN[Input.KEY_A]) {\n character.body.addForce((new Vector2f(-Main.GU * 200, 0)));\n }\n if (Main.KEYDOWN[Input.KEY_RIGHT] || Main.KEYDOWN[Input.KEY_D]) {\n character.body.addForce((new Vector2f(Main.GU * 200, 0)));\n }\n if (Main.KEYDOWN[Input.KEY_DOWN] || Main.KEYDOWN[Input.KEY_S]) {\n character.body.addForce((new Vector2f(0, Main.GU * 1000)));\n }\n if (Main.KEYDOWN[Input.KEY_UP] || Main.KEYDOWN[Input.KEY_W]) {\n character.body.addForce((new Vector2f(0, -Main.GU * 1000)));\n }\n if (Main.MOUSEDOWN[0]) {\n Block out = inventory.peek();\n fireVector.set(Main.MOUSEX + character.gameworld.viewport.getX() - character.boundingBox.getCenterX(), Main.MOUSEY + character.gameworld.viewport.getY() - character.boundingBox.getCenterY());\n fireVector.normalise();\n fireVector.scale(Main.GU * 6);\n if (out != null && character.gameworld.terrain.getLeaf(character.boundingBox.getCenterX() + fireVector.getX(), character.boundingBox.getCenterY() + fireVector.getY()).type == Block.EMPTY) {\n inventory.pop();\n character.gameworld.terrain.fillCell(character.boundingBox.getCenterX() + fireVector.getX(), character.boundingBox.getCenterY() + fireVector.getY(), out);\n }\n }\n if (Main.MOUSEDOWN[1]) {\n fireVector.set(Main.MOUSEX + character.gameworld.viewport.getX() - character.boundingBox.getCenterX(), Main.MOUSEY + character.gameworld.viewport.getY() - character.boundingBox.getCenterY());\n fireVector.normalise();\n fireVector.scale(Main.GU * 6);\n switch(character.gameworld.terrain.getLeaf(character.boundingBox.getCenterX() + fireVector.getX(), character.boundingBox.getCenterY() + fireVector.getY()).type) {\n case ROCK:\n case RUBBER:\n case WATER:\n inventory.push(character.gameworld.terrain.getLeaf(character.boundingBox.getCenterX() + fireVector.getX(), character.boundingBox.getCenterY() + fireVector.getY()).type);\n case EARTH:\n character.gameworld.terrain.emptyCell(character.boundingBox.getCenterX() + fireVector.getX(), character.boundingBox.getCenterY() + fireVector.getY());\n break;\n default:\n break;\n }\n }\n if (character.body.getPosition().getY() > Main.GU * 48 + character.gameworld.getViewportPosition().getY()) {\n character.gameworld.setViewportPositionGoal(new Vector2f(character.gameworld.getViewportPosition().getX(), character.body.getPosition().getY() - Main.GU * 48));\n }\n if (character.body.getPosition().getY() < Main.GU * 16 + character.gameworld.getViewportPosition().getY()) {\n character.gameworld.setViewportPositionGoal(new Vector2f(character.gameworld.getViewportPosition().getX(), character.body.getPosition().getY() - Main.GU * 16));\n }\n if (character.body.getPosition().getX() > Main.GU * 100 + character.gameworld.getViewportPosition().getX()) {\n character.gameworld.setViewportPositionGoal(new Vector2f(character.body.getPosition().getX() - Main.GU * 100, character.gameworld.getViewportPosition().getY()));\n }\n if (character.body.getPosition().getX() < Main.GU * 16 + character.gameworld.getViewportPosition().getX()) {\n character.gameworld.setViewportPositionGoal(new Vector2f(character.body.getPosition().getX() - Main.GU * 16, character.gameworld.getViewportPosition().getY()));\n }\n if (character.grounded) {\n character.gameworld.setViewportPositionGoal(new Vector2f(character.gameworld.getViewportPosition().getX(), character.body.getPosition().getY() - Main.GU * 48));\n }\n}\n"
"private List<Object> handlePropertyCell(Property dProp, Element cell) {\n Element myOwner = dProp.getOwner();\n List<Object> rSlots = new ArrayList<Object>();\n if (myOwner instanceof Stereotype && StereotypesHelper.hasStereotype(cell, (Stereotype) myOwner)) {\n ValueSpecification pDefault = null;\n if (dProp != null) {\n rSlots.addAll(StereotypesHelper.getStereotypePropertyValue(cell, (Stereotype) myOwner, (Property) dProp));\n pDefault = dProp.getDefaultValue();\n }\n if (rSlots.size() < 1 && pDefault != null) {\n rSlots.add(pDefault);\n }\n return rSlots;\n }\n Collection<Element> rOwned = cell.getOwnedElement();\n for (Object o : rOwned) {\n if (((Element) o) instanceof Property && ((Property) o).getName().equals(dProp.getName())) {\n rSlots.add((Object) ((Property) o).getDefaultValue());\n }\n }\n return rSlots;\n}\n"
"public boolean addResource(Resource resource) {\n if (this.resources == null) {\n this.resources = new HashSet<Resource>();\n return this.resources.add(resource);\n}\n"
"public void triggerTriggerables(TreeReference ref) {\n TreeReference genericRef = ref.genericize();\n Vector triggered = (Vector) triggerIndex.get(genericRef);\n if (triggered == null) {\n return;\n Vector triggeredCopy = new Vector();\n for (int i = 0; i < triggered.size(); i++) triggeredCopy.addElement(triggered.elementAt(i));\n evaluateTriggerables(triggeredCopy, ref);\n}\n"
"public static List<Coord2D> simplify(List<Coord2D> list, double tolerance) {\n int index = 0;\n double dmax = 0;\n double squareTolerance = tolerance * tolerance;\n int lastIndex = list.size() - 1;\n for (int i = 1; i < lastIndex; i++) {\n double d = PointTools.pointToLineDistance(list.get(0), list.get(lastIndex), list.get(i));\n if (d > dmax) {\n index = i;\n dmax = d;\n }\n }\n List<Coord2D> ResultList = new ArrayList<Coord2D>();\n if (dmax > squareTolerance) {\n List<Coord2D> recResults1 = simplify(list.subList(0, index + 1), tolerance);\n List<Coord2D> recResults2 = simplify(list.subList(index, lastIndex + 1), tolerance);\n recResults1.remove(recResults1.size() - 1);\n ResultList.addAll(recResults1);\n ResultList.addAll(recResults2);\n } else {\n ResultList.add(list.get(0));\n ResultList.add(list.get(lastIndex));\n }\n return ResultList;\n}\n"
"public Settings parseSamplerSettings(OsuApiUser apiUser, String message, Language lang) throws UserException, SQLException, IOException {\n String[] remaining = message.split(\"String_Node_Str\");\n Settings settings = new Settings();\n settings.model = Model.GAMMA;\n for (int i = 0; i < remaining.length; i++) {\n String param = remaining[i];\n String lowerCase = param.toLowerCase();\n if (lowerCase.length() == 0)\n continue;\n if (getLevenshteinDistance(lowerCase, \"String_Node_Str\") <= 2) {\n settings.nomod = true;\n continue;\n }\n if (getLevenshteinDistance(lowerCase, \"String_Node_Str\") <= 2) {\n settings.model = Model.ALPHA;\n continue;\n }\n if (getLevenshteinDistance(lowerCase, \"String_Node_Str\") <= 1) {\n settings.model = Model.BETA;\n continue;\n }\n if (getLevenshteinDistance(lowerCase, \"String_Node_Str\") <= 2) {\n settings.model = Model.GAMMA;\n continue;\n }\n if (settings.model == Model.GAMMA && (lowerCase.equals(\"String_Node_Str\") || lowerCase.equals(\"String_Node_Str\"))) {\n settings.requestedMods = Mods.add(settings.requestedMods, Mods.DoubleTime);\n continue;\n }\n if (settings.model == Model.GAMMA && lowerCase.equals(\"String_Node_Str\")) {\n settings.requestedMods = Mods.add(settings.requestedMods, Mods.HardRock);\n continue;\n }\n if (settings.model == Model.GAMMA && lowerCase.equals(\"String_Node_Str\")) {\n settings.requestedMods = Mods.add(settings.requestedMods, Mods.Hidden);\n continue;\n }\n if (settings.model == Model.GAMMA) {\n Long mods = Mods.fromShortNamesContinuous(lowerCase);\n if (mods != null) {\n mods = Mods.fixNC(mods);\n if (mods == (mods & Mods.getMask(Mods.DoubleTime, Mods.HardRock, Mods.Hidden))) {\n for (Mods mod : Mods.getMods(mods)) {\n settings.requestedMods = Mods.add(settings.requestedMods, mod);\n }\n continue;\n }\n }\n }\n if (backend.getDonator(apiUser) > 0) {\n RecommendationPredicate predicate = parser.tryParse(param, lang);\n if (predicate != null) {\n for (RecommendationPredicate existingPredicate : settings.predicates) {\n if (existingPredicate.contradicts(predicate)) {\n throw new UserException(lang.invalidChoice(existingPredicate.getOriginalArgument() + \"String_Node_Str\" + predicate.getOriginalArgument(), \"String_Node_Str\" + existingPredicate.getOriginalArgument() + \"String_Node_Str\" + predicate.getOriginalArgument()));\n }\n }\n settings.predicates.add(predicate);\n continue;\n }\n }\n throw new UserException(lang.invalidChoice(param, \"String_Node_Str\"));\n }\n if (settings.nomod && settings.requestedMods != 0) {\n throw new UserException(lang.mixedNomodAndMods());\n }\n return settings;\n}\n"
"public void handleData(LttngEvent event) {\n super.handleData(event);\n if (event != null) {\n fCheckPointNbEventsHandled++;\n ITmfTrace<?> trace = event.getTrace();\n StateTraceHelper helper = ftraceToManagerMap.get(trace);\n if (helper != null) {\n helper.incrementNumberRead();\n LttngSyntheticEvent synEvent = updateSynEvent(event, helper.getTraceModel());\n helper.getStateManager().handleEvent(synEvent, helper.getNumberRead());\n } else {\n TraceDebug.debug(\"String_Node_Str\" + trace.getName());\n }\n }\n}\n"
"public void assertAbility(Player player, String cardName, Ability ability, boolean flag) throws AssertionError {\n int count = 0;\n Permanent found = null;\n for (Permanent permanent : currentGame.getBattlefield().getAllActivePermanents(player.getId())) {\n if (permanent.getName().equals(cardName)) {\n found = permanent;\n count++;\n }\n }\n Assert.assertNotNull(\"String_Node_Str\" + player.getName() + \"String_Node_Str\" + cardName, found);\n Assert.assertTrue(\"String_Node_Str\" + player.getName() + \"String_Node_Str\" + cardName, count == 1);\n if (flag) {\n Assert.assertTrue(\"String_Node_Str\" + ability.toString() + \"String_Node_Str\" + player.getName() + \"String_Node_Str\" + cardName, found.getAbilities().containsRule(ability));\n } else {\n Assert.assertFalse(\"String_Node_Str\" + ability.toString() + \"String_Node_Str\" + player.getName() + \"String_Node_Str\" + cardName, found.getAbilities().contains(ability));\n }\n}\n"
"public List<Day> getSelectedDays() {\n List<Day> selectedDays = new ArrayList<>();\n for (Iterator<Month> monthIterator = monthAdapter.getData().iterator(); monthIterator.hasNext(); ) {\n Month month = monthIterator.next();\n for (Iterator<Day> dayIterator = month.getDaysWithoutTitlesAndOnlyCurrent().iterator(); dayIterator.hasNext(); ) {\n Day day = dayIterator.next();\n if (selectionManager.isDaySelected(day)) {\n selectedDays.add(day);\n }\n }\n }\n return selectedDays;\n}\n"
"protected void createStudyEvent(FormProcessor fp, StudySubjectBean s) {\n int studyEventDefinitionId = fp.getInt(\"String_Node_Str\");\n String location = fp.getString(\"String_Node_Str\");\n Date startDate = s.getEventStartDate();\n if (studyEventDefinitionId > 0) {\n String locationTerm = resword.getString(\"String_Node_Str\");\n if (location.equalsIgnoreCase(locationTerm)) {\n addPageMessage(restext.getString(\"String_Node_Str\"));\n } else {\n logger.info(\"String_Node_Str\");\n StudyEventDAO sedao = new StudyEventDAO(sm.getDataSource());\n StudyEventDefinitionDAO seddao = new StudyEventDefinitionDAO(sm.getDataSource());\n StudyEventBean se = new StudyEventBean();\n se.setLocation(location);\n se.setDateStarted(startDate);\n se.setDateEnded(startDate);\n se.setOwner(ub);\n se.setStudyEventDefinitionId(studyEventDefinitionId);\n se.setStatus(Status.AVAILABLE);\n se.setStudySubjectId(s.getId());\n se.setSubjectEventStatus(SubjectEventStatus.SCHEDULED);\n StudyEventDefinitionBean sed = (StudyEventDefinitionBean) seddao.findByPK(studyEventDefinitionId);\n se.setSampleOrdinal(sedao.getMaxSampleOrdinal(sed, s) + 1);\n sedao.create(se);\n }\n } else {\n addPageMessage(respage.getString(\"String_Node_Str\"));\n }\n}\n"
"private AggregatesScanResult findNextResult() {\n while (currentTag != null && currentTag.hasNext()) {\n Map.Entry<byte[], byte[]> tagValue = currentTag.next();\n String tag = Bytes.toString(tagValue.getKey());\n if (tagPrefix != null && !tag.startsWith(tagPrefix)) {\n continue;\n }\n if (MetricsConstants.EMPTY_TAG.equals(tag)) {\n tag = null;\n }\n return new AggregatesScanResult(context, metric, rid, tag, Bytes.toLong(tagValue.getValue()));\n }\n return null;\n}\n"
"public Parcelable onSaveInstanceState() {\n if (DEBUG)\n Log.d(TAG, \"String_Node_Str\" + mTransportState);\n Parcelable superState = super.onSaveInstanceState();\n SavedState ss = new SavedState(superState);\n ss.transportState = mTransportState;\n ss.appWidgetToShow = mAppWidgetToShow;\n return ss;\n}\n"
"public static boolean updateFileConnection(ConnectionItem connectionItem, boolean show, boolean onlySimpleShow) {\n List<Relation> relations = RelationshipItemBuilder.getInstance().getItemsRelatedTo(connectionItem.getProperty().getId(), RelationshipItemBuilder.LATEST_VERSION, RelationshipItemBuilder.PROPERTY_RELATION);\n RepositoryUpdateManager repositoryUpdateManager = new RepositoryUpdateManager(connectionItem, relations) {\n\n public Set<EUpdateItemType> getTypes() {\n Set<EUpdateItemType> types = new HashSet<EUpdateItemType>();\n types.add(EUpdateItemType.NODE_PROPERTY);\n types.add(EUpdateItemType.NODE_SCHEMA);\n types.add(EUpdateItemType.JOB_PROPERTY_HEADERFOOTER);\n types.add(EUpdateItemType.NODE_SAP_IDOC);\n return types;\n }\n };\n return repositoryUpdateManager.doWork(show, onlySimpleShow);\n}\n"
"public void setShow(final Show value) {\n setTextToChild(\"String_Node_Str\", value != null && value != Show.notSpecified && value != Show.unknown ? value.toString() : null);\n}\n"
"public String getScriptOptions(UIComponent component) {\n Map<String, Object> attributes = component.getAttributes();\n Map<String, Object> options = new HashMap<String, Object>();\n RendererUtils utils = getUtils();\n utils.addToScriptHash(options, \"String_Node_Str\", component.getClientId() + \"String_Node_Str\");\n utils.addToScriptHash(options, \"String_Node_Str\", attributes.get(\"String_Node_Str\"));\n utils.addToScriptHash(options, \"String_Node_Str\", attributes.get(\"String_Node_Str\"), \"String_Node_Str\");\n utils.addToScriptHash(options, \"String_Node_Str\", attributes.get(\"String_Node_Str\"), \"String_Node_Str\");\n utils.addToScriptHash(options, \"String_Node_Str\", attributes.get(\"String_Node_Str\"));\n utils.addToScriptHash(options, \"String_Node_Str\", attributes.get(\"String_Node_Str\"), \"String_Node_Str\");\n utils.addToScriptHash(options, \"String_Node_Str\", attributes.get(\"String_Node_Str\"), \"String_Node_Str\");\n utils.addToScriptHash(options, \"String_Node_Str\", attributes.get(\"String_Node_Str\"), \"String_Node_Str\");\n utils.addToScriptHash(options, \"String_Node_Str\", attributes.get(\"String_Node_Str\"));\n utils.addToScriptHash(options, \"String_Node_Str\", attributes.get(\"String_Node_Str\"));\n utils.addToScriptHash(options, \"String_Node_Str\", attributes.get(\"String_Node_Str\"));\n utils.addToScriptHash(options, \"String_Node_Str\", attributes.get(\"String_Node_Str\"));\n utils.addToScriptHash(options, \"String_Node_Str\", attributes.get(\"String_Node_Str\"));\n utils.addToScriptHash(options, \"String_Node_Str\", attributes.get(\"String_Node_Str\"));\n String mode = (String) attributes.get(\"String_Node_Str\");\n if (mode != null) {\n if (mode.equals(\"String_Node_Str\")) {\n utils.addToScriptHash(options, \"String_Node_Str\", false, \"String_Node_Str\");\n } else if (attributes.get(\"String_Node_Str\").equals(\"String_Node_Str\")) {\n utils.addToScriptHash(options, \"String_Node_Str\", false, \"String_Node_Str\");\n }\n }\n StringBuilder builder = new StringBuilder();\n builder.append(ScriptUtils.toScript(options));\n return builder.toString();\n}\n"
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_friend_details);\n avatarImageView = _findViewById(R.id.avatarImageView);\n nameTextView = _findViewById(R.id.nameTextView);\n onlineImageView = _findViewById(R.id.onlineImageView);\n onlineStatusTextView = _findViewById(R.id.onlineStatusTextView);\n phoneTextView = _findViewById(R.id.phoneTextView);\n phoneView = _findViewById(R.id.phoneView);\n addAction(QBServiceConsts.REMOVE_FRIEND_SUCCESS_ACTION, new RemoveFriendSuccessAction());\n addAction(QBServiceConsts.REMOVE_FRIEND_FAIL_ACTION, failAction);\n addAction(QBServiceConsts.GET_FILE_FAIL_ACTION, failAction);\n updateBroadcastActionList();\n friend = (Friend) getIntent().getExtras().getSerializable(EXTRA_FRIEND);\n initFriendsFields(friend);\n}\n"
"public String parseKeywords(Analyzer analyzer, String keywords) {\n System.out.println(keywords);\n StringBuilder sb = new StringBuilder(\"String_Node_Str\");\n try {\n TokenStream tokenStream = analyzer.tokenStream(null, new StringReader(keywords));\n CharTermAttribute cattr = tokenStream.addAttribute(CharTermAttribute.class);\n tokenStream.reset();\n sb.append(\"String_Node_Str\");\n while (tokenStream.incrementToken()) {\n if (cattr.toString().length() == 0)\n continue;\n sb.append(cattr.toString());\n sb.append(\"String_Node_Str\");\n }\n tokenStream.end();\n tokenStream.close();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n return sb.toString();\n}\n"
"public void setParents(List<String> parents, String worldName) {\n this.node.set(formatPath(worldName, parentPath), parents == null ? null : new ArrayList<>(parents));\n save();\n}\n"
"public static FileAccessService getFileAccessService() {\n if (fileAccessService == null) {\n fileAccessService = ServiceUtils.getService(bundleContext, FileAccessService.class);\n }\n return fileAccessService;\n}\n"
"public void visitMethodCallNode(ASTPtMethodCallNode node) throws IllegalActionException {\n _debug(node);\n int argCount = node.jjtGetNumChildren();\n _generateAllChildren(node);\n ptolemy.data.type.Type baseTokenType = ((ASTPtRootNode) node.jjtGetChild(0)).getType();\n if (argCount == 1 && baseTokenType instanceof RecordType) {\n RecordType type = (RecordType) baseTokenType;\n if (type.labelSet().contains(node.getMethodName())) {\n Local originalBaseLocal = (Local) _nodeToLocal.get(node.jjtGetChild(0));\n Local baseLocal = Jimple.v().newLocal(\"String_Node_Str\", RefType.v(PtolemyUtilities.recordTokenClass));\n _body.getLocals().add(baseLocal);\n _units.insertBefore(Jimple.v().newAssignStmt(baseLocal, Jimple.v().newCastExpr(originalBaseLocal, RefType.v(PtolemyUtilities.recordTokenClass))), _insertPoint);\n Local returnLocal = Jimple.v().newLocal(\"String_Node_Str\", RefType.v(PtolemyUtilities.tokenClass));\n _body.getLocals().add(returnLocal);\n _units.insertBefore(Jimple.v().newAssignStmt(returnLocal, Jimple.v().newVirtualInvokeExpr(baseLocal, PtolemyUtilities.recordGetMethod, StringConstant.v(node.getMethodName()))), _insertPoint);\n _nodeToLocal.put(node, returnLocal);\n return;\n }\n }\n ptolemy.data.type.Type[] argTypes = new ptolemy.data.type.Type[node.jjtGetNumChildren()];\n for (int i = 0; i < node.jjtGetNumChildren(); i++) {\n argTypes[i] = ((ASTPtRootNode) node.jjtGetChild(i)).getType();\n }\n CachedMethod cachedMethod = CachedMethod.findMethod(node.getMethodName(), argTypes, CachedMethod.METHOD);\n if (!cachedMethod.isValid()) {\n throw new IllegalActionException(\"String_Node_Str\" + cachedMethod + \"String_Node_Str\");\n }\n if (cachedMethod instanceof CachedMethod.ArrayMapCachedMethod || cachedMethod instanceof CachedMethod.MatrixMapCachedMethod) {\n throw new IllegalActionException(\"String_Node_Str\" + cachedMethod.getClass());\n }\n Method method = cachedMethod.getMethod();\n SootMethod sootMethod = SootUtilities.getSootMethodForMethod(method);\n Local originalBaseLocal = (Local) _nodeToLocal.get(node.jjtGetChild(0));\n RefType baseType = RefType.v(sootMethod.getDeclaringClass());\n Local baseLocal = Jimple.v().newLocal(\"String_Node_Str\", baseType);\n _body.getLocals().add(baseLocal);\n if (cachedMethod instanceof CachedMethod.BaseConvertCachedMethod) {\n RefType tempBaseType = PtolemyUtilities.getSootTypeForTokenType(argTypes[0]);\n Local tempBaseLocal = _convertTokenArgToJavaArg(originalBaseLocal, argTypes[0], ((CachedMethod.BaseConvertCachedMethod) cachedMethod).getBaseConversion());\n _units.insertBefore(Jimple.v().newAssignStmt(baseLocal, Jimple.v().newCastExpr(tempBaseLocal, baseType)), _insertPoint);\n } else {\n _units.insertBefore(Jimple.v().newAssignStmt(baseLocal, Jimple.v().newCastExpr(originalBaseLocal, baseType)), _insertPoint);\n }\n List args = new LinkedList();\n CachedMethod.ArgumentConversion[] conversions = cachedMethod.getConversions();\n for (int i = 1; i < node.jjtGetNumChildren(); i++) {\n Local tokenLocal = (Local) _nodeToLocal.get(node.jjtGetChild(i));\n Local argLocal = _convertTokenArgToJavaArg(tokenLocal, argTypes[i], conversions[i - 1]);\n args.add(argLocal);\n }\n Type returnType = sootMethod.getReturnType();\n Local returnLocal = Jimple.v().newLocal(\"String_Node_Str\", returnType);\n _body.getLocals().add(returnLocal);\n _units.insertBefore(Jimple.v().newAssignStmt(returnLocal, Jimple.v().newVirtualInvokeExpr(baseLocal, sootMethod, args)), _insertPoint);\n Local tokenLocal = _convertJavaResultToToken(returnLocal, returnType);\n _nodeToLocal.put(node, tokenLocal);\n}\n"
"public static String replaceVars(String msg, String[] vars) {\n for (String str : vars) {\n String[] s = str.split(\"String_Node_Str\");\n varcache.put(s[0], s[1]);\n }\n for (String str : varcache.keySet()) {\n try {\n msg = msg.replace(\"String_Node_Str\" + str + \"String_Node_Str\", varcache.get(str));\n } catch (Exception e) {\n SurvivalGames.$(Level.WARNING, \"String_Node_Str\" + str);\n }\n }\n return msg;\n}\n"
"public Iterable<NextWordsContainer> loadStoredNextWords() {\n FileInputStream inputStream = null;\n try {\n inputStream = mContext.openFileInput(mNextWordsStorageFilename);\n final int version = inputStream.read();\n if (version < 1) {\n Log.w(TAG, \"String_Node_Str\" + mNextWordsStorageFilename);\n return Collections.emptyList();\n }\n final NextWordsFileParser parser;\n switch(version) {\n case 1:\n parser = new NextWordsFileParserV1();\n break;\n default:\n Log.w(TAG, String.format(\"String_Node_Str\", version));\n return Collections.emptyList();\n }\n return parser.loadStoredNextWords(inputStream);\n } catch (FileNotFoundException e) {\n Log.w(TAG, e);\n Log.w(TAG, String.format(\"String_Node_Str\", mNextWordsStorageFilename));\n return Collections.emptyList();\n } catch (IOException e) {\n Log.w(TAG, e);\n Log.w(TAG, String.format(\"String_Node_Str\", mNextWordsStorageFilename));\n return Collections.emptyList();\n } finally {\n if (inputStream != null)\n try {\n inputStream.close();\n } catch (IOException e) {\n }\n }\n}\n"
"protected void prepareContentRect() {\n super.prepareContentRect();\n if (mDataNotSet)\n return;\n float width = mContentRect.width() + mOffsetLeft + mOffsetRight;\n float height = mContentRect.height() + mOffsetTop + mOffsetBottom;\n float diameter = getDiameter();\n float boxSize = diameter / 2f;\n PointF c = getCenterOffsets();\n mCircleBox.set(c.x - boxSize, c.y - boxSize, c.x + boxSize, c.y + boxSize);\n}\n"
"public void setCost(String c) {\n if (c.substring(0, 1).equals(\"String_Node_Str\")) {\n c = c.substring(1, c.length());\n }\n try {\n NumberFormat format = NumberFormat.getInstance(Locale.getDefault());\n Number number = format.parse(c.trim());\n costPerU = number.doubleValue();\n } catch (NumberFormatException m) {\n Debug.print(\"String_Node_Str\" + c);\n }\n}\n"
"public static void addIssue(FhirContext theCtx, IBaseOperationOutcome theOperationOutcome, String theSeverity, String theDetails, String theLocation) {\n IBase issue = createIssue(theCtx, theOperationOutcome);\n populateDetails(theCtx, issue, theSeverity, theDetails, theLocation, theCode);\n}\n"