content stringlengths 40 137k |
|---|
"public static boolean isLowerCase(String in) {\n if (in == null || in.length() == 0)\n return false;\n for (int i = 0; i < in.length(); i++) {\n if (!Character.isLowerCase(in.charAt(i)))\n return false;\n }\n return true;\n}\n"
|
"public void activate() {\n m_iStatus = Goal.curStatus.active;\n switch(m_Edge.flags()) {\n case NavGraphEdge.SWIM:\n {\n getM_pOwner().SetMaxSpeed(script.GetDouble(\"String_Node_Str\"));\n }\n break;\n case crawl:\n {\n getM_pOwner().SetMaxSpeed(script.GetDouble(\"String_Node_Str\"));\n }\n break;\n }\n m_dStartTime = Clock.GetCurrentTime();\n m_dTimeExpected = getM_pOwner().calculateTimeToReachPosition(m_Edge.destination());\n double MarginOfError = 2.0;\n m_dTimeExpected += MarginOfError;\n getM_pOwner().getSteering().SetTarget(m_Edge.destination());\n if (m_bLastEdgeInPath) {\n getM_pOwner().getSteering().ArriveOn();\n } else {\n getM_pOwner().getSteering().SeekOn();\n }\n}\n"
|
"public Mono<ListRouteMappingsResponse> retrieveRouteMapping(String appId) {\n RouteMappingEntity entity = null;\n if (appId.startsWith(APP_UUID_PREFIX)) {\n String appNumber = appId.substring(APP_UUID_PREFIX.length());\n entity = RouteMappingEntity.builder().applicationId(appId).routeId(APP_ROUTE_UUID_PREFIX + appNumber).build();\n }\n if (entity == null) {\n log.error(\"String_Node_Str\");\n return null;\n }\n RouteMappingResource rmr = null;\n rmr = RouteMappingResource.builder().entity(entity).build();\n List<RouteMappingResource> list = new LinkedList<>();\n list.add(rmr);\n ListRouteMappingsResponse resp = ListRouteMappingsResponse.builder().addAllResources(list).build();\n return Mono.just(resp).delayElement(this.getSleepRandomDuration());\n}\n"
|
"public Conditional<Integer> apply(FeatureExpr ctx, Integer y) {\n FeatureExpr context = Conditional.and(bufferCTX, ctx);\n if (Conditional.isContradiction(context)) {\n return One.valueOf(y);\n }\n return Entry.create(x.intValue(), entry.isRef);\n}\n"
|
"protected void calcMinMax(boolean fixedValues) {\n super.calcMinMax(fixedValues);\n float space = mDeltaY / 100f * 10f;\n if (mStartAtZero) {\n mYChartMin = 0;\n } else {\n float spaceBottom = (mData.getYMax() - mYChartMin) / 100f * 10f;\n mYChartMin = mYChartMin - spaceBottom;\n }\n mDeltaY = (mData.getYMax() + spaceTop) - mYChartMin;\n mYChartMax = mYChartMin + mDeltaY;\n Log.i(LOG_TAG, \"String_Node_Str\" + mDeltaX + \"String_Node_Str\" + mDeltaY);\n}\n"
|
"public void modify(Object element, String property, Object value) {\n if (element instanceof Item) {\n element = ((Item) element).getData();\n }\n try {\n if (COLUMN_NAME.equals(property)) {\n String newName = UIUtil.convertToModelString((String) value, false);\n if (element == dummyChoice) {\n if (newName == null) {\n return;\n }\n } else {\n ComputedColumnHandle columnHandle = (ComputedColumnHandle) element;\n boolean selectedNameChanged = false;\n if (columnHandle.getName().equals(selectedColumnName)) {\n selectedNameChanged = true;\n }\n if (highLightName != null && highLightName.equals(((ComputedColumnHandle) element).getName()) && !highLightName.equals(newName)) {\n bindingTable.getTable().getItem(bindingTable.getTable().getSelectionIndex()).setForeground(1, Display.getDefault().getSystemColor(SWT.COLOR_LIST_FOREGROUND));\n }\n ((ComputedColumnHandle) element).setName(newName);\n if (selectedNameChanged) {\n selectedColumnName = newName;\n }\n }\n } else {\n ComputedColumnHandle bindingHandle = ((ComputedColumnHandle) element);\n if (COLUMN_DATATYPE.equals(property)) {\n bindingHandle.setDataType(dataTypes[((Integer) value).intValue()].getName());\n } else if (COLUMN_EXPRESSION.equals(property)) {\n if (!(bindingHandle.getExpression() != null && bindingHandle.getExpression().equals((String) value))) {\n bindingHandle.setExpression((String) value);\n String groupType = DEUtil.getGroupControlType(inputElement);\n if (ExpressionUtil.hasAggregation(bindingHandle.getExpression())) {\n if (groupType.equals(DEUtil.TYPE_GROUP_GROUP))\n bindingHandle.setAggregrateOn(((GroupHandle) DEUtil.getGroups(inputElement).get(0)).getName());\n else if (groupType.equals(DEUtil.TYPE_GROUP_LISTING))\n bindingHandle.setAggregrateOn(null);\n }\n if (!ExpressionUtil.hasAggregation(bindingHandle.getExpression()) || groupType.equals(DEUtil.TYPE_GROUP_NONE)) {\n bindingHandle.setAggregrateOn(null);\n }\n if (!ExpressionUtil.hasAggregation(bindingHandle.getExpression()) || groupType.equals(DEUtil.TYPE_GROUP_NONE)) {\n bindingHandle.setAggregrateOn(null);\n }\n } else if (COLUMN_AGGREGATEON.equals(property)) {\n if (((Integer) value).intValue() == 0)\n bindingHandle.setAggregrateOn(null);\n else\n bindingHandle.setAggregrateOn(groups[((Integer) value).intValue()]);\n }\n }\n } catch (SemanticException e) {\n ExceptionHandler.handle(e);\n }\n refreshBindingTable();\n}\n"
|
"public void execute() {\n SearchReplaceUI ui = Lookup.getDefault().lookup(SearchReplaceUI.class);\n if (Lookup.getDefault().lookup(DataTablesController.class).isNodeTableMode()) {\n ui.setMode(SearchReplaceUI.Mode.NODES_TABLE);\n } else {\n ui.setMode(SearchReplaceUI.Mode.EDGES_TABLE);\n }\n DialogDescriptor dd = new DialogDescriptor(ui, getName());\n dd.setModal(true);\n dd.setOptions(new Object[] { NbBundle.getMessage(SearchReplace.class, \"String_Node_Str\") });\n DialogDisplayer.getDefault().notify(dd);\n}\n"
|
"public Piece classicPromotion(Piece p, boolean verified, String promo) {\n if (p.getPromotesTo() == null || p.getPromotesTo().size() == 0)\n return p;\n if (!verified) {\n lastPromoted = p.getName();\n klazz = p.getName();\n }\n if (verified && promo != null && !promo.equals(p.getName())) {\n System.out.println(\"String_Node_Str\" + promo + \"String_Node_Str\" + p.getName());\n try {\n Piece promoted = PieceBuilder.makePiece(promo, p.isBlack(), p.getSquare(), p.getBoard());\n if (promoted.isBlack()) {\n g.getBlackTeam().set(g.getBlackTeam().indexOf(p), promoted);\n } else {\n g.getWhiteTeam().set(g.getWhiteTeam().indexOf(p), promoted);\n }\n promoted.getLegalDests().clear();\n promoted.setMoveCount(p.getMoveCount());\n return promoted;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n System.out.println(\"String_Node_Str\" + klazz);\n if (!verified && (p.getPromotesTo() == null || p.getPromotesTo().size() == 0))\n return p;\n if (!verified && promo == null && g.isBlackMove() == p.isBlack()) {\n klazz = \"String_Node_Str\";\n if (p.getPromotesTo().size() == 1)\n klazz = p.getPromotesTo().get(0);\n while (klazz.equals(\"String_Node_Str\")) {\n System.out.println(promo == null);\n String result = (String) JOptionPane.showInputDialog(null, \"String_Node_Str\", \"String_Node_Str\", JOptionPane.PLAIN_MESSAGE, null, p.getPromotesTo().toArray(), null);\n if (result == null) {\n continue;\n }\n klazz = result;\n promo = result;\n }\n } else if (promo != null && p.getPromotesTo().contains(promo)) {\n klazz = promo;\n }\n try {\n Piece promoted = PieceBuilder.makePiece(klazz, p.isBlack(), p.getSquare(), p.getBoard());\n if (promoted.isBlack()) {\n g.getBlackTeam().set(g.getBlackTeam().indexOf(p), promoted);\n } else {\n g.getWhiteTeam().set(g.getWhiteTeam().indexOf(p), promoted);\n }\n promoted.getLegalDests().clear();\n promoted.setMoveCount(p.getMoveCount());\n return promoted;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n}\n"
|
"private long getNbPDU(StreamDirection streamDirection) {\n StreamRTPManager rtpManager = mediaStreamImpl.queryRTPManager();\n long nbPDU = 0;\n StatisticsEngine statisticsEngine = mediaStreamImpl.getStatisticsEngine();\n if (statisticsEngine != null) {\n switch(streamDirection) {\n case UPLOAD:\n nbPDU = rtpManager.getGlobalTransmissionStats().getRTPSent();\n break;\n case DOWNLOAD:\n GlobalReceptionStats globalReceptionStats = rtpManager.getGlobalReceptionStats();\n nbPDU = globalReceptionStats.getPacketsRecd() - globalReceptionStats.getRTCPRecd();\n break;\n }\n }\n return nbPDU;\n}\n"
|
"protected void writeToSourceFile(String pkg, String filename, String content, Element... originatingElements) {\n Writer writer = null;\n try {\n String name = !pkg.isEmpty() ? pkg + \"String_Node_Str\" + filename : filename;\n logger.info(\"String_Node_Str\" + name);\n FileObject fileRes = filer.createSourceFile(name, originatingElements);\n writer = fileRes.openWriter();\n writer.write(content);\n } catch (IOException e) {\n logger.error(\"String_Node_Str\" + filename);\n throw new RuntimeException(\"String_Node_Str\" + filename, e);\n } finally {\n if (writer != null) {\n try {\n writer.close();\n } catch (IOException e) {\n logger.error(\"String_Node_Str\" + filename);\n throw new RuntimeException(\"String_Node_Str\" + filename, e);\n }\n }\n }\n}\n"
|
"private void throwIfInvalidConfigMakesClusterUnusable() throws ClusterConfigurationError {\n try {\n Logger.trace(\"String_Node_Str\");\n final List<Node> nodes = seqAsJavaList(kafkaAdminClient.findAllBrokers());\n final List<String> advertisedListeners = new ArrayList<>();\n for (Node node : nodes) {\n final String host1 = node.host();\n final int port = node.port();\n final String advertisedListener = String.format(\"String_Node_Str\", host1, port);\n Logger.debug(\"String_Node_Str\" + advertisedListener);\n advertisedListeners.add(advertisedListener);\n Logger.trace(String.format(\"String_Node_Str\", host1));\n if (HostnameUtils.isHostnameReachable(host1, ApplicationConstants.HOSTNAME_REACHABLE_TIMEOUT_MS)) {\n Logger.trace(\"String_Node_Str\");\n return;\n }\n Logger.trace(\"String_Node_Str\");\n }\n final String msg = String.format(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", advertisedListeners, APPLICATION_NAME);\n throw new ClusterConfigurationError(msg);\n } catch (RuntimeException e) {\n Logger.trace(e);\n e.printStackTrace();\n }\n}\n"
|
"public void execute() {\n SwingUtil.invokeLater(new Runnable() {\n\n public void run() {\n Point location = MouseInfo.getPointerInfo().getLocation();\n Point locationOnScreen = getLocationOnScreen();\n Dimension size = getSize();\n if (location.x >= locationOnScreen.x && location.x < locationOnScreen.x + size.width && location.y >= locationOnScreen.y && location.y < locationOnScreen.y + size.height) {\n SystemTrayMenuPopup.this.timer.delay(SystemTrayMenuPopup.this.timer.getDelay());\n } else {\n setVisible(false);\n }\n }\n });\n}\n"
|
"public int handle(CommandCaller caller, String input) {\n String[] parts = input.split(\"String_Node_Str\");\n String[] args;\n String command = parts[0].toLowerCase();\n if (parts.length == 1) {\n args = new String[0];\n } else {\n args = new String[parts.length - 1];\n System.arraycopy(parts, 1, args, 0, args.length);\n }\n Command cmd = null;\n cmd = this.commands.get(command);\n if (cmd == null) {\n caller.message(C.NOT_VALID_SUBCOMMAND);\n {\n final String[] commands = new String[this.commands.size()];\n for (int i = 0; i < commands.length; i++) {\n commands[i] = this.commands.get(i).getCommand();\n }\n final String bestMatch = new StringComparison<String>(args[0], commands).getBestMatch();\n caller.message(C.DID_YOU_MEAN, \"String_Node_Str\" + bestMatch);\n }\n return CommandHandlingOutput.NOT_FOUND;\n }\n if (!cmd.getRequiredType().isInstance(caller.getSuperCaller())) {\n if (caller instanceof PlotPlayerCaller) {\n caller.message(C.NOT_CONSOLE);\n } else {\n caller.message(C.IS_CONSOLE);\n return CommandHandlingOutput.CALLER_OF_WRONG_TYPE;\n }\n }\n if (!caller.hasPermission(cmd.getPermission())) {\n caller.message(C.NO_PERMISSION, cmd.getPermission());\n return CommandHandlingOutput.NOT_PERMITTED;\n }\n Argument[] requiredArguments = cmd.getRequiredArguments();\n if (requiredArguments != null && requiredArguments.length > 0) {\n boolean success = true;\n if (args.length < requiredArguments.length) {\n success = false;\n } else {\n for (int i = 0; i < requiredArguments.length; i++) {\n if (requiredArguments[i].parse(args[i]) == null) {\n success = false;\n break;\n }\n }\n }\n if (!success) {\n caller.sendRequiredArgumentsList(this, cmd, requiredArguments);\n return CommandHandlingOutput.WRONG_USAGE;\n }\n }\n try {\n boolean a = cmd.onCommand(caller, args);\n if (!a) {\n String usage = cmd.getUsage();\n if (usage != null && !usage.isEmpty()) {\n caller.message(usage);\n }\n return CommandHandlingOutput.WRONG_USAGE;\n }\n } catch (final Throwable t) {\n t.printStackTrace();\n return CommandHandlingOutput.ERROR;\n }\n return CommandHandlingOutput.SUCCESS;\n}\n"
|
"public void test() throws InterruptedException {\n YamlLogging.setAll(false);\n char[] chars = new char[(1 << 20) * 2];\n Arrays.fill(chars, 'X');\n String data = new String(chars);\n final ConcurrentMap<String, String> map;\n final String type = System.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n if (\"String_Node_Str\".equals(type)) {\n map = tree1.acquireMap(NAME, String.class, String.class);\n } else {\n map = tree2.acquireMap(NAME, String.class, String.class);\n }\n for (int i = 0; i < 50; i++) {\n map.put(\"String_Node_Str\" + i, data);\n }\n for (; ; ) {\n Thread.sleep(5000);\n }\n}\n"
|
"public List<String> getTheme() {\n List<String> themes = new ArrayList<String>();\n if (this.themes != null) {\n themes.addAll(pathsList(files(this.themes, getResourcesTargetDirectories())));\n }\n themes.addAll(PathUtil.pathsList(MavenUtils.getFiles(getDependencies(anyOf(type(SWC), type(CSS)), scope(THEME)))));\n return themes;\n}\n"
|
"public void updateConnection() {\n ConnectionHelper.getTables(getConnection());\n EList root = getConnection().getRoot();\n EList loop = getConnection().getLoop();\n EList group = getConnection().getGroup();\n root.clear();\n loop.clear();\n group.clear();\n List<FOXTreeNode> node = (List<FOXTreeNode>) xmlViewer.getInput();\n FOXTreeNode foxTreeNode = node.get(0);\n if (foxTreeNode != null) {\n initNodeOrder(foxTreeNode);\n if (!foxTreeNode.isLoop()) {\n tableLoader((Element) foxTreeNode, \"String_Node_Str\", root, foxTreeNode.getDefaultValue());\n }\n Element loopNode = (Element) TreeUtil.getLoopNode(foxTreeNode);\n if (loopNode != null) {\n String path = TreeUtil.getPath(loopNode);\n tableLoader(loopNode, path.substring(0, path.lastIndexOf(\"String_Node_Str\")), loop, loopNode.getDefaultValue());\n }\n Element groupNode = (Element) TreeUtil.getGroupNode(foxTreeNode);\n if (groupNode != null) {\n String path = TreeUtil.getPath(groupNode);\n tableLoader(groupNode, path.substring(0, path.lastIndexOf(\"String_Node_Str\")), group, groupNode.getDefaultValue());\n }\n }\n}\n"
|
"public static Set<Class<?>> scanModules(Class<?> mainModule) {\n Modules ann = mainModule.getAnnotation(Modules.class);\n boolean scan = null == ann ? false : ann.scanPackage();\n List<Class<?>> list = new LinkedList<Class<?>>();\n list.add(mainModule);\n if (null != ann) {\n for (Class<?> module : ann.value()) {\n list.add(module);\n }\n }\n Set<Class<?>> modules = new HashSet<Class<?>>();\n if (null != ann && ann.packages() != null && ann.packages().length > 0) {\n for (String packageName : ann.packages()) scanModuleInPackage(modules, packageName);\n }\n for (Class<?> type : list) {\n if (scan) {\n URL jarLocation = type.getProtectionDomain().getCodeSource().getLocation();\n if (log.isDebugEnabled())\n log.debugf(\"String_Node_Str\", jarLocation);\n scanModuleInPackageByJar(jarLocation, modules, type);\n } else {\n if (isModule(type)) {\n if (log.isDebugEnabled())\n log.debugf(\"String_Node_Str\", type.getName());\n modules.add(type);\n } else if (log.isTraceEnabled()) {\n log.tracef(\"String_Node_Str\", type.getName());\n }\n }\n }\n return modules;\n}\n"
|
"public static void load() {\n if (loaded) {\n return;\n }\n Badges.loadGlobal();\n if (Badges.global.contains(Badges.Badge.ALL_ITEMS_IDENTIFIED)) {\n for (LinkedHashMap<Class<? extends Item>, Boolean> cat : allCatalogs) {\n for (Class<? extends Item> item : cat.keySet()) {\n cat.put(item, true);\n }\n }\n loaded = true;\n return;\n }\n for (LinkedHashMap<Class<? extends Item>, Boolean> cat : allCatalogs) {\n if (Badges.global.contains(catalogBadges.get(cat))) {\n for (Class<? extends Item> item : cat.keySet()) {\n cat.put(item, true);\n }\n }\n }\n try {\n InputStream input = Game.instance.openFileInput(\"String_Node_Str\");\n Bundle bundle = Bundle.read(input);\n input.close();\n List<String> seen = Arrays.asList(bundle.getStringArray(\"String_Node_Str\"));\n for (LinkedHashMap<Class<? extends Item>, Boolean> cat : allCatalogs) {\n for (Class<? extends Item> item : cat.keySet()) {\n if (seen.contains(item.getSimpleName())) {\n cat.put(item, true);\n }\n }\n }\n loaded = true;\n } catch (IOException e) {\n }\n}\n"
|
"protected void validateEmbedded(final IValidatable<T> validatable, final OProperty p, final Object fieldValue) {\n if (fieldValue instanceof ORecordId) {\n validatable.error(newValidationError(\"String_Node_Str\"));\n return;\n } else if (fieldValue instanceof OIdentifiable) {\n if (((OIdentifiable) fieldValue).getIdentity().isValid()) {\n validatable.error(newValidationError(\"String_Node_Str\"));\n return;\n }\n final OClass embeddedClass = p.getLinkedClass();\n if (embeddedClass != null) {\n final ORecord<?> rec = ((OIdentifiable) fieldValue).getRecord();\n if (!(rec instanceof ODocument)) {\n validatable.error(newValidationError(\"String_Node_Str\"));\n return;\n }\n final ODocument doc = (ODocument) rec;\n if (doc.getSchemaClass() == null || !(doc.getSchemaClass().isSubClassOf(embeddedClass))) {\n validatable.error(newValidationError(\"String_Node_Str\", \"String_Node_Str\", embeddedClass.getName()));\n return;\n }\n }\n } else {\n validatable.error(newValidationError(\"String_Node_Str\"));\n return;\n }\n}\n"
|
"static dPlayer valueOfInternal(String string, boolean announce) {\n if (string == null)\n return null;\n string = string.replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\");\n if (string.indexOf('-') >= 0) {\n try {\n UUID uuid = UUID.fromString(string);\n if (uuid != null) {\n OfflinePlayer player = Bukkit.getOfflinePlayer(uuid);\n if (player != null) {\n return new dPlayer(player);\n }\n }\n } catch (IllegalArgumentException e) {\n }\n }\n if (playerNames.containsKey(string.toLowerCase())) {\n OfflinePlayer player = Bukkit.getOfflinePlayer(playerNames.get(string.toLowerCase()));\n if (player.hasPlayedBefore())\n return new dPlayer(player);\n }\n if (announce)\n dB.echoError(\"String_Node_Str\" + string + \"String_Node_Str\");\n return null;\n}\n"
|
"protected BasicOAuthStoreTokenIndex[] execute() {\n GadgetTokenContainer container = getGadgetTokenContainer();\n Collection<GadgetTokenEntry> tokenEntries = container.getGadgetTokens().values();\n List<BasicOAuthStoreTokenIndex> tokenHolder = new ArrayList<BasicOAuthStoreTokenIndex>();\n for (GadgetTokenEntry tokenEntry : tokenEntries) {\n tokenHolder.add(tokenEntry.getKey());\n }\n return gadgetTokens;\n}\n"
|
"private void flushToOutputChunk(StreamEventCloner streamEventCloner, List<ComplexEventChunk<StreamEvent>> complexEventChunks, long currentTime) {\n ComplexEventChunk<StreamEvent> newEventChunk = new ComplexEventChunk<StreamEvent>(true);\n if (outputExpectsExpiredEvents) {\n if (expiredEventChunk.getFirst() != null) {\n expiredEventChunk.reset();\n while (expiredEventChunk.hasNext()) {\n StreamEvent expiredEvent = expiredEventChunk.next();\n expiredEvent.setTimestamp(currentTime);\n }\n newEventChunk.add(expiredEventChunk.getFirst());\n }\n }\n if (expiredEventChunk != null) {\n expiredEventChunk.clear();\n }\n if (currentEventChunk.getFirst() != null) {\n resetEvent.setTimestamp(currentTime);\n newEventChunk.add(resetEvent);\n resetEvent = null;\n if (preserveCurrentEvents || storeExpiredEvents) {\n currentEventChunk.reset();\n while (currentEventChunk.hasNext()) {\n StreamEvent currentEvent = currentEventChunk.next();\n StreamEvent toExpireEvent = streamEventCloner.copyStreamEvent(currentEvent);\n toExpireEvent.setType(StreamEvent.Type.EXPIRED);\n expiredEventChunk.add(toExpireEvent);\n }\n }\n newEventChunk.add(currentEventChunk.getFirst());\n }\n currentEventChunk.clear();\n if (newEventChunk.getFirst() != null) {\n complexEventChunks.add(newEventChunk);\n }\n}\n"
|
"protected void doWakefulWork(Intent intent) {\n try {\n String url = getUpdateUrl();\n if (url != null) {\n File book = download(url);\n File updateDir = new File(getFilesDir(), UPDATE_BASEDIR);\n updateDir.mkdirs();\n unzip(book, updateDir);\n book.delete();\n EventBus.getDefault().register(this);\n EventBus.getDefault().post(new BookUpdatedEvent());\n EventBus.getDefault().unregister(this);\n }\n } catch (Exception e) {\n Log.e(getClass().getSimpleName(), \"String_Node_Str\", e);\n }\n}\n"
|
"public JournalPage[] getResearchPages(String[] pageNames) {\n JournalPage[] pages = new JournalPage[pageNames.length];\n for (int i = 0; i < pageNames.length; i++) {\n pages[i] = getResearchPage(pageNames[i]);\n }\n pages = ArrayHelper.removeNulls(pages, JournalPage.class);\n if (pages.length % 2 != 0) {\n JournalPage[] expandedPages = new JournalPage[pages.length + 1];\n System.arraycopy(pages, 0, expandedPages, 0, pages.length);\n expandedPages[pages.length] = getResearchPage(\"String_Node_Str\");\n return expandedPages;\n }\n return pages;\n}\n"
|
"private void initialize() {\n if (state == GuidedStates.UNINITIALIZED) {\n coord = myDrone.getGps().getPosition();\n altitude.set(getDroneAltConstrained(myDrone));\n state = GuidedStates.IDLE;\n myDrone.notifyDroneEvent(DroneEventsType.GUIDEDPOINT);\n }\n if (mPostInitializationTask != null) {\n mPostInitializationTask.run();\n mPostInitializationTask = null;\n }\n}\n"
|
"public void drawFromBottomToTop(int level, int height, int MaxLevelPixelWidth) {\n if (level == 0 || level < topLevelToDraw) {\n return;\n }\n int total = levels.get(level).remove(0);\n int count = 1;\n for (int i = 0; i < levels.get(level).size(); i++) {\n int id = levels.get(level).get(i);\n StapData data = nodeDataMap.get(id);\n if (!data.isOnlyChildWithThisName()) {\n if (collapse_mode && data.isPartOfCollapsedNode()) {\n continue;\n }\n if (!collapse_mode && nodeDataMap.get(id).isCollapsed)\n continue;\n }\n if (!collapse_mode && nodeDataMap.get(id).isCollapsed)\n continue;\n if (nodeMap.get(id) == null) {\n nodeMap.put(id, getNodeData(id).makeNode(this));\n }\n StapNode n = nodeMap.get(id);\n n.setVisible(true);\n n.setSize(n.getSize().width / scale, n.getSize().height / scale);\n if (getAnimationMode() == CONSTANT_ANIMATION_SLOW) {\n if (counter <= ANIMATION_TIME)\n Animation.markBegin();\n n.setLocation(150 + (nodeMap.get(getRootVisibleNodeNumber()).getLocation().x), nodeMap.get(getRootVisibleNodeNumber()).getLocation().y);\n n.setLocation(150 + (MaxLevelPixelWidth / (total + 1) * count), height);\n if (counter <= ANIMATION_TIME) {\n Animation.run(ANIMATION_TIME / nodeMap.size() / 3);\n counter += ANIMATION_TIME / nodeMap.size();\n }\n } else {\n n.setLocation(150 + (MaxLevelPixelWidth / (total + 1) * count), height);\n }\n if (level == bottomLevelToDraw && nodeDataMap.get(id).children.size() != 0) {\n n.setBackgroundColor(CONSTANT_HAS_CHILDREN);\n }\n if (getNodeData(n.id).isMarked())\n n.setBackgroundColor(CONSTANT_MARKED);\n List<Integer> setOfCallees = null;\n if (collapse_mode)\n setOfCallees = nodeDataMap.get(id).collapsedChildren;\n else\n setOfCallees = nodeDataMap.get(id).children;\n for (int val : setOfCallees) {\n if (nodeMap.get(val) != null)\n nodeMap.get(val).makeConnection(SWT.NONE, n, nodeDataMap.get(val).timesCalled);\n }\n count++;\n }\n drawFromBottomToTop(level - 1, height - (3 * (int) (CONSTANT_VERTICAL_INCREMENT / scale)), MaxLevelPixelWidth);\n}\n"
|
"public void revoke(HttpRequest request, HttpResponder responder) throws Exception {\n Iterator<MethodArgument> arguments = parseArguments(request);\n EntityId entityId = deserializeNext(arguments);\n Principal principal = deserializeNext(arguments);\n Set<Action> actions = deserializeNext(arguments, SET_OF_ACTIONS);\n LOG.trace(\"String_Node_Str\", actions, entityId, principal);\n privilegesManager.revoke(entityId, principal, actions);\n LOG.info(\"String_Node_Str\", actions, entityId, principal);\n responder.sendStatus(HttpResponseStatus.OK);\n}\n"
|
"private void buildMenu() {\n fileChooser.setMultiSelectionEnabled(true);\n menuScanTextField.addKeyListener(this);\n JMenu menuFile = new JMenu(\"String_Node_Str\");\n JMenuItem exit = new JMenuItem(new AbstractAction(\"String_Node_Str\") {\n public void actionPerformed(ActionEvent t) {\n System.exit(0);\n }\n });\n menuFile.add(exit);\n JMenu menuEvents = new JMenu(\"String_Node_Str\");\n JMenuItem loadLocal = new JMenuItem(\"String_Node_Str\");\n loadLocal.setActionCommand(\"String_Node_Str\");\n loadLocal.addActionListener(this);\n JMenuItem loadS3 = new JMenuItem(\"String_Node_Str\");\n loadS3.setActionCommand(\"String_Node_Str\");\n loadS3.addActionListener(this);\n if (!PropertiesSingleton.getInstance().validS3Credentials()) {\n loadS3.setEnabled(false);\n }\n JMenuItem clearDatabase = new JMenuItem(new AbstractAction(\"String_Node_Str\") {\n public void actionPerformed(ActionEvent t) {\n eventsDatabase.clear();\n }\n });\n menuEvents.add(loadLocal);\n menuEvents.add(loadS3);\n menuEvents.addSeparator();\n menuEvents.add(clearDatabase);\n JMenu menuServices = new JMenu(\"String_Node_Str\");\n JMenuItem eventsByService = new JMenuItem(\"String_Node_Str\");\n eventsByService.setActionCommand(\"String_Node_Str\");\n eventsByService.addActionListener(this);\n menuServices.add(eventsByService);\n JMenu menuScan = new JMenu(\"String_Node_Str\");\n menuScan.add(scanSearchPanel);\n menuScan.addSeparator();\n menuScan.addMenuListener(new MenuListener() {\n public void menuCanceled(MenuEvent e) {\n }\n public void menuDeselected(MenuEvent e) {\n }\n public void menuSelected(MenuEvent e) {\n EventQueue.invokeLater(new Runnable() {\n public void run() {\n menuScanTextField.grabFocus();\n }\n });\n }\n });\n menusMap.put(\"String_Node_Str\", menuScan);\n JMenu menuAbout = new JMenu(\"String_Node_Str\");\n JMenuItem about = new JMenuItem(\"String_Node_Str\" + jCloudTrailViewer.VERSION);\n menuAbout.add(about);\n this.add(menuFile);\n this.add(menuEvents);\n this.add(menuServices);\n this.add(menuScan);\n createMenusFromFile();\n this.add(menuAbout);\n}\n"
|
"static boolean check(String source, int lineNumber) {\n Context cx = Context.enter();\n Debugger oldDebugger = cx.getDebugger();\n Object oldContext = cx.getDebuggerContextData();\n boolean oldGenerate = cx.isGeneratingDebug();\n int oldLevel = cx.getOptimizationLevel();\n try {\n BreakableSourceChecker checker = new BreakableSourceChecker();\n checker.lineNumber = lineNumber + 2;\n cx.setDebugger(checker, null);\n cx.setGeneratingDebug(true);\n cx.setOptimizationLevel(-1);\n cx.compileString(source, \"String_Node_Str\", 1, null);\n return checker.breakable;\n } catch (Exception e) {\n return false;\n } finally {\n cx.setDebugger(oldDebugger, oldContext);\n cx.setGeneratingDebug(oldGenerate);\n cx.setOptimizationLevel(oldLevel);\n Context.exit();\n }\n}\n"
|
"private boolean validateScalarParameter(ScalarParameterHandle paramHandle) throws ParameterValidationException {\n String paramName = paramHandle.getName();\n Object paramValue = runValues.get(paramName);\n String type = paramHandle.getDataType();\n if (paramValue == null) {\n if (!paramHandle.isRequired())\n return true;\n throw new ParameterValidationException(MessageConstants.PARAMETER_IS_NULL_EXCEPTION, new String[] { paramName });\n }\n String source = paramHandle.getValidate();\n if (source != null && source.length() != 0) {\n Object result = executionContext.evaluate(source);\n if (!(result instanceof Boolean) || !((Boolean) result).booleanValue()) {\n throw new ParameterValidationException(MessageConstants.PARAMETER_SCRIPT_VALIDATION_EXCEPTION, new String[] { paramName });\n }\n }\n String paramType = paramHandle.getParamType();\n if (DesignChoiceConstants.SCALAR_PARAM_TYPE_MULTI_VALUE.equals(paramType)) {\n if (paramValue instanceof Object[]) {\n boolean isValid = true;\n Object[] paramValueList = (Object[]) paramValue;\n for (int i = 0; i < paramValueList.length; i++) {\n if (paramValueList[i] != null) {\n if (!validateParameterValueType(paramName, paramValueList[i], type, paramHandle)) {\n isValid = false;\n }\n }\n }\n return isValid;\n }\n throw new ParameterValidationException(MessageConstants.INVALID_PARAMETER_TYPE_EXCEPTION, new String[] { paramName, \"String_Node_Str\", paramValue.getClass().getName() });\n } else {\n return validateParameterValueType(paramName, paramValue, type, paramHandle);\n }\n}\n"
|
"public void run() {\n Map<Long, Heritrix3JobMonitor> tmpJobMonitorMap;\n Iterator<Heritrix3JobMonitor> jobmonitorIter;\n byte[] tmpBuf = new byte[1024 * 1024];\n try {\n LOG.info(\"String_Node_Str\");\n File tmpFolder = environment.tempPath;\n ;\n File[] oldFiles = tmpFolder.listFiles(new FilenameFilter() {\n public boolean accept(File dir, String name) {\n if (name.startsWith(\"String_Node_Str\")) {\n if (name.endsWith(\"String_Node_Str\") || name.endsWith(\"String_Node_Str\")) {\n return true;\n }\n }\n return false;\n }\n });\n Map<String, File> oldFilesMap = new HashMap<String, File>();\n File tmpFile;\n for (int i = 0; i < oldFiles.length; ++i) {\n tmpFile = oldFiles[i];\n oldFilesMap.put(tmpFile.getName(), tmpFile);\n }\n ;\n List<File> oldFilesList = new ArrayList<File>();\n while (!bExit) {\n Set<Long> runningJobs = getRunningJobs();\n if (runningJobs != null) {\n Iterator<Long> jobidIter = runningJobs.iterator();\n Heritrix3JobMonitor jobmonitor;\n synchronized (runningJobMonitorMap) {\n filterJobMonitorMap.clear();\n while (jobidIter.hasNext()) {\n Long jobId = jobidIter.next();\n if (jobId != null) {\n jobmonitor = runningJobMonitorMap.remove(jobId);\n if (jobmonitor == null) {\n try {\n jobmonitor = Heritrix3WrapperManager.getJobMonitor(jobId, environment);\n } catch (IOException e) {\n }\n }\n filterJobMonitorMap.put(jobId, jobmonitor);\n }\n }\n tmpJobMonitorMap = filterJobMonitorMap;\n filterJobMonitorMap = runningJobMonitorMap;\n runningJobMonitorMap = tmpJobMonitorMap;\n LOG.debug(\"String_Node_Str\", runningJobMonitorMap.hashCode());\n }\n jobmonitorIter = filterJobMonitorMap.values().iterator();\n while (jobmonitorIter.hasNext()) {\n jobmonitor = jobmonitorIter.next();\n jobmonitor.cleanup(oldFilesList);\n }\n jobmonitorIter = runningJobMonitorMap.values().iterator();\n while (jobmonitorIter.hasNext()) {\n jobmonitor = jobmonitorIter.next();\n if (oldFilesMap != null) {\n oldFilesMap.remove(jobmonitor.logFile.getName());\n oldFilesMap.remove(jobmonitor.idxFile.getName());\n }\n if (!jobmonitor.bInitialized) {\n jobmonitor.init();\n }\n checkH3HostnamePort(jobmonitor);\n isH3HostnamePortEnabled(jobmonitor);\n if (jobmonitor.bPull) {\n jobmonitor.updateCrawlLog(tmpBuf);\n }\n }\n if (oldFilesMap != null) {\n oldFilesList.addAll(oldFilesMap.values());\n oldFilesMap = null;\n }\n int idx = 0;\n while (idx < oldFilesList.size()) {\n if (oldFilesList.get(idx).delete()) {\n idx++;\n } else {\n oldFilesList.remove(idx);\n }\n }\n }\n try {\n Thread.sleep(60 * 1000);\n } catch (InterruptedException e) {\n }\n }\n LOG.info(\"String_Node_Str\");\n } catch (Throwable t) {\n throwable = t;\n LOG.error(\"String_Node_Str\", t);\n }\n}\n"
|
"public void sendRosterAdd(String user, String name, String[] groups) throws IOException {\n Roster r = getRoster();\n r.createEntry(user, name, groups);\n}\n"
|
"public void setBaby(boolean flag) {\n if (flag) {\n this.datawatcher.watch(12, new Integer(-24000));\n } else {\n this.datawatcher.watch(12, 0);\n }\n ((MySheep) myPet).isBaby = flag;\n}\n"
|
"public void stepBack() {\n StackFrameStep recentPop = frame.popStep();\n syncState();\n while (this.getNeededData() == null || this.getNeededData() == SessionFrame.STATE_DATUM_COMPUTED) {\n recentPop = frame.popStep();\n syncState();\n }\n}\n"
|
"public void testSnepPut() throws Exception {\n snepClient.setSnepAgentListener(new SnepAgentListener() {\n public void onSnepConnection(SnepAgent snepAgent) {\n List<Record> records = new ArrayList<Record>();\n for (int x = 0; x < 50; x++) records.add(new UriRecord(\"String_Node_Str\"));\n snepAgent.doPut(records, ndefListener);\n }\n public boolean hasDataToSend() {\n return true;\n }\n });\n helper.launch();\n synchronized (this) {\n wait(500000);\n }\n assertTrue(ndefListener.isSuccess());\n Collection<Record> receivedRecords = ndefListener.getRecords();\n assertEquals(50, receivedRecords.size());\n UriRecord uriRecord = (UriRecord) receivedRecords.iterator().next();\n assertEquals(\"String_Node_Str\", uriRecord.getUri());\n}\n"
|
"private static void checkTerminalSet(WFState init, Set<WFState> termset, Set<Role> safety, Set<Role> liveness) throws ScribbleException {\n Iterator<WFState> i = termset.iterator();\n WFState s = i.next();\n Map<Role, WFState> ss = new HashMap<>();\n s.config.states.keySet().forEach((r) -> ss.put(r, s));\n while (i.hasNext()) {\n WFState next = i.next();\n Map<Role, EndpointState> tmp = next.config.states;\n for (Role r : tmp.keySet()) {\n if (ss.get(r) != null) {\n {\n for (GIOAction a : next.getActions()) {\n if (a.containsRole(r)) {\n ss.put(r, null);\n break;\n }\n }\n }\n }\n }\n }\n for (Role r : ss.keySet()) {\n EndpointState tmp = ss.get(r);\n if (tmp != null) {\n if (!tmp.isTerminal()) {\n if (s.config.buffs.get(r).values().stream().allMatch((v) -> v == null)) {\n liveness.add(r);\n }\n }\n }\n }\n}\n"
|
"public void handleData(T data) {\n super.handleData(data);\n for (ITmfDataRequest<T> request : fRequests) {\n if (data == null) {\n request.handleData(null);\n } else {\n if (request instanceof TmfEventRequest<?>) {\n TmfEventRequest<T> req = (TmfEventRequest<T>) request;\n if (!req.isCompleted() && (getIndex() + getNbRead() > request.getIndex())) {\n ITmfTimestamp ts = data.getTimestamp();\n if (req.getRange().contains(ts)) {\n if (req.getDataType().isInstance(data)) {\n req.handleData(data);\n }\n }\n }\n } else {\n TmfDataRequest<T> req = (TmfDataRequest<T>) request;\n if (!req.isCompleted()) {\n if (req.getDataType().isInstance(data)) {\n req.handleData(data);\n }\n }\n }\n }\n }\n}\n"
|
"public void setPartitionAt(int x, int y, short newPartition) {\n if (getPartitionIdAt(x, y) != partitionRepresentatives[newPartition]) {\n if (x == 106 && y == 212) {\n System.out.println();\n }\n byte playerId = changePartitionUncheckedAt(x, y, newPartition);\n notifyPlayerChangedListener(x, y, playerId);\n }\n}\n"
|
"public void testSaveAnalysisCase3() throws PersistenceException {\n AnalysisWriter createAnalysisWriter = ElementWriterFactory.getInstance().createAnalysisWrite();\n Analysis createAnalysis = AnalysisFactory.eINSTANCE.createAnalysis();\n AnalysisResult createAnalysisResult = AnalysisFactory.eINSTANCE.createAnalysisResult();\n AnalysisContext createAnalysisContext = AnalysisFactory.eINSTANCE.createAnalysisContext();\n createAnalysis.setResults(createAnalysisResult);\n createAnalysis.setContext(createAnalysisContext);\n createAnalysis.setName(\"String_Node_Str\");\n TDQAnalysisItem createTDQAnalysisItem = PropertiesFactory.eINSTANCE.createTDQAnalysisItem();\n createTDQAnalysisItem.setAnalysis(createAnalysis);\n Property createAnalysisProperty = org.talend.core.model.properties.PropertiesFactory.eINSTANCE.createProperty();\n createAnalysisProperty.setLabel(\"String_Node_Str\");\n createTDQAnalysisItem.setProperty(createAnalysisProperty);\n ProxyRepositoryFactory.getInstance().create(createTDQAnalysisItem, Path.EMPTY, false);\n WhereRuleIndicator whereRuleIndicator = IndicatorSqlFactory.eINSTANCE.createWhereRuleIndicator();\n createAnalysisResult.getIndicators().add(whereRuleIndicator);\n DQRule dqRule = RulesFactory.eINSTANCE.createWhereRule();\n whereRuleIndicator.setIndicatorDefinition(dqRule);\n TDQBusinessRuleItem createTDQBusinessRuleItem = PropertiesFactory.eINSTANCE.createTDQBusinessRuleItem();\n createTDQBusinessRuleItem.setDqrule(dqRule);\n Property createPatternProperty = org.talend.core.model.properties.PropertiesFactory.eINSTANCE.createProperty();\n createPatternProperty.setLabel(\"String_Node_Str\");\n createTDQBusinessRuleItem.setProperty(createPatternProperty);\n ProxyRepositoryFactory.getInstance().create(createTDQBusinessRuleItem, Path.EMPTY, false);\n ReturnCode save = createAnalysisWriter.save(createTDQAnalysisItem, true);\n Assert.assertTrue(save.isOk());\n Assert.assertEquals(1, createAnalysis.getClientDependency().size());\n Assert.assertEquals(1, dqRule.getSupplierDependency().size());\n Assert.assertEquals(1, dqRule.getSupplierDependency().get(0).getClient().size());\n createAnalysisResult.getIndicators().remove(whereRuleIndicator);\n save = createAnalysisWriter.save(createTDQAnalysisItem, true);\n Assert.assertTrue(save.isOk());\n Assert.assertEquals(0, createAnalysis.getClientDependency().size());\n Assert.assertEquals(1, dqRule.getSupplierDependency().size());\n Assert.assertEquals(0, dqRule.getSupplierDependency().get(0).getClient().size());\n}\n"
|
"public static List<Object[]> data() {\n return Arrays.asList(new Object[][] { { new AnnotatedDocumentImpl(\"String_Node_Str\", \"String_Node_Str\", Arrays.asList((Annotation) new AnnotationImpl(13, 8))) }, { new AnnotatedDocumentImpl(\"String_Node_Str\", \"String_Node_Str\", Arrays.asList((Annotation) new AnnotationImpl(0, 4))) }, { new AnnotatedDocumentImpl(\"String_Node_Str\", \"String_Node_Str\", Arrays.asList(((Annotation) new AnnotationImpl(0, 4)), (Annotation) new AnnotationImpl(13, 8))) }, { new AnnotatedDocumentImpl(\"String_Node_Str\", \"String_Node_Str\", Arrays.asList((Annotation) new DisambiguatedAnnotation(13, 8, \"String_Node_Str\"))) }, { new AnnotatedDocumentImpl(\"String_Node_Str\", \"String_Node_Str\", Arrays.asList((Annotation) new ScoredDisambigAnnotation(13, 8, \"String_Node_Str\", 0.87))) }, { new AnnotatedDocumentImpl(\"String_Node_Str\", \"String_Node_Str\", Arrays.asList((Annotation) new AnnotationImpl(3, 4), (Annotation) new AnnotationImpl(19, 8))) }, { new AnnotatedDocumentImpl(\"String_Node_Str\", \"String_Node_Str\", Arrays.asList((Annotation) new AnnotationImpl(21, 3), (Annotation) new AnnotationImpl(0, 8), (Annotation) new AnnotationImpl(42, 4))) } });\n}\n"
|
"protected boolean onUpdateTask() {\n super.onUpdateTask();\n if (this.sentry() instanceof IAutoSentry) {\n if (!this.sentry().isValidTarget(this.sentry().getTarget())) {\n this.sentry().setTarget(null);\n this.sentry().cancelRotation();\n return false;\n } else if (this.tileEntity.canActivateWeapon()) {\n this.tileEntity.onWeaponActivated();\n } else {\n float[] rotations = this.tileEntity.lookHelper.getDeltaRotations(this.tileEntity.getTargetPosition());\n this.tileEntity.rotateTo(rotations[0], rotations[1]);\n }\n }\n return true;\n}\n"
|
"private void handleMetaResult() {\n if (SwingUtilities.isEventDispatchThread()) {\n final InfoFrame i = new InfoFrame(this.entry, this.d);\n if (this.d == null) {\n i.fillInfo(this.artist, this.title, this.album);\n }\n i.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent arg0) {\n if (arg0 == null) {\n handleMetaSearch();\n } else {\n saveMetaData(i);\n }\n }\n });\n i.setVisible(true);\n } else {\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n handleMetaResult();\n }\n });\n }\n}\n"
|
"static ImmutableSet<ObjectType> joinSets(ImmutableSet<ObjectType> objs1, ImmutableSet<ObjectType> objs2) {\n if (objs1.isEmpty()) {\n return objs2;\n } else if (objs2.isEmpty()) {\n return objs1;\n }\n List<ObjectType> objs = new ArrayList<>(objs1);\n objs.addAll(objs2);\n for (int i = 0; i < objs.size() - 1; i++) {\n ObjectType obj1 = objs.get(i);\n NominalType nt1 = obj1.nominalType;\n for (int j = i + 1; j < objs.size(); j++) {\n ObjectType obj2 = objs.get(j);\n NominalType nt2 = obj2.nominalType;\n if (areRelatedNominalTypes(nt1, nt2)) {\n if ((nt2.isBuiltinObject() && nt1 != null && !obj1.isSubtypeOf(obj2, SubtypeCache.create())) || (nt1.isBuiltinObject() && nt2 != null && !obj2.isSubtypeOf(obj1, SubtypeCache.create()))) {\n break;\n }\n keptFrom1[i] = null;\n addedObj2 = true;\n newObjs.add(join(obj1, obj2));\n break;\n }\n }\n if (!addedObj2) {\n newObjs.add(obj2);\n }\n }\n for (ObjectType o : keptFrom1) {\n if (o != null) {\n newObjs.add(o);\n }\n }\n return newObjs.build();\n}\n"
|
"private void checkPodAttributes(long podId, String podName, long zoneId, String gateway, String cidr, String startIp, String endIp, String allocationStateStr, boolean checkForDuplicates, boolean skipGatewayOverlapCheck) {\n if (checkForDuplicates) {\n if (validPod(podName, zoneId)) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + podName + \"String_Node_Str\" + zoneId + \"String_Node_Str\");\n }\n }\n String cidrAddress;\n long cidrSize;\n if (NetUtils.isValidCIDR(cidr)) {\n cidrAddress = getCidrAddress(cidr);\n cidrSize = getCidrSize(cidr);\n } else {\n throw new InvalidParameterValueException(\"String_Node_Str\" + podName);\n }\n checkIpRange(startIp, endIp, cidrAddress, cidrSize);\n checkOverlapPublicIpRange(zoneId, startIp, endIp);\n if (!NetUtils.isValidIp(gateway)) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n }\n if (!NetUtils.getCidrSubNet(gateway, cidrSize).equalsIgnoreCase(NetUtils.getCidrSubNet(cidrAddress, cidrSize))) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n }\n if (!skipGatewayOverlapCheck) {\n if (NetUtils.ipRangesOverlap(startIp, endIp, gateway, gateway)) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n }\n }\n String checkPodCIDRs = _configDao.getValue(\"String_Node_Str\");\n if (checkPodCIDRs == null || checkPodCIDRs.trim().isEmpty() || Boolean.parseBoolean(checkPodCIDRs)) {\n checkPodCidrSubnets(zoneId, podId, cidr);\n }\n if (allocationStateStr != null && !allocationStateStr.isEmpty()) {\n try {\n Grouping.AllocationState.valueOf(allocationStateStr);\n } catch (IllegalArgumentException ex) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + allocationStateStr + \"String_Node_Str\");\n }\n }\n}\n"
|
"protected void onPostExecute(Object ex) {\n for (OnAsyncTaskCompletedListener listenerInstance : listener) {\n if (listenerInstance != null)\n listenerInstance.onAsyncTaskCompleted(task_id, ex);\n }\n if (ex == null && NetworkConnection.isNetworkAvailable(context)) {\n SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(context);\n int syncStrategy = Integer.parseInt(mPrefs.getString(SettingsActivity.LV_CACHE_IMAGES_OFFLINE_STRING, \"String_Node_Str\"));\n switch(syncStrategy) {\n case 0:\n break;\n case 1:\n if (NetworkConnection.isWLANConnected(context))\n downloadImages = true;\n break;\n case 2:\n StartDownloadingImages(context, highestItemIdBeforeSync, false);\n break;\n case 3:\n if (!NetworkConnection.isWLANConnected(context))\n ShowDownloadImageWithoutWifiQuestion();\n else\n StartDownloadingImages(context, highestItemIdBeforeSync, false);\n break;\n }\n }\n detach();\n}\n"
|
"private void createFirewallRulesCommands(List<? extends FirewallRule> rules, VirtualRouter router, Commands cmds, long guestNetworkId) {\n List<FirewallRuleTO> rulesTO = null;\n if (rules != null) {\n rulesTO = new ArrayList<FirewallRuleTO>();\n for (FirewallRule rule : rules) {\n IpAddress sourceIp = _networkModel.getIp(rule.getSourceIpAddressId());\n if (rule.getSourceCidrList() == null && (rule.getPurpose() == Purpose.Firewall || rule.getPurpose() == Purpose.NetworkACL)) {\n _rulesDao.loadSourceCidrs((FirewallRuleVO) rule);\n }\n FirewallRuleTO ruleTO = new FirewallRuleTO(rule, null, sourceIp.getAddress().addr());\n rulesTO.add(ruleTO);\n }\n }\n SetFirewallRulesCommand cmd = new SetFirewallRulesCommand(rulesTO);\n cmd.setAccessDetail(NetworkElementCommand.ROUTER_IP, getRouterControlIp(router.getId()));\n cmd.setAccessDetail(NetworkElementCommand.ROUTER_GUEST_IP, getRouterIpInNetwork(guestNetworkId, router.getId()));\n cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME, router.getInstanceName());\n DataCenterVO dcVo = _dcDao.findById(router.getDataCenterIdToDeployIn());\n cmd.setAccessDetail(NetworkElementCommand.ZONE_NETWORK_TYPE, dcVo.getNetworkType().toString());\n cmds.addCommand(cmd);\n}\n"
|
"protected void generateValueObject(VoClass voClass) {\n StringBuilder buffer = new StringBuilder();\n ClassName objectValueName = getValueObjectName(voClass);\n List<ModelField> fieldList = voClass.getFieldList();\n buffer.append(\"String_Node_Str\" + objectValueName.getPackageName() + \"String_Node_Str\");\n buffer.append(\"String_Node_Str\");\n buffer.append(getGeneratedTag() + \"String_Node_Str\");\n buffer.append(\"String_Node_Str\" + objectValueName.getSimpleName() + \"String_Node_Str\");\n buffer.append(\"String_Node_Str\");\n for (ModelField field : fieldList) {\n buffer.append(\"String_Node_Str\" + toString(field.getType()) + \"String_Node_Str\" + field.getName() + \"String_Node_Str\");\n }\n buffer.append(\"String_Node_Str\");\n buffer.append(\"String_Node_Str\" + objectValueName.getSimpleName() + \"String_Node_Str\");\n buffer.append(\"String_Node_Str\");\n buffer.append(\"String_Node_Str\");\n buffer.append(\"String_Node_Str\" + objectValueName.getSimpleName() + \"String_Node_Str\");\n List<String> fieldDeclarationList = new ArrayList<String>();\n for (ModelField field : fieldList) fieldDeclarationList.add(field.getType() + \"String_Node_Str\" + field.getName());\n buffer.append(getCommaSeparatedSequence(fieldDeclarationList) + \"String_Node_Str\");\n for (ModelField field : fieldList) buffer.append(\"String_Node_Str\" + field.getName() + \"String_Node_Str\" + field.getName() + \"String_Node_Str\");\n buffer.append(\"String_Node_Str\");\n buffer.append(\"String_Node_Str\");\n buffer.append(\"String_Node_Str\" + objectValueName.getSimpleName() + \"String_Node_Str\" + SmallDataInputStream.class.getName() + \"String_Node_Str\" + IOException.class.getName() + \"String_Node_Str\");\n for (ModelField field : fieldList) buffer.append(getDecodingSourceCode(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" + field.getName(), \"String_Node_Str\", field.getType(), 0));\n buffer.append(\"String_Node_Str\");\n buffer.append(\"String_Node_Str\");\n buffer.append(\"String_Node_Str\" + SmallDataOutputStream.class.getName() + \"String_Node_Str\" + IOException.class.getName() + \"String_Node_Str\");\n for (ModelField field : fieldList) buffer.append(getEncodingSourceCode(\"String_Node_Str\", \"String_Node_Str\" + field.getName(), \"String_Node_Str\", field.getType(), 0));\n buffer.append(\"String_Node_Str\");\n buffer.append(\"String_Node_Str\");\n buffer.append(\"String_Node_Str\");\n buffer.append(\"String_Node_Str\");\n buffer.append(\"String_Node_Str\");\n List<String> fieldLogList = new ArrayList<String>();\n for (ModelField field : fieldList) fieldLogList.add(field.getName() + \"String_Node_Str\");\n buffer.append(getCommaSeparatedSequence(fieldLogList, \"String_Node_Str\"));\n buffer.append(\"String_Node_Str\");\n buffer.append(\"String_Node_Str\");\n buffer.append(\"String_Node_Str\");\n buffer.append(\"String_Node_Str\");\n writeFileContent(objectValueName.getQualifiedName(), buffer);\n}\n"
|
"public synchronized ArchiveEntry createEntry(String name) throws IOException {\n throw new IOException(CoreMessages.getString(ResourceConstants.READ_ONLY_ARCHIVE));\n}\n"
|
"private void parseWaypointLines(BufferedReader reader) throws IOException {\n String line;\n waypoints.clear();\n while ((line = reader.readLine()) != null) {\n String[] RowData = line.split(\"String_Node_Str\");\n waypoint wp = new waypoint(Double.valueOf(RowData[8]), Double.valueOf(RowData[9]), Double.valueOf(RowData[10]));\n wp.setNumber(Integer.valueOf(RowData[0]));\n wp.setFrame(Integer.valueOf(RowData[2]));\n wp.setCmd(ApmCommands.getCmd(Integer.valueOf(RowData[3])));\n wp.setParameters(Float.valueOf(RowData[4]), Float.valueOf(RowData[5]), Float.valueOf(RowData[6]), Float.valueOf(RowData[7]));\n waypoints.add(wp);\n }\n}\n"
|
"protected String[] getDistributionVersionsDisplay() {\n return new String[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n}\n"
|
"void createCube(DataEngine engine) throws IOException, BirtException, OLAPException {\n IDocumentManager documentManager = DocumentManagerFactory.createFileDocumentManager(documentPath + engine.hashCode(), cubeName);\n DocManagerMap.getDocManagerMap().set(String.valueOf(engine.hashCode()), documentPath + engine.hashCode() + cubeName, documentManager);\n engine.addShutdownListener(new DocManagerReleaser(engine));\n Dimension[] dimensions = new Dimension[6];\n String[] levelNames = new String[1];\n levelNames[0] = \"String_Node_Str\";\n DimensionForTest iterator = new DimensionForTest(levelNames);\n iterator.setLevelMember(0, TestFactTable1.DIM0_L1Col);\n ILevelDefn[] levelDefs = new ILevelDefn[1];\n levelDefs[0] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n dimensions[0] = (Dimension) DimensionFactory.createDimension(\"String_Node_Str\", documentManager, iterator, levelDefs, false);\n IHierarchy hierarchy = dimensions[0].getHierarchy();\n IDiskArray allRow = dimensions[0].getAllRows(new StopSign());\n levelNames = new String[1];\n levelNames[0] = \"String_Node_Str\";\n iterator = new DimensionForTest(levelNames);\n iterator.setLevelMember(0, TestFactTable1.DIM0_L2Col);\n levelDefs = new ILevelDefn[1];\n levelDefs[0] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n dimensions[1] = (Dimension) DimensionFactory.createDimension(\"String_Node_Str\", documentManager, iterator, levelDefs, false);\n hierarchy = dimensions[1].getHierarchy();\n allRow = dimensions[1].getAllRows();\n levelNames = new String[1];\n levelNames[0] = \"String_Node_Str\";\n iterator = new DimensionForTest(levelNames);\n iterator.setLevelMember(0, TestFactTable1.DIM0_L3Col);\n levelDefs = new ILevelDefn[1];\n levelDefs[0] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n dimensions[2] = (Dimension) DimensionFactory.createDimension(\"String_Node_Str\", documentManager, iterator, levelDefs, false);\n hierarchy = dimensions[2].getHierarchy();\n allRow = dimensions[2].getAllRows();\n levelNames = new String[1];\n levelNames[0] = \"String_Node_Str\";\n iterator = new DimensionForTest(levelNames);\n iterator.setLevelMember(0, TestFactTable1.DIM0_L4Col);\n levelDefs = new ILevelDefn[1];\n levelDefs[0] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n dimensions[3] = (Dimension) DimensionFactory.createDimension(\"String_Node_Str\", documentManager, iterator, levelDefs, false);\n hierarchy = dimensions[3].getHierarchy();\n allRow = dimensions[3].getAllRows();\n levelNames = new String[1];\n levelNames[0] = \"String_Node_Str\";\n iterator = new DimensionForTest(levelNames);\n iterator.setLevelMember(0, TestFactTable1.DIM1_L1Col);\n levelDefs = new ILevelDefn[1];\n levelDefs[0] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n dimensions[4] = (Dimension) DimensionFactory.createDimension(\"String_Node_Str\", documentManager, iterator, levelDefs, false);\n hierarchy = dimensions[4].getHierarchy();\n allRow = dimensions[4].getAllRows();\n levelNames = new String[] { \"String_Node_Str\", \"String_Node_Str\" };\n iterator = new DimensionForTest(levelNames);\n iterator.setLevelMember(0, TestFactTable1.DIM1_L2Col);\n iterator.setLevelMember(1, TestFactTable1.ATTRIBUTE_Col);\n levelDefs = new ILevelDefn[1];\n levelDefs[0] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, new String[] { \"String_Node_Str\" });\n dimensions[5] = (Dimension) DimensionFactory.createDimension(\"String_Node_Str\", documentManager, iterator, levelDefs, false);\n hierarchy = dimensions[5].getHierarchy();\n allRow = dimensions[5].getAllRows();\n TestFactTable1 factTable2 = new TestFactTable1();\n String[] measureColumnName = new String[1];\n measureColumnName[0] = \"String_Node_Str\";\n Cube cube = new Cube(cubeName, documentManager);\n cube.create(getKeyColNames(dimensions), dimensions, factTable2, measureColumnName, new StopSign());\n cube.close();\n documentManager.flush();\n}\n"
|
"private void analyze() {\n if (model == null) {\n return;\n }\n ModelConfiguration config = model.getOutputConfig();\n if (config == null) {\n config = model.getInputConfig();\n }\n DataHandle data = getHandle();\n if ((config == null) || (data == null)) {\n reset();\n return;\n }\n if (data != null && model.getViewConfig().isSubset()) {\n data = data.getView();\n }\n final int index = data.getColumnIndexOf(attribute);\n if (index == -1) {\n clearCache();\n reset();\n return;\n }\n if (cache.containsKey(attribute)) {\n return;\n }\n final AttributeType type = config.getInput().getDefinition().getAttributeType(attribute);\n Hierarchy hierarchy = null;\n if (type instanceof Hierarchy) {\n hierarchy = (Hierarchy) type;\n } else if (type == AttributeType.SENSITIVE_ATTRIBUTE) {\n hierarchy = config.getHierarchy(attribute);\n }\n final Map<String, Double> map = new HashMap<String, Double>();\n for (int i = 0; i < data.getNumRows(); i++) {\n final String val = data.getValue(i, index);\n if (!map.containsKey(val)) {\n map.put(val, 1d);\n } else {\n map.put(val, map.get(val) + 1);\n }\n }\n final String[] dvals;\n if (hierarchy != null && hierarchy.getHierarchy() != null && hierarchy.getHierarchy().length != 0) {\n final int level = data.getGeneralization(attribute);\n final List<String> list = new ArrayList<String>();\n final Set<String> done = new HashSet<String>();\n final String[][] h = hierarchy.getHierarchy();\n for (int i = 0; i < h.length; i++) {\n final String val = h[i][level];\n if (map.containsKey(val)) {\n if (!done.contains(val)) {\n list.add(val);\n done.add(val);\n }\n }\n }\n if (model.getAnonymizer() != null && map.containsKey(model.getAnonymizer().getSuppressionString()) && !done.contains(model.getAnonymizer().getSuppressionString())) {\n list.add(model.getAnonymizer().getSuppressionString());\n }\n dvals = list.toArray(new String[] {});\n } else {\n final DataType<?> dtype = data.getDataType(attribute);\n final String[] v = new String[map.size()];\n int i = 0;\n for (final String s : map.keySet()) {\n v[i++] = s;\n }\n Arrays.sort(v, new Comparator<String>() {\n public int compare(final String arg0, final String arg1) {\n try {\n return dtype.compare(arg0, arg1);\n } catch (final Exception e) {\n throw new RuntimeException(e);\n }\n }\n });\n dvals = v;\n }\n double sum = 0;\n for (final double i : map.values()) {\n sum += i;\n }\n final double[] distribution = new double[map.size()];\n for (int i = 0; i < dvals.length; i++) {\n distribution[i] = map.get(dvals[i]) / sum;\n }\n cache.put(attribute, distribution);\n}\n"
|
"public static BigDecimal getValue(BigInteger value, BigInteger tokenId, RedisTemplate redisTemplate) {\n if (null == tokenId) {\n return null;\n }\n if (tokenId.equals(BigInteger.ZERO)) {\n return Convert.fromWei(new BigDecimal(value), Convert.Unit.ETHER);\n }\n String name = redisTemplate.opsForValue().get(RedisConstants.UNIT + \"String_Node_Str\" + tokenId).toString();\n Convert.Unit unit = Convert.Unit.valueOf(name);\n return Convert.fromWei(new BigDecimal(value), unit);\n}\n"
|
"private void retrieveSource(String source) {\n SkeletonCacheEntry entry = skeletonCache.get(source);\n if (entry == null || entry.refCounter < 1) {\n loadSource(source);\n EngineAssetManager.getInstance().getManager().finishLoading();\n entry = skeletonCache.get(source);\n }\n if (entry.skeleton == null) {\n TextureAtlas atlas = EngineAssetManager.getInstance().getTextureAtlas(source);\n SkeletonBinary skel = new SkeletonBinary(atlas);\n SkeletonData skeletonData = skel.readSkeletonData(EngineAssetManager.getInstance().getSpine(source));\n entry.skeleton = new Skeleton(skeletonData);\n AnimationStateData stateData = new AnimationStateData(skeletonData);\n stateData.setDefaultMix(0f);\n entry.animation = new AnimationState(stateData);\n entry.animation.addListener(animationListener);\n }\n}\n"
|
"protected void instrumentAndReplaceBody(MarkupStream markupStream, ComponentTag openTag, CharSequence bodyText) {\n boolean designMode = false;\n IFormUIInternal<?> formui = findParent(IFormUIInternal.class);\n if (formui != null && formui.isDesignMode()) {\n designMode = true;\n }\n String cssId = null;\n if (WebBaseButton.getImageDisplayURL(this) != null) {\n cssId = getMarkupId() + \"String_Node_Str\";\n }\n int anchor = Utils.getAsBoolean(application.getRuntimeProperties().get(\"String_Node_Str\")) ? anchors : 0;\n replaceComponentTagBody(markupStream, openTag, instrumentBodyText(bodyText, halign, valign, false, border, margin, cssId, (char) getDisplayedMnemonic(), getMarkupId(), getImageDisplayURL(this), size == null ? 0 : size.height, true, designMode ? null : cursor, false, anchor));\n}\n"
|
"public void selectionChanged(SelectionChangedEvent event) {\n ISelection selection = event.getSelection();\n if (selection != null) {\n Object[] sel = ((IStructuredSelection) selection).toArray();\n if (sel.length == 1) {\n if (sel[0] instanceof IPropertyDefn) {\n IPropertyDefn elePropDefn = (IPropertyDefn) sel[0];\n currentMethodName = elePropDefn.getName();\n currentContextName = elePropDefn.getContext();\n switchContext();\n }\n }\n }\n}\n"
|
"private TestCaseEditor askForNewTC() {\n TestCaseEditor editor = null;\n String standardName = InitialValueConstants.DEFAULT_TEST_CASE_NAME_OBSERVED;\n int index = 1;\n String newName = standardName + index;\n final Set<String> usedNames = new HashSet<String>();\n for (Object node : GeneralStorage.getInstance().getProject().getSpecObjCont().getSpecObjList()) {\n if (Persistor.isPoSubclass((INodePO) node, ITestCasePO.class) && ((INodePO) node).getName().startsWith(standardName)) {\n usedNames.add(((INodePO) node).getName());\n }\n }\n while (usedNames.contains(newName)) {\n index++;\n newName = standardName + index;\n }\n InputDialog dialog = createDialog(newName, usedNames);\n dialog.setHelpAvailable(true);\n dialog.create();\n DialogUtils.setWidgetNameForModalDialog(dialog);\n Plugin.getHelpSystem().setHelp(dialog.getShell(), ContextHelpIds.DIALOG_OBS_TC_SAVE);\n dialog.open();\n if (Window.OK == dialog.getReturnCode()) {\n String tcName = dialog.getName();\n final INodePO parentPO = ISpecObjContPO.TCB_ROOT_NODE;\n ISpecTestCasePO recSpecTestCase = NodeMaker.createSpecTestCasePO(tcName);\n try {\n NodePM.addAndPersistChildNode(parentPO, recSpecTestCase, null, NodePM.getCmdHandleChild(parentPO, recSpecTestCase));\n DataEventDispatcher.getInstance().fireDataChangedListener(recSpecTestCase, DataState.Added, UpdateState.all);\n editor = (TestCaseEditor) AbstractOpenHandler.openEditor(recSpecTestCase);\n } catch (PMException e) {\n PMExceptionHandler.handlePMExceptionForMasterSession(e);\n } catch (ProjectDeletedException e) {\n PMExceptionHandler.handleGDProjectDeletedException();\n }\n }\n dialog.close();\n return editor;\n}\n"
|
"public boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, Object objectValue, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext) {\n Object fieldValue = directMapping.getFieldValue(objectValue, session, marshalRecord);\n if ((null == fieldValue) || (null == namespaceResolver)) {\n return false;\n }\n Field xmlField = (Field) directMapping.getField();\n QName schemaType = getSchemaType(xmlField, fieldValue, session);\n if (null == schemaType) {\n return false;\n }\n if (xmlField.getSchemaType() == null) {\n if (schemaType.equals(Constants.STRING_QNAME)) {\n return false;\n }\n } else {\n if (xmlField.isSchemaType(schemaType)) {\n return false;\n }\n }\n XPathFragment groupingFragment = marshalRecord.openStartGroupingElements(namespaceResolver);\n String typeQName = namespaceResolver.resolveNamespaceURI(javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI) + Constants.COLON + Constants.SCHEMA_TYPE_ATTRIBUTE;\n String schemaTypePrefix = namespaceResolver.resolveNamespaceURI(schemaType.getNamespaceURI());\n if (schemaTypePrefix == null) {\n if (javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(schemaType.getNamespaceURI())) {\n schemaTypePrefix = namespaceResolver.generatePrefix(Constants.SCHEMA_PREFIX);\n } else {\n schemaTypePrefix = namespaceResolver.generatePrefix();\n }\n marshalRecord.namespaceDeclaration(schemaTypePrefix, schemaType.getNamespaceURI());\n }\n marshalRecord.attribute(javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, Constants.SCHEMA_TYPE_ATTRIBUTE, typeQName, schemaTypePrefix + Constants.COLON + schemaType.getLocalPart());\n marshalRecord.closeStartGroupingElements(groupingFragment);\n return true;\n}\n"
|
"public HttpResponse doRequest(String url, HttpMethod method, Map<String, Object> requestParameters, String charset) throws IOException {\n HttpResponse response = new HttpResponse();\n HttpURLConnection conn = getHttpURLConnection(url, method);\n if (method == HttpMethod.GET && requestParameters != null && requestParameters.size() > 0) {\n for (String key : requestParameters.keySet()) {\n String param = key + \"String_Node_Str\" + requestParameters.get(key);\n url += (url.contains(\"String_Node_Str\") ? \"String_Node_Str\" : \"String_Node_Str\") + param;\n }\n }\n if (method == HttpMethod.POST && requestParameters != null && requestParameters.size() > 0) {\n OutputStream os = null;\n OutputStreamWriter writer = null;\n try {\n conn.setDoOutput(true);\n os = conn.getOutputStream();\n writer = new OutputStreamWriter(os);\n for (String key : requestParameters.keySet()) {\n writer.append(key);\n writer.append(\"String_Node_Str\");\n writer.append(requestParameters.get(key).toString());\n }\n } finally {\n if (writer != null) {\n try {\n writer.close();\n } catch (Exception e) {\n }\n }\n if (os != null) {\n try {\n os.close();\n } catch (Exception e) {\n }\n }\n }\n }\n conn.connect();\n response.setStatusCode(conn.getResponseCode());\n response.setHeaders(conn.getHeaderFields());\n response.setContent(getResponseCotent(conn, charset));\n return response;\n}\n"
|
"public void shutdownCompleted(final ShutdownSignalException exception) {\n AmqpAccessor.this.shouldReconnect = true;\n if (!exception.isInitiatedByApplication()) {\n AmqpAccessor.this.callbacks.handleException(exception, \"String_Node_Str\");\n AmqpAccessor.this.disconnect();\n }\n}\n"
|
"public static SessionTreeNode getSessionTreeNode(DatabaseConnection dbconnection, RepositoryNode repositoryNode, String selectedContext) throws Exception {\n IMetadataConnection iMetadataConnection = null;\n iMetadataConnection = ConvertionHelper.convert(dbconnection, false, selectedContext);\n String url = dbconnection.getURL();\n if (url == null || url.equals(\"String_Node_Str\")) {\n url = iMetadataConnection.getUrl();\n }\n SQLConnection connection = null;\n DriverShim wapperDriver = null;\n List list = createSQLConnection(dbconnection, selectedContext, iMetadataConnection);\n if (list != null && list.size() > 0) {\n for (int i = 0; i < list.size(); i++) {\n if (list.get(i) instanceof SQLConnection) {\n connection = (SQLConnection) list.get(i);\n }\n if (list.get(i) instanceof DriverShim) {\n wapperDriver = (DriverShim) list.get(i);\n }\n }\n }\n ISQLAlias alias = createSQLAlias(\"String_Node_Str\", url, dbconnection.getUsername(), dbconnection.getPassword(), dbconnection.getSID() == null || dbconnection.getSID().length() == 0 ? (dbconnection.getDatasourceName() == null || dbconnection.getDatasourceName().length() == 0 ? \"String_Node_Str\" : dbconnection.getDatasourceName()) : dbconnection.getSID());\n SessionTreeModel stm = new SessionTreeModel();\n SessionTreeNode session;\n if (wapperDriver != null && (iMetadataConnection.getDriverClass().equals(EDatabase4DriverClassName.JAVADB_EMBEDED.getDriverClass()) || iMetadataConnection.getDbType().equals(EDatabaseTypeName.JAVADB_EMBEDED.getDisplayName()) || iMetadataConnection.getDbType().equals(EDatabaseTypeName.JAVADB_DERBYCLIENT.getDisplayName()) || iMetadataConnection.getDbType().equals(EDatabaseTypeName.JAVADB_JCCJDBC.getDisplayName()) || iMetadataConnection.getDbType().equals(EDatabaseTypeName.HSQLDB_IN_PROGRESS.getDisplayName()))) {\n session = stm.createSessionTreeNode(new SQLConnection[] { connection, connection }, alias, null, dbconnection.getPassword(), repositoryNode, wapperDriver);\n } else {\n session = stm.createSessionTreeNode(new SQLConnection[] { connection, connection }, alias, null, dbconnection.getPassword(), repositoryNode);\n }\n return session;\n}\n"
|
"public static TableId getConfigTableId(String namespace) {\n return TableId.from(namespace, QueueConstants.STATE_STORE_NAME + \"String_Node_Str\" + HBaseQueueDatasetModule.STATE_STORE_EMBEDDED_TABLE_NAME);\n}\n"
|
"public void up() {\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n logger = LogManager.getLogger(getClass());\n}\n"
|
"public int process(Callback[] callbacks, int state) throws LoginException {\n switch(state) {\n case STATE_BEGIN:\n if (!clientSideScriptEnabled || clientSideScript.isEmpty()) {\n clientSideScript = \"String_Node_Str\";\n }\n substituteUIStrings();\n return STATE_RUN_SCRIPT;\n case STATE_RUN_SCRIPT:\n Bindings scriptVariables = new SimpleBindings();\n scriptVariables.put(\"String_Node_Str\", getScriptHttpRequestWrapper());\n scriptVariables.put(LOGGER_VARIABLE_NAME, DEBUG);\n scriptVariables.put(STATE_VARIABLE_NAME, state);\n scriptVariables.put(USERNAME_VARIABLE_NAME, userName);\n scriptVariables.put(SUCCESS_ATTR_NAME, SUCCESS_VALUE);\n scriptVariables.put(FAILED_ATTR_NAME, FAILURE_VALUE);\n scriptVariables.put(HTTP_CLIENT_VARIABLE_NAME, httpClient);\n scriptVariables.put(HTTP_CLIENT_REQUEST_VARIABLE_NAME, httpClientRequest);\n scriptVariables.put(IDENTITY_REPOSITORY, identityRepository);\n try {\n scriptEvaluator.evaluateScript(serverSideScript, scriptVariables);\n } catch (ScriptException e) {\n DEBUG.message(\"String_Node_Str\", e);\n throw new AuthLoginException(\"String_Node_Str\");\n }\n state = ((Number) scriptVariables.get(STATE_VARIABLE_NAME)).intValue();\n userName = (String) scriptVariables.get(USERNAME_VARIABLE_NAME);\n if (state != SUCCESS_VALUE) {\n throw new AuthLoginException(\"String_Node_Str\");\n }\n return state;\n default:\n throw new AuthLoginException(\"String_Node_Str\");\n }\n}\n"
|
"private void handleResponse(Operation op) throws Exception {\n boolean returnsResponse = op.returnsResponse();\n Object response = null;\n if (op instanceof BackupAwareOperation) {\n BackupAwareOperation backupAwareOp = (BackupAwareOperation) op;\n int syncBackupCount = 0;\n if (backupAwareOp.shouldBackup()) {\n syncBackupCount = operationBackupHandler.backup(backupAwareOp);\n }\n if (returnsResponse) {\n response = new NormalResponse(op.getResponse(), op.getCallId(), syncBackupCount, op.isUrgent());\n }\n }\n if (returnsResponse) {\n if (response == null) {\n response = op.getResponse();\n }\n ResponseHandler responseHandler = op.getResponseHandler();\n if (responseHandler == null) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n responseHandler.sendResponse(response);\n }\n}\n"
|
"private void injectFields(Finder finder) {\n Field[] fields = clazz.getDeclaredFields();\n for (Field field : fields) {\n Annotation[] annotations = field.getAnnotations();\n View view = null;\n for (Annotation annotation : annotations) {\n if (annotation.annotationType() == InjectView.class) {\n int id = ((InjectView) annotation).id();\n view = findViewByAnnotationId(id, field, finder);\n if (view == null) {\n throw new InjectException(\"String_Node_Str\" + field.getName());\n }\n injectIntoField(field, view);\n } else if (annotation.annotationType() == InjectViews.class) {\n String fieldTypeName = field.getType().getName();\n if (fieldTypeName.startsWith(\"String_Node_Str\") || fieldTypeName.startsWith(\"String_Node_Str\")) {\n int[] ids = ((InjectViews) annotation).ids();\n List<View> views = new ArrayList<View>();\n for (int id : ids) {\n view = findViewByAnnotationId(id, field, finder);\n if (view == null) {\n throw new InjectException(\"String_Node_Str\" + field.getName() + \"String_Node_Str\" + id);\n }\n views.add(view);\n }\n if (fieldTypeName.startsWith(\"String_Node_Str\")) {\n View[] v = (View[]) Array.newInstance(field.getType().getComponentType(), views.size());\n injectListIntoField(field, views.toArray(v));\n } else if (fieldTypeName.startsWith(\"String_Node_Str\")) {\n injectIntoField(field, views);\n }\n } else {\n throw new InjectException(\"String_Node_Str\" + field.getName() + \"String_Node_Str\");\n }\n } else if (annotation.annotationType() == InjectResource.class) {\n Object ressource = findResource(field.getType(), field, (InjectResource) annotation);\n injectIntoField(field, ressource);\n } else if (annotation.annotationType() == InjectSystemService.class) {\n String serviceName = ((InjectSystemService) annotation).value();\n Object service = context.getSystemService(serviceName);\n injectIntoField(field, service);\n } else if (annotation.annotationType() == InjectExtra.class) {\n String extraKey = ((InjectExtra) annotation).key();\n if (StringUtils.isBlank(extraKey)) {\n extraKey = field.getName();\n }\n } else if (annotation.annotationType() == InjectSupportFragment.class) {\n int id = ((InjectSupportFragment) annotation).id();\n Fragment fragment = findSupportFragment(field, id);\n injectIntoField(field, fragment);\n }\n }\n }\n}\n"
|
"private static List createRelationalMeasures(ICubeQueryDefinition queryDefn, IBaseExpression expression, ScriptContext cx) throws DataException {\n List<IMeasureDefinition> measures = new ArrayList<IMeasureDefinition>();\n List<IScriptExpression> exprTextList = getExprTextList(expression);\n for (int i = 0; i < exprTextList.size(); i++) {\n String exprText = (String) exprTextList.get(i);\n String measureName = OlapExpressionCompiler.getReferencedScriptObject(exprText, ScriptConstants.MEASURE_SCRIPTABLE);\n if (measureName != null && measureName.trim().length() > 0) {\n List existMeasures = queryDefn.getMeasures();\n boolean exist = false;\n for (int j = 0; j < existMeasures.size(); j++) {\n if (((IMeasureDefinition) existMeasures.get(j)).getName().equals(measureName)) {\n exist = true;\n break;\n }\n }\n if (!exist) {\n measures.add(queryDefn.createMeasure(measureName));\n }\n }\n }\n return measures;\n}\n"
|
"boolean shouldDestroy() {\n if (willExpireFlag == false) {\n return false;\n }\n if (!isTimedOut()) {\n if (isInvalid()) {\n if (checkInvalidSessionDefaultIdleTime()) {\n setState(Session.DESTROYED);\n ss.sendEvent(this, SessionEvent.DESTROY);\n return true;\n } else {\n return false;\n }\n }\n if (getTimeLeft() == 0) {\n changeStateAndNotify(SessionEvent.MAX_TIMEOUT);\n return false;\n }\n if (getIdleTime() >= maxIdleTime * 60 && sessionState != Session.INACTIVE) {\n changeStateAndNotify(SessionEvent.IDLE_TIMEOUT);\n return false;\n }\n return false;\n } else {\n if (getTimeLeftBeforePurge() <= 0) {\n SessionService.getSessionService().logEvent(this, SessionEvent.DESTROY);\n setState(Session.DESTROYED);\n SessionService.getSessionService().sendEvent(this, SessionEvent.DESTROY);\n return true;\n } else {\n return false;\n }\n }\n}\n"
|
"protected Command createButtonCommand(Button button) {\n if (checkForRepositoryShema(button)) {\n return null;\n }\n Button inputButton = button;\n IElementParameter switchParam = elem.getElementParameter(EParameterName.REPOSITORY_ALLOW_AUTO_SWITCH.getName());\n if (inputButton.getData(NAME).equals(SCHEMA)) {\n Map<INode, Map<IMetadataTable, Boolean>> inputInfos = new HashMap<INode, Map<IMetadataTable, Boolean>>();\n INode node;\n if (elem instanceof Node) {\n node = (INode) elem;\n } else {\n node = ((IConnection) elem).getSource();\n }\n IMetadataTable inputMetadata = null, inputMetaCopy = null;\n Connection inputConec = null;\n String propertyName = (String) inputButton.getData(PARAMETER_NAME);\n IElementParameter param = node.getElementParameter(propertyName);\n IElementParameter connectionParam = param.getChildParameters().get(EParameterName.CONNECTION.getName());\n String connectionName = null;\n if (connectionParam != null) {\n connectionName = (String) connectionParam.getValue();\n }\n Object obj = button.getData(FORCE_READ_ONLY);\n boolean forceReadOnly = false;\n if (obj != null) {\n forceReadOnly = (Boolean) obj;\n }\n boolean inputReadOnly = false, outputReadOnly = false, inputReadOnlyNode = false, inputReadOnlyParam = false;\n for (Connection connec : (List<Connection>) node.getIncomingConnections()) {\n if (connec.isActivate() && (connec.getLineStyle().equals(EConnectionType.FLOW_MAIN) || connec.getLineStyle().equals(EConnectionType.TABLE) || connec.getLineStyle().equals(EConnectionType.FLOW_MERGE) || connec.getLineStyle() == EConnectionType.FLOW_REF)) {\n if (connectionName != null && !connec.getName().equals(connectionName)) {\n continue;\n }\n inputMetadata = connec.getMetadataTable();\n inputMetaCopy = inputMetadata.clone();\n inputConec = connec;\n if (connec.getSource().isReadOnly()) {\n inputReadOnlyNode = true;\n } else {\n for (IElementParameter curParam : connec.getSource().getElementParameters()) {\n if (curParam.getFieldType() == EParameterFieldType.SCHEMA_REFERENCE) {\n if (curParam.isReadOnly()) {\n inputReadOnlyParam = true;\n }\n }\n }\n }\n if (inputMetadata != null) {\n for (IMetadataColumn column : inputMetadata.getListColumns(true)) {\n IMetadataColumn columnCopied = inputMetaCopy.getColumn(column.getLabel());\n columnCopied.setCustom(column.isCustom());\n columnCopied.setReadOnly(column.isReadOnly());\n }\n inputMetaCopy.setReadOnly(inputMetadata.isReadOnly());\n inputReadOnly = prepareReadOnlyTable(inputMetaCopy, inputReadOnlyParam, inputReadOnlyNode);\n }\n Map<IMetadataTable, Boolean> oneInput = new HashMap<IMetadataTable, Boolean>();\n oneInput.put(inputMetaCopy, inputReadOnly);\n inputInfos.put(connec.getSource(), oneInput);\n }\n }\n if (connectionParam != null && inputMetadata == null) {\n MessageDialog.openError(button.getShell(), Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"));\n return null;\n }\n IMetadataTable originaleMetadataTable = getMetadataTableFromXml(node);\n IMetadataTable originaleOutputTable = node.getMetadataFromConnector(param.getContext());\n IElementParameter schemaParam = param.getChildParameters().get(\"String_Node_Str\");\n if (!param.getContext().equals(schemaParam.getContext())) {\n schemaParam = param.getChildParameters().get(\"String_Node_Str\");\n }\n if (schemaParam != null && EmfComponent.REPOSITORY.equals(schemaParam.getValue())) {\n if (originaleOutputTable != null && originaleOutputTable instanceof MetadataTable) {\n ((MetadataTable) originaleOutputTable).setRepository(true);\n }\n } else if (schemaParam != null && EmfComponent.BUILTIN.equals(schemaParam.getValue())) {\n if (originaleOutputTable != null && originaleOutputTable instanceof MetadataTable) {\n ((MetadataTable) originaleOutputTable).setRepository(false);\n }\n }\n IMetadataTable outputMetaCopy = originaleOutputTable.clone(true);\n for (IMetadataColumn column : originaleOutputTable.getListColumns(true)) {\n IMetadataColumn columnCopied = outputMetaCopy.getColumn(column.getLabel());\n columnCopied.setCustom(column.isCustom());\n columnCopied.setReadOnly(column.isReadOnly());\n }\n outputMetaCopy.setReadOnly(originaleOutputTable.isReadOnly() || param.isReadOnly(node.getElementParametersWithChildrens()));\n IElementParameter schemaTypeParam = param.getChildParameters().get(\"String_Node_Str\");\n List<IElementParameterDefaultValue> defaultValues = schemaTypeParam.getDefaultValues();\n for (IElementParameterDefaultValue elementParameterDefaultValue : defaultValues) {\n if (elementParameterDefaultValue.getDefaultValue() instanceof MetadataTable) {\n MetadataTable table = (MetadataTable) elementParameterDefaultValue.getDefaultValue();\n outputMetaCopy.setReadOnlyColumnPosition(table.getReadOnlyColumnPosition());\n break;\n }\n }\n outputMetaCopy.sortCustomColumns();\n if (!forceReadOnly) {\n outputReadOnly = prepareReadOnlyTable(outputMetaCopy, param.isReadOnly(), node.isReadOnly());\n } else {\n outputReadOnly = true;\n }\n MetadataDialog metaDialog = null;\n if (inputMetadata != null) {\n if (inputInfos != null && inputInfos.size() > 1 && connectionName == null) {\n MetadataDialogForMerge metaDialogForMerge = new MetadataDialogForMerge(composite.getShell(), inputInfos, outputMetaCopy, node, getCommandStack());\n metaDialogForMerge.setText(Messages.getString(\"String_Node_Str\") + node.getLabel());\n metaDialogForMerge.setInputReadOnly(inputReadOnly);\n metaDialogForMerge.setOutputReadOnly(outputReadOnly);\n if (metaDialogForMerge.open() == MetadataDialogForMerge.OK) {\n outputMetaCopy = metaDialogForMerge.getOutputMetaData();\n boolean modified = false;\n if (!outputMetaCopy.sameMetadataAs(originaleOutputTable, IMetadataColumn.OPTIONS_NONE)) {\n modified = true;\n } else {\n if (inputMetadata != null) {\n Set<INode> inputNodes = inputInfos.keySet();\n for (INode inputNode : inputNodes) {\n Map<IMetadataTable, Boolean> oneInput = inputInfos.get(inputNode);\n inputMetaCopy = (IMetadataTable) oneInput.keySet().toArray()[0];\n if (!inputMetaCopy.sameMetadataAs(inputNode.getMetadataList().get(0), IMetadataColumn.OPTIONS_NONE)) {\n modified = true;\n }\n }\n }\n }\n if (modified) {\n if (switchParam != null) {\n switchParam.setValue(Boolean.FALSE);\n }\n Command changeMetadataCommand = null;\n if (inputInfos.isEmpty()) {\n changeMetadataCommand = new ChangeMetadataCommand(node, param, null, null, null, originaleOutputTable, outputMetaCopy);\n } else {\n Set<INode> inputNodes = inputInfos.keySet();\n int count = 0;\n for (INode inputNode : inputNodes) {\n Map<IMetadataTable, Boolean> oneInput = inputInfos.get(inputNode);\n inputMetaCopy = (IMetadataTable) oneInput.keySet().toArray()[0];\n if (count == 0) {\n changeMetadataCommand = new ChangeMetadataCommand(node, param, inputNode, inputNode.getMetadataList().get(0), inputMetaCopy, originaleOutputTable, outputMetaCopy);\n } else {\n changeMetadataCommand = changeMetadataCommand.chain(new ChangeMetadataCommand(node, param, inputNode, inputNode.getMetadataList().get(0), inputMetaCopy, originaleOutputTable, outputMetaCopy));\n }\n count++;\n }\n }\n return changeMetadataCommand;\n }\n }\n } else {\n INode inputNode = (inputConec.getSource());\n if (inputMetaCopy.getAttachedConnector() == null) {\n INodeConnector mainConnector;\n if (inputNode.isELTComponent()) {\n mainConnector = inputNode.getConnectorFromType(EConnectionType.TABLE);\n } else {\n mainConnector = inputNode.getConnectorFromType(EConnectionType.FLOW_MAIN);\n }\n inputMetaCopy.setAttachedConnector(mainConnector.getName());\n }\n metaDialog = new MetadataDialog(composite.getShell(), inputMetaCopy, inputNode, outputMetaCopy, node, getCommandStack());\n }\n } else {\n metaDialog = new MetadataDialog(composite.getShell(), outputMetaCopy, node, getCommandStack());\n }\n if (metaDialog != null) {\n metaDialog.setText(Messages.getString(\"String_Node_Str\") + node.getLabel());\n metaDialog.setInputReadOnly(inputReadOnly);\n metaDialog.setOutputReadOnly(outputReadOnly);\n if (metaDialog.open() == MetadataDialog.OK) {\n inputMetaCopy = metaDialog.getInputMetaData();\n outputMetaCopy = metaDialog.getOutputMetaData();\n boolean modified = false;\n if (!outputMetaCopy.sameMetadataAs(originaleOutputTable, IMetadataColumn.OPTIONS_NONE)) {\n modified = true;\n } else {\n if (inputMetadata != null) {\n if (!inputMetaCopy.sameMetadataAs(inputMetadata, IMetadataColumn.OPTIONS_NONE)) {\n modified = true;\n }\n }\n }\n if (modified) {\n if (switchParam != null) {\n switchParam.setValue(Boolean.FALSE);\n }\n INode inputNode = null;\n if (inputConec != null) {\n inputNode = inputConec.getSource();\n }\n if (param instanceof GenericElementParameter) {\n GenericElementParameter genericElementParameter = (GenericElementParameter) param;\n String paramName = genericElementParameter.getName();\n ComponentProperties componentProperties = node.getComponentProperties();\n if (componentProperties != null) {\n org.talend.daikon.properties.property.Property schemaProperty = componentProperties.getValuedProperty(paramName);\n if (schemaProperty != null) {\n SchemaUtils.updateComponentSchema(node, outputMetaCopy, null);\n }\n }\n }\n if (node.getComponent().isSchemaAutoPropagated()) {\n ChangeMetadataCommand changeMetadataCommand = new ChangeMetadataCommand(node, param, inputNode, inputMetadata, inputMetaCopy, originaleOutputTable, outputMetaCopy);\n return changeMetadataCommand;\n } else {\n ChangeMetadataCommand changeMetadataCommand = new ChangeMetadataCommand(node, param, inputNode, inputMetadata, inputMetaCopy, originaleOutputTable, outputMetaCopy);\n changeMetadataCommand.setPropagate(Boolean.FALSE);\n return changeMetadataCommand;\n }\n }\n }\n }\n } else if (inputButton.getData(NAME).equals(RETRIEVE_SCHEMA)) {\n Node node = (Node) elem;\n final Command cmd = RetrieveSchemaHelper.retrieveSchemasCommand(node);\n if (switchParam != null) {\n switchParam.setValue(Boolean.FALSE);\n }\n return cmd;\n } else if (inputButton.getData(NAME).equals(RESET_COLUMNS)) {\n Node node = (Node) elem;\n String propertyName = (String) inputButton.getData(PARAMETER_NAME);\n IElementParameter param = node.getElementParameter(propertyName);\n final Command cmd = SynchronizeSchemaHelper.createCommand(node, param);\n if (switchParam != null) {\n switchParam.setValue(Boolean.FALSE);\n }\n return cmd;\n } else if (button.getData(NAME).equals(REPOSITORY_CHOICE)) {\n String paramName = (String) button.getData(PARAMETER_NAME);\n IElementParameter schemaParam = elem.getElementParameter(paramName);\n ERepositoryObjectType type = ERepositoryObjectType.METADATA_CON_TABLE;\n String filter = schemaParam.getFilter();\n RepositoryReviewDialog dialog = new RepositoryReviewDialog(button.getShell(), type, filter);\n if (dialog.open() == RepositoryReviewDialog.OK) {\n RepositoryNode node = dialog.getResult();\n while (node.getObject().getProperty().getItem() == null || (!(node.getObject().getProperty().getItem() instanceof ConnectionItem))) {\n node = node.getParent();\n }\n IRepositoryViewObject object = dialog.getResult().getObject();\n Property property = object.getProperty();\n String id = property.getId();\n String name = object.getLabel();\n if (name != null) {\n if (elem instanceof Node) {\n String value = id + \"String_Node_Str\" + name;\n paramName = paramName + \"String_Node_Str\" + EParameterName.REPOSITORY_SCHEMA_TYPE.getName();\n Command selectorCommand = new PropertyChangeCommand(elem, paramName, TalendTextUtils.addQuotes(value));\n executeCommand(selectorCommand);\n }\n }\n String value = id + \"String_Node_Str\" + name;\n String fullParamName = paramName + \"String_Node_Str\" + getRepositoryChoiceParamName();\n org.talend.core.model.metadata.builder.connection.Connection connection = null;\n if (elem instanceof Node) {\n IMetadataTable repositoryMetadata = MetadataToolHelper.getMetadataFromRepository(value);\n connection = MetadataToolHelper.getConnectionFromRepository(value);\n boolean isValRulesLost = false;\n IRepositoryViewObject currentValRuleObj = ValidationRulesUtil.getCurrentValidationRuleObjs(elem);\n if (currentValRuleObj != null) {\n List<IRepositoryViewObject> valRuleObjs = ValidationRulesUtil.getRelatedValidationRuleObjs(value);\n if (!ValidationRulesUtil.isCurrentValRuleObjInList(valRuleObjs, currentValRuleObj)) {\n if (!MessageDialog.openConfirm(button.getShell(), Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"))) {\n return null;\n } else {\n isValRulesLost = true;\n }\n }\n }\n if (repositoryMetadata == null) {\n repositoryMetadata = new MetadataTable();\n }\n if (switchParam != null) {\n switchParam.setValue(Boolean.FALSE);\n }\n CompoundCommand cc = new CompoundCommand();\n RepositoryChangeMetadataCommand changeMetadataCommand = new RepositoryChangeMetadataCommand((Node) elem, fullParamName, value, repositoryMetadata, null, null);\n changeMetadataCommand.setConnection(connection);\n cc.add(changeMetadataCommand);\n if (isValRulesLost) {\n ValidationRulesUtil.appendRemoveValidationRuleCommands(cc, elem);\n }\n return cc;\n }\n }\n } else if (button.getData(NAME).equals(COPY_CHILD_COLUMNS)) {\n String paramName = (String) button.getData(PARAMETER_NAME);\n IElementParameter param = elem.getElementParameter(paramName);\n IElementParameter processParam = elem.getElementParameterFromField(EParameterFieldType.PROCESS_TYPE);\n IElementParameter processIdParam = processParam.getChildParameters().get(EParameterName.PROCESS_TYPE_PROCESS.getName());\n String id = (String) processIdParam.getValue();\n Item item = ItemCacheManager.getProcessItem(id);\n Node node = (Node) elem;\n copySchemaFromChildJob(node, item);\n MetadataDialog metaDialog = new MetadataDialog(composite.getShell(), node.getMetadataList().get(0), node, getCommandStack());\n metaDialog.setText(Messages.getString(\"String_Node_Str\") + node.getLabel());\n if (metaDialog.open() == MetadataDialog.OK) {\n IMetadataTable outputMetaData = metaDialog.getOutputMetaData();\n return new ChangeMetadataCommand(node, param, null, outputMetaData);\n }\n }\n return null;\n}\n"
|
"public void onInventoryClick(InventoryClickEvent event) {\n if (!(event.getWhoClicked() instanceof Player))\n return;\n Player p = (Player) event.getWhoClicked();\n if (p.getGameMode().equals(GameMode.CREATIVE) && event.getView().getType().equals(InventoryType.PLAYER))\n return;\n if ((p.getGameMode().equals(GameMode.SURVIVAL) || p.getGameMode().equals(GameMode.ADVENTURE)) && event.getView().getType().equals(InventoryType.CRAFTING))\n return;\n tNPC economyNpc = playerInteraction.get(p.getName());\n if (economyNpc == null)\n return;\n if (economyNpc.locked()) {\n economyNpc.managerMode(event);\n return;\n }\n if (economyNpc instanceof Banker) {\n if (((Banker) economyNpc).getStatus().settings()) {\n economyNpc.settingsMode(event);\n return;\n }\n }\n economyNpc.simpleMode(event);\n}\n"
|
"public void testIssue1019() {\n Config config = new Config();\n MapStoreConfig mapStoreConfig = new MapStoreConfig();\n mapStoreConfig.setImplementation(new MapStoreAdapter<String, String>());\n config.getMapConfig(\"String_Node_Str\").setMapStoreConfig(mapStoreConfig);\n TestHazelcastInstanceFactory nodeFactory = createHazelcastInstanceFactory(2);\n HazelcastInstance instance = nodeFactory.newHazelcastInstance(config);\n HazelcastInstance instance2 = nodeFactory.newHazelcastInstance(config);\n final IMap map = instance.getMap(\"String_Node_Str\");\n for (int i = 0; i < 1000; i++) {\n map.put(i, i);\n }\n for (int i = 10000; i < 10100; i++) {\n map.get(i);\n }\n assertEquals(1000, map.values().size());\n}\n"
|
"private Callable<Integer> createTrainAndEvalTasks(final String subModelName, final String evalSetName) throws IOException {\n if (this.isToShuffleData) {\n ModelConfig subModelConfig = CommonUtils.loadModelConfig(subModelName + File.separator + Constants.MODEL_CONFIG_JSON_FILE_NAME, RawSourceData.SourceType.LOCAL);\n subModelConfig.getTrain().setCustomPaths(null);\n saveModelConfig(subModelName, subModelConfig);\n }\n return new Callable<Integer>() {\n\n public Integer call() {\n try {\n if (isToShuffleData) {\n return ProcessManager.runShellProcess(subModelName, new String[][] { new String[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" }, new String[] { \"String_Node_Str\", \"String_Node_Str\" }, new String[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", evalSetName } });\n } else {\n return ProcessManager.runShellProcess(subModelName, new String[][] { new String[] { \"String_Node_Str\", \"String_Node_Str\" }, new String[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", evalSetName } });\n }\n } catch (IOException e) {\n LOG.error(\"String_Node_Str\", e);\n return 1;\n }\n }\n };\n}\n"
|
"public static boolean FullHashCheck(List<MyFile> listoffiles, int i) throws Exception {\n boolean pass = true;\n DbConnect dbconnect = new DbConnect();\n List<MyFile> list = dbconnect.selectFullQuery(i);\n for (MyFile myfile : listoffiles) {\n for (MyFile dbfile : list) {\n if (myfile.getName().equalsIgnoreCase(dbfile.getName()) && myfile.getHash().equalsIgnoreCase(dbfile.getHash().replaceAll(\"String_Node_Str\", \"String_Node_Str\"))) {\n pass = true;\n restoreLog.info(\"String_Node_Str\" + myfile.getName());\n } else {\n pass = false;\n }\n }\n }\n return pass;\n}\n"
|
"private void processBytes(int start, int length) {\n int len = 0;\n int chunkLen = 0;\n BigInteger mantisa;\n BigInteger total;\n BigInteger word;\n mantisa = new BigInteger(\"String_Node_Str\");\n total = new BigInteger(\"String_Node_Str\");\n if (length == 1 && lastMode == EncodingMode.TEX) {\n codeWords[codeWordCount++] = 913;\n codeWords[codeWordCount++] = inputData[start];\n } else {\n if (inputData.length % 6 == 0) {\n codeWords[codeWordCount++] = 924;\n } else {\n codeWords[codeWordCount++] = 901;\n }\n while (len < length) {\n chunkLen = length - len;\n if (6 <= chunkLen) {\n chunkLen = 6;\n len += chunkLen;\n total = BigInteger.valueOf(0);\n while ((chunkLen--) != 0) {\n mantisa = BigInteger.valueOf(inputData[start++]);\n total = total.or(mantisa.shiftLeft(chunkLen * 8));\n }\n chunkLen = 5;\n while ((chunkLen--) != 0) {\n word = total.mod(BigInteger.valueOf(900));\n codeWords[codeWordCount + chunkLen] = word.intValue();\n total = total.divide(BigInteger.valueOf(900));\n }\n codeWordCount += 5;\n } else {\n len += chunkLen;\n while ((chunkLen--) != 0) {\n codeWords[codeWordCount++] = inputData[start++];\n }\n }\n }\n }\n}\n"
|
"float axisY4canvasView(float y) {\n return axisBounds.height() * (yShift + y / yZoom) / canvasHeight + axisBounds.top;\n}\n"
|
"private String getMatchingRowsStatement() {\n String whereClause = \"String_Node_Str\";\n if (Java2SqlType.isDateInSQL(sqltype)) {\n Date date = new Date(entity.getValue());\n whereClause = dbmsLanguage.where() + this.columnName + dbmsLanguage.equal() + date.toString();\n } else {\n double value = Double.valueOf(entity.getValue());\n whereClause = dbmsLanguage.where() + this.columnName + dbmsLanguage.equal() + value;\n }\n TdColumn column = (TdColumn) indicator.getAnalyzedElement();\n return \"String_Node_Str\" + getFullyQualifiedTableName(column) + whereClause;\n}\n"
|
"public String createForm(String patientDocId, String clinicVisitId, Model uiModel, HttpServletRequest httpServletRequest) {\n ClinicVisit clinicVisit = allClinicVisits.get(patientDocId, clinicVisitId);\n final String treatmentAdviceId = clinicVisit.getTreatmentAdviceId();\n TreatmentAdvice adviceForPatient = null;\n if (treatmentAdviceId != null)\n adviceForPatient = allTreatmentAdvices.get(treatmentAdviceId);\n if (adviceForPatient == null)\n adviceForPatient = allTreatmentAdvices.currentTreatmentAdvice(patientDocId);\n if (adviceForPatient != null) {\n treatmentAdviceController.show(adviceForPatient.getId(), uiModel);\n final boolean wasVisitDetailsEdited = (clinicVisit.getVisitDate() != null);\n if (wasVisitDetailsEdited)\n return redirectToShowClinicVisitUrl(clinicVisitId, patientDocId, httpServletRequest);\n } else {\n treatmentAdviceController.createForm(patientDocId, uiModel);\n }\n uiModel.addAttribute(\"String_Node_Str\", patientDocId);\n uiModel.addAttribute(\"String_Node_Str\", new ClinicVisitUIModel(clinicVisit));\n labResultsController.createForm(patientDocId, uiModel);\n vitalStatisticsController.createForm(patientDocId, uiModel);\n opportunisticInfectionsController.createForm(clinicVisit, uiModel);\n return \"String_Node_Str\";\n}\n"
|
"VersionedValue getValue(K key, long maxLog, VersionedValue data) {\n while (true) {\n if (data == null) {\n return null;\n }\n long id = data.operationId;\n if (id == 0) {\n return data;\n }\n tx = getTransactionId(id);\n if (tx == transaction.transactionId) {\n if (getLogId(id) < maxLog) {\n return data;\n }\n }\n Object[] d;\n synchronized (transaction.store.undoLog) {\n d = transaction.store.undoLog.get(id);\n }\n if (d == null) {\n data = map.get(key);\n } else {\n data = (VersionedValue) d[2];\n }\n }\n throw DataUtils.newIllegalStateException(DataUtils.ERROR_TRANSACTION_CORRUPT, \"String_Node_Str\", key);\n}\n"
|
"public void fillPaymentModeAndCondition(ActionRequest request, ActionResponse response) {\n Invoice invoice = request.getContext().asType(Invoice.class);\n if (invoice.getOperationTypeSelect() != null) {\n try {\n PaymentMode paymentMode = InvoiceToolService.getPaymentMode(invoice);\n PaymentCondition paymentCondition = InvoiceToolService.getPaymentCondition(invoice);\n response.setValue(\"String_Node_Str\", paymentMode);\n response.setValue(\"String_Node_Str\", paymentCondition);\n } catch (Exception e) {\n TraceBackService.trace(response, e);\n }\n }\n}\n"
|
"public void onStartInput(EditorInfo attribute, boolean restarting) {\n if (DEBUG)\n Log.d(TAG, \"String_Node_Str\" + attribute.imeOptions + \"String_Node_Str\" + attribute.inputType + \"String_Node_Str\" + restarting + \"String_Node_Str\");\n super.onStartInput(attribute, restarting);\n mKeyboardSwitcher.makeKeyboards(false);\n resetComposing();\n TextEntryState.newSession(this);\n if (!restarting) {\n mMetaState = 0;\n }\n mPredictionOn = false;\n mCompletionOn = false;\n mCompletions = null;\n mCapsLock = false;\n switch(attribute.inputType & EditorInfo.TYPE_MASK_CLASS) {\n case EditorInfo.TYPE_CLASS_NUMBER:\n case EditorInfo.TYPE_CLASS_DATETIME:\n case EditorInfo.TYPE_CLASS_PHONE:\n mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_PHONE, attribute);\n break;\n case EditorInfo.TYPE_CLASS_TEXT:\n mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_TEXT, attribute);\n mPredictionOn = true;\n final int variation = attribute.inputType & EditorInfo.TYPE_MASK_VARIATION;\n if (variation == EditorInfo.TYPE_TEXT_VARIATION_PASSWORD || variation == EditorInfo.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD) {\n mPredictionOn = false;\n }\n if ((!AnySoftKeyboardConfiguration.getInstance().getInsertSpaceAfterCandidatePick()) || variation == EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS || variation == EditorInfo.TYPE_TEXT_VARIATION_PERSON_NAME) {\n mAutoSpace = false;\n } else {\n mAutoSpace = true;\n }\n if (variation == EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS) {\n mPredictionOn = false;\n mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_EMAIL, attribute);\n } else if (variation == EditorInfo.TYPE_TEXT_VARIATION_URI) {\n mPredictionOn = false;\n mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_URL, attribute);\n } else if (variation == EditorInfo.TYPE_TEXT_VARIATION_SHORT_MESSAGE) {\n mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_IM, attribute);\n } else if (variation == EditorInfo.TYPE_TEXT_VARIATION_FILTER) {\n mPredictionOn = false;\n }\n if ((attribute.inputType & EditorInfo.TYPE_TEXT_FLAG_AUTO_COMPLETE) != 0) {\n mPredictionOn = false;\n mCompletionOn = true && isFullscreenMode();\n }\n updateShiftKeyState(attribute);\n break;\n default:\n mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_TEXT, attribute);\n updateShiftKeyState(attribute);\n }\n mComposing.setLength(0);\n mPredicting = false;\n setCandidatesViewShown(false);\n if (mSuggest != null) {\n mSuggest.setCorrectionMode(mCorrectionMode);\n }\n mPredictionOn = mPredictionOn && mCorrectionMode > 0;\n if (mCandidateView != null)\n mCandidateView.setSuggestions(null, false, false, false);\n if (TRACE_SDCARD)\n Debug.startMethodTracing(\"String_Node_Str\");\n}\n"
|
"public ListenableFuture<List<Row>> readRowsAsync(final ReadRowsRequest request) {\n final Call<ReadRowsRequest, ReadRowsResponse> readRowsCall = channel.newCall(BigtableServiceGrpc.CONFIG.readRows);\n CollectingStreamObserver<ReadRowsResponse> responseCollector = new CollectingStreamObserver<>(readRowsCall);\n Calls.asyncServerStreamingCall(readRowsCall, request, responseCollector);\n return Futures.transform(responseCollector.getResponseCompleteFuture(), new Function<List<ReadRowsResponse>, List<Row>>() {\n public List<Row> apply(List<ReadRowsResponse> responses) {\n List<Row> result = new ArrayList<>();\n Iterator<ReadRowsResponse> responseIterator = responses.iterator();\n while (responseIterator.hasNext()) {\n RowMerger currentRowMerger = new RowMerger();\n while (responseIterator.hasNext() && !currentRowMerger.isRowCommitted()) {\n currentRowMerger.addPartialRow(responseIterator.next());\n }\n result.add(currentRowMerger.buildRow());\n }\n return result;\n }\n });\n}\n"
|
"public Expression createScalarExpression(final String expression, final MacroConfiguration macroConfiguration, Set<String> usedMacros) {\n return getOrDefault(\"String_Node_Str\", delegate, expression, false, macroConfiguration, SCALAR_EXPRESSION_SUPPLIER);\n}\n"
|
"void setAppIdleParoleOn(boolean isAppIdleParoleOn) {\n boolean changed = false;\n synchronized (mTrackedTasks) {\n if (mAppIdleParoleOn == isAppIdleParoleOn) {\n return;\n }\n mAppIdleParoleOn = isAppIdleParoleOn;\n for (JobStatus task : mTrackedTasks) {\n String packageName = task.job.getService().getPackageName();\n final boolean appIdle = !mAppIdleParoleOn && mUsageStatsInternal.isAppIdle(packageName, task.uId, task.getUserId());\n if (DEBUG) {\n Slog.d(LOG_TAG, \"String_Node_Str\" + packageName + \"String_Node_Str\" + appIdle);\n }\n if (task.appNotIdleConstraintSatisfied.get() == appIdle) {\n task.appNotIdleConstraintSatisfied.set(!appIdle);\n changed = true;\n }\n }\n }\n if (changed) {\n mStateChangedListener.onControllerStateChanged();\n }\n}\n"
|
"public void run() {\n try {\n mfHttpClientCleanup.returnToken(mfRequester, finalMfResponse);\n } catch (MFHttpException e) {\n MFConfiguration.getStaticMFLogger().e(TAG, e.getMessage(), e);\n }\n}\n"
|
"private ReturnValue runWorkflow(AbstractWorkflowDataModel objectModel) {\n ReturnValue ret = new ReturnValue(ReturnValue.SUCCESS);\n OozieClient wc = new OozieClient(this.dataModel.getEnv().getOOZIE_URL());\n try {\n Properties conf = wc.createConfiguration();\n String app_path = \"String_Node_Str\" + this.dir.getName();\n conf.setProperty(OozieClient.APP_PATH, app_path);\n conf.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n conf.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n conf.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n String jobId = wc.run(conf);\n System.out.println(\"String_Node_Str\");\n while (wc.getJobInfo(jobId).getStatus() == WorkflowJob.Status.RUNNING) {\n System.out.println(\"String_Node_Str\");\n printWorkflowInfo(wc.getJobInfo(jobId));\n Thread.sleep(10 * 1000);\n }\n System.out.println(\"String_Node_Str\");\n printWorkflowInfo(wc.getJobInfo(jobId));\n System.out.println(wc.getJobInfo(jobId));\n } catch (OozieClientException oozieClientException) {\n oozieClientException.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return ret;\n}\n"
|
"public Set<ITypeName> getSuperclasses() {\n return db.getSuperclassNames();\n}\n"
|
"public boolean parse(ParserManager pm, String value, IToken token) throws SyntaxError {\n if (this.mode == 0 || \"String_Node_Str\".equals(value) || \"String_Node_Str\".equals(value) && !this.isInMode(PARAMETERS_2)) {\n pm.popParser(true);\n return true;\n }\n if (this.isInMode(VALUE)) {\n if (this.parsePrimitive(value, token)) {\n this.mode = ACCESS;\n return true;\n } else if (\"String_Node_Str\".equals(value)) {\n this.mode = ACCESS;\n this.value = new ThisValue(token, this.context.getThisType());\n return true;\n } else if (\"String_Node_Str\".equals(value)) {\n this.mode = ACCESS;\n this.value = new SuperValue(token, this.context.getThisType());\n return true;\n } else if (\"String_Node_Str\".equals(value)) {\n this.mode = TUPLE_END;\n this.value = new TupleValue();\n if (!token.next().equals(\"String_Node_Str\")) {\n pm.pushParser(new ExpressionListParser(this.context, (IValueList) this.value));\n }\n return true;\n } else if (\"String_Node_Str\".equals(value)) {\n this.mode = VALUE_2;\n this.value = new StatementList(token);\n if (!token.next().equals(\"String_Node_Str\")) {\n pm.pushParser(new ExpressionListParser(this.context, (IValueList) this.value, true));\n }\n return true;\n } else if (\"String_Node_Str\".equals(value)) {\n ConstructorCall call = new ConstructorCall(token);\n this.mode = PARAMETERS;\n this.value = call;\n pm.pushParser(new TypeParser(this.context, call));\n return true;\n } else if (token.isType(IToken.TYPE_IDENTIFIER) && !token.next().isType(Token.TYPE_OPEN_BRACKET)) {\n this.mode = ACCESS;\n pm.pushParser(new TypeParser(this.context, this), true);\n return true;\n }\n this.mode = ACCESS;\n }\n if (this.isInMode(VALUE_2)) {\n if (\"String_Node_Str\".equals(value)) {\n this.value.expandPosition(token);\n this.mode = ACCESS;\n return true;\n }\n }\n if (this.isInMode(TUPLE_END)) {\n if (\"String_Node_Str\".equals(value)) {\n this.value.expandPosition(token);\n this.mode = ACCESS;\n return true;\n }\n }\n if (this.isInMode(STATEMENT)) {\n if (\"String_Node_Str\".equals(value)) {\n ReturnStatement statement = new ReturnStatement(token);\n this.value = statement;\n pm.pushParser(new ExpressionParser(this.context, statement));\n return true;\n } else if (\"String_Node_Str\".equals(value)) {\n IfStatement statement = new IfStatement(token);\n this.value = statement;\n pm.pushParser(new IfStatementParser(this.context, statement));\n return true;\n }\n }\n if (this.isInMode(ACCESS)) {\n if (\"String_Node_Str\".equals(value)) {\n this.mode = DOT_ACCESS;\n return true;\n }\n if (this.lazy && this.value != null) {\n pm.popParser(true);\n return true;\n }\n this.mode = DOT_ACCESS;\n }\n if (this.isInMode(DOT_ACCESS)) {\n if (token.isType(IToken.TYPE_IDENTIFIER)) {\n IToken next = token.next();\n if (next.isType(IToken.TYPE_OPEN_BRACKET)) {\n MethodCall call = new MethodCall(token, this.value, value);\n this.value = call;\n this.mode = PARAMETERS;\n return true;\n } else if (!next.isType(IToken.TYPE_IDENTIFIER) && !next.isType(IToken.TYPE_CLOSE_BRACKET) && !next.isType(IToken.TYPE_SYMBOL)) {\n MethodCall call = new MethodCall(token, this.value, value);\n call.setSugar(true);\n this.value = call;\n ExpressionParser parser = new ExpressionParser(this.context, call);\n parser.lazy = true;\n pm.pushParser(parser);\n return true;\n } else {\n FieldAccess access = new FieldAccess(token, this.value, value);\n this.value = access;\n this.mode = ACCESS;\n return true;\n }\n }\n }\n if (this.isInMode(PARAMETERS)) {\n if (\"String_Node_Str\".equals(value)) {\n pm.pushParser(new ExpressionListParser(this.context, (IValueList) this.value));\n this.mode = PARAMETERS_2;\n return true;\n }\n }\n if (this.isInMode(PARAMETERS_2)) {\n if (\"String_Node_Str\".equals(value)) {\n this.value.expandPosition(token);\n this.mode = ACCESS;\n return true;\n }\n }\n if (this.value != null) {\n this.value.expandPosition(token);\n pm.popParser(true);\n return true;\n }\n return false;\n}\n"
|
"private Class<?> getTargetReturnType() {\n Type returnType = Type.getReturnType(invocation.getMethodNameAndDescription());\n Class<?> classForType = TypeDescriptor.getClassForType(returnType);\n return classForType;\n}\n"
|
"public void drawText(String text, float textX, float textY, float width, float height, FontInfo fontInfo, Color color, boolean rtl, String link) {\n BaseFont baseFont = fontInfo.getBaseFont();\n String fontName = getFontName(baseFont);\n println(\"String_Node_Str\" + (++shapeCount) + \"String_Node_Str\");\n println(\"String_Node_Str\" + textX + \"String_Node_Str\" + textY + \"String_Node_Str\" + width + \"String_Node_Str\" + height + \"String_Node_Str\");\n println(\"String_Node_Str\");\n println(\"String_Node_Str\");\n println(\"String_Node_Str\");\n println(\"String_Node_Str\" + shapeCount + \"String_Node_Str\");\n println(\"String_Node_Str\" + 0 + \"String_Node_Str\" + \"String_Node_Str\" + fontName + \"String_Node_Str\" + fontInfo.getFontSize() + \"String_Node_Str\" + getColorString(color) + \"String_Node_Str\" + buildI18nAttributes(text, rtl) + \"String_Node_Str\");\n boolean isItalic = fontInfo != null && (fontInfo.getFontStyle() & Font.ITALIC) != 0;\n boolean isBold = fontInfo != null && (fontInfo.getFontStyle() & Font.BOLD) != 0;\n if (isItalic) {\n print(\"String_Node_Str\");\n }\n if (isBold) {\n print(\"String_Node_Str\");\n }\n if (link != null) {\n String hyperlink = link.getLink();\n String tooltip = link.getTooltip();\n if (hyperlink != null) {\n hyperlink = codeLink(hyperlink);\n }\n if (tooltip != null) {\n tooltip = codeLink(tooltip);\n }\n println(\"String_Node_Str\" + link + \"String_Node_Str\" + tooltip + \"String_Node_Str\" + link + \"String_Node_Str\");\n }\n print(getEscapedStr(text));\n if (link != null) {\n print(\"String_Node_Str\");\n }\n if (isBold) {\n print(\"String_Node_Str\");\n }\n if (isItalic) {\n print(\"String_Node_Str\");\n }\n println(\"String_Node_Str\");\n println(\"String_Node_Str\");\n}\n"
|
"public int getString16Length(int pos) {\n return 2 + getShort(pos) * 2;\n}\n"
|
"public void applyORMMetadata(AbstractSession ormSession) {\n Iterator ormDescriptors = ormSession.getDescriptors().values().iterator();\n while (ormDescriptors.hasNext()) {\n ClassDescriptor ormDescriptor = (ClassDescriptor) ormDescriptors.next();\n Class javaClass = ormDescriptor.getJavaClass();\n AbstractSession oxmSession = null;\n try {\n oxmSession = this.getSession(javaClass);\n } catch (XMLMarshalException ex) {\n }\n if (oxmSession != null) {\n ClassDescriptor oxmDescriptor = oxmSession.getDescriptor(javaClass);\n Iterator<DatabaseMapping> ormMappings = ormDescriptor.getMappings().iterator();\n while (ormMappings.hasNext()) {\n DatabaseMapping ormMapping = ormMappings.next();\n DatabaseMapping oxmMapping = oxmDescriptor.getMappingForAttributeName(ormMapping.getAttributeName());\n if (oxmMapping != null) {\n AttributeAccessor oxmAccessor = oxmMapping.getAttributeAccessor();\n OrmAttributeAccessor newAccessor = new OrmAttributeAccessor(ormMapping.getAttributeAccessor(), oxmAccessor);\n if (ormMapping.isOneToOneMapping() && ((OneToOneMapping) ormMapping).usesIndirection()) {\n newAccessor.setValueHolderProperty(true);\n }\n newAccessor.setChangeTracking(ormDescriptor.getObjectChangePolicy().isAttributeChangeTrackingPolicy());\n oxmMapping.setAttributeAccessor(newAccessor);\n AttributeAccessor containerAccessor = null;\n Class containerClass = null;\n if (oxmMapping instanceof XMLCompositeObjectMapping) {\n containerAccessor = ((XMLCompositeObjectMapping) oxmMapping).getInverseReferenceMapping().getAttributeAccessor();\n containerClass = ((XMLCompositeObjectMapping) oxmMapping).getReferenceClass();\n } else if (oxmMapping instanceof XMLCompositeCollectionMapping) {\n containerAccessor = ((XMLCompositeCollectionMapping) oxmMapping).getContainerAccessor();\n containerClass = ((XMLCompositeCollectionMapping) oxmMapping).getReferenceClass();\n }\n if (containerAccessor != null) {\n ClassDescriptor containerDescriptor = ormSession.getDescriptor(containerClass);\n if (containerDescriptor != null) {\n DatabaseMapping ormContainerMapping = containerDescriptor.getMappingForAttributeName(containerAccessor.getAttributeName());\n if (ormContainerMapping != null) {\n OrmAttributeAccessor ormAccessor = new OrmAttributeAccessor(ormContainerMapping.getAttributeAccessor(), containerAccessor);\n ormAccessor.setChangeTracking(containerDescriptor.getObjectChangePolicy().isAttributeChangeTrackingPolicy());\n ormAccessor.setValueHolderProperty(ormContainerMapping instanceof OneToOneMapping && ((OneToOneMapping) ormContainerMapping).usesIndirection());\n if (oxmMapping instanceof XMLCompositeObjectMapping) {\n ((XMLCompositeObjectMapping) oxmMapping).setContainerAccessor(ormAccessor);\n } else if (oxmMapping instanceof XMLCompositeCollectionMapping) {\n ((XMLCompositeCollectionMapping) oxmMapping).setContainerAccessor(ormAccessor);\n }\n }\n }\n }\n }\n }\n Iterator<DatabaseMapping> oxmMappingsIterator = oxmDescriptor.getMappings().iterator();\n while (oxmMappingsIterator.hasNext()) {\n DatabaseMapping nextMapping = oxmMappingsIterator.next();\n if (nextMapping instanceof XMLObjectReferenceMapping) {\n XMLObjectReferenceMapping refMapping = (XMLObjectReferenceMapping) nextMapping;\n if (refMapping.getBidirectionalTargetAccessor() != null && refMapping.getBidirectionalTargetContainerPolicy() != null) {\n ClassDescriptor refDescriptor = ormSession.getClassDescriptor(refMapping.getReferenceClass());\n if (refDescriptor != null) {\n DatabaseMapping backpointerMapping = refDescriptor.getMappingForAttributeName(refMapping.getBidirectionalTargetAttributeName());\n if (backpointerMapping != null && backpointerMapping.isCollectionMapping()) {\n refMapping.setBidirectionalTargetContainerClass(((CollectionMapping) backpointerMapping).getContainerPolicy().getContainerClass());\n }\n }\n }\n }\n }\n }\n }\n}\n"
|
"public void export() {\n if (input.parameterNumber() >= 2) {\n final String[] parameters = Arrays.copyOf(input.getParameters(), input.parameterNumber() - 1);\n for (final String parameter : parameters) {\n try {\n final String result = reportSyncopeOperations.exportExecutionResult(parameter, input.lastParameter());\n reportResultManager.genericMessage(result);\n } catch (final WebServiceException | SyncopeClientException ex) {\n LOG.error(\"String_Node_Str\", ex);\n if (ex.getMessage().startsWith(\"String_Node_Str\")) {\n reportResultManager.notFoundError(\"String_Node_Str\", parameter);\n } else {\n reportResultManager.genericError(ex.getMessage());\n }\n } catch (final NumberFormatException ex) {\n LOG.error(\"String_Node_Str\", ex);\n reportResultManager.numberFormatException(\"String_Node_Str\", parameter);\n } catch (IOException | ParserConfigurationException | SAXException | TransformerException e) {\n LOG.error(\"String_Node_Str\", e);\n reportResultManager.genericError(\"String_Node_Str\" + \"String_Node_Str\" + parameter + \"String_Node_Str\" + e.getMessage());\n } catch (final IllegalArgumentException ex) {\n LOG.error(\"String_Node_Str\", ex);\n reportResultManager.typeNotValidError(\"String_Node_Str\", input.firstParameter(), CommandUtils.fromEnumToArray(ReportExecExportFormat.class));\n }\n break;\n }\n } else {\n reportResultManager.commandOptionError(EXPORT_EXECUTION_HELP_MESSAGE);\n }\n}\n"
|
"public void declareWorkSheetOptions(String orientation) {\n writer.openTag(\"String_Node_Str\");\n writer.attribute(\"String_Node_Str\", \"String_Node_Str\");\n writer.openTag(\"String_Node_Str\");\n if (orientation != null) {\n writer.openTag(\"String_Node_Str\");\n writer.attribute(\"String_Node_Str\", orientation);\n writer.closeTag(\"String_Node_Str\");\n }\n if (pageHeader != null) {\n writer.openTag(\"String_Node_Str\");\n writer.attribute(\"String_Node_Str\", pageHeader);\n writer.closeTag(\"String_Node_Str\");\n }\n if (pageFooter != null) {\n writer.openTag(\"String_Node_Str\");\n writer.attribute(\"String_Node_Str\", pageFooter);\n writer.closeTag(\"String_Node_Str\");\n }\n writer.closeTag(\"String_Node_Str\");\n writer.closeTag(\"String_Node_Str\");\n}\n"
|
"private String createSenderMonthlyExportCFONB(LocalDate localDate, BankDetails bankDetails) throws AxelorException {\n DateFormat ddmmFormat = new SimpleDateFormat(\"String_Node_Str\");\n String date = ddmmFormat.format(localDate.toDateTimeAtCurrentTime().toDate());\n date += String.format(\"String_Node_Str\", StringTool.truncLeft(String.format(\"String_Node_Str\", localDate.getYear()), 1));\n String a = this.cfonbConfig.getSenderRecordCodeExportCFONB();\n String b1 = this.cfonbConfig.getDirectDebitOperationCodeExportCFONB();\n String b2 = \"String_Node_Str\";\n String b3 = this.cfonbConfig.getSenderNumExportCFONB();\n String c1One = \"String_Node_Str\";\n String c1Two = date;\n String c2 = this.cfonbConfig.getSenderNameCodeExportCFONB();\n String d1One = \"String_Node_Str\";\n String d1Two = \"String_Node_Str\";\n String d2 = \"String_Node_Str\";\n String d3 = bankDetails.getSortCode();\n String d4 = bankDetails.getAccountNbr();\n String e = \"String_Node_Str\";\n String f = \"String_Node_Str\";\n String g1 = bankDetails.getBankCode();\n String g2 = \"String_Node_Str\";\n b2 = StringTool.fillStringRight(b2, ' ', 8);\n b3 = StringTool.fillStringRight(b3, ' ', 6);\n c1One = StringTool.fillStringRight(c1One, ' ', 7);\n c2 = StringTool.fillStringRight(c2, ' ', 24);\n d1One = StringTool.fillStringRight(d1One, ' ', 7);\n d1Two = StringTool.fillStringRight(d1Two, ' ', 17);\n d2 = StringTool.fillStringRight(d2, ' ', 8);\n d4 = StringTool.fillStringRight(d4, ' ', 11);\n e = StringTool.fillStringRight(e, ' ', 16);\n f = StringTool.fillStringRight(f, ' ', 31);\n g2 = StringTool.fillStringRight(g2, ' ', 6);\n a = StringTool.fillStringLeft(a, '0', 2);\n b1 = StringTool.fillStringLeft(b1, '0', 2);\n c1Two = StringTool.fillStringLeft(c1Two, '0', 5);\n d3 = StringTool.fillStringLeft(d3, '0', 5);\n g1 = StringTool.fillStringLeft(g1, '0', 5);\n cfonbToolService.testDigital(a, \"String_Node_Str\");\n cfonbToolService.testDigital(b1, \"String_Node_Str\");\n cfonbToolService.testDigital(d3, \"String_Node_Str\");\n cfonbToolService.testDigital(g1, \"String_Node_Str\");\n return a + b1 + b2 + b3 + c1One + c1Two + c2 + d1One + d1Two + d2 + d3 + d4 + e + f + g1 + g2;\n}\n"
|
"protected IStatus run(IProgressMonitor monitor) {\n ((LocalContextStore) ContextCore.getContextStore()).importContext(context);\n taskList.addTask(task);\n scheduleTaskActivationJob();\n return Status.OK_STATUS;\n}\n"
|
"protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {\n Parser parser = new Parser(PATTERN, (String) msg);\n if (!parser.matches()) {\n return null;\n }\n Position position = new Position();\n position.setProtocol(getProtocolName());\n position.set(Position.KEY_TYPE, parser.nextInt());\n if (!identify(parser.next(), channel, remoteAddress)) {\n return null;\n }\n position.setDeviceId(getDeviceId());\n DateBuilder dateBuilder = new DateBuilder().setDateReverse(parser.nextInt(), parser.nextInt(), parser.nextInt()).setTime(parser.nextInt(), parser.nextInt(), parser.nextInt());\n position.setTime(dateBuilder.getDate());\n position.setValid(parser.next().equals(\"String_Node_Str\"));\n position.setLatitude(parser.nextCoordinate(CoordinateFormat.DEG_MIN_MIN_HEM));\n position.setLongitude(parser.nextCoordinate(CoordinateFormat.DEG_MIN_MIN_HEM));\n position.setSpeed(parser.nextDouble());\n position.setCourse(parser.nextDouble());\n position.set(Position.KEY_SATELLITES, parser.nextInt());\n position.set(Position.KEY_GSM, parser.nextInt());\n parser.next();\n position.set(Position.KEY_POWER, parser.nextInt());\n position.set(Position.KEY_BATTERY, parser.nextDouble());\n position.set(Position.KEY_ALARM, parser.nextInt());\n parser.nextInt();\n parser.nextInt();\n position.set(Position.KEY_IGNITION, parser.nextInt());\n position.set(Position.KEY_OUTPUT, parser.nextInt());\n position.set(Position.PREFIX_ADC + 1, parser.nextInt());\n position.set(Position.PREFIX_ADC + 2, parser.nextInt());\n position.set(Position.KEY_VERSION, parser.next());\n position.set(Position.KEY_ARCHIVE, parser.next().equals(\"String_Node_Str\"));\n parser.next();\n return position;\n}\n"
|
"public void modifyText(ModifyEvent e) {\n String min = minValue.getText();\n if (min == \"String_Node_Str\") {\n updateStatus(IStatus.ERROR, MSG_EMPTY);\n } else if (!CheckValueUtils.isRealNumberValue(min)) {\n updateStatus(IStatus.ERROR, MSG_ONLY_REAL_NUMBER);\n } else {\n updateStatus(IStatus.OK, MSG_OK);\n parameter.setMinValue(Double.valueOf(min));\n }\n}\n"
|
"public Object getValueAt(int r, int c) {\n ColumnType colType = settings.getColumnAtIndex(c);\n Object cellDatum = null;\n AbstractComponent cellComponent = childrenList.get(r);\n switch(colType) {\n case ID:\n cellDatum = ABCD_6789;\n break;\n case TITLE:\n cellDatum = THRM_T_BITBOX1;\n break;\n case FSW_NAME:\n cellDatum = ADC_RPAM_A_REU_PRT12;\n break;\n case RAW:\n cellDatum = getValueForComponent(cellComponent);\n break;\n case VALUE:\n cellDatum = getValueForComponent(cellComponent);\n break;\n case UNIT:\n cellDatum = DEQ_C;\n break;\n case ERT:\n cellDatum = _22_59_24_448;\n break;\n case SCLK:\n cellDatum = _0334154108_25000;\n break;\n case SCET:\n cellDatum = _2010_250T21_26_25_762;\n break;\n }\n if (cellDatum == null) {\n return \"String_Node_Str\";\n } else {\n return cellDatum;\n }\n}\n"
|
"public static org.hl7.fhir.dstu2016may.model.ElementDefinition.ElementDefinitionConstraintComponent convertElementDefinitionConstraintComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2016may.model.ElementDefinition.ElementDefinitionConstraintComponent tgt = new org.hl7.fhir.dstu2016may.model.ElementDefinition.ElementDefinitionConstraintComponent();\n copyElement(src, tgt);\n tgt.setKey(src.getKey());\n tgt.setRequirements(src.getRequirements());\n tgt.setSeverity(convertConstraintSeverity(src.getSeverity()));\n tgt.setHuman(src.getHuman());\n tgt.setExpression(src.getExpression());\n tgt.setXpath(src.getXpath());\n return tgt;\n}\n"
|
"private Band addBand(Product product, BandInfo bandInfo) {\n final Band band = product.addBand(bandInfo.wavebandInfo.bandName, SAMPLE_PRODUCT_DATA_TYPE);\n band.setSpectralBandIndex(bandInfo.bandIndex);\n band.setSpectralWavelength((float) bandInfo.wavebandInfo.wavelength);\n band.setSpectralBandwidth((float) bandInfo.wavebandInfo.bandwidth);\n band.setSolarFlux((float) bandInfo.wavebandInfo.solarIrradiance);\n return band;\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.