content stringlengths 40 137k |
|---|
"private boolean hasJAXBAnnotations(JavaHasAnnotations elem) {\n if (helper.isAnnotationPresent(elem, XmlElement.class) || helper.isAnnotationPresent(elem, XmlAttribute.class) || helper.isAnnotationPresent(elem, XmlAnyElement.class) || helper.isAnnotationPresent(elem, XmlAnyAttribute.class) || helper.isAnnotationPresent(elem, XmlValue.class) || helper.isAnnotationPresent(elem, XmlElements.class) || helper.isAnnotationPresent(elem, XmlElementRef.class) || helper.isAnnotationPresent(elem, XmlElementRefs.class) || helper.isAnnotationPresent(elem, XmlID.class) || helper.isAnnotationPresent(elem, XmlSchemaType.class)) {\n return true;\n }\n return false;\n}\n"
|
"private StructRefValue validateStructValue(Module module, StructureDefn targetDefn, Structure target) throws PropertyValueException {\n if (targetDefn != target.getDefn())\n throw new PropertyValueException(target.getReferencableProperty(), PropertyValueException.DESIGN_EXCEPTION_WRONG_ITEM_TYPE, PropertyType.STRUCT_REF_TYPE);\n String namespace = null;\n if (module instanceof Library)\n namespace = ((Library) module).getNamespace();\n return new StructRefValue(namespace, target);\n}\n"
|
"public boolean apply(Game game, Ability source) {\n Player controller = game.getPlayer(source.getControllerId());\n Player newController = game.getPlayer(getTargetPointer().getFirst(game, source));\n if (controller != null && newController != null && controller.getId() != newController.getId()) {\n ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfGame, newController.getId());\n effect.setTargetPointer(new FixedTarget(source.getSourceId()));\n game.addEffect(effect, source);\n return true;\n }\n return false;\n}\n"
|
"protected void setAtIndex(int idx, Object value) {\n getList().set(idx, value);\n }\n protected List<Object> getList() {\n List<Object> list = (List<Object>) _property.get(_object);\n return list;\n}\n"
|
"public Dialog onCreateDialog(Bundle savedInstanceState) {\n final FragmentActivity activity = getActivity();\n final Uri[] deleteUris = (Uri[]) getArguments().getParcelableArray(ARG_DELETE_URIS);\n final StringBuilder deleteFileNames = new StringBuilder();\n final HashMap<Uri, String> deleteFileNameMap = new HashMap<>();\n for (Uri deleteUri : deleteUris) {\n String deleteFileName = FileHelper.getFilename(getActivity(), deleteUri);\n deleteFileNames.append('\\n').append(deleteFileName);\n deleteFileNameMap.put(deleteUri, deleteFileName);\n }\n CustomAlertDialogBuilder alert = new CustomAlertDialogBuilder(activity);\n alert.setMessage(this.getString(R.string.file_delete_confirmation, deleteFilename));\n alert.setPositiveButton(R.string.btn_delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dismiss();\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n try {\n if (DocumentsContract.deleteDocument(getActivity().getContentResolver(), deleteUri)) {\n Toast.makeText(getActivity(), getActivity().getString(R.string.file_delete_successful, deleteFilename), Toast.LENGTH_LONG).show();\n return;\n }\n } catch (UnsupportedOperationException e) {\n Log.d(Constants.TAG, \"String_Node_Str\", e);\n }\n }\n try {\n if (getActivity().getContentResolver().delete(deleteUri, null, null) > 0) {\n Toast.makeText(getActivity(), getActivity().getString(R.string.file_delete_successful, deleteFilename), Toast.LENGTH_LONG).show();\n return;\n }\n } catch (UnsupportedOperationException e) {\n Log.d(Constants.TAG, \"String_Node_Str\", e);\n }\n if (new File(deleteUri.getPath()).delete()) {\n Toast.makeText(getActivity(), getActivity().getString(R.string.file_delete_successful, deleteFilename), Toast.LENGTH_LONG).show();\n return;\n }\n Toast.makeText(getActivity(), getActivity().getString(R.string.error_file_delete_failed, deleteFilename), Toast.LENGTH_LONG).show();\n }\n });\n alert.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dismiss();\n }\n });\n alert.setCancelable(true);\n return alert.show();\n}\n"
|
"public void setMainProjectBranch(String technicalLabel, String branchValue) {\n Map<String, String> fields = getRepositoryContextFields();\n if (fields == null || technicalLabel == null) {\n return;\n }\n String key = IProxyRepositoryFactory.BRANCH_SELECTION + SVNConstant.UNDER_LINE_CHAR + technicalLabel;\n if (branchValue != null) {\n fields.put(key, branchValue);\n }\n}\n"
|
"public void renderLegendGraphic(IPrimitiveRenderer ipr, Legend lg, Fill fPaletteEntry, Bounds bo) throws ChartException {\n if ((bo.getWidth() == 0) && (bo.getHeight() == 0)) {\n return;\n }\n final ClientArea ca = lg.getClientArea();\n final LineAttributes lia = ca.getOutline();\n final RadarSeries ls = (RadarSeries) getSeries();\n if (fPaletteEntry == null) {\n fPaletteEntry = ColorDefinitionImpl.RED();\n }\n final RectangleRenderEvent rre = ((EventObjectCache) ipr).getEventObject(StructureSource.createLegend(lg), RectangleRenderEvent.class);\n rre.setBackground(ca.getBackground());\n rre.setOutline(lia);\n rre.setBounds(bo);\n ipr.fillRectangle(rre);\n LineAttributes liaMarker = ls.getLineAttributes();\n if (!liaMarker.isSetVisible()) {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, \"String_Node_Str\", Messages.getResourceBundle(getRunTimeContext().getULocale()));\n }\n if (liaMarker.isVisible()) {\n final LineRenderEvent lre = ((EventObjectCache) ipr).getEventObject(StructureSource.createLegend(lg), LineRenderEvent.class);\n if (fPaletteEntry instanceof ColorDefinition && (ls.isSetPaletteLineColor() && ls.isPaletteLineColor())) {\n liaMarker = goFactory.copyOf(liaMarker);\n liaMarker.setColor(goFactory.copyOf(FillUtil.getColor(fPaletteEntry)));\n }\n lre.setLineAttributes(liaMarker);\n lre.setStart(LocationImpl.create(bo.getLeft() + 1, bo.getTop() + bo.getHeight() / 2));\n lre.setEnd(LocationImpl.create(bo.getLeft() + bo.getWidth() - 1, bo.getTop() + bo.getHeight() / 2));\n ipr.drawLine(lre);\n }\n SeriesDefinition sd = getSeriesDefinition();\n final boolean bPaletteByCategory = isPaletteByCategory();\n if (bPaletteByCategory && ls.eContainer() instanceof SeriesDefinition) {\n sd = (SeriesDefinition) ls.eContainer();\n }\n int iThisSeriesIndex = sd.getRunTimeSeries().indexOf(ls);\n if (iThisSeriesIndex < 0) {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, \"String_Node_Str\", new Object[] { ls, sd }, Messages.getResourceBundle(getRunTimeContext().getULocale()));\n }\n Marker m = null;\n m = ls.getMarker();\n double width = bo.getWidth() / getDeviceScale();\n double height = bo.getHeight() / getDeviceScale();\n int markerSize = (int) (((width > height ? height : width) - 2) / 2);\n if (markerSize <= 0) {\n markerSize = 1;\n }\n if (m != null && m.isVisible()) {\n renderMarker(lg, ipr, m, LocationImpl.create(bo.getLeft() + bo.getWidth() / 2, bo.getTop() + bo.getHeight() / 2), ls.getLineAttributes(), fPaletteEntry, null, Integer.valueOf(markerSize), false, false);\n }\n}\n"
|
"private void create() {\n GridData gd = new GridData(SWT.LEFT, SWT.TOP, true, true, 1, 1);\n Label label = factory.createLabel(parent, this.label, SWT.NONE);\n label.setLayoutData(gd);\n text = factory.createText(parent, \"String_Node_Str\", SWT.MULTI | SWT.BORDER);\n gd = new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1);\n text.setLayoutData(gd);\n text.setText(\"String_Node_Str\");\n Button button = factory.createButton(parent, \"String_Node_Str\", SWT.PUSH);\n button.setImage(ImageCache.getCreatedImage(EImage.DOTS_BUTTON.getPath()));\n gd = new GridData(SWT.LEFT, SWT.FILL, false, true, 1, 1);\n button.setLayoutData(gd);\n button.setToolTipText(\"String_Node_Str\");\n button.addSelectionListener(new SelectionListener() {\n public void widgetDefaultSelected(SelectionEvent e) {\n }\n public void widgetSelected(SelectionEvent e) {\n FileDialog fileDialog = new FileDialog(parent.getShell(), SWT.OPEN);\n fileDialog.setFilterExtensions(fileExtents);\n fileDialog.setFileName(filename);\n String name = fileDialog.open();\n if (name != null) {\n text.setText(name);\n }\n }\n });\n}\n"
|
"private boolean syncApp(Application app, File base, ModTime mt, Payload.Outbound payload) throws URISyntaxException {\n if (logger.isLoggable(Level.FINER))\n logger.finer(\"String_Node_Str\" + mt.name);\n try {\n File appDir = fileOf(base, mt.name);\n if (syncArchive) {\n File archive = app.application();\n logger.finest(\"String_Node_Str\" + archive);\n if (mt.time != 0 && archive.lastModified() == mt.time)\n return false;\n attachAppArchive(archive, payload);\n } else {\n logger.finest(\"String_Node_Str\" + appDir);\n if (mt.time != 0 && appDir.lastModified() == mt.time)\n return false;\n if (mt.time == 0)\n logger.fine(\"String_Node_Str\" + \"String_Node_Str\" + mt.name + \"String_Node_Str\");\n else\n logger.fine(\"String_Node_Str\" + \"String_Node_Str\" + mt.name + \"String_Node_Str\");\n attachAppDir(appDir, payload);\n }\n File gdir;\n gdir = env.getApplicationCompileJspPath();\n attachAppDir(fileOf(gdir, mt.name), payload);\n gdir = env.getApplicationGeneratedXMLPath();\n attachAppDir(fileOf(gdir, mt.name), payload);\n gdir = env.getApplicationEJBStubPath();\n attachAppDir(fileOf(gdir, mt.name), payload);\n gdir = new File(env.getApplicationStubPath(), \"String_Node_Str\");\n attachAppDir(fileOf(gdir, mt.name), payload);\n gdir = env.getApplicationAltDDPath();\n attachAppDir(fileOf(gdir, mt.name), payload);\n } catch (IOException ioex) {\n logger.fine(\"String_Node_Str\" + mt.name);\n logger.fine(ioex.toString());\n }\n return true;\n}\n"
|
"public Response handleCSAR(final String fileName, final InputStream uploadedInputStream) throws IOException, URISyntaxException, UserException, SystemException {\n File uploadFile = this.storeTemporaryFile(fileName, uploadedInputStream);\n CSARID csarID = this.fileHandler.storeCSAR(uploadFile.toPath());\n this.control.invokeTOSCAProcessing(csarID);\n if (ModelUtils.hasOpenRequirements(csarID)) {\n WineryConnector winCon = new WineryConnector();\n if (winCon.isWineryRepositoryAvailable()) {\n QName serviceTemplate = winCon.uploadCSAR(uploadFile);\n this.control.deleteCSAR(csarID);\n return Response.status(Response.Status.NOT_ACCEPTABLE).entity(\"String_Node_Str\" + winCon.getServiceTemplateURI(serviceTemplate).toString() + \"String_Node_Str\").build();\n } else {\n this.fileHandler.deleteCSAR(csarID);\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();\n }\n }\n ToscaServiceHandler.getToscaEngineService().clearCSARContent(csarID);\n csarID = this.startPlanBuilder(csarID);\n this.processTOSCA(csarID);\n if (csarID != null) {\n CSARsResource.LOG.info(\"String_Node_Str\", csarID.toString());\n final String path = Utilities.buildURI(this.uriInfo.getAbsolutePath().toString(), csarID.toString());\n final JsonObject retObj = new JsonObject();\n retObj.addProperty(\"String_Node_Str\", path);\n return Response.created(URI.create(path)).entity(retObj.toString()).build();\n } else {\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();\n }\n}\n"
|
"public void packIndex(IndexPackingRequest request) throws IOException, IllegalArgumentException {\n if (request.getTargetDir() == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (request.getTargetDir().exists()) {\n if (!request.getTargetDir().isDirectory()) {\n throw new IllegalArgumentException(String.format(\"String_Node_Str\", request.getTargetDir().getAbsolutePath()));\n }\n if (!request.getTargetDir().canWrite()) {\n throw new IllegalArgumentException(String.format(\"String_Node_Str\", request.getTargetDir().getAbsolutePath()));\n }\n } else {\n if (!request.getTargetDir().mkdirs()) {\n throw new IllegalArgumentException(\"String_Node_Str\" + request.getTargetDir().getAbsolutePath());\n }\n }\n File legacyFile = new File(request.getTargetDir(), IndexingContext.INDEX_FILE_PREFIX + \"String_Node_Str\");\n File v1File = new File(request.getTargetDir(), IndexingContext.INDEX_FILE_PREFIX + \"String_Node_Str\");\n Properties info = null;\n try {\n try {\n info = readIndexProperties(request);\n if (request.isCreateIncrementalChunks()) {\n List<Integer> chunk = incrementalHandler.getIncrementalUpdates(request, info);\n if (chunk == null) {\n getLogger().debug(\"String_Node_Str\");\n incrementalHandler.initializeProperties(info);\n } else if (chunk.isEmpty()) {\n getLogger().debug(\"String_Node_Str\");\n } else {\n File file = new File(request.getTargetDir(), IndexingContext.INDEX_FILE_PREFIX + \"String_Node_Str\" + info.getProperty(IndexingContext.INDEX_CHUNK_COUNTER) + \"String_Node_Str\");\n writeIndexData(request.getContext(), chunk, file);\n if (request.isCreateChecksumFiles()) {\n FileUtils.fileWrite(new File(file.getParentFile(), file.getName() + \"String_Node_Str\").getAbsolutePath(), DigesterUtils.getSha1Digest(file));\n FileUtils.fileWrite(new File(file.getParentFile(), file.getName() + \"String_Node_Str\").getAbsolutePath(), DigesterUtils.getMd5Digest(file));\n }\n }\n }\n }\n } catch (IOException e) {\n getLogger().info(\"String_Node_Str\");\n info = new Properties();\n incrementalHandler.initializeProperties(info);\n }\n Date timestamp = request.getContext().getTimestamp();\n if (timestamp == null) {\n timestamp = new Date(0);\n }\n if (request.getFormats().contains(IndexPackingRequest.IndexFormat.FORMAT_LEGACY)) {\n info.setProperty(IndexingContext.INDEX_LEGACY_TIMESTAMP, format(timestamp));\n writeIndexArchive(request.getContext(), legacyFile);\n if (request.isCreateChecksumFiles()) {\n FileUtils.fileWrite(new File(legacyFile.getParentFile(), legacyFile.getName() + \"String_Node_Str\").getAbsolutePath(), DigesterUtils.getSha1Digest(legacyFile));\n FileUtils.fileWrite(new File(legacyFile.getParentFile(), legacyFile.getName() + \"String_Node_Str\").getAbsolutePath(), DigesterUtils.getMd5Digest(legacyFile));\n }\n }\n if (request.getFormats().contains(IndexPackingRequest.IndexFormat.FORMAT_V1)) {\n info.setProperty(IndexingContext.INDEX_TIMESTAMP, format(timestamp));\n writeIndexData(request.getContext(), null, v1File);\n if (request.isCreateChecksumFiles()) {\n FileUtils.fileWrite(new File(v1File.getParentFile(), v1File.getName() + \"String_Node_Str\").getAbsolutePath(), DigesterUtils.getSha1Digest(v1File));\n FileUtils.fileWrite(new File(v1File.getParentFile(), v1File.getName() + \"String_Node_Str\").getAbsolutePath(), DigesterUtils.getMd5Digest(v1File));\n }\n }\n writeIndexProperties(request, info);\n}\n"
|
"public void initialise() {\n sceneFinalFbo = displayResolutionDependentFBOs.get(FINAL_BUFFER);\n renderingConfig = config.getRendering();\n requiresCondition(() -> (renderingConfig.isVrSupport() && vrProvider.isInitialized()));\n leftEyeFbo = requiresFBO(new FBOConfig(LEFT_EYE_FBO, FULL_SCALE, FBO.Type.DEFAULT).useDepthBuffer(), displayResolutionDependentFBOs);\n rightEyeFbo = requiresFBO(new FBOConfig(RIGHT_EYE_FBO, FULL_SCALE, FBO.Type.DEFAULT).useDepthBuffer(), displayResolutionDependentFBOs);\n if (vrProvider != null) {\n vrProvider.texType[0].handle = leftEye.colorBufferTextureId;\n vrProvider.texType[0].eColorSpace = JOpenVRLibrary.EColorSpace.EColorSpace_ColorSpace_Gamma;\n vrProvider.texType[0].eType = JOpenVRLibrary.EGraphicsAPIConvention.EGraphicsAPIConvention_API_OpenGL;\n vrProvider.texType[0].write();\n vrProvider.texType[1].handle = rightEye.colorBufferTextureId;\n vrProvider.texType[1].eColorSpace = JOpenVRLibrary.EColorSpace.EColorSpace_ColorSpace_Gamma;\n vrProvider.texType[1].eType = JOpenVRLibrary.EGraphicsAPIConvention.EGraphicsAPIConvention_API_OpenGL;\n vrProvider.texType[1].write();\n }\n addDesiredStateChange(new EnableMaterial(\"String_Node_Str\"));\n}\n"
|
"public void run() {\n try {\n if (s_logger.isTraceEnabled()) {\n s_logger.trace(\"String_Node_Str\" + _nodeId);\n }\n synchronized (_agentToTransferIds) {\n if (_agentToTransferIds.size() > 0) {\n s_logger.debug(\"String_Node_Str\" + _agentToTransferIds.size() + \"String_Node_Str\");\n for (Iterator<Long> iterator = _agentToTransferIds.iterator(); iterator.hasNext(); ) {\n Long hostId = iterator.next();\n AgentAttache attache = findAttache(hostId);\n Date cutTime = DateUtil.currentGMTTime();\n if (_hostTransferDao.isNotActive(hostId, new Date(cutTime.getTime() - rebalanceTimeOut))) {\n s_logger.debug(\"String_Node_Str\" + hostId + \"String_Node_Str\");\n iterator.remove();\n _hostTransferDao.completeAgentTransfer(hostId);\n continue;\n }\n HostTransferMapVO transferMap = _hostTransferDao.findByIdAndCurrentOwnerId(hostId, _nodeId);\n if (transferMap == null) {\n s_logger.debug(\"String_Node_Str\" + hostId + \"String_Node_Str\");\n iterator.remove();\n _hostTransferDao.completeAgentTransfer(hostId);\n continue;\n }\n ManagementServerHostVO ms = _mshostDao.findByMsid(transferMap.getFutureOwner());\n if (ms != null && ms.getState() != ManagementServerHost.State.Up) {\n s_logger.debug(\"String_Node_Str\" + hostId + \"String_Node_Str\" + ms + \"String_Node_Str\");\n iterator.remove();\n _hostTransferDao.completeAgentTransfer(hostId);\n continue;\n }\n if (attache.getQueueSize() == 0 && attache.getNonRecurringListenersSize() == 0) {\n iterator.remove();\n rebalanceHost(hostId, transferMap.getInitialOwner(), transferMap.getFutureOwner());\n } else {\n s_logger.debug(\"String_Node_Str\" + hostId + \"String_Node_Str\" + attache.getQueueSize() + \"String_Node_Str\" + attache.getNonRecurringListenersSize());\n }\n }\n HostTransferMapVO transferMap = _hostTransferDao.findByIdAndCurrentOwnerId(hostId, _nodeId);\n if (transferMap == null) {\n s_logger.debug(\"String_Node_Str\" + hostId + \"String_Node_Str\");\n failStartRebalance(hostId);\n return;\n }\n ManagementServerHostVO ms = _mshostDao.findByMsid(transferMap.getFutureOwner());\n if (ms != null && ms.getState() != ManagementServerHost.State.Up) {\n s_logger.debug(\"String_Node_Str\" + hostId + \"String_Node_Str\" + ms + \"String_Node_Str\");\n failStartRebalance(hostId);\n return;\n }\n if (attache.getQueueSize() == 0 && attache.getNonRecurringListenersSize() == 0) {\n rebalanceHost(hostId, transferMap.getInitialOwner(), transferMap.getFutureOwner());\n } else {\n s_logger.debug(\"String_Node_Str\" + hostId + \"String_Node_Str\" + attache.getQueueSize() + \"String_Node_Str\" + attache.getNonRecurringListenersSize());\n }\n }\n } else {\n if (s_logger.isTraceEnabled()) {\n s_logger.trace(\"String_Node_Str\" + _nodeId);\n }\n }\n } catch (Throwable e) {\n s_logger.error(\"String_Node_Str\", e);\n }\n}\n"
|
"public boolean execute(final PlotPlayer player, final String... args) {\n final List<String> allowed_params = Arrays.asList(new String[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" });\n if (args.length > 0) {\n final String arg = args[0].toLowerCase();\n switch(arg) {\n case \"String_Node_Str\":\n {\n if (ExpireManager.task != -1) {\n Bukkit.getScheduler().cancelTask(ExpireManager.task);\n } else {\n return MainUtil.sendMessage(null, \"String_Node_Str\");\n }\n ExpireManager.task = -1;\n return MainUtil.sendMessage(null, \"String_Node_Str\");\n }\n case \"String_Node_Str\":\n {\n if (ExpireManager.task == -1) {\n ExpireManager.runTask();\n } else {\n return MainUtil.sendMessage(null, \"String_Node_Str\");\n }\n return MainUtil.sendMessage(null, \"String_Node_Str\");\n }\n case \"String_Node_Str\":\n {\n if (args.length > 1) {\n final String world = args[1];\n if (!BlockManager.manager.isWorld(world)) {\n return MainUtil.sendMessage(null, \"String_Node_Str\" + args[1]);\n }\n MainUtil.sendMessage(null, \"String_Node_Str\");\n ExpireManager.updateExpired(args[1]);\n return true;\n }\n return MainUtil.sendMessage(null, \"String_Node_Str\");\n }\n case \"String_Node_Str\":\n {\n if (args.length > 1) {\n final String world = args[1];\n if (!BlockManager.manager.isWorld(world)) {\n return MainUtil.sendMessage(null, \"String_Node_Str\" + args[1]);\n }\n if (!ExpireManager.expiredPlots.containsKey(args[1])) {\n return MainUtil.sendMessage(null, \"String_Node_Str\" + args[1]);\n }\n MainUtil.sendMessage(null, \"String_Node_Str\" + ExpireManager.expiredPlots.get(args[1]).size() + \"String_Node_Str\");\n for (final Entry<Plot, Long> entry : ExpireManager.expiredPlots.get(args[1]).entrySet()) {\n final Plot plot = entry.getKey();\n final Long stamp = entry.getValue();\n MainUtil.sendMessage(null, \"String_Node_Str\" + plot.world + \"String_Node_Str\" + plot.id.x + \"String_Node_Str\" + plot.id.y + \"String_Node_Str\" + UUIDHandler.getName(plot.owner_) + \"String_Node_Str\" + stamp);\n }\n return true;\n }\n return MainUtil.sendMessage(null, \"String_Node_Str\");\n }\n case \"String_Node_Str\":\n {\n if (args.length != 2) {\n return MainUtil.sendMessage(null, \"String_Node_Str\");\n }\n final UUID uuid = UUIDHandler.getUUID(args[1]);\n if (uuid == null) {\n return MainUtil.sendMessage(null, \"String_Node_Str\" + args[1]);\n }\n final OfflinePlotPlayer op = UUIDHandler.uuidWrapper.getOfflinePlayer(uuid);\n if ((op == null) || (op.getLastPlayed() == 0)) {\n return MainUtil.sendMessage(null, \"String_Node_Str\" + args[1]);\n }\n final Timestamp stamp = new Timestamp(op.getLastPlayed());\n final Date date = new Date(stamp.getTime());\n MainUtil.sendMessage(null, \"String_Node_Str\" + args[1]);\n MainUtil.sendMessage(null, \"String_Node_Str\" + uuid);\n MainUtil.sendMessage(null, \"String_Node_Str\" + date.toGMTString());\n MainUtil.sendMessage(null, \"String_Node_Str\" + date.toGMTString());\n MainUtil.sendMessage(null, \"String_Node_Str\" + date.toLocaleString());\n return true;\n }\n case \"String_Node_Str\":\n {\n if (args.length != 2) {\n MainUtil.sendMessage(null, \"String_Node_Str\");\n MainUtil.sendMessage(null, \"String_Node_Str\");\n return MainUtil.sendMessage(null, \"String_Node_Str\");\n }\n final String world = args[1];\n if (!BlockManager.manager.isWorld(world) || !PlotSquared.isPlotWorld(args[1])) {\n return MainUtil.sendMessage(null, \"String_Node_Str\" + args[1]);\n }\n final ArrayList<ChunkLoc> empty = new ArrayList<>();\n final boolean result = Trim.getTrimRegions(empty, world, new Runnable() {\n public void run() {\n Trim.sendMessage(\"String_Node_Str\");\n Trim.sendMessage(\"String_Node_Str\" + empty.size());\n Trim.sendMessage(\"String_Node_Str\" + (empty.size() * 1024) + \"String_Node_Str\");\n Trim.sendMessage(\"String_Node_Str\");\n final File file = new File(PlotSquared.IMP.getDirectory() + File.separator + \"String_Node_Str\");\n PrintWriter writer;\n try {\n writer = new PrintWriter(file);\n for (final ChunkLoc loc : empty) {\n writer.println(world + \"String_Node_Str\" + loc.x + \"String_Node_Str\" + loc.z + \"String_Node_Str\");\n }\n writer.close();\n Trim.sendMessage(\"String_Node_Str\");\n } catch (final FileNotFoundException e) {\n e.printStackTrace();\n Trim.sendMessage(\"String_Node_Str\");\n }\n Trim.sendMessage(\"String_Node_Str\");\n Trim.sendMessage(\"String_Node_Str\");\n Trim.sendMessage(\"String_Node_Str\");\n Trim.sendMessage(\"String_Node_Str\");\n }\n });\n if (!result) {\n MainUtil.sendMessage(null, \"String_Node_Str\");\n }\n return result;\n }\n }\n }\n MainUtil.sendMessage(player, \"String_Node_Str\" + StringUtils.join(allowed_params, \"String_Node_Str\") + \"String_Node_Str\");\n return true;\n}\n"
|
"public boolean hasMoreElements() {\n next(true);\n return hasMoreElements;\n}\n"
|
"private void remotePut(final Bytes inBytes, int hash2, final byte identifier, final long timestamp, long valuePos, long valueLimit, long keyPosition, long keyLimit) {\n lock();\n try {\n final long keyLen = keyLimit - keyPosition;\n hashLookupLiveAndDeleted.startSearch(hash2);\n for (int pos; (pos = hashLookupLiveAndDeleted.nextPos()) >= 0; ) {\n inBytes.limit(keyLimit);\n inBytes.position(keyPosition);\n long offset = offsetFromPos(pos);\n NativeBytes entry = entry(offset);\n if (!keyEquals(inBytes, keyLen, entry))\n continue;\n entry.skip(keyLen);\n final long timeStampPos = entry.positionAddr();\n entry.positionAddr(timeStampPos);\n if (shouldIgnore(entry, timestamp, identifier)) {\n entry.positionAddr(timeStampPos);\n return;\n }\n boolean wasDeleted = entry.readBoolean();\n entry.positionAddr(timeStampPos);\n entry.writeLong(timestamp);\n if (identifier <= 0)\n throw new IllegalStateException(\"String_Node_Str\" + identifier);\n entry.writeByte(identifier);\n entry.writeBoolean(false);\n long valueLenPos = entry.position();\n long valueLen = readValueLen(entry);\n long entryEndAddr = entry.positionAddr() + valueLen;\n inBytes.limit(valueLimit);\n inBytes.position(valuePos);\n putValue(pos, offset, entry, valueLenPos, entryEndAddr, inBytes, null, true, hashLookupLiveAndDeleted);\n if (wasDeleted) {\n hashLookupLiveOnly.put(hash2, pos);\n incrementSize();\n }\n return;\n }\n long valueLen = valueLimit - valuePos;\n int pos = alloc(inBlocks(entrySize(keyLen, valueLen)));\n long offset = offsetFromPos(pos);\n clearMetaData(offset);\n NativeBytes entry = entry(offset);\n entry.writeStopBit(keyLen);\n inBytes.limit(keyLimit);\n inBytes.position(keyPosition);\n entry.write(inBytes);\n entry.writeLong(timestamp);\n entry.writeByte(identifier);\n entry.writeBoolean(false);\n entry.writeStopBit(valueLen);\n alignment.alignPositionAddr(entry);\n inBytes.limit(valueLimit);\n inBytes.position(valuePos);\n entry.write(inBytes);\n hashLookupLiveAndDeleted.putAfterFailedSearch(pos);\n hashLookupLiveOnly.put(hash2, pos);\n incrementSize();\n } finally {\n unlock();\n }\n}\n"
|
"public void testOwnerUsingArtifact() throws Exception {\n ArtifactId artifactId = new ArtifactId(NamespaceId.DEFAULT.getNamespace(), \"String_Node_Str\", \"String_Node_Str\");\n addAppArtifact(artifactId.toId(), WordCountApp.class);\n ApplicationId applicationId = new ApplicationId(NamespaceId.DEFAULT.getNamespace(), \"String_Node_Str\");\n String ownerPrincipal = \"String_Node_Str\";\n AppRequest<ConfigTestApp.ConfigClass> appRequest = new AppRequest<>(new ArtifactSummary(artifactId.getArtifact(), artifactId.getVersion()), null, ownerPrincipal);\n Assert.assertEquals(HttpResponseCodes.SC_OK, deploy(applicationId, appRequest).getStatusLine().getStatusCode());\n JsonObject appDetails = getAppDetails(NamespaceId.DEFAULT.getNamespace(), applicationId.getApplication());\n Assert.assertEquals(ownerPrincipal, appDetails.get(Constants.Security.PRINCIPAL).getAsString());\n Assert.assertEquals(ownerPrincipal, getStreamConfig(applicationId.getNamespaceId().stream(\"String_Node_Str\")).getOwnerPrincipal());\n Assert.assertEquals(ownerPrincipal, getDatasetMeta(applicationId.getNamespaceId().dataset(\"String_Node_Str\")).getOwnerPrincipal());\n String bobPrincipal = \"String_Node_Str\";\n appRequest = new AppRequest<>(new ArtifactSummary(artifactId.getArtifact(), artifactId.getVersion()), null, bobPrincipal);\n Assert.assertEquals(HttpResponseCodes.SC_FORBIDDEN, deploy(applicationId, appRequest).getStatusLine().getStatusCode());\n appRequest = new AppRequest<>(new ArtifactSummary(artifactId.getArtifact(), artifactId.getVersion()), null, bobPrincipal);\n Assert.assertEquals(HttpResponseCodes.SC_BAD_REQUEST, deploy(new ApplicationId(applicationId.getNamespace(), applicationId.getApplication(), \"String_Node_Str\"), appRequest).getStatusLine().getStatusCode());\n appRequest = new AppRequest<>(new ArtifactSummary(artifactId.getArtifact(), artifactId.getVersion()), null, ownerPrincipal);\n Assert.assertEquals(HttpResponseCodes.SC_OK, deploy(applicationId, appRequest).getStatusLine().getStatusCode());\n appRequest = new AppRequest<>(new ArtifactSummary(artifactId.getArtifact(), artifactId.getVersion()), null, ownerPrincipal);\n Assert.assertEquals(HttpResponseCodes.SC_OK, deploy(new ApplicationId(applicationId.getNamespace(), applicationId.getApplication(), \"String_Node_Str\"), appRequest).getStatusLine().getStatusCode());\n Assert.assertEquals(200, doDelete(getVersionedAPIPath(\"String_Node_Str\" + applicationId.getApplication(), applicationId.getNamespace())).getStatusLine().getStatusCode());\n Assert.assertEquals(ownerPrincipal, getStreamConfig(applicationId.getNamespaceId().stream(\"String_Node_Str\")).getOwnerPrincipal());\n Assert.assertEquals(ownerPrincipal, getDatasetMeta(applicationId.getNamespaceId().dataset(\"String_Node_Str\")).getOwnerPrincipal());\n deleteNamespace(NamespaceId.DEFAULT.getNamespace());\n}\n"
|
"public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {\n int index = TransformerMainPage.this.stepsList.getSelectionIndex();\n if ((index >= 0) && (index < TransformerMainPage.this.stepsList.getItemCount() - 1)) {\n TransformerMainPage.this.comitting = true;\n String val = TransformerMainPage.this.stepsList.getItem(index);\n TransformerMainPage.this.stepsList.remove(index);\n TransformerMainPage.this.stepsList.add(val, index + 1);\n TransformerMainPage.this.stepsList.select(index + 1);\n WSTransformerV2 wsTransformer = transformer;\n ArrayList<WSTransformerProcessStep> list = new ArrayList<WSTransformerProcessStep>(Arrays.asList(wsTransformer.getProcessSteps()));\n WSTransformerProcessStep spec = list.get(index);\n list.remove(index);\n list.add(index + 1, spec);\n wsTransformer.setProcessSteps(list.toArray(new WSTransformerProcessStep[list.size()]));\n TransformerMainPage.this.comitting = false;\n TransformerMainPage.this.stepsList.forceFocus();\n markDirtyWithoutCommit();\n }\n}\n"
|
"private ParsedRoute parse(final Router.RouteDocumentation rd) {\n final ParsedRoute parsedRoute = new ParsedRoute();\n parsedRoute.setRouteDocumentation(rd);\n if (countMatches(rd.getControllerMethodInvocation(), '@') == 2) {\n final String s = StringUtils.removeStart(rd.getControllerMethodInvocation(), \"String_Node_Str\");\n final String controllerClassName = s.substring(0, s.indexOf(\"String_Node_Str\"));\n try {\n final Class<?> clazz = getClassByName(controllerClassName);\n parsedRoute.setControllerClass(clazz);\n } catch (ClassNotFoundException e) {\n throw new CompletionException(e);\n }\n }\n return parsedRoute;\n}\n"
|
"private byte[] buildQueryArray(int maxGrantId, String targetIdStr, Map<String, String> map) {\n byte[] permissionQueryBytes = new byte[maxGrantId + 1];\n String[] grantIds = map.get(targetIdStr).toString().split(\"String_Node_Str\");\n permissionQueryBytes[0] = 0;\n for (int i = 0; i <= maxGrantId; i++) {\n permissionQueryBytes[i] = 0;\n for (int j = 0; j < grantIds.length; j++) {\n int current = Integer.parseInt(grantIds[j]);\n if (i == current) {\n permissionQueryBytes[i] = 1;\n break;\n }\n }\n }\n return permissionQueryBytes;\n}\n"
|
"public IntSet getRelevantParameters(CGNode caller, CallSiteReference site) {\n IntSet ret;\n if (this.parent != null) {\n ret = this.parent.getRelevantParameters(caller, site);\n } else {\n ret = EmptyIntSet.instance;\n }\n final MethodReference target = site.getDeclaredTarget();\n if (intentStarters.isStarter(target)) {\n final StartInfo info = intentStarters.getInfo(target);\n final int[] relevant = info.getRelevant();\n if (relevant != null) {\n for (int i = 0; i < relevant.length; ++i) {\n ret = IntSetUtil.add(ret, relevant[i]);\n }\n }\n } else if (site.isSpecial() && target.getDeclaringClass().getName().equals(AndroidTypes.IntentName)) {\n final MethodReference mRef = site.getDeclaredTarget();\n final int numArgs = mRef.getNumberOfParameters();\n switch(numArgs) {\n case 0:\n return EmptyIntSet.instance;\n case 1:\n return IntSetUtil.make(new int[] { 0, 1 });\n case 2:\n return IntSetUtil.make(new int[] { 0, 1, 2 });\n case 3:\n return IntSetUtil.make(new int[] { 0, 1, 2, 3 });\n case 4:\n return IntSetUtil.make(new int[] { 0, 1, 2, 3, 4 });\n default:\n return IntSetUtil.make(new int[] { 0, 1, 2, 3, 4, 5 });\n }\n } else if (site.isSpecial() && target.getDeclaringClass().getName().equals(AndroidTypes.IntentSenderName)) {\n logger.warn(\"String_Node_Str\", target);\n if (target.getNumberOfParameters() == 0) {\n return IntSetUtil.make(new int[] { 0 });\n } else {\n return IntSetUtil.make(new int[] { 0, 1 });\n }\n } else if (target.getSelector().equals(Selector.make(\"String_Node_Str\"))) {\n return IntSetUtil.make(new int[] { 0, 1 });\n } else if (target.getSelector().equals(Selector.make(\"String_Node_Str\"))) {\n return IntSetUtil.make(new int[] { 0, 1 });\n } else if (target.getSelector().equals(Selector.make(\"String_Node_Str\"))) {\n return IntSetUtil.make(new int[] { 0 });\n } else if (target.getSelector().equals(Selector.make(\"String_Node_Str\"))) {\n return IntSetUtil.make(new int[] { 0, 2 });\n } else if (target.getSelector().equals(Selector.make(\"String_Node_Str\"))) {\n return IntSetUtil.make(new int[] { 0, 2 });\n } else if (target.getSelector().equals(Selector.make(\"String_Node_Str\"))) {\n return IntSetUtil.make(new int[] { 0, 2 });\n }\n return ret;\n}\n"
|
"public boolean move(InvTweaksContainerSection srcSection, int srcIndex, InvTweaksContainerSection destSection, int destIndex) throws TimeoutException {\n dk srcStack = getItemStack(srcSection, srcIndex);\n dk destStack = getItemStack(destSection, destIndex);\n if (srcStack == null) {\n return false;\n } else if (srcSection == destSection && srcIndex == destIndex) {\n return true;\n }\n if (getHoldStack() != null) {\n int firstEmptyIndex = getFirstEmptyIndex(InvTweaksContainerSection.INVENTORY);\n if (firstEmptyIndex != -1) {\n leftClick(InvTweaksContainerSection.INVENTORY, firstEmptyIndex);\n } else {\n return false;\n }\n }\n boolean destinationEmpty = getItemStack(destSection, destIndex) == null;\n if (destStack != null && getItemID(srcStack) == getItemID(destStack) && getMaxStackSize(srcStack) == 1) {\n int intermediateSlot = getFirstEmptyUsableSlotNumber();\n InvTweaksContainerSection intermediateSection = getSlotSection(intermediateSlot);\n int intermediateIndex = getSlotIndex(intermediateSlot);\n if (intermediateIndex != -1) {\n leftClick(destSection, destIndex);\n leftClick(intermediateSection, intermediateIndex);\n leftClick(srcSection, srcIndex);\n leftClick(destSection, destIndex);\n leftClick(intermediateSection, intermediateIndex);\n leftClick(srcSection, srcIndex);\n } else {\n return false;\n }\n } else {\n leftClick(srcSection, srcIndex);\n leftClick(destSection, destIndex);\n if (getHoldStack() != null) {\n leftClick(srcSection, srcIndex);\n }\n }\n return true;\n}\n"
|
"private JobInfo createJob() throws AsyncApiException {\n JobInfo job = new JobInfo();\n if (concurrencyMode != null) {\n job.setConcurrencyMode(concurrencyMode);\n job.setObject(sObjectType);\n job.setOperation(operation);\n if (OperationEnum.upsert.equals(operation)) {\n job.setExternalIdFieldName(externalIdFieldName);\n }\n job.setContentType(contentType);\n job = connection.createJob(job);\n return job;\n}\n"
|
"public void getLines(ProjectTask projectTask, List<SaleOrderLine> saleOrderLineList, List<PurchaseOrderLine> purchaseOrderLineList, List<TimesheetLine> timesheetLineList, List<ExpenseLine> expenseLineList, List<ElementsToInvoice> elementsToInvoiceList, List<ProjectTask> projectTaskList, int counter) {\n if (counter > MAX_LEVEL_OF_PROJECT) {\n return;\n }\n counter++;\n if (projectTask.getInvoicingTypeSelect() == ProjectTaskRepository.INVOICING_TYPE_FLAT_RATE || projectTask.getInvoicingTypeSelect() == ProjectTaskRepository.INVOICING_TYPE_TIME_BASED) {\n saleOrderLineList.addAll(Beans.get(SaleOrderLineRepository.class).all().filter(\"String_Node_Str\", projectTask).fetch());\n purchaseOrderLineList.addAll(Beans.get(PurchaseOrderLineRepository.class).all().filter(\"String_Node_Str\", projectTask).fetch());\n timesheetLineList.addAll(Beans.get(TimesheetLineRepository.class).all().filter(\"String_Node_Str\", projectTask).fetch());\n expenseLineList.addAll(Beans.get(ExpenseLineRepository.class).all().filter(\"String_Node_Str\", projectTask).fetch());\n elementsToInvoiceList.addAll(Beans.get(ElementsToInvoiceRepository.class).all().filter(\"String_Node_Str\", projectTask).fetch());\n if (projectTask.getInvoicingTypeSelect() == ProjectTaskRepository.INVOICING_TYPE_FLAT_RATE && !projectTask.getInvoiced()) {\n projectTaskList.add(projectTask);\n }\n }\n List<ProjectTask> projectTaskChildrenList = Beans.get(ProjectTaskRepository.class).all().filter(\"String_Node_Str\", projectTask).fetch();\n for (ProjectTask projectTaskChild : projectTaskChildrenList) {\n this.getLines(projectTaskChild, saleOrderLineList, purchaseOrderLineList, timesheetLineList, expenseLineList, elementsToInvoiceList, projectTaskList, counter);\n }\n return;\n}\n"
|
"public void execute(AdminCommandContext context) {\n report = context.getActionReport();\n report.setActionExitCode(SUCCESS);\n top = report.getTopMessagePart();\n logger = context.getLogger();\n boolean javaEnabledOnCmd = Boolean.parseBoolean(ctx.getArguments().getProperty(\"String_Node_Str\"));\n javaConfig = config.getJavaConfig();\n int debugPort = parsePort(javaConfig.getDebugOptions());\n top.addProperty(\"String_Node_Str\", Boolean.toString(jpdaEnabled));\n top.addProperty(\"String_Node_Str\", Integer.toString(debugPort));\n final OperatingSystemMXBean osBean = (OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean();\n top.addProperty(\"String_Node_Str\", osBean.getArch());\n top.addProperty(\"String_Node_Str\", osBean.getName());\n top.addProperty(\"String_Node_Str\", osBean.getVersion());\n top.addProperty(\"String_Node_Str\", \"String_Node_Str\" + osBean.getAvailableProcessors());\n if (!OS.isAix()) {\n try {\n final Method jm = osBean.getClass().getMethod(\"String_Node_Str\");\n AccessController.doPrivileged(new PrivilegedExceptionAction() {\n public Object run() throws Exception {\n if (!jm.isAccessible()) {\n jm.setAccessible(true);\n }\n return null;\n }\n });\n top.addProperty(\"String_Node_Str\", \"String_Node_Str\" + jm.invoke(osBean));\n } catch (Exception ex) {\n logger.log(Level.SEVERE, null, ex);\n }\n }\n RuntimeMXBean rmxb = ManagementFactory.getRuntimeMXBean();\n top.addProperty(\"String_Node_Str\", \"String_Node_Str\" + rmxb.getStartTime());\n top.addProperty(\"String_Node_Str\", \"String_Node_Str\" + rmxb.getName());\n checkDtrace();\n setDasName();\n top.addProperty(\"String_Node_Str\", System.getProperty(\"String_Node_Str\"));\n setRestartable();\n reportMessage.append(Strings.get(\"String_Node_Str\", jpdaEnabled ? \"String_Node_Str\" : \"String_Node_Str\"));\n report.setMessage(reportMessage.toString());\n}\n"
|
"private EdmSimpleType getEdmSimpleTypeMockedObj(String value) throws EdmException {\n EdmSimpleType edmSimpleType = EasyMock.createMock(EdmSimpleType.class);\n EasyMock.expect(edmSimpleType.getName()).andReturn(value);\n EasyMock.expect(edmSimpleType.getKind()).andReturn(EdmTypeKind.SIMPLE).times(10);\n EasyMock.expect(edmSimpleType.valueOfString(value, EdmLiteralKind.URI, getEdmFacetsMockedObj(), null)).andReturn(value).times(10);\n EasyMock.expect(edmSimpleType.valueOfString(value, EdmLiteralKind.URI, null, null)).andReturn(value).times(10);\n EasyMock.expect(edmSimpleType.valueToString(value, EdmLiteralKind.DEFAULT, getEdmFacetsMockedObj())).andReturn(value).times(10);\n EasyMock.expect(edmSimpleType.valueToString(value, EdmLiteralKind.DEFAULT, null)).andReturn(value).times(10);\n EasyMock.replay(edmSimpleType);\n return edmSimpleType;\n}\n"
|
"private static void populateLevels(List levelExprList, List result) {\n for (Iterator i = levelExprList.iterator(); i.hasNext(); ) {\n String levelExpr = (String) i.next();\n result.add(getTargetDimLevel(levelExpr));\n }\n}\n"
|
"public void setAmount(final BigInteger amount) {\n if (amount != null)\n textView.setText(amountSigned ? WalletUtils.formatValue(amount, Constants.CURRENCY_PLUS_SIGN, Constants.CURRENCY_MINUS_SIGN, precision) : WalletUtils.formatValue(amount, precision));\n else\n textView.setText(null);\n}\n"
|
"public void open() {\n synchronized (this) {\n csvFile = new File(path);\n if (csvFile.exists()) {\n switch(appendStrategy) {\n case RENAME:\n String name = csvFile.getAbsolutePath();\n File f = null;\n int ind = 1;\n do {\n f = new File(name + \"String_Node_Str\" + (ind++));\n } while (f.exists());\n csvFile = f;\n break;\n case OVERWRITE:\n if (!csvFile.delete()) {\n log.warn(String.format(\"String_Node_Str\", csvFile.getAbsolutePath()));\n }\n break;\n case FORCE_APPEND:\n default:\n }\n }\n }\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + csvFile.getAbsolutePath());\n }\n}\n"
|
"public ConnectorInstanceTO update(HttpServletResponse response, ConnectorInstanceTO connectorTO) throws SyncopeClientCompositeErrorException, NotFoundException, MissingConfKeyException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\" + connectorTO);\n }\n ConnectorInstance connectorInstance;\n try {\n connectorInstance = binder.updateConnectorInstance(connectorTO.getId(), connectorTO);\n } catch (SyncopeClientCompositeErrorException e) {\n LOG.error(\"String_Node_Str\" + connectorTO, e);\n throw e;\n }\n connectorInstance = connectorInstanceDAO.save(connectorInstance);\n return binder.getConnectorInstanceTO(connectorInstance);\n}\n"
|
"protected void generateInfos(OpenableElementInfo info, HashMap<IOpenable, OpenableElementInfo> newElements, IProgressMonitor monitor) throws YangModelException {\n openAncestors(newElements, monitor);\n IResource underlResource = getResource();\n IStatus status = validateExistence(underlResource);\n if (!status.isOK()) {\n if (status.getException() != null) {\n throw new YangModelException(status.getException(), status.getCode());\n } else {\n throw new YangModelException(status.getMessage());\n }\n }\n if (monitor != null && monitor.isCanceled()) {\n throw new OperationCanceledException();\n }\n newElements.put(this, info);\n try {\n OpenableElementInfo openableElementInfo = (OpenableElementInfo) info;\n boolean isStructureKnown = buildStructure(openableElementInfo, monitor, newElements, underlResource);\n openableElementInfo.setIsStructureKnown(isStructureKnown);\n } catch (YangModelException e) {\n newElements.remove(this);\n throw e;\n }\n YangModelManager.getYangModelManager().getElementsOutOfSynchWithBuffers().remove(this);\n}\n"
|
"public Connection connect(Properties properties) throws DatabaseAnonymizerException {\n String driver = properties.getProperty(\"String_Node_Str\");\n String vendor = properties.getProperty(\"String_Node_Str\");\n String url = properties.getProperty(\"String_Node_Str\");\n String userName = properties.getProperty(\"String_Node_Str\");\n String password = properties.getProperty(\"String_Node_Str\");\n log.debug(\"String_Node_Str\" + driver);\n log.debug(\"String_Node_Str\" + database);\n log.debug(\"String_Node_Str\" + url);\n log.debug(\"String_Node_Str\" + userName);\n try {\n forName(driver);\n } catch (ClassNotFoundException cnfe) {\n log.error(cnfe.toString());\n throw new DatabaseAnonymizerException(cnfe.toString(), cnfe);\n }\n Connection conn = null;\n try {\n conn = getConnection(url, userName, password);\n conn.setAutoCommit(false);\n } catch (SQLException sqle) {\n log.error(sqle.toString());\n if (conn != null) {\n try {\n conn.close();\n } catch (SQLException sql) {\n log.error(sql.toString());\n }\n }\n throw new DatabaseAnonymizerException(sqle.toString(), sqle);\n }\n return conn;\n}\n"
|
"int[] getReorderMap(int atomicCount) {\n return (int[]) reorderMaps.get(atomicCount - atomicListOffset);\n}\n"
|
"public NativeLinkableInput getNativeLinkableInput(CxxPlatform cxxPlatform, Linker.LinkableDepType type) {\n HalideLibrary rule = (HalideLibrary) requireBuildRule(cxxPlatform);\n Path libPath = rule.getPathToOutput().resolve(rule.getLibraryName());\n return NativeLinkableInput.of(SourcePathArg.from(getResolver(), new BuildTargetSourcePath(rule.getBuildTarget(), libPath)), ImmutableSet.<FrameworkPath>of(), ImmutableSet.<FrameworkPath>of());\n}\n"
|
"private void initPropsAsVarsInRelationship(final PropertyMap map, final BPELScopeActivity templatePlan) {\n final AbstractRelationshipTemplate relationshipTemplate = templatePlan.getRelationshipTemplate();\n if (relationshipTemplate.getProperties() != null) {\n final Element propertyElement = relationshipTemplate.getProperties().getDOMElement();\n for (int i = 0; i < propertyElement.getChildNodes().getLength(); i++) {\n if (propertyElement.getChildNodes().item(i).getNodeType() == Node.TEXT_NODE) {\n continue;\n }\n final String propName = propertyElement.getChildNodes().item(i).getLocalName();\n final String propVarName = relationshipTemplate.getId().replace(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\" + propertyElement.getChildNodes().item(i).getLocalName();\n map.addPropertyMapping(relationshipTemplate.getId(), propName, \"String_Node_Str\" + propVarName);\n String value = \"String_Node_Str\";\n for (int j = 0; j < propertyElement.getChildNodes().item(i).getChildNodes().getLength(); j++) {\n if (propertyElement.getChildNodes().item(i).getChildNodes().item(j).getNodeType() == Node.TEXT_NODE) {\n value += propertyElement.getChildNodes().item(i).getChildNodes().item(j).getNodeValue();\n }\n }\n PropertyVariableInitializer.LOG.debug(\"String_Node_Str\" + propVarName);\n PropertyVariableInitializer.LOG.debug(\"String_Node_Str\" + value);\n this.planHandler.addPropertyVariable(propVarName, templatePlan.getBuildPlan());\n if (!value.trim().isEmpty() && !value.trim().equals(\"String_Node_Str\")) {\n this.planHandler.initializePropertyVariable(propVarName, value, templatePlan.getBuildPlan());\n }\n }\n }\n}\n"
|
"public void testCleanupGeneration() throws Exception {\n String streamName = \"String_Node_Str\";\n Id.Stream streamId = Id.Stream.from(Id.Namespace.DEFAULT, streamName);\n StreamAdmin streamAdmin = getStreamAdmin();\n streamAdmin.create(streamId);\n StreamConfig streamConfig = streamAdmin.getConfig(streamId);\n StreamFileJanitor janitor = new StreamFileJanitor(getCConfiguration(), getStreamAdmin(), getNamespacedLocationFactory(), getNamespaceStore());\n for (int i = 0; i < 5; i++) {\n FileWriter<StreamEvent> writer = createWriter(streamId);\n writer.append(StreamFileTestUtils.createEvent(System.currentTimeMillis(), \"String_Node_Str\"));\n writer.close();\n janitor.clean(streamConfig.getLocation(), streamConfig.getTTL(), System.currentTimeMillis());\n verifyGeneration(streamConfig, i);\n streamAdmin.truncate(streamId);\n }\n int generation = StreamUtils.getGeneration(streamConfig);\n Assert.assertEquals(5, generation);\n janitor.clean(streamConfig.getLocation(), streamConfig.getTTL(), System.currentTimeMillis());\n for (Location location : streamConfig.getLocation().list()) {\n if (location.isDirectory()) {\n Assert.assertEquals(generation, Integer.parseInt(location.getName()));\n }\n }\n}\n"
|
"private static String openURL(String resource, Map<String, String> params, String requestMethod) throws APIException, IOException {\n String encodedParams = urlEncodeParams(params);\n URL url = null;\n APIException apiException = null;\n IOException ioException = null;\n String responseStr = null;\n if (requestMethod.equals(\"String_Node_Str\")) {\n if (encodedParams.isEmpty()) {\n url = new URL(BASE_URL + resource);\n } else {\n url = new URL(BASE_URL + resource + '?' + encodedParams);\n }\n } else if (requestMethod.equals(\"String_Node_Str\")) {\n url = new URL(BASE_URL + resource);\n }\n HttpURLConnection conn = null;\n try {\n conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(requestMethod);\n conn.setConnectTimeout(TIMEOUT_MS);\n if (requestMethod.equals(\"String_Node_Str\")) {\n byte[] postBytes = encodedParams.getBytes(\"String_Node_Str\");\n conn.setDoOutput(true);\n conn.setRequestProperty(\"String_Node_Str\", \"String_Node_Str\");\n conn.setRequestProperty(\"String_Node_Str\", String.valueOf(postBytes.length));\n conn.getOutputStream().write(postBytes);\n conn.getOutputStream().close();\n }\n if (conn.getResponseCode() != 200) {\n apiException = new APIException(inputStreamToString(conn.getErrorStream()));\n } else {\n responseStr = inputStreamToString(conn.getInputStream());\n }\n } catch (IOException e) {\n ioException = e;\n } finally {\n try {\n if (apiException != null) {\n conn.getErrorStream().close();\n }\n conn.getInputStream().close();\n } catch (Exception ex) {\n }\n if (ioException != null) {\n throw ioException;\n }\n if (apiException != null) {\n throw apiException;\n }\n }\n return responseStr;\n}\n"
|
"public void glClear(int flags) {\n Data.renderCallsThisFrame = 0;\n GLES30.glClear(flags);\n}\n"
|
"protected void onBeforeSocializeInit() {\n progress = ProgressDialog.show(getContext(), \"String_Node_Str\", \"String_Node_Str\");\n}\n"
|
"private boolean cutCorn(ShortPoint2D pos) {\n short x = pos.getX();\n short y = pos.getY();\n if (grid.isInBounds(x, y)) {\n AbstractObjectsManagerObject corn = (AbstractObjectsManagerObject) grid.getMapObject(x, y, EMapObjectType.CORN_ADULT);\n if (corn != null && corn.cutOff()) {\n timingQueue.offer(new TimeEvent(corn, Corn.REMOVE_DURATION, true));\n return true;\n }\n }\n return false;\n}\n"
|
"public JsonResult<String> export(HttpServletResponse response, UserQuery condtion) {\n String excelTemplate = \"String_Node_Str\";\n PageQuery<CoreUser> page = condtion.getPageQuery();\n page.setPageSize(Integer.MAX_VALUE);\n page.setPageNumber(1);\n page.setTotalRow(Integer.MAX_VALUE);\n List<UserExcelExportData> users = userConsoleService.queryExcel(page);\n try (InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(excelTemplate)) {\n if (is == null) {\n throw new PlatformException(\"String_Node_Str\" + excelTemplate);\n }\n FileItem item = fileService.createFileTemp(\"String_Node_Str\");\n OutputStream os = item.openOutpuStream();\n Context context = new Context();\n context.putVar(\"String_Node_Str\", users);\n JxlsHelper.getInstance().processTemplate(is, os, context);\n return JsonResult.success(item.getId());\n } catch (IOException e) {\n throw new PlatformException(e.getMessage());\n }\n}\n"
|
"public boolean onTouchEvent(final MotionEvent ev) {\n if (replaying || deleteItemListener == null)\n return super.onTouchEvent(ev);\n boolean processed = false;\n switch(ev.getAction()) {\n case MotionEvent.ACTION_UP:\n case MotionEvent.ACTION_CANCEL:\n processed = processUpEvent();\n break;\n case MotionEvent.ACTION_DOWN:\n if (scrolling)\n break;\n processed = processDownEvent(ev);\n break;\n case MotionEvent.ACTION_MOVE:\n if (scrolling)\n break;\n processed = processMoveEvent(ev);\n break;\n }\n if (processed) {\n if (!(state == State.DRAGGING_ITEM))\n intercepted.add(ev);\n return true;\n } else if (intercepted.size() > 0) {\n replaying = true;\n try {\n for (final MotionEvent event : intercepted) {\n super.dispatchTouchEvent(event);\n }\n } catch (Exception e) {\n }\n return true;\n } else\n return super.onTouchEvent(ev);\n}\n"
|
"public int compare(Object o1, Object o2) {\n IProgramElement sv1 = ((IStructureViewNode) o1).getStructureNode();\n IProgramElement sv2 = ((IStructureViewNode) o2).getStructureNode();\n if (sv1 instanceof IProgramElement && sv2 instanceof IProgramElement) {\n IProgramElement p1 = (IProgramElement) sv1;\n IProgramElement p2 = (IProgramElement) sv2;\n if (p2.getKind() == IProgramElement.Kind.IMPORT_REFERENCE)\n return 1;\n if (p1.getKind() == IProgramElement.Kind.IMPORT_REFERENCE)\n return -1;\n if (p1.getSourceLocation() == null || p2.getSourceLocation() == null) {\n return 0;\n } else if (p1.getSourceLocation().getLine() < p2.getSourceLocation().getLine()) {\n return -1;\n } else {\n return 1;\n }\n } else {\n return 0;\n }\n}\n"
|
"public static Map<Class<? extends AbstractRule>, Rule> parseConfig(ConfigurationSection system) {\n Map<Class<? extends AbstractRule>, Rule> rules = Collections.emptyMap();\n if (system != null && system.getConfigurationSection(\"String_Node_Str\") != null) {\n List<String> classNames = system.getStringList(\"String_Node_Str\");\n HeroesRule rule = new HeroesRule();\n rule.setClassNames(classNames);\n rules = new HashMap<Class<? extends AbstractRule>, Rule>();\n rules.put(HeroesRule.class, rule);\n }\n return rules;\n}\n"
|
"public void connectSensors() {\n super.connectSensors();\n if (getDriver().isJmxEnabled()) {\n String requestProcessorMbeanName = \"String_Node_Str\";\n String connectorMbeanName = format(\"String_Node_Str\", getAttribute(HTTP_PORT));\n jmxWebFeed = JmxFeed.builder().entity(this).period(3000, TimeUnit.MILLISECONDS).pollAttribute(new JmxAttributePollConfig<Integer>(ERROR_COUNT).objectName(requestProcessorMbeanName).attributeName(\"String_Node_Str\")).pollAttribute(new JmxAttributePollConfig<Integer>(REQUEST_COUNT).objectName(requestProcessorMbeanName).attributeName(\"String_Node_Str\")).pollAttribute(new JmxAttributePollConfig<Integer>(TOTAL_PROCESSING_TIME).objectName(requestProcessorMbeanName).attributeName(\"String_Node_Str\")).pollAttribute(new JmxAttributePollConfig<String>(CONNECTOR_STATUS).objectName(connectorMbeanName).attributeName(\"String_Node_Str\")).pollAttribute(new JmxAttributePollConfig<Boolean>(SERVICE_PROCESS_IS_RUNNING).objectName(connectorMbeanName).attributeName(\"String_Node_Str\").onSuccess(Functions.forPredicate(Predicates.<Object>equalTo(\"String_Node_Str\"))).setOnFailureOrException(false)).build();\n jmxAppFeed = JavaAppUtils.connectMXBeanSensors(this);\n } else {\n LOG.warn(\"String_Node_Str\");\n connectServiceUpIsRunning();\n }\n}\n"
|
"public static Allocation start(final VmInstance vm) {\n BootableSet bootSet = Emis.recreateBootableSet(vm);\n return new Allocation(vm.getReservationId(), vm.getInstanceId(), vm.getUserData(), vm.getExpiration(), vm.lookupPartition(), vm.getKeyPair(), bootSet, vm.getVmType(), vm.getNetworkGroups());\n}\n"
|
"protected Time _fireAt(Time time) throws IllegalActionException {\n Actor container = (Actor) getContainer();\n if (container != null) {\n Director director = container.getExecutiveDirector();\n if (director != null) {\n Time result = director.fireAt(container, time);\n if (!result.equals(time)) {\n throw new IllegalActionException(this, \"String_Node_Str\" + time + \"String_Node_Str\" + result);\n }\n return result;\n }\n }\n return new Time(this, Double.NEGATIVE_INFINITY);\n}\n"
|
"public Void call() throws Exception {\n int numEvents = 0;\n Response response = null;\n try {\n response = webTarget.request().get(Response.class);\n InputStream inputStream = new WrappedResponseInputStream(response);\n JsonParser jp = JSON_FACTORY.createParser(inputStream);\n while (jp.nextToken() != JsonToken.END_OBJECT && !jp.isClosed() && eventCallback.isReceiving()) {\n try {\n eventCallback.onEvent(OBJECT_MAPPER.readValue(jp, Event.class));\n } catch (Exception e) {\n eventCallback.onException(e);\n }\n numEvents++;\n }\n } catch (Exception e) {\n eventCallback.onException(e);\n } finally {\n if (response != null) {\n response.close();\n }\n }\n eventCallback.onCompletion(numEvents);\n return null;\n}\n"
|
"protected String __handleBodyStyle(String content) {\n String bodyStyleId = BLANK_STRING;\n if (content == null)\n return style;\n Pattern p = Pattern.compile(\"String_Node_Str\", Pattern.CASE_INSENSITIVE);\n Matcher m = p.matcher(content);\n String bodyStyleId = \"String_Node_Str\";\n if (m.find()) {\n for (int i = 1; i < m.groupCount() + 1; i++) {\n String group = m.group(i);\n if (group == null)\n continue;\n Pattern pl = Pattern.compile(\"String_Node_Str\", Pattern.CASE_INSENSITIVE);\n Matcher ml = pl.matcher(group.trim());\n if (ml.find()) {\n bodyStyleId = ml.group(1).trim();\n break;\n }\n }\n }\n p = Pattern.compile(\"String_Node_Str\" + bodyStyleId + \"String_Node_Str\", Pattern.CASE_INSENSITIVE);\n m = p.matcher(content);\n if (m.find())\n style = m.group(1).trim();\n return style;\n}\n"
|
"private int getScrollRange() {\n int contentHeight = getContentHeight();\n int scrollRange = Math.max(0, contentHeight - mMaxLayoutHeight + mBottomStackPeekSize + mBottomStackSlowDownHeight);\n int imeInset = getImeInset();\n scrollRange += Math.min(imeInset, Math.max(0, getContentHeight() - (getHeight() - imeInset)));\n return scrollRange;\n}\n"
|
"public void loadChildren() {\n _childNames = new ArrayList();\n try {\n ITableInfo[] tables = null;\n String[] tableTypes = _session.getMetaData().getTableTypes();\n try {\n SQLDatabaseMetaData metaData = _session.getMetaData();\n boolean isODBCTeradata = ConnectionUtils.isOdbcTeradata(metaData.getJDBCMetaData());\n boolean isNetezza = ConnectionUtils.isNetezza(metaData.getJDBCMetaData());\n if (isODBCTeradata || isNetezza) {\n tables = metaData.getTables(null, _name, \"String_Node_Str\", tableTypes, null);\n } else {\n tables = metaData.getTables(_name, _name, \"String_Node_Str\", tableTypes, null);\n }\n } catch (Throwable e) {\n _logger.debug(\"String_Node_Str\");\n }\n for (int i = 0; i < tableTypes.length; ++i) {\n INode childNode = findExtensionNode(tableTypes[i]);\n if (childNode != null) {\n _childNames.add(childNode.getLabelText());\n if (!isExcludedByFilter(childNode.getLabelText())) {\n addChildNode(childNode);\n }\n } else {\n if (tables != null) {\n TableFolderNode node = new TableFolderNode(this, tableTypes[i], _session, tables);\n _childNames.add(node.getLabelText());\n if (!isExcludedByFilter(node.getLabelText())) {\n addChildNode(node);\n }\n }\n }\n }\n addExtensionNodes();\n } catch (Throwable e) {\n SQLExplorerPlugin.error(\"String_Node_Str\" + _name, e);\n }\n}\n"
|
"public void runInPod() throws Exception {\n configureCloud(r);\n WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, \"String_Node_Str\");\n p.setDefinition(new CpsFlowDefinition(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", true));\n WorkflowRun b = p.scheduleBuild2(0).waitForStart();\n assertNotNull(b);\n r.assertBuildStatusSuccess(r.waitForCompletion(b));\n r.assertLogContains(\"String_Node_Str\", b);\n r.assertLogContains(\"String_Node_Str\", b);\n r.assertLogContains(\"String_Node_Str\", b);\n}\n"
|
"protected void doRead(Buffer buffer) throws IOException {\n long nanos = 0;\n VideoFormat format;\n format = (VideoFormat) buffer.getFormat();\n if (format == null) {\n format = (VideoFormat) getFormat();\n if (format != null)\n buffer.setFormat(format);\n }\n ivfFileReader.getNextFrame(frame, true);\n buffer.setData(frame.getFrameData());\n buffer.setOffset(0);\n buffer.setLength(frame.getFrameLength());\n buffer.setTimeStamp(System.nanoTime());\n buffer.setFlags(Buffer.FLAG_SYSTEM_TIME | Buffer.FLAG_LIVE_DATA);\n millis = System.currentTimeMillis() - this.timeLastRead;\n millis = (frame.getTimestamp() - lastFrameTimestamp) * TIMEBASE - millis;\n if (millis > 0) {\n try {\n Thread.sleep(millis);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n this.lastFrameTimestamp = frame.getTimestamp();\n this.timeLastRead = System.currentTimeMillis();\n}\n"
|
"private void placePlants(float numPlants, float numDews, float numPods, float numStars) {\n Iterator<Integer> cells = affectedCells.iterator();\n Level floor = Dungeon.level;\n while (cells.hasNext() && Random.Float() <= numPlants) {\n Plant.Seed seed = (Plant.Seed) Generator.random(Generator.Category.SEED);\n if (seed instanceof BlandfruitBush.Seed) {\n if (Random.Int(15) - Dungeon.limitedDrops.blandfruitSeed.count >= 0) {\n floor.plant(seed, cells.next());\n Dungeon.limitedDrops.blandfruitSeed.count++;\n }\n } else if (seed != null)\n floor.plant(seed, cells.next());\n numPlants--;\n }\n while (cells.hasNext() && Random.Float() <= numDews) {\n floor.plant(new Dewcatcher.Seed(), cells.next());\n numDews--;\n }\n while (cells.hasNext() && Random.Float() <= numPods) {\n floor.plant(new Seedpod.Seed(), cells.next());\n numPods--;\n }\n while (cells.hasNext() && Random.Float() <= numStars) {\n floor.plant(new Starflower.Seed(), cells.next());\n numStars--;\n }\n}\n"
|
"public Structure rebuildQuaternaryStructure(Structure asymUnit, ArrayList<ModelTransformationMatrix> transformations) {\n Structure s = asymUnit.clone();\n List<Chain> transformedChains = new ArrayList<Chain>();\n for (ModelTransformationMatrix max : transformations) {\n boolean foundChain = false;\n for (Chain c : s.getChains()) {\n String intChainID = c.getInternalChainID();\n if (intChainID == null) {\n System.err.println(\"String_Node_Str\" + c.getChainID() + \"String_Node_Str\" + max.ndbChainId + \"String_Node_Str\");\n intChainID = c.getChainID();\n }\n if (max.ndbChainId.equals(intChainID)) {\n foundChain = true;\n Chain newChain = (Chain) c.clone();\n Matrix m = max.getMatrix();\n double[] vector = max.getVector();\n Atom v = new AtomImpl();\n v.setCoords(vector);\n for (Group a : newChain.getAtomGroups()) {\n Calc.rotate(a, m);\n Calc.shift(a, v);\n }\n transformedChains.add(newChain);\n }\n }\n if (!foundChain) {\n System.err.println(\"String_Node_Str\" + max.ndbChainId);\n }\n }\n s.setChains(transformedChains);\n return s;\n}\n"
|
"public BaseArtifactType getArtifact(String uuid, ArtifactType type) throws RepositoryException {\n Session session = null;\n String artifactPath = MapToJCRPath.getArtifactPath(uuid, type);\n try {\n session = JCRRepository.getSession();\n Node artifactNode = null;\n if (type.getArtifactType().isDerived()) {\n artifactNode = findArtifactNodeByUuid(session, uuid);\n } else {\n String artifactPath = MapToJCRPath.getArtifactPath(uuid, type);\n if (session.nodeExists(artifactPath)) {\n artifactNode = session.getNode(artifactPath);\n }\n }\n if (artifactNode != null) {\n return JCRNodeToArtifactFactory.createArtifact(session, artifactNode, type);\n } else {\n return null;\n }\n } catch (RepositoryException re) {\n throw re;\n } catch (Throwable t) {\n throw new RepositoryException(t);\n } finally {\n JCRRepository.logoutQuietly(session);\n }\n}\n"
|
"public void flushVertexCache(SqlgGraph sqlgGraph, Map<SchemaTable, Pair<SortedSet<String>, Map<SqlgVertex, Map<String, Object>>>> vertexCache) {\n Connection con = sqlgGraph.tx().getConnection();\n for (SchemaTable schemaTable : vertexCache.keySet()) {\n Pair<SortedSet<String>, Map<SqlgVertex, Map<String, Object>>> vertices = vertexCache.get(schemaTable);\n String sql = \"String_Node_Str\" + maybeWrapInQoutes(schemaTable.getSchema()) + \"String_Node_Str\" + maybeWrapInQoutes(VERTEX_PREFIX + schemaTable.getTable() + \"String_Node_Str\") + \"String_Node_Str\" + vertices.getRight().values().size() + \"String_Node_Str\";\n if (logger.isDebugEnabled()) {\n logger.debug(sql);\n }\n List<Long> ids = new LinkedList<>();\n if (!schemaTable.isTemporary()) {\n String sql = \"String_Node_Str\" + maybeWrapInQoutes(schemaTable.getSchema()) + \"String_Node_Str\" + maybeWrapInQoutes(VERTEX_PREFIX + schemaTable.getTable() + \"String_Node_Str\") + \"String_Node_Str\" + vertices.getRight().values().size() + \"String_Node_Str\";\n if (logger.isDebugEnabled()) {\n logger.debug(sql);\n }\n try (PreparedStatement preparedStatement = con.prepareStatement(sql)) {\n ResultSet resultSet = preparedStatement.executeQuery();\n while (resultSet.next()) {\n ids.add(resultSet.getLong(1));\n }\n resultSet.close();\n } catch (SQLException e) {\n throw new RuntimeException(e);\n }\n resultSet.close();\n } catch (SQLException e) {\n throw new RuntimeException(e);\n }\n Iterator<Long> it = ids.iterator();\n sql = internalConstructCompleteCopyCommandSqlVertex(sqlgGraph, schemaTable.isTemporary(), schemaTable.getSchema(), schemaTable.getTable(), vertices.getLeft());\n try (Writer writer = streamSql(sqlgGraph, sql)) {\n for (SqlgVertex sqlgVertex : vertices.getRight().keySet()) {\n Map<String, Object> keyValueMap = vertices.getRight().get(sqlgVertex);\n long id = it.next();\n sqlgVertex.setInternalPrimaryKey(RecordId.from(schemaTable, id));\n LinkedHashMap<String, Object> values = new LinkedHashMap<>();\n values.put(\"String_Node_Str\", id);\n for (String key : vertices.getLeft()) {\n values.put(key, keyValueMap.get(key));\n }\n writeStreamingVertex(writer, values);\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n}\n"
|
"public void send(final SentProgress progress, final Payload message, final byte[] msg) {\n try {\n final ByteBuf data = channel.config().getAllocator().buffer(msg.length);\n data.writeBytes(msg);\n final ChannelFuture cf = channel.writeAndFlush(data);\n cf.addListener(new GenericFutureListener<Future<? super Void>>() {\n public void operationComplete(Future<? super Void> future) throws Exception {\n if (cf.cause() != null) {\n logger.error(\"String_Node_Str\", channel, cf.cause());\n progress.incrFailed();\n message.addFailedClient(userId);\n } else {\n progress.incrSuccess();\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\", channel, channel.hashCode());\n }\n }\n }\n });\n } catch (Exception e) {\n progress.incrFailed();\n message.addFailedClient(userId, new PushError(PushError.UnKnown, e.getMessage()));\n logger.error(e.getMessage(), e);\n }\n}\n"
|
"public void teardown() {\n for (ServicePool<Service> pool : _pools) {\n pool.close();\n }\n _hostDiscovery.close();\n}\n"
|
"protected double asRelativeValue(final InformationLoss<?> infoLoss, final ARXResult result) {\n ARXLattice lattice = model.getProcessStatistics().getNumberOfSteps() > 1 ? model.getProcessStatistics().getLattice() : result.getLattice();\n return infoLoss.relativeTo(lattice.getLowestScore(), lattice.getHighestScore()) * 100d;\n}\n"
|
"public void channelActive(ChannelHandlerContext ctx) throws Exception {\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\" + ctx.channel());\n }\n ClientProxyDelegate.instance.save(ctx.channel());\n}\n"
|
"protected RenderedImage createImage(int level) {\n ArrayList<RenderedImage> tileImages = new ArrayList<RenderedImage>();\n for (String tileId : sceneDescription.getTileIds()) {\n int tileIndex = sceneDescription.getTileIndex(tileId);\n Rectangle tileRectangle = sceneDescription.getTileRectangle(tileIndex);\n PlanarImage opImage = createL1cTileImage(tileId, level);\n opImage = TranslateDescriptor.create(opImage, (float) (tileRectangle.x >> level), (float) (tileRectangle.y >> level), Interpolation.getInstance(Interpolation.INTERP_NEAREST), null);\n tileImages.add(opImage);\n }\n if (tileImages.isEmpty()) {\n return null;\n }\n ImageLayout imageLayout = new ImageLayout();\n imageLayout.setMinX(0);\n imageLayout.setMinY(0);\n imageLayout.setTileWidth(DEFAULT_JAI_TILE_SIZE);\n imageLayout.setTileHeight(DEFAULT_JAI_TILE_SIZE);\n imageLayout.setTileGridXOffset(0);\n imageLayout.setTileGridYOffset(0);\n RenderedOp mosaicOp = MosaicDescriptor.create(tileImages.toArray(new RenderedImage[tileImages.size()]), MosaicDescriptor.MOSAIC_TYPE_OVERLAY, null, null, new double[][] { { 1.0 } }, new double[] { FILL_CODE_MOSAIC_BG }, new RenderingHints(JAI.KEY_IMAGE_LAYOUT, imageLayout));\n System.out.printf(\"String_Node_Str\", level, mosaicOp.getMinX(), mosaicOp.getMinY());\n return mosaicOp;\n}\n"
|
"public void setUp() throws NoSuchAuthorityCodeException, FactoryRegistryException, FactoryException, IOException {\n List<LineString> edges = Lists.newArrayList();\n CoordinateReferenceSystem crs = CRS.getAuthorityFactory(false).createGeographicCRS(\"String_Node_Str\");\n startCoord = new Coordinate(40.7549, -73.97749);\n Envelope tmpEnv = new Envelope(startCoord);\n final double appMeter = GeoUtils.getMetersInAngleDegrees(1d);\n tmpEnv.expandBy(appMeter * 10e3);\n ReferencedEnvelope gridBounds = new ReferencedEnvelope(tmpEnv.getMinX(), tmpEnv.getMaxX(), tmpEnv.getMinY(), tmpEnv.getMaxY(), crs);\n List<OrthoLineDef> lineDefs = Arrays.asList(new OrthoLineDef(LineOrientation.VERTICAL, 1, appMeter * 100d), new OrthoLineDef(LineOrientation.HORIZONTAL, 1, appMeter * 100d));\n SimpleFeatureSource grid = Lines.createOrthoLines(gridBounds, lineDefs);\n FeatureIterator iter = grid.getFeatures().features();\n while (iter.hasNext()) {\n Feature feature = iter.next();\n LineString geom = (LineString) feature.getDefaultGeometryProperty().getValue();\n edges.add(geom);\n edges.add((LineString) geom.reverse());\n }\n graph = new GenericJTSGraph(edges);\n avgTransform = MatrixFactory.getDefault().copyArray(new double[][] { { 1, 0, 1, 0 }, { 0, 1, 0, 1 } }).scale(1d / 2d);\n}\n"
|
"static void deployService(String cartridgeType, String alias, String autoscalingPolicy, String deploymentPolicy, String tenantDomain, int tenantId, String clusterDomain, String clusterSubdomain, String tenantRange) {\n log.info(\"String_Node_Str\");\n try {\n } catch (Exception e) {\n e.printStackTrace();\n }\n}\n"
|
"private String formatToolTipLabel(final int index) {\n long startTime = fScaledData.getBucketStartTime(index);\n if (startTime < 0) {\n startTime = 0;\n }\n final long endTime = fScaledData.getBucketEndTime(fScaledData.fCurrentBucket);\n final int nbEvents = (index >= 0) ? fScaledData.fData[index] : 0;\n final StringBuffer buffer = new StringBuffer();\n buffer.append(\"String_Node_Str\");\n buffer.append(HistogramUtils.nanosecondsToString(startTime));\n buffer.append(\"String_Node_Str\");\n buffer.append(HistogramUtils.nanosecondsToString(endTime));\n buffer.append(\"String_Node_Str\");\n buffer.append(\"String_Node_Str\");\n buffer.append(nbEvents);\n return buffer.toString();\n}\n"
|
"public boolean supportsSystem(String system) throws TerminologyServiceException {\n if (codeSystems.containsKey(system))\n return true;\n else if (nonSupportedCodeSystems.contains(system))\n return false;\n else if (system.startsWith(\"String_Node_Str\") || system.startsWith(\"String_Node_Str\") || system.startsWith(\"String_Node_Str\") || system.startsWith(\"String_Node_Str\"))\n return false;\n else {\n if (noTerminologyServer)\n return false;\n if (bndCodeSystems == null) {\n try {\n log(\"String_Node_Str\" + system);\n bndCodeSystems = txServer.fetchFeed(txServer.getAddress() + \"String_Node_Str\");\n } catch (Exception e) {\n if (canRunWithoutTerminology) {\n noTerminologyServer = true;\n log(\"String_Node_Str\");\n return false;\n } else\n throw new TerminologyServiceException(e);\n }\n }\n if (bndCodeSystems != null) {\n for (BundleEntryComponent be : bndCodeSystems.getEntry()) {\n CodeSystem cs = (CodeSystem) be.getResource();\n if (!codeSystems.containsKey(cs.getUrl())) {\n codeSystems.put(cs.getUrl(), null);\n }\n }\n }\n if (codeSystems.containsKey(system))\n return true;\n }\n nonSupportedCodeSystems.add(system);\n return false;\n}\n"
|
"public String toString() {\n StringBuilder ret = new StringBuilder(64);\n if (head != null) {\n for (ByteBuffer bytes : head) {\n ret.append(ByteHelper.toHexString(bytes.array()));\n ret.append(\"String_Node_Str\");\n }\n }\n ret.append(ByteHelper.toHexString(buffer, 0, count));\n if (tail != null) {\n for (ByteBuffer bytes : tail) {\n ret.append(\"String_Node_Str\");\n ret.append(ByteHelper.toHexString(bytes.array()));\n }\n }\n return ret.toString();\n}\n"
|
"public void read(Json json, JsonValue jsonData) {\n BladeJson bjson = (BladeJson) json;\n if (bjson.getMode() == Mode.MODEL) {\n id = json.readValue(\"String_Node_Str\", String.class, jsonData);\n layers = json.readValue(\"String_Node_Str\", ArrayList.class, SceneLayer.class, jsonData);\n actors = json.readValue(\"String_Node_Str\", ConcurrentHashMap.class, BaseActor.class, jsonData);\n for (BaseActor actor : actors.values()) {\n actor.setScene(this);\n actor.setInitScene(id);\n if (actor instanceof InteractiveActor) {\n InteractiveActor ia = (InteractiveActor) actor;\n SceneLayer layer = getLayer(ia.getLayer());\n layer.add(ia);\n }\n }\n orderLayersByZIndex();\n backgroundAtlas = json.readValue(\"String_Node_Str\", String.class, jsonData);\n backgroundRegionId = json.readValue(\"String_Node_Str\", String.class, jsonData);\n musicDesc = json.readValue(\"String_Node_Str\", MusicDesc.class, jsonData);\n depthVector = json.readValue(\"String_Node_Str\", Vector2.class, jsonData);\n polygonalNavGraph = json.readValue(\"String_Node_Str\", PolygonalNavGraph.class, jsonData);\n sceneSize = json.readValue(\"String_Node_Str\", Vector2.class, jsonData);\n } else {\n JsonValue jsonValueActors = jsonData.get(\"String_Node_Str\");\n SceneActorRef actorRef;\n for (int i = 0; i < jsonValueActors.size; i++) {\n JsonValue jsonValueAct = jsonValueActors.get(i);\n actorRef = new SceneActorRef(jsonValueAct.name);\n Scene sourceScn = w.getScene(actorRef.getSceneId());\n if (sourceScn != this) {\n BaseActor actor = sourceScn.getActor(actorRef.getActorId(), false);\n sourceScn.removeActor(actor);\n addActor(actor);\n }\n }\n for (int i = 0; i < jsonValueActors.size; i++) {\n JsonValue jsonValueAct = jsonValueActors.get(i);\n actorRef = new SceneActorRef(jsonValueAct.name);\n BaseActor actor = getActor(actorRef.getActorId(), false);\n if (actor != null)\n actor.read(json, jsonValueAct);\n else\n EngineLogger.debug(\"String_Node_Str\" + actorRef);\n }\n orderLayersByZIndex();\n camera = json.readValue(\"String_Node_Str\", SceneCamera.class, jsonData);\n String followActorId = json.readValue(\"String_Node_Str\", String.class, jsonData);\n if (followActorId != null)\n setCameraFollowActor((SpriteActor) actors.get(followActorId));\n soundManager.read(json, jsonData);\n if (jsonData.get(\"String_Node_Str\") != null)\n timers = json.readValue(\"String_Node_Str\", Timers.class, jsonData);\n if (jsonData.get(\"String_Node_Str\") != null) {\n textManager.read(json, jsonData.get(\"String_Node_Str\"));\n }\n }\n verbs.read(json, jsonData);\n state = json.readValue(\"String_Node_Str\", String.class, jsonData);\n player = json.readValue(\"String_Node_Str\", String.class, jsonData);\n}\n"
|
"private String getProjectOutClassPath(IProject project) {\n if (!hasJavaNature(project)) {\n return null;\n }\n IJavaProject fCurrJProject = JavaCore.create(project);\n IPath path = null;\n boolean projectExists = (project.exists() && project.getFile(\"String_Node_Str\").exists());\n if (projectExists) {\n if (path == null) {\n path = fCurrJProject.readOutputLocation();\n String absPath = getFullPath(path, project);\n return absPath;\n }\n }\n return null;\n}\n"
|
"private void paintMarker(GC gc, Marker currentMarker, Location location) {\n Marker renderMarker = currentMarker;\n if (currentMarker.getType() == MarkerType.ICON_LITERAL) {\n renderMarker = currentMarker.copyInstance();\n renderMarker.setFill(ImageImpl.create(UIHelper.getURL(\"String_Node_Str\").toString()));\n }\n idrSWT.setProperty(IDeviceRenderer.GRAPHICS_CONTEXT, gc);\n final MarkerRenderer mr = new MarkerRenderer(idrSWT, StructureSource.createUnknown(null), location, LineAttributesImpl.create(getMarker().isVisible() ? ColorDefinitionImpl.BLUE() : ColorDefinitionImpl.GREY(), LineStyle.SOLID_LITERAL, 1), getMarker().isVisible() ? ColorDefinitionImpl.create(80, 168, 218) : ColorDefinitionImpl.GREY(), renderMarker, Integer.valueOf(4), null, false, false);\n boolean bException = false;\n try {\n mr.draw(idrSWT);\n } catch (ChartException ex) {\n ChartWizard.showException(ChartWizard.MarkerEdiCom_ID, ex.getLocalizedMessage());\n }\n if (cnvMarker.isFocusControl()) {\n gc.setLineStyle(SWT.LINE_DOT);\n gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_BLACK));\n gc.drawRectangle(0, 0, getSize().x - 21, this.getSize().y - 5);\n }\n}\n"
|
"public OperableTrigger setExtraPropertiesAfterInstantiation(OperableTrigger trigger, DBObject stored) {\n DailyTimeIntervalTriggerImpl t = (DailyTimeIntervalTriggerImpl) trigger;\n Object interval_unit = stored.get(TRIGGER_REPEAT_INTERVAL_UNIT);\n if (interval_unit != null) {\n t.setRepeatIntervalUnit(DateBuilder.IntervalUnit.valueOf((String) interval_unit));\n }\n Object repeatInterval = stored.get(TRIGGER_REPEAT_INTERVAL);\n if (repeatInterval != null) {\n t.setRepeatInterval((Integer) repeatInterval);\n }\n Object timesTriggered = stored.get(TRIGGER_TIMES_TRIGGERED);\n if (timesTriggered != null) {\n t.setTimesTriggered((Integer) timesTriggered);\n }\n DBObject startTOD = (DBObject) stored.get(TRIGGER_START_TIME_OF_DAY);\n if (startTOD != null) {\n t.setStartTimeOfDay(fromDBObject(startTOD));\n }\n DBObject endTOD = (DBObject) stored.get(TRIGGER_END_TIME_OF_DAY);\n if (endTOD != null) {\n t.setEndTimeOfDay(fromDBObject(endTOD));\n }\n return t;\n}\n"
|
"public static Type eval_(Typing tg, Value expr, Stmt stmt, JimpleBody jb) {\n if (expr instanceof ThisRef) {\n return ((ThisRef) expr).getType();\n } else if (expr instanceof ParameterRef) {\n return ((ParameterRef) expr).getType();\n } else if (expr instanceof Local) {\n Local ex = (Local) expr;\n if (tg == null) {\n return null;\n } else {\n return tg.get(ex);\n }\n } else if (expr instanceof BinopExpr) {\n BinopExpr be = (BinopExpr) expr;\n Value opl = be.getOp1(), opr = be.getOp2();\n Type tl = eval_(tg, opl, stmt, jb), tr = eval_(tg, opr, stmt, jb);\n if (expr instanceof CmpExpr || expr instanceof CmpgExpr || expr instanceof CmplExpr) {\n return ByteType.v();\n } else if (expr instanceof GeExpr || expr instanceof GtExpr || expr instanceof LeExpr || expr instanceof LtExpr || expr instanceof EqExpr || expr instanceof NeExpr) {\n return BooleanType.v();\n } else if (expr instanceof ShlExpr) {\n if (tl instanceof IntegerType) {\n return IntType.v();\n } else {\n return tl;\n }\n } else if (expr instanceof ShrExpr || expr instanceof UshrExpr) {\n return tl;\n } else if (expr instanceof AddExpr || expr instanceof SubExpr || expr instanceof MulExpr || expr instanceof DivExpr || expr instanceof RemExpr) {\n if (tl instanceof IntegerType) {\n return IntType.v();\n } else {\n return tl;\n }\n } else if (expr instanceof AndExpr || expr instanceof OrExpr || expr instanceof XorExpr) {\n if (tl instanceof IntegerType && tr instanceof IntegerType) {\n if (tl instanceof BooleanType) {\n if (tr instanceof BooleanType) {\n return BooleanType.v();\n } else {\n return tr;\n }\n } else if (tr instanceof BooleanType) {\n return tl;\n } else {\n Collection<Type> rs = AugHierarchy.lcas_(tl, tr);\n for (Type r : rs) {\n return r;\n }\n throw new RuntimeException();\n }\n } else {\n return tl;\n }\n } else {\n throw new RuntimeException(\"String_Node_Str\" + expr);\n }\n } else if (expr instanceof NegExpr) {\n Type t = eval_(tg, ((NegExpr) expr).getOp(), stmt, jb);\n if (t instanceof IntegerType) {\n if (t instanceof Integer1Type || t instanceof BooleanType || t instanceof Integer127Type || t instanceof ByteType) {\n return ByteType.v();\n } else if (t instanceof ShortType || t instanceof Integer32767Type) {\n return ShortType.v();\n } else {\n return IntType.v();\n }\n } else {\n return t;\n }\n } else if (expr instanceof CaughtExceptionRef) {\n RefType r = null;\n RefType throwableType = Scene.v().getRefType(\"String_Node_Str\");\n for (RefType t : TrapManager.getExceptionTypesOf(stmt, jb)) {\n if (r == null) {\n if (t.getSootClass().isPhantom()) {\n r = throwableType;\n } else {\n r = t;\n }\n } else {\n r = BytecodeHierarchy.lcsc(r, t, throwableType);\n }\n }\n if (r == null) {\n throw new RuntimeException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n return r;\n } else if (expr instanceof ArrayRef) {\n Local av = (Local) ((ArrayRef) expr).getBase();\n Type at = tg.get(av);\n if (at instanceof ArrayType) {\n return ((ArrayType) at).getElementType();\n } else if (at instanceof RefType) {\n RefType ref = (RefType) at;\n if (ref.getSootClass().getName().equals(\"String_Node_Str\") || ref.getSootClass().getName().equals(\"String_Node_Str\") || ref.getSootClass().getName().equals(\"String_Node_Str\")) {\n return ref;\n } else {\n return BottomType.v();\n }\n } else {\n return BottomType.v();\n }\n } else if (expr instanceof NewArrayExpr) {\n return ((NewArrayExpr) expr).getBaseType().makeArrayType();\n } else if (expr instanceof NewMultiArrayExpr) {\n return ((NewMultiArrayExpr) expr).getBaseType();\n } else if (expr instanceof CastExpr) {\n return ((CastExpr) expr).getCastType();\n } else if (expr instanceof InstanceOfExpr) {\n return BooleanType.v();\n } else if (expr instanceof LengthExpr) {\n return IntType.v();\n } else if (expr instanceof InvokeExpr) {\n return ((InvokeExpr) expr).getMethodRef().returnType();\n } else if (expr instanceof NewExpr) {\n return ((NewExpr) expr).getBaseType();\n } else if (expr instanceof FieldRef) {\n return ((FieldRef) expr).getType();\n } else if (expr instanceof DoubleConstant) {\n return DoubleType.v();\n } else if (expr instanceof FloatConstant) {\n return FloatType.v();\n } else if (expr instanceof IntConstant) {\n int value = ((IntConstant) expr).value;\n if (value >= 0 && value < 2) {\n return Integer1Type.v();\n } else if (value >= 2 && value < 128) {\n return Integer127Type.v();\n } else if (value >= -128 && value < 0) {\n return ByteType.v();\n } else if (value >= 128 && value < 32768) {\n return Integer32767Type.v();\n } else if (value >= -32768 && value < -128) {\n return ShortType.v();\n } else if (value >= 32768 && value < 65536) {\n return CharType.v();\n } else {\n return IntType.v();\n }\n } else if (expr instanceof LongConstant) {\n return LongType.v();\n } else if (expr instanceof NullConstant) {\n return NullType.v();\n } else if (expr instanceof StringConstant) {\n return RefType.v(\"String_Node_Str\");\n } else if (expr instanceof ClassConstant) {\n return RefType.v(\"String_Node_Str\");\n } else if (expr instanceof MethodHandle) {\n return RefType.v(\"String_Node_Str\");\n } else {\n throw new RuntimeException(\"String_Node_Str\" + expr);\n }\n}\n"
|
"private static int getLeftSpacesPaddingCount(final String str) {\n final int len = str.length();\n for (int i = 0; i < len; i++) {\n char c = str.charAt(i);\n if (!Character.isWhitespace(c))\n return i;\n }\n return len;\n}\n"
|
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_receiver);\n getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n Bundle bundle = bundleReceivedData();\n startReaderFragment(bundle);\n startTextParserService(bundle);\n}\n"
|
"public void visitLiteral(Literal<?> value) {\n Object rawValue = value.get();\n builder.append(\"String_Node_Str\").append(\"String_Node_Str\").append(\"String_Node_Str\").append(\"String_Node_Str\").append(rawValue).append(\"String_Node_Str\").append(rawValue.getClass().getCanonicalName()).append(\"String_Node_Str\").append(NL);\n}\n"
|
"public Exercise getExercise(Course course, String id) throws ConnectionFailedException, RecordNotFoundException {\n String query = String.format(\"String_Node_Str\", course.id, id);\n Statement stmt = this.connection.createStatement();\n ResultSet rs = stmt.executeQuery(query);\n Exercise e = new Exercise(new Course(rs.getString(\"String_Node_Str\")), rs.getInt(\"String_Node_Str\"));\n e.setStartDate(rs.getDate(\"String_Node_Str\"));\n e.setEndDate(rs.getDate(\"String_Node_Str\"));\n e.setRandomizationSeed(rs.getInt(\"String_Node_Str\"));\n e.setRetriesAllowed(rs.getInt(\"String_Node_Str\"));\n e.setScoreSelectionMethod(rs.getInt(\"String_Node_Str\"));\n e.setPointsPerCorrectAnswer(rs.getInt(\"String_Node_Str\"));\n e.setPointsPerWrongAnswer(rs.getInt(\"String_Node_Str\"));\n stmt.close();\n rs.close();\n return e;\n}\n"
|
"public void testExistingProductUpdated() throws Exception {\n Product product = TestUtil.createProduct(owner);\n String json = getJsonForProduct(product);\n Reader reader = new StringReader(json);\n Product created = importer.createObject(mapper, reader, owner);\n String newProductName = \"String_Node_Str\";\n created.setName(newProductName);\n Set<Product> storeThese = new HashSet<Product>();\n storeThese.add(created);\n when(productCuratorMock.lookupById(product.getOwner(), product.getId())).thenReturn(product);\n importer.store(storeThese, owner);\n}\n"
|
"private void repairIndexStore() {\n log(\"String_Node_Str\", \"String_Node_Str\");\n RMS ix = null;\n if (index != null && index.getIndexStore() != null) {\n ix = index.getIndexStore();\n } else {\n try {\n ix = rmsFactory.getIndexRMS(indexStoreName(), false);\n } catch (RecordStoreException rse) {\n }\n }\n byte[] storageInfo = null;\n byte[] indexData = null;\n if (ix != null) {\n try {\n storageInfo = ix.readRecord(STORAGE_INFO_REC_ID);\n } catch (RuntimeException rse) {\n }\n try {\n indexData = ix.readRecord(ID_INDEX_REC_ID);\n } catch (RuntimeException rse) {\n }\n }\n if (ix != null) {\n ix.close();\n }\n try {\n RecordStore.deleteRecordStore(indexStoreName());\n } catch (RecordStoreNotFoundException rsnfe) {\n } catch (RecordStoreException e) {\n String message = \"String_Node_Str\" + indexStoreName() + \"String_Node_Str\" + e.getMessage();\n log(\"String_Node_Str\", message);\n throw new RuntimeException(message);\n }\n this.initIndexStore();\n ix = index.getIndexStore();\n boolean infoRecordRecovered = false;\n if (storageInfo != null) {\n ix.updateRecord(STORAGE_INFO_REC_ID, storageInfo, true);\n infoRecordRecovered = true;\n }\n if (!infoRecordRecovered) {\n log(\"String_Node_Str\", indexStoreName() + \"String_Node_Str\" + \"String_Node_Str\");\n } else {\n log(\"String_Node_Str\", \"String_Node_Str\");\n }\n ;\n boolean indexDataRecoverd = false;\n if (indexData != null) {\n ix.updateRecord(ID_INDEX_REC_ID, indexData, true);\n indexDataRecoverd = true;\n }\n if (!indexDataRecoverd) {\n log(\"String_Node_Str\", indexStoreName() + \"String_Node_Str\" + \"String_Node_Str\");\n } else {\n log(\"String_Node_Str\", \"String_Node_Str\");\n }\n ;\n if (!infoRecordRecovered) {\n RMSStorageInfo info = (RMSStorageInfo) ix.readRecord(STORAGE_INFO_REC_ID, RMSStorageInfo.class);\n int stores = 0;\n boolean failed = false;\n while (!failed) {\n try {\n RMS rms = rmsFactory.getDataRMS(dataStoreName(stores), false);\n stores++;\n rms.close();\n } catch (RecordStoreException rse) {\n failed = true;\n }\n }\n info.numDataStores = stores;\n log(\"String_Node_Str\", indexStoreName() + \"String_Node_Str\" + stores + \"String_Node_Str\");\n if (!ix.updateRecord(STORAGE_INFO_REC_ID, ExtUtil.serialize(info), true)) {\n }\n }\n this.datastores = new RMS[0];\n getInfoRecord();\n for (int i = 0; i < datastores.length; ++i) {\n log(\"String_Node_Str\", indexStoreName() + \"String_Node_Str\" + i);\n this.getDataStore(i);\n datastores[i].ensureOpen();\n log(\"String_Node_Str\", indexStoreName() + \"String_Node_Str\" + i + \"String_Node_Str\");\n }\n this.repair(true);\n}\n"
|
"public synchronized boolean rotate(String newFileName) {\n if (currentLogFile != null) {\n File holder = currentLogFile;\n close();\n try {\n if (!holder.renameTo(new File(newFileName))) {\n log.log(Level.SEVERE, sm.getString(\"String_Node_Str\", newFileName));\n }\n } catch (Throwable e) {\n log.log(Level.SEVERE, \"String_Node_Str\", e);\n }\n currentDate = new Date();\n fileDateFormatter = new ThreadLocal<SimpleDateFormat>() {\n protected SimpleDateFormat initialValue() {\n return new SimpleDateFormat(\"String_Node_Str\");\n }\n };\n dateStamp = dateFormatter.get().format(currentDate);\n open();\n return true;\n } else {\n return false;\n }\n}\n"
|
"private static void parseConfig(Map<String, URL> urls, Element root, Locator loc) {\n for (Iterator it = root.getElements(\"String_Node_Str\").iterator(); it.hasNext(); ) {\n final Element el = (Element) it.next();\n final String s = IDOMs.getRequiredElementValue(el, \"String_Node_Str\");\n final URL url = loc.getResource(s.startsWith(\"String_Node_Str\") ? s.substring(1) : s);\n if (url != null) {\n urls.put(IDOMs.getRequiredElementValue(el, \"String_Node_Str\"), url);\n } else {\n log.error(s + \"String_Node_Str\" + el.getLocator());\n }\n }\n}\n"
|
"protected void onSampleStarting(SeekBarVolumizer volumizer) {\n super.onSampleStarting(volumizer);\n for (SeekBarVolumizer vol : mSeekBarVolumizer) {\n if (vol != null && vol != volumizer)\n vol.stopSample();\n }\n}\n"
|
"private synchronized static double getBondEnergy(IBond bond, BondEnergies bondEnergy) {\n double energy = 0.0;\n if ((bond.getAtom(0).getFlag(999) == true && bond.getAtom(1).getFlag(999) == false) || (bond.getAtom(0).getFlag(999) == false && bond.getAtom(1).getFlag(999) == true)) {\n int val = bondEnergy.getEnergies(bond.getAtom(0), bond.getAtom(1), bond.getOrder());\n energy = val;\n }\n return energy;\n}\n"
|
"private static boolean migrate(File oldPath, File newPath) {\n if (oldPath.equals(newPath) || !oldPath.exists()) {\n return true;\n }\n File parent = newPath.getParentFile();\n if (!parent.exists() && !parent.mkdirs()) {\n return false;\n }\n return oldPath.renameTo(newPath);\n}\n"
|
"private boolean appendMap(StringBuilder builder, Object value) {\n boolean isPresent = false;\n Map map = ((Map) value);\n isPresent = true;\n builder.append(\"String_Node_Str\");\n for (Object mapKey : map.keySet()) {\n Object mapValue = map.get(mapKey);\n if (mapKey != null && mapValue != null) {\n appendValue(builder, mapKey.getClass(), mapKey);\n builder.append(\"String_Node_Str\");\n }\n builder.deleteCharAt(builder.length() - 1);\n builder.append(\"String_Node_Str\");\n }\n return isPresent;\n}\n"
|
"public void postConstruct() {\n for (Config config : configs.getConfig()) {\n SecurityService service = config.getSecurityService();\n if (service != null) {\n upgradeJACCProvider(service);\n }\n populateSSLElement(config);\n }\n String instanceRoot = env.getInstanceRoot().getAbsolutePath();\n File genPolicyDir = new File(instanceRoot, DIR_GENERATED_POLICY);\n if (genPolicyDir != null) {\n File[] applicationDirs = genPolicyDir.listFiles();\n if (applicationDirs != null) {\n for (File policyDir : applicationDirs) {\n deleteFile(policyDir);\n }\n }\n }\n for (Config config : configs.getConfig()) {\n SecurityService service = config.getSecurityService();\n List<AuthRealm> authRealms = service.getAuthRealm();\n try {\n for (AuthRealm authRealm : authRealms) {\n if (JDBC_REALM_CLASSNAME.equals(authRealm.getClassname())) {\n Property digestAlgoProp = authRealm.getProperty(PARAM_DIGEST_ALGORITHM);\n if (digestAlgoProp != null) {\n String digestAlgo = digestAlgoProp.getValue();\n if (digestAlgo == null || digestAlgo.isEmpty()) {\n digestAlgoProp.setValue(\"String_Node_Str\");\n }\n } else {\n ConfigSupport.apply(new SingleConfigCode<AuthRealm>() {\n public Object run(AuthRealm updatedAuthRealm) throws PropertyVetoException, TransactionFailure {\n Property prop1 = updatedAuthRealm.createChild(Property.class);\n prop1.setName(PARAM_DIGEST_ALGORITHM);\n prop1.setValue(\"String_Node_Str\");\n updatedAuthRealm.getProperty().add(prop1);\n return null;\n }\n }, authRealm);\n }\n }\n }\n } catch (PropertyVetoException pve) {\n _logger.log(Level.SEVERE, \"String_Node_Str\", pve);\n throw new RuntimeException(pve);\n } catch (TransactionFailure tf) {\n _logger.log(Level.SEVERE, \"String_Node_Str\", tf);\n throw new RuntimeException(tf);\n }\n }\n if (requiresSecureAdmin()) {\n _logger.log(Level.WARNING, localStrings.getLocalString(\"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\"));\n }\n for (Config config : configs.getConfig()) {\n AdminService service = config.getAdminService();\n for (JmxConnector jmxConnector : service.getJmxConnector()) {\n Ssl sslElement = jmxConnector.getSsl();\n if (sslElement != null) {\n try {\n ConfigSupport.apply(new SingleConfigCode<Ssl>() {\n public Object run(Ssl ssl) throws PropertyVetoException, TransactionFailure {\n ssl.setClassname(GF_SSL_IMPL_NAME);\n return null;\n }\n }, sslElement);\n } catch (TransactionFailure tf) {\n _logger.log(Level.SEVERE, \"String_Node_Str\", tf);\n throw new RuntimeException(tf);\n }\n }\n }\n }\n}\n"
|
"public void rhoDRDownTest4() throws ParseException, LearningProblemUnsupportedException {\n AbstractReasonerComponent rs = TestOntologies.getTestOntology(TestOntology.RHO1);\n RefinementOperator operator = new RhoDRDown();\n ((RhoDRDown) operator).setReasoner(rs);\n Description concept = KBParser.parseConcept(\"String_Node_Str\");\n Set<Description> refinements = operator.refine(concept, 6);\n for (Description refinement : refinements) {\n System.out.println(refinement);\n }\n}\n"
|
"public void selectionItem(String id) {\n if (getTreeViewer() == null || getTreeViewer().getTree() == null)\n return;\n Object obj = ModuleUtil.getScriptObject(reportHandle, id);\n if (obj instanceof PropertyHandle) {\n PropertyHandle handle = (PropertyHandle) obj;\n DebugScriptObjectNode node = new DebugScriptObjectNode(handle);\n DebugScriptElementNode parent = new DebugScriptElementNode(handle.getElementHandle());\n node.setNodeParent(parent);\n IStructuredSelection selection = new StructuredSelection(node);\n setSelection(selection);\n }\n}\n"
|
"protected void drawData() {\n float angle = mRotationAngle;\n ArrayList<PieDataSet> dataSets = mCurrentData.getDataSets();\n int cnt = 0;\n for (int i = 0; i < mCurrentData.getDataSetCount(); i++) {\n PieDataSet dataSet = dataSets.get(i);\n ArrayList<Entry> entries = dataSet.getYVals();\n for (int j = 0; j < entries.size(); j++) {\n float newangle = mDrawAngles[cnt];\n float sliceSpace = dataSet.getSliceSpace();\n Entry e = entries.get(j);\n if ((Math.abs(e.getVal()) > 0.000001)) {\n if (!needsHighlight(e.getXIndex(), i)) {\n mRenderPaint.setColor(dataSet.getColor(j));\n mDrawCanvas.drawArc(mCircleBox, angle + sliceSpace / 2f, newangle * mPhaseY - sliceSpace / 2f, true, mRenderPaint);\n }\n }\n angle += newangle * mPhaseX;\n cnt++;\n }\n }\n}\n"
|
"private static boolean checkNodeCircle(INode currentNode) {\n if (currentNode.getIncomingConnections().size() > 1) {\n List<INode> nodeList = new ArrayList<INode>();\n Set<INode> nodeSet = new HashSet<INode>();\n getAllSourceNode(currentNode, nodeList);\n for (INode node : nodeList) {\n nodeSet.add(node);\n }\n return !(nodeSet.size() == nodeList.size());\n }\n return !(nodeSet.size() == nodeList.size());\n}\n"
|
"public void addChildSymbols(Collection<String> childSymbols) {\n if (isDef()) {\n if (childSymbols.size() > 1) {\n defSymbols.add(childSymbols.getLast());\n } else\n defSymbols.addAll(childSymbols);\n }\n if (isUse())\n symbolsForUpstream.addAll(childSymbols);\n}\n"
|
"public void onPause() {\n if (mMode != null) {\n mMode.finish();\n }\n super.onPause();\n}\n"
|
"private int getNumExpectedTasksPerRS(int numTasks) {\n int availableRSs = 1;\n try {\n List<String> regionServers = ZKUtil.listChildrenNoWatch(watcher, watcher.getZNodePaths().rsZNode);\n availableRSs = Math.max(availableRSs, (regionServers == null) ? 0 : regionServers.size());\n } catch (KeeperException e) {\n LOG.debug(\"String_Node_Str\", e);\n }\n int expectedTasksPerRS = (numTasks / availableRSs) + ((numTasks % availableRSs == 0) ? 0 : 1);\n return Math.max(1, expectedTasksPerRS);\n}\n"
|
"public void updateFollowCenter(SoloMessageLocation location) {\n soloLinkMgr.sendTLVPacket(location, true, new AbstractCommandListener() {\n public void onSuccess() {\n }\n public void onError(int executionError) {\n Timber.w(\"String_Node_Str\", executionError);\n }\n public void onTimeout() {\n Timber.w(\"String_Node_Str\");\n }\n });\n}\n"
|
"public boolean apply(Game game, Ability source) {\n Player controller = game.getPlayer(source.getControllerId());\n MageObject sourceObject = game.getObject(source.getSourceId());\n if (controller != null) {\n Choice typeChoice = new ChoiceImpl(true);\n typeChoice.setMessage(\"String_Node_Str\");\n typeChoice.setChoices(CardRepository.instance.getCreatureTypes());\n while (!controller.choose(outcome, typeChoice, game)) {\n if (!controller.canRespond()) {\n return false;\n }\n }\n if (typeChoice.getChoice() != null) {\n game.informPlayers(sourceObject.getLogName() + \"String_Node_Str\" + typeChoice.getChoice());\n }\n FilterCard filterSubtype = new FilterCard();\n filterSubtype.add(new SubtypePredicate(SubType.byDescription(typeChoice.getChoice())));\n if (controller.getLibrary().hasCards()) {\n Card card = controller.getLibrary().getFromTop(game);\n Cards cards = new CardsImpl(card);\n controller.revealCards(sourceObject.getIdName(), cards, game);\n if (card != null) {\n if (filterSubtype.match(card, game)) {\n controller.moveCards(card, Zone.HAND, source, game);\n } else {\n controller.moveCards(card, Zone.GRAVEYARD, source, game);\n }\n }\n }\n return true;\n }\n return false;\n}\n"
|
"static void turnOnSpeaker(Context context, boolean flag) {\n if (DBG)\n log(\"String_Node_Str\" + flag);\n AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);\n audioManager.setSpeakerphoneOn(flag);\n if (store) {\n sIsSpeakerEnabled = flag;\n }\n if (flag) {\n NotificationMgr.getDefault().notifySpeakerphone();\n } else {\n NotificationMgr.getDefault().cancelSpeakerphone();\n }\n PhoneApp app = PhoneApp.getInstance();\n app.updateWakeState();\n app.updateProximitySensorMode(app.phone.getState());\n}\n"
|
"public void updateLimiter() {\n if (limiter == null) {\n limiter = RateLimiter.create(channel.tps());\n } else {\n limiter.setRate(channel.getTps());\n }\n}\n"
|
"void getListOfFiles(File directory, List<String> files, List embeddedArchives, final Logger logger) {\n if (archive == null || directory == null || !directory.isDirectory())\n return;\n final File[] fileList = directory.listFiles();\n if (fileList == null) {\n deplLogger.log(Level.WARNING, FILE_LIST_FAILURE, directory.getAbsolutePath());\n return;\n }\n for (File aList : fileList) {\n String fileName = aList.getAbsolutePath().substring(archive.getAbsolutePath().length() + 1);\n fileName = fileName.replace(File.separatorChar, '/');\n if (!aList.isDirectory()) {\n if (!fileName.equals(JarFile.MANIFEST_NAME) && isEntryValid(fileName, logger)) {\n files.add(fileName);\n }\n } else if (isEntryValid(fileName, logger)) {\n files.add(fileName);\n if (embeddedArchives != null) {\n if (!embeddedArchives.contains(fileName)) {\n getListOfFiles(aList, files, null, logger);\n }\n } else {\n getListOfFiles(aList, files, null, logger);\n }\n }\n }\n}\n"
|
"protected void setupHexesGUI() {\n hexes = new ArrayList();\n MapManager mmgr = MapManager.getInstance();\n MapHex[][] hexArray = mmgr.getHexes();\n MapHex mh;\n h = new GUIHex[hexArray.length][hexArray[0].length];\n for (int i = 0; i < hexArray.length; i++) {\n for (int j = 0; j < hexArray[0].length; j++) {\n mh = hexArray[i][j];\n if (mh != null) {\n GUIEWHex hex = new GUIEWHex((cx + scale * ((GUIHex.SQRT3 * i) + (GUIHex.SQRT3 / 2 * (j & 1)))), (cy + j * 1.5 * scale), scale, this, i, j);\n hex.setName(mh.getName());\n hex.setTileId(mh.getPreprintedTileId());\n hex.setTileOrientation(mh.getPreprintedTileOrientation());\n hex.setTileFilename(mh.getTileFileName());\n hex.setHexModel(mh);\n imageLoader.loadTile(mh.getPreprintedTileId());\n hex.setTileImage(imageLoader.getTile(mh.getPreprintedTileId()));\n hex.x_adjust = hex.x_adjust_arr[hex.tileOrientation];\n hex.y_adjust = hex.y_adjust_arr[hex.tileOrientation];\n hex.rotation = hex.rotation_arr[hex.tileOrientation];\n h[i][j] = hex;\n hexes.add(hex);\n }\n }\n }\n}\n"
|
"public void onChange(ChangeEvent event) {\n int valueSelected = priorityListBox.getSelectedIndex();\n if (valueSelected == 0) {\n valueSelected = -1;\n }\n System.out.println(\"String_Node_Str\" + \"String_Node_Str\" + packageid + \"String_Node_Str\" + valueSelected);\n setPackagePriority(packageid, valueSelected);\n tradeoffReasons.get(index).setPriority(valueSelected);\n System.out.println(\"String_Node_Str\");\n}\n"
|
"public void get_versions_for_existing_object() {\n final LocalDateTime localDateTime = new LocalDateTime();\n final RpslObjectUpdateInfo objectInfo = updateDao.createObject(RpslObject.parse(\"String_Node_Str\"));\n updateDao.updateObject(objectInfo.getObjectId(), RpslObject.parse(\"String_Node_Str\"));\n updateDao.updateObject(objectInfo.getObjectId(), RpslObject.parse(\"String_Node_Str\"));\n final List<VersionInfo> versions = subject.getVersionsBeforeTimestamp(ObjectType.DOMAIN, \"String_Node_Str\", localDateTime.plusDays(1).toDateTime().getMillis());\n assertThat(versions, hasSize(3));\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.