content stringlengths 40 137k |
|---|
"public static Variable getScopedVariable(Variable exclude, NamedObj container, String name) {\n String insideName = name.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n while (container != null) {\n Variable result = _searchVariableIn(exclude, container, insideName);\n if (result != null) {\n return result;\n } else {\n List attributes = (container).attributeList(ContainmentExtender.class);\n Iterator attrIterator = attributes.iterator();\n NamedObj extendedContainer = null;\n while (extendedContainer == null && attrIterator.hasNext()) {\n ContainmentExtender extender = (ContainmentExtender) attrIterator.next();\n try {\n extendedContainer = extender.getExtendedContainer();\n } catch (IllegalActionException e) {\n }\n }\n if (extendedContainer == null) {\n container = container.getContainer();\n } else {\n container = extendedContainer;\n }\n }\n }\n return null;\n}\n"
|
"public void addState(StateEvent stateEvent) {\n if (isStartState || stateType == StateInputStream.Type.SEQUENCE) {\n if (newAndEveryStateEventList.isEmpty()) {\n newAndEveryStateEventList.add(stateEvent);\n }\n if (partnerStatePreProcessor != null && partnerStatePreProcessor.newAndEveryStateEventList.isEmpty()) {\n partnerStatePreProcessor.newAndEveryStateEventList.add(stateEvent);\n }\n } else {\n newAndEveryStateEventList.add(stateEvent);\n }\n if (partnerStatePreProcessor != null && partnerStatePreProcessor.newAndEveryStateEventList.isEmpty()) {\n partnerStatePreProcessor.newAndEveryStateEventList.add(stateEvent);\n }\n}\n"
|
"protected void align(boolean lastLine) {\n if (root == null) {\n return;\n }\n assert (parent instanceof PDFBlockStackingLM);\n String align = ((PDFBlockStackingLM) parent).getTextAlign();\n if ((CSSConstants.CSS_RIGHT_VALUE.equalsIgnoreCase(align) || CSSConstants.CSS_CENTER_VALUE.equalsIgnoreCase(align))) {\n int spacing = root.getContentWidth() - getCurrentIP();\n Iterator iter = root.getChildren();\n while (iter.hasNext()) {\n AbstractArea area = (AbstractArea) iter.next();\n if (spacing > 0) {\n if (CSSConstants.CSS_RIGHT_VALUE.equalsIgnoreCase(align)) {\n area.setAllocatedPosition(spacing + area.getAllocatedX(), area.getAllocatedY());\n } else if (CSSConstants.CSS_CENTER_VALUE.equalsIgnoreCase(align)) {\n area.setAllocatedPosition(spacing / 2 + area.getAllocatedX(), area.getAllocatedY());\n }\n }\n }\n } else if (CSSConstants.CSS_JUSTIFY_VALUE.equalsIgnoreCase(align) && !lastLine) {\n justify();\n }\n verticalAlign();\n}\n"
|
"private static Object getDelegateMapKey(ClassLoader classLoader) {\n String classLoaderName = classLoader.getClass().getName();\n Object delegateKey = classLoader;\n if (classLoaderName.startsWith(OC4J_CLASSLOADER_NAME)) {\n if ((classLoader.getParent() != null) && ((classLoader.toString().indexOf(SDOConstants.CLASSLOADER_WEB_FRAGMENT) != -1) || (classLoader.toString().indexOf(SDOConstants.CLASSLOADER_EJB_FRAGMENT) != -1))) {\n classLoader = classLoader.getParent();\n }\n delegateKey = classLoader;\n } else if (classLoaderName.contains(WLS_CLASSLOADER_NAME)) {\n Object executeThread = getExecuteThread();\n if (executeThread != null) {\n try {\n Method getMethod = PrivilegedAccessHelper.getPublicMethod(executeThread.getClass(), WLS_APPLICATION_NAME_GET_METHOD_NAME, WLS_PARAMETER_TYPES, false);\n delegateKey = PrivilegedAccessHelper.invokeMethod(getMethod, executeThread);\n if (delegateKey == null) {\n delegateKey = classLoader;\n }\n } catch (Exception e) {\n throw SDOException.errorInvokingWLSMethodReflectively(WLS_APPLICATION_NAME_GET_METHOD_NAME, WLS_EXECUTE_THREAD, e);\n }\n }\n } else if (classLoaderName.contains(WAS_CLASSLOADER_NAME)) {\n delegateKey = getApplicationNameForWAS(classLoader);\n if (delegateKey == null) {\n delegateKey = classLoader;\n }\n }\n return delegateKey;\n}\n"
|
"public int open(final ExtendedItemHandle eih) {\n if (iInstanceCount > 0) {\n return Window.CANCEL;\n }\n iInstanceCount++;\n if (ChartXTabUtil.isAxisChart(eih)) {\n DesignElementHandle hostChart = eih.getElementProperty(ChartReportItemUtil.PROPERTY_HOST_CHART);\n this.extendedHandle = (ExtendedItemHandle) hostChart;\n } else {\n this.extendedHandle = eih;\n }\n try {\n IReportItem item = null;\n try {\n item = extendedHandle.getReportItem();\n if (item == null) {\n extendedHandle.loadExtendedElement();\n item = extendedHandle.getReportItem();\n }\n } catch (ExtendedElementException exception) {\n logger.log(exception);\n }\n if (item == null) {\n logger.log(ILogger.ERROR, Messages.getString(\"String_Node_Str\"));\n return Window.CANCEL;\n }\n final CommandStack commandStack = extendedHandle.getRoot().getCommandStack();\n final String TRANS_NAME = org.eclipse.birt.chart.reportitem.i18n.Messages.getString(\"String_Node_Str\");\n commandStack.startTrans(TRANS_NAME);\n final ChartReportItemImpl crii = ((ChartReportItemImpl) item);\n final Chart cm = (Chart) crii.getProperty(ChartReportItemUtil.PROPERTY_CHART);\n final Chart cmClone = (cm == null) ? null : cm.copyInstance();\n if (cmClone != null) {\n maintainCompatibility(cmClone);\n }\n final Object[] applyData = new Object[3];\n Shell parentShell = null;\n if (PlatformUI.isWorkbenchRunning()) {\n parentShell = PlatformUI.getWorkbench().getDisplay().getActiveShell();\n }\n final ChartWizard chartBuilder = new ChartWizard(parentShell);\n ReportDataServiceProvider dataProvider = new ReportDataServiceProvider(extendedHandle);\n ChartReportItemUIFactory uiFactory = ChartReportItemUIFactory.instance();\n IChartDataSheet dataSheet = uiFactory.createDataSheet(extendedHandle, dataProvider);\n final ChartWizardContext context = uiFactory.createWizardContext(cmClone, this, dataProvider, dataSheet);\n dataProvider.setWizardContext(context);\n if (dataProvider.checkState(IDataServiceProvider.PART_CHART)) {\n context.setEnabled(ChartUIConstants.SUBTASK_AXIS, false);\n context.setEnabled(ChartUIConstants.SUBTASK_AXIS_X, false);\n context.setEnabled(ChartUIConstants.SUBTASK_AXIS_Y, false);\n context.setEnabled(ChartUIConstants.SUBTASK_AXIS_Z, false);\n context.setEnabled(ChartUIConstants.SUBTASK_LEGEND, false);\n context.setEnabled(ChartUIConstants.SUBTASK_TITLE, false);\n context.setEnabled(ChartUIConstants.TYPE_PIE, false);\n context.setEnabled(ChartUIConstants.TYPE_METER, false);\n context.setEnabled(ChartUIConstants.TYPE_STOCK, false);\n context.setEnabled(ChartUIConstants.TYPE_BUBBLE, false);\n context.setEnabled(ChartUIConstants.TYPE_DIFFERENCE, false);\n context.setEnabled(ChartUIConstants.TYPE_GANTT, false);\n }\n chartBuilder.addCustomButton(new ApplyButtonHandler(chartBuilder) {\n public void run() {\n super.run();\n applyData[0] = context.getModel().copyInstance();\n applyData[1] = context.getOutputFormat();\n applyData[2] = context.isInheritColumnsOnly();\n commandStack.commit();\n commandStack.startTrans(TRANS_NAME);\n }\n });\n context.setRtL(crii.isLayoutDirectionRTL());\n context.setTextRtL(extendedHandle.isDirectionRTL());\n context.setResourceFinder(crii);\n context.setExternalizer(crii);\n Object of = extendedHandle.getProperty(ChartReportItemUtil.PROPERTY_OUTPUT);\n if (of instanceof String) {\n if (of.equals(\"String_Node_Str\")) {\n context.setOutputFormat(\"String_Node_Str\");\n } else {\n context.setOutputFormat((String) of);\n }\n }\n context.setInheritColumnsOnly(extendedHandle.getBooleanProperty(ChartReportItemUtil.PROPERTY_INHERIT_COLUMNS));\n context.setExtendedItem(extendedHandle);\n context.setProcessor(new ChartReportStyleProcessor(extendedHandle, false));\n ChartAdapter.beginIgnoreNotifications();\n if (dataProvider.checkState(IDataServiceProvider.SHARE_CHART_QUERY)) {\n dataProvider.update(ChartUIConstants.COPY_SERIES_DEFINITION, null);\n }\n ChartWizard.clearExceptions();\n if (eih.getDataBindingType() == ReportItemHandle.DATABINDING_TYPE_NONE && eih.getContainer() instanceof ModuleHandle) {\n String[] dataSets = dataProvider.getAllDataSets();\n if (dataProvider.getAllDataCubes().length == 0 && dataSets.length == 1) {\n dataProvider.setDataSet(dataSets[0]);\n }\n }\n context.setActionEvaluator(new BIRTActionEvaluator());\n ChartAdapter.endIgnoreNotifications();\n isChartWizardOpen = true;\n ChartWizardContext contextResult = (ChartWizardContext) chartBuilder.open(null, taskId, context);\n isChartWizardOpen = false;\n if (contextResult != null && contextResult.getModel() != null) {\n updateModel(extendedHandle, chartBuilder, crii, cm, contextResult.getModel(), contextResult.getOutputFormat(), contextResult.isInheritColumnsOnly());\n if (dataProvider.isPartChart()) {\n ChartXTabUIUtil.updateXTabForAxis(ChartXTabUtil.getXtabContainerCell(extendedHandle), extendedHandle, ChartXTabUIUtil.isTransposedChartWithAxes(cm), (ChartWithAxes) contextResult.getModel());\n }\n commandStack.commit();\n return Window.OK;\n } else if (applyData[0] != null) {\n commandStack.rollback();\n updateModel(extendedHandle, chartBuilder, crii, cm, (Chart) applyData[0], (String) applyData[1], (Boolean) applyData[2]);\n if (dataProvider.isPartChart()) {\n commandStack.startTrans(TRANS_NAME);\n ChartXTabUIUtil.updateXTabForAxis(ChartXTabUtil.getXtabContainerCell(extendedHandle), extendedHandle, ChartXTabUIUtil.isTransposedChartWithAxes(cm), (ChartWithAxes) applyData[0]);\n commandStack.commit();\n }\n return Window.OK;\n }\n commandStack.rollback();\n return Window.CANCEL;\n } catch (Exception e) {\n throw new RuntimeException(e);\n } finally {\n iInstanceCount--;\n this.extendedHandle = null;\n isChartWizardOpen = false;\n }\n}\n"
|
"protected LogService getLogService() {\n if (logServiceTracker == null) {\n logServiceTracker = new ServiceTracker(this.context, LogService.class.getName(), null);\n logServiceTracker.open();\n }\n logService = (LogService) logServiceTracker.getService();\n if (logService == null)\n logService = new SystemLogService(PLUGIN_ID);\n return logService;\n}\n"
|
"public BufferedImage parseUserSkin(BufferedImage image) {\n if (image == null) {\n return null;\n } else {\n int ratio = image.getWidth() / 64;\n this.imageWidth = 64 * ratio;\n this.imageHeight = 64 * ratio;\n BufferedImage bufferedimage = new BufferedImage(this.imageWidth, this.imageHeight, 2);\n Graphics graphics = bufferedimage.getGraphics();\n graphics.drawImage(image, 0, 0, (ImageObserver) null);\n boolean flag = image.getHeight() == 32 * ratio;\n if (flag) {\n if (!customskinloader.CustomSkinLoader.config.enableTransparentSkin) {\n graphics.setColor(new Color(0, 0, 0, 0));\n graphics.fillRect(0, 32, 64, 32);\n }\n graphics.drawImage(bufferedimage, 24 * ratio, 48 * ratio, 20 * ratio, 52 * ratio, 4 * ratio, 16 * ratio, 8 * ratio, 20 * ratio, (ImageObserver) null);\n graphics.drawImage(bufferedimage, 28 * ratio, 48 * ratio, 24 * ratio, 52 * ratio, 8 * ratio, 16 * ratio, 12 * ratio, 20 * ratio, (ImageObserver) null);\n graphics.drawImage(bufferedimage, 20 * ratio, 52 * ratio, 16 * ratio, 64 * ratio, 8 * ratio, 20 * ratio, 12 * ratio, 32 * ratio, (ImageObserver) null);\n graphics.drawImage(bufferedimage, 24 * ratio, 52 * ratio, 20 * ratio, 64 * ratio, 4 * ratio, 20 * ratio, 8 * ratio, 32 * ratio, (ImageObserver) null);\n graphics.drawImage(bufferedimage, 28 * ratio, 52 * ratio, 24 * ratio, 64 * ratio, 0 * ratio, 20 * ratio, 4 * ratio, 32 * ratio, (ImageObserver) null);\n graphics.drawImage(bufferedimage, 32 * ratio, 52 * ratio, 28 * ratio, 64 * ratio, 12 * ratio, 20 * ratio, 16 * ratio, 32 * ratio, (ImageObserver) null);\n graphics.drawImage(bufferedimage, 40 * ratio, 48 * ratio, 36 * ratio, 52 * ratio, 44 * ratio, 16 * ratio, 48 * ratio, 20 * ratio, (ImageObserver) null);\n graphics.drawImage(bufferedimage, 44 * ratio, 48 * ratio, 40 * ratio, 52 * ratio, 48 * ratio, 16 * ratio, 52 * ratio, 20 * ratio, (ImageObserver) null);\n graphics.drawImage(bufferedimage, 36 * ratio, 52 * ratio, 32 * ratio, 64 * ratio, 48 * ratio, 20 * ratio, 52 * ratio, 32 * ratio, (ImageObserver) null);\n graphics.drawImage(bufferedimage, 40 * ratio, 52 * ratio, 36 * ratio, 64 * ratio, 44 * ratio, 20 * ratio, 48 * ratio, 32 * ratio, (ImageObserver) null);\n graphics.drawImage(bufferedimage, 44 * ratio, 52 * ratio, 40 * ratio, 64 * ratio, 40 * ratio, 20 * ratio, 44 * ratio, 32 * ratio, (ImageObserver) null);\n graphics.drawImage(bufferedimage, 48 * ratio, 52 * ratio, 44 * ratio, 64 * ratio, 52 * ratio, 20 * ratio, 56 * ratio, 32 * ratio, (ImageObserver) null);\n }\n graphics.dispose();\n this.imageData = ((DataBufferInt) bufferedimage.getRaster().getDataBuffer()).getData();\n if (!customskinloader.CustomSkinLoader.config.enableTransparentSkin) {\n this.setAreaOpaque(0, 0, 32, 16);\n if (flag) {\n this.func_189559_a(32, 0, 64, 32);\n }\n this.setAreaOpaque(0, 16, 64, 32);\n this.setAreaOpaque(16, 48, 48, 64);\n }\n return bufferedimage;\n }\n}\n"
|
"protected Object decode(ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception {\n String sentence = (String) msg;\n if (sentence.contains(\"String_Node_Str\")) {\n if (channel != null) {\n channel.write(\"String_Node_Str\");\n }\n return null;\n }\n if (sentence.length() == 15 && Character.isDigit(sentence.charAt(0))) {\n if (channel != null) {\n channel.write(\"String_Node_Str\");\n }\n return null;\n }\n Matcher parser = pattern.matcher(sentence);\n if (!parser.matches()) {\n Log.info(\"String_Node_Str\");\n return null;\n }\n Position position = new Position();\n StringBuilder extendedInfo = new StringBuilder(\"String_Node_Str\");\n Integer index = 1;\n String imei = parser.group(index++);\n try {\n position.setDeviceId(getDataManager().getDeviceByImei(imei).getId());\n } catch (Exception error) {\n Log.warning(\"String_Node_Str\" + imei);\n return null;\n }\n extendedInfo.append(\"String_Node_Str\");\n extendedInfo.append(parser.group(index++));\n extendedInfo.append(\"String_Node_Str\");\n Calendar time = Calendar.getInstance(TimeZone.getTimeZone(\"String_Node_Str\"));\n time.clear();\n time.set(Calendar.YEAR, 2000 + Integer.valueOf(parser.group(index++)));\n time.set(Calendar.MONTH, Integer.valueOf(parser.group(index++)) - 1);\n time.set(Calendar.DAY_OF_MONTH, Integer.valueOf(parser.group(index++)));\n int localHours = Integer.valueOf(parser.group(index++));\n int localMinutes = Integer.valueOf(parser.group(index++));\n int utcHours = Integer.valueOf(parser.group(index++));\n int utcMinutes = Integer.valueOf(parser.group(index++));\n time.set(Calendar.HOUR, localHours);\n time.set(Calendar.MINUTE, localMinutes);\n time.set(Calendar.SECOND, Integer.valueOf(parser.group(index++)));\n time.set(Calendar.MILLISECOND, Integer.valueOf(parser.group(index++)));\n int deltaMinutes = (localHours - utcHours) * 60 + localMinutes - utcMinutes;\n if (deltaMinutes <= -12 * 60) {\n deltaMinutes += 24 * 60;\n } else if (deltaMinutes > 12 * 60) {\n deltaMinutes -= 24 * 60;\n }\n time.add(Calendar.MINUTE, -deltaMinutes);\n position.setTime(time.getTime());\n position.setValid(parser.group(index++).compareTo(\"String_Node_Str\") == 0 ? true : false);\n Double latitude = Double.valueOf(parser.group(index++));\n latitude += Double.valueOf(parser.group(index++)) / 60;\n if (parser.group(index++).compareTo(\"String_Node_Str\") == 0)\n latitude = -latitude;\n position.setLatitude(latitude);\n Double lonlitude = Double.valueOf(parser.group(index++));\n lonlitude += Double.valueOf(parser.group(index++)) / 60;\n String hemisphere = parser.group(index++);\n if (hemisphere != null) {\n if (hemisphere.compareTo(\"String_Node_Str\") == 0)\n lonlitude = -lonlitude;\n }\n position.setLongitude(lonlitude);\n position.setAltitude(0.0);\n position.setSpeed(Double.valueOf(parser.group(index++)));\n String course = parser.group(index++);\n if (course != null) {\n position.setCourse(Double.valueOf(course));\n } else {\n position.setCourse(0.0);\n }\n position.setExtendedInfo(extendedInfo.toString());\n return position;\n}\n"
|
"public static void persistGraph(Graph graph, boolean normalize, String fileName) {\n checkState(checkNotNull(fileName).length() > 0);\n long nanoStartTime = System.nanoTime();\n GraphMLWriter writer = new GraphMLWriter(graph);\n writer.setNormalize(normalize);\n try {\n Files.createParentDirs(new File(fileName));\n writer.outputGraph(fileName);\n } catch (IOException e) {\n logger.error(\"String_Node_Str\", e);\n }\n logger.info(String.format(\"String_Node_Str\", Counter.elapsedSecs(nanoStartTime)));\n}\n"
|
"public static ReportNumberFormat getInstance(final Locale locale) {\n ReportNumberFormat format = FORMATTERS.get(locale);\n if (format == null) {\n synchronized (formatters) {\n format = formatters.get(locale);\n if (format == null) {\n format = new ReportNumberFormat(locale);\n formatters.put(locale, format);\n }\n }\n }\n return format;\n}\n"
|
"public static boolean canPreviewWithErrors(ModuleHandle model) {\n if (model == null) {\n return false;\n }\n model.checkReport();\n List errorList = model.getErrorList();\n if (errorList.size() > 0) {\n ErrorStatus status = new ErrorStatus(ReportPlugin.REPORT_UI, 1009, Messages.getString(\"String_Node_Str\"), null);\n for (int i = 0; i < errorList.size(); i++) {\n ErrorDetail ed = (ErrorDetail) errorList.get(i);\n status.addError(\"String_Node_Str\" + ed.getLineNo() + \"String_Node_Str\" + ed.getMessage());\n }\n return new ErrorDialog(Display.getCurrent().getActiveShell(), Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"), status, IStatus.OK | IStatus.INFO | IStatus.WARNING | IStatus.ERROR) {\n protected void createButtonsForButtonBar(Composite parent) {\n createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n createDetailsButton(parent);\n }\n }.open() == Window.OK;\n }\n return true;\n}\n"
|
"public void onClick(View v) {\n final Rect target = getTargetRect(v);\n if (mContactUri != null) {\n final ContentResolver resolver = getContext().getContentResolver();\n final Uri lookupUri = Contacts.getLookupUri(resolver, mContactUri);\n trigger(lookupUri);\n } else if (mContactEmail != null) {\n mQueryHandler.startQuery(TOKEN_EMAIL_LOOKUP_AND_TRIGGER, target, Uri.withAppendedPath(Email.CONTENT_LOOKUP_URI, Uri.encode(mContactEmail)), EMAIL_LOOKUP_PROJECTION, null, null, null);\n } else if (mContactPhone != null) {\n mQueryHandler.startQuery(TOKEN_PHONE_LOOKUP_AND_TRIGGER, target, Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, mContactPhone), PHONE_LOOKUP_PROJECTION, null, null, null);\n } else {\n return;\n }\n}\n"
|
"public static void determineIconSize(int trayType) {\n int scalingFactor = 0;\n if (SystemTray.AUTO_TRAY_SIZE) {\n if (OS.isWindows()) {\n String windowsVersion = \"String_Node_Str\";\n try {\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(8196);\n PrintStream outputStream = new PrintStream(byteArrayOutputStream);\n final ShellProcessBuilder shellVersion = new ShellProcessBuilder(outputStream);\n shellVersion.setExecutable(\"String_Node_Str\");\n shellVersion.addArgument(\"String_Node_Str\");\n shellVersion.addArgument(\"String_Node_Str\");\n shellVersion.start();\n String output = ShellProcessBuilder.getOutput(byteArrayOutputStream);\n if (!output.isEmpty()) {\n if (SystemTray.DEBUG) {\n SystemTray.logger.debug(\"String_Node_Str\", output);\n }\n if (output.contains(\"String_Node_Str\")) {\n int beginIndex = output.indexOf(\"String_Node_Str\") + 7;\n windowsVersion = output.substring(beginIndex, beginIndex + 6);\n }\n }\n } catch (Throwable e) {\n if (SystemTray.DEBUG) {\n SystemTray.logger.error(\"String_Node_Str\", e);\n }\n }\n if (windowsVersion.startsWith(\"String_Node_Str\")) {\n scalingFactor = 1;\n } else if (windowsVersion.startsWith(\"String_Node_Str\")) {\n scalingFactor = 1;\n } else if (windowsVersion.startsWith(\"String_Node_Str\")) {\n scalingFactor = 1;\n } else if (windowsVersion.startsWith(\"String_Node_Str\")) {\n scalingFactor = 2;\n } else if (windowsVersion.startsWith(\"String_Node_Str\")) {\n scalingFactor = 2;\n } else if (windowsVersion.startsWith(\"String_Node_Str\")) {\n scalingFactor = 4;\n } else if (windowsVersion.startsWith(\"String_Node_Str\")) {\n scalingFactor = 4;\n } else if (windowsVersion.startsWith(\"String_Node_Str\")) {\n scalingFactor = 8;\n } else {\n scalingFactor = 8;\n }\n if (SystemTray.DEBUG) {\n SystemTray.logger.error(\"String_Node_Str\", windowsVersion);\n }\n } else if (OS.isLinux()) {\n try {\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(8196);\n PrintStream outputStream = new PrintStream(byteArrayOutputStream);\n final ShellProcessBuilder shellVersion = new ShellProcessBuilder(outputStream);\n shellVersion.setExecutable(\"String_Node_Str\");\n shellVersion.addArgument(\"String_Node_Str\");\n shellVersion.addArgument(\"String_Node_Str\");\n shellVersion.addArgument(\"String_Node_Str\");\n shellVersion.start();\n String output = ShellProcessBuilder.getOutput(byteArrayOutputStream);\n if (!output.isEmpty()) {\n if (SystemTray.DEBUG) {\n SystemTray.logger.debug(\"String_Node_Str\", output);\n }\n if (output.contains(\"String_Node_Str\")) {\n String value = output.substring(output.indexOf(\"String_Node_Str\") + 7, output.length() - 1);\n scalingFactor = Integer.parseInt(value);\n }\n }\n } catch (Throwable e) {\n if (SystemTray.DEBUG) {\n SystemTray.logger.error(\"String_Node_Str\", e);\n }\n }\n }\n }\n if (scalingFactor > 1) {\n TRAY_SIZE = SystemTray.DEFAULT_TRAY_SIZE * scalingFactor;\n ENTRY_SIZE = SystemTray.DEFAULT_MENU_SIZE;\n if (SystemTray.DEBUG) {\n SystemTray.logger.debug(\"String_Node_Str\", scalingFactor, TRAY_SIZE);\n }\n } else {\n TRAY_SIZE = SystemTray.DEFAULT_TRAY_SIZE;\n ENTRY_SIZE = SystemTray.DEFAULT_MENU_SIZE;\n }\n}\n"
|
"public void update(AbstractArea area) throws BirtException {\n CellArea cArea = (CellArea) area;\n int columnID = cArea.getColumnID();\n int colSpan = cArea.getColSpan();\n if (colSpan > 1 && content.isRTL()) {\n columnID += colSpan - 1;\n }\n cArea.setPosition(getTableArea().getXPos(columnID), 0);\n}\n"
|
"public ClassLoader load(CacheKey key) throws Exception {\n if (key.uri == null) {\n return key.parentClassLoader;\n }\n Location jarLocation = locationFactory.create(key.uri);\n File unpackedDir = DirUtils.createTempDir(tmpDir);\n BundleJarUtil.unpackProgramJar(jarLocation, unpackedDir);\n LOG.trace(\"String_Node_Str\", key.uri.toString(), unpackedDir.getAbsolutePath());\n return new DirectoryClassLoader(unpackedDir, key.parentClassLoader, \"String_Node_Str\");\n}\n"
|
"public void doWork(Window window, MouseEvent e) {\n new AddGroupDialog((GroupWindow) window, mainWindow);\n}\n"
|
"public void reply(final long requestId, final byte[] response, final String error) throws IOException {\n protocol.send(OpCode.REPLY, () -> {\n protocol.sendVarint(id);\n protocol.sendBoolean(error == null);\n if (error == null) {\n protocol.sendBinary(response);\n } else {\n protocol.sendString(error);\n }\n });\n}\n"
|
"public void testUnidirectionalCollection() throws Exception {\n final Session session = openSession();\n Transaction transaction = session.beginTransaction();\n SnowFlake sf = new SnowFlake();\n sf.setDescription(\"String_Node_Str\");\n session.save(sf);\n SnowFlake sf2 = new SnowFlake();\n sf2.setDescription(\"String_Node_Str\");\n session.save(sf2);\n Cloud cloud = new Cloud();\n cloud.setLength(23);\n cloud.getProducedSnowFlakes().add(sf);\n cloud.getProducedSnowFlakes().add(sf2);\n session.persist(cloud);\n transaction.commit();\n session.clear();\n transaction = session.beginTransaction();\n cloud = (Cloud) session.get(Cloud.class, cloud.getId());\n assertNotNull(cloud.getProducedSnowFlakes());\n assertEquals(2, cloud.getProducedSnowFlakes().size());\n final SnowFlake removedSf = cloud.getProducedSnowFlakes().iterator().next();\n SnowFlake sf3 = new SnowFlake();\n sf3.setDescription(\"String_Node_Str\");\n session.persist(sf3);\n cloud.getProducedSnowFlakes().remove(removedSf);\n cloud.getProducedSnowFlakes().add(sf3);\n transaction.commit();\n session.clear();\n transaction = session.beginTransaction();\n cloud = (Cloud) session.get(Cloud.class, cloud.getId());\n assertNotNull(cloud.getProducedSnowFlakes());\n assertEquals(2, cloud.getProducedSnowFlakes().size());\n boolean present = false;\n for (SnowFlake current : cloud.getProducedSnowFlakes()) {\n if (current.getDescription().equals(removedSf.getDescription())) {\n present = true;\n }\n }\n assertFalse(\"String_Node_Str\", present);\n for (SnowFlake current : cloud.getProducedSnowFlakes()) {\n session.delete(current);\n }\n session.delete(session.load(SnowFlake.class, removedSf.getId()));\n cloud.getProducedSnowFlakes().clear();\n transaction.commit();\n session.clear();\n transaction = session.beginTransaction();\n cloud = (Cloud) session.get(Cloud.class, cloud.getId());\n assertNotNull(cloud.getProducedSnowFlakes());\n assertEquals(0, cloud.getProducedSnowFlakes().size());\n session.delete(cloud);\n transaction.commit();\n session.close();\n}\n"
|
"private void populateCollectionFromMap(Object entity, PersistenceDelegator delegator, Relation relation, Object relObject, Map<String, Object> relationsMap) {\n EntityMetadata childMetadata = KunderaMetadataManager.getEntityMetadata(relation.getTargetEntity());\n Map<Object, Object> relationshipEntityMap = new HashMap<Object, Object>();\n if (relObject == null && relationsMap != null && !relationsMap.isEmpty()) {\n for (String relationName : relationsMap.keySet()) {\n Object relationValue = relationsMap.get(relationName);\n if (relationValue instanceof Map) {\n Map<Object, Object> relationValueMap = (Map<Object, Object>) relationValue;\n Client targetEntityClient = delegator.getClient(childMetadata);\n for (Object targetEntityKey : relationValueMap.keySet()) {\n Object targetEntity = targetEntityClient.find(childMetadata.getEntityClazz(), targetEntityKey);\n Object mapKeyEntity = relationValueMap.get(targetEntityKey);\n Class<?> relationshipClass = relation.getMapKeyJoinClass();\n for (Field f : relationshipClass.getDeclaredFields()) {\n if (f.getType().equals(entity.getClass())) {\n PropertyAccessorHelper.set(mapKeyEntity, f, entity);\n } else if (f.getType().equals(childMetadata.getEntityClazz())) {\n PropertyAccessorHelper.set(mapKeyEntity, f, targetEntity);\n }\n }\n relationshipEntityMap.put(mapKeyEntity, targetEntity);\n }\n }\n }\n relObject = relationshipEntityMap;\n }\n PropertyAccessorHelper.set(entity, relation.getProperty(), relObject);\n if (relObject != null) {\n for (Object child : ((Map) relObject).values()) {\n Object childId = PropertyAccessorHelper.getId(child, childMetadata);\n PersistenceCacheManager.addEntityToPersistenceCache(child, delegator, childId);\n }\n }\n}\n"
|
"public String findMimeMapping(String extension) {\n return mimeMappings.get(extension.toLowerCase(Locale.ENGLISH));\n}\n"
|
"private static <K, V> boolean trySerializeHeaderViaXStream(VanillaChronicleMap<K, ?, ?, V, ?, ?, ?> map, ObjectOutputStream oos) throws IOException {\n Class<?> xStreamClass;\n try {\n xStreamClass = Class.forName(\"String_Node_Str\");\n } catch (ClassNotFoundException | NoClassDefFoundError e) {\n xStreamClass = null;\n }\n if (xStreamClass == null) {\n LOG.info(\"String_Node_Str\");\n return false;\n }\n try {\n oos.writeByte(XML_SERIALIZATION);\n Method toXML = xStreamClass.getMethod(\"String_Node_Str\", Object.class, OutputStream.class);\n toXML.invoke(xStreamClass.newInstance(), map, oos);\n return true;\n } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException | InstantiationException e) {\n throw new AssertionError(e);\n }\n}\n"
|
"public int parseArguments(Parameters params) throws CmdLineException {\n String token = params.getParameter(0);\n try {\n T value = parse(token);\n setter.addValue(value);\n } catch (NumberFormatException ex) {\n throw new CmdLineException(owner, Messages.ILLEGAL_OPERAND.format(params.getParameter(-1), token));\n }\n return 1;\n}\n"
|
"public String[] constructProgramArguments() throws CoreException {\n Vector arguments = new Vector();\n ILaunchConfiguration config = launch.getLaunchConfiguration();\n boolean checkDeadlock = config.getAttribute(IModelConfigurationConstants.MODEL_CORRECTNESS_CHECK_DEADLOCK, IModelConfigurationDefaults.MODEL_CORRECTNESS_CHECK_DEADLOCK_DEFAULT);\n if (!checkDeadlock) {\n arguments.add(\"String_Node_Str\");\n }\n arguments.add(\"String_Node_Str\");\n arguments.add(String.valueOf(CHECKPOINT_INTERVAL));\n boolean runAsModelCheck = config.getAttribute(IModelConfigurationConstants.LAUNCH_MC_MODE, IModelConfigurationDefaults.LAUNCH_MC_MODE_DEFAULT);\n if (runAsModelCheck) {\n boolean isDepthFirst = config.getAttribute(IModelConfigurationConstants.LAUNCH_DFID_MODE, IModelConfigurationDefaults.LAUNCH_DFID_MODE_DEFAULT);\n if (isDepthFirst) {\n int dfidDepth = config.getAttribute(IModelConfigurationConstants.LAUNCH_DFID_DEPTH, IModelConfigurationDefaults.LAUNCH_DFID_DEPTH_DEFAULT);\n arguments.add(\"String_Node_Str\");\n arguments.add(String.valueOf(dfidDepth));\n }\n } else {\n arguments.add(\"String_Node_Str\");\n int traceDepth = config.getAttribute(IModelConfigurationConstants.LAUNCH_SIMU_DEPTH, IModelConfigurationDefaults.LAUNCH_SIMU_DEPTH_DEFAULT);\n if (traceDepth != IModelConfigurationDefaults.LAUNCH_SIMU_DEPTH_DEFAULT) {\n arguments.add(\"String_Node_Str\");\n arguments.add(String.valueOf(traceDepth));\n }\n int aril = config.getAttribute(IModelConfigurationConstants.LAUNCH_SIMU_ARIL, IModelConfigurationDefaults.LAUNCH_SIMU_ARIL_DEFAULT);\n int seed = config.getAttribute(IModelConfigurationConstants.LAUNCH_SIMU_SEED, IModelConfigurationDefaults.LAUNCH_SIMU_SEED_DEFAULT);\n if (aril != IModelConfigurationDefaults.LAUNCH_SIMU_ARIL_DEFAULT) {\n arguments.add(\"String_Node_Str\");\n arguments.add(String.valueOf(aril));\n }\n if (seed != IModelConfigurationDefaults.LAUNCH_SIMU_SEED_DEFAULT) {\n arguments.add(\"String_Node_Str\");\n arguments.add(String.valueOf(seed));\n }\n }\n boolean recover = config.getAttribute(IModelConfigurationConstants.LAUNCH_RECOVER, IModelConfigurationDefaults.LAUNCH_RECOVER_DEFAULT);\n if (recover) {\n IResource[] checkpoints = ModelHelper.getCheckpoints(config);\n if (checkpoints.length > 0) {\n arguments.add(\"String_Node_Str\");\n arguments.add(checkpoints[0].getName());\n }\n }\n arguments.add(\"String_Node_Str\");\n arguments.add(cfgFile.getName());\n arguments.add(\"String_Node_Str\");\n arguments.add(String.valueOf(COVERAGE_INTERVAL));\n arguments.add(\"String_Node_Str\");\n arguments.add(String.valueOf(workers));\n arguments.add(\"String_Node_Str\");\n arguments.add(\"String_Node_Str\");\n arguments.add(launchDir.getLocation().toOSString());\n arguments.add(ResourceHelper.getModuleName(rootModule));\n return (String[]) arguments.toArray(new String[arguments.size()]);\n}\n"
|
"private void actionReset() {\n if (filter != null) {\n DataDefinition definition = model.getOutputDefinition();\n if (definition == null) {\n reset();\n return;\n }\n List<String> attributes = new ArrayList<String>();\n attributes.addAll(definition.getQuasiIdentifiersWithGeneralization());\n Collections.sort(attributes, new Comparator<String>() {\n public int compare(String arg0, String arg1) {\n return model.getOutput().getColumnIndexOf(arg0) - model.getOutput().getColumnIndexOf(arg1);\n }\n });\n int dimension = 0;\n for (String attribute : attributes) {\n int attributeMin = definition.getMinimumGeneralization(attribute);\n int attributeMax = definition.getMaximumGeneralization(attribute);\n for (int i = attributeMin; i <= attributeMax; i++) {\n filter.allowGeneralization(dimension, i);\n }\n dimension++;\n }\n filter.allowAllInformationLoss();\n filter.allowAnonymous();\n filter.allowNonAnonymous();\n filter.allowUnknown();\n update();\n fireModelEvent();\n }\n}\n"
|
"public String toString() {\n return \"String_Node_Str\" + super.toString() + \"String_Node_Str\" + path + \"String_Node_Str\" + splitLeft + \"String_Node_Str\";\n}\n"
|
"private long getIndexForProperty(Table table, String name) {\n for (int i = 0; i < table.getColumnCount(); i++) {\n if (table.getColumnName(i).equals(name)) {\n return i;\n }\n }\n return -1;\n}\n"
|
"protected void deployTextures(File targetDir, Map<String, String> deploymentMapping, ImportedModel loadedModel) {\n try {\n for (Map.Entry<URL, String> t : loadedModel.getTextureFiles().entrySet()) {\n File target = null;\n String targetFilename = t.getValue();\n String deployFilename = null;\n if (targetFilename.startsWith(\"String_Node_Str\")) {\n targetFilename = targetFilename.substring(targetFilename.lastIndexOf('/'));\n if (targetFilename == null) {\n targetFilename = t.getValue();\n }\n } else if (targetFilename.startsWith(\"String_Node_Str\")) {\n deployFilename = targetFilename.substring(3);\n target = new File(targetDir, deployFilename);\n } else if (targetFilename.startsWith(\"String_Node_Str\")) {\n deployFilename = targetFilename.substring(2);\n target = new File(targetDir, deployFilename);\n }\n if (target == null) {\n deployFilename = targetFilename;\n target = new File(targetDir, targetFilename);\n }\n target.getParentFile().mkdirs();\n target.createNewFile();\n copyAsset(t.getKey(), target, false);\n String colladaURL = loadedModel.getTextureFiles().get(t.getKey());\n deploymentMapping.put(colladaURL, deployFilename);\n }\n } catch (IOException ex) {\n logger.log(Level.SEVERE, null, ex);\n }\n}\n"
|
"public static GameProfile fillGameProfile(GameProfile gameProfile) {\n if (gameProfile != null) {\n GameProfile gameProfile1 = null;\n if (gameProfile.getName() != null) {\n gameProfile1 = MinecraftServer.getServer().getUserCache().getProfile(gameProfile.getName());\n } else if (gameProfile.getId() != null) {\n gameProfile1 = MinecraftServer.getServer().getUserCache().a(gameProfile.getId());\n } else {\n gameProfile1 = gameProfile;\n }\n if (Iterables.getFirst(gameProfile1.getProperties().get(\"String_Node_Str\"), null) == null) {\n gameProfile1 = MinecraftServer.getServer().aC().fillProfileProperties(gameProfile1, true);\n }\n return gameProfile1;\n }\n return null;\n}\n"
|
"public INDArray permute(int[] rearrange) {\n ensureNotCleanedUp();\n if (rearrange.length != shape.length)\n return dup();\n checkArrangeArray(rearrange);\n int[] newShape = doPermuteSwap(shape, rearrange);\n if (isVector() || isMatrix()) {\n if (Arrays.equals(rearrange, ArrayUtil.reverseCopy(ArrayUtil.range(0, 2))))\n return transpose();\n return this;\n }\n int[] newStride = doPermuteSwap(stride, rearrange);\n INDArray value = create(data(), newShape, newStride, offset, ordering);\n return value;\n}\n"
|
"public void afterTextChanged(Editable s) {\n dialog.getActionButton(DialogAction.POSITIVE).setEnabled(FileUtils.isPathAccessible(s.toString(), sharedPrefs));\n}\n"
|
"public DataSet<Boolean> equalsByElementIds(LogicalGraph<G, V, E> other) {\n return new GraphEquality<>(new GraphHeadEmptyLabeler<G>(), new VertexIdLabeler<V>(), new EdgeIdLabeler<E>()).execute(this, other);\n}\n"
|
"protected void setupDatabase(Database database) throws Exception {\n dropTableIfExists(null, NEW_TABLE_NAME, database);\n dropTableIfExists(TestContext.ALT_SCHEMA, NEW_TABLE_NAME, database);\n dropAndCreateTable(new CreateTableStatement(null, TABLE_NAME).addPrimaryKeyColumn(\"String_Node_Str\", \"String_Node_Str\"), database);\n dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA, TABLE_NAME).addPrimaryKeyColumn(\"String_Node_Str\", \"String_Node_Str\"), database);\n}\n"
|
"protected void setRowColumnConstraints() {\n int tempIndentSize = getIndentSize();\n if (this.indentSubplots) {\n this.maxLevel = setIndentLevel0() + 1;\n setRowColumnConstraints(maxLevel, tempIndentSize);\n } else {\n resetIndentLevel0(0);\n setRowColumnConstraints(0, tempIndentSize);\n }\n}\n"
|
"public void setAsMain() {\n if (App.getWindow() != null)\n throw new RuntimeException(\"String_Node_Str\");\n main = true;\n setIcon(App.getIcon());\n setTitle(null);\n}\n"
|
"public void runOperation(VariableMap variableMap, final IProgressMonitor monitor) throws Exception {\n if (!blamReadyToExecute()) {\n monitor.setCanceled(true);\n return;\n }\n IOseeBranch requirementsBranch = variableMap.getBranch(\"String_Node_Str\");\n IOseeBranch scriptsBranch = variableMap.getBranch(\"String_Node_Str\");\n IOseeBranch procedureBranch = variableMap.getBranch(\"String_Node_Str\");\n File scriptDir = new File(variableMap.getString(\"String_Node_Str\"));\n versions = new ArrayList<>();\n for (IAtsVersion version : variableMap.getCollection(IAtsVersion.class, \"String_Node_Str\")) {\n versions.add(version);\n }\n init();\n loadTestRunArtifacts(scriptsBranch);\n Collection<TraceHandler> traceHandlers = new LinkedList<>();\n for (String handler : availableTraceHandlers) {\n if (variableMap.getBoolean(handler)) {\n TraceHandler traceHandler = TraceUnitExtensionManager.getInstance().getTraceHandlerByName(handler);\n traceHandlers.add(traceHandler);\n }\n }\n TraceabilityProviderOperation provider = new ScriptTraceabilityOperation(scriptDir, requirementsBranch, false, traceHandlers, false);\n RequirementTraceabilityData traceabilityData = new RequirementTraceabilityData(procedureBranch, provider);\n IStatus status = traceabilityData.initialize(monitor);\n switch(status.getSeverity()) {\n case IStatus.OK:\n requirementToCodeUnitsMap = traceabilityData.getRequirementsToCodeUnits();\n loadReqTaskMap();\n writeStatusSheet(traceabilityData.getAllSwRequirements());\n writeTestScriptSheet(traceabilityData.getCodeUnits());\n excelWriter.endWorkbook();\n IFile iFile = OseeData.getIFile(\"String_Node_Str\" + Lib.getDateTimeString() + \"String_Node_Str\");\n AIFile.writeToFile(iFile, charBak);\n Program.launch(iFile.getLocation().toOSString());\n break;\n case IStatus.CANCEL:\n monitor.setCanceled(true);\n break;\n default:\n throw new OseeCoreException(status.getMessage(), status.getException());\n }\n}\n"
|
"public <P extends Page> P getPage(String url) throws FailingHttpStatusCodeException, MalformedURLException, IOException {\n return environment.<P>getPage(url);\n}\n"
|
"private void handleData(DataBlock dataBlock, int state) {\n boolean tailLock;\n DataBlock freeDataBlock = null;\n handleDataLoop: for (; ; ) {\n ByteBuffer rw = dataBlock.rw;\n final int bytesReady = (state & LENGTH_MASK);\n int bytesRemaining = bytesReady;\n int pos = rw.position();\n for (; ; ) {\n int bb = (m_blockSize - pos);\n if (bytesRemaining <= bb) {\n int limit = pos + bytesRemaining;\n rw.limit(limit);\n m_sessionListener.onDataReceived(rw);\n rw.position(limit);\n break;\n }\n bytesRemaining -= bb;\n rw.limit(m_blockSize);\n m_sessionListener.onDataReceived(rw);\n DataBlock next = dataBlock.next;\n dataBlock.reset();\n if (freeDataBlock == null) {\n dataBlock.next = null;\n freeDataBlock = dataBlock;\n } else {\n dataBlock.next = freeDataBlock;\n freeDataBlock = null;\n m_dataBlockCache.put(dataBlock);\n }\n dataBlock = next;\n rw = dataBlock.rw;\n pos = 0;\n }\n for (; ; ) {\n int newState = state;\n newState -= bytesReady;\n if ((newState & LENGTH_MASK) == 0) {\n if ((newState & TAIL_LOCK) == 0) {\n newState |= TAIL_LOCK;\n tailLock = true;\n } else\n tailLock = false;\n if (m_state.compareAndSet(state, newState)) {\n if ((state & LENGTH_MASK) > m_maxSize) {\n assert ((newState & LENGTH_MASK) <= m_maxSize);\n assert ((newState & CLOSED) == 0);\n m_speculativeRead = true;\n m_collider.executeInThreadPool(this);\n }\n state = newState;\n if (freeDataBlock != null) {\n assert (freeDataBlock.next == null);\n m_dataBlockCache.put(freeDataBlock);\n }\n break handleDataLoop;\n }\n } else {\n if (m_state.compareAndSet(state, newState)) {\n if (((state & LENGTH_MASK) > m_maxSize) && ((newState & LENGTH_MASK) <= m_maxSize)) {\n assert ((newState & CLOSED) == 0);\n m_speculativeRead = true;\n m_collider.executeInThreadPool(this);\n }\n state = newState;\n break;\n }\n }\n state = m_state.get();\n }\n if (rw.limit() == rw.capacity()) {\n DataBlock next = dataBlock.next;\n dataBlock.next = null;\n dataBlock.reset();\n m_dataBlockCache.put(dataBlock);\n dataBlock = next;\n }\n }\n if (tailLock) {\n assert (dataBlock == m_tail);\n DataBlock tail = m_tail;\n m_tail = null;\n for (; ; ) {\n assert ((state & TAIL_LOCK) != 0);\n int newState = (state - TAIL_LOCK);\n if (m_state.compareAndSet(state, newState)) {\n state = newState;\n break;\n }\n state = m_state.get();\n }\n assert (tail.next == null);\n m_dataBlockCache.put(tail.reset());\n }\n if ((state & CLOSED) != 0) {\n m_sessionListener.onConnectionClosed();\n printStats();\n }\n}\n"
|
"public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) {\n TileEntityXenAmethyst amethyst = (TileEntityXenAmethyst) tileentity;\n GL11.glPushMatrix();\n {\n if (amethyst.ticksSinceLastAtack < 10) {\n renderElectro(amethyst, Tessellator.instance, d0, d1, d2);\n }\n GL11.glPushMatrix();\n {\n super.renderTileEntityAt(tileentity, d0, d1, d2, f);\n }\n GL11.glPopMatrix();\n }\n super.renderTileEntityAt(tileentity, d0, d1, d2, f);\n GL11.glPopMatrix();\n}\n"
|
"protected byte getFieldRating(int x, int y, double distance) {\n if (x % 2 == 0 && y % 2 != 0) {\n return super.getFieldRating(x, y, distance);\n } else {\n return 0;\n }\n}\n"
|
"protected void setupDatabase(Database database) throws Exception {\n dropAndCreateTable(new CreateTableStatement(null, TABLE_NAME).addPrimaryKeyColumn(\"String_Node_Str\", \"String_Node_Str\"), database);\n dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA, TABLE_NAME).addPrimaryKeyColumn(\"String_Node_Str\", \"String_Node_Str\"), database);\n}\n"
|
"protected String formatTo(final Formatter formatter) {\n final String keyword = super.formatTo(formatter);\n formatter.newLine();\n formatter.append(toFormattable(getDatum()));\n formatter.newLine();\n final boolean isWKT1 = formatter.getConvention().majorVersion() == 1;\n if (isWKT1 || !isBaseCRS(formatter)) {\n final CoordinateSystem cs = getCoordinateSystem();\n formatCS(formatter, cs, ReferencingUtilities.getUnit(cs), isWKT1);\n }\n return keyword;\n}\n"
|
"public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {\n EventPrinter.print(timeStamp, inEvents, removeEvents);\n if (inEvents != null) {\n for (Event event : inEvents) {\n inEventCount++;\n switch(inEventCount) {\n case 1:\n Assert.assertArrayEquals(new Object[] { \"String_Node_Str\", \"String_Node_Str\", 75.6f }, event.getData());\n break;\n default:\n Assert.assertSame(1, inEventCount);\n }\n }\n eventArrived = true;\n }\n if (removeEvents != null) {\n for (Event event : removeEvents) {\n removeEventCount++;\n switch(removeEventCount) {\n case 1:\n Assert.assertArrayEquals(new Object[] { \"String_Node_Str\", \"String_Node_Str\", 75.6f }, event.getData());\n break;\n default:\n Assert.assertSame(1, removeEventCount);\n }\n }\n }\n eventArrived = true;\n}\n"
|
"private boolean checkUnrarCommandIntern() {\n String path = this.getPluginConfig().getStringProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, null);\n String hash = this.getPluginConfig().getStringProperty(JDUnrarConstants.UNRAR_HASH, null);\n if (hash != null && hash.length() == 32 && path != null && path.length() != 0) {\n String curhash = JDHash.getMD5(new File(path));\n if (curhash != null) {\n if (curhash.equalsIgnoreCase(hash)) {\n return true;\n } else {\n this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, path);\n this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, curhash);\n this.getPluginConfig().save();\n return true;\n }\n }\n } else {\n path = null;\n hash = null;\n }\n if (path == null || path.length() == 0) {\n if (OSDetector.isWindows()) {\n path = JDUtilities.getResourceFile(\"String_Node_Str\").getAbsolutePath();\n this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, path);\n this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, JDHash.getMD5(path));\n this.getPluginConfig().save();\n return true;\n } else {\n if (OSDetector.isLinux()) {\n path = JDUtilities.getResourceFile(\"String_Node_Str\").getAbsolutePath();\n chmodUnrar(path);\n if (isUnrarCommandValid(path)) {\n this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, path);\n this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, JDHash.getMD5(path));\n this.getPluginConfig().save();\n return true;\n }\n }\n if (OSDetector.isMac()) {\n path = JDUtilities.getResourceFile(\"String_Node_Str\").getAbsolutePath();\n chmodUnrar(path);\n if (isUnrarCommandValid(path)) {\n this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, path);\n this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, JDHash.getMD5(path));\n this.getPluginConfig().save();\n return true;\n }\n }\n if (isUnrarCommandValid(\"String_Node_Str\")) {\n path = \"String_Node_Str\";\n this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, path);\n this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, JDHash.getMD5(path));\n this.getPluginConfig().save();\n return true;\n }\n if (isUnrarCommandValid(\"String_Node_Str\")) {\n path = \"String_Node_Str\";\n this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, path);\n this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, JDHash.getMD5(path));\n this.getPluginConfig().save();\n return true;\n }\n try {\n String[] charset = System.getenv(\"String_Node_Str\").split(\"String_Node_Str\");\n for (String element : charset) {\n File fi = new File(element, \"String_Node_Str\");\n File fi2 = new File(element, \"String_Node_Str\");\n if (fi.isFile() && isUnrarCommandValid(fi.getAbsolutePath())) {\n path = fi.getAbsolutePath();\n this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, path);\n this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, JDHash.getMD5(path));\n this.getPluginConfig().save();\n return true;\n } else if (fi2.isFile() && isUnrarCommandValid(fi2.getAbsolutePath())) {\n path = fi2.getAbsolutePath();\n this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, path);\n this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, JDHash.getMD5(path));\n this.getPluginConfig().save();\n return true;\n }\n }\n } catch (Throwable e) {\n }\n this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, null);\n this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, null);\n this.getPluginConfig().save();\n return false;\n }\n }\n this.getPluginConfig().setProperty(JDUnrarConstants.CONFIG_KEY_UNRARCOMMAND, null);\n this.getPluginConfig().setProperty(JDUnrarConstants.UNRAR_HASH, null);\n this.getPluginConfig().save();\n return false;\n}\n"
|
"public void removeUnsafeExtras() {\n if (mExtras != null) {\n mExtras = mExtras.filterValues();\n }\n}\n"
|
"protected void overlapSwap(List rtList) {\n for (int i = 0; i < rtList.size(); i++) {\n long max_loop = rtList.size() - i;\n int n = -1;\n boolean restart = true;\n while (restart && n < max_loop) {\n restart = false;\n n++;\n Object event = rtList.get(i);\n Object3D far = getObjectFromEvent(event, true);\n for (int j = i + 1; j < rtList.size(); j++) {\n Object event2 = rtList.get(j);\n Object3D near = getObjectFromEvent(event2);\n if (far.testZOverlap(near)) {\n if (far.testSwap(near, this)) {\n rtList.set(i, event2);\n rtList.set(j, event);\n restart = true;\n break;\n }\n }\n }\n }\n }\n}\n"
|
"public boolean isConnected() {\n return channel != null && channel.isConnected();\n}\n"
|
"private void processLocalMouseEvent(MouseEvent evt, boolean moved) {\n if (viewer.rfb != null && rfb.inNormalProtocol) {\n if (!inSelectionMode) {\n if (inputEnabled) {\n if (!moved) {\n sendMouseEvent(evt, moved);\n }\n }\n } else {\n handleSelectionMouseEvent(evt);\n }\n }\n}\n"
|
"private void openWriter() throws IOException {\n if (_readOnly) {\n throw new IOException(\"String_Node_Str\");\n }\n _outputPath = getSegmentPath(_currentFileCounter.incrementAndGet());\n LOG.info(\"String_Node_Str\", _outputPath);\n _output = _fileSystem.create(_outputPath, false);\n _output.write(MAGIC);\n _output.writeInt(VERSION);\n syncInternal();\n}\n"
|
"public List<Activity> getBaselineDiff(Diffable d1, Diffable d2, boolean merge, File viewContext) throws UCMException {\n List<String> lines = strategy.getBaselineDiff(d1, d2, merge, viewContext);\n return parseActivityStrings(lines, viewContext.getAbsoluteFile().toString().length());\n}\n"
|
"private void _commitSave(boolean isNew, String id, ArrayList<String> parentsMaintainOldVersion, String newVersionName) throws Exception {\n String newName = _attributesListPanel.getModelName();\n _modelToSave.setName(newName);\n _updateDisplayedModel();\n if (isNew || id == null) {\n if (_modelToSave.getAttribute(XMLDBModel.DB_MODEL_ID_ATTR) != null) {\n _modelToSave.getAttribute(XMLDBModel.DB_MODEL_ID_ATTR).setContainer(null);\n try {\n MoMLChangeRequest change = new MoMLChangeRequest(this, null, _modelToSave.exportMoML());\n change.setUndoable(true);\n _modelToSave.requestChange(change);\n } catch (Exception e) {\n _resetValues();\n throw e;\n }\n }\n }\n if (_xmlModel == null) {\n _xmlModel = new XMLDBModel(_modelToSave.getName());\n }\n _xmlModel.setModelName(_modelToSave.getName());\n _xmlModel.setModel(_modelToSave.exportMoML());\n _xmlModel.setIsNew(isNew);\n _xmlModel.setModelId(id);\n XMLDBModelWithReferenceChanges xmlDBModelWithReferenceChanges = new XMLDBModelWithReferenceChanges(_xmlModel, parentsMaintainOldVersion, newVersionName);\n try {\n String modelId = _saveModelManager.saveWithParents(xmlDBModelWithReferenceChanges);\n if (modelId != null) {\n JOptionPane.showMessageDialog(this, \"String_Node_Str\", \"String_Node_Str\", JOptionPane.INFORMATION_MESSAGE, null);\n if (_modelToSave.getAttribute(XMLDBModel.DB_MODEL_ID_ATTR) == null) {\n StringConstantParameter dbModelParam = new StringConstantParameter(_modelToSave, XMLDBModel.DB_MODEL_ID_ATTR);\n dbModelParam.setExpression(modelId);\n dbModelParam.setContainer(_modelToSave);\n } else if (!((StringParameter) _modelToSave.getAttribute(XMLDBModel.DB_MODEL_ID_ATTR)).getExpression().equals(modelId)) {\n ((StringParameter) _modelToSave.getAttribute(XMLDBModel.DB_MODEL_ID_ATTR)).setExpression(modelId);\n }\n try {\n MoMLChangeRequest change = new MoMLChangeRequest(this, null, _modelToSave.exportMoML());\n change.setUndoable(true);\n _modelToSave.requestChange(change);\n _source.setTitle(_xmlModel.getModelName());\n try {\n _source.updateDBModelHistory(_xmlModel.getModelName(), false);\n } catch (IOException e) {\n }\n } catch (Exception e) {\n throw e;\n }\n if (parentsMaintainOldVersion != null && parentsMaintainOldVersion.size() > 0) {\n XMLDBModel newVersionModel = DBModelFetcher.load(newVersionName);\n for (String parentName : parentsMaintainOldVersion) {\n if (_source.getConfiguration().getDirectory().getEntity(parentName) != null) {\n PtolemyEffigy parentModelEffigy = (PtolemyEffigy) _source.getConfiguration().getDirectory().getEffigy(parentName);\n boolean modifiedFlag = parentModelEffigy.isModified();\n for (Object entity : ((CompositeEntity) parentModelEffigy.getModel()).entityList()) {\n ComponentEntity componentEntity = (ComponentEntity) entity;\n if (Utilities.getIdFromModel(componentEntity) != null && Utilities.getIdFromModel(componentEntity).equals(modelId)) {\n StringParameter modelIdAttribute = (StringParameter) componentEntity.getAttribute(XMLDBModel.DB_MODEL_ID_ATTR);\n modelIdAttribute.setToken(newVersionModel.getModelId());\n componentEntity.setName(parentModelEffigy.uniqueName(newVersionModel.getModelName()));\n }\n }\n MoMLChangeRequest change = new MoMLChangeRequest(null, parentModelEffigy.getModel(), parentModelEffigy.getModel().exportMoML());\n change.setUndoable(true);\n parentModelEffigy.getModel().requestChange(change);\n }\n }\n }\n if (_parentValidateFrame != null) {\n ArrayList<String> parentsModelsMaintainReferences = _parentValidateFrame._getParentsMaintainReferences();\n if (parentsModelsMaintainReferences != null && parentsModelsMaintainReferences.size() > 0) {\n XMLDBModel savedModel = DBModelFetcher.loadUsingId(modelId);\n for (String parentName : parentsModelsMaintainReferences) {\n if (_source.getConfiguration().getDirectory().getEntity(parentName) != null) {\n PtolemyEffigy parentModelEffigy = (PtolemyEffigy) _source.getConfiguration().getDirectory().getEffigy(parentName);\n for (Object entity : parentModelEffigy.entityList()) {\n ComponentEntity componentEntity = (ComponentEntity) entity;\n if (Utilities.getIdFromModel(componentEntity) != null && Utilities.getIdFromModel(componentEntity).equals(modelId)) {\n MoMLChangeRequest change = new MoMLChangeRequest(null, componentEntity, savedModel.getModel());\n change.setUndoable(true);\n componentEntity.requestChange(change);\n }\n }\n MoMLChangeRequest change = new MoMLChangeRequest(null, parentModelEffigy.getModel(), parentModelEffigy.getModel().exportMoML());\n change.setUndoable(true);\n parentModelEffigy.getModel().requestChange(change);\n }\n }\n }\n }\n _source.setModified(false);\n if (_parentValidateFrame != null) {\n _parentValidateFrame.dispose();\n }\n dispose();\n } else {\n JOptionPane.showMessageDialog(this, \"String_Node_Str\", \"String_Node_Str\", JOptionPane.INFORMATION_MESSAGE, null);\n }\n } catch (DBConnectionException exception) {\n _resetValues();\n throw exception;\n } catch (DBExecutionException exception) {\n _resetValues();\n throw exception;\n } catch (IllegalArgumentException exception) {\n _resetValues();\n throw exception;\n } catch (ModelAlreadyExistException exception) {\n _resetValues();\n JOptionPane.showMessageDialog(this, \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n _rollbackModel();\n }\n}\n"
|
"public void attemptConnection() {\n mBluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n if (device != null) {\n for (BluetoothDevice bluetoothDevice : mBluetoothManager.getConnectedDevices(BluetoothProfile.GATT)) {\n if (bluetoothDevice.getAddress().compareTo(device.getAddress()) == 0) {\n mConnectionState = STATE_CONNECTED;\n }\n }\n }\n Log.w(TAG, \"String_Node_Str\" + mConnectionState);\n if (mConnectionState == STATE_DISCONNECTED || mConnectionState == STATE_DISCONNECTING) {\n ActiveBluetoothDevice btDevice = ActiveBluetoothDevice.first();\n if (btDevice != null) {\n mDeviceName = btDevice.name;\n mDeviceAddress = btDevice.address;\n mBluetoothAdapter = mBluetoothManager.getAdapter();\n if (mBluetoothAdapter.isEnabled() && mBluetoothAdapter.getRemoteDevice(mDeviceAddress) != null) {\n connect(mDeviceAddress);\n return;\n } else {\n Log.w(TAG, \"String_Node_Str\");\n setRetryTimer();\n return;\n }\n } else {\n Log.w(TAG, \"String_Node_Str\");\n setRetryTimer();\n return;\n }\n } else if (mConnectionState == STATE_CONNECTED) {\n Log.w(TAG, \"String_Node_Str\");\n attemptRead();\n return;\n } else {\n setRetryTimer();\n return;\n }\n}\n"
|
"public static Bitmap drawableToBitmap(Drawable drawable) {\n if (drawable instanceof BitmapDrawable) {\n return ((BitmapDrawable) drawable).getBitmap();\n }\n Bitmap bitmap = Bitmap.createBitmap(Tools.dpToPx(context, 100), Tools.dpToPx(context, 5), Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());\n drawable.draw(canvas);\n return bitmap;\n}\n"
|
"public void abort() {\n System.out.println(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n this.abortScheduled = true;\n latch.notifyAbort();\n}\n"
|
"public String generateInitializeFunctionCode() throws IllegalActionException {\n StringBuffer code = new StringBuffer();\n CompositeActor container = ((CompositeActor) _director.getContainer());\n List actorList = container.deepEntityList();\n String sanitizedContainerName = CodeGeneratorAdapter.generateName(container);\n ProgramCodeGenerator codeGenerator = getCodeGenerator();\n code.append(_eol + _eol + codeGenerator.comment(\"String_Node_Str\"));\n if (_director.isEmbedded()) {\n ptolemy.actor.Director executiveDirector = container.getExecutiveDirector();\n if (executiveDirector instanceof SuperdenseTimeDirector) {\n code.append(_eol + _sanitizedDirectorName + \"String_Node_Str\" + ((SuperdenseTimeDirector) executiveDirector).getIndex() + \"String_Node_Str\");\n }\n }\n Iterator<?> actors = actorList.iterator();\n while (actors.hasNext()) {\n NamedObj actor = (NamedObj) actors.next();\n String sanitizedActorName = CodeGeneratorAdapter.generateName(actor);\n if (!actor.getFullName().contains(\"String_Node_Str\"))\n code.append(_eol + sanitizedActorName + \"String_Node_Str\");\n }\n code.append(_eol + _sanitizedDirectorName + \"String_Node_Str\" + sanitizedContainerName + \"String_Node_Str\");\n code.append(_eol + _sanitizedDirectorName + \"String_Node_Str\" + _sanitizedDirectorName + \"String_Node_Str\");\n code.append(_eol + _sanitizedDirectorName + \"String_Node_Str\");\n code.append(_eol + _sanitizedDirectorName + \"String_Node_Str\");\n code.append(_eol + codeGenerator.comment(\"String_Node_Str\"));\n return code.toString();\n}\n"
|
"public String getAsHtml() throws OseeCoreException {\n BranchQuery query = orcsApi.getQueryFactory(null).branchQuery();\n ResultSet<BranchReadable> results = query.andUuids(branchUuid).getResults();\n HtmlWriter writer = new HtmlWriter(uriInfo);\n return writer.toHtml(results);\n}\n"
|
"public void onClick(DialogInterface dialog, int whichButton) {\n EditText textEntry = ((EditText) textEntryView.findViewById(R.id.dialog_text_entry));\n String gardenName = textEntry.getText().toString().trim();\n if (gardenName.length() == 0)\n gardenName = \"String_Node_Str\";\n Intent intent = new Intent(this, GardenScreen.class);\n intent.putExtra(\"String_Node_Str\", gardens.size());\n Garden garden = new Garden(gardenName);\n GardenGnome.addGardenServer(garden);\n adapter.notifyDataSetChanged();\n startActivityForResult(intent, 0);\n new Thread(setLocation).start();\n removeDialog(0);\n}\n"
|
"public void focusLost(FocusEvent e) {\n this.setVisible(false);\n}\n"
|
"public void saveAnalysis() throws DataprofilerCoreException {\n for (Domain domain : this.analysis.getParameters().getDataFilter()) {\n domain.setName(this.analysis.getName());\n }\n analysisHandler.clearAnalysis();\n TableIndicator[] tableIndicators = treeViewer.getTableIndicator();\n Connection tdProvider = null;\n Analysis analysis = analysisHandler.getAnalysis();\n analysis.getParameters().setExecutionLanguage(ExecutionLanguage.get(execLang));\n if (tableIndicators != null && tableIndicators.length != 0) {\n tdProvider = ConnectionHelper.getDataProvider(tableIndicators[0].getColumnSet());\n if (tdProvider.eIsProxy()) {\n tdProvider = (Connection) EObjectHelper.resolveObject(tdProvider);\n }\n analysis.getContext().setConnection(tdProvider);\n for (TableIndicator tableIndicator : tableIndicators) {\n analysisHandler.addIndicator(tableIndicator.getColumnSet(), tableIndicator.getIndicators());\n }\n } else {\n analysis.getContext().setConnection(null);\n }\n analysisHandler.setStringDataFilter(dataFilterComp.getDataFilterString());\n this.updateAnalysisClientDependency();\n this.saveNumberOfConnectionsPerAnalysis();\n ReturnCode saved = new ReturnCode(false);\n IEditorInput editorInput = this.getEditorInput();\n if (editorInput instanceof AnalysisItemEditorInput) {\n AnalysisItemEditorInput analysisInput = (AnalysisItemEditorInput) editorInput;\n TDQAnalysisItem tdqAnalysisItem = analysisInput.getTDQAnalysisItem();\n tdqAnalysisItem.getProperty().setDisplayName(analysisHandler.getName());\n tdqAnalysisItem.getProperty().setLabel(WorkspaceUtils.normalize(analysisHandler.getName()));\n this.nameText.setText(analysisHandler.getName());\n saved = ElementWriterFactory.getInstance().createAnalysisWrite().save(tdqAnalysisItem, true);\n }\n logSaved(saved);\n treeViewer.setDirty(false);\n dataFilterComp.setDirty(false);\n}\n"
|
"public void run() {\n setName(\"String_Node_Str\");\n udp.getServer().getLogger().info(\"String_Node_Str\", addr.toString());\n try {\n socket = new DatagramSocket(null);\n socket.setBroadcast(true);\n socket.setSendBufferSize(1024 * 1024 * 8);\n socket.setReceiveBufferSize(1024 * 1024);\n try {\n socket.bind(addr);\n } catch (BindException e) {\n getServer().getLogger().fatal(\"String_Node_Str\", addr.toString());\n throw new RuntimeException(e);\n }\n socket.setSoTimeout(0);\n getServer().registerShutdownFunction(new Callable(this, \"String_Node_Str\"));\n while (running) {\n byte[] buffer = new byte[1024 * 1024];\n DatagramPacket pk = new DatagramPacket(buffer, buffer.length);\n socket.receive(pk);\n pk.setData(Arrays.copyOf(buffer, pk.getLength()));\n synchronized (receivedPacketQueue) {\n receivedPacketQueue.add(pk);\n }\n }\n socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n}\n"
|
"public void highlightEdge(final OverlayEdgeWrapper<V, E> edge) {\n wrappedHighlightModel.highlightEdge(OverlayEdgeWrapper.wrappedOrNull(edge));\n}\n"
|
"private void sendSetRequest(int commandId, int value, SetResponseHandler future) {\n if (future != null)\n setResponsesFutures.put(commandId, future);\n scratchSetRequest.cmd_id = (byte) commandId;\n scratchSetRequest.value = (byte) value;\n sendMavlinkPacket(scratchSetRequest.pack());\n}\n"
|
"protected Map<TableUniqueName, String> tableSubstitution() {\n return source.tableSubstitution();\n}\n"
|
"public int intersects(MyPoint p1, MyPoint p2) throws DelaunayError {\n int result = 0;\n MyPoint p3 = this.startPoint;\n MyPoint p4 = this.endPoint;\n MyElement inter = getIntersection(p1, p2, false);\n if (inter == null) {\n double a1 = p2.getX() - p1.getX();\n double b1 = p4.getX() - p3.getX();\n double a2 = p2.getY() - p1.getY();\n double b2 = p4.getY() - p3.getY();\n double d = b1 * a2 - b2 * a1;\n if (-MyTools.EPSILON2 < d && d < MyTools.EPSILON2) {\n return 2;\n } else {\n return 0;\n }\n } else if (inter instanceof MyPoint) {\n MyPoint interPoint = (MyPoint) inter;\n if ((interPoint.squareDistance2D(p1) < MyTools.EPSILON2 || interPoint.squareDistance2D(p2) < MyTools.EPSILON2) && (interPoint.squareDistance2D(p3) < MyTools.EPSILON2 || interPoint.squareDistance2D(p4) < MyTools.EPSILON2)) {\n return 3;\n } else {\n return 1;\n }\n } else if (inter instanceof MyEdge) {\n return 4;\n }\n return result;\n}\n"
|
"protected IStatus run(IProgressMonitor monitor) {\n try {\n rebase.execute(monitor);\n } catch (final CoreException e) {\n if (!repository.getRepositoryState().equals(RepositoryState.SAFE)) {\n try {\n new RebaseOperation(repository, Operation.ABORT).execute(monitor);\n } catch (CoreException e1) {\n return createMultiStatus(e, e1);\n }\n }\n return e.getStatus();\n }\n return Status.OK_STATUS;\n}\n"
|
"public Object visitMethodDeclNode(MethodDeclNode node, LinkedList args) {\n NameContext ctx = (NameContext) args.get(0);\n NameContext subCtx = new NameContext(ctx);\n subCtx.encLoop = null;\n subCtx.breakTarget = null;\n Environ newEnv1 = new Environ(ctx.environ);\n subCtx.environ = newEnv1;\n LinkedList childArgs = TNLManip.cons(subCtx);\n node.setParams(TNLManip.traverseList(this, node, childArgs, node.getParams()));\n TreeNode body = node.getBody();\n if (body != AbsentTreeNode.instance) {\n node.setBody((BlockNode) body.accept(this, childArgs));\n }\n return node;\n}\n"
|
"public static CherryPickResult cherryPickNoMerge(final Git git, Ref src) throws GitAPIException {\n Repository repo = git.getRepository();\n RevCommit newHead = null;\n List<Ref> cherryPickedRefs = new LinkedList<Ref>();\n RevWalk revWalk = new RevWalk(repo);\n try {\n Ref headRef = repo.getRef(Constants.HEAD);\n if (headRef == null)\n throw new NoHeadException(JGitText.get().commitOnRepoWithoutHEADCurrentlyNotSupported);\n RevCommit headCommit = revWalk.parseCommit(headRef.getObjectId());\n newHead = headCommit;\n ObjectId srcObjectId = src.getPeeledObjectId();\n if (srcObjectId == null)\n srcObjectId = src.getObjectId();\n RevCommit srcCommit = revWalk.parseCommit(srcObjectId);\n if (srcCommit.getParentCount() == 0)\n return null;\n if (srcCommit.getParentCount() > 1)\n throw new MultipleParentsNotAllowedException(MessageFormat.format(JGitText.get().canOnlyCherryPickCommitsWithOneParent, srcCommit.name(), Integer.valueOf(srcCommit.getParentCount())));\n RevCommit srcParent = srcCommit.getParent(0);\n revWalk.parseHeaders(srcParent);\n ResolveMerger merger = (ResolveMerger) MergeStrategy.RESOLVE.newMerger(repo);\n merger.setWorkingTreeIterator(new FileTreeIterator(repo));\n merger.setBase(srcParent.getTree());\n if (merger.merge(headCommit, srcCommit)) {\n DirCacheCheckout dco = new DirCacheCheckout(repo, headCommit.getTree(), repo.lockDirCache(), merger.getResultTreeId());\n dco.setFailOnConflict(true);\n dco.checkout();\n cherryPickedRefs.add(src);\n } else {\n if (merger.failed())\n return new CherryPickResult(merger.getFailingPaths());\n String message = new MergeMessageFormatter().formatWithConflicts(srcCommit.getFullMessage(), merger.getUnmergedPaths());\n repo.writeCherryPickHead(srcCommit.getId());\n repo.writeMergeCommitMsg(message);\n return CherryPickResult.CONFLICT;\n }\n } catch (IOException e) {\n throw new JGitInternalException(MessageFormat.format(JGitText.get().exceptionCaughtDuringExecutionOfCherryPickCommand, e), e);\n } finally {\n revWalk.release();\n }\n return new CherryPickResult(newHead, cherryPickedRefs);\n}\n"
|
"private void parseFnParams(String params) {\n int endOfParams = params.length();\n if (params.endsWith(\"String_Node_Str\"))\n endOfParams--;\n params = params.substring(\"String_Node_Str\".length(), endOfParams);\n String[] args = params.split(\"String_Node_Str\");\n if (args != null && args.length >= 2) {\n String dataVar = args[0];\n if (options == null)\n options = new HashMap<String, Object>();\n options.put(\"String_Node_Str\", dataVar);\n this.rowTemplate = args[1];\n if (args.length > 2) {\n this.emptyTemplate = args[2];\n } else {\n this.emptyTemplate = null;\n }\n }\n}\n"
|
"private double getMseLoss(LFgExample ex, FgInferencer infLatPred) {\n MseMarginalEvaluator mse = new MseMarginalEvaluator();\n return mse.evaluate(goldConfig, infLatPred) * weight;\n}\n"
|
"public void close(AgronaChannel channel) {\n readableChannels.remove(channel);\n registerTask(new CloseTask(channel, future));\n}\n"
|
"private static void addHostHeader(URL url, Map<String, String> headers) {\n StringBuilder hostHeader = new StringBuilder(url.getHost());\n int port = url.getPort();\n if (port > -1) {\n hostHeader.concat(\"String_Node_Str\" + Integer.toString(port));\n }\n headers.put(\"String_Node_Str\", hostHeader);\n}\n"
|
"public String getItem(int i) {\n return mSortedUrls.get(i);\n}\n"
|
"public void apply(List<IRealization> realizations, OLAPContext olapContext) {\n if (realizations.size() > 0) {\n if (olapContext.isWeekMatch.containsKey(realizations.get(0))) {\n CubeInstance cube = (CubeInstance) realizations.get(0);\n adjustOLAPContext(cube, olapContext);\n }\n }\n}\n"
|
"public void onLocationChanged(Location loc) {\n if (loc.getProvider().equals(LocationManager.GPS_PROVIDER)) {\n isGpsAvailable = true;\n }\n if (isGpsAvailable && loc.getProvider().equals(LocationManager.NETWORK_PROVIDER)) {\n return;\n }\n long now = System.currentTimeMillis();\n double latitude = loc.getLatitude();\n double longitude = loc.getLongitude();\n float accuracy = loc.getAccuracy();\n ArrayList<PendingIntent> intentsToRemove = null;\n for (ProximityAlert alert : mProximityAlerts.values()) {\n PendingIntent intent = alert.getIntent();\n long expiration = alert.getExpiration();\n if ((expiration == -1) || (now <= expiration)) {\n boolean entered = mProximitiesEntered.contains(alert);\n boolean inProximity = alert.isInProximity(latitude, longitude, accuracy);\n if (!entered && inProximity) {\n if (LOCAL_LOGV) {\n Log.v(TAG, \"String_Node_Str\");\n }\n mProximitiesEntered.add(alert);\n Intent enteredIntent = new Intent();\n enteredIntent.putExtra(LocationManager.KEY_PROXIMITY_ENTERING, true);\n try {\n synchronized (this) {\n intent.send(mContext, 0, enteredIntent, this, mLocationHandler);\n incrementPendingBroadcasts();\n }\n } catch (PendingIntent.CanceledException e) {\n if (LOCAL_LOGV) {\n Log.v(TAG, \"String_Node_Str\" + alert, e);\n }\n if (intentsToRemove == null) {\n intentsToRemove = new ArrayList<PendingIntent>();\n }\n intentsToRemove.add(intent);\n }\n } else if (entered && !inProximity) {\n if (LOCAL_LOGV) {\n Log.v(TAG, \"String_Node_Str\");\n }\n mProximitiesEntered.remove(alert);\n Intent exitedIntent = new Intent();\n exitedIntent.putExtra(LocationManager.KEY_PROXIMITY_ENTERING, false);\n try {\n synchronized (this) {\n intent.send(mContext, 0, exitedIntent, this, mLocationHandler);\n incrementPendingBroadcasts();\n }\n } catch (PendingIntent.CanceledException e) {\n if (LOCAL_LOGV) {\n Log.v(TAG, \"String_Node_Str\" + alert, e);\n }\n if (intentsToRemove == null) {\n intentsToRemove = new ArrayList<PendingIntent>();\n }\n intentsToRemove.add(intent);\n }\n }\n } else {\n if (LOCAL_LOGV) {\n Log.v(TAG, \"String_Node_Str\" + alert);\n }\n if (intentsToRemove == null) {\n intentsToRemove = new ArrayList<PendingIntent>();\n }\n intentsToRemove.add(alert.getIntent());\n }\n }\n if (intentsToRemove != null) {\n for (PendingIntent i : intentsToRemove) {\n ProximityAlert alert = mProximityAlerts.remove(i);\n mProximitiesEntered.remove(alert);\n }\n }\n}\n"
|
"public int compareTo(RGAS4Vector s4v) {\n if (this.ssn > s4v.ssn)\n return AFTER;\n else if (this.ssn < s4v.ssn)\n return BEFORE;\n else {\n if (this.sum > s4v.sum)\n return AFTER;\n else if (this.sum < s4v.sum)\n return BEFORE;\n else {\n if (this.sid > s4v.sid)\n return AFTER;\n else if (this.sid < s4v.sid)\n return BEFORE;\n else\n return EQUAL;\n }\n }\n}\n"
|
"private Consumer<SpecificRecordBase> getLocationRecordConverter() {\n return record -> {\n LocationRecord location = (LocationRecord) record;\n if (location.getDecimalLongitude() == null || location.getDecimalLatitude() == null) {\n this.addJsonObject(\"String_Node_Str\");\n } else {\n addJsonObject(\"String_Node_Str\", JsonFiled.create(\"String_Node_Str\", location.getDecimalLongitude().toString()), JsonFiled.create(\"String_Node_Str\", location.getDecimalLatitude().toString()));\n }\n addCommonFields(record);\n };\n}\n"
|
"public void testDelete() throws PreconditionException {\n String content = \"String_Node_Str\";\n int pos = 3, off = 4;\n replica.applyLocal(SequenceOperation.insert(0, content));\n assertEquals(content, replica.lookup());\n replica.applyLocal(SequenceOperation.delete(pos, off));\n assertEquals(content.substring(0, pos) + content.substring(pos + off), replica.lookup());\n}\n"
|
"void updateConfigSummary(WifiConfiguration wifiConfig) {\n String s = mContext.getString(com.android.internal.R.string.wifi_tether_configure_ssid_default);\n mCheckBox.setSummary(String.format(mContext.getString(R.string.wifi_tether_enabled_subtext), (wifiConfig == null) ? s : AccessPoint.removeDoubleQuotes(wifiConfig.SSID)));\n}\n"
|
"protected ModelAndView doResolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {\n ResponseEntity<ErrorMessage> responseEntity = null;\n LOGGER.error(\"String_Node_Str\", ex);\n if (ex instanceof DecodeException) {\n responseEntity = RestResponseUtil.createResponse400();\n } else if (ex instanceof InvalidMediaTypeException || ex instanceof HttpMediaTypeNotAcceptableException) {\n responseEntity = RestResponseUtil.createResponse415();\n } else {\n responseEntity = RestResponseUtil.createResponse500();\n }\n try {\n FilterHelper.writeResponse(responseEntity, response);\n } catch (IOException e) {\n LOGGER.error(e.getMessage());\n }\n return new ModelAndView();\n}\n"
|
"public List<PropagationTask> getCreateTaskIds(final Long userId, final String password, final List<AttributeTO> vAttrs, final Boolean enable, final String syncResourceName) throws NotFoundException {\n SyncopeUser user = getSyncopeUser(userId);\n if (vAttrs != null && !vAttrs.isEmpty()) {\n userDataBinder.fillVirtual(user, vAttrs, AttributableUtil.USER);\n user = userDAO.save(user);\n }\n final PropagationByResource propByRes = wfResult.getPropByRes();\n if (propByRes == null || propByRes.isEmpty()) {\n return Collections.EMPTY_LIST;\n }\n if (syncResourceName != null) {\n propByRes.get(PropagationOperation.CREATE).remove(syncResourceName);\n }\n return provision(user, password, enable, propByRes);\n}\n"
|
"public void addNode(Long parentId, long id, V value) {\n Node<V> node = new Node<V>().value(value);\n if (parentId == null && rootNode == null) {\n rootNode = node;\n } else {\n idToNode.put(id, node);\n idToParent.put(id, parentId);\n }\n}\n"
|
"private Connection connectToOne(final Collection<InetSocketAddress> socketAddresses) throws Exception {\n final int connectionAttemptLimit = getClientConfig().getConnectionAttemptLimit();\n final ManagerAuthenticator authenticator = new ManagerAuthenticator();\n int attempt = 0;\n Throwable lastError = null;\n while (true) {\n final long nextTry = Clock.currentTimeMillis() + getClientConfig().getConnectionAttemptPeriod();\n for (InetSocketAddress isa : socketAddresses) {\n Address address = new Address(isa);\n try {\n final Connection connection = getConnectionManager().newConnection(address, authenticator, true);\n active = true;\n fireConnectionEvent(false);\n return connection;\n } catch (IOException e) {\n active = false;\n lastError = e;\n logger.finest(\"String_Node_Str\", e);\n } catch (AuthenticationException e) {\n active = false;\n lastError = e;\n logger.warning(\"String_Node_Str\" + address, e);\n }\n }\n if (attempt++ >= connectionAttemptLimit) {\n break;\n }\n final long remainingTime = nextTry - Clock.currentTimeMillis();\n logger.warning(String.format(\"String_Node_Str\" + \"String_Node_Str\", Math.max(0, remainingTime), attempt, connectionAttemptLimit));\n if (remainingTime > 0) {\n try {\n Thread.sleep(remainingTime);\n } catch (InterruptedException e) {\n break;\n }\n }\n }\n throw new IllegalStateException(\"String_Node_Str\", lastError);\n}\n"
|
"public void setProperty(String name, String value) throws OdaException {\n if (name == null)\n throw new NullPointerException(\"String_Node_Str\");\n if (name.equals(\"String_Node_Str\")) {\n if (value != null && value.length() > 0) {\n try {\n double secs = Double.parseDouble(value);\n this.preStat.setQueryTimeout((int) secs);\n } catch (SQLException e) {\n logger.log(Level.FINE, \"String_Node_Str\", e);\n }\n }\n } else if (name.equals(\"String_Node_Str\")) {\n if (value != null && value.length() > 0) {\n try {\n double rows = Double.parseDouble(value);\n this.preStat.setFetchSize((int) rows);\n } catch (SQLException e) {\n logger.log(Level.FINE, \"String_Node_Str\", e);\n }\n }\n } else if (name.equals(ConnectionProfileProperty.PROFILE_NAME_PROP_KEY) || name.equals(ConnectionProfileProperty.PROFILE_STORE_FILE_PROP_KEY) || name.equals(ConnectionProfileProperty.PROFILE_STORE_FILE_PATH_PROP_KEY)) {\n } else {\n OdaException e = new OdaException(\"String_Node_Str\" + name);\n logger.logp(java.util.logging.Level.WARNING, Statement.class.getName(), \"String_Node_Str\", \"String_Node_Str\", e);\n }\n}\n"
|
"public void testGetRefreshedDataProviderForDB2() throws SQLException {\n DatabaseConnection dbProvider = ConnectionFactory.eINSTANCE.createDatabaseConnection();\n setJDBDB2Connection(dbProvider);\n List<Catalog> catalogPackageFilter = new ArrayList<Catalog>();\n List<orgomg.cwm.objectmodel.core.Package> schemaPackageFilter = new ArrayList<orgomg.cwm.objectmodel.core.Package>();\n DatabaseMetaData mockDatabaseMetaData = Mockito.mock(DatabaseMetaData.class);\n Mockito.when(mockDatabaseMetaData.supportsCatalogsInIndexDefinitions()).thenReturn(true);\n Mockito.when(mockDatabaseMetaData.supportsSchemasInIndexDefinitions()).thenReturn(true);\n TypedReturnCode<java.sql.Connection> returnCode = new TypedReturnCode<java.sql.Connection>(true);\n java.sql.Connection mockSqlConn = Mockito.mock(java.sql.Connection.class);\n Mockito.when(mockSqlConn.getMetaData()).thenReturn(mockDatabaseMetaData);\n returnCode.setObject(mockSqlConn);\n List<String> schenaNames = new ArrayList<String>();\n List<String> packageFilter = MetadataConnectionUtils.getPackageFilter(dbProvider, mockDatabaseMetaData, false);\n boolean haveFilter = false;\n if (packageFilter.size() > 0) {\n schenaNames.addAll(packageFilter);\n haveFilter = true;\n } else {\n schenaNames.add(\"String_Node_Str\");\n schenaNames.add(\"String_Node_Str\");\n schenaNames.add(\"String_Node_Str\");\n }\n ResultSet mockSchemaResults = Mockito.mock(ResultSet.class);\n if (haveFilter) {\n Mockito.when(mockSchemaResults.next()).thenReturn(true, false);\n } else {\n Mockito.when(mockSchemaResults.next()).thenReturn(true, true, true, false);\n }\n Mockito.when(mockSchemaResults.getString(MetaDataConstants.TABLE_SCHEM.name())).thenReturn(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n ResultSet mockCatalogResults = Mockito.mock(ResultSet.class);\n Mockito.when(mockCatalogResults.next()).thenReturn(false);\n Mockito.when(mockDatabaseMetaData.getCatalogs()).thenReturn(mockCatalogResults);\n Mockito.when(mockDatabaseMetaData.getDriverName()).thenReturn(\"String_Node_Str\");\n Mockito.when(mockDatabaseMetaData.getSchemas()).thenReturn(mockSchemaResults);\n CoreRuntimePlugin instanceMock = Mockito.mock(CoreRuntimePlugin.class);\n PowerMockito.mockStatic(CoreRuntimePlugin.class);\n Mockito.when(CoreRuntimePlugin.getInstance()).thenReturn(instanceMock);\n Mockito.when(instanceMock.getRepositoryService()).thenReturn(null);\n PowerMockito.mockStatic(ExtractMetaDataUtils.class);\n ExtractMetaDataUtils extract = Mockito.mock(ExtractMetaDataUtils.class);\n Mockito.when(ExtractMetaDataUtils.getInstance()).thenReturn(extract);\n Mockito.when(extract.getConnectionMetadata(mockSqlConn)).thenReturn(mockDatabaseMetaData);\n Mockito.when(extract.createDB2ForZosFakeDatabaseMetaData(mockSqlConn)).thenReturn(mockDatabaseMetaData);\n Mockito.when(extract.getDatabaseMetaData(mockSqlConn, dbProvider)).thenCallRealMethod();\n Mockito.when(extract.getDatabaseMetaData(mockSqlConn, dbProvider, false)).thenCallRealMethod();\n Mockito.when(extract.getDatabaseMetaData(mockSqlConn, EDatabaseTypeName.IBMDB2.getXmlName(), false, \"String_Node_Str\")).thenCallRealMethod();\n PowerMockito.mockStatic(ConnectionHelper.class);\n Set<MetadataTable> result = new HashSet<MetadataTable>();\n Mockito.when(ConnectionHelper.getTables(dbProvider)).thenReturn(result);\n Mockito.when(ConnectionHelper.addCatalogs((Collection<Catalog>) Mockito.any(), (Connection) Mockito.any())).thenCallRealMethod();\n Mockito.when(ConnectionHelper.addPackages((Collection<Catalog>) Mockito.any(), (Connection) Mockito.any())).thenCallRealMethod();\n Mockito.when(ConnectionHelper.addSchemas((Collection<Schema>) Mockito.any(), (Connection) Mockito.any())).thenCallRealMethod();\n Mockito.when(ConnectionHelper.addPackages((Collection<Schema>) Mockito.any(), (Connection) Mockito.any())).thenCallRealMethod();\n MetadataFillFactory mockMetadataFillFactory = Mockito.mock(MetadataFillFactory.class);\n PowerMockito.mockStatic(MetadataFillFactory.class);\n Mockito.when(MetadataFillFactory.getDBInstance(EDatabaseTypeName.IBMDB2)).thenReturn(mockMetadataFillFactory);\n Mockito.when(mockMetadataFillFactory.createConnection((IMetadataConnection) Mockito.any())).thenReturn(returnCode);\n Mockito.when(mockMetadataFillFactory.fillUIConnParams((IMetadataConnection) Mockito.any(), (Connection) Mockito.isNull())).thenReturn(dbProvider);\n Mockito.when(mockMetadataFillFactory.fillCatalogs((Connection) Mockito.any(), (DatabaseMetaData) Mockito.any(), Mockito.anyList())).thenReturn(null);\n Mockito.when(mockMetadataFillFactory.fillSchemas((Connection) Mockito.any(), (DatabaseMetaData) Mockito.any(), Mockito.anyList())).thenReturn(null);\n List<Schema> schemaList = new ArrayList<Schema>();\n Mockito.when(mockMetadataFillFactory.fillSchemaToCatalog((Connection) Mockito.any(), (DatabaseMetaData) Mockito.any(), (Catalog) Mockito.any(), (List<String>) Mockito.any())).thenReturn(schemaList);\n TypedReturnCode<Connection> refreshedDataProvider = DQStructureComparer.getRefreshedDataProvider(dbProvider);\n Assert.assertEquals(true, refreshedDataProvider.isOk());\n Assert.assertNotNull(refreshedDataProvider.getObject());\n}\n"
|
"private StatelessSession getStatelessSession() {\n return s != null ? s : sf.openStatelessSession();\n}\n"
|
"public void test() {\n MapperFactory mapperFactory = new MapperFactory();\n mapperFactory.setHttpHosts(\"String_Node_Str\");\n mapperFactory.addResource(\"String_Node_Str\");\n DemoDao demoDao = mapperFactory.getMapper(DemoDao.class);\n Demo demo = new Demo();\n demo.setId(3L);\n demo.setCheckType(0);\n demo.setCheckId(1L);\n demo.setDataDt(\"String_Node_Str\");\n demo.setCreatedAt(LocalDate.now().toString());\n demo.setUpdatedAt(LocalDate.now().toString());\n String json = \"String_Node_Str\";\n demo.setCheckValueJson(json);\n demoDao.index(demo);\n}\n"
|
"public static PossibleSymbolTypes determine_possible_symbol_types_for_string(String s) {\n PossibleSymbolTypes p = new PossibleSymbolTypes();\n if (s.length() == 0) {\n return p;\n }\n if (Lexer.number_starters[s.charAt(0)]) {\n int ch = 0;\n if ((s.charAt(ch) == '+') || (s.charAt(ch) == '-'))\n ch++;\n while (ch < s.length() && Character.isDigit(s.charAt(ch))) ch++;\n if (ch == s.length() && Character.isDigit(s.charAt(ch - 1)))\n p.possible_ic = true;\n if (ch < s.length() && s.charAt(ch) == '.') {\n ch++;\n while (ch < s.length() && Character.isDigit(s.charAt(ch))) ch++;\n if (ch < s.length() && (s.charAt(ch) == 'e' || s.charAt(ch) == 'E')) {\n ch++;\n if (ch < s.length() && (s.charAt(ch) == '+' || s.charAt(ch) == '-'))\n ch++;\n while (ch < s.length() && Character.isDigit(s.charAt(ch))) ch++;\n }\n if (ch == s.length())\n p.possible_fc = true;\n }\n }\n for (int i = 0; i < s.length(); ++i) {\n final char c = s.charAt(i);\n if (!isConstituentChar(c)) {\n return p;\n }\n }\n boolean rereadability_questionable = false;\n boolean rereadability_dead = false;\n for (int i = 0; i < s.length(); i++) {\n char ch = s.charAt(i);\n if (Character.isLowerCase(ch) || Character.isDigit(ch))\n continue;\n if (Character.isUpperCase(ch)) {\n rereadability_dead = true;\n break;\n }\n rereadability_questionable = true;\n }\n if (!rereadability_dead) {\n if ((!rereadability_questionable) || (s.length() >= LENGTH_OF_LONGEST_SPECIAL_LEXEME) || ((s.length() == 1) && (s.charAt(0) == '*')))\n p.rereadable = true;\n }\n p.possible_sc = true;\n if ((s.charAt(0) == '<') && (s.charAt(s.length() - 1) == '>')) {\n p.possible_var = true;\n }\n if (Character.isLetter(s.charAt(0))) {\n int i = 1;\n while (i < s.length() && Character.isDigit(s.charAt(i))) {\n ++i;\n }\n p.possible_id = i == s.length();\n }\n return p;\n}\n"
|
"private static boolean checkReadSms(Activity activity) throws Exception {\n Cursor cursor = activity.getContentResolver().query(Uri.parse(\"String_Node_Str\"), null, null, null, null);\n if (cursor != null) {\n if (PermissionsPageManager.isForceManufacturer()) {\n if (isNumberIndexInfoIsNull(cursor, cursor.getColumnIndex(Telephony.Sms.DATE))) {\n cursor.close();\n return false;\n }\n }\n cursor.close();\n return true;\n } else {\n return false;\n }\n}\n"
|
"private static void desktopDestroyed(Desktop desktop) {\n final Session sess = desktop.getSession();\n final Execution exec = new ExecutionImpl(desktop.getWebApp().getServletContext(), null, null, desktop, null);\n final DesktopCtrl desktopCtrl = (DesktopCtrl) desktop;\n final Execution oldExec = desktop.getExecution();\n final Visualizer oldVi = desktopCtrl.getVisualizer();\n try {\n ExecutionsCtrl.setCurrent(exec);\n final UiVisualizer uv = new UiVisualizer(exec, true, false);\n desktopCtrl.setVisualizer(uv);\n desktopCtrl.setExecution(exec);\n final WebApp wapp = desktop.getWebApp();\n ((DesktopCtrl) desktop).invokeDesktopCleanups();\n final Configuration config = wapp.getConfiguration();\n config.invokeDesktopCleanups(desktop);\n ((WebAppCtrl) wapp).getUiEngine().desktopDestroyed(desktop);\n final Monitor monitor = desktop.getWebApp().getConfiguration().getMonitor();\n if (monitor != null) {\n try {\n monitor.desktopDestroyed(desktop);\n } catch (Throwable ex) {\n log.error(\"String_Node_Str\", ex);\n }\n }\n final DesktopRecycle dtrc = config.getDesktopRecycle();\n if (dtrc != null) {\n try {\n dtrc.afterRemove(sess, desktop);\n } catch (Throwable ex) {\n log.error(\"String_Node_Str\", ex);\n }\n }\n } finally {\n ExecutionsCtrl.setCurrent(null);\n desktopCtrl.setVisualizer(oldVi);\n desktopCtrl.setExecution(oldExce);\n }\n}\n"
|
"private List<Tank> getTanks() {\n List<Tank> tanks = new ArrayList<>();\n BlockPos currentPos = pos;\n while (true) {\n TileTank tankUp = getTank(currentPos);\n if (tankUp != null) {\n tanks.add(tankUp);\n } else {\n break;\n }\n currentPos = currentPos.up();\n }\n currentPos = pos.down();\n while (true) {\n Tank tankBelow = getTank(currentPos);\n if (tankBelow != null) {\n tanks.add(0, tankBelow);\n } else {\n break;\n }\n currentPos = currentPos.down();\n }\n return tanks;\n}\n"
|
"public boolean apply(Game game, Ability source) {\n Permanent permanent = (Permanent) source.getSourceObject(game);\n if (permanent != null) {\n Permanent attach = game.getPermanent(permanent.getAttachedTo());\n if (attach != null) {\n attach.tap(game);\n return true;\n }\n }\n return false;\n}\n"
|
"private Map<Color4f, List<String>> getCnColorMap() {\n QuatSymmetrySubunits subunits = rotationAxisAligner.getSubunits();\n List<Integer> modelNumbers = subunits.getModelNumbers();\n List<String> chainIds = subunits.getChainIds();\n List<List<Integer>> orbits = rotationAxisAligner.getOrbits();\n int fold = rotationGroup.getRotation(0).getFold();\n Map<Color4f, List<String>> colorMap = new HashMap<Color4f, List<String>>();\n Color4f[] colors = getSymmetryColors(fold);\n for (List<Integer> orbit : orbits) {\n for (int i = 0; i < fold; i++) {\n int subunit = orbit.get(i);\n String id = null;\n id = getChainSpecification(modelNumbers, chainIds, subunit);\n Color4f c = colors[i];\n List<String> ids = colorMap.get(c);\n if (ids == null) {\n ids = new ArrayList<String>();\n colorMap.put(c, ids);\n }\n ids.add(id);\n }\n }\n return colorMap;\n}\n"
|
"public void setMaxEntries(int maxEntries) {\n if (maxEntries <= 0) {\n throw new IllegalArgumentException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n this.maxEntries = maxEntries;\n Preferences prefs = Preferences.userNodeForPackage(LogViewerFrame.class);\n prefs.putInt(\"String_Node_Str\", maxEntries);\n processRecords();\n}\n"
|
"private void checkPropCreation(NodeTraversal t, Node lvalue) {\n if (lvalue.isGetProp()) {\n Node obj = lvalue.getFirstChild();\n Node prop = lvalue.getLastChild();\n JSType objType = getJSType(obj);\n String pname = prop.getString();\n if (!objType.isStruct() || objType.hasProperty(pname)) {\n return;\n }\n Scope s = t.getScope();\n if (obj.isThis() && getJSType(s.getRootNode()).isConstructor()) {\n return;\n }\n Node assgnExp = lvalue.getParent();\n Node assgnStm = assgnExp.getParent();\n if (objType instanceof ObjectType && s.isGlobal() && NodeUtil.isPrototypePropertyDeclaration(assgnStm)) {\n ObjectType instance = objType.toObjectType().getOwnerFunction().getInstanceType();\n String file = lvalue.getSourceFileName();\n Node ctor = instance.getConstructor().getSource();\n if (ctor != null && ctor.getSourceFileName().equals(file)) {\n return;\n }\n }\n report(t, prop, ILLEGAL_PROPERTY_CREATION);\n }\n}\n"
|
"public static int bufferSize(Config cfg) {\n return cfg.getIntegerValue(BUFFER_SIZE, 2048000);\n}\n"
|
"static JMethodCall makeStaticCall(JMethodCall x, JMethod newMethod) {\n JMethodCall newCall = new JMethodCall(x.getSourceInfo().makeChild(MakeCallsStatic.class, \"String_Node_Str\"), null, newMethod);\n if (x.getInstance() instanceof JMultiExpression) {\n JMultiExpression multi = (JMultiExpression) x.getInstance();\n int lastIndex = multi.exprs.size() - 1;\n newCall.addArg(multi.exprs.get(lastIndex));\n newCall.addArgs(x.getArgs());\n multi.exprs.set(lastIndex, newCall);\n return multi;\n } else {\n newCall.addArg(x.getInstance());\n newCall.addArgs(x.getArgs());\n return newCall;\n }\n}\n"
|
"protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n bindTexture(texture());\n drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, tileGuiYSize);\n if (drawPlayerInv) {\n bindTexture(PLAYER_INV_TEXTURE);\n drawTexturedModalRect(guiLeft, guiTop + ySize, 0, 0, xSizePlayerInv, ySizePlayerInv);\n }\n bindTexture(texture());\n drawBackgroundPreWidgets(f, x, y);\n if (shouldDrawWidgets)\n drawWidgets(x, y);\n bindTexture(texture());\n drawBackgroundPostWidgets(f, x, y);\n}\n"
|
"protected SetSourceNatCommand generateSetSourceNatCommand() {\n IpAddressTO ip = new IpAddressTO(1, \"String_Node_Str\", true, true, true, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", 1000, false);\n SetSourceNatCommand cmd = new SetSourceNatCommand(ip, true);\n cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME, ROUTERNAME);\n return cmd;\n}\n"
|
"private void refreshJobletConnections() {\n Iterator<IConnection> inIterator = inputs.iterator();\n while (inIterator.hasNext()) {\n IConnection conn = inIterator.next();\n if (isCollapsed()) {\n ((Connection) conn).reconnect(conn.getSource(), this.node, conn.getLineStyle());\n IConnection[] jobletConns = this.node.getComponent().getProcess().getAllConnections(null);\n if (jobletConns != null) {\n for (IConnection jobletConn : jobletConns) {\n this.node.getProcess().removeUniqueConnectionName(jobletConn.getUniqueName());\n }\n }\n } else {\n for (NodeContainer nodeContainer : this.nodeContainers) {\n Node connNode = nodeContainer.getNode();\n IElementParameter elePa = this.node.getElementParameter(connNode.getJoblet_unique_name());\n if (elePa != null) {\n IJobletProviderService service = (IJobletProviderService) GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);\n IElementParameter elechild = null;\n String uniqueName = null;\n boolean isTri = service.isTriggerNode(connNode);\n if (service != null && isTri) {\n elechild = elePa.getChildParameters().get(\"String_Node_Str\");\n uniqueName = conn.getMetaName();\n } else {\n elechild = elePa.getChildParameters().get(\"String_Node_Str\");\n uniqueName = conn.getUniqueName();\n }\n if (elechild != null && elechild.getValue().equals(uniqueName)) {\n List<? extends INodeConnector> connList = new JobletUtil().createConnectors(connNode, this.getProcess());\n List<INodeConnector> inodeConnList = new ArrayList<INodeConnector>();\n inodeConnList.addAll(connList);\n inodeConnList.addAll(connNode.getListConnector());\n connNode.setListConnector(inodeConnList);\n IMetadataTable iTable = this.node.getMetadataTable(connNode.getUniqueName());\n if (iTable != null && !connNode.getMetadataList().contains(iTable)) {\n }\n JobletConnectionReconnectCommand reConnectCommand = new JobletConnectionReconnectCommand(conn);\n reConnectCommand.setNewTarget(connNode);\n reConnectCommand.execute();\n break;\n } else if (getFlowInput(inputs).size() == 1 && !isTri && new JobletUtil().isJobletInput(connNode, this.getProcess())) {\n JobletConnectionReconnectCommand reConnectCommand = new JobletConnectionReconnectCommand(conn);\n reConnectCommand.setNewTarget(connNode);\n reConnectCommand.execute();\n break;\n }\n }\n }\n }\n }\n Iterator<IConnection> outIterator = outputs.iterator();\n while (outIterator.hasNext()) {\n IConnection conn = outIterator.next();\n if (isCollapsed()) {\n ((Connection) conn).reconnect(this.node, conn.getTarget(), conn.getLineStyle());\n } else {\n for (NodeContainer nodeContainer : this.nodeContainers) {\n Node connNode = nodeContainer.getNode();\n if (conn.getConnectorName().equals(connNode.getJoblet_unique_name())) {\n List<? extends INodeConnector> connList = new JobletUtil().createConnectors(connNode, this.getProcess());\n List<INodeConnector> inodeConnList = new ArrayList<INodeConnector>();\n inodeConnList.addAll(connList);\n inodeConnList.addAll(connNode.getListConnector());\n connNode.setListConnector(inodeConnList);\n IMetadataTable iTable = this.node.getMetadataTable(connNode.getUniqueName());\n if (iTable != null && !connNode.getMetadataList().contains(iTable)) {\n }\n JobletConnectionReconnectCommand reConnectCommand = new JobletConnectionReconnectCommand(conn);\n reConnectCommand.setNewSource(connNode);\n reConnectCommand.execute();\n }\n }\n }\n }\n if (!isCollapsed()) {\n for (NodeContainer nodeContainer : this.nodeContainers) {\n Node connNode = nodeContainer.getNode();\n IProcess jobletProcess = this.getNode().getComponent().getProcess();\n List<? extends INode> jobletNodes = jobletProcess.getGraphicalNodes();\n for (INode n : jobletNodes) {\n if (connNode.getJoblet_unique_name().equals(n.getUniqueName())) {\n connNode.setDummy(n.isDummy());\n }\n }\n }\n }\n}\n"
|
"public String getClientInfo(String theName) throws SQLException {\n return myWrap.getClientInfo(theName);\n}\n"
|
"public AbstractNodeType getNodeType() {\n if (this.nodeTypeImpl.getNodeType() == null) {\n NodeTypeImplementationImpl.LOG.error(\"String_Node_Str\", \"String_Node_Str\" + this.getTargetNamespace() + \"String_Node_Str\" + this.getName());\n }\n for (AbstractNodeType nodeType : this.definitions.getAllNodeTypes()) {\n if (nodeType.getId().equals(this.nodeTypeImpl.getNodeType())) {\n return nodeType;\n }\n }\n return null;\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.