content
stringlengths
40
137k
"public void setCurrentJson() {\n Model cModel = getCurrentModel();\n if (cModel != null && mapModelsToJsons.containsKey(cModel)) {\n currentJson = mapModelsToJsons.get(cModel);\n JSONObject msg = currentJson.createSetCurrentModelJson();\n websocketdb.broadcastMessageJson(msg, null);\n if (debugLevel > 1)\n System.out.println(msg.toJSONString());\n }\n}\n"
"public Short getCidOfEClass(EClass eClass) {\n return eClassToCid.get(eClass);\n}\n"
"public SimpleToolWindowPanel createToolWindowContent(final Project project) {\n this.project = project;\n changeListPanel.registerChangeListPanel(this);\n diffManager.registerDiffTool(commentsDiffTool);\n SimpleToolWindowPanel panel = new SimpleToolWindowPanel(true, true);\n ActionToolbar toolbar = createToolbar(project);\n toolbar.setTargetComponent(changeListPanel);\n panel.setToolbar(toolbar.getComponent());\n RepositoryChangesBrowser repositoryChangesBrowser = repositoryChangesBrowserProvider.get(project, changeListPanel);\n Splitter detailsSplitter = new Splitter(true, 0.6f);\n detailsSplitter.setShowDividerControls(true);\n changeListPanel.setBorder(IdeBorderFactory.createBorder(SideBorder.TOP | SideBorder.RIGHT | SideBorder.BOTTOM));\n detailsSplitter.setFirstComponent(changeListPanel);\n detailsPanel = new GerritChangeDetailsPanel(project);\n changeListPanel.addListSelectionListener(new Consumer<ChangeInfo>() {\n public void consume(ChangeInfo changeInfo) {\n changeSelected(changeInfo, project);\n }\n });\n JPanel details = detailsPanel.getComponent();\n details.setBorder(IdeBorderFactory.createBorder(SideBorder.TOP | SideBorder.RIGHT));\n detailsSplitter.setSecondComponent(details);\n Splitter horizontalSplitter = new Splitter(false, 0.7f);\n horizontalSplitter.setShowDividerControls(true);\n horizontalSplitter.setFirstComponent(detailsSplitter);\n horizontalSplitter.setSecondComponent(repositoryChangesBrowser);\n panel.setContent(horizontalSplitter);\n reloadChanges(project, false);\n return panel;\n}\n"
"public void forwardMessage(int value) {\n if (value == 0) {\n System.out.println(id);\n System.exit(0);\n } else {\n value--;\n StageService.sendMessage(next, 4, new Object[] { value });\n }\n}\n"
"public String getVariableValueString(int index) {\n String result = \"String_Node_Str\";\n for (BitSet var : variables) {\n for (int i = 0; i < problem.getNumberOfBits(i); i++) {\n if (var.get(i)) {\n result += \"String_Node_Str\";\n } else {\n result += \"String_Node_Str\";\n }\n }\n result += \"String_Node_Str\";\n }\n return result;\n}\n"
"void shiftPc(int where, int gapLength, boolean exclusive) {\n int n = tableLength();\n for (int i = 0; i < n; ++i) {\n int pos = i * 10 + 2;\n int pc = ByteArray.readU16bit(info, pos);\n int len = ByteArray.readU16bit(info, pos + 2);\n if (pc > where || (exclusive && pc == where && pc != 0))\n ByteArray.write16bit(pc + gapLength, info, pos);\n else if (pc + len > where)\n ByteArray.write16bit(len + gapLength, info, pos + 2);\n }\n}\n"
"public List<AgentStat> aggregate() {\n if (stats.isEmpty()) {\n return stats;\n }\n List<AgentStat> result = new ArrayList<>();\n AgentStat current = toAggregatedAgentStat(stats.get(0));\n for (AgentStat stat : stats.subList(1, stats.size())) {\n long timestamp = toAggregatedTimestamp(stat, interval);\n if (current.getTimestamp() == timestamp) {\n current = merge(current, stat, interval);\n } else {\n result.add(current);\n current = toAggregatedAgentStat(stat);\n }\n }\n result.add(current);\n return result;\n}\n"
"private static long diffSecond(Date d1, Date d2) {\n if (d1 == null || d2 == null) {\n throw new java.lang.IllegalArgumentException(Messages.getString(\"String_Node_Str\"));\n }\n long diff = d2.getTime() - d1.getTime();\n if (timeZone != null && timeZone.inDaylightTime(d1))\n diff -= timeZone.getDSTSavings();\n if (timeZone.inDaylightTime(d2))\n diff += timeZone.getDSTSavings();\n return (new Long(diff / 1000)).longValue();\n}\n"
"private void updateGoButton() {\n if (mCurrentWebView.isLoading()) {\n mGoButton.setImageResource(R.drawable.ic_btn_stop);\n mUrlEditText.setCompoundDrawables(getNormalizedFavicon(), null, mCircularProgress, null);\n ((AnimationDrawable) mCircularProgress).start();\n } else {\n mGoButton.setImageResource(R.drawable.ic_btn_go);\n mUrlEditText.setCompoundDrawablesWithIntrinsicBounds(new BitmapDrawable(mCurrentWebView.getFavicon()), null, null, null);\n ((AnimationDrawable) mCircularProgress).stop();\n }\n}\n"
"private void createPermissionPanel() {\n Permissions permissions = aip.getPermissions();\n GWT.log(\"String_Node_Str\" + permissions);\n for (String username : permissions.getUsernames()) {\n permissionsPanel.add(new PermissionPanel(username, true, permissions.getUserPermissions(username)));\n }\n for (String groupname : permissions.getGroupnames()) {\n permissionsPanel.add(new PermissionPanel(groupname, false, permissions.getGroupPermissions(groupname)));\n }\n}\n"
"public void accept(Visitor<Contract> visitor) {\n boolean descend = visitor.preVisit(this);\n if (descend) {\n if (visitor.preVisit(this)) {\n for (Contract c : this.input1) {\n c.accept(visitor);\n }\n for (Contract c : this.input2) {\n c.accept(visitor);\n }\n }\n visitor.postVisit(this);\n }\n}\n"
"public void onServiceDisconnected(int profile) {\n switch(profile) {\n case BluetoothProfile.A2DP:\n synchronized (mConnectedDevices) {\n synchronized (mA2dpAvrcpLock) {\n for (int i = 0; i < mConnectedDevices.size(); i++) {\n DeviceListSpec deviceSpec = mConnectedDevices.valueAt(i);\n if (deviceSpec.mDeviceType == AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP) {\n makeA2dpDeviceUnavailableNow(deviceSpec.mDeviceAddress);\n }\n }\n }\n }\n break;\n case BluetoothProfile.A2DP_SINK:\n synchronized (mConnectedDevices) {\n for (Map.Entry<String, DeviceListSpec> entry : mConnectedDevices.entrySet()) {\n DeviceListSpec deviceSpec = entry.getValue();\n if (deviceSpec.mDeviceType == AudioSystem.DEVICE_IN_BLUETOOTH_A2DP) {\n makeA2dpSrcUnavailable(deviceSpec.mDeviceAddress);\n }\n }\n }\n break;\n case BluetoothProfile.HEADSET:\n synchronized (mScoClients) {\n mBluetoothHeadset = null;\n }\n break;\n default:\n break;\n }\n}\n"
"private int handleExecutorService(MemberStateImpl memberState, int count, Config config, Map<String, LocalExecutorStats> executorServices) {\n for (Map.Entry<String, LocalExecutorStats> entry : executorServices.entrySet()) {\n String name = entry.getKey();\n if (count >= maxVisibleInstanceCount) {\n break;\n } else if (config.findExecutorConfig(name).isStatisticsEnabled()) {\n memberState.putLocalExecutorStats(name, executorServices.get(name));\n ++count;\n }\n }\n return count;\n}\n"
"public double computeF(double l, double ldot, double l0, double excitation) {\n double lenOpt = myOptLength;\n double lenRat = l / lenOpt;\n double lenUpperLim = 1.6 * lenOpt;\n double lenLowerLim = 0.4 * lenOpt;\n double fact = 0;\n double fpas = 0;\n double P1 = myExpStressCoeff;\n double P2 = myUncrimpingFactor;\n if (!myP3P4Valid) {\n myP3 = P1 * P2 * Math.exp(P2 * (myMaxLength / lenOpt - 1));\n myP4 = P1 * (Math.exp(P2 * (myMaxLength / lenOpt - 1)) - 1) - myP3 * myMaxLength / lenOpt;\n myP3P4Valid = true;\n }\n if (myZeroForceBelowLenOptP && l <= lenOpt) {\n fpas = 0;\n } else if (l <= myMaxLength) {\n fpas = P1 * (Math.exp(P2 * (lenRat - 1)) - 1);\n } else {\n fpas = myP3 * lenRat + myP4;\n }\n if (l <= 0.6 * lenOpt) {\n fact = 9 * square(lenRat - 0.4);\n } else if (l < 1.4 * lenOpt) {\n fact = 1 - 4 * square(1 - lenRat);\n } else {\n fact = 9 * square(lenRat - 1.6);\n }\n if (l < lenLowerLim || l > lenUpperLim) {\n fact = 0;\n }\n return myMaxForce * (fpas + excitation * fact);\n}\n"
"public void notifyTemperature(boolean enable) {\n if (isConnected())\n queue.enqueueNotify(getFlowerPowerService().getCharacteristic(UUID.fromString(FlowerPowerConstants.CHARACTERISTIC_UUID_TEMPERATURE)), enable);\n}\n"
"private static String getEmote(Guild guild, int count, String emote) {\n if (!(emote.startsWith(\"String_Node_Str\")))\n return guild.getEmoteById(emote).getAsMention();\n if (count < 5)\n return \"String_Node_Str\";\n else if (count > 5)\n return \"String_Node_Str\";\n else if (count > 15)\n return \"String_Node_Str\";\n else\n return \"String_Node_Str\";\n}\n"
"public void executeScheduledTasks() {\n final LocalDate date = dateTimeProvider.getCurrentDate();\n final String hostName = Hosts.getLocalHost().getHostName();\n for (final DailyScheduledTask task : scheduledTasks) {\n final String taskName = task.getClass().getSimpleName();\n if (!acquireDailyTask(date, taskName, hostName)) {\n continue;\n }\n final Stopwatch stopwatch = new Stopwatch().start();\n try {\n LOGGER.debug(\"String_Node_Str\", task);\n task.run();\n internalsTemplate.update(\"String_Node_Str\", System.currentTimeMillis(), date, taskName);\n } catch (RuntimeException e) {\n LOGGER.error(\"String_Node_Str\", task, e);\n } finally {\n LOGGER.info(\"String_Node_Str\", task, stopwatch.stop());\n }\n }\n final int deletedRows = internalsTemplate.update(\"String_Node_Str\", date);\n LOGGER.info(\"String_Node_Str\", date, deletedRows);\n}\n"
"public void testValidateNodes11() throws DataException {\n ExprManager em = new ExprManager(null);\n Map m = new HashMap();\n m.put(\"String_Node_Str\", new ScriptExpression(\"String_Node_Str\"));\n m.put(\"String_Node_Str\", new ScriptExpression(\"String_Node_Str\"));\n m.put(\"String_Node_Str\", new ScriptExpression(\"String_Node_Str\"));\n m.put(\"String_Node_Str\", new ScriptExpression(\"String_Node_Str\"));\n m.put(\"String_Node_Str\", new ScriptExpression(\"String_Node_Str\"));\n m.put(\"String_Node_Str\", new ConditionalExpression(\"String_Node_Str\", IConditionalExpression.OP_EQ, \"String_Node_Str\"));\n em.addBindingExpr(null, m, 0);\n try {\n ExprManagerUtil.validateColumnBinding(em);\n fail(\"String_Node_Str\");\n } catch (DataException e) {\n }\n}\n"
"protected int indexOf(Object obj) {\n if (_indexCache.isEmpty()) {\n reindex();\n }\n return -1;\n}\n"
"private BaseFont createBaseFont(String physicalFont) {\n BaseFont font = (BaseFont) fonts.get(physicalFont);\n if (font == null) {\n font = fontManager.createFont(physicalFont, fontStyle);\n fonts.put(physicalFont, font);\n }\n return font;\n}\n"
"public static void main(String[] args) throws IOException, StructureException, InterruptedException, ExecutionException {\n List<String> names = Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n AtomCache cache = new AtomCache();\n List<Atom[]> atomArrays = new ArrayList<Atom[]>();\n for (String name : names) {\n atomArrays.add(cache.getAtoms(name));\n }\n StructureAlignment pairwise = new FatCatFlexible();\n MultipleMcMain algorithm = new MultipleMcMain(pairwise);\n MultipleMcParameters params = (MultipleMcParameters) algorithm.getParameters();\n params.setMinBlockLen(10);\n MultipleAlignment result = algorithm.align(atomArrays);\n result.getEnsemble().setStructureNames(names);\n result.getEnsemble().setAlgorithmName(algorithm.getAlgorithmName());\n result.getEnsemble().setVersion(algorithm.getVersion());\n MultipleAlignmentDisplay.display(result);\n}\n"
"protected void addItem(String parentCategory, ItemTreeItem newItem) throws NullPointerException {\n categories.get(parentCategory.toLowerCase()).addItem(newItem);\n if (itemsByName.containsKey(newItem.getName())) {\n itemsByName.get(newItem.getName()).add(newItem);\n } else {\n Vector<ItemTreeItem> list = new Vector<ItemTreeItem>();\n list.add(newItem);\n itemsByName.put(newItem.getName(), list);\n }\n if (itemsById.containsKey(newItem.getId())) {\n itemsById.get(newItem.getId()).add(newItem);\n } else {\n Vector<ItemTreeItem> list = new Vector<ItemTreeItem>();\n list.add(newItem);\n itemsById.put(newItem.getId(), list);\n }\n}\n"
"public Identity getIdentity(String identityId, boolean forceLoadOrReloadProfile) {\n Identity cachedIdentity = identityCacheById.get(identityId);\n if (cachedIdentity != null && !forceLoadOrReloadProfile) {\n return cachedIdentity;\n }\n Identity foundIdentity = super.getIdentity(identityId, forceLoadOrReloadProfile);\n if (foundIdentity != null) {\n identityCacheById.put(identityId, foundIdentity);\n cachedIdentity = foundIdentity;\n }\n return cachedIdentity;\n}\n"
"private static MapKeyLookupResult getContextMapKey(ClassLoader classLoader, String classLoaderName) {\n if (classLoaderName.startsWith(OC4J_CLASSLOADER_NAME)) {\n if ((classLoader.getParent() != null) && ((classLoader.toString().indexOf(SDOConstants.CLASSLOADER_WEB_FRAGMENT) != -1) || (classLoader.toString().indexOf(SDOConstants.CLASSLOADER_EJB_FRAGMENT) != -1))) {\n classLoader = classLoader.getParent();\n }\n return new MapKeyLookupResult(classLoader);\n }\n if (classLoaderName.contains(WLS_CLASSLOADER_NAME)) {\n if (null == applicationAccessWLS) {\n applicationAccessWLS = new ApplicationAccessWLS();\n }\n Object appName = applicationAccessWLS.getApplicationName(classLoader);\n if (appName != null) {\n return new MapKeyLookupResult(appName.toString(), classLoader);\n }\n Object executeThread = getExecuteThread();\n if (executeThread != null) {\n try {\n Method getMethod = PrivilegedAccessHelper.getPublicMethod(executeThread.getClass(), WLS_APPLICATION_NAME_GET_METHOD_NAME, WLS_PARAMETER_TYPES, false);\n appName = PrivilegedAccessHelper.invokeMethod(getMethod, executeThread);\n } catch (Exception e) {\n throw SDOException.errorInvokingWLSMethodReflectively(WLS_APPLICATION_NAME_GET_METHOD_NAME, WLS_EXECUTE_THREAD, e);\n }\n }\n if (appName == null && appResolver != null) {\n appName = appResolver.getApplicationName();\n }\n if (appName != null) {\n return new MapKeyLookupResult(appName.toString(), classLoader);\n }\n return new MapKeyLookupResult(classLoader);\n }\n if (classLoaderName.contains(WAS_CLASSLOADER_NAME)) {\n return getContextMapKeyForWAS(classLoader);\n }\n if (classLoaderName.contains(JBOSS_CLASSLOADER_NAME)) {\n return getContextMapKeyForJBoss(classLoader);\n }\n return new MapKeyLookupResult(classLoader);\n}\n"
"private void computeTileStackForNormalProduct(final Map<Band, Tile> targetTileMap, Rectangle targetRectangle, final ProgressMonitor pm) throws OperatorException {\n try {\n final int rgOffset = (cohWinRg - 1) / 2;\n final int azOffset = (cohWinAz - 1) / 2;\n final int cohx0 = targetRectangle.x - rgOffset;\n final int cohy0 = targetRectangle.y - azOffset;\n final int cohw = targetRectangle.width + cohWinRg - 1;\n final int cohh = targetRectangle.height + cohWinAz - 1;\n targetRectangle = new Rectangle(cohx0, cohy0, cohw, cohh);\n final BorderExtender border = BorderExtender.createInstance(BorderExtender.BORDER_ZERO);\n final int y0 = targetRectangle.y;\n final int yN = y0 + targetRectangle.height - 1;\n final int x0 = targetRectangle.x;\n final int xN = targetRectangle.x + targetRectangle.width - 1;\n for (String ifgKey : targetMap.keySet()) {\n final ProductContainer product = targetMap.get(ifgKey);\n final Tile mstTileReal = getSourceTile(product.sourceMaster.realBand, targetRectangle, border);\n final Tile mstTileImag = getSourceTile(product.sourceMaster.imagBand, targetRectangle, border);\n final ComplexDoubleMatrix dataMaster = TileUtilsDoris.pullComplexDoubleMatrix(mstTileReal, mstTileImag);\n final Tile slvTileReal = getSourceTile(product.sourceSlave.realBand, targetRectangle, border);\n final Tile slvTileImag = getSourceTile(product.sourceSlave.imagBand, targetRectangle, border);\n final ComplexDoubleMatrix dataSlave = TileUtilsDoris.pullComplexDoubleMatrix(slvTileReal, slvTileImag);\n ComplexDoubleMatrix dataMaster2 = null, dataSlave2 = null;\n if (includeCoherence) {\n dataMaster2 = new ComplexDoubleMatrix(mstTileReal.getHeight(), mstTileReal.getWidth());\n dataSlave2 = new ComplexDoubleMatrix(slvTileReal.getHeight(), slvTileReal.getWidth());\n dataMaster2.copy(dataMaster);\n dataSlave2.copy(dataSlave);\n }\n if (subtractFlatEarthPhase) {\n DoubleMatrix rangeAxisNormalized = DoubleMatrix.linspace(x0, xN, dataMaster.columns);\n rangeAxisNormalized = normalizeDoubleMatrix(rangeAxisNormalized, 0, sourceImageWidth - 1);\n DoubleMatrix azimuthAxisNormalized = DoubleMatrix.linspace(y0, yN, dataMaster.rows);\n azimuthAxisNormalized = normalizeDoubleMatrix(azimuthAxisNormalized, 0, sourceImageHeight - 1);\n final DoubleMatrix polyCoeffs = flatEarthPolyMap.get(product.sourceSlave.name);\n final DoubleMatrix realReferencePhase = PolyUtils.polyval(azimuthAxisNormalized, rangeAxisNormalized, polyCoeffs, PolyUtils.degreeFromCoefficients(polyCoeffs.length));\n final ComplexDoubleMatrix complexReferencePhase = new ComplexDoubleMatrix(MatrixFunctions.cos(realReferencePhase), MatrixFunctions.sin(realReferencePhase));\n dataSlave.muli(complexReferencePhase);\n }\n dataMaster.muli(dataSlave.conji());\n final Band targetBand_I = targetProduct.getBand(product.getBandName(Unit.REAL));\n final Tile tileOutReal = targetTileMap.get(targetBand_I);\n final Band targetBand_Q = targetProduct.getBand(product.getBandName(Unit.IMAGINARY));\n final Tile tileOutImag = targetTileMap.get(targetBand_Q);\n DoubleMatrix cohMatrix = null;\n ProductData samplesCoh = null;\n if (includeCoherence) {\n for (int i = 0; i < dataMaster.length; i++) {\n double tmp = norm(dataMaster2.get(i));\n dataMaster2.put(i, dataMaster2.get(i).mul(dataSlave2.get(i).conj()));\n dataSlave2.put(i, new ComplexDouble(norm(dataSlave2.get(i)), tmp));\n }\n cohMatrix = SarUtils.coherence2(dataMaster2, dataSlave2, cohWinAz, cohWinRg);\n final Band targetBandCoh = targetProduct.getBand(product.getBandName(Unit.COHERENCE));\n final Tile tileOutCoh = targetTileMap.get(targetBandCoh);\n samplesCoh = tileOutCoh.getDataBuffer();\n }\n final ProductData samplesReal = tileOutReal.getDataBuffer();\n final ProductData samplesImag = tileOutImag.getDataBuffer();\n final DoubleMatrix dataReal = dataMaster.real();\n final DoubleMatrix dataImag = dataMaster.imag();\n final Rectangle rect = tileOutReal.getRectangle();\n final int maxX = rect.x + rect.width;\n final int maxY = rect.y + rect.height;\n final TileIndex tgtIndex = new TileIndex(tileOutReal);\n for (int y = rect.y; y < maxY; y++) {\n tgtIndex.calculateStride(y);\n final int yy = y - rect.y;\n for (int x = rect.x; x < maxX; x++) {\n final int trgIndex = tgtIndex.getIndex(x);\n final int xx = x - rect.x;\n samplesReal.setElemFloatAt(trgIndex, (float) dataReal.get(yy, xx));\n samplesImag.setElemFloatAt(trgIndex, (float) dataImag.get(yy, xx));\n if (samplesCoh != null) {\n samplesCoh.setElemFloatAt(trgIndex, (float) cohMatrix.get(yy, xx));\n }\n }\n }\n }\n } catch (Throwable e) {\n OperatorUtils.catchOperatorException(getId(), e);\n } finally {\n pm.done();\n }\n}\n"
"private boolean hasOverridenNativeProperty(String propertyName) {\n if (isNativeObjectType()) {\n return false;\n }\n JSType propertyType = getPropertyType(propertyName);\n ObjectType nativeType = isFunctionType() ? registry.getNativeObjectType(JSTypeNative.FUNCTION_PROTOTYPE) : registry.getNativeObjectType(JSTypeNative.OBJECT_PROTOTYPE);\n JSType nativePropertyType = nativeType.getPropertyType(propertyName);\n return propertyType != nativePropertyType;\n}\n"
"public Iterator<Entry<byte[], byte[]>> prefixLookup(byte[] prefix, int snapId) {\n if (prefix != null && prefix.length == 0)\n prefix = null;\n List<Iterator<Entry<byte[], byte[]>>> list = new ArrayList<Iterator<Entry<byte[], byte[]>>>(2);\n list.add(overlay.prefixLookup(prefix, snapId, true));\n if (index != null) {\n byte[][] rng = comp.prefixToRange(prefix);\n list.add(index.rangeLookup(rng[0], rng[1]));\n }\n return new OverlayMergeIterator<byte[], byte[]>(list, comp, null);\n}\n"
"public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.list_view_with_spinner, null);\n mListView = (ListView) v.findViewById(R.id.list);\n mProgressBar = (ProgressBar) v.findViewById(R.id.progress);\n if (mAdapter != null) {\n mListView.setAdapter(mAdapter);\n mListView.onRestoreInstanceState(mListState);\n mProgressBar.setVisibility(View.GONE);\n }\n mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n if (!(parent.getAdapter() instanceof ListViewAdapter)) {\n Log.w(Constants.LOG_TAG, \"String_Node_Str\");\n return;\n }\n Object item = ((ListViewAdapter) parent.getAdapter()).getItem(position);\n if (item != null && item instanceof EventListElement) {\n String eventKey = ((ListElement) item).getKey();\n startActivity(TeamAtEventActivity.newInstance(getActivity(), eventKey, mTeamKey));\n } else {\n Log.d(Constants.LOG_TAG, \"String_Node_Str\");\n }\n }\n });\n return v;\n}\n"
"private String createFilePath() {\n return new String(BASE_PATH + BASE_NAME + \"String_Node_Str\" + currentChunkId++ + \"String_Node_Str\");\n}\n"
"private String getAppUid() {\n final TelephonyManager telephony = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\n final String id = telephony.getDeviceId();\n try {\n MessageDigest digest = MessageDigest.getInstance(\"String_Node_Str\");\n digest.update(id.getBytes());\n return getHex(digest.digest());\n } catch (Exception e) {\n return UUID.randomUUID().toString();\n }\n}\n"
"public IValue withType(IType type, ITypeContext typeContext, MarkerList markers, IContext context) {\n IContext context1 = new CombiningContext(this, context);\n if (type.typeTag() == IType.LAMBDA) {\n LambdaType lt = (LambdaType) type;\n IType returnType = lt.getType();\n int parameterCount = lt.typeCount();\n switch(parameterCount) {\n case 0:\n {\n IValue resolved = super.resolve(markers, context1);\n this.resolved = true;\n IValue typed;\n if (resolved == this) {\n typed = super.withType(returnType, typeContext, markers, context1);\n } else {\n typed = resolved.withType(returnType, typeContext, markers, context1);\n }\n return lt.wrapLambda(typed, typeContext);\n }\n case 1:\n this.implicitParameter = new MethodParameter(Names.$it, lt.getType(0));\n super.resolve(markers, context1);\n this.resolved = true;\n IValue self = super.withType(returnType, typeContext, markers, context1);\n if (self == null) {\n return null;\n }\n returnType = this.getType();\n LambdaExpression le = new LambdaExpression(null, this.implicitParameter);\n le.setType(type);\n le.setReturnType(returnType);\n le.setMethod(lt.getFunctionalMethod());\n le.setValue(self);\n le.inferReturnType(type, typeContext, returnType);\n return le;\n }\n return null;\n }\n super.resolve(markers, context1);\n this.resolved = true;\n return super.withType(type, typeContext, markers, context1);\n}\n"
"private String getSelectionText() {\n InputStream inputStream = null;\n if (this.selection instanceof IStructuredSelection) {\n Object selection = ((IStructuredSelection) this.selection).getFirstElement();\n if (selection instanceof IFile) {\n IFile file = (IFile) selection;\n try {\n inputStream = file.getContents();\n } catch (CoreException e) {\n return \"String_Node_Str\";\n }\n }\n }\n if (inputStream != null) {\n try {\n reader = new BufferedReader(new InputStreamReader(inputStream));\n StringBuilder sb = new StringBuilder();\n String line = null;\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"String_Node_Str\");\n }\n parseXmlInput(sb.toString());\n return sb.toString();\n } catch (IOException e) {\n return \"String_Node_Str\";\n }\n }\n return \"String_Node_Str\";\n}\n"
"public void fillContextMenu(IMenuManager menu) {\n Iterator<?> iter = ((TreeSelection) this.getContext().getSelection()).iterator();\n while (iter.hasNext()) {\n Object obj = iter.next();\n if (obj instanceof RepositoryNode) {\n if (ConnectionUtils.isMdmConnection(((RepositoryNode) obj).getObject())) {\n return;\n }\n } else {\n return;\n }\n }\n TreeSelection treeSelection = (TreeSelection) getContext().getSelection();\n if (treeSelection == null) {\n return;\n }\n Object firstElement = treeSelection.getFirstElement();\n RepositoryNode rNode = (RepositoryNode) firstElement;\n IFolder folder = WorkbenchUtils.getFolder(rNode);\n IFolder metadataFolder = ResourceManager.getMetadataFolder();\n if (!folder.getFullPath().toOSString().startsWith(metadataFolder.getFullPath().toOSString())) {\n return;\n }\n Object[] selectedObj = treeSelection.toArray();\n if (selectedObj.length < 2) {\n return;\n }\n List<Object> objects = new ArrayList<Object>();\n for (Object obj : selectedObj) {\n RepositoryNode node = (RepositoryNode) obj;\n if (node instanceof DBConnectionRepNode) {\n Property property = ((DBConnectionRepNode) node).getObject().getProperty();\n DatabaseConnectionItem databaseConnectionItem = (DatabaseConnectionItem) property.getItem();\n Connection databaseConnection = databaseConnectionItem.getConnection();\n objects.add(databaseConnection);\n } else if (node instanceof DBCatalogRepNode) {\n Catalog catalog = ((DBCatalogRepNode) node).getCatalog();\n objects.add(catalog);\n } else if (node instanceof DBSchemaRepNode) {\n Schema schema = ((DBSchemaRepNode) node).getSchema();\n objects.add(schema);\n } else if (node instanceof DBTableRepNode) {\n TdTable tdTable = ((DBTableRepNode) node).getTdTable();\n objects.add(tdTable);\n } else if (node instanceof DBColumnRepNode) {\n TdColumn tdColumn = ((DBColumnRepNode) node).getTdColumn();\n objects.add(tdColumn);\n }\n }\n if (2 == objects.size()) {\n selectionCompareAction.refreshSelectedObj(objects.get(0), objects.get(1));\n menu.add(selectionCompareAction);\n }\n}\n"
"private IResultClass createCustomDataSetMetaData(BaseQuery query, IResultClass meta) throws DataException {\n List projectedColumns = new ArrayList();\n if (query.getFetchEvents() != null) {\n for (int i = 0; i < meta.getFieldCount(); i++) {\n ResultFieldMetadata rfMeta = new ResultFieldMetadata(i, meta.getFieldName(i + 1), meta.getFieldLabel(i + 1), meta.getFieldValueClass(i + 1), meta.getFieldNativeTypeName(i + 1), false);\n rfMeta.setAlias(meta.getFieldAlias(i + 1));\n projectedColumns.add(rfMeta);\n }\n for (int j = 0; j < query.getFetchEvents().size(); j++) {\n if (query.getFetchEvents().get(j) instanceof ComputedColumnHelper) {\n ComputedColumnHelper helper = (ComputedColumnHelper) query.getFetchEvents().get(j);\n helper.setModel(TransformationConstants.RESULT_SET_MODEL);\n for (int i = 0; i < helper.getComputedColumnList().size(); i++) {\n projectedColumns.add(new ResultFieldMetadata(i + 1 + meta.getFieldCount(), ((IComputedColumn) helper.getComputedColumnList().get(i)).getName(), ((IComputedColumn) helper.getComputedColumnList().get(i)).getName(), DataType.getClass(((IComputedColumn) helper.getComputedColumnList().get(i)).getDataType()), null, true));\n }\n }\n meta = new ResultClass(projectedColumns);\n }\n }\n return meta;\n}\n"
"public Intent getManageKeyphraseIntent(int action, String keyphrase, Locale locale) {\n if (mEnrollmentPackage == null || mEnrollmentPackage.isEmpty()) {\n Slog.w(TAG, \"String_Node_Str\");\n return null;\n }\n if (getKeyphraseMetadata(keyphrase, locale) != null) {\n Intent intent = new Intent(ACTION_MANAGE_VOICE_KEYPHRASES).setPackage(mEnrollmentPackage).putExtra(EXTRA_VOICE_KEYPHRASE_HINT_TEXT, keyphrase).putExtra(EXTRA_VOICE_KEYPHRASE_LOCALE, locale.toLanguageTag()).putExtra(EXTRA_VOICE_KEYPHRASE_ACTION, action);\n return intent;\n }\n return null;\n}\n"
"private void signOffAndClearWithout(final UserSession usess) {\n boolean isDebug = log.isDebug();\n if (isDebug)\n log.debug(\"String_Node_Str\");\n final IdentityEnvironment identityEnvironment = usess.getIdentityEnvironment();\n final SessionInfo sessionInfo = usess.getSessionInfo();\n final Identity ident = identityEnvironment.getIdentity();\n if (isDebug)\n log.debug(\"String_Node_Str\" + sessionInfo);\n if (usess.isAuthenticated() && usess.getLastHistoryPoint() != null && !usess.getRoles().isGuestOnly()) {\n historyManager.persistHistoryPoint(ident, usess.getLastHistoryPoint());\n }\n Runnable run = new Runnable() {\n public void run() {\n Object obj = null;\n try {\n if (ident != null) {\n ThreadLocalUserActivityLogger.log(OlatLoggingAction.OLAT_LOGOUT, UserSession.class, CoreLoggingResourceable.wrap(ident));\n } else {\n }\n List<Object> storeList = usess.getStoreValues();\n for (Iterator<Object> it_storevals = storeList.iterator(); it_storevals.hasNext(); ) {\n obj = it_storevals.next();\n if (obj instanceof Disposable) {\n ((Disposable) obj).dispose();\n }\n }\n } catch (Exception e) {\n String objtostr = \"String_Node_Str\";\n try {\n objtostr = obj.toString();\n } catch (Exception ee) {\n }\n log.error(\"String_Node_Str\" + objtostr, e);\n }\n }\n };\n ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(run, UserActivityLoggerImpl.newLoggerForValueUnbound(usess));\n if (authUserSessions.remove(usess)) {\n Identity previousSignedOn = identityEnvironment.getIdentity();\n if (previousSignedOn != null && previousSignedOn.getKey() != null) {\n if (isDebug)\n log.debug(\"String_Node_Str\" + previousSignedOn.getName().toLowerCase());\n userNameToIdentity.remove(previousSignedOn.getKey());\n userSessionCache.remove(previousSignedOn.getKey());\n }\n } else if (isDebug) {\n log.info(\"String_Node_Str\" + ident + \"String_Node_Str\");\n }\n if (sessionInfo != null) {\n if (sessionInfo.isREST()) {\n sessionCountRest.decrementAndGet();\n } else if (sessionInfo.isWebDAV()) {\n sessionCountDav.decrementAndGet();\n } else {\n sessionCountWeb.decrementAndGet();\n }\n }\n if (isDebug)\n log.debug(\"String_Node_Str\");\n}\n"
"public void addContact_Fail() {\n expect(userDAO.findByUsername(USERNAME)).andReturn(user1);\n replay(userDAO);\n expect(userContactDAO.doesContactExistForUserId(user1.getId(), user2.getId())).andReturn(true);\n replay(userContactDAO);\n userService.addContact(user2, user1.getUsername());\n}\n"
"public void gotoTrait(int traitId) {\n if (traitId == -1) {\n return;\n }\n Highlighting tc = Highlighting.searchIndex(classHighlights, classIndex);\n if (tc != null) {\n Highlighting th = Highlighting.searchIndex(traitHighlights, traitId, tc.startPos, tc.startPos + tc.len);\n int pos;\n if (th != null) {\n if (th.len > 1) {\n ignoreCarret = true;\n int startPos = th.startPos + th.len - 1;\n if (startPos <= getDocument().getLength()) {\n setCaretPosition(startPos);\n }\n ignoreCarret = false;\n }\n ignoreCarret = false;\n pos = th.startPos;\n } else {\n pos = tc.startPos;\n }\n final int fpos = pos;\n new Timer().schedule(new TimerTask() {\n public void run() {\n if (fpos <= getDocument().getLength()) {\n setCaretPosition(fpos);\n }\n }\n }, 100);\n }\n}\n"
"public void putInt(final String key, final int value) {\n p.putInt(safeKey(key), value);\n}\n"
"public boolean hasSeed() {\n return CropPlantHandler.isValidSeed(this.seed);\n}\n"
"public ErrorCollection validate(BuildConfiguration buildConfiguration) {\n boolean error = false;\n ErrorCollection errorCollection = super.validate(buildConfiguration);\n String hostame = StringUtils.trim(buildConfiguration.getString(REPOSITORY_GERRIT_REPOSITORY_HOSTNAME));\n if (!StringUtils.isNotBlank(hostame)) {\n errorCollection.addError(REPOSITORY_GERRIT_REPOSITORY_HOSTNAME, \"String_Node_Str\");\n error = true;\n }\n String strPort = buildConfiguration.getString(REPOSITORY_GERRIT_REPOSITORY_PORT, \"String_Node_Str\").trim();\n if (!StringUtils.isNotBlank(strPort)) {\n errorCollection.addError(REPOSITORY_GERRIT_REPOSITORY_PORT, \"String_Node_Str\");\n error = true;\n }\n String strProject = buildConfiguration.getString(REPOSITORY_GERRIT_PROJECT, \"String_Node_Str\").trim();\n if (!StringUtils.isNotBlank(strProject)) {\n errorCollection.addError(REPOSITORY_GERRIT_PROJECT, \"String_Node_Str\");\n error = true;\n }\n String username = StringUtils.trim(buildConfiguration.getString(REPOSITORY_GERRIT_USERNAME));\n if (!StringUtils.isNotBlank(username)) {\n errorCollection.addError(REPOSITORY_GERRIT_USERNAME, \"String_Node_Str\");\n error = true;\n }\n if (buildConfiguration.getBoolean(TEMPORARY_GERRIT_SSH_KEY_CHANGE)) {\n final Object o = buildConfiguration.getProperty(TEMPORARY_GERRIT_SSH_KEY_FROM_FILE);\n if (o == null) {\n errorCollection.addError(REPOSITORY_GERRIT_SSH_KEY, textProvider.getText(\"String_Node_Str\"));\n error = true;\n }\n }\n String key = encrypterRef.get().decrypt(buildConfiguration.getString(REPOSITORY_GERRIT_SSH_KEY, \"String_Node_Str\"));\n if (!StringUtils.isNotBlank(key)) {\n errorCollection.addError(REPOSITORY_GERRIT_SSH_KEY, textProvider.getText(\"String_Node_Str\"));\n error = true;\n }\n String strPhrase = buildConfiguration.getString(TEMPORARY_GERRIT_SSH_PASSPHRASE);\n if (buildConfiguration.getBoolean(TEMPORARY_GERRIT_SSH_PASSPHRASE_CHANGE)) {\n strPhrase = encrypterRef.get().encrypt(strPhrase);\n } else if (strPhrase == null) {\n strPhrase = buildConfiguration.getString(REPOSITORY_GERRIT_SSH_PASSPHRASE, \"String_Node_Str\");\n }\n String keyFilePath = buildConfiguration.getString(REPOSITORY_GERRIT_SSH_KEY_FILE);\n if (!StringUtils.isNotBlank(keyFilePath)) {\n errorCollection.addError(REPOSITORY_GERRIT_SSH_KEY_FILE, \"String_Node_Str\");\n error = true;\n }\n if (error)\n return errorCollection;\n try {\n testGerritConnection(keyFilePath, key, hostame, Integer.valueOf(strPort), username, strProject, strPhrase);\n } catch (RepositoryException e) {\n errorCollection.addError(REPOSITORY_GERRIT_REPOSITORY_HOSTNAME, e.getMessage());\n }\n return errorCollection;\n}\n"
"public void updateUIInThreadIfThread() {\n if (treeItem.isDisposed()) {\n return;\n }\n if (checkConnectionIsDone) {\n treeItem.setText(3, EMPTY_STRING + metadataColumns.size());\n treeItem.setText(4, Messages.getString(\"String_Node_Str\"));\n countSuccess++;\n tableColumnNums.put(treeItem.getText(0), metadataColumns.size());\n } else {\n String msg = Messages.getString(\"String_Node_Str\");\n updateStatus(IStatus.WARNING, msg);\n new ErrorDialogWidthDetailArea(getShell(), Activator.PLUGIN_ID, msg, msg);\n }\n count++;\n updateStatus(IStatus.OK, null);\n parentWizardPage.setPageComplete(!threadExecutor.hasThreadRunning());\n}\n"
"public void testSimplifyJavaLangString() {\n TypeMirror string = typeMirrorOf(\"String_Node_Str\");\n Set<TypeMirror> types = ImmutableSet.of(string);\n TypeSimplifier typeSimplifier = new TypeSimplifier(typeUtil, \"String_Node_Str\", types, baseWithoutContainedTypes());\n assertEquals(\"String_Node_Str\", typeSimplifier.simplify(string));\n}\n"
"public void sendMoneyOut(ActionEvent event) {\n SendMoneyController.open();\n}\n"
"public static List getDriverList() {\n HashSet jdbcDriverSet = new HashSet();\n for (int i = 0; i < jdbcDriverInfos.size(); i++) {\n jdbcDriverSet.add(jdbcDriverInfos.get(i));\n }\n return new ArrayList(jdbcDriverSet);\n}\n"
"public BigDecimal computeReportedBalance2(LocalDate fromDate, LocalDate toDate, Partner partner, Account account) {\n List<? extends MoveLine> moveLineList = MoveLine.all().filter(\"String_Node_Str\", partner, fromDate, toDate, account).fetch();\n BigDecimal reportedBalanceAmount = BigDecimal.ZERO;\n for (MoveLine moveLine : moveLineList) {\n if (moveLine.getDebit().compareTo(BigDecimal.ZERO) > 0) {\n reportedBalanceAmount = reportedBalanceAmount.subtract(moveLine.getAmountRemaining());\n } else if (moveLine.getCredit().compareTo(BigDecimal.ZERO) > 0) {\n reportedBalanceAmount = reportedBalanceAmount.add(moveLine.getAmountRemaining());\n }\n }\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\", reportedBalanceAmount);\n }\n return reportedBalanceAmount;\n}\n"
"public final SimonInfo[] getSimonInfos() {\n String[] simonNames = getSimonNamesOrdered();\n SimonInfo[] simonInfo = new SimonInfo[simonNames.length];\n int i = 0;\n for (String name : simonNames) {\n Simon s = manager.getSimon(name);\n simonInfo[i++] = new SimonInfo(name, s instanceof Stopwatch ? SimonInfo.STOPWATCH : s instanceof Counter ? SimonInfo.COUNTER : SimonInfo.UNKNOWN);\n }\n return simonInfo;\n}\n"
"public void executeUpdate(Rider rider) {\n if (rider != null) {\n rider.setTarget(null);\n LivingEntity ride = rider.getRide();\n if (target == null) {\n isGoalDone = true;\n } else {\n if (target.isDead()) {\n target = null;\n goalManager.setStopGoal(rider);\n } else {\n if (isWithinRange(ride.getLocation(), target.getLocation(), rangeSquared)) {\n goalManager.setStopGoal(rider);\n } else {\n setPathEntity(rider, target.getLocation());\n updateSpeed(rider);\n }\n }\n }\n }\n}\n"
"public String getCallingPackage(IBinder token) {\n synchronized (this) {\n ActivityRecord r = getCallingRecordLocked(token);\n return r != null ? r.info.packageName : null;\n }\n}\n"
"public Type applyState(CompilerState state, IContext context) {\n if (this.position == null) {\n return this;\n }\n if (state == CompilerState.RESOLVE_TYPES) {\n Type type = this.resolve(context);\n if (!type.isResolved()) {\n state.addMarker(new SemanticError(this.position, \"String_Node_Str\" + this.name + \"String_Node_Str\"));\n }\n }\n return this;\n}\n"
"public Time fireAt(Actor actor, Time time, int index) throws IllegalActionException {\n if (actor == this.getContainer()) {\n fireContainerAt(time);\n return time;\n }\n int newIndex = index;\n if (_currentLogicalTime != null && _currentLogicalTime.compareTo(time) == 0 && index <= getIndex()) {\n if (!(actor instanceof CompositeActor) || ((CompositeActor) actor).getDirector().scheduleContainedActors()) {\n newIndex = Math.max(getIndex(), index) + 1;\n }\n }\n if (_isInitializing) {\n _currentSourceTimestamp = time;\n }\n _pureEvents.put(new PtidesEvent(actor, null, time, newIndex, 0, _zeroTime, _currentSourceTimestamp));\n _currentSourceTimestamp = null;\n Time environmentTime = super.getEnvironmentTime();\n if (environmentTime.compareTo(time) <= 0) {\n fireContainerAt(time, 1);\n }\n return time;\n}\n"
"private String trimWhitespaces(String content, String lineEnding) {\n BufferedReader reader = new BufferedReader(new StringReader(content));\n return reader.lines().map((String t) -> {\n return t.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n }).collect(Collectors.joining(lineEnding));\n}\n"
"public Variable[] getStack(int index) {\n if (index < 0 || index >= calls.length) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n Vector variables = new Vector();\n Hashtable variablesSeen = new Hashtable();\n Proto p = calls[index].closure.p;\n for (int i = index; i >= 0; i--) {\n if (i == index || isInScope(p, calls[i])) {\n addVariables(variables, variablesSeen, i);\n }\n }\n Variable[] result = new Variable[variables.size()];\n for (int i = 0; i < variables.size(); i++) {\n result[i] = (Variable) variables.elementAt(i);\n }\n return result;\n}\n"
"private PhotoAnnotation getAnnotationInGrid(MKMapRect gridMapRect, List<PhotoAnnotation> annotations) {\n Set<MKAnnotation> visibleAnnotationsInBucket = mapView.getAnnotations(gridMapRect);\n for (MKAnnotation annotation : annotations) {\n if (visibleAnnotationsInBucket.contains(annotation)) {\n return annotations.get(0);\n }\n }\n final MKMapPoint centerMapPoint = new MKMapPoint(gridMapRect.getOrigin().getX() + gridMapRect.getSize().getWidth() / 2, gridMapRect.getOrigin().getY() + gridMapRect.getSize().getHeight() / 2);\n Comparator<MKAnnotation> comparator = new Comparator<MKAnnotation>() {\n public int compare(MKAnnotation lhs, MKAnnotation rhs) {\n MKMapPoint mapPoint1 = MKMapPoint.create(lhs.getCoordinate());\n MKMapPoint mapPoint2 = MKMapPoint.create(rhs.getCoordinate());\n double distance1 = MKMapPoint.getMetersBetween(mapPoint1, centerMapPoint);\n double distance2 = MKMapPoint.getMetersBetween(mapPoint2, centerMapPoint);\n if (distance1 < distance2) {\n return -1;\n }\n if (distance1 > distance2) {\n return 1;\n }\n return 0;\n }\n };\n Collections.sort(annotations, comparator);\n return annotations.get(0);\n}\n"
"public boolean match(Query other) {\n if (other instanceof PlayerQuery) {\n PlayerQuery query = (PlayerQuery) other;\n return QueryMatching.matchParameter(names, query.names) && QueryMatching.matchParameter(groups, query.groups) && QueryMatching.matchParameter(deathCause, query.deathCause) && QueryMatching.matchParameter(murder, query.murder);\n }\n return false;\n}\n"
"public static SpaceGroup getSpaceGroup(String shortName) {\n if (shortName == null || shortName.length() <= 2)\n return null;\n if (shortName.equals(\"String_Node_Str\"))\n shortName = \"String_Node_Str\";\n shortName = shortName.substring(0, 1) + shortName.substring(1).toLowerCase();\n return name2sgs.get(shortName);\n}\n"
"public boolean inChannel() {\n return (activeChannel != null);\n}\n"
"protected void exec() {\n m_console.show();\n m_console.getStream().print(showCommand());\n SysCommandExecutor executor = new SysCommandExecutor();\n executor.setOutputLogDevice(getLogDevice(m_console.getOutputStream()));\n executor.setErrorLogDevice(getLogDevice(m_console.getErrorStream()));\n executor.setWorkingDirectory(m_workDir);\n Process process;\n try {\n process = DebugPlugin.exec(commandLine, new File(m_workDir));\n } catch (CoreException e) {\n return;\n }\n m_debugProcess = DebugPlugin.newProcess(m_launch, process, m_appName);\n if (m_debugProcess != null) {\n attachConsole(m_debugProcess, m_console);\n }\n}\n"
"public HazelcastHttpSession getOrCreateHazelcastSession() {\n if (requestedSessionId == null) {\n requestedSessionId = getSessionCookie(this);\n if (requestedSessionId == null) {\n requestedSessionId = getParameter(HAZELCAST_SESSION_COOKIE_NAME);\n }\n }\n if (requestedSessionId != null) {\n hazelcastSession = getSessionWithId(requestedSessionId);\n }\n if (hazelcastSession == null && !res.isCommitted()) {\n hazelcastSession = createNewSession(RequestWrapper.this, clusteredSessionId);\n }\n return hazelcastSession;\n}\n"
"public static Number createLocalFormatValue(Object input) {\n DecimalFormat format = (DecimalFormat) DecimalFormat.getInstance(Locale.getDefault());\n return format.parse(input.toString());\n}\n"
"public int emulateOP(long maxCycles) throws EmulationException {\n int pc = readRegister(PC);\n long startCycles = cycles;\n if (interruptsEnabled && servicedInterrupt == -1 && interruptMax >= 0) {\n pc = serviceInterrupt(pc);\n }\n if (cpuOff || flash.blocksCPU()) {\n while (cycles >= nextEventCycles) {\n executeEvents();\n }\n if (interruptsEnabled && interruptMax > 0) {\n return -1;\n }\n if (maxCycles >= 0 && maxCycles < nextEventCycles) {\n cycles = cycles < maxCycles ? maxCycles : cycles;\n } else {\n cycles = nextEventCycles;\n }\n return -1;\n }\n int pcBefore = pc;\n instruction = currentSegment.read(pc, AccessMode.WORD, AccessType.EXECUTE);\n if (isStopping) {\n return -2;\n }\n int ext3_0 = 0;\n int ext10_7 = 0;\n boolean repeatsInDstReg = false;\n boolean wordx20 = false;\n if ((instruction & 0xf800) == 0x1800) {\n extWord = instruction;\n ext3_0 = instruction & 0xf;\n ext10_7 = (instruction >> 7) & 0xf;\n pc += 2;\n if ((instruction & 0x80) == 0x80) {\n repeatsInDstReg = true;\n }\n wordx20 = (instruction & 0x40) == 0;\n instruction = currentSegment.read(pc, AccessMode.WORD, AccessType.EXECUTE);\n } else {\n extWord = 0;\n }\n op = instruction >> 12;\n int sp = 0;\n int sr = 0;\n int rval = 0;\n int repeats = 1;\n boolean zeroCarry = false;\n boolean word = (instruction & 0x40) == 0;\n AccessMode mode = wordx20 ? AccessMode.WORD20 : (word ? AccessMode.WORD : AccessMode.BYTE);\n if (mode == AccessMode.WORD20)\n System.out.println(\"String_Node_Str\");\n int dstRegister = 0;\n int dstAddress = -1;\n boolean dstRegMode = false;\n int dst = 0;\n boolean write = false;\n boolean updateStatus = true;\n pc += 2;\n writeRegister(PC, pc);\n switch(op) {\n case 0:\n op = instruction & 0xf0f0;\n if (!MSP430XArch)\n throw new EmulationException(\"String_Node_Str\");\n int src = 0;\n int srcData = (instruction & 0x0f00) >> 8;\n int dstData = (instruction & 0x000f);\n boolean rrword = true;\n mode = AccessMode.WORD20;\n switch(op) {\n case MOVA_IND:\n writeRegister(dstData, currentSegment.read(readRegister(srcData), AccessMode.WORD20, AccessType.READ));\n updateStatus = false;\n cycles += 3;\n break;\n case MOVA_IND_AUTOINC:\n if (profiler != null && instruction == 0x0110) {\n profiler.profileReturn(cpuCycles);\n }\n writeRegister(PC, pc);\n src = readRegister(srcData);\n dst = currentSegment.read(src, AccessMode.WORD20, AccessType.READ);\n writeRegister(srcData, src + 4);\n writeRegister(dstData, dst);\n updateStatus = false;\n cycles += 3;\n break;\n case MOVA_ABS2REG:\n src = currentSegment.read(pc, AccessMode.WORD, AccessType.READ);\n writeRegister(PC, pc += 2);\n dst = src + (srcData << 16);\n dst = currentSegment.read(dst, AccessMode.WORD20, AccessType.READ);\n writeRegister(dstData, dst);\n updateStatus = false;\n cycles += 4;\n break;\n case MOVA_INDX2REG:\n int index = currentSegment.read(pc, AccessMode.WORD, AccessType.READ);\n int indexModifier = readRegister(srcData);\n if (index > 0x8000) {\n index = -(0x10000 - index);\n }\n if (indexModifier > 0x8000) {\n indexModifier = -(0x10000 - indexModifier);\n }\n writeRegister(dstData, currentSegment.read(indexModifier + index, AccessMode.WORD20, AccessType.READ));\n writeRegister(PC, pc += 2);\n updateStatus = false;\n cycles += 4;\n break;\n case MOVA_REG2ABS:\n dst = currentSegment.read(pc, AccessMode.WORD, AccessType.READ);\n writeRegister(PC, pc += 2);\n currentSegment.write(dst + (dstData << 16), readRegister(srcData), AccessMode.WORD20);\n updateStatus = false;\n cycles += 4;\n break;\n case MOVA_REG2INDX:\n index = currentSegment.read(pc, AccessMode.WORD, AccessType.READ);\n indexModifier = readRegister(dstData);\n if (index > 0x8000) {\n index = -(0x10000 - index);\n }\n if (indexModifier > 0x8000) {\n indexModifier = -(0x10000 - indexModifier);\n }\n currentSegment.write(indexModifier + index, readRegister(srcData), AccessMode.WORD20);\n writeRegister(PC, pc += 2);\n updateStatus = false;\n cycles += 4;\n break;\n case MOVA_IMM2REG:\n src = currentSegment.read(pc, AccessMode.WORD, AccessType.READ);\n writeRegister(PC, pc += 2);\n dst = src + (srcData << 16);\n dst &= 0xfffff;\n writeRegister(dstData, dst);\n updateStatus = false;\n cycles += 2;\n break;\n case ADDA_IMM:\n int immData = currentSegment.read(pc, AccessMode.WORD, AccessType.READ) + (srcData << 16);\n writeRegister(PC, pc += 2);\n dst = readRegister(dstData) + immData;\n System.out.println(\"String_Node_Str\" + Utils.hex20(immData) + \"String_Node_Str\" + Utils.hex20(dst));\n dst &= 0xfffff;\n writeRegister(dstData, dst);\n cycles += 3;\n break;\n case CMPA_IMM:\n {\n immData = currentSegment.read(pc, AccessMode.WORD, AccessType.READ) + (srcData << 16);\n writeRegister(PC, pc += 2);\n sr = readRegister(SR);\n int destRegValue = readRegister(dstData);\n sr &= ~(NEGATIVE | ZERO | CARRY | OVERFLOW);\n if (destRegValue >= immData) {\n sr |= CARRY;\n }\n if (destRegValue < immData) {\n sr |= NEGATIVE;\n }\n if (destRegValue == immData) {\n sr |= ZERO;\n }\n int cmpTmp = destRegValue - immData;\n int b = 0x80000;\n if (((destRegValue ^ cmpTmp) & b) == 0 && (((destRegValue ^ immData) & b) != 0)) {\n sr |= OVERFLOW;\n }\n writeRegister(SR, sr);\n updateStatus = false;\n cycles += 3;\n break;\n }\n case SUBA_IMM:\n immData = currentSegment.read(pc, AccessMode.WORD, AccessType.READ) + (srcData << 16);\n writeRegister(PC, pc += 2);\n dst = readRegister(dstData) - immData;\n writeRegister(dstData, dst);\n cycles += 3;\n break;\n case MOVA_REG:\n cycles += 1;\n writeRegister(dstData, readRegister(srcData));\n break;\n case CMPA_REG:\n {\n sr = readRegister(SR);\n sr &= ~(NEGATIVE | ZERO | CARRY | OVERFLOW);\n int destRegValue = readRegister(dstData);\n int srcRegValue = readRegister(srcData);\n if (destRegValue >= srcRegValue) {\n sr |= CARRY;\n }\n if (destRegValue < srcRegValue) {\n sr |= NEGATIVE;\n }\n if (destRegValue == srcRegValue) {\n sr |= ZERO;\n }\n int cmpTmp = destRegValue - srcRegValue;\n int b = 0x80000;\n if (((destRegValue ^ cmpTmp) & b) == 0 && (((destRegValue ^ srcRegValue) & b) != 0)) {\n sr |= OVERFLOW;\n }\n writeRegister(SR, sr);\n updateStatus = false;\n cycles += 1;\n break;\n }\n case ADDA_REG:\n dst = readRegister(dstData) + readRegister(srcData);\n writeRegister(dstData, dst);\n cycles += 1;\n break;\n case SUBA_REG:\n dst = readRegister(dstData) - readRegister(srcData);\n writeRegister(dstData, dst);\n cycles += 1;\n break;\n case RRXX_ADDR:\n rrword = false;\n case RRXX_WORD:\n int count = ((instruction >> 10) & 0x03) + 1;\n dst = readRegister(dstData);\n sr = readRegister(SR);\n int nxtCarry = 0;\n int carry = (sr & CARRY) > 0 ? 1 : 0;\n if (rrword) {\n mode = AccessMode.WORD;\n dst = dst & 0xffff;\n }\n cycles += 1 + count;\n switch(instruction & RRMASK) {\n case RRCM:\n int dst_low = dst & ((1 << count) - 1);\n nxtCarry = (dst & (1 << (count + 1))) > 0 ? CARRY : 0;\n dst = dst >> (count);\n if (rrword) {\n dst |= (dst_low << (17 - count)) | (carry << (16 - count));\n } else {\n dst |= (dst_low << (21 - count)) | (carry << (20 - count));\n }\n break;\n case RRAM:\n if ((dst & (rrword ? 0x8000 : 0x80000)) > 0) {\n dst = dst | (rrword ? 0xf8000 : 0xf80000);\n }\n dst = dst >> (count - 1);\n nxtCarry = (dst & 1) > 0 ? CARRY : 0;\n dst = dst >> 1;\n break;\n case RLAM:\n dst = dst << (count - 1);\n nxtCarry = (dst & (rrword ? 0x8000 : 0x80000)) > 0 ? CARRY : 0;\n dst = dst << 1;\n break;\n case RRUM:\n dst = dst >> (count - 1);\n nxtCarry = (dst & 1) > 0 ? CARRY : 0;\n dst = dst >> 1;\n break;\n }\n writeRegister(SR, (sr & ~(CARRY | OVERFLOW)) | nxtCarry);\n dst = dst & (rrword ? 0xffff : 0xfffff);\n writeRegister(dstData, dst);\n break;\n default:\n System.out.println(\"String_Node_Str\" + Utils.hex16(instruction) + \"String_Node_Str\" + Utils.hex16(op));\n throw new EmulationException(\"String_Node_Str\" + Utils.hex16(instruction) + \"String_Node_Str\" + Utils.hex16(op));\n }\n break;\n case 1:\n {\n dstRegister = instruction & 0xf;\n if ((op = instruction & CALLA_MASK) > RETI) {\n pc = readRegister(PC);\n dst = -1;\n updateStatus = false;\n switch(op) {\n case CALLA_REG:\n sp = readRegister(SP) - 2;\n writeRegister(SP, sp);\n dst = readRegister(dstRegister);\n System.out.println(\"String_Node_Str\" + Utils.hex20(dst));\n cycles += 5;\n break;\n case CALLA_INDEX:\n sp = readRegister(SP) - 2;\n writeRegister(SP, sp);\n System.out.println(\"String_Node_Str\" + dstRegister);\n dst = readRegister(dstRegister);\n System.out.println(\"String_Node_Str\" + Utils.hex20(dst) + \"String_Node_Str\" + currentSegment.read(pc, AccessMode.WORD, AccessType.READ));\n dst += currentSegment.read(pc, AccessMode.WORD, AccessType.READ);\n System.out.println(\"String_Node_Str\" + Utils.hex20(dst));\n dst = currentSegment.read(dst, AccessMode.WORD20, AccessType.READ);\n System.out.println(\"String_Node_Str\" + Utils.hex20(dst));\n cycles += 5;\n pc += 2;\n break;\n case CALLA_IMM:\n sp = readRegister(SP) - 2;\n writeRegister(SP, sp);\n dst = (dstRegister << 16) | currentSegment.read(pc, AccessMode.WORD, AccessType.READ);\n pc += 2;\n cycles += 5;\n break;\n case CALLA_ABS:\n sp = readRegister(SP) - 2;\n writeRegister(SP, sp);\n dst = (dstRegister << 16) | currentSegment.read(pc, AccessMode.WORD, AccessType.READ);\n dst = currentSegment.read(dst, AccessMode.WORD20, AccessType.READ);\n pc += 2;\n cycles += 7;\n break;\n default:\n AccessMode type = AccessMode.WORD;\n int size = 2;\n sp = readRegister(SP);\n switch(op & 0x1f00) {\n case PUSHM_A:\n type = AccessMode.WORD20;\n size = 4;\n cycles += 2;\n case PUSHM_W:\n int n = 1 + ((instruction >> 4) & 0x0f);\n int regNo = instruction & 0x0f;\n for (int i = 0; i < n; i++) {\n sp -= size;\n cycles += 2;\n currentSegment.write(sp, this.reg[regNo--], type);\n if (regNo < 0)\n regNo = 15;\n }\n writeRegister(SP, sp);\n break;\n case POPM_A:\n type = AccessMode.WORD20;\n size = 4;\n cycles += 2;\n case POPM_W:\n n = 1 + ((instruction >> 4) & 0x0f);\n regNo = instruction & 0x0f;\n for (int i = 0; i < n; i++) {\n cycles += 2;\n this.reg[regNo++] = currentSegment.read(sp, type, AccessType.READ);\n sp += size;\n if (regNo > 15)\n regNo = 0;\n }\n writeRegister(SP, sp);\n break;\n default:\n System.out.println(\"String_Node_Str\");\n throw new EmulationException(\"String_Node_Str\" + Utils.hex16(instruction) + \"String_Node_Str\" + Utils.hex16(op));\n }\n }\n if (dst != -1) {\n currentSegment.write(sp, (pc >> 16) & 0xf, AccessMode.WORD);\n sp = sp - 2;\n currentSegment.write(sp, pc & 0xffff, AccessMode.WORD);\n writeRegister(SP, sp);\n writeRegister(PC, dst);\n if (profiler != null) {\n profileCall(dst, pc);\n }\n }\n } else {\n int ad = (instruction >> 4) & 3;\n int nxtCarry = 0;\n op = instruction & 0xff80;\n if (op == PUSH || op == CALL) {\n sp = readRegister(SP) - 2;\n writeRegister(SP, sp);\n }\n if ((dstRegister == CG1 && ad > AM_INDEX) || dstRegister == CG2) {\n dstRegMode = true;\n cycles++;\n } else {\n switch(ad) {\n case AM_REG:\n dstRegMode = true;\n cycles++;\n break;\n case AM_INDEX:\n rval = readRegisterCG(dstRegister, ad);\n if (rval <= 0xffff) {\n dstAddress = (rval + currentSegment.read(pc, AccessMode.WORD, AccessType.READ)) & 0xffff;\n } else {\n dstAddress = currentSegment.read(pc, AccessMode.WORD, AccessType.READ);\n if ((dstAddress & 0x8000) > 0) {\n dstAddress |= 0xf0000;\n }\n dstAddress += rval;\n dstAddress &= 0xfffff;\n }\n pc += 2;\n writeRegister(PC, pc);\n cycles += 4;\n break;\n case AM_IND_REG:\n dstAddress = readRegister(dstRegister);\n cycles += 3;\n break;\n case AM_IND_AUTOINC:\n if (dstRegister == PC) {\n dstAddress = readRegister(PC);\n pc += 2;\n writeRegister(PC, pc);\n } else {\n dstAddress = readRegister(dstRegister);\n writeRegister(dstRegister, dstAddress + mode.bytes);\n }\n cycles += 3;\n break;\n }\n }\n if (dstRegMode) {\n dst = readRegisterCG(dstRegister, ad);\n dst &= mode.mask;\n if (repeatsInDstReg) {\n repeats = 1 + readRegister(ext3_0);\n } else {\n repeats = 1 + ext3_0;\n }\n zeroCarry = (extWord & EXTWORD_ZC) > 0;\n } else {\n dst = currentSegment.read(dstAddress, word ? AccessMode.WORD : AccessMode.BYTE, AccessType.READ);\n }\n while (repeats-- > 0) {\n sr = readRegister(SR);\n if (repeats >= 0) {\n if (zeroCarry) {\n sr = sr & ~CARRY;\n }\n }\n switch(op) {\n case RRC:\n nxtCarry = (dst & 1) > 0 ? CARRY : 0;\n dst = dst >> 1;\n dst |= (sr & CARRY) > 0 ? mode.msb : 0;\n write = true;\n writeRegister(SR, (sr & ~(CARRY | OVERFLOW)) | nxtCarry);\n break;\n case SWPB:\n int tmp = dst;\n dst = ((tmp >> 8) & 0xff) + ((tmp << 8) & 0xff00);\n write = true;\n break;\n case RRA:\n nxtCarry = (dst & 1) > 0 ? CARRY : 0;\n dst = (dst & mode.msb) | dst >> 1;\n write = true;\n writeRegister(SR, (sr & ~(CARRY | OVERFLOW)) | nxtCarry);\n break;\n case SXT:\n dst = (dst & 0x80) > 0 ? dst | 0xfff00 : dst & 0x7f;\n write = true;\n sr = sr & ~(CARRY | OVERFLOW);\n if (dst != 0) {\n sr |= CARRY;\n }\n writeRegister(SR, sr);\n break;\n case PUSH:\n if (mode == AccessMode.WORD) {\n currentSegment.write(sp, dst, AccessMode.WORD);\n } else {\n currentSegment.write(sp, dst & 0xff, AccessMode.WORD);\n }\n cycles += (ad == AM_REG || ad == AM_IND_AUTOINC) ? 2 : 1;\n write = false;\n updateStatus = false;\n break;\n case CALL:\n pc = readRegister(PC);\n currentSegment.write(sp, pc, AccessMode.WORD);\n writeRegister(PC, dst);\n cycles += (ad == AM_REG) ? 3 : (ad == AM_IND_AUTOINC) ? 2 : 1;\n if (profiler != null) {\n profileCall(dst, pc);\n }\n write = false;\n updateStatus = false;\n break;\n case RETI:\n servicedInterrupt = -1;\n sp = readRegister(SP);\n sr = currentSegment.read(sp, AccessMode.WORD, AccessType.READ);\n writeRegister(SR, sr & 0x0fff);\n sp = sp + 2;\n writeRegister(PC, currentSegment.read(sp, AccessMode.WORD, AccessType.READ) | (sr & 0xf000) << 4);\n sp = sp + 2;\n writeRegister(SP, sp);\n write = false;\n updateStatus = false;\n cycles += 4;\n if (debugInterrupts) {\n System.out.println(\"String_Node_Str\" + pc + \"String_Node_Str\" + reg[PC] + \"String_Node_Str\" + reg[SP]);\n }\n if (profiler != null) {\n profiler.profileRETI(cycles);\n }\n handlePendingInterrupts();\n break;\n default:\n System.out.println(\"String_Node_Str\" + Utils.hex16(instruction));\n }\n if (repeats > 0) {\n dst &= mode.mask;\n }\n }\n }\n }\n break;\n case 2:\n case 3:\n int jmpOffset = instruction & 0x3ff;\n jmpOffset = (jmpOffset & 0x200) == 0 ? 2 * jmpOffset : -(2 * (0x200 - (jmpOffset & 0x1ff)));\n boolean jump = false;\n cycles += 2;\n sr = readRegister(SR);\n switch(instruction & 0xfc00) {\n case JNE:\n jump = (sr & ZERO) == 0;\n break;\n case JEQ:\n jump = (sr & ZERO) > 0;\n break;\n case JNC:\n jump = (sr & CARRY) == 0;\n break;\n case JC:\n jump = (sr & CARRY) > 0;\n break;\n case JN:\n jump = (sr & NEGATIVE) > 0;\n break;\n case JGE:\n jump = (sr & NEGATIVE) > 0 == (sr & OVERFLOW) > 0;\n break;\n case JL:\n jump = (sr & NEGATIVE) > 0 != (sr & OVERFLOW) > 0;\n break;\n case JMP:\n jump = true;\n break;\n default:\n logw(\"String_Node_Str\" + Utils.binary16(instruction));\n }\n if (jump) {\n writeRegister(PC, pc + jmpOffset);\n }\n updateStatus = false;\n break;\n default:\n dstRegister = instruction & 0xf;\n int srcRegister = (instruction >> 8) & 0xf;\n int as = (instruction >> 4) & 3;\n dstRegMode = ((instruction >> 7) & 1) == 0;\n dstAddress = -1;\n int srcAddress = -1;\n src = 0;\n if ((srcRegister == CG1 && as > AM_INDEX) || srcRegister == CG2) {\n src = CREG_VALUES[srcRegister - 2][as];\n src &= mode.mask;\n cycles += dstRegMode ? 1 : 4;\n } else {\n switch(as) {\n case AM_REG:\n src = readRegister(srcRegister);\n src &= mode.mask;\n cycles += dstRegMode ? 1 : 4;\n if (dstRegister == PC)\n cycles++;\n if (dstRegMode) {\n if (repeatsInDstReg) {\n repeats = 1 + readRegister(ext3_0);\n } else {\n repeats = 1 + ext3_0;\n }\n zeroCarry = (extWord & EXTWORD_ZC) > 0;\n }\n break;\n case AM_INDEX:\n {\n int sval = readRegisterCG(srcRegister, as);\n if (sval <= 0xffff) {\n srcAddress = (sval + currentSegment.read(pc, AccessMode.WORD, AccessType.READ)) & 0xffff;\n } else {\n srcAddress = currentSegment.read(pc, AccessMode.WORD, AccessType.READ);\n if ((srcAddress & 0x8000) > 0) {\n srcAddress |= 0xf0000;\n }\n srcAddress += sval;\n srcAddress &= 0xfffff;\n }\n incRegister(PC, 2);\n cycles += dstRegMode ? 3 : 6;\n break;\n }\n case AM_IND_REG:\n srcAddress = readRegister(srcRegister);\n cycles += dstRegMode ? 2 : 5;\n break;\n case AM_IND_AUTOINC:\n if (srcRegister == PC) {\n srcAddress = readRegister(PC);\n pc += 2;\n incRegister(PC, 2);\n cycles += dstRegMode ? 2 : 5;\n } else {\n srcAddress = readRegister(srcRegister);\n incRegister(srcRegister, mode.bytes);\n cycles += dstRegMode ? 2 : 5;\n }\n if (dstRegister == PC) {\n cycles++;\n }\n break;\n }\n }\n if (dstRegMode) {\n if (op != MOV) {\n dst = readRegister(dstRegister);\n dst &= mode.mask;\n }\n } else {\n pc = readRegister(PC);\n if (dstRegister == 2) {\n dstAddress = currentSegment.read(pc, AccessMode.WORD, AccessType.READ);\n } else {\n rval = readRegister(dstRegister);\n if (rval <= 0xffff) {\n dstAddress = (rval + currentSegment.read(pc, AccessMode.WORD, AccessType.READ)) & 0xffff;\n } else {\n dstAddress = currentSegment.read(pc, AccessMode.WORD, AccessType.READ);\n if ((dstAddress & 0x8000) > 0) {\n dstAddress |= 0xf0000;\n }\n dstAddress += rval;\n dstAddress &= 0xfffff;\n }\n }\n if (op != MOV) {\n dst = currentSegment.read(dstAddress, word ? AccessMode.WORD : AccessMode.BYTE, AccessType.READ);\n }\n pc += 2;\n incRegister(PC, 2);\n }\n if (srcAddress != -1) {\n src = currentSegment.read(srcAddress, mode, AccessType.READ);\n }\n while (repeats-- > 0) {\n sr = readRegister(SR);\n if (repeats >= 0) {\n if (zeroCarry) {\n sr = sr & ~CARRY;\n }\n }\n int tmp = 0;\n int tmpAdd = 0;\n switch(op) {\n case MOV:\n dst = src;\n write = true;\n updateStatus = false;\n if (instruction == RETURN && profiler != null) {\n profiler.profileReturn(cpuCycles);\n }\n break;\n case SUB:\n tmpAdd = 1;\n case SUBC:\n src = (src ^ 0xffff) & 0xffff;\n case ADDC:\n if (op == ADDC || op == SUBC)\n tmpAdd = ((sr & CARRY) > 0) ? 1 : 0;\n case ADD:\n sr &= ~(OVERFLOW | CARRY);\n int b = word ? 0x8000 : (wordx20 ? 0x80000 : 0x80);\n tmp = (src ^ dst) & b;\n dst = dst + src + tmpAdd;\n int b2 = word ? 0xffff : (wordx20 ? 0xfffff : 0xff);\n if (dst > b2) {\n sr |= CARRY;\n }\n if (tmp == 0 && ((src ^ dst) & b) != 0) {\n sr |= OVERFLOW;\n }\n writeRegister(SR, sr);\n write = true;\n break;\n case CMP:\n b = mode.msb;\n sr = (sr & ~(CARRY | OVERFLOW)) | (dst >= src ? CARRY : 0);\n tmp = (dst - src);\n if (((src ^ tmp) & b) == 0 && (((src ^ dst) & b) != 0)) {\n sr |= OVERFLOW;\n }\n writeRegister(SR, sr);\n dst = tmp;\n break;\n case DADD:\n if (DEBUG)\n log(\"String_Node_Str\");\n dst = dst + src + ((sr & CARRY) > 0 ? 1 : 0);\n write = true;\n break;\n case BIT:\n dst = src & dst;\n sr = sr & ~(CARRY | OVERFLOW);\n if (dst != 0) {\n sr |= CARRY;\n }\n writeRegister(SR, sr);\n break;\n case BIC:\n dst = (~src) & dst;\n write = true;\n updateStatus = false;\n break;\n case BIS:\n dst = src | dst;\n write = true;\n updateStatus = false;\n break;\n case XOR:\n sr = sr & ~(CARRY | OVERFLOW);\n b = mode.msb;\n if ((src & b) != 0 && (dst & b) != 0) {\n sr |= OVERFLOW;\n }\n dst = src ^ dst;\n if (dst != 0) {\n sr |= CARRY;\n }\n write = true;\n writeRegister(SR, sr);\n break;\n case AND:\n sr = sr & ~(CARRY | OVERFLOW);\n dst = src & dst;\n if (dst != 0) {\n sr |= CARRY;\n }\n write = true;\n writeRegister(SR, sr);\n break;\n default:\n String address = getAddressAsString(pc);\n logw(\"String_Node_Str\" + Integer.toHexString(op) + \"String_Node_Str\" + address);\n if (EXCEPTION_ON_BAD_OPERATION) {\n EmulationException ex = new EmulationException(\"String_Node_Str\" + Integer.toHexString(op) + \"String_Node_Str\" + address);\n ex.initCause(new Throwable(\"String_Node_Str\" + pc));\n throw ex;\n }\n }\n if (repeats > 0 && srcRegister == dstRegister) {\n src = dst;\n src &= mode.mask;\n }\n }\n }\n dst &= mode.mask;\n if (write) {\n if (dstRegMode) {\n writeRegister(dstRegister, dst);\n } else {\n dstAddress &= 0xffff;\n currentSegment.write(dstAddress, dst, mode);\n }\n }\n if (updateStatus) {\n sr = readRegister(SR);\n sr = (sr & ~(ZERO | NEGATIVE)) | ((dst == 0) ? ZERO : 0) | ((dst & mode.msb) > 0 ? NEGATIVE : 0);\n writeRegister(SR, sr);\n }\n while (cycles >= nextEventCycles) {\n executeEvents();\n }\n cpuCycles += cycles - startCycles;\n return pcBefore;\n}\n"
"public void testRuntimeArgs() throws Exception {\n String qualifiedServiceId = String.format(\"String_Node_Str\", FakeApp.NAME, PrefixedEchoHandler.NAME);\n ServiceId service = NamespaceId.DEFAULT.app(FakeApp.NAME).service(PrefixedEchoHandler.NAME);\n testServiceRuntimeArgs(qualifiedServiceId, service);\n}\n"
"ServiceReference getServiceReference() {\n return (closed) ? null : exportReference.getExportedService();\n}\n"
"public double getY() {\n return longitude;\n}\n"
"public ListenableActionFuture<SQLReduceJobResponse> reduceOperationStart(SQLReduceJobRequest request) {\n ParsedStatement parsedStatement = sqlParseService.parse(request.request.stmt(), request.request.args());\n SQLReduceJobStatus reduceJobStatus = new SQLReduceJobStatus(parsedStatement, threadPool, request.expectedShardResults, request.contextId, reduceJobStatusContext);\n final WeakReference<SQLReduceJobStatus> weakStatus = new WeakReference<>(reduceJobStatus);\n scheduledExecutorService.schedule(new Runnable() {\n public void run() {\n SQLReduceJobStatus status = weakStatus.get();\n if (status != null) {\n status.timeout();\n }\n }\n }, Constants.GROUP_BY_TIMEOUT, TimeUnit.SECONDS);\n try {\n reduceJobStatusContext.put(request.contextId, reduceJobStatus);\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n }\n return reduceJobStatus;\n}\n"
"protected void fillMenu(Menu menu) {\n IRepositoryView repositoryView = RepositoryManagerHelper.findRepositoryView();\n if (repositoryView == null) {\n return;\n }\n if (repositoryView.containsRepositoryType(ERepositoryObjectType.PROCESS)) {\n IDesignerCoreService service = (IDesignerCoreService) GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);\n addToMenu(menu, service.getCreateProcessAction(true), -1);\n }\n IExtensionRegistry registry = Platform.getExtensionRegistry();\n IConfigurationElement[] configurationElements = registry.getConfigurationElementsFor(\"String_Node_Str\");\n for (IConfigurationElement element : configurationElements) {\n try {\n AContextualAction action = (AContextualAction) element.createExecutableExtension(\"String_Node_Str\");\n action.setToolbar(true);\n action.setWorkbenchPart(repositoryView);\n addToMenu(menu, action, -1);\n } catch (CoreException e) {\n ExceptionHandler.process(e);\n }\n }\n addSeparator(menu);\n if (repositoryView.containsRepositoryType(ERepositoryObjectType.BUSINESS_PROCESS)) {\n IRepositoryNode businessNode = repositoryView.getRoot().getRootRepositoryNode(ERepositoryObjectType.BUSINESS_PROCESS);\n List<IRepositoryNode> children = repositoryView.getRoot().getChildren();\n boolean flag = false;\n for (IRepositoryNode node : children) {\n if (node.getLabel().equals(businessNode.getLabel())) {\n flag = true;\n break;\n }\n }\n if (flag) {\n IDiagramModelService service = (IDiagramModelService) GlobalServiceRegister.getDefault().getService(IDiagramModelService.class);\n addToMenu(menu, service.getCreateDiagramAction(true), -1);\n addSeparator(menu);\n }\n }\n if (repositoryView.containsRepositoryType(ERepositoryObjectType.METADATA_CONNECTIONS)) {\n final CreateConnectionAction createConnectionAction = new CreateConnectionAction(true);\n createConnectionAction.setWorkbenchPart(repositoryView);\n addToMenu(menu, createConnectionAction, -1);\n }\n if (repositoryView.containsRepositoryType(ERepositoryObjectType.METADATA_FILE_DELIMITED)) {\n final CreateFileDelimitedAction createFileDelimitedAction = new CreateFileDelimitedAction(true);\n createFileDelimitedAction.setWorkbenchPart(repositoryView);\n addToMenu(menu, createFileDelimitedAction, -1);\n }\n if (repositoryView.containsRepositoryType(ERepositoryObjectType.METADATA_FILE_POSITIONAL)) {\n final CreateFilePositionalAction createFilePositionalAction = new CreateFilePositionalAction(true);\n createFilePositionalAction.setWorkbenchPart(repositoryView);\n addToMenu(menu, createFilePositionalAction, -1);\n }\n if (repositoryView.containsRepositoryType(ERepositoryObjectType.METADATA_FILE_REGEXP)) {\n final CreateFileRegexpAction createFileRegexpAction = new CreateFileRegexpAction(true);\n createFileRegexpAction.setWorkbenchPart(repositoryView);\n addToMenu(menu, createFileRegexpAction, -1);\n }\n if (repositoryView.containsRepositoryType(ERepositoryObjectType.METADATA_FILE_XML)) {\n final CreateFileXmlAction createFileXmlAction = new CreateFileXmlAction(true);\n createFileXmlAction.setWorkbenchPart(repositoryView);\n addToMenu(menu, createFileXmlAction, -1);\n }\n if (repositoryView.containsRepositoryType(ERepositoryObjectType.METADATA_FILE_EXCEL)) {\n final CreateFileExcelAction createFileExcelAction = new CreateFileExcelAction(true);\n createFileExcelAction.setWorkbenchPart(repositoryView);\n addToMenu(menu, createFileExcelAction, -1);\n }\n if (repositoryView.containsRepositoryType(ERepositoryObjectType.METADATA_FILE_LDIF)) {\n final CreateFileLdifAction createFileLdifAction = new CreateFileLdifAction(true);\n createFileLdifAction.setWorkbenchPart(repositoryView);\n addToMenu(menu, createFileLdifAction, -1);\n }\n if (repositoryView.containsRepositoryType(ERepositoryObjectType.METADATA_LDAP_SCHEMA)) {\n final CreateLDAPSchemaAction createLDAPSchemaAction = new CreateLDAPSchemaAction(true);\n createLDAPSchemaAction.setWorkbenchPart(repositoryView);\n addToMenu(menu, createLDAPSchemaAction, -1);\n }\n if (repositoryView.containsRepositoryType(ERepositoryObjectType.METADATA_SALESFORCE_SCHEMA)) {\n final CreateSalesforceSchemaAction createSalesforceModulesAction = new CreateSalesforceSchemaAction(true);\n createSalesforceModulesAction.setWorkbenchPart(repositoryView);\n addToMenu(menu, createSalesforceModulesAction, -1);\n }\n if (repositoryView.containsRepositoryType(ERepositoryObjectType.METADATA_GENERIC_SCHEMA)) {\n final CreateGenericSchemaAction createGenericSchemaAction = new CreateGenericSchemaAction(true);\n createGenericSchemaAction.setWorkbenchPart(repositoryView);\n addToMenu(menu, createGenericSchemaAction, -1);\n }\n if (repositoryView.containsRepositoryType(ERepositoryObjectType.METADATA_WSDL_SCHEMA)) {\n final CreateWSDLSchemaAction createWSDLSchemaAction = new CreateWSDLSchemaAction(true);\n createWSDLSchemaAction.setWorkbenchPart(repositoryView);\n addToMenu(menu, createWSDLSchemaAction, -1);\n }\n addSeparator(menu);\n if (repositoryView.containsRepositoryType(ERepositoryObjectType.ROUTINES)) {\n IRepositoryService service = (IRepositoryService) GlobalServiceRegister.getDefault().getService(IRepositoryService.class);\n addToMenu(menu, service.getCreateRoutineAction(repositoryView), -1);\n }\n}\n"
"private void handleReferenced(RepositoryNode parent) {\n if (parent.getType().equals(ENodeType.SYSTEM_FOLDER)) {\n for (ProjectReference refProject : (List<ProjectReference>) project.getEmfProject().getReferencedProjects()) {\n String parentBranch = ProjectManager.getInstance().getMainProjectBranch(project);\n if (refProject.getBranch() == null || refProject.getBranch().equals(parentBranch)) {\n Project emfProject = refProject.getReferencedProject();\n ProjectRepositoryNode referencedProjectNode = new ProjectRepositoryNode(new org.talend.core.model.general.Project(emfProject), null, parent, this, ENodeType.REFERENCED_PROJECT);\n referencedProjectNode.setProperties(EProperties.LABEL, emfProject.getLabel());\n referencedProjectNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.REFERENCED_PROJECTS);\n parent.getChildren().add(referencedProjectNode);\n referencedProjectNode.initialize(currentPerspective);\n }\n }\n }\n}\n"
"public void collectionProcessComplete() throws AnalysisEngineProcessException {\n closeQuietly(writer);\n}\n"
"protected String getParamValueAsString(HttpServletRequest request, ScalarParameterHandle parameter) {\n String paramName = parameter.getName();\n String paramValue = null;\n if (ParameterAccessor.isReportParameterExist(request, paramName)) {\n paramValue = ParameterAccessor.getReportParameter(request, paramName, null);\n }\n if (paramValue != null)\n return paramValue;\n Object paramValueObj = null;\n if (isDesigner && (IBirtConstants.SERVLET_PATH_RUN.equalsIgnoreCase(request.getServletPath()) || IBirtConstants.SERVLET_PATH_PARAMETER.equalsIgnoreCase(request.getServletPath())) && this.configMap != null && this.configMap.containsKey(paramName)) {\n paramValueObj = this.configMap.get(paramName);\n } else if (this.parameterMap != null && this.parameterMap.containsKey(paramName)) {\n paramValueObj = this.parameterMap.get(paramName);\n paramValueObj = ParameterValidationUtil.getDisplayValue(null, parameter.getPattern(), paramValueObj, locale);\n }\n if (paramValueObj != null)\n paramValue = paramValueObj.toString();\n return paramValue;\n}\n"
"public List<T> onCompleted(Response response) throws Exception {\n logResponse(response);\n if (isStatus2xx(response)) {\n JsonNode responseNode = mapper.readTree(response.getResponseBodyAsBytes());\n int count = responseNode.get(\"String_Node_Str\").asInt();\n if (count > readCount.get()) {\n List<T> values = new ArrayList<T>();\n for (JsonNode node : responseNode.get(name)) {\n values.add(mapper.convertValue(node, clazz));\n readCount.incrementAndGet();\n }\n return values;\n } else {\n return null;\n }\n return values;\n }\n throw new ZendeskResponseException(response);\n}\n"
"public String toString() {\n return request == null ? \"String_Node_Str\" : request.toString();\n}\n"
"private void startRepeatingTask() {\n mHandler.post(secondsAnimation);\n}\n"
"protected void configureNifty() {\n bind().toInstance(new ThriftServerDefBuilder().listen(8080).withProcessor(new scribe.Processor<scribe.Iface>(new scribe.Iface() {\n\n public ResultCode Log(List<LogEntry> messages) throws TException {\n for (LogEntry message : messages) {\n log.info(\"String_Node_Str\", message.getCategory(), message.getMessage());\n }\n return ResultCode.OK;\n }\n })).build());\n}\n"
"public void createPartControl(Composite parent) {\n super.createPartControl(parent);\n createGLCanvas();\n view = new GLTagCloud(glCanvas, parentComposite, serializedView.getViewFrustum());\n initializeView();\n createPartControlGL();\n}\n"
"public long getKeepAliveDuration(HttpResponse response, HttpContext context) {\n HeaderElementIterator it = new BasicHeaderElementIterator(response.headerIterator(HTTP.CONN_KEEP_ALIVE));\n while (it.hasNext()) {\n HeaderElement he = it.nextElement();\n String param = he.getName();\n String value = he.getValue();\n if (value != null && \"String_Node_Str\".equalsIgnoreCase(param)) {\n try {\n return Long.parseLong(value) * 1000;\n } catch (NumberFormatException ignore) {\n }\n }\n }\n return 30 * 1000;\n}\n"
"private void doWork() {\n while (!shouldExit.get()) {\n DateTime latestStableInChannel = getLatestStable();\n logger.trace(\"String_Node_Str\", channel, lastQueryTime, latestStableInChannel);\n if (lastQueryTime.isBefore(latestStableInChannel)) {\n TimeUtil.Unit unit = getStepUnit(latestStableInChannel);\n TimeQuery query = TimeQuery.builder().channelName(channel).startTime(lastQueryTime).unit(unit).build();\n query.trace(false);\n addKeys(channelService.queryByTime(query));\n lastQueryTime = lastQueryTime.plus(unit.getDuration());\n } else {\n Duration duration = new Duration(latestStableInChannel, lastQueryTime);\n logger.trace(\"String_Node_Str\", duration.getMillis());\n Sleeper.sleep(duration.getMillis());\n }\n }\n}\n"
"private void initCallUI(final JsonObject callInviteParams, VideoLayoutConfiguration aLocalVideoPosition) {\n Log.d(LOG_TAG, \"String_Node_Str\");\n if (isCallEnded()) {\n Log.w(LOG_TAG, \"String_Node_Str\");\n return;\n }\n if (isVideo()) {\n Log.d(LOG_TAG, \"String_Node_Str\");\n VideoRendererGui.setView(mCallView, new Runnable() {\n public void run() {\n mUIThreadHandler.post(new Runnable() {\n public void run() {\n if (null == mPeerConnectionFactory) {\n Log.d(LOG_TAG, \"String_Node_Str\");\n mPeerConnectionFactory = new PeerConnectionFactory();\n createVideoTrack();\n createAudioTrack();\n createLocalStream();\n if (null != callInviteParams) {\n dispatchOnStateDidChange(CALL_STATE_RINGING);\n setRemoteDescription(callInviteParams);\n }\n }\n });\n }\n });\n } catch (Exception e) {\n Log.e(LOG_TAG, \"String_Node_Str\" + e.getMessage());\n }\n try {\n Log.d(LOG_TAG, \"String_Node_Str\");\n if (isConference()) {\n mLargeRemoteRenderer = VideoRendererGui.createGui(0, 0, 100, 100, VideoRendererGui.ScalingType.SCALE_ASPECT_FIT, false);\n } else {\n mLargeRemoteRenderer = VideoRendererGui.createGui(0, 0, 100, 100, VideoRendererGui.ScalingType.SCALE_ASPECT_FILL, false);\n }\n mLargeLocalRendererCallbacks = VideoRendererGui.create(0, 0, 100, 100, VideoRendererGui.ScalingType.SCALE_ASPECT_FILL, true);\n mLargeLocalRenderer = new VideoRenderer(mLargeLocalRendererCallbacks);\n if (null != aLocalVideoPosition) {\n mSmallLocalRendererCallbacks = VideoRendererGui.create(aLocalVideoPosition.mX, aLocalVideoPosition.mY, aLocalVideoPosition.mWidth, aLocalVideoPosition.mHeight, VideoRendererGui.ScalingType.SCALE_ASPECT_FIT, true);\n Log.d(LOG_TAG, \"String_Node_Str\" + aLocalVideoPosition);\n } else {\n mSmallLocalRendererCallbacks = VideoRendererGui.create(5, 5, 25, 25, VideoRendererGui.ScalingType.SCALE_ASPECT_FIT, true);\n }\n mSmallLocalRenderer = new VideoRenderer(mSmallLocalRendererCallbacks);\n } catch (Exception e) {\n Log.e(LOG_TAG, \"String_Node_Str\" + e.getMessage());\n }\n mCallView.setVisibility(View.VISIBLE);\n } else {\n Log.d(LOG_TAG, \"String_Node_Str\");\n mUIThreadHandler.post(new Runnable() {\n public void run() {\n if (null == mPeerConnectionFactory) {\n mPeerConnectionFactory = new PeerConnectionFactory();\n createAudioTrack();\n createLocalStream();\n if (null != callInviteParams) {\n dispatchOnStateDidChange(CALL_STATE_RINGING);\n setRemoteDescription(callInviteParams);\n }\n }\n }\n });\n }\n}\n"
"private void fillDefaultValues(DatabaseConnection connection) {\n String distribution = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_DISTRIBUTION);\n String version = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_VERSION);\n String[] hiveServersDisplay = HiveMetadataHelper.getHiveServersDisplay(distribution, version, false);\n if (hiveServersDisplay == null || hiveServersDisplay.length == 0) {\n return;\n }\n HiveServerVersionInfo server = HiveServerVersionInfo.getByDisplay(hiveServersDisplay[0]);\n String hiveServer = server.getKey();\n connection.getParameters().put(ConnParameterKeys.HIVE_SERVER_VERSION, hiveServer);\n if (StringUtils.isEmpty(connection.getSID())) {\n String defaultDatabase = HadoopDefaultConfsManager.getInstance().getDefaultConfValue(distribution, EHadoopCategory.HIVE.getName(), EHadoopProperties.DATABASE.getName());\n if (StringUtils.isNotEmpty(defaultDatabase)) {\n connection.setSID(defaultDatabase);\n }\n }\n if (StringUtils.isEmpty(connection.getPort())) {\n String defaultPort = null;\n if (isEmbeddedMode) {\n defaultPort = HadoopDefaultConfsManager.getInstance().getDefaultConfValue(distribution, EHadoopCategory.HIVE.getName(), HiveModeInfo.EMBEDDED.getName(), EHadoopProperties.PORT.getName());\n } else {\n defaultPort = HadoopDefaultConfsManager.getInstance().getDefaultConfValue(distribution, EHadoopCategory.HIVE.getName(), HiveModeInfo.STANDALONE.getName(), EHadoopProperties.PORT.getName());\n }\n if (StringUtils.isNotEmpty(defaultPort)) {\n connection.setPort(defaultPort);\n }\n }\n if (StringUtils.isEmpty(connection.getURL())) {\n String template = null;\n if (HiveServerVersionInfo.HIVE_SERVER_2.getKey().equals(hiveServer)) {\n template = DbConnStrForHive.URL_HIVE_2_TEMPLATE;\n } else {\n template = DbConnStrForHive.URL_HIVE_1_TEMPLATE;\n }\n String url = DatabaseConnStrUtil.getHiveURLString(connection, connection.getServerName(), connection.getPort(), connection.getSID(), template);\n if (StringUtils.isNotEmpty(url)) {\n connection.setURL(url);\n }\n }\n}\n"
"private HandlerProcessingResult processAnnotations(ProcessingContext ctx, AnnotatedElement element) throws AnnotationProcessorException {\n HandlerProcessingResultImpl result = new HandlerProcessingResultImpl();\n try {\n for (Annotation annotation : element.getAnnotations()) {\n AnnotationInfo subElement = new AnnotationInfo(ctx, element, annotation, getTopElementType());\n if (!result.processedAnnotations().containsKey(annotation.annotationType())) {\n process(ctx, subElement, result);\n } else {\n if (AnnotationUtils.shouldLog(\"String_Node_Str\")) {\n logger.finer(\"String_Node_Str\" + annotation.annotationType() + \"String_Node_Str\");\n }\n }\n }\n } catch (ArrayStoreException e) {\n logger.info(\"String_Node_Str\" + e.toString() + \"String_Node_Str\" + element + \"String_Node_Str\" + e.getMessage() + \"String_Node_Str\");\n }\n return result;\n}\n"
"public Object[] callMethod(IComputerAccess computer, int method, Object[] arguments) throws Exception {\n if (this.prevDian < this.YAO_DIAN) {\n throw new Exception(\"String_Node_Str\");\n }\n List<Double> returnArray;\n switch(method) {\n case 0:\n List<EDaoDan> daoDans = DaoDanGuanLi.getMissileInArea(Vector3.get(this).toVector2(), this.alarmBanJing);\n returnArray = new ArrayList<Double>();\n for (EDaoDan daoDan : daoDans) {\n returnArray.add(daoDan.posX);\n returnArray.add(daoDan.posY);\n returnArray.add(daoDan.posZ);\n }\n return returnArray.toArray();\n case 1:\n returnArray = new ArrayList<Double>();\n for (TLeiDaTai radarStation : LeiDaGuanLi.getRadarStationsInArea(new Vector2(this.xCoord - this.MAX_BIAN_JING, this.zCoord - this.MAX_BIAN_JING), new Vector2(this.xCoord + this.MAX_BIAN_JING, this.zCoord + this.MAX_BIAN_JING))) {\n if (!radarStation.isDisabled() && radarStation.prevDian > 0) {\n returnArray.add((double) radarStation.xCoord);\n returnArray.add((double) radarStation.yCoord);\n returnArray.add((double) radarStation.zCoord);\n }\n }\n return returnArray.toArray();\n }\n throw new Exception(\"String_Node_Str\");\n}\n"
"public boolean processArguments(String[] args) throws Exception {\n log.info(\"String_Node_Str\" + Arrays.toString(args).replace(\"String_Node_Str\", \"String_Node_Str\"));\n ConfigurationProperties.clear();\n CommandLine cmd = null;\n try {\n cmd = parser.parse(options, args);\n } catch (UnrecognizedOptionException e) {\n System.out.println(\"String_Node_Str\" + e.getMessage());\n help();\n return false;\n }\n if (cmd.hasOption(\"String_Node_Str\")) {\n help();\n return false;\n }\n if (cmd.hasOption(\"String_Node_Str\")) {\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n } else {\n String javahome = System.getProperty(\"String_Node_Str\");\n File location = new File(javahome);\n if (location.getName().equals(\"String_Node_Str\")) {\n javahome = location.getParent() + File.separator + \"String_Node_Str\";\n File javalocationbin = new File(javahome);\n if (!javalocationbin.exists()) {\n System.err.println(\"String_Node_Str\");\n return false;\n }\n }\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", javahome);\n }\n if (cmd.hasOption(\"String_Node_Str\")) {\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n } else {\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", ConfigurationProperties.properties.getProperty(\"String_Node_Str\"));\n }\n if (!ProjectConfiguration.validJDK()) {\n System.err.println(\"String_Node_Str\");\n return false;\n }\n if (!this.isExample(cmd)) {\n String dependenciespath = cmd.getOptionValue(\"String_Node_Str\");\n String failing = cmd.getOptionValue(\"String_Node_Str\");\n String location = cmd.getOptionValue(\"String_Node_Str\");\n if (failing == null || location == null) {\n help();\n return false;\n }\n if (dependenciespath != null) {\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", dependenciespath);\n }\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", failing);\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", location);\n }\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n String outputPath = \"String_Node_Str\";\n if (cmd.hasOption(\"String_Node_Str\")) {\n outputPath = cmd.getOptionValue(\"String_Node_Str\");\n } else {\n outputPath = ConfigurationProperties.properties.getProperty(\"String_Node_Str\");\n }\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", (new File(outputPath)).getAbsolutePath());\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\")) {\n try {\n double thfl = Double.valueOf(cmd.getOptionValue(\"String_Node_Str\"));\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n } catch (Exception e) {\n System.out.println(\"String_Node_Str\");\n help();\n return false;\n }\n }\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\")) {\n String hour = cmd.getOptionValue(\"String_Node_Str\");\n try {\n TimeUtil.tranformHours(hour);\n } catch (Exception e) {\n System.out.println(\"String_Node_Str\");\n }\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", hour);\n }\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", Boolean.toString(cmd.hasOption(\"String_Node_Str\")));\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", Boolean.toString(!(cmd.hasOption(\"String_Node_Str\"))));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n if (cmd.hasOption(\"String_Node_Str\"))\n ConfigurationProperties.properties.setProperty(\"String_Node_Str\", cmd.getOptionValue(\"String_Node_Str\"));\n RandomManager.initialize();\n return true;\n}\n"
"public void buildCellStyle(ICellContent cell, StringBuffer styleBuffer, boolean isHead) {\n if (HTMLRenderOption.LAYOUT_PREFERENCE_FIXED.equals(layoutPreference)) {\n styleBuffer.append(\"String_Node_Str\");\n }\n IStyle style = cell.getStyle();\n CSSValue display = style.getProperty(IStyle.STYLE_DISPLAY);\n if (IStyle.NONE_VALUE == display) {\n styleBuffer.append(\"String_Node_Str\");\n }\n style = getElementStyle(cell);\n if (style == null) {\n return;\n }\n AttributeBuilder.buildFont(styleBuffer, style);\n AttributeBuilder.buildBox(styleBuffer, style);\n AttributeBuilder.buildBackground(styleBuffer, style, reportEmitter);\n AttributeBuilder.buildText(styleBuffer, style);\n AttributeBuilder.buildVisual(styleBuffer, style);\n AttributeBuilder.buildTextDecoration(styleBuffer, style);\n}\n"
"public LastComposedWord commitWord(final int type, final String committedWord, final String separatorString, final String prevWord) {\n final int[] primaryKeyCodes = mPrimaryKeyCodes;\n mPrimaryKeyCodes = new int[MAX_WORD_LENGTH];\n final LastComposedWord lastComposedWord = new LastComposedWord(primaryKeyCodes, mInputPointers, mTypedWord.toString(), committedWord, separatorString, prevWord, mCapitalizedMode);\n mInputPointers.reset();\n if (type != LastComposedWord.COMMIT_TYPE_DECIDED_WORD && type != LastComposedWord.COMMIT_TYPE_MANUAL_PICK) {\n lastComposedWord.deactivate();\n }\n mCapsCount = 0;\n mDigitsCount = 0;\n mIsBatchMode = false;\n mPreviousWordForSuggestion = committedWord;\n mTypedWord.setLength(0);\n mCodePointSize = 0;\n mTrailingSingleQuotesCount = 0;\n mIsFirstCharCapitalized = false;\n mCapitalizedMode = CAPS_MODE_OFF;\n refreshSize();\n mAutoCorrection = null;\n mCursorPositionWithinWord = 0;\n mIsResumed = false;\n mRejectedBatchModeSuggestion = null;\n return lastComposedWord;\n}\n"
"public void render(Renderer renderer, StringOutput target, Component source, URLBuilder ubu, Translator translator, RenderResult renderResult, String[] args) {\n Choice choice = (Choice) source;\n TableDataModel<?> tdm = choice.getTableDataModel();\n boolean iframePostEnabled = renderer.getGlobalSettings().getAjaxFlags().isIframePostEnabled();\n String id = choice.getComponentName() + \"String_Node_Str\" + choice.hashCode();\n target.append(\"String_Node_Str\").append(id).append(\"String_Node_Str\").append(id).append(\"String_Node_Str\");\n ubu.buildURI(target, null, null, iframePostEnabled ? AJAXFlags.MODE_TOBGIFRAME : AJAXFlags.MODE_NORMAL);\n target.append(\"String_Node_Str\");\n if (iframePostEnabled) {\n ubu.appendTarget(target);\n }\n target.append(\"String_Node_Str\");\n target.append(\"String_Node_Str\");\n int rows = tdm.getRowCount();\n int cols = tdm.getColumnCount();\n for (int i = 0; i < rows; i++) {\n target.append(\"String_Node_Str\");\n for (int j = 0; j < cols; j++) {\n Object val = tdm.getValueAt(i, j);\n if (j == 0) {\n target.append(\"String_Node_Str\");\n boolean selected = ((Boolean) val).booleanValue();\n String keyN = \"String_Node_Str\" + i;\n target.append(\"String_Node_Str\");\n if (selected)\n target.append(\"String_Node_Str\");\n target.append(\"String_Node_Str\").append(keyN).append(\"String_Node_Str\").append(id).append(\"String_Node_Str\");\n } else {\n target.append(\"String_Node_Str\");\n String sVal = val.toString();\n target.append(StringEscapeUtils.escapeHtml(sVal));\n }\n target.append(\"String_Node_Str\");\n }\n target.append(\"String_Node_Str\");\n }\n target.append(\"String_Node_Str\").append(cols).append(\"String_Node_Str\");\n target.append(\"String_Node_Str\");\n target.append(\"String_Node_Str\" + id + \"String_Node_Str\");\n target.append(\"String_Node_Str\");\n target.append(translator.translate(\"String_Node_Str\"));\n target.append(\"String_Node_Str\" + id + \"String_Node_Str\");\n target.append(\"String_Node_Str\");\n target.append(translator.translate(\"String_Node_Str\"));\n target.append(\"String_Node_Str\");\n target.append(\"String_Node_Str\");\n target.append(\"String_Node_Str\").append(cols).append(\"String_Node_Str\");\n target.append(\"String_Node_Str\" + StringEscapeUtils.escapeHtml(translator.translate(choice.getSubmitKey())) + \"String_Node_Str\");\n String cancelKey = choice.getCancelKey();\n if (cancelKey != null) {\n target.append(\"String_Node_Str\" + Choice.CANCEL_IDENTIFICATION + \"String_Node_Str\" + StringEscapeUtils.escapeHtml(translator.translate(cancelKey)) + \"String_Node_Str\");\n }\n target.append(\"String_Node_Str\");\n}\n"
"private Response<Object> invokeByName(MethodCall<Object> methodCall) {\n final MethodAccess method = classMeta.method(methodCall.name());\n if (method != null) {\n return mapArgsAsyncHandlersAndInvoke(methodCall, method);\n } else {\n if (methodCall.name().equals(\"String_Node_Str\")) {\n puts(\"String_Node_Str\", methodCall.objectName(), methodCall.name(), methodCall.address());\n return ResponseImpl.response(methodCall.id(), methodCall.timestamp(), methodCall.address(), methodCall.returnAddress(), sputs(\"String_Node_Str\", methodCall.objectName(), methodCall.name(), methodCall.address()), methodCall, false);\n } else {\n return ResponseImpl.response(methodCall.id(), methodCall.timestamp(), methodCall.address(), methodCall.returnAddress(), new Exception(\"String_Node_Str\" + methodCall.name()), methodCall, true);\n }\n }\n}\n"
"private String readNextString(FileChannel channel) throws IOException {\n return PrimitiveUtils.readLengthAndString(channel, buffer(100));\n}\n"
"protected void update(List<TableInfo> tableInfos) {\n for (TableInfo tableInfo : tableInfos) {\n if (tableInfo != null && tableInfo.getTableName() != null) {\n HTableDescriptor hTableDescriptor = getTableMetaData(tableInfo);\n try {\n HTableDescriptor descriptor = admin.getTableDescriptor(tableInfo.getTableName().getBytes());\n if (descriptor.getNameAsString().equalsIgnoreCase(tableInfo.getTableName())) {\n if (admin.isTableEnabled(tableInfo.getTableName().getBytes())) {\n admin.disableTable(tableInfo.getTableName().getBytes());\n }\n HColumnDescriptor[] descriptors = descriptor.getColumnFamilies();\n if (tableInfo.getColumnMetadatas() != null) {\n for (ColumnInfo columnInfo : tableInfo.getColumnMetadatas()) {\n boolean found = false;\n HColumnDescriptor columnDescriptor = new HColumnDescriptor(columnInfo.getColumnName());\n for (HColumnDescriptor hColumnDescriptor : descriptors) {\n if (hColumnDescriptor.getNameAsString().equalsIgnoreCase(columnInfo.getColumnName())) {\n found = true;\n break;\n }\n }\n if (!found) {\n admin.addColumn(tableInfo.getTableName(), columnDescriptor);\n }\n }\n if (!found) {\n admin.addColumn(tableInfo.getTableName(), columnDescriptor);\n }\n }\n }\n if (tableInfo.getEmbeddedColumnMetadatas() != null) {\n for (EmbeddedColumnInfo embeddedColumnInfo : tableInfo.getEmbeddedColumnMetadatas()) {\n boolean found = false;\n HColumnDescriptor columnDescriptor = new HColumnDescriptor(embeddedColumnInfo.getEmbeddedColumnName());\n for (HColumnDescriptor hColumnDescriptor : descriptors) {\n if (hColumnDescriptor.getNameAsString().equalsIgnoreCase(embeddedColumnInfo.getEmbeddedColumnName())) {\n found = true;\n break;\n }\n }\n if (!found) {\n admin.addColumn(tableInfo.getTableName(), columnDescriptor);\n }\n }\n }\n }\n } catch (IOException e) {\n try {\n admin.createTable(hTableDescriptor);\n } catch (IOException e1) {\n logger.error(\"String_Node_Str\" + e.getMessage());\n throw new SchemaGenerationException(e, \"String_Node_Str\");\n }\n }\n }\n}\n"
"protected void setUp() throws Exception {\n super.setUp();\n jruby = new ScriptingContainer(LocalContextScope.SINGLETHREAD);\n xs = new XStream() {\n protected MapperWrapper wrapMapper(MapperWrapper next) {\n return new JRubyMapper(next);\n }\n };\n JRubyXStream.register(xs, jruby.getProvider().getRuntime());\n}\n"
"public void startRequest(MRCRequest rq) throws Throwable {\n if (master.getReplMasterUUID() != null && !master.getReplMasterUUID().equals(master.getConfig().getUUID().toString()))\n throw new DatabaseException(ExceptionType.REDIRECT);\n final openRequest rqArgs = (openRequest) rq.getRequestArgs();\n final VolumeManager vMan = master.getVolumeManager();\n final FileAccessManager faMan = master.getFileAccessManager();\n Path p = new Path(rqArgs.getVolumeName(), rqArgs.getPath());\n StorageManager sMan = vMan.getStorageManagerByName(p.getComp(0));\n PathResolver res = new PathResolver(sMan, p);\n VolumeInfo volume = sMan.getVolumeInfo();\n faMan.checkSearchPermission(sMan, res, rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n AtomicDBUpdate update = sMan.createAtomicDBUpdate(master, rq);\n FileMetadata file = null;\n boolean create = (rqArgs.getFlags() & FileAccessManager.O_CREAT) != 0;\n boolean excl = (rqArgs.getFlags() & FileAccessManager.O_EXCL) != 0;\n boolean truncate = (rqArgs.getFlags() & FileAccessManager.O_TRUNC) != 0;\n boolean write = (rqArgs.getFlags() & (FileAccessManager.O_WRONLY | FileAccessManager.O_RDWR)) != 0;\n boolean createNew = false;\n int time = (int) (TimeSync.getGlobalTime() / 1000);\n try {\n long volumeQuota = volume.getVolumeQuota();\n if ((write || create) && volumeQuota != 0 && volumeQuota <= volume.getVolumeSize()) {\n throw new UserException(POSIXErrno.POSIX_ERROR_ENOSPC, \"String_Node_Str\");\n }\n res.checkIfFileDoesNotExist();\n if (create && excl)\n res.checkIfFileExistsAlready();\n file = res.getFile();\n if (file.isDirectory() || sMan.getSoftlinkTarget(file.getId()) != null)\n throw new UserException(POSIXErrno.POSIX_ERROR_EISDIR, \"String_Node_Str\");\n if (file.isReadOnly() && ((rqArgs.getFlags() & (FileAccessManager.O_RDWR | FileAccessManager.O_WRONLY | FileAccessManager.O_TRUNC | FileAccessManager.O_APPEND)) != 0))\n throw new UserException(POSIXErrno.POSIX_ERROR_EPERM, \"String_Node_Str\");\n faMan.checkPermission(rqArgs.getFlags(), sMan, file, res.getParentDirId(), rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n } catch (UserException exc) {\n if (exc.getErrno() == POSIXErrno.POSIX_ERROR_ENOENT && create) {\n faMan.checkPermission(FileAccessManager.O_WRONLY, sMan, res.getParentDir(), res.getParentsParentId(), rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n long fileId = sMan.getNextFileId();\n if ((rqArgs.getMode() & GlobalTypes.SYSTEM_V_FCNTL.SYSTEM_V_FCNTL_H_S_IFIFO.getNumber()) != 0) {\n throw new UserException(POSIXErrno.POSIX_ERROR_EIO, \"String_Node_Str\");\n }\n String groupId = rq.getDetails().groupIds.get(0);\n int parentMode = faMan.getPosixAccessMode(sMan, res.getParentDir(), rq.getDetails().userId, rq.getDetails().groupIds);\n if ((parentMode & 02000) > 0) {\n groupId = res.getParentDir().getOwningGroupId();\n }\n file = sMan.createFile(fileId, res.getParentDirId(), res.getFileName(), time, time, time, rq.getDetails().userId, groupId, rqArgs.getMode(), rqArgs.getAttributes(), 0, false, 0, 0, update);\n sMan.setLastFileId(fileId, update);\n createNew = true;\n } else\n throw exc;\n }\n XLocList xLocList = file.getXLocList();\n XLocSetLock lock = master.getXLocSetCoordinator().getXLocSetLock(file, sMan);\n if (lock.isLocked()) {\n if (lock.hasCrashed()) {\n XLoc[] replicas = new XLoc[xLocList.getReplicaCount()];\n for (int i = 0; i < xLocList.getReplicaCount(); i++) {\n replicas[i] = xLocList.getReplica(i);\n }\n xLocList = sMan.createXLocList(replicas, xLocList.getReplUpdatePolicy(), xLocList.getVersion() + 1);\n master.getXLocSetCoordinator().unlockXLocSet(file, sMan, update);\n } else {\n throw new UserException(POSIXErrno.POSIX_ERROR_EAGAIN, \"String_Node_Str\");\n }\n }\n int trEpoch = file.getEpoch();\n if (truncate) {\n file.setIssuedEpoch(file.getIssuedEpoch() + 1);\n trEpoch = file.getIssuedEpoch();\n sMan.setMetadata(file, FileMetadata.RC_METADATA, update);\n }\n ReplicationPolicy defaultReplPolicy = sMan.getDefaultReplicationPolicy(res.getParentDirId());\n if (defaultReplPolicy == null)\n defaultReplPolicy = sMan.getDefaultReplicationPolicy(1);\n boolean replicateOnClose = defaultReplPolicy != null && ReplicaUpdatePolicies.REPL_UPDATE_PC_RONLY.equals(defaultReplPolicy.getName());\n if ((xLocList == null || xLocList.getReplicaCount() == 0) && (create || write)) {\n boolean singleReplica = defaultReplPolicy == null || ReplicaUpdatePolicies.REPL_UPDATE_PC_NONE.equals(defaultReplPolicy.getName()) || replicateOnClose;\n if (singleReplica) {\n XLoc replica = MRCHelper.createReplica(null, sMan, master.getOSDStatusManager(), volume, res.getParentDirId(), p.toString(), ((InetSocketAddress) rq.getRPCRequest().getSenderAddress()).getAddress(), rqArgs.getCoordinates(), xLocList, 0);\n String[] osds = new String[replica.getOSDCount()];\n for (int j = 0; j < osds.length; j++) osds[j] = replica.getOSD(j);\n List<XLoc> repls = new ArrayList<XLoc>();\n repls.add(replica);\n xLocList = sMan.createXLocList(repls.toArray(new XLoc[repls.size()]), ReplicaUpdatePolicies.REPL_UPDATE_PC_NONE, 0);\n } else {\n int numReplicas = 1;\n if (defaultReplPolicy != null)\n numReplicas = defaultReplPolicy.getFactor();\n List<XLoc> repls = new ArrayList<XLoc>();\n for (int i = 0; i < numReplicas; i++) {\n XLoc replica = MRCHelper.createReplica(null, sMan, master.getOSDStatusManager(), volume, res.getParentDirId(), p.toString(), ((InetSocketAddress) rq.getRPCRequest().getSenderAddress()).getAddress(), rqArgs.getCoordinates(), xLocList, defaultReplPolicy != null ? defaultReplPolicy.getFlags() : 0);\n String[] osds = new String[replica.getOSDCount()];\n for (int j = 0; j < osds.length; j++) osds[j] = replica.getOSD(j);\n repls.add(replica);\n xLocList = sMan.createXLocList(repls.toArray(new XLoc[repls.size()]), defaultReplPolicy != null ? defaultReplPolicy.getName() : ReplicaUpdatePolicies.REPL_UPDATE_PC_NONE, 0);\n }\n }\n file.setXLocList(xLocList);\n sMan.setMetadata(file, FileMetadata.RC_METADATA, update);\n if (Logging.isDebug())\n Logging.logMessage(Logging.LEVEL_DEBUG, Category.proc, this, \"String_Node_Str\", volume.getId(), file.getId(), xLocList.toString());\n }\n XLocSet.Builder xLocSet = Converter.xLocListToXLocSet(xLocList);\n List<Replica> sortedReplList = master.getOSDStatusManager().getSortedReplicaList(volume.getId(), ((InetSocketAddress) rq.getRPCRequest().getSenderAddress()).getAddress(), rqArgs.getCoordinates(), xLocSet.getReplicasList(), xLocList).getReplicasList();\n xLocSet.clearReplicas();\n xLocSet.addAllReplicas(sortedReplList);\n xLocSet.setReadOnlyFileSize(file.getSize());\n Capability cap = new Capability(MRCHelper.createGlobalFileId(volume, file), rqArgs.getFlags(), master.getConfig().getCapabilityTimeout(), TimeSync.getGlobalTime() / 1000 + master.getConfig().getCapabilityTimeout(), ((InetSocketAddress) rq.getRPCRequest().getSenderAddress()).getAddress().getHostAddress(), trEpoch, replicateOnClose, !volume.isSnapshotsEnabled() ? SnapConfig.SNAP_CONFIG_SNAPS_DISABLED : volume.isSnapVolume() ? SnapConfig.SNAP_CONFIG_ACCESS_SNAP : SnapConfig.SNAP_CONFIG_ACCESS_CURRENT, volume.getCreationTime(), master.getConfig().getCapabilitySecret());\n if (Logging.isDebug())\n Logging.logMessage(Logging.LEVEL_DEBUG, Category.proc, this, \"String_Node_Str\", volume.getId(), file.getId(), cap.toString());\n if (createNew || truncate) {\n MRCHelper.updateFileTimes(res.getParentsParentId(), file, createNew ? !master.getConfig().isNoAtime() : false, true, true, sMan, time, update);\n } else if (!master.getConfig().isNoAtime()) {\n MRCHelper.updateFileTimes(res.getParentsParentId(), file, true, false, false, sMan, time, update);\n } else {\n time = 0;\n }\n if (createNew)\n MRCHelper.updateFileTimes(res.getParentsParentId(), res.getParentDir(), false, true, true, sMan, time, update);\n rq.setResponse(openResponse.newBuilder().setCreds(FileCredentials.newBuilder().setXcap(cap.getXCap()).setXlocs(xLocSet)).setTimestampS(time).build());\n update.execute();\n}\n"
"public TridentChunk loadChunkData(TridentWorld owner, ChunkLocation location) throws NBTException, IOException, DataFormatException {\n TridentChunk chunk = new TridentChunk(owner, location);\n short compression;\n byte[] compressedData;\n synchronized (this.readWriteLock) {\n RandomAccessFile access = new RandomAccessFile(this.path.toFile(), \"String_Node_Str\");\n access.seek((long) this.sectors.getTimeStampLocation(chunk));\n int lastUpdate = access.readInt();\n if (chunk.getLastFileAccess() > lastUpdate) {\n chunk.setLastFileAccess((int) (System.currentTimeMillis() / 1000L));\n access.close();\n return chunk;\n } else {\n chunk.setLastFileAccess((int) (System.currentTimeMillis() / 1000L));\n }\n access.seek((long) this.sectors.getDataLocation(chunk));\n int length = access.readInt();\n compression = (short) access.readByte();\n compressedData = new byte[length - 1];\n access.readFully(compressedData);\n access.close();\n }\n byte[] chunkData;\n switch(compression) {\n case 0:\n case 1:\n GZIPInputStream in = new GZIPInputStream(new ByteArrayInputStream(compressedData));\n chunkData = new byte[in.available()];\n in.read(chunkData);\n in.close();\n break;\n case 2:\n Inflater inflater = new Inflater();\n inflater.setInput(compressedData);\n byte[] buffer = new byte[1024];\n while (!(inflater.finished())) {\n int count = inflater.inflate(buffer);\n output.write(buffer, 0, count);\n }\n output.close();\n chunkData = output.toByteArray();\n inflater.end();\n break;\n default:\n throw new IllegalStateException(\"String_Node_Str\");\n }\n CompoundTag nbtData = new NBTDecoder(new DataInputStream(new ByteArrayInputStream(chunkData))).decode();\n chunk.load(nbtData);\n return chunk;\n}\n"
"private IMDMSVNProviderService getSvnProviderService() {\n if (svnProviderService == null) {\n try {\n if (GlobalServiceRegister.getDefault().isServiceRegistered(IMDMSVNProviderService.class)) {\n svnProviderService = (IMDMSVNProviderService) GlobalServiceRegister.getDefault().getService(IMDMSVNProviderService.class);\n }\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n }\n return svnProviderService;\n}\n"
"private void cutStone(ShortPoint2D pos) {\n short x = (short) (pos.getX() - 1);\n short y = (short) (pos.getY() + 1);\n AbstractHexMapObject stone = grid.getMapObject(x, y, EMapObjectType.STONE);\n if (stone != null) {\n stone.cutOff();\n if (!stone.canBeCut()) {\n addSelfDeletingMapObject(pos, EMapObjectType.CUT_OFF_STONE, Stone.DECOMPOSE_DELAY, (byte) -1);\n removeMapObjectType(x, y, EMapObjectType.STONE);\n }\n }\n}\n"
"private static void renderString(String str, int x, int y, int maxWidth, int normalColor, int smoothColor) {\n Minecraft mc = Minecraft.getMinecraft();\n FontRenderer fontRenderer = mc.fontRenderer;\n boolean origFont = fontRenderer.getUnicodeFlag();\n fontRenderer.setUnicodeFlag(true);\n if (mc.gameSettings.guiScale == 3) {\n float dist = 0.08F;\n for (int cycle = 0; cycle < 2; cycle++) {\n GL11.glTranslatef(-dist, 0F, 0F);\n fontRenderer.drawSplitString(str, x, y, maxWidth, color);\n GL11.glTranslatef(dist, 0F, 0F);\n GL11.glTranslatef(0F, -dist, 0F);\n fontRenderer.drawSplitString(str, x, y, maxWidth, color);\n GL11.glTranslatef(0F, dist, 0F);\n GL11.glTranslatef(dist, -dist, 0F);\n fontRenderer.drawSplitString(str, x, y, maxWidth, color);\n GL11.glTranslatef(-dist, dist, 0F);\n dist = -dist;\n }\n } else\n fontRenderer.drawSplitString(str, x, y, maxWidth, normalColor);\n fontRenderer.setUnicodeFlag(origFont);\n}\n"
"public String toString() {\n return \"String_Node_Str\" + \"String_Node_Str\" + this.getIdentity() + (this.isSetDisplayId() ? \"String_Node_Str\" + this.getDisplayId() : \"String_Node_Str\") + (this.isSetName() ? \"String_Node_Str\" + this.getName() : \"String_Node_Str\") + (this.isSetDescription() ? \"String_Node_Str\" + this.getDescription() : \"String_Node_Str\") + \"String_Node_Str\" + source + \"String_Node_Str\" + language + \"String_Node_Str\" + framework + \"String_Node_Str\";\n}\n"
"private void ini() {\n log.debug(\"String_Node_Str\", tableBean.getRowCount(), tableBean.getColumnCount());\n for (int r = 0; r < tableBean.getRowCount(); r++) {\n Row row = sheet.createRow(r);\n if (tableBean.getRowHeight() != null) {\n row.setHeight(tableBean.getRowHeight().shortValue());\n }\n for (int c = 0; c < tableBean.getColumnCount(); c++) {\n row.createCell(c);\n }\n }\n}\n"
"protected RuleKey.Builder ruleKeyBuilder() {\n ImmutableSortedSet.Builder<String> metaInfFiles = ImmutableSortedSet.naturalOrder();\n addMetaInfContents(metaInfFiles);\n return super.ruleKeyBuilder().set(\"String_Node_Str\", mainClass).set(\"String_Node_Str\", manifestFile).set(\"String_Node_Str\", metaInfFiles.build());\n}\n"
"public List<List<GraphTargetItem>> getSubs() {\n List<List<GraphTargetItem>> ret = new ArrayList<>();\n if (functions != null) {\n ret.add(functions);\n }\n if (staticFunctions != null) {\n ret.add(staticFunctions);\n }\n return ret;\n}\n"
"public IStorageUtilityIndexed<FormInstance> getUserFixtureStorage() {\n return app.getFileBackedUserStorage(HybridFileBackedSqlStorage.FIXTURE_STORAGE_TABLE_NAME, FormInstance.class);\n}\n"
"private void computeProperty(ResourcesManager manager, ItemRecord itemRecord) {\n InputStream stream = null;\n try {\n stream = manager.getStream(itemRecord.getPath());\n final Resource resource = createResource(itemRecord, itemRecord.getPath(), false);\n URIConverter uriConverter = resource.getResourceSet().getURIConverter();\n resource.getResourceSet().setURIConverter(new ExtensibleURIConverterImpl() {\n public InputStream createInputStream(URI uri, Map<?, ?> options) throws IOException {\n InputStream inputStream = null;\n EPackage ePackage = resource.getResourceSet().getPackageRegistry().getEPackage(uri.toString());\n if (ePackage != null || !\"String_Node_Str\".equals(uri.scheme())) {\n inputStream = super.createInputStream(uri, options);\n } else {\n inputStream = null;\n }\n return inputStream;\n }\n });\n EmfHelper.loadResource(resource, stream, null);\n resource.getResourceSet().setURIConverter(uriConverter);\n itemRecord.setProperty((Property) EcoreUtil.getObjectByType(resource.getContents(), PropertiesPackage.eINSTANCE.getProperty()));\n } catch (Exception e) {\n } finally {\n if (stream != null) {\n try {\n stream.close();\n } catch (IOException e) {\n }\n }\n }\n}\n"
"public void setPicture(byte[] picture) {\n this.picture = Arrays.copyOf(picture, picture.length);\n}\n"