content
stringlengths
40
137k
"public void onPlayerPositionAndLookPacket(PlayerInboundPacketEvent event) {\n if (!(event.getPacket() instanceof InPlayerPositionAndLookPacket)) {\n return;\n }\n InPlayerPositionAndLookPacket playerPositionAndLookPacket = (InPlayerPositionAndLookPacket) event.getPacket();\n Entity entity = event.getPlayer().getEntity();\n if (entity == null) {\n return;\n }\n Position oldPosition = entity.getLocation().getPosition();\n Rotation oldRotation = entity.getLocation().getRotation();\n Position newPosition = new Position(oldPosition);\n Rotation newRotation = new Rotation(oldRotation);\n newPosition.setX(playerPositionAndLookPacket.getX());\n newPosition.setY(playerPositionAndLookPacket.getY());\n newPosition.setZ(playerPositionAndLookPacket.getZ());\n newRotation.setPitch(playerPositionAndLookPacket.getPitch());\n newRotation.setYaw(playerPositionAndLookPacket.getYaw());\n entity.setLocation(new Location(newPosition, newRotation));\n CleanstoneServer.publishEvent(new PlayerMoveEvent(event.getPlayer(), oldPosition, oldRotation, newPosition, newRotation));\n}\n"
"private static String getFormat(int integerDigits, int fractionDigits, int maxFractionDigits) {\n int width = integerDigits + (fractionDigits > 0 ? 1 : 0) + fractionDigits;\n int padding = maxFractionDigits - fractionDigits;\n if (maxFractionDigits > 0 && fractionDigits == 0)\n padding += 1;\n return \"String_Node_Str\" + width + \"String_Node_Str\" + fractionDigits + \"String_Node_Str\" + repeat(' ', padding);\n}\n"
"public List<HadoopStack> getSupportedStacks() throws SoftwareManagementPluginException {\n List<HadoopStack> hadoopStacks = new ArrayList<HadoopStack>();\n ApiStackList stackList = apiManager.stackList();\n for (ApiStack apiStack : stackList.getApiStacks()) {\n for (ApiStackVersion apiStackVersionSummary : apiManager.stackVersionList(apiStack.getApiStackName().getStackName()).getApiStackVersions()) {\n ApiStackVersionInfo apiStackVersionInfoSummary = apiStackVersionSummary.getApiStackVersionInfo();\n ApiStackVersion apiStackVersion = apiManager.stackVersion(apiStackVersionInfoSummary.getStackName(), apiStackVersionInfoSummary.getStackVersion());\n ApiStackVersionInfo apiStackVersionInfo = apiStackVersion.getApiStackVersionInfo();\n if (apiStackVersionInfo.isActive()) {\n HadoopStack hadoopStack = new HadoopStack();\n hadoopStack.setDistro(apiStackVersionInfo.getStackName(), apiStackVersionInfo.getStackVersion());\n hadoopStack.setFullVersion(apiStackVersionInfo.getStackVersion());\n hadoopStack.setVendor(apiStackVersionInfo.getStackName());\n hadoopStacks.add(hadoopStack);\n }\n }\n }\n return hadoopStacks;\n}\n"
"protected void localizeConfigFiles(ContainerLauncher launcher, String roleName, String roleGroup, Metainfo metainfo, Map<String, Map<String, String>> configs, MapOperations env, SliderFileSystem fileSystem, ConfTreeOperations appConf) throws IOException {\n for (ConfigFile configFile : metainfo.getComponentConfigFiles(roleGroup)) {\n Map<String, String> config = ConfigUtils.replacePropsInConfig(configs.get(configFile.getDictionaryName()), env.options);\n String fileName = ConfigUtils.replaceProps(config, configFile.getFileName());\n File localFile = new File(SliderKeys.RESOURCE_DIR);\n if (!localFile.exists()) {\n if (!localFile.mkdir() && !localFile.exists()) {\n throw new IOException(RESOURCE_DIR + \"String_Node_Str\");\n }\n }\n localFile = new File(localFile, new File(fileName).getName());\n boolean perComponent = appConf.getComponentOptBool(roleGroup, \"String_Node_Str\" + configFile.getDictionaryName() + PER_COMPONENT, false);\n boolean perGroup = appConf.getComponentOptBool(roleGroup, \"String_Node_Str\" + configFile.getDictionaryName() + PER_GROUP, false);\n String folder = null;\n if (perComponent) {\n folder = roleName;\n } else if (perGroup) {\n folder = roleGroup;\n }\n log.info(\"String_Node_Str\" + \"String_Node_Str\", config.size(), localFile, fileName, configFile.getDictionaryName());\n createConfigFile(fileSystem, localFile, configFile, config);\n Path destPath = uploadResource(localFile, fileSystem, folder);\n LocalResource configResource = fileSystem.createAmResource(destPath, LocalResourceType.FILE);\n File destFile = new File(fileName);\n if (destFile.isAbsolute()) {\n launcher.addLocalResource(SliderKeys.RESOURCE_DIR + \"String_Node_Str\" + destFile.getName(), configResource, fileName);\n } else {\n launcher.addLocalResource(AgentKeys.APP_CONF_DIR + \"String_Node_Str\" + fileName, configResource);\n }\n }\n}\n"
"public void calculateLoadingTimeAndSend() {\n if (startTime != null) {\n float timeDifferenceFloat = Commons.calculateTimeDifferenceFrom(startTime);\n Log.d(TAG, \"String_Node_Str\" + databaseLoadTime + \"String_Node_Str\" + timeDifferenceFloat + \"String_Node_Str\" + \"String_Node_Str\");\n startTime = null;\n String username = \"String_Node_Str\";\n if (AppData.defaultUser != null) {\n username = AppData.defaultUser.getUsername();\n }\n LoadTimeFeedbackItem feedbackItem = new LoadTimeFeedbackItem(this, username, databaseLoadTime, timeDifferenceFloat);\n databaseLoadTime = 0;\n logger.info(feedbackItem.toJson());\n feedbackItem.sendToKeenIo(client);\n }\n}\n"
"private IFolder createNewFoler(IProject project, String folderName) throws CoreException {\n IFolder desFolder = project.getFolder(folderName);\n if (!desFolder.exists()) {\n desFolder.create(false, true, null);\n }\n desFolder.setPersistentProperty(FOLDER_READONLY_KEY, FOLDER_READONLY_PROPERTY);\n return desFolder;\n}\n"
"public void trimToSize() {\n if (atoms instanceof ArrayList<?>) {\n ArrayList<Atom> myatoms = (ArrayList<Atom>) atoms;\n myatoms.trimToSize();\n }\n if (altLocs instanceof ArrayList) {\n ArrayList myAltLocs = (ArrayList) altLocs;\n myAltLocs.trimToSize();\n }\n atomNameLookup = new HashMap<String, Atom>(atomNameLookup);\n if (hasAltLoc()) {\n for (Group alt : getAltLocs()) {\n alt.trimToSize();\n }\n }\n}\n"
"public void updateBigramPredictions() {\n if (mSuggest == null || !isSuggestionsRequested())\n return;\n if (!mSettingsValues.mBigramPredictionEnabled) {\n setPunctuationSuggestions();\n return;\n }\n final SuggestedWords.Builder builder;\n if (mCorrectionMode == Suggest.CORRECTION_FULL_BIGRAM) {\n final CharSequence prevWord = EditingUtils.getThisWord(getCurrentInputConnection(), mSettingsValues.mWordSeparators);\n if (!TextUtils.isEmpty(prevWord)) {\n builder = mSuggest.getBigramPredictionWordBuilder(prevWord);\n } else {\n builder = null;\n }\n } else {\n builder = null;\n }\n if (null != builder && builder.size() > 0) {\n showSuggestions(builder.build(), \"String_Node_Str\");\n } else {\n if (!isShowingPunctuationList())\n setPunctuationSuggestions();\n }\n}\n"
"public static LinkedHashMap<Integer, ArrayList<Integer>> readElemFile(Reader elemReader, boolean useAnsysNum) throws IOException {\n LinkedHashMap<Integer, ArrayList<Integer>> elemPositions = new LinkedHashMap<Integer, ArrayList<Integer>>();\n ReaderTokenizer rtok = new ReaderTokenizer(new BufferedReader(elemReader));\n rtok.eolIsSignificant(true);\n int offset = useAnsysNum ? 0 : -1;\n int elemId = 0;\n String line;\n int lineno = 0;\n BufferedReader reader = new BufferedReader(elemReader);\n while ((line = reader.readLine()) != null) {\n ArrayList<Integer> numbers = new ArrayList<Integer>();\n ArrayList<Integer> elemNumList;\n int nextToken = rtok.nextToken();\n while (nextToken != ReaderTokenizer.TT_EOL && nextToken != ReaderTokenizer.TT_EOF) {\n curLine.add((int) rtok.nval);\n nextToken = rtok.nextToken();\n }\n if (curLine.size() == 14) {\n elemNumList = new ArrayList<Integer>();\n for (int i = 0; i < 8; i++) {\n elemNumList.add(curLine.get(i) + offset);\n }\n for (int i = 8; i < 13; i++) {\n elemNumList.add(0, curLine.get(i));\n }\n elemId = curLine.get(13);\n } else {\n elemNumList = elemPositions.get(elemId + offset);\n for (int i = 0; i < curLine.size(); i++) {\n elemNumList.add(curLine.get(i) + offset);\n }\n }\n elemPositions.put(elemId + offset, elemNumList);\n }\n return elemPositions;\n}\n"
"public String NIFGerbil(InputStream input, NEDAlgo_HITS agdistis) throws IOException {\n org.aksw.gerbil.transfer.nif.Document document;\n String nifDocument = \"String_Node_Str\";\n String textWithMentions = \"String_Node_Str\";\n List<MeaningSpan> annotations = new ArrayList<>();\n HashMap<NamedEntityInText, String> results = new HashMap<NamedEntityInText, String>();\n try {\n document = parser.getDocumentFromNIFStream(input);\n log.info(\"String_Node_Str\");\n textWithMentions = nifParser.createTextWithMentions(document.getText(), document.getMarkings(Span.class));\n Document d = textToDocument(textWithMentions);\n agdistis.run(d, null);\n for (NamedEntityInText namedEntity : d.getNamedEntitiesInText()) {\n String disambiguatedURL = namedEntity.getNamedEntityUri();\n if (disambiguatedURL == null) {\n annotations.add(new NamedEntity((int) namedEntity.getStartPos(), (int) namedEntity.getLength(), new HashSet<String>()));\n } else {\n annotations.add(new NamedEntity((int) namedEntity.getStartPos(), (int) namedEntity.getLength(), URLDecoder.decode(disambiguatedURL, \"String_Node_Str\")));\n }\n }\n document.setMarkings(new ArrayList<Marking>(annotations));\n log.debug(\"String_Node_Str\" + document.toString());\n nifDocument = creator.getDocumentAsNIFString(document);\n log.debug(nifDocument);\n } catch (Exception e) {\n log.error(\"String_Node_Str\", e);\n return \"String_Node_Str\";\n }\n return nifDocument;\n}\n"
"private void createComponentNames(ProjectDTO dtoProj, IProjectPO proj, IWritableComponentNameCache compNameCache, boolean assignNewGuid) {\n final List<ComponentNameDTO> componentNamesList = dtoProj.getComponentNames();\n final Map<String, String> oldToNewGUID = new HashMap<String, String>(componentNamesList.size());\n Set<IComponentNamePO> createdCompNames = new HashSet<IComponentNamePO>();\n for (ComponentNameDTO compName : componentNamesList) {\n String guid = compName.getUuid();\n if (assignNewGuid) {\n final String newGuid = PersistenceUtil.generateUUID();\n oldToNewGUID.put(guid, newGuid);\n guid = newGuid;\n }\n final String name = compName.getCompName();\n final String type = compName.getCompType();\n final String creationContext = compName.getCreationContext();\n final CompNameCreationContext ctx = CompNameCreationContext.forName(creationContext);\n final IComponentNamePO componentNamePO = PoMaker.createComponentNamePO(guid, name, type, ctx, proj.getId());\n componentNamePO.setReferencedGuid(compName.getRefUuid());\n createdCompNames.add(componentNamePO);\n compNameCache.addCompNamePO(componentNamePO);\n }\n if (assignNewGuid) {\n for (IComponentNamePO createdName : createdCompNames) {\n String newGuid = oldToNewGUID.get(createdName.getReferencedGuid());\n if (newGuid != null) {\n createdName.setReferencedGuid(newGuid);\n }\n }\n ImportExportUtil.switchCompNamesGuids(proj, oldToNewGUID);\n }\n}\n"
"public static HashingResult createHash(String password) {\n byte[] salt = new byte[SALT_SIZE];\n RANDOM.nextBytes(salt);\n byte[] hash = function(password.toCharArray(), salt);\n return new HashingResult(ChannelBufferTools.convertByteArray(hash), ChannelBufferTools.convertByteArray(salt));\n}\n"
"public void testMerge_Sparse() throws CardinalityMergeException {\n int numToMerge = 4;\n int bits = 18;\n int cardinality = 1000000;\n HyperLogLogPlus[] hyperLogLogs = new HyperLogLogPlus[numToMerge];\n HyperLogLogPlus baseline = new HyperLogLogPlus(bits, 25);\n for (int i = 0; i < numToMerge; i++) {\n hyperLogLogs[i] = new HyperLogLogPlus(bits, 25);\n for (int j = 0; j < cardinality; j++) {\n double val = Math.random();\n hyperLogLogs[i].offer(val);\n baseline.offer(val);\n }\n }\n long expectedCardinality = numToMerge * cardinality;\n HyperLogLogPlus hll = hyperLogLogs[0];\n hyperLogLogs = Arrays.asList(hyperLogLogs).subList(1, hyperLogLogs.length).toArray(new HyperLogLogPlus[0]);\n long mergedEstimate = hll.merge(hyperLogLogs).cardinality();\n double se = expectedCardinality * (1.04 / Math.sqrt(Math.pow(2, bits)));\n System.out.println(\"String_Node_Str\" + mergedEstimate + \"String_Node_Str\" + (expectedCardinality - (3 * se)) + \"String_Node_Str\" + (expectedCardinality + (3 * se)));\n double err = Math.abs(mergedEstimate - expectedCardinality) / (double) expectedCardinality;\n System.out.println(\"String_Node_Str\" + err);\n assertTrue(err < .1);\n}\n"
"private void addTooltipContainer() {\n final JEditorPane cardInfoPane = (JEditorPane) Plugins.getInstance().getCardInfoPane();\n if (cardInfoPane == null) {\n return;\n }\n cardInfoPane.setSize(Constants.TOOLTIP_WIDTH_MIN, Constants.TOOLTIP_HEIGHT_MIN);\n cardInfoPane.setLocation(40, 40);\n cardInfoPane.setBackground(new Color(0, 0, 0, 0));\n MageRoundPane popupContainer = new MageRoundPane();\n popupContainer.setLayout(null);\n popupContainer.add(cardInfoPane);\n popupContainer.setVisible(false);\n popupContainer.setBounds(0, 0, 320 + 80, 201 + 80);\n desktopPane.add(popupContainer, JLayeredPane.POPUP_LAYER);\n ui.addComponent(MageComponents.CARD_INFO_PANE, cardInfoPane);\n ui.addComponent(MageComponents.POPUP_CONTAINER, popupContainer);\n JPanel cardPreviewContainer = new JPanel();\n cardPreviewContainer.setOpaque(false);\n cardPreviewContainer.setLayout(null);\n BigCard bigCard = new BigCard();\n bigCard.setSize(320, 500);\n bigCard.setLocation(40, 40);\n bigCard.setBackground(new Color(0, 0, 0, 0));\n cardPreviewContainer.add(bigCard);\n cardPreviewContainer.setVisible(false);\n cardPreviewContainer.setBounds(0, 0, 320 + 80, 500 + 30);\n ui.addComponent(MageComponents.CARD_PREVIEW_PANE, bigCard);\n ui.addComponent(MageComponents.CARD_PREVIEW_CONTAINER, cardPreviewContainer);\n desktopPane.add(cardPreviewContainer, JLayeredPane.POPUP_LAYER);\n}\n"
"private ExtractionInfo extractSingleLineBlock() {\n stream.update();\n int lineno = stream.getLineno();\n int charno = stream.getCharno() + 1;\n String line = getRemainingJSDocLine().trim();\n if (line.length() > 0) {\n jsdocBuilder.markText(line, lineno, charno, lineno, charno + line.length());\n }\n return new ExtractionInfo(line, next());\n}\n"
"public void onItemClick(AdapterView<?> arg0, View v, int position, long id) {\n if (position >= getPostListAdapter().getCount())\n return;\n if (v == null)\n return;\n PostsListPost postsListPost = (PostsListPost) getPostListAdapter().getItem(position);\n if (postsListPost == null)\n return;\n if (!mIsFetchingPosts) {\n showPost(postsListPost.getPostId());\n } else {\n Toast.makeText(mParentActivity, R.string.please_wait_refresh_done, Toast.LENGTH_SHORT).show();\n }\n}\n"
"private static void generateBuildInfo(JobInfo jobInfo, IProgressMonitor progressMonitor, boolean isMainJob, IProcess currentProcess, String currentJobName, IProcessor processor, int option) throws ProcessorException {\n if (isMainJob) {\n progressMonitor.subTask(Messages.getString(\"String_Node_Str\") + currentJobName);\n Set<ModuleNeeded> neededModules = LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId(), jobInfo.getJobVersion());\n CorePlugin.getDefault().getRunProcessService().updateLibraries(neededModules, currentProcess);\n if (codeModified && !BitwiseOptionUtils.containOption(option, GENERATE_WITHOUT_COMPILING)) {\n try {\n processor.build(progressMonitor);\n } catch (Exception e) {\n throw new ProcessorException(e);\n }\n processor.syntaxCheck();\n }\n needContextInCurrentGeneration = true;\n codeModified = false;\n }\n}\n"
"private <T> Response<T> sendRequest(RequestType type, SlaveContext slaveContext, Serializer serializer, Deserializer<T> deserializer) {\n Triplet<Channel, ChannelBuffer, ByteBuffer> channelContext = null;\n try {\n channelContext = getChannel();\n Channel channel = channelContext.first();\n ChannelBuffer buffer = channelContext.second();\n buffer.clear();\n buffer = new ChunkingChannelBuffer(buffer, channel, MAX_FRAME_LENGTH);\n buffer.writeByte(type.ordinal());\n if (type.includesSlaveContext()) {\n writeSlaveContext(buffer, slaveContext);\n }\n serializer.write(buffer, channelContext.third());\n if (buffer.writerIndex() > 0) {\n channel.write(buffer);\n }\n BlockingReadHandler<ChannelBuffer> reader = (BlockingReadHandler<ChannelBuffer>) channel.getPipeline().get(\"String_Node_Str\");\n final Triplet<Channel, ChannelBuffer, ByteBuffer> finalChannelContext = channelContext;\n DechunkingChannelBuffer dechunkingBuffer = new DechunkingChannelBuffer(reader) {\n\n protected ChannelBuffer readNext() {\n ChannelBuffer result = super.readNext();\n if (result == null) {\n channelPool.dispose(finalChannelContext);\n throw new HaCommunicationException(\"String_Node_Str\");\n }\n return result;\n }\n };\n T response = deserializer.read(dechunkingBuffer);\n String[] datasources = type.includesSlaveContext() ? readTransactionStreamHeader(dechunkingBuffer) : null;\n while (dechunkingBuffer.expectsMoreChunks()) {\n applyFullyAvailableTransactions(datasources, dechunkingBuffer);\n if (dechunkingBuffer.expectsMoreChunks()) {\n dechunkingBuffer.forceReadNextChunk();\n }\n }\n TransactionStream txStreams = type.includesSlaveContext() ? readTransactionStreams(datasources, dechunkingBuffer) : TransactionStream.EMPTY;\n return new Response<T>(response, txStreams);\n } catch (ClosedChannelException e) {\n channelPool.dispose(channelContext);\n throw new HaCommunicationException(e);\n } catch (IOException e) {\n throw new HaCommunicationException(e);\n } catch (InterruptedException e) {\n throw new HaCommunicationException(e);\n } catch (Exception e) {\n throw new HaCommunicationException(e);\n }\n}\n"
"private Map<String, TypeInfo> buildTypeInfo(JavaClass[] allClasses) {\n for (JavaClass javaClass : allClasses) {\n if (javaClass == null) {\n continue;\n }\n TypeInfo info = typeInfo.get(javaClass.getQualifiedName());\n if (info == null || info.isPostBuilt()) {\n continue;\n }\n info.setPostBuilt(true);\n processFactoryMethods(javaClass, info);\n PackageInfo packageInfo = getPackageInfoForPackage(javaClass);\n XMLNameTransformer transformer = info.getXmlNameTransformer();\n if (transformer == TypeInfo.DEFAULT_NAME_TRANSFORMER) {\n XMLNameTransformer nsInfoXmlNameTransformer = packageInfo.getXmlNameTransformer();\n if (nsInfoXmlNameTransformer != null) {\n info.setXmlNameTransformer(nsInfoXmlNameTransformer);\n } else if (helper.isAnnotationPresent(javaClass, XmlNameTransformer.class)) {\n XmlNameTransformer nameTranformer = (XmlNameTransformer) helper.getAnnotation(javaClass, XmlNameTransformer.class);\n Class nameTransformerClass = nameTranformer.value();\n try {\n info.setXmlNameTransformer((XMLNameTransformer) nameTransformerClass.newInstance());\n } catch (InstantiationException ex) {\n throw JAXBException.exceptionWithNameTransformerClass(nameTransformerClass.getName(), ex);\n } catch (IllegalAccessException ex) {\n throw JAXBException.exceptionWithNameTransformerClass(nameTransformerClass.getName(), ex);\n }\n } else if (helper.isAnnotationPresent(javaClass.getPackage(), XmlNameTransformer.class)) {\n XmlNameTransformer nameTranformer = (XmlNameTransformer) helper.getAnnotation(javaClass.getPackage(), XmlNameTransformer.class);\n Class nameTransformerClass = nameTranformer.value();\n try {\n info.setXmlNameTransformer((XMLNameTransformer) nameTransformerClass.newInstance());\n } catch (InstantiationException ex) {\n throw JAXBException.exceptionWithNameTransformerClass(nameTransformerClass.getName(), ex);\n } catch (IllegalAccessException ex) {\n throw JAXBException.exceptionWithNameTransformerClass(nameTransformerClass.getName(), ex);\n }\n }\n }\n postProcessXmlAccessorType(info, packageInfo);\n postProcessXmlType(javaClass, info, packageInfo);\n if (info.isEnumerationType()) {\n addEnumTypeInfo(javaClass, ((EnumTypeInfo) info));\n continue;\n }\n processTypeQName(javaClass, info, packageInfo.getNamespaceInfo());\n JavaClass superClass = (JavaClass) javaClass.getSuperclass();\n if (shouldGenerateTypeInfo(superClass) && typeInfo.get(superClass.getQualifiedName()) == null) {\n JavaClass[] jClassArray = new JavaClass[] { superClass };\n buildNewTypeInfo(jClassArray);\n }\n processPropertiesSuperClass(javaClass, info);\n info.setProperties(getPropertiesForClass(javaClass, info));\n processTypeInfoProperties(javaClass, info);\n postProcessXmlAccessorOrder(info, packageInfo);\n validatePropOrderForInfo(info);\n }\n return typeInfo;\n}\n"
"public void stopConsoles() {\n for (Entry<String, CloudFoundryConsole> tailEntry : consoleByUri.entrySet()) {\n tailEntry.getValue().stop();\n }\n}\n"
"private static void adjustDataSets(Series[] seriesArray, BigDecimal bnMinFixed, BigDecimal bnMaxFixed) throws ChartException {\n IDataSetProcessor idsp;\n boolean hasBigNumber = false;\n Number[] doaDataSet = null;\n BigDecimal bnMin = null;\n BigDecimal bnMax = null;\n for (Series series : seriesArray) {\n DataSet ds = series.getDataSet();\n hasBigNumber = ((DataSetImpl) ds).isBigNumber();\n if (hasBigNumber) {\n break;\n }\n }\n if (hasBigNumber) {\n for (Series series : seriesArray) {\n DataSet ds = series.getDataSet();\n idsp = PluginSettings.instance().getDataSetProcessor(series.getClass());\n if (bnMin == null) {\n bnMin = NumberUtil.asBigDecimal((Number) idsp.getMinimum(ds));\n bnMax = NumberUtil.asBigDecimal((Number) idsp.getMaximum(ds));\n continue;\n }\n bnMin = bnMin.min(NumberUtil.asBigDecimal((Number) idsp.getMinimum(ds)));\n bnMax = bnMax.max(NumberUtil.asBigDecimal((Number) idsp.getMaximum(ds)));\n }\n bnMin = bnMinFixed != null ? bnMinFixed : bnMin;\n bnMax = bnMaxFixed != null ? bnMaxFixed : bnMax;\n BigDecimal absMax = bnMax.abs();\n BigDecimal absMin = bnMin.abs();\n if (absMax.compareTo(NumberUtil.DOUBLE_MAX) <= 0) {\n for (Series series : seriesArray) {\n DataSet ds = series.getDataSet();\n ((DataSetImpl) ds).setIsBigNumber(false);\n idsp = PluginSettings.instance().getDataSetProcessor(series.getClass());\n if (ds.getValues() instanceof Number[]) {\n doaDataSet = (Number[]) ds.getValues();\n Number[] newDoaDataSet = new Double[doaDataSet.length];\n for (int j = 0; j < doaDataSet.length; j++) {\n newDoaDataSet[j] = NumberUtil.asDouble(doaDataSet[j]);\n }\n ds.setValues(newDoaDataSet);\n } else if (ds.getValues() instanceof NumberDataPointEntry[]) {\n NumberDataPointEntry[] ndpe = (NumberDataPointEntry[]) ds.getValues();\n for (int j = 0; j < ndpe.length; j++) {\n Number[] nums = ndpe[j].getNumberData();\n if (nums == null || nums.length == 0) {\n continue;\n }\n Number[] newNums = new Number[nums.length];\n for (int k = 0; k < nums.length; k++) {\n newNums[k] = NumberUtil.asDouble(nums[k]);\n }\n ndpe[j].setNumberData(newNums);\n }\n }\n }\n } else if (absMax.compareTo(NumberUtil.DOUBLE_MIN) < 0) {\n BigDecimal divisor = BigDecimal.ONE.divide(NumberUtil.DEFAULT_MULTIPLIER.divide(bnMin, NumberUtil.DEFAULT_MATHCONTEXT), NumberUtil.DEFAULT_MATHCONTEXT);\n for (Series series : seriesArray) {\n DataSet ds = series.getDataSet();\n idsp = PluginSettings.instance().getDataSetProcessor(series.getClass());\n if (ds.getValues() instanceof Number[]) {\n doaDataSet = (Number[]) ds.getValues();\n Number[] numbers = new BigNumber[doaDataSet.length];\n for (int j = 0; j < doaDataSet.length; j++) {\n numbers[j] = NumberUtil.asBigNumber(doaDataSet[j], divisor);\n }\n ds.setValues(numbers);\n } else if (ds.getValues() instanceof NumberDataPointEntry[]) {\n NumberDataPointEntry[] ndpe = (NumberDataPointEntry[]) ds.getValues();\n for (int j = 0; j < ndpe.length; j++) {\n Number[] nums = ndpe[j].getNumberData();\n if (nums == null || nums.length == 0) {\n continue;\n }\n Number[] newNums = new BigNumber[nums.length];\n for (int k = 0; k < nums.length; k++) {\n newNums[k] = NumberUtil.asBigNumber(nums[k], divisor);\n }\n ndpe[j].setNumberData(newNums);\n }\n }\n }\n } else {\n BigDecimal divisor = bnMax.divide(NumberUtil.DEFAULT_DIVISOR, NumberUtil.DEFAULT_MATHCONTEXT);\n for (Series series : seriesArray) {\n DataSet ds = series.getDataSet();\n idsp = PluginSettings.instance().getDataSetProcessor(series.getClass());\n if (ds.getValues() instanceof Number[]) {\n doaDataSet = (Number[]) ds.getValues();\n Number[] numbers = new BigNumber[doaDataSet.length];\n for (int j = 0; j < doaDataSet.length; j++) {\n numbers[j] = NumberUtil.asBigNumber(doaDataSet[j], divisor);\n }\n ds.setValues(numbers);\n } else if (ds.getValues() instanceof NumberDataPointEntry[]) {\n NumberDataPointEntry[] ndpe = (NumberDataPointEntry[]) ds.getValues();\n for (int j = 0; j < ndpe.length; j++) {\n Number[] nums = ndpe[j].getNumberData();\n if (nums == null || nums.length == 0) {\n continue;\n }\n Number[] newNums = new BigNumber[nums.length];\n for (int k = 0; k < nums.length; k++) {\n newNums[k] = NumberUtil.asBigNumber(nums[k], divisor);\n }\n ndpe[j].setNumberData(newNums);\n }\n }\n }\n }\n }\n}\n"
"public List<VesselSchedules> findVesselSchedulesByCriteria(String column, String value, Integer clientId) {\n log.debug(\"String_Node_Str\");\n Session session = getSessionFactory().getCurrentSession();\n List<VesselSchedules> vesselSchedules = session.createCriteria(VesselSchedules.class).add(Restrictions.like(column, value)).list();\n return vesselSchedules;\n}\n"
"void addChildren(XmlResourceParser parser) throws IOException, XmlPullParserException {\n while (parser.next() != XmlResourceParser.END_TAG || !parser.getName().equals(getClass().getName())) {\n if (parser.getEventType() == XmlResourceParser.START_TAG) {\n try {\n Class<?> classy = Class.forName(parser.getName());\n Constructor constructor = classy.getConstructor(XmlResourceParser.class);\n addChild((InfoData) constructor.newInstance(parser));\n } catch (ClassNotFoundException e) {\n Log.e(\"String_Node_Str\", \"String_Node_Str\" + parser.getName() + \"String_Node_Str\");\n e.printStackTrace();\n } catch (NoSuchMethodException e) {\n Log.e(\"String_Node_Str\", \"String_Node_Str\" + parser.getName() + \"String_Node_Str\");\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (java.lang.InstantiationException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n } catch (ClassCastException e) {\n Log.e(\"String_Node_Str\", \"String_Node_Str\" + parser.getName() + \"String_Node_Str\");\n e.printStackTrace();\n }\n }\n }\n}\n"
"private Set<Long> addPredicateDate(String theParamName, Set<Long> thePids, List<? extends IQueryParameterType> theList) {\n if (theList == null || theList.isEmpty()) {\n return thePids;\n }\n if (Boolean.TRUE.equals(theList.get(0).getMissing())) {\n return addPredicateParamMissing(thePids, \"String_Node_Str\", theParamName, ResourceIndexedSearchParamDate.class);\n }\n CriteriaBuilder builder = myEntityManager.getCriteriaBuilder();\n CriteriaQuery<Long> cq = builder.createQuery(Long.class);\n Root<ResourceIndexedSearchParamDate> from = cq.from(ResourceIndexedSearchParamDate.class);\n cq.select(from.get(\"String_Node_Str\").as(Long.class));\n List<Predicate> codePredicates = new ArrayList<Predicate>();\n for (IQueryParameterType nextOr : theList) {\n if (addPredicateMissingFalseIfPresent(theParamName, from, codePredicates, nextOr)) {\n continue;\n }\n IQueryParameterType params = nextOr;\n Predicate p = createPredicateDate(builder, from, params);\n codePredicates.add(p);\n }\n Predicate masterCodePredicate = builder.or(codePredicates.toArray(new Predicate[0]));\n Predicate type = builder.equal(from.get(\"String_Node_Str\"), myResourceName);\n Predicate name = builder.equal(from.get(\"String_Node_Str\"), theParamName);\n if (thePids.size() > 0) {\n Predicate inPids = (from.get(\"String_Node_Str\").in(thePids));\n cq.where(builder.and(type, name, masterCodePredicate, inPids));\n } else {\n cq.where(builder.and(type, name, masterCodePredicate));\n }\n TypedQuery<Long> q = myEntityManager.createQuery(cq);\n return new HashSet<Long>(q.getResultList());\n}\n"
"public boolean checkFlight(Player player, Distance distance) {\n if (distance.getYDifference() > 400) {\n return false;\n }\n double y1 = distance.fromY();\n double y2 = distance.toY();\n Block block = player.getLocation().getBlock().getRelative(BlockFace.DOWN);\n if (y1 == y2 && !isMovingExempt(player) && player.getVehicle() == null && player.getFallDistance() == 0 && !Utilities.isOnLilyPad(player)) {\n String name = player.getName();\n if (Utilities.cantStandAt(block) && !Utilities.isOnLilyPad(player) && Utilities.cantStandAt(player.getLocation().getBlock()) && player.getLocation().getBlock().getType() != Material.WATER && player.getLocation().getBlock().getType() != Material.STATIONARY_WATER) {\n int violation = 1;\n if (!flightViolation.containsKey(name)) {\n flightViolation.put(name, violation);\n } else {\n violation = flightViolation.get(name) + 1;\n flightViolation.put(name, violation);\n }\n if (violation >= FLIGHT_LIMIT) {\n flightViolation.put(name, 1);\n return true;\n }\n if (flightViolation.containsKey(name) && flightViolation.get(name) > 0) {\n for (int i = FLY_LOOP; i > 0; i--) {\n Location newLocation = new Location(player.getWorld(), player.getLocation().getX(), player.getLocation().getY() - i, player.getLocation().getZ());\n Block lower = newLocation.getBlock();\n if (lower.getTypeId() == 0) {\n player.teleport(newLocation);\n break;\n }\n }\n }\n }\n }\n return false;\n}\n"
"public void showFbShelf() {\n model.resetModel(NavigationEnum.FB_SHELF, getLoggedUser(), null, null, null, null);\n}\n"
"public static void buildAndInstallCodesProject(IProgressMonitor monitor, ERepositoryObjectType codeType, boolean install, boolean forceBuild) throws Exception {\n if (forceBuild || !BuildCacheManager.getInstance().isCodesBuild(codeType)) {\n if (!CommonsPlugin.isHeadless()) {\n Job job = new Job(\"String_Node_Str\" + codeType.getLabel()) {\n\n protected IStatus run(IProgressMonitor monitor) {\n try {\n build(codeType, install, forceBuild, monitor);\n return org.eclipse.core.runtime.Status.OK_STATUS;\n } catch (Exception e) {\n return new org.eclipse.core.runtime.Status(IStatus.ERROR, DesignerMavenPlugin.PLUGIN_ID, 1, e.getMessage(), e);\n }\n }\n };\n job.setUser(false);\n job.setPriority(Job.INTERACTIVE);\n job.schedule();\n } else {\n synchronized (codeType) {\n build(codeType, install, forceBuild, monitor);\n }\n }\n}\n"
"public void activate_shouldActivateUserAndClearActionToken() throws Exception {\n User user = new User(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", null, new Date(), \"String_Node_Str\", null);\n user.setGender(\"String_Node_Str\");\n final UUID actionToken = UUID.randomUUID();\n user.setActionToken(actionToken);\n user.setActivated(false);\n entityManager.getTransaction().begin();\n entityManager.persist(user);\n entityManager.getTransaction().commit();\n service.activate(user.getLogin(), actionToken.toString());\n final User modifiedUser = entityManager.find(User.class, user.getId());\n assertThat(modifiedUser).isNotNull();\n assertThat(modifiedUser.getActivated()).isTrue();\n assertThat(modifiedUser.getActionToken()).isNull();\n entityManager.remove(user);\n}\n"
"private Map<Individual, Set<Datatype>> getObjectsWithDatatypes(int offset) {\n Map<Individual, Set<Datatype>> individual2Datatypes = new HashMap<Individual, Set<Datatype>>();\n int limit = 1000;\n String query = String.format(\"String_Node_Str\", propertyToDescribe.getName(), limit, offset);\n ResultSet rs = executeQuery(query);\n QuerySolution qs;\n Individual ind;\n Set<Datatype> types;\n while (rs.hasNext()) {\n qs = rs.next();\n ind = new Individual(qs.getResource(\"String_Node_Str\").getURI());\n types = individual2Datatypes.get(ind);\n if (types == null) {\n types = new HashSet<Datatype>();\n individual2Datatypes.put(ind, types);\n }\n types.add(new Datatype(qs.getResource(\"String_Node_Str\").getURI()));\n }\n return individual2Datatypes;\n}\n"
"public static void insertDimension(CrosstabReportItemHandle crosstab, DimensionViewHandle dimensionView, int axisType, int index, Map measureListMap, Map functionMap) throws SemanticException {\n if (crosstab == null || dimensionView == null || !isValidAxisType(axisType))\n return;\n CommandStack stack = crosstab.getCommandStack();\n stack.startTrans(null);\n try {\n CrosstabViewHandle crosstabView = crosstab.getCrosstabView(axisType);\n if (crosstabView == null) {\n crosstabView = crosstab.addCrosstabView(axisType);\n }\n crosstabView.getViewsProperty().add(dimensionView.getModelHandle(), index);\n String dimensionName = dimensionView.getCubeDimensionName();\n for (int i = 0; i < dimensionView.getLevelCount(); i++) {\n LevelViewHandle levelView = dimensionView.getLevel(i);\n String levelName = levelView.getCubeLevelName();\n List measures = (List) (measureListMap == null ? null : measureListMap.get(levelName));\n List functions = (List) (functionMap == null ? null : functionMap.get(levelName));\n insertLevel(crosstab, levelView, dimensionName, levelView.getCubeLevelName(), axisType, measures, functions);\n }\n } catch (SemanticException e) {\n stack.rollback();\n throw e;\n }\n stack.commit();\n}\n"
"public void testAddMonth() throws BirtException {\n String[] scripts = new String[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n Calendar c = Calendar.getInstance();\n c.clear();\n c.set(2006, 8, 15);\n Date d1 = new Date(c.getTimeInMillis());\n c.clear();\n c.set(1995, 10, 15);\n Date d2 = new Date(c.getTimeInMillis());\n c.clear();\n c.set(1901, 0, 15);\n Date d3 = new Date(c.getTimeInMillis());\n c.clear();\n Date[] values = new Date[] { d1, d2, d3 };\n for (int i = 0; i < values.length; i++) {\n assertEquals(cx.evaluateString(scope, scripts[i], \"String_Node_Str\", 1, null), values[i]);\n }\n}\n"
"private IStatus doDeleteModules(final Set<IModule> deletedModules) {\n IServerWorkingCopy wc = getServer().createWorkingCopy();\n try {\n deleteServicesOnModuleRemove.set(Boolean.FALSE);\n wc.modifyModules(null, deletedModules.toArray(new IModule[deletedModules.size()]), null);\n wc.save(true, null);\n } catch (CoreException e) {\n CloudFoundryPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, CloudFoundryPlugin.PLUGIN_ID, \"String_Node_Str\", e));\n return Status.CANCEL_STATUS;\n } finally {\n deleteServicesOnModuleRemove.set(Boolean.TRUE);\n }\n return Status.OK_STATUS;\n}\n"
"public void testProfilerNoStop() {\n final long expectedAnswer = -1;\n pf.start();\n try {\n Thread.sleep(20);\n } catch (final InterruptedException e) {\n }\n Assert.assertTrue(pf.getDurationInMillis() == -1);\n Assert.assertFalse(pf.isStopped());\n}\n"
"public void onClick(View v) {\n Log.d(getClass().getName(), \"String_Node_Str\");\n item.setChoosen(!item.isChoosen());\n checkBox.setChecked(item.isChoosen());\n}\n"
"public void testNullArrayGivesEmptyMap() {\n List<? super Object> list = V8ObjectUtils.toList(null);\n assertNotNull(list);\n assertEquals(0, list.size());\n}\n"
"public boolean sameLeader(Collect aCollect) {\n return ((_rndNumber >= aCollect._rndNumber) && (_nodeId.equals(aCollect._nodeId)));\n}\n"
"void createStreams(NamespaceId namespaceId, Iterable<StreamSpecification> streamSpecs, KerberosPrincipalId ownerPrincipal) throws Exception {\n for (StreamSpecification spec : streamSpecs) {\n Properties props = new Properties();\n if (spec.getDescription() != null) {\n props.put(Constants.Stream.DESCRIPTION, spec.getDescription());\n }\n if (ownerPrincipal != null) {\n props.put(Constants.Security.PRINCIPAL, ownerPrincipal.getPrincipal());\n }\n if (streamAdmin.create(namespaceId.stream(spec.getName()), props) != null) {\n LOG.info(\"String_Node_Str\", namespaceId.getNamespace(), spec.getName());\n }\n }\n}\n"
"public void clearStore() {\n File file = file();\n if (file != null && file.exists()) {\n deleteFile(file);\n }\n}\n"
"public void sendEmail(final String jobId) throws GenieException {\n try {\n log.debug(\"String_Node_Str\");\n final JobRequest jobRequest = this.jobSearchService.getJobRequest(jobId);\n final Job job = this.jobSearchService.getJob(jobId);\n if (org.apache.commons.lang3.StringUtils.isNotBlank(jobRequest.getEmail())) {\n final String message = new StringBuilder().append(\"String_Node_Str\").append(jobId).append(\"String_Node_Str\").append(job.getStatus()).toString();\n this.mailServiceImpl.sendEmail(jobRequest.getEmail(), message, message);\n }\n } catch (Exception e) {\n log.debug(\"String_Node_Str\", jobId, e);\n }\n}\n"
"public Object produceOutput(List<PatchStat> statsForPatches, Map<GeneralStatEnum, Object> generalStats, String output) {\n JSONObject statsjsonRoot = new JSONObject();\n JSONArray patchlistJson = new JSONArray();\n statsjsonRoot.put(\"String_Node_Str\", patchlistJson);\n JSONObject generalStatsjson = new JSONObject();\n statsjsonRoot.put(\"String_Node_Str\", generalStatsjson);\n JSONParser parser = new JSONParser();\n for (GeneralStatEnum generalStat : GeneralStatEnum.values()) {\n Object vStat = generalStats.get(generalStat);\n if (vStat == null)\n generalStatsjson.put(generalStat.name(), null);\n else {\n try {\n Object value = null;\n if (vStat instanceof AstorOutputStatus)\n value = parser.parse(\"String_Node_Str\" + vStat + \"String_Node_Str\");\n else\n value = parser.parse(vStat.toString());\n generalStatsjson.put(generalStat.name(), value);\n } catch (ParseException e) {\n log.error(e);\n }\n }\n }\n for (PatchStat patchStat : statsForPatches) {\n JSONObject patchjson = new JSONObject();\n patchlistJson.add(patchjson);\n Map<PatchStatEnum, Object> stats = patchStat.getStats();\n for (PatchStatEnum statKey : PatchStatEnum.values()) {\n if (statKey.equals(PatchStatEnum.HUNKS)) {\n List<PatchHunkStats> hunks = (List<PatchHunkStats>) stats.get(statKey);\n JSONArray hunksListJson = new JSONArray();\n patchjson.put(\"String_Node_Str\", hunksListJson);\n for (PatchHunkStats patchHunkStats : hunks) {\n Map<HunkStatEnum, Object> statshunk = patchHunkStats.getStats();\n JSONObject hunkjson = new JSONObject();\n hunksListJson.add(hunkjson);\n for (HunkStatEnum hs : HunkStatEnum.values()) {\n if (statshunk.containsKey(hs))\n hunkjson.put(hs.name(), JSONObject.escape(statshunk.get(hs).toString()));\n }\n }\n } else {\n if (stats.containsKey(statKey))\n patchjson.put(statKey.name(), JSONObject.escape(stats.get(statKey).toString()));\n }\n }\n }\n String filename = ConfigurationProperties.getProperty(\"String_Node_Str\");\n String absoluteFileName = output + \"String_Node_Str\" + filename + \"String_Node_Str\";\n try (FileWriter file = new FileWriter(absoluteFileName)) {\n file.write(statsjsonRoot.toJSONString());\n file.flush();\n log.info(\"String_Node_Str\" + absoluteFileName);\n log.info(filename + \"String_Node_Str\" + statsjsonRoot.toJSONString());\n } catch (IOException e) {\n e.printStackTrace();\n log.error(\"String_Node_Str\" + e.toString());\n }\n return statsjsonRoot;\n}\n"
"private void clearDirtyFlag() {\n IReportProvider provider = getProvider();\n if (provider != null && getErrorLIine(false) == -1) {\n unhookModelEventManager(getModel());\n getCommandStack().removeCommandStackListener(getCommandStackListener());\n ModuleHandle model = provider.getReportModuleHandle(getEditorInput(), true);\n SessionHandleAdapter.getInstance().setReportDesignHandle(model);\n SessionHandleAdapter.getInstance().getMediator(model).addColleague(this);\n hookModelEventManager(getModel());\n getCommandStack().addCommandStackListener(getCommandStackListener());\n setIsModified(false);\n getEditor().editorDirtyStateChanged();\n if (isActive() && !isLeaving) {\n getReportEditor().reloadOutlinePage();\n }\n }\n}\n"
"public JaxAgileItem write() {\n IAtsChangeSet changes = services.getStoreService().createAtsChangeSet(\"String_Node_Str\", AtsCoreUsers.SYSTEM_USER);\n if (newItem.isSetFeatures()) {\n Collection<IAgileFeatureGroup> features = agileService.getAgileFeatureGroups(newItem.getFeatures());\n List<ArtifactToken> featureArts = new LinkedList<>();\n for (IAgileFeatureGroup feature : features) {\n featureArts.add(feature.getStoreObject());\n }\n for (ArtifactToken awa : services.getArtifacts(newItem.getUuids())) {\n for (IAgileFeatureGroup feature : features) {\n ArtifactToken featureArt = feature.getStoreObject();\n if (!services.getRelationResolver().areRelated(featureArt, AtsRelationTypes.AgileFeatureToItem_FeatureGroup, awa)) {\n changes.relate(feature, AtsRelationTypes.AgileFeatureToItem_AtsItem, awa);\n }\n }\n for (ArtifactToken featureArt : services.getRelationResolver().getRelated(awa, AtsRelationTypes.AgileFeatureToItem_FeatureGroup)) {\n if (!featureArts.contains(featureArt)) {\n changes.unrelate(featureArt, AtsRelationTypes.AgileFeatureToItem_AtsItem, awa);\n }\n }\n }\n } else if (newItem.isRemoveFeatures()) {\n for (ArtifactToken awa : services.getArtifacts(newItem.getUuids())) {\n for (ArtifactToken feature : services.getRelationResolver().getRelated(awa, AtsRelationTypes.AgileFeatureToItem_FeatureGroup)) {\n changes.unrelate(feature, AtsRelationTypes.AgileFeatureToItem_AtsItem, awa);\n }\n }\n }\n if (newItem.isSetSprint()) {\n ArtifactToken sprintArt = services.getArtifact(newItem.getSprintUuid());\n IAgileSprint sprint = services.getAgileService().getAgileSprint(sprintArt);\n for (ArtifactToken awa : services.getArtifacts(newItem.getUuids())) {\n if (sprint != null) {\n changes.setRelation(sprint, AtsRelationTypes.AgileSprintToItem_AtsItem, awa);\n } else {\n changes.unrelateAll(awa, AtsRelationTypes.AgileSprintToItem_AtsItem);\n }\n changes.add(sprint);\n }\n }\n if (newItem.isSetBacklog()) {\n ArtifactToken backlogArt = services.getArtifact(newItem.getBacklogUuid());\n IAgileSprint backlog = services.getAgileService().getAgileSprint(backlogArt);\n for (ArtifactToken awa : services.getArtifacts(newItem.getUuids())) {\n if (backlog != null) {\n changes.setRelation(backlog, AtsRelationTypes.Goal_Member, awa);\n } else {\n changes.unrelateAll(awa, AtsRelationTypes.Goal_Member);\n }\n changes.add(backlog);\n }\n }\n if (!changes.isEmpty()) {\n changes.execute();\n }\n return newItem;\n}\n"
"public ArrayList<Property> getFieldPropertiesForClass(JavaClass cls, TypeInfo info, boolean onlyPublic, boolean onlyExplicit) {\n ArrayList<Property> properties = new ArrayList<Property>();\n if (cls == null) {\n return properties;\n }\n for (Iterator<JavaField> fieldIt = cls.getDeclaredFields().iterator(); fieldIt.hasNext(); ) {\n Property property = null;\n JavaField nextField = fieldIt.next();\n int modifiers = nextField.getModifiers();\n if (!Modifier.isTransient(modifiers) && ((Modifier.isPublic(nextField.getModifiers()) && onlyPublic) || !onlyPublic || hasJAXBAnnotations(nextField))) {\n if (!Modifier.isStatic(modifiers)) {\n if ((onlyExplicit && hasJAXBAnnotations(nextField)) || !onlyExplicit) {\n try {\n property = buildNewProperty(info, cls, nextField, nextField.getName(), nextField.getResolvedType());\n properties.add(property);\n } catch (JAXBException ex) {\n if (ex.getErrorCode() != JAXBException.INVALID_INTERFACE || !helper.isAnnotationPresent(nextField, XmlTransient.class)) {\n throw ex;\n }\n }\n }\n } else {\n try {\n property = buildNewProperty(info, cls, nextField, nextField.getName(), nextField.getResolvedType());\n if (helper.isAnnotationPresent(nextField, XmlAttribute.class)) {\n Object value = ((JavaFieldImpl) nextField).get(null);\n if (value != null) {\n String stringValue = (String) XMLConversionManager.getDefaultXMLManager().convertObject(value, String.class, property.getSchemaType());\n property.setFixedValue(stringValue);\n }\n }\n property.setWriteOnly(true);\n if (!hasJAXBAnnotations(nextField)) {\n property.setTransient(true);\n }\n properties.add(property);\n } catch (ClassCastException e) {\n } catch (IllegalAccessException e) {\n }\n }\n }\n if (helper.isAnnotationPresent(nextField, XmlTransient.class)) {\n if (property != null) {\n property.setTransient(true);\n }\n }\n }\n return properties;\n}\n"
"public void onComplete() {\n if (Shortcuts.remove(getActivity(), file))\n ((DrawerActivity) getActivity()).reloadNavDrawer();\n DrawerActivity act = (DrawerActivity) getActivity();\n if (act.getCab() != null && act.getCab() instanceof BaseFileCab) {\n ((BaseFileCab) act.getCab()).removeFile(file);\n }\n mAdapter.remove(file, true);\n}\n"
"public void buildMap() {\n for (int i = 1; i < raw.size() + 1; i += 2) {\n byte[] k = raw.get(i);\n byte[] v = raw.get(i + 1);\n keys.add(k);\n items.put(k, v);\n }\n}\n"
"public synchronized void updateProperties(Id.Namespace namespaceId, NamespaceMeta namespaceMeta) throws Exception {\n if (!exists(namespaceId)) {\n throw new NamespaceNotFoundException(namespaceId);\n }\n authorizerInstantiator.get().enforce(namespaceId.toEntityId(), SecurityRequestContext.toPrincipal(), Action.ADMIN);\n NamespaceMeta metadata = nsStore.get(namespaceId);\n NamespaceMeta.Builder builder = new NamespaceMeta.Builder(metadata);\n if (namespaceMeta.getDescription() != null) {\n builder.setDescription(namespaceMeta.getDescription());\n }\n NamespaceConfig config = namespaceMeta.getConfig();\n if (config != null && !Strings.isNullOrEmpty(config.getSchedulerQueueName())) {\n builder.setSchedulerQueueName(config.getSchedulerQueueName());\n }\n nsStore.update(builder.build());\n}\n"
"public boolean select(Viewer viewer, Object parentElement, Object element) {\n if (element instanceof IFolder) {\n IFolder folder = (IFolder) element;\n if (\"String_Node_Str\".equals(folder.getName()) || \"String_Node_Str\".equals(folder.getName())) {\n return true;\n } else {\n return defaultValidFolder.getFullPath().isPrefixOf(folder.getFullPath()) && !folder.getName().endsWith(SVN_FOLDER_NAME);\n }\n }\n return false;\n}\n"
"private void notifyMerlinService(Context context, ConnectivityChangeEvent connectivityChangedEvent) {\n MerlinService merlinService = getMerlinService(context);\n if (isAvailable(merlinService)) {\n merlinService.onConnectivityChanged(connectivityChangedEvent);\n }\n}\n"
"public void addParameter(ParameterInfo parameter) {\n synchronized (parametersMonitor) {\n ParameterInfo[] results = new ParameterInfo[parameters.length + 1];\n System.arraycopy(parameters, 0, results, 0, parameters.length);\n results[parameters.length] = parameter;\n parameters = results;\n this.info = null;\n }\n}\n"
"boolean processIndexType(IndexType indexType, String indexName, String orgDN) throws AuthLoginException {\n boolean ignoreProfile = false;\n IndexType previousType = loginState.getPreviousIndexType();\n String normOrgDN = DNUtils.normalizeDN(orgDN);\n if ((previousType != IndexType.LEVEL && previousType != IndexType.COMPOSITE_ADVICE) || indexType != IndexType.MODULE_INSTANCE) {\n HttpServletRequest hreq = loginState.getHttpServletRequest();\n boolean isTokenValid = false;\n final boolean isFederation = indexType == IndexType.MODULE_INSTANCE && ISAuthConstants.FEDERATION_MODULE.equals(indexName);\n if (hreq != null && !isFederation) {\n try {\n SSOTokenManager manager = SSOTokenManager.getInstance();\n SSOToken ssoToken = manager.createSSOToken(hreq);\n if (manager.isValidToken(ssoToken)) {\n debug.message(\"String_Node_Str\");\n isTokenValid = true;\n }\n } catch (Exception e) {\n debug.message(\"String_Node_Str\" + e.toString());\n }\n if (!isTokenValid) {\n debug.message(\"String_Node_Str\");\n Hashtable requestHash = loginState.getRequestParamHash();\n String newOrgDN = AuthUtils.getDomainNameByRequest(hreq, requestHash);\n if (debug.messageEnabled()) {\n debug.message(\"String_Node_Str\" + orgDN + \"String_Node_Str\" + newOrgDN);\n }\n if (normOrgDN != null) {\n if (!normOrgDN.equals(newOrgDN) && !pCookieMode) {\n loginStatus.setStatus(LoginStatus.AUTH_RESET);\n loginState.setErrorCode(AMAuthErrorCode.AUTH_ERROR);\n setErrorMsgAndTemplate();\n internalAuthError = true;\n throw new AuthLoginException(BUNDLE_NAME, AMAuthErrorCode.AUTH_ERROR, null);\n }\n }\n }\n }\n }\n if (indexType == IndexType.COMPOSITE_ADVICE) {\n debug.message(\"String_Node_Str\");\n String compositeAdvice = URLEncDec.decode(indexName);\n loginState.setCompositeAdvice(compositeAdvice);\n try {\n if (processCompositeAdvice(indexType, indexName, orgDN, clientType)) {\n debug.message(\"String_Node_Str\");\n return true;\n } else {\n return false;\n }\n } catch (AuthException ae) {\n loginState.setErrorCode(ae.getErrorCode());\n loginState.logFailed(ae.getMessage());\n setErrorMsgAndTemplate();\n loginStatus.setStatus(LoginStatus.AUTH_FAILED);\n throw new AuthLoginException(ae);\n }\n } else if (indexType == IndexType.LEVEL) {\n debug.message(\"String_Node_Str\");\n try {\n if (processLevel(indexType, indexName, orgDN, clientType)) {\n debug.message(\"String_Node_Str\");\n return true;\n } else {\n return false;\n }\n } catch (AuthException ae) {\n loginState.setErrorCode(ae.getErrorCode());\n loginState.logFailed(ae.getMessage());\n setErrorMsgAndTemplate();\n loginStatus.setStatus(LoginStatus.AUTH_FAILED);\n throw new AuthLoginException(ae);\n }\n } else if (indexType == IndexType.USER) {\n debug.message(\"String_Node_Str\");\n boolean userValid = false;\n if (!loginState.ignoreProfile()) {\n userValid = validateUser(indexName);\n } else {\n ignoreProfile = true;\n }\n if (pCookieMode) {\n processPCookieMode(userValid);\n return true;\n } else if ((!userValid) && (!ignoreProfile)) {\n debug.message(\"String_Node_Str\");\n loginState.logFailed(bundle.getString(\"String_Node_Str\"), \"String_Node_Str\");\n loginState.setErrorCode(AMAuthErrorCode.AUTH_LOGIN_FAILED);\n setErrorMsgAndTemplate();\n loginStatus.setStatus(LoginStatus.AUTH_FAILED);\n throw new AuthLoginException(BUNDLE_NAME, AMAuthErrorCode.AUTH_USER_INACTIVE, null);\n } else if (ignoreProfile) {\n setAuthError(AMAuthErrorCode.AUTH_PROFILE_ERROR, \"String_Node_Str\");\n throw new AuthLoginException(BUNDLE_NAME, AMAuthErrorCode.AUTH_PROFILE_ERROR, null);\n } else {\n return false;\n }\n } else if (indexType == IndexType.MODULE_INSTANCE) {\n debug.message(\"String_Node_Str\");\n boolean instanceExists = loginState.getDomainAuthenticators().contains(indexName);\n if (!indexName.equals(ISAuthConstants.APPLICATION_MODULE) && !instanceExists) {\n debug.message(\"String_Node_Str\");\n loginState.setErrorCode(AMAuthErrorCode.AUTH_MODULE_DENIED);\n loginState.logFailed(bundle.getString(\"String_Node_Str\"), \"String_Node_Str\");\n setErrorMsgAndTemplate();\n loginStatus.setStatus(LoginStatus.AUTH_FAILED);\n throw new AuthLoginException(BUNDLE_NAME, AMAuthErrorCode.AUTH_MODULE_DENIED, null);\n } else {\n return false;\n }\n } else if (indexType == IndexType.ROLE) {\n debug.message(\"String_Node_Str\");\n if (loginState.ignoreProfile()) {\n setAuthError(AMAuthErrorCode.AUTH_TYPE_DENIED, \"String_Node_Str\");\n throw new AuthLoginException(BUNDLE_NAME, AMAuthErrorCode.AUTH_TYPE_DENIED, null);\n }\n }\n return false;\n}\n"
"public static void changeUserPassword(String userId, String oldPass, String newPass, String email) throws EucalyptusServiceException {\n try {\n User user = Accounts.lookupUserById(userId);\n if (!user.getPassword().equals(Crypto.generateHashedPassword(oldPass))) {\n throw new EucalyptusServiceException(\"String_Node_Str\");\n }\n String newEncrypted = Crypto.generateHashedPassword(newPass);\n if (user.getPassword().equals(newEncrypted)) {\n throw new EucalyptusServiceException(\"String_Node_Str\");\n }\n if (newEncrypted.equals(Crypto.generateHashedPassword(user.getName()))) {\n throw new EucalyptusServiceException(\"String_Node_Str\");\n }\n user.setPassword(newEncrypted);\n user.setPasswordExpires(System.currentTimeMillis() + User.PASSWORD_LIFETIME);\n if (!Strings.isNullOrEmpty(email)) {\n user.setInfo(User.EMAIL, email);\n }\n } catch (Exception e) {\n if (e instanceof EucalyptusServiceException) {\n throw (EucalyptusServiceException) e;\n }\n LOG.error(\"String_Node_Str\" + userId, e);\n LOG.debug(e, e);\n throw new EucalyptusServiceException(\"String_Node_Str\" + userId + \"String_Node_Str\" + e.getMessage());\n }\n}\n"
"private void askForWordNumber() {\n final View checkBoxView = View.inflate(this, R.layout.wordlist_checkboxes, null);\n final CheckBox checkBox = (CheckBox) checkBoxView.findViewById(R.id.checkboxWordlistPassphrase);\n final RadioButton words12 = (RadioButton) checkBoxView.findViewById(R.id.wordlist12);\n final RadioButton words18 = (RadioButton) checkBoxView.findViewById(R.id.wordlist18);\n final RadioButton words24 = (RadioButton) checkBoxView.findViewById(R.id.wordlist24);\n checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n public void onCheckedChanged(CompoundButton compoundButton, boolean b) {\n if (b) {\n checkBoxView.findViewById(R.id.tvPassphraseInfo).setVisibility(View.VISIBLE);\n } else {\n checkBoxView.findViewById(R.id.tvPassphraseInfo).setVisibility(View.GONE);\n }\n }\n });\n AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.MyceliumModern_Dialog);\n builder.setTitle(R.string.import_words_title);\n builder.setMessage(R.string.import_wordlist_questions).setView(checkBoxView).setCancelable(false).setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n usesPassphrase = checkBox.isChecked();\n if (words12.isChecked()) {\n numberOfWords = 12;\n } else if (words18.isChecked()) {\n numberOfWords = 18;\n } else if (words24.isChecked()) {\n numberOfWords = 24;\n } else {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n setHint();\n }\n }).show();\n}\n"
"private void genDefinedStringPattern(DefinedStringPattern dsp) throws Exception {\n String dspType = dsp.getSchema();\n String dspTypeName = dspType.endsWith(\"String_Node_Str\") ? dspType.substring(0, dspType.length() - 1) : dspType;\n Resource dspTypeRes = RDFTypeMap.xsd_type_for(dspTypeName);\n FHIRResource dspRes = fact.fhir_class(dsp.getCode(), dsp.getBase()).addDefinition(dsp.getDefinition());\n if (dspRes != null) {\n if (dspType.endsWith(\"String_Node_Str\")) {\n if (!owlTarget) {\n List<Resource> facets = new ArrayList<Resource>(1);\n facets.add(fact.fhir_pattern(dsp.getRegex()));\n dspRes.restriction(fact.fhir_restriction(value, fact.fhir_datatype_restriction(dspTypeRes == XSD.xstring ? XSD.normalizedString : dspTypeRes, facets)));\n } else\n dspRes.restriction(fact.fhir_restriction(value, dspTypeRes));\n } else\n dspRes.restriction(fact.fhir_restriction(value, dspTypeRes));\n } else\n dspRes.restriction(fact.fhir_restriction(value, dspTypeRes));\n}\n"
"public final Size compute(IDisplayServer xs, Chart cm, SeriesDefinition[] seda, RunTimeContext rtc) throws ChartException {\n LegendData lgData = new LegendData(xs, cm, seda, rtc);\n initAvailableSize(lgData);\n boolean bMinSliceDefined = false;\n if (cm instanceof ChartWithoutAxes) {\n bMinSliceDefined = ((ChartWithoutAxes) cm).isSetMinSlice();\n lgData.sMinSliceLabel = ((ChartWithoutAxes) cm).getMinSliceLabel();\n if (lgData.sMinSliceLabel == null || lgData.sMinSliceLabel.length() == 0) {\n lgData.sMinSliceLabel = IConstants.UNDEFINED_STRING;\n } else {\n lgData.sMinSliceLabel = rtc.externalizedMessage(lgData.sMinSliceLabel);\n }\n }\n if (bMinSliceDefined && lgData.bPaletteByCategory && cm instanceof ChartWithoutAxes) {\n calculateExtraLegend(cm, rtc, lgData);\n }\n Size titleSize = getTitleSize(lgData);\n double[] size = null;\n Boolean bDataEmpty = null;\n if (rtc != null) {\n bDataEmpty = rtc.getState(RunTimeContext.StateKey.DATA_EMPTY_KEY);\n }\n if (bDataEmpty == null) {\n bDataEmpty = false;\n }\n if (!bDataEmpty) {\n ContentProvider cProvider = ContentProvider.newInstance(lgData);\n ContentPlacer cPlacer = ContentPlacer.newInstance(lgData);\n LegendItemHints lih;\n while ((lih = cProvider.nextContent()) != null) {\n if (!cPlacer.placeContent(lih)) {\n break;\n }\n }\n cPlacer.finishPlacing();\n size = cPlacer.getSize();\n }\n if (size == null) {\n size = new double[] { 0, 0 };\n }\n double dWidth = size[0], dHeight = size[1];\n if (titleSize != null) {\n int iTitlePos = lgData.lg.getTitlePosition().getValue();\n if (iTitlePos == Position.ABOVE || iTitlePos == Position.BELOW) {\n dWidth = Math.max(dWidth, titleSize.getWidth());\n dHeight = dHeight + titleSize.getHeight();\n } else {\n dWidth = dWidth + titleSize.getWidth();\n dHeight = Math.max(dHeight, titleSize.getHeight());\n }\n }\n if (rtc != null) {\n List<LegendItemHints> legendItems = lgData.legendItems;\n LegendItemHints[] liha = legendItems.toArray(new LegendItemHints[legendItems.size()]);\n LegendLayoutHints lilh = new LegendLayoutHints(SizeImpl.create(dWidth, dHeight), titleSize, lgData.laTitle, lgData.bMinSliceApplied, lgData.sMinSliceLabel, liha);\n rtc.setLegendLayoutHints(lilh);\n }\n sz = SizeImpl.create(dWidth, dHeight);\n return sz;\n}\n"
"protected void _postParse(MoMLParser parser) {\n Iterator<?> topObjects = parser.topObjectsCreated().iterator();\n while (topObjects.hasNext()) {\n NamedObj topObject = (NamedObj) topObjects.next();\n if (_isToPattern || _isFromReplacement && _isToReplacement) {\n try {\n topObject.workspace().getReadAccess();\n _setOrClearPatternObjectAttributes(topObject, false, null);\n } finally {\n topObject.workspace().doneReading();\n }\n }\n }\n if (_isFromPattern && _isToReplacement || _isFromReplacement && _isToPattern) {\n parser.clearTopObjectsList();\n } else {\n super._postParse(parser);\n }\n}\n"
"public void process(CameraPinholeRadial intrinsic, List<BufferedImage> colorImages) {\n pixelToNorm = LensDistortionOps.narrow(intrinsic).undistort_F64(true, false);\n estimateEssential = FactoryMultiViewRobust.essentialRansac(new ConfigEssential(intrinsic), new ConfigRansac(4000, inlierTol));\n estimatePnP = FactoryMultiViewRobust.pnpRansac(new ConfigPnP(intrinsic), new ConfigRansac(4000, inlierTol));\n detectImageFeatures(colorImages);\n computeConnections();\n printConnectionMatrix();\n System.out.println(\"String_Node_Str\");\n CameraView seed = selectMostConnectFrame();\n CameraView seedNext = estimateFeatureLocations(seed);\n estimateAllFeatures(seed, seedNext);\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n featuresPruned.addAll(featuresAll);\n System.out.println(\"String_Node_Str\" + featuresAll.size() + \"String_Node_Str\" + featuresPruned.size());\n System.out.println(\"String_Node_Str\");\n long before = System.currentTimeMillis();\n performBundleAdjustment(seed, intrinsic);\n long after = System.currentTimeMillis();\n System.out.println(\"String_Node_Str\" + (after - before) + \"String_Node_Str\");\n visualizeResults(intrinsic);\n System.out.println(\"String_Node_Str\");\n}\n"
"public Expression getExpression() {\n if (expression == null) {\n expression = (Expression) EcoreUtil.copy(DefinitionHandler.getInstance().getDQRuleDefaultIndicatorDefinition().getSqlGenericExpression().get(0));\n }\n return expression;\n}\n"
"public boolean step() {\n if (componentSystems.hasNext()) {\n componentSystems.next().preBegin();\n }\n return !componentSystems.hasNext();\n}\n"
"protected Void doInBackground() throws Exception {\n Helper.freeMem();\n try {\n AbortRetryIgnoreHandler errorHandler = new GuiAbortRetryIgnoreHandler();\n if (compressed) {\n swf.exportFla(errorHandler, selfile.getAbsolutePath(), new File(swf.getFile()).getName(), ApplicationInfo.APPLICATION_NAME, ApplicationInfo.applicationVerName, ApplicationInfo.version, Configuration.parallelSpeedUp.get(), selectedVersion);\n } else {\n swf.exportXfl(errorHandler, selfile.getAbsolutePath(), new File(swf.getFile()).getName(), ApplicationInfo.APPLICATION_NAME, ApplicationInfo.applicationVerName, ApplicationInfo.version, Configuration.parallelSpeedUp.get(), selectedVersion);\n }\n } catch (Exception ex) {\n View.showMessageDialog(null, translate(\"String_Node_Str\") + \"String_Node_Str\" + ex.getClass().getName() + \"String_Node_Str\" + ex.getLocalizedMessage(), translate(\"String_Node_Str\"), JOptionPane.ERROR_MESSAGE);\n }\n Helper.freeMem();\n return null;\n}\n"
"public void test_sqls_save() throws IOException {\n SqlManager sqls = new FileSqlManager(\"String_Node_Str\");\n int count = sqls.count();\n File f = Files.findFile(\"String_Node_Str\");\n ((FileSqlManager) sqls).saveAs(f.getAbsolutePath());\n sqls = new FileSqlManager(\"String_Node_Str\");\n assertEquals(count, sqls.count());\n}\n"
"public ConfiguredTarget create(RuleContext ruleContext) throws RuleErrorException {\n ImmutableList<Artifact> srcs = ruleContext.getPrerequisiteArtifacts(\"String_Node_Str\", Mode.TARGET).list();\n if (srcs.size() != 1) {\n ruleContext.attributeError(\"String_Node_Str\", \"String_Node_Str\");\n return null;\n }\n Artifact symlink = ruleContext.createOutputArtifact();\n Artifact src = srcs.get(0);\n ruleContext.registerAction(new ExecutableSymlinkAction(ruleContext.getActionOwner(), src, symlink));\n NestedSetBuilder<Artifact> filesToBuildBuilder = NestedSetBuilder.<Artifact>stableOrder().add(src).add(symlink);\n Runfiles.Builder runfilesBuilder = new Runfiles.Builder(ruleContext.getWorkspaceName(), ruleContext.getConfiguration().legacyExternalRunfiles());\n Artifact mainExecutable = (OS.getCurrent() == OS.WINDOWS) ? launcherForWindows(ruleContext, symlink, src) : symlink;\n if (!symlink.equals(mainExecutable)) {\n filesToBuildBuilder.add(mainExecutable);\n runfilesBuilder.addArtifact(symlink);\n }\n NestedSet<Artifact> filesToBuild = filesToBuildBuilder.build();\n Runfiles runfiles = runfilesBuilder.addTransitiveArtifacts(filesToBuild).addRunfiles(ruleContext, RunfilesProvider.DEFAULT_RUNFILES).build();\n RunfilesSupport runfilesSupport = RunfilesSupport.withExecutable(ruleContext, runfiles, mainExecutable);\n return new RuleConfiguredTargetBuilder(ruleContext).setFilesToBuild(filesToBuild).setRunfilesSupport(runfilesSupport, mainExecutable).addProvider(RunfilesProvider.class, RunfilesProvider.simple(runfiles)).build();\n}\n"
"protected ISharedObjectContainer createClient() throws Exception {\n ID newContainerID = IDFactory.getDefault().createGUID();\n ISharedObjectContainer result = SharedObjectContainerFactory.getDefault().createSharedObjectContainer(contd, new Object[] { newContainerID, new Integer(DEFAULT_TIMEOUT) });\n return result;\n}\n"
"private void processJavaType(JavaType javaType, TypeInfo typeInfo, NamespaceInfo nsInfo) {\n if (null != javaType.getJavaAttributes()) {\n List<String> processedPropertyNames = new ArrayList<String>();\n for (JAXBElement jaxbElement : javaType.getJavaAttributes().getJavaAttribute()) {\n JavaAttribute javaAttribute = (JavaAttribute) jaxbElement.getValue();\n Property originalProperty = typeInfo.getOriginalProperties().get(javaAttribute.getJavaAttribute());\n if (originalProperty == null) {\n if (typeInfo.getXmlVirtualAccessMethods() != null) {\n Property newProperty = new Property(this.aProcessor.getHelper());\n newProperty.setPropertyName(javaAttribute.getJavaAttribute());\n newProperty.setExtension(true);\n String attributeType = null;\n if (javaAttribute instanceof XmlElement) {\n attributeType = ((XmlElement) javaAttribute).getType();\n } else if (javaAttribute instanceof XmlAttribute) {\n attributeType = ((XmlAttribute) javaAttribute).getType();\n }\n if (attributeType != null && attributeType.equals(\"String_Node_Str\")) {\n newProperty.setType(jModelInput.getJavaModel().getClass(attributeType));\n } else {\n newProperty.setType(jModelInput.getJavaModel().getClass(Helper.STRING));\n }\n originalProperty = newProperty;\n typeInfo.addProperty(javaAttribute.getJavaAttribute(), newProperty);\n } else {\n getLogger().logWarning(JAXBMetadataLogger.NO_PROPERTY_FOR_JAVA_ATTRIBUTE, new Object[] { javaAttribute.getJavaAttribute(), javaType.getName() });\n continue;\n }\n }\n boolean alreadyProcessed = processedPropertyNames.contains(javaAttribute.getJavaAttribute());\n Property propToProcess;\n if (alreadyProcessed) {\n propToProcess = (Property) originalProperty.clone();\n } else {\n propToProcess = typeInfo.getProperties().get(javaAttribute.getJavaAttribute());\n }\n processJavaAttribute(typeInfo, javaAttribute, propToProcess, nsInfo, javaType);\n if (propToProcess.isTransient()) {\n typeInfo.getPropertyList().remove(propToProcess);\n }\n if (alreadyProcessed) {\n List<Property> additionalProps = null;\n if (typeInfo.hasAdditionalProperties()) {\n additionalProps = typeInfo.getAdditionalProperties().get(javaAttribute.getJavaAttribute());\n }\n if (additionalProps == null) {\n additionalProps = new ArrayList<Property>();\n }\n additionalProps.add(propToProcess);\n typeInfo.getAdditionalProperties().put(javaAttribute.getJavaAttribute(), additionalProps);\n } else {\n typeInfo.getProperties().put(javaAttribute.getJavaAttribute(), propToProcess);\n processedPropertyNames.add(javaAttribute.getJavaAttribute());\n }\n }\n }\n}\n"
"final public double getOutput(double input) {\n if (Math.abs(input) * slope > 100) {\n return Math.signum(input) * 1.0d;\n }\n double E_x = Math.exp(this.slope * input);\n this.output = amplitude * ((E_x - 1d) / (E_x + 1d));\n return this.output;\n}\n"
"private SyntaxNode parseFunction(StringFunctionTokenQueue tokenQueue) {\n String functionString = tokenQueue.consumeFunction();\n StringFunctionTokenQueue tempTokenQueue = new StringFunctionTokenQueue(functionString);\n String functionName = tempTokenQueue.consumeIdentify();\n StringFunction function = StringFunctionEnv.findFunction(functionName);\n if (function == null) {\n throw new IllegalStateException(\"String_Node_Str\" + functionName);\n }\n tempTokenQueue.consumeWhitespace();\n if (tempTokenQueue.isEmpty() || tempTokenQueue.peek() != '(') {\n throw new IllegalStateException(\"String_Node_Str\" + functionString + \"String_Node_Str\");\n }\n String paramsStr = StringUtils.trimToEmpty(tempTokenQueue.chompBalanced('(', ')'));\n StringFunctionTokenQueue paramTokenQueue = new StringFunctionTokenQueue(paramsStr);\n String parameter;\n List<SyntaxNode> params = Lists.newLinkedList();\n while ((parameter = paramTokenQueue.consumeIgnoreQuote(',')) != null) {\n params.add(new ExpressionParser(new StringFunctionTokenQueue(parameter)).parse());\n }\n return new FunctionSyntaxNode(function, params);\n}\n"
"public void insert(Widget w, int beforeIndex) {\n Element container = createWidgetContainer();\n DOM.insertChild(getElement(), container, beforeIndex);\n initChildWidget(w);\n initWidgetContainer(container);\n super.insert(w, container, beforeIndex, true);\n}\n"
"private void cmbTypeFilterActionPerformed(java.awt.event.ActionEvent evt) {\n if (filterListenersActive)\n filterDict();\n}\n"
"private static List<Class> findClasses(File directory, String packageName, Class<?> type) {\n List<Class> cards = new ArrayList<>();\n if (!directory.exists()) {\n return cards;\n }\n for (File file : directory.listFiles()) {\n if (file.getName().endsWith(\"String_Node_Str\")) {\n try {\n Class<?> clazz = Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6));\n if (type.isAssignableFrom(clazz)) {\n cards.add(clazz);\n }\n } catch (ClassNotFoundException ex) {\n }\n }\n }\n return cards;\n}\n"
"public void parse(IParserManager pm, IToken token) throws SyntaxError {\n if (token.type() == Symbols.SEMICOLON) {\n return;\n }\n switch(this.mode) {\n case PACKAGE:\n if (this.parsePackage(pm, token)) {\n this.mode = IMPORT;\n return;\n }\n case IMPORT:\n if (this.parseImport(pm, token)) {\n return;\n }\n }\n if (this.isInMode(IMPORT)) {\n if (this.parseImport(pm, token)) {\n return;\n }\n }\n throw new SyntaxError(token, \"String_Node_Str\");\n}\n"
"public static IDiskArray getIntersection(IDiskArray[] arrays) throws IOException {\n PrimitiveDiskSortedStack[] stacks = new PrimitiveDiskSortedStack[arrays.length];\n for (int i = 0; i < arrays.length; i++) {\n stacks[i] = new PrimitiveDiskSortedStack(Math.min(arrays[i].size(), Constants.MAX_LIST_BUFFER_SIZE), true, true);\n if (arrays[i] == null || arrays[i].size() == 0) {\n return null;\n }\n for (int j = 0; j < arrays[i].size(); j++) {\n stacks[i].push(arrays[i].get(j));\n }\n }\n return getIntersection(stacks);\n}\n"
"private void createNodeContainerList() {\n int firstIndex = 0;\n int index = 0;\n nodeContainerList = new ArrayList<NodeContainer>();\n connections = new ArrayList<IConnection>();\n createdNames = new ArrayList<String>();\n Map<String, String> oldNameTonewNameMap = new HashMap<String, String>();\n Map<String, String> oldMetaToNewMeta = new HashMap<String, String>();\n Map<INode, SubjobContainer> mapping = new HashMap<INode, SubjobContainer>();\n for (NodePart copiedNodePart : nodeParts) {\n IGraphicalNode copiedNode = (IGraphicalNode) copiedNodePart.getModel();\n if (!containNodeInProcess(copiedNode)) {\n continue;\n }\n IComponent component = ComponentsFactoryProvider.getInstance().get(copiedNode.getComponent().getName());\n if (component == null) {\n component = copiedNode.getComponent();\n }\n IGraphicalNode pastedNode = new Node(component, process);\n if (nodeMap != null) {\n nodeMap.put(copiedNode, pastedNode);\n }\n if (isJobletRefactor()) {\n process.removeUniqueNodeName(pastedNode.getUniqueName());\n pastedNode.setPropertyValue(EParameterName.UNIQUE_NAME.getName(), copiedNode.getUniqueName());\n process.addUniqueNodeName(copiedNode.getUniqueName());\n }\n makeCopyNodeAndSubjobMapping(copiedNode, pastedNode, mapping);\n Point location = null;\n if (getCursorLocation() == null) {\n location = (Point) copiedNode.getLocation();\n } else {\n location = getCursorLocation();\n index = nodeParts.indexOf(copiedNodePart);\n }\n if (process.isGridEnabled()) {\n int tempVar = location.x / TalendEditor.GRID_SIZE;\n location.x = tempVar * TalendEditor.GRID_SIZE;\n tempVar = location.y / TalendEditor.GRID_SIZE;\n location.y = tempVar * TalendEditor.GRID_SIZE;\n }\n pastedNode.setLocation(findLocationForNode(location, (Dimension) copiedNode.getSize(), index, firstIndex, copiedNodePart));\n pastedNode.setSize(copiedNode.getSize());\n INodeConnector mainConnector;\n if (pastedNode.isELTComponent()) {\n mainConnector = pastedNode.getConnectorFromType(EConnectionType.TABLE);\n } else {\n mainConnector = pastedNode.getConnectorFromType(EConnectionType.FLOW_MAIN);\n }\n if (!mainConnector.isMultiSchema()) {\n if (copiedNode.getMetadataList().size() != 0) {\n pastedNode.getMetadataList().clear();\n for (IMetadataTable metaTable : copiedNode.getMetadataList()) {\n IMetadataTable newMetaTable = metaTable.clone();\n if (metaTable.getTableName().equals(copiedNode.getUniqueName())) {\n newMetaTable.setTableName(pastedNode.getUniqueName());\n }\n for (IMetadataColumn column : metaTable.getListColumns()) {\n if (column.isCustom()) {\n IMetadataColumn newColumn = newMetaTable.getColumn(column.getLabel());\n newColumn.setReadOnly(column.isReadOnly());\n newColumn.setCustom(column.isCustom());\n }\n }\n pastedNode.getMetadataList().add(newMetaTable);\n }\n }\n } else {\n List<IMetadataTable> copyOfMetadataList = new ArrayList<IMetadataTable>();\n for (IMetadataTable metaTable : copiedNode.getMetadataList()) {\n IMetadataTable newTable = metaTable.clone();\n if (copiedNode.isELTComponent()) {\n newTable.setTableName(createNewConnectionName(metaTable.getTableName(), IProcess.DEFAULT_TABLE_CONNECTION_NAME));\n } else {\n newTable.setTableName(createNewConnectionName(metaTable.getTableName(), null));\n }\n oldMetaToNewMeta.put(pastedNode.getUniqueName() + \"String_Node_Str\" + metaTable.getTableName(), newTable.getTableName());\n for (IMetadataColumn column : metaTable.getListColumns()) {\n if (column.isCustom()) {\n IMetadataColumn newColumn = newTable.getColumn(column.getLabel());\n newColumn.setReadOnly(column.isReadOnly());\n newColumn.setCustom(column.isCustom());\n }\n }\n newTable.sortCustomColumns();\n copyOfMetadataList.add(newTable);\n }\n pastedNode.setMetadataList(copyOfMetadataList);\n IExternalNode externalNode = pastedNode.getExternalNode();\n if (externalNode != null) {\n if (copiedNode.getExternalData() != null) {\n try {\n externalNode.setExternalData(copiedNode.getExternalData().clone());\n } catch (CloneNotSupportedException e) {\n ExceptionHandler.process(e);\n }\n ((Node) pastedNode).setExternalData(externalNode.getExternalData());\n }\n if (copiedNode.getExternalNode().getExternalEmfData() != null) {\n externalNode.setExternalEmfData(EcoreUtil.copy(copiedNode.getExternalNode().getExternalEmfData()));\n }\n for (IMetadataTable metaTable : copiedNode.getMetadataList()) {\n String oldName = metaTable.getTableName();\n String newName = oldMetaToNewMeta.get(pastedNode.getUniqueName() + \"String_Node_Str\" + metaTable.getTableName());\n externalNode.renameOutputConnection(oldName, newName);\n CorePlugin.getDefault().getMapperService().renameJoinTable(process, externalNode.getExternalData(), createdNames);\n }\n if (copiedNode.getExternalNode() != null) {\n ImageDescriptor screenshot = copiedNode.getExternalNode().getScreenshot();\n if (screenshot != null) {\n externalNode.setScreenshot(screenshot);\n }\n }\n }\n }\n ((Node) pastedNode).getNodeLabel().setOffset(new Point(((Node) copiedNode).getNodeLabel().getOffset()));\n oldNameTonewNameMap.put(copiedNode.getUniqueName(), pastedNode.getUniqueName());\n if (copiedNode.getElementParametersWithChildrens() != null) {\n for (ElementParameter param : (List<ElementParameter>) copiedNode.getElementParametersWithChildrens()) {\n if (!EParameterName.UNIQUE_NAME.getName().equals(param.getName())) {\n IElementParameter elementParameter = pastedNode.getElementParameter(param.getName());\n if (elementParameter != null) {\n if (param.getFieldType() == EParameterFieldType.TABLE) {\n List<Map<String, Object>> tableValues = (List<Map<String, Object>>) param.getValue();\n ArrayList newValues = new ArrayList();\n for (Map<String, Object> map : tableValues) {\n Map<String, Object> newMap = new HashMap<String, Object>();\n newMap.putAll(map);\n if (EParameterName.SCHEMAS.name().equals(param.getName()) && !oldMetaToNewMeta.isEmpty()) {\n String newSchemaName = oldMetaToNewMeta.get(pastedNode.getUniqueName() + \"String_Node_Str\" + map.get(EParameterName.SCHEMA.getName()));\n if (newSchemaName != null) {\n newMap.put(EParameterName.SCHEMA.getName(), newSchemaName);\n }\n }\n newValues.add(newMap);\n }\n elementParameter.setValue(newValues);\n } else {\n if (param.getParentParameter() != null) {\n String parentName = param.getParentParameter().getName();\n pastedNode.setPropertyValue(parentName + \"String_Node_Str\" + param.getName(), param.getValue());\n } else {\n pastedNode.setPropertyValue(param.getName(), param.getValue());\n elementParameter.setReadOnly(param.getOriginalityReadOnly());\n elementParameter.setRepositoryValueUsed(param.isRepositoryValueUsed());\n }\n }\n }\n }\n }\n }\n NodeContainer nc = null;\n if (((Node) pastedNode).isJoblet()) {\n nc = new JobletContainer((Node) pastedNode);\n } else {\n nc = new NodeContainer((Node) pastedNode);\n }\n nodeContainerList.add(nc);\n }\n ((Process) process).setCopyPasteSubjobMappings(mapping);\n Map<String, String> oldToNewConnVarMap = new HashMap<String, String>();\n for (NodePart copiedNodePart : nodeParts) {\n INode copiedNode = (INode) copiedNodePart.getModel();\n for (IConnection connection : (List<IConnection>) copiedNode.getOutgoingConnections()) {\n INode pastedTargetNode = null, pastedSourceNode = null;\n String nodeSource = oldNameTonewNameMap.get(copiedNode.getUniqueName());\n for (NodeContainer nodeContainer : nodeContainerList) {\n INode node = nodeContainer.getNode();\n if (node.getUniqueName().equals(nodeSource)) {\n pastedSourceNode = node;\n }\n }\n INode targetNode = connection.getTarget();\n String nodeToConnect = oldNameTonewNameMap.get(targetNode.getUniqueName());\n if (nodeToConnect != null) {\n for (NodeContainer nodeContainer : nodeContainerList) {\n INode node = nodeContainer.getNode();\n if (node.getUniqueName().equals(nodeToConnect)) {\n pastedTargetNode = node;\n }\n }\n }\n if ((pastedSourceNode != null) && (pastedTargetNode != null)) {\n String newConnectionName;\n String metaTableName;\n if (connection.getLineStyle().hasConnectionCategory(IConnectionCategory.UNIQUE_NAME) && connection.getLineStyle().hasConnectionCategory(IConnectionCategory.FLOW)) {\n String newNameBuiltIn = oldMetaToNewMeta.get(pastedSourceNode.getUniqueName() + \"String_Node_Str\" + connection.getMetaName());\n if (newNameBuiltIn == null) {\n IElementParameter formatParam = pastedSourceNode.getElementParameter(EParameterName.CONNECTION_FORMAT.getName());\n String baseName = IProcess.DEFAULT_ROW_CONNECTION_NAME;\n if (formatParam != null) {\n String value = (String) formatParam.getValue();\n if (value != null && !\"String_Node_Str\".equals(value)) {\n baseName = value;\n }\n }\n if (process.checkValidConnectionName(connection.getName(), true)) {\n baseName = null;\n }\n newConnectionName = createNewConnectionName(connection.getName(), baseName);\n } else {\n newConnectionName = newNameBuiltIn;\n }\n } else {\n newConnectionName = connection.getName();\n }\n String meta = oldMetaToNewMeta.get(pastedSourceNode.getUniqueName() + \"String_Node_Str\" + connection.getMetaName());\n if (meta != null) {\n if (pastedSourceNode.getConnectorFromType(connection.getLineStyle()).isMultiSchema() && !connection.getLineStyle().equals(EConnectionType.TABLE)) {\n newConnectionName = meta;\n }\n metaTableName = meta;\n } else {\n if (pastedSourceNode.getConnectorFromType(connection.getLineStyle()).isMultiSchema()) {\n metaTableName = pastedSourceNode.getMetadataList().get(0).getTableName();\n } else {\n metaTableName = pastedSourceNode.getUniqueName();\n }\n }\n IConnection pastedConnection;\n if (!pastedTargetNode.isELTComponent()) {\n pastedConnection = new Connection(pastedSourceNode, pastedTargetNode, connection.getLineStyle(), connection.getConnectorName(), metaTableName, newConnectionName, connection.isMonitorConnection());\n } else {\n pastedConnection = new Connection(pastedSourceNode, pastedTargetNode, connection.getLineStyle(), connection.getConnectorName(), metaTableName, newConnectionName, metaTableName, connection.isMonitorConnection());\n }\n connections.add(pastedConnection);\n oldNameTonewNameMap.put(connection.getUniqueName(), pastedConnection.getUniqueName());\n for (ElementParameter param : (List<ElementParameter>) connection.getElementParameters()) {\n pastedConnection.setPropertyValue(param.getName(), param.getValue());\n }\n IElementParameter uniqueNameParam = pastedConnection.getElementParameter(EParameterName.UNIQUE_NAME.getName());\n String newName = oldNameTonewNameMap.get(connection.getUniqueName());\n if (uniqueNameParam != null && newName != null) {\n if (!newName.equals(uniqueNameParam.getValue())) {\n pastedConnection.setPropertyValue(EParameterName.UNIQUE_NAME.getName(), newName);\n }\n }\n ((Connection) pastedConnection).getConnectionLabel().setOffset(new Point(((Connection) connection).getConnectionLabel().getOffset()));\n INodeConnector connector = pastedConnection.getSourceNodeConnector();\n connector.setCurLinkNbOutput(connector.getCurLinkNbOutput() + 1);\n connector = pastedConnection.getTargetNodeConnector();\n connector.setCurLinkNbInput(connector.getCurLinkNbInput() + 1);\n IExternalNode externalNode = pastedTargetNode.getExternalNode();\n if (externalNode != null) {\n externalNode.renameInputConnection(connection.getName(), newConnectionName);\n }\n if (pastedConnection.getMetadataTable() == null) {\n continue;\n }\n for (IMetadataColumn column : pastedConnection.getMetadataTable().getListColumns()) {\n String oldConnVar = connection.getName() + \"String_Node_Str\" + column.getLabel();\n String newConnVar = newConnectionName + \"String_Node_Str\" + column.getLabel();\n if (!oldToNewConnVarMap.containsKey(oldConnVar)) {\n oldToNewConnVarMap.put(oldConnVar, newConnVar);\n }\n }\n }\n }\n }\n for (NodeContainer nodeContainer : nodeContainerList) {\n Node node = nodeContainer.getNode();\n for (String oldConnVar : oldToNewConnVarMap.keySet()) {\n String newConnVar = oldToNewConnVarMap.get(oldConnVar);\n if (newConnVar != null) {\n node.renameData(oldConnVar, newConnVar);\n }\n }\n }\n Map<String, Set<String>> usedDataMap = new HashMap<String, Set<String>>();\n for (NodeContainer nodeContainer : nodeContainerList) {\n Node currentNode = nodeContainer.getNode();\n String uniqueName = currentNode.getUniqueName();\n for (String oldName : oldNameTonewNameMap.keySet()) {\n if (oldName.equals(oldNameTonewNameMap.get(oldName))) {\n Set<String> oldNameSet = usedDataMap.get(uniqueName);\n if (oldNameSet == null) {\n oldNameSet = new HashSet<String>();\n usedDataMap.put(uniqueName, oldNameSet);\n }\n oldNameSet.add(oldName);\n }\n }\n }\n Map<String, Set<String>> usedDataMapForConnections = new HashMap<String, Set<String>>();\n for (IConnection connection : connections) {\n String uniqueName = connection.getUniqueName();\n for (String oldName : oldNameTonewNameMap.keySet()) {\n if (oldName != null && !oldName.equals(oldNameTonewNameMap.get(oldName)) && UpgradeElementHelper.isUseData(connection, oldName)) {\n Set<String> oldNameSet = usedDataMapForConnections.get(uniqueName);\n if (oldNameSet == null) {\n oldNameSet = new HashSet<String>();\n usedDataMapForConnections.put(uniqueName, oldNameSet);\n }\n oldNameSet.add(oldName);\n }\n }\n }\n if (!usedDataMap.isEmpty() || !usedDataMapForConnections.isEmpty()) {\n MessageBox msgBox = new MessageBox(PlatformUI.getWorkbench().getDisplay().getActiveShell(), SWT.YES | SWT.NO | SWT.ICON_WARNING);\n msgBox.setMessage(Messages.getString(\"String_Node_Str\"));\n if (msgBox.open() == SWT.YES) {\n for (NodeContainer nodeContainer : nodeContainerList) {\n Node currentNode = nodeContainer.getNode();\n Set<String> oldNameSet = usedDataMap.get(currentNode.getUniqueName());\n if (oldNameSet != null && !oldNameSet.isEmpty()) {\n for (String oldName : oldNameSet) {\n currentNode.renameData(oldName, oldNameTonewNameMap.get(oldName));\n }\n }\n }\n for (IConnection connection : connections) {\n Set<String> oldNameSet = usedDataMapForConnections.get(connection.getUniqueName());\n if (oldNameSet != null && !oldNameSet.isEmpty()) {\n for (String oldName : oldNameSet) {\n UpgradeElementHelper.renameData(connection, oldName, oldNameTonewNameMap.get(oldName));\n }\n }\n }\n }\n }\n}\n"
"protected final ConfigurationSection getNode(String baseNode, String entityName) {\n this.nodePath = FileBackend.buildPath(baseNode, entityName);\n ConfigurationSection entityNode = backend.permissions.getConfigurationSection(this.nodePath);\n if (entityNode != null) {\n this.virtual = false;\n return entityNode;\n }\n ConfigurationSection users = backend.permissions.getConfigurationSection(baseNode);\n if (users != null) {\n for (Map.Entry<String, Object> entry : users.getValues(false).entrySet()) {\n if (entry.getKey().equalsIgnoreCase(entityName) && entry.getValue() instanceof ConfigurationSection) {\n this.setName(entry.getKey());\n this.nodePath = baseNode + \"String_Node_Str\" + this.getName();\n this.virtual = false;\n return (ConfigurationSection) entry.getValue();\n }\n }\n }\n this.virtual = true;\n return backend.permissions.createSection(nodePath);\n}\n"
"public CacheRecord put(Data key, CacheRecord value) {\n CacheRecord oldRecord = super.put(key, value);\n if (oldRecord == null && entryCountingEnable) {\n cacheContext.increaseEntryCount();\n }\n return oldRecord;\n}\n"
"public void breakBlock(World world, int x, int y, int z, Block oldBlock, int oldMeta) {\n Pos.at(x, y, z).castTileEntity(world, TileEntityEnhancedBrewingStand.class).ifPresent(tile -> dropBlockAsItem(world, x, y, z, IEnhanceableTile.createItemStack(tile)));\n super.breakBlock(world, x, y, z, oldBlock, oldMeta);\n}\n"
"protected MutableConfiguration<Date, Date> newMutableConfiguration() {\n return new MutableConfiguration<Date, Date>().setTypes(Date.class, Date.class);\n}\n"
"public static List<LocalAppFileSystemConfig> load(PlatformConfig platformConfig) {\n List<LocalAppFileSystemConfig> configs = new ArrayList<>();\n ModuleConfig moduleConfig = platformConfig.getModuleConfigIfExists(\"String_Node_Str\");\n if (moduleConfig != null) {\n load(moduleConfig, OptionalInt.empty(), configs);\n int maxAdditionalDriveCount = moduleConfig.getIntProperty(\"String_Node_Str\", 0);\n for (int i = 0; i < maxAdditionalDriveCount; i++) {\n if (moduleConfig.hasProperty(\"String_Node_Str\" + i) && moduleConfig.hasProperty(\"String_Node_Str\" + i)) {\n String driveName = moduleConfig.getStringProperty(\"String_Node_Str\" + i);\n boolean remotelyAccessible = moduleConfig.getBooleanProperty(\"String_Node_Str\" + i, DEFAULT_REMOTELY_ACCESSIBLE);\n Path rootDir = moduleConfig.getPathProperty(\"String_Node_Str\" + i);\n configs.add(new LocalAppFileSystemConfig(driveName, remotelyAccessible, rootDir));\n }\n }\n } else {\n for (Path rootDir : platformConfig.getFileSystem().getRootDirectories()) {\n configs.add(new LocalAppFileSystemConfig(rootDir.toString(), false, rootDir));\n }\n }\n return configs;\n}\n"
"public void handleDialog(ActionRequest req, ActionResponse resp) throws PortletException, IOException {\n msg = null;\n String strReps = req.getActionParameters().getValue(PARAM_REPS);\n if (strReps != null) {\n try {\n reps = Integer.parseInt(strReps);\n if (reps <= 0 || reps > 8)\n throw new Exception(\"String_Node_Str\");\n } catch (Exception e) {\n msg = \"String_Node_Str\";\n }\n }\n String strDelay = req.getActionParameters().getValue(PARAM_DELAY);\n if (strDelay != null) {\n try {\n delay = Integer.parseInt(strDelay);\n if (delay < 0)\n throw new Exception(\"String_Node_Str\");\n } catch (Exception e) {\n msg = \"String_Node_Str\";\n }\n }\n String strType = req.getActionParameters().getValue(PARAM_TYPE);\n if (strType != null) {\n try {\n type = OutputType.valueOf(strType);\n if (reps > 1) {\n if ((type == OutputType.FWD) || (type == OutputType.DISPATCH)) {\n msg = \"String_Node_Str\";\n reps = 1;\n }\n }\n } catch (Exception e) {\n msg = \"String_Node_Str\" + strType;\n }\n }\n String auto = req.getActionParameters().getValue(PARAM_AUTO);\n if (auto != null) {\n autoDispatch = true;\n } else {\n autoDispatch = false;\n if (reps > 1) {\n msg = \"String_Node_Str\";\n reps = 1;\n }\n }\n String[] state = { \"String_Node_Str\" + delay, \"String_Node_Str\" + reps, type.toString(), msg, \"String_Node_Str\" + autoDispatch };\n LOGGER.fine(\"String_Node_Str\" + Arrays.asList(state).toString());\n}\n"
"public void replaceVarDeclaration(Var oldV, Var newV) {\n if (!this.variables.contains(oldV)) {\n return false;\n }\n Map<Var, Arg> replacement = Collections.singletonMap(oldV, Arg.createVar(newV));\n this.renameVars(replacement, false, true);\n}\n"
"public void fire() throws IllegalActionException {\n super.fire();\n if (select.isKnown() && input.isKnown()) {\n if (select.hasToken(0)) {\n FixToken channel = (FixToken) select.get(0);\n _checkFixMaxValue(channel, input.getWidth() - 1);\n _channel = channel.fixValue().getUnscaledValue().intValue();\n }\n for (int i = 0; i < input.getWidth(); i++) {\n if (input.hasToken(i)) {\n Token token = input.get(i);\n if (i == _channel) {\n sendOutput(output, 0, token);\n }\n }\n }\n } else {\n output.resend(0);\n }\n}\n"
"public void resizeCluster(final String name, final String nodeGroup, final int instanceNum, final int cpuNumber, final long memory) {\n if ((instanceNum > 0 && cpuNumber == 0 && memory == 0) || (instanceNum == 0 && (cpuNumber > 0 || memory > 0))) {\n try {\n ClusterRead cluster = restClient.get(name, false);\n if (cluster == null) {\n CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_CLUSTER, name, Constants.OUTPUT_OP_RESIZE, Constants.OUTPUT_OP_RESULT_FAIL, \"String_Node_Str\" + name + \"String_Node_Str\");\n return;\n }\n List<NodeGroupRead> ngs = cluster.getNodeGroups();\n boolean found = false;\n for (NodeGroupRead ng : ngs) {\n if (ng.getName().equals(nodeGroup)) {\n found = true;\n if (ng.getRoles() != null && ng.getRoles().contains(HadoopRole.ZOOKEEPER_ROLE.toString()) && instanceNum > 1) {\n CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_CLUSTER, name, Constants.OUTPUT_OP_RESIZE, Constants.OUTPUT_OP_RESULT_FAIL, Constants.ZOOKEEPER_NOT_RESIZE);\n return;\n }\n break;\n }\n }\n if (!found) {\n CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_CLUSTER, name, Constants.OUTPUT_OP_RESIZE, Constants.OUTPUT_OP_RESULT_FAIL, \"String_Node_Str\" + nodeGroup + \"String_Node_Str\");\n return;\n }\n TaskRead taskRead = null;\n if (instanceNum > 1) {\n restClient.resize(name, nodeGroup, instanceNum);\n } else if (cpuNumber > 0 || memory > 0) {\n if (cluster.getStatus().ordinal() != ClusterStatus.RUNNING.ordinal()) {\n CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_CLUSTER, name, Constants.OUTPUT_OP_RESIZE, Constants.OUTPUT_OP_RESULT_FAIL, \"String_Node_Str\");\n return;\n }\n ResourceScale resScale = new ResourceScale(name, nodeGroup, cpuNumber, memory);\n taskRead = restClient.scale(resScale);\n }\n CommandsUtils.printCmdSuccess(Constants.OUTPUT_OBJECT_CLUSTER, name, Constants.OUTPUT_OP_RESULT_RESIZE);\n if (taskRead != null) {\n System.out.println();\n printScaleReport(taskRead, name, nodeGroup);\n }\n } catch (CliRestException e) {\n CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_CLUSTER, name, Constants.OUTPUT_OP_RESIZE, Constants.OUTPUT_OP_RESULT_FAIL, e.getMessage());\n }\n } else {\n if (instanceNum > 1 && (cpuNumber > 0 || memory > 0)) {\n CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_CLUSTER, name, Constants.OUTPUT_OP_RESIZE, Constants.OUTPUT_OP_RESULT_FAIL, \"String_Node_Str\");\n } else {\n CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_CLUSTER, name, Constants.OUTPUT_OP_RESIZE, Constants.OUTPUT_OP_RESULT_FAIL, Constants.INVALID_VALUE + \"String_Node_Str\" + instanceNum + \"String_Node_Str\" + cpuNumber + \"String_Node_Str\" + memory);\n }\n }\n}\n"
"private void buildWhereClauseDistinctConstraints(StringBuffer queryBuf, List params) {\n if (containerIDField != null && containerID != -1 && containerTable != null) {\n buildWhereClauseOpInsert(queryBuf);\n queryBuf.append(\"String_Node_Str\").append(table).append(\"String_Node_Str\");\n }\n}\n"
"protected void onPostExecute(Void aVoid) {\n notifyReloadAdapterDataChanged();\n progressBar.setVisibility(View.GONE);\n super.onPostExecute(arrayListSparseArrayTuple);\n}\n"
"public void onChildStatusEvent(MonitorStatusEvent statusEvent) {\n String childId = statusEvent.getId();\n String instanceId = statusEvent.getInstanceId();\n LifeCycleState status1 = statusEvent.getStatus();\n if (status1 == GroupStatus.Active) {\n boolean isChildActive = verifyGroupStatus(childId, instanceId, GroupStatus.Active);\n if (isChildActive) {\n onChildActivatedEvent(childId, instanceId);\n } else {\n log.info(\"String_Node_Str\");\n }\n } else if (status1 == ClusterStatus.Active) {\n onChildActivatedEvent(childId, instanceId);\n } else if (status1 == ClusterStatus.Inactive || status1 == GroupStatus.Inactive) {\n markInstanceAsInactive(childId, instanceId);\n onChildInactiveEvent(childId, instanceId);\n } else if (status1 == ClusterStatus.Terminating || status1 == GroupStatus.Terminating) {\n markInstanceAsTerminating(childId, instanceId);\n } else if (status1 == ClusterStatus.Terminated || status1 == GroupStatus.Terminated) {\n onTerminationOfInstance(childId, instanceId);\n }\n}\n"
"private void open() {\n Intent intent = new Intent(this, DarkService.class);\n intent.setAction(DarkService.ACTION_OPEN);\n intent.putExtra(DarkService.EXTRA_VOLUME_PATH, getFilesDir() + \"String_Node_Str\");\n intent.putExtra(DarkService.EXTRA_MOUNT_PATH, \"String_Node_Str\");\n intent.putExtra(DarkService.EXTRA_PASS, \"String_Node_Str\");\n startService(intent);\n}\n"
"private void init() {\n this.pattern = this.datePicker.getDateTimeFormatInfo().dateFormatFull();\n this.datePicker.addDateSelectionHandler((date, dateTimeFormatInfo) -> {\n setStringValue(date, dateTimeFormatInfo);\n changeLabelFloating();\n autoValidate();\n });\n this.modalListener = evt -> modal.open();\n ElementUtil.onDetach(asElement(), mutationRecord -> {\n if (nonNull(popover))\n popover.discard();\n if (nonNull(modal)) {\n modal.close();\n modal.asElement().remove();\n }\n });\n datePicker.addCloseHandler(() -> {\n if (nonNull(popover))\n popover.close();\n if (nonNull(modal) && modal.isOpen())\n modal.close();\n });\n datePicker.addClearHandler(() -> setValue(null));\n setPickerStyle(PickerStyle.MODAL);\n datePicker.setBackgroundHandler((oldBackground, newBackground) -> {\n if (nonNull(modal)) {\n modal.getHeaderContainerElement().classList.remove(oldBackground.color().getStyle());\n modal.getHeaderContainerElement().classList.add(newBackground.color().getStyle());\n }\n if (nonNull(popover)) {\n popover.getHeadingElement().classList.remove(oldBackground.color().getStyle());\n popover.getHeadingElement().classList.add(newBackground.color().getStyle());\n }\n });\n getInputElement().addEventListener(EventType.keypress.getName(), evt -> {\n KeyboardEvent keyboardEvent = Js.cast(evt);\n if (isEnterKey(keyboardEvent) || isSpaceKey(keyboardEvent)) {\n open();\n }\n });\n}\n"
"public boolean performFinish() {\n if (databaseWizardPage.isPageComplete()) {\n DatabaseForm form = (DatabaseForm) databaseWizardPage.getControl();\n List<HashMap<String, Object>> properties = form.getProperties();\n try {\n connection.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HBASE_PROPERTIES, getHadoopPropertiesString(properties));\n } catch (JSONException e1) {\n String detailError = e1.toString();\n new ErrorDialogWidthDetailArea(getShell(), PID, Messages.getString(\"String_Node_Str\"), detailError);\n log.error(Messages.getString(\"String_Node_Str\") + \"String_Node_Str\" + detailError);\n return false;\n }\n EDatabaseTypeName dbType = EDatabaseTypeName.getTypeFromDbType(connection.getDatabaseType());\n if (dbType != EDatabaseTypeName.GENERAL_JDBC) {\n String driverClass = ExtractMetaDataUtils.getInstance().getDriverClassByDbType(connection.getDatabaseType());\n if (EDatabaseTypeName.VERTICA.equals(dbType) && (EDatabaseVersion4Drivers.VERTICA_6.getVersionValue().equals(connection.getDbVersionString()) || EDatabaseVersion4Drivers.VERTICA_5_1.getVersionValue().equals(connection.getDbVersionString()))) {\n driverClass = EDatabase4DriverClassName.VERTICA2.getDriverClass();\n }\n ((DatabaseConnection) connectionItem.getConnection()).setDriverClass(driverClass);\n }\n String contextName = null;\n if (databaseWizardPage.getSelectedContextType() != null) {\n contextName = databaseWizardPage.getSelectedContextType().getName();\n }\n IMetadataConnection metadataConnection = null;\n if (contextName == null) {\n metadataConnection = ConvertionHelper.convert(connection, true);\n } else {\n metadataConnection = ConvertionHelper.convert(connection, false, contextName);\n }\n ITDQRepositoryService tdqRepService = null;\n if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {\n tdqRepService = (ITDQRepositoryService) GlobalServiceRegister.getDefault().getService(ITDQRepositoryService.class);\n }\n try {\n if (creation) {\n handleCreation(connection, metadataConnection, tdqRepService);\n } else {\n Boolean isSuccess = handleUpdate(metadataConnection, tdqRepService);\n if (!isSuccess) {\n return false;\n }\n }\n } catch (Exception e) {\n String detailError = e.toString();\n new ErrorDialogWidthDetailArea(getShell(), PID, Messages.getString(\"String_Node_Str\"), detailError);\n log.error(Messages.getString(\"String_Node_Str\") + \"String_Node_Str\" + detailError);\n return false;\n }\n List<IRepositoryViewObject> list = new ArrayList<IRepositoryViewObject>();\n list.add(repositoryObject);\n if (GlobalServiceRegister.getDefault().isServiceRegistered(IRepositoryService.class)) {\n IRepositoryService service = (IRepositoryService) GlobalServiceRegister.getDefault().getService(IRepositoryService.class);\n service.notifySQLBuilder(list);\n }\n if (tdqRepService != null) {\n if (creation) {\n tdqRepService.notifySQLExplorer(connectionItem);\n tdqRepService.openConnectionEditor(connectionItem);\n } else {\n tdqRepService.removeAliasInSQLExplorer(node);\n tdqRepService.notifySQLExplorer(connectionItem);\n tdqRepService.refreshConnectionEditor(connectionItem);\n }\n if (CoreRuntimePlugin.getInstance().isDataProfilePerspectiveSelected()) {\n tdqRepService.refresh(node.getParent());\n }\n }\n refreshHadoopCluster();\n return true;\n } else {\n return false;\n }\n}\n"
"public static int gcd(int a, int b) {\n if (b == 0) {\n return a;\n } else {\n return gcd(b, a%b);\n }\n}\n"
"protected Object clone() {\n Object o = null;\n try {\n o = super.clone();\n } catch (final CloneNotSupportedException e) {\n log.log(Level.WARNING, \"String_Node_Str\");\n }\n return o;\n}\n"
"protected String updateExecutablePath(String installDir, String executable) {\n HashMap<String, String> executableMap = new HashMap<String, String>();\n executableMap.put(\"String_Node_Str\", \"String_Node_Str\");\n executableMap.put(\"String_Node_Str\", \"String_Node_Str\");\n executableMap.put(\"String_Node_Str\", \"String_Node_Str\");\n executableMap.put(\"String_Node_Str\", \"String_Node_Str\");\n executableMap.put(\"String_Node_Str\", \"String_Node_Str\");\n executableMap.put(yamlSyntaxGenerator, yamlSyntaxGenerator);\n String launchCommand = null;\n if (\"String_Node_Str\".equals(executable)) {\n launchCommand = \"String_Node_Str\" + \"String_Node_Str\" + executableMap.get(executable) + \"String_Node_Str\";\n } else if (yamlSyntaxGenerator.equals(executable)) {\n setAppendInputFlag(false);\n setUploadInputFlag(false);\n launchCommand = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"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 } else if (\"String_Node_Str\".equals(executable)) {\n launchCommand = \"String_Node_Str\" + executableMap.get(executable) + \"String_Node_Str\" + executable + \"String_Node_Str\";\n } else {\n launchCommand = \"String_Node_Str\" + executableMap.get(executable) + \"String_Node_Str\" + executableMap.get(executable) + \"String_Node_Str\";\n }\n return launchCommand;\n}\n"
"public void harvestBlock(World world, EntityPlayer player, int posX, int posY, int posZ, int blockDamage) {\n super.harvestBlock(world, player, posX, posY, posZ, blockDamage);\n world.setBlockToAir(posX, posY, posZ);\n}\n"
"public List<CubeSegment> getSegments(CubeSegmentStatusEnum status) {\n List<CubeSegment> result = new ArrayList<CubeSegment>();\n for (CubeSegment segment : segments) {\n if (segment.getStatus() == status) {\n segments.add(segment);\n }\n }\n return segments;\n}\n"
"public String toString() {\n return String.format(\"String_Node_Str\", this.id, this.jobClass != null ? this.jobClass : null, this.ownerId, this.targetId, this.targetType, this.state);\n}\n"
"private void launchVideoCamera() {\n mCurrentActivityRequest = RequestCode.ACTIVITY_REQUEST_CODE_TAKE_VIDEO;\n MediaUtils.launchVideoCamera(this, new LaunchCameraCallback() {\n public void onMediaCapturePathReady(String mediaCapturePath) {\n mMediaCapturePath = mediaCapturePath;\n mCurrentActivityRequest = RequestCode.ACTIVITY_REQUEST_CODE_TAKE_VIDEO;\n }\n });\n}\n"
"protected NamedObj _getDestination(String name) throws IllegalActionException {\n Transition transition = (Transition) getContainer();\n if (transition == null) {\n throw new IllegalActionException(this, \"String_Node_Str\");\n }\n Entity fsm = (Entity) transition.getContainer();\n if (fsm == null) {\n throw new IllegalActionException(this, transition, \"String_Node_Str\");\n }\n IOPort port = (IOPort) fsm.getPort(name);\n if (port == null) {\n Attribute variable = fsm.getAttribute(name);\n if (variable == null) {\n int period = name.indexOf(\"String_Node_Str\");\n if (period > 0) {\n String refinementName = name.substring(0, period);\n String entryName = name.substring(period + 1);\n Nameable fsmContainer = fsm.getContainer();\n if (fsmContainer instanceof CompositeEntity) {\n Entity refinement = ((CompositeEntity) fsmContainer).getEntity(refinementName);\n if (refinement != null) {\n Attribute entry = refinement.getAttribute(entryName);\n if (entry instanceof Variable) {\n return entry;\n }\n }\n }\n }\n throw new IllegalActionException(fsm, this, \"String_Node_Str\" + name);\n } else {\n if (!(var instanceof Variable)) {\n throw new IllegalActionException(fsm, this, \"String_Node_Str\" + name + \"String_Node_Str\" + \"String_Node_Str\");\n }\n return var;\n }\n } else {\n if (!port.isOutput()) {\n throw new IllegalActionException(fsm, this, \"String_Node_Str\" + name);\n }\n return port;\n }\n}\n"
"private long findTheLastIndex0() {\n long size = indexFileCache.size();\n if (size <= 0) {\n return -1;\n }\n int indexBlockSize = config.indexBlockSize();\n for (long block = size / indexBlockSize; block >= 0; block--) {\n MappedByteBuffer mbb = indexFileCache.acquireBuffer(block, false);\n if (block > 0 && mbb.getLong(0) == 0) {\n continue;\n }\n int cacheLineSize = config.cacheLineSize();\n for (int pos = 0; pos < indexBlockSize; pos += cacheLineSize) {\n if (pos + cacheLineSize >= indexBlockSize || mbb.getLong(pos + cacheLineSize) == 0) {\n int pos2 = 8;\n for (pos2 = 8; pos2 < cacheLineSize - 4; pos += 4) {\n if (mbb.getInt(pos + pos2) == 0)\n break;\n }\n return (block * indexBlockSize + pos) / cacheLineSize * (cacheLineSize / 4 - 2) + pos / 4 - 1;\n }\n }\n return (block + 1) * indexBlockSize / cacheLineSize * (cacheLineSize / 4 - 2);\n }\n return -1;\n}\n"
"public Packet getDescriptionPacket() {\n NBTTagCompound tag = new NBTTagCompound();\n this.writeToNBT(tag);\n return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag);\n}\n"
"public void shotFrameClicked() {\n Screen screen = getScreenOfWindow();\n Rectangle2D visualBounds = screen.getVisualBounds();\n Rectangle2D fullBounds = screen.getBounds();\n primaryStage.setX(visualBounds.getMinX());\n primaryStage.setY(visualBounds.getMinY());\n primaryStage.setWidth(visualBounds.getWidth());\n primaryStage.setHeight(visualBounds.getHeight());\n StackPane root = (StackPane) primaryStage.getScene().getRoot();\n Node child = root.getChildren().get(0);\n ImageView iv;\n if (child instanceof ImageView) {\n iv = (ImageView) child;\n } else {\n iv = (ImageView) root.getChildren().get(1);\n }\n iv.setFitHeight(bounds.getHeight());\n iv.setFitWidth(bounds.getWidth());\n primaryStage.setFullScreen(true);\n}\n"
"public void noteCurrentTimeChangedLocked() {\n final long currentTime = System.currentTimeMillis();\n final long elapsedRealtime = SystemClock.elapsedRealtime();\n final long uptime = SystemClock.uptimeMillis();\n recordCurrentTimeChangeLocked(currentTime, elapsedRealtime, uptime);\n ensureStartClockTime(currentTime);\n}\n"
"private int findInnerLevelIndex(String expr, List<String> levelNames) {\n int index = -1;\n if (ChartUtil.isEmpty(expr)) {\n return index;\n }\n ExpressionCodec exprCodec = ChartModelHelper.instance().createExpressionCodec();\n Collection<String> bindingNames = exprCodec.getBindingNames(expr);\n for (String bindName : bindingNames) {\n String cubeBindingExpr = cubeBindingMap.get(bindName);\n if (cubeBindingExpr == null) {\n continue;\n }\n String[] lNames = exprCodec.getLevelNames(cubeBindingExpr);\n for (int i = 1; i < lNames.length; i++) {\n int levelIndex = levelNames.indexOf(lNames[i]);\n if (levelIndex > index) {\n index = levelIndex;\n }\n }\n }\n return index;\n}\n"
"public void solve(double[] x) throws IllegalActionException {\n _iterationCount = 0;\n do {\n double[] xNew;\n if (_isNewtonRaphson) {\n xNew = _newtonStep(x);\n } else {\n xNew = _evaluateLoopFunction(x);\n }\n _iterationCount++;\n _converged = true;\n for (int i = 0; i < x.length; i++) {\n final double diff = Math.abs(x[i] - xNew[i]);\n if (diff > Math.max(_tolerance[i], diff * _tolerance[i])) {\n _converged = false;\n break;\n }\n }\n System.arraycopy(xNew, 0, x, 0, x.length);\n if (!_converged && _iterationCount > _maxIterations) {\n throw new RuntimeException(\"String_Node_Str\" + _maxIterations + \"String_Node_Str\");\n }\n } while (!_converged && !_stopRequested);\n}\n"