content
stringlengths
40
137k
"private void writeParagraphBorders(IStyle style) {\n writer.openTag(\"String_Node_Str\");\n writeBorders(style, 0, 0, 0, 0);\n writer.closeTag(\"String_Node_Str\");\n}\n"
"public Object convertValueBasedOnSchemaType(Object value, XMLConversionManager xmlConversionManager) {\n Object convertedValue = value;\n for (int i = 0; i < schemaTypes.size(); i++) {\n QName nextQName = (QName) schemaTypes.get(i);\n try {\n if (nextQName != null) {\n if (XMLConstants.QNAME_QNAME.equals(nextQName)) {\n buildQNameFromString((String) value, record);\n break;\n } else {\n Class javaClass = getType();\n javaClass = getJavaClass(nextQName);\n convertedValue = xmlConversionManager.convertObject(value, javaClass, nextQName);\n break;\n }\n }\n } catch (ConversionException ce) {\n if (i == (schemaTypes.size() - 1)) {\n throw ce;\n }\n }\n }\n return convertedValue;\n}\n"
"private void putToAllPartitionsAndWaitForCompletion(List<Map.Entry<Data, Data>>[] entriesPerPartition, ExpiryPolicy expiryPolicy, long start, Map<Data, Boolean> markers) throws ExecutionException, InterruptedException {\n Data expiryPolicyData = toData(expiryPolicy);\n List<FutureEntriesTuple> futureEntriesTuples = new ArrayList<FutureEntriesTuple>(entriesPerPartition.length);\n for (int partitionId = 0; partitionId < entriesPerPartition.length; partitionId++) {\n List<Map.Entry<Data, Data>> entries = entriesPerPartition[partitionId];\n if (entries != null) {\n for (Map.Entry<Data, Data> entry : entries) {\n Data key = entry.getKey();\n markers.put(key, !cacheOnUpdate || keyStateMarker.markIfUnmarked(key));\n }\n int completionId = nextCompletionId();\n ClientMessage request = CachePutAllCodec.encodeRequest(nameWithPrefix, entries, expiryPolicyData, completionId);\n Future f = invoke(request, partitionId, completionId);\n futureEntriesTuples.add(new FutureEntriesTuple(f, entries));\n }\n }\n waitResponseFromAllPartitionsForPutAll(futureEntriesTuples, start);\n}\n"
"public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception {\n try {\n progress.getBroadcaster().addListener(this);\n } catch (Throwable e) {\n }\n ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>();\n String parameter = param.toString();\n br.getPage(parameter);\n String[] links = br.getRegex(\"String_Node_Str\").getColumn(0);\n if (links == null || links.length == 0)\n links = br.getRegex(\"String_Node_Str\").getColumn(0);\n if (links == null || links.length == 0)\n return null;\n progress.setRange(links.length);\n for (String dl : links) {\n if (abort) {\n progress.setColor(Color.RED);\n progress.setStatusText(progress.getStatusText() + \"String_Node_Str\" + JDL.L(\"String_Node_Str\", \"String_Node_Str\"));\n progress.doFinalize(5000l);\n return new ArrayList<DownloadLink>();\n }\n br.getPage(dl);\n String goOn = br.getRegex(\"String_Node_Str\").getMatch(0);\n if (goOn == null) {\n goOn = br.getRegex(\"String_Node_Str\").getMatch(0);\n if (goOn == null) {\n goOn = br.getRegex(\"String_Node_Str\").getMatch(1);\n }\n }\n if (goOn == null)\n return null;\n goOn = \"String_Node_Str\" + goOn;\n br.getPage(goOn);\n String finallink = br.getRegex(\"String_Node_Str\").getMatch(0);\n if (finallink == null) {\n finallink = br.getRegex(\"String_Node_Str\").getMatch(0);\n }\n if (finallink == null)\n return null;\n decryptedLinks.add(createDownloadlink(finallink));\n progress.increase(1);\n }\n return decryptedLinks;\n}\n"
"public boolean apply(Game game, Ability source) {\n Permanent creature = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source));\n if (creature != null) {\n Player controller = game.getPlayer(creature.getControllerId());\n if (controller != null) {\n controller.loseLife(3, game, false);\n return true;\n }\n }\n return false;\n}\n"
"public void itemDataToGemData(int data) {\n this.dataManager.set(COLOR, data);\n this.setUniformColor(data);\n this.nativeColor = data;\n this.setSkinColor(this.generateSkinColor());\n this.setHairStyle(this.generateHairStyle());\n this.setHairColor(this.generateHairColor());\n this.setGemColor(this.generateGemColor());\n this.setCustomNameTag(new TextComponentTranslation(String.format(\"String_Node_Str\", data)).getUnformattedComponentText());\n if (data > 15) {\n this.setUniformColor(3);\n this.nativeColor = 3;\n this.setSpecial(1);\n } else {\n this.setSpecial(0);\n }\n}\n"
"private void useCsvReader(File file, DelimitedFileConnection delimitedFileconnection, List<ModelElement> analysisElementList) {\n int tableLimit = getLimit();\n int connLimit = JavaSqlFactory.getLimitValue(delimitedFileconnection);\n int limitValue = tableLimit < connLimit ? tableLimit : connLimit;\n int headValue = JavaSqlFactory.getHeadValue(delimitedFileconnection);\n CSVReader csvReader = null;\n try {\n csvReader = FileUtils.createCsvReader(file, delimitedFileconnection);\n FileUtils.initializeCsvReader(delimitedFileconnection, csvReader);\n int[] analysedColumnIndex = new int[analysisElementList.size()];\n MetadataColumn mColumn = (MetadataColumn) analysisElementList.get(0);\n MetadataTable metadataTable = ColumnHelper.getColumnOwnerAsMetadataTable(mColumn);\n EList<MetadataColumn> columns = metadataTable.getColumns();\n List<String> columnLabels = new ArrayList<String>();\n for (MetadataColumn column : columns) {\n columnLabels.add(column.getLabel());\n }\n String[] analysedColumnName = new String[analysisElementList.size()];\n for (int j = 0; j < analysisElementList.size(); j++) {\n analysedColumnName[j] = ((MetadataColumn) analysisElementList.get(j)).getLabel();\n analysedColumnIndex[j] = columnLabels.indexOf(analysedColumnName[j]);\n }\n long currentRecord = 0;\n while (csvReader.readNext()) {\n currentRecord++;\n if (currentRecord <= headValue) {\n continue;\n }\n if (limitValue != -1 && currentRecord > limitValue) {\n break;\n }\n String[] values = csvReader.getValues();\n String[] analysedValues = new String[analysisElementList.size()];\n for (int i = 0; i < analysedColumnIndex.length; i++) {\n analysedValues[i] = values[analysedColumnIndex[i]];\n }\n handleRow(analysedValues);\n }\n } catch (IOException e) {\n log.error(e.getMessage(), e);\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n } finally {\n if (csvReader != null) {\n try {\n csvReader.close();\n } catch (IOException e) {\n log.error(e.getMessage(), e);\n }\n }\n }\n}\n"
"public void start(CoprocessorEnvironment env) {\n if (env instanceof RegionCoprocessorEnvironment) {\n HTableDescriptor tableDesc = ((RegionCoprocessorEnvironment) env).getRegion().getTableDesc();\n String hTableName = tableDesc.getNameAsString();\n String prefixBytes = tableDesc.getValue(HBaseQueueAdmin.PROPERTY_PREFIX_BYTES);\n try {\n this.prefixBytes = prefixBytes == null ? SaltedHBaseQueueStrategy.SALT_BYTES : Integer.parseInt(prefixBytes);\n } catch (NumberFormatException e) {\n LOG.error(\"String_Node_Str\" + HBaseQueueAdmin.PROPERTY_PREFIX_BYTES + \"String_Node_Str\" + \"String_Node_Str\" + SaltedHBaseQueueStrategy.SALT_BYTES, e);\n this.prefixBytes = SaltedHBaseQueueStrategy.SALT_BYTES;\n }\n HTable11NameConverter nameConverter = new HTable11NameConverter();\n namespaceId = nameConverter.from(tableDesc).getNamespace().getId();\n appName = HBaseQueueAdmin.getApplicationName(hTableName);\n flowName = HBaseQueueAdmin.getFlowName(hTableName);\n Configuration conf = env.getConfiguration();\n String hbaseNamespacePrefix = nameConverter.getNamespacePrefix(tableDesc);\n TableId queueConfigTableId = HBaseQueueAdmin.getConfigTableId(namespaceId);\n final String sysConfigTablePrefix = nameConverter.getSysConfigTablePrefix(tableDesc);\n txStateCache = new DefaultTransactionStateCacheSupplier(sysConfigTablePrefix, conf).get();\n txSnapshotSupplier = new Supplier<TransactionVisibilityState>() {\n\n public TransactionSnapshot get() {\n return txStateCache.getLatestState();\n }\n };\n configTableName = nameConverter.toTableName(hbaseNamespacePrefix, queueConfigTableId);\n cConfReader = new CConfigurationReader(conf, sysConfigTablePrefix);\n configCache = createConfigCache(env);\n }\n}\n"
"public void optimize() {\n LinkedList<Double> valueQueue = new LinkedList<>();\n valueQueue.add(function.getValue());\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\" + valueQueue.getLast());\n }\n int iteration = 0;\n iterate();\n iteration += 1;\n valueQueue.add(function.getValue());\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\" + iteration);\n logger.debug(\"String_Node_Str\" + valueQueue.getLast());\n }\n int convergenceTraceCounter = 0;\n while (true) {\n if (checkConvergence) {\n logger.debug(\"String_Node_Str\" + Math.abs(valueQueue.getFirst() - valueQueue.getLast()));\n if (Math.abs(valueQueue.getFirst() - valueQueue.getLast()) <= Math.abs(epsilon * valueQueue.getFirst())) {\n convergenceTraceCounter += 1;\n } else {\n convergenceTraceCounter = 0;\n }\n if (convergenceTraceCounter == 5) {\n terminate = true;\n }\n }\n if (iteration == maxIteration) {\n terminate = true;\n }\n if (terminate) {\n break;\n }\n iterate();\n iteration += 1;\n valueQueue.remove();\n valueQueue.add(function.getValue());\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\" + iteration);\n logger.debug(\"String_Node_Str\" + valueQueue.getLast());\n }\n }\n}\n"
"public void handle(final Structure structure) {\n if (structure == null) {\n addError(profile, \"String_Node_Str\");\n handler.handle(result);\n return;\n }\n try {\n CSVReader csvParser = getCsvReader(path, charset, 1);\n String[] strings;\n int i = 0;\n while ((strings = csvParser.readNext()) != null) {\n final JsonArray classesNames = new JsonArray();\n JsonObject user = new JsonObject();\n user.putArray(\"String_Node_Str\", new JsonArray().add(structure.getExternalId()));\n user.putArray(\"String_Node_Str\", new JsonArray().add(profile));\n List<String[]> classes = new ArrayList<>();\n for (int j = 0; j < strings.length; j++) {\n if (j >= columns.size()) {\n addErrorByFile(profile, \"String_Node_Str\", \"String_Node_Str\" + i);\n return;\n }\n final String c = columns.get(j);\n final String v = strings[j].trim();\n if ((v.isEmpty() && !\"String_Node_Str\".equals(c)) || (v.isEmpty() && \"String_Node_Str\".equals(c) && strings[j + 1].trim().isEmpty()))\n continue;\n switch(validator.getType(c)) {\n case \"String_Node_Str\":\n if (\"String_Node_Str\".equals(c)) {\n Matcher m = frenchDatePatter.matcher(v);\n if (m.find()) {\n user.putString(c, m.group(3) + \"String_Node_Str\" + m.group(2) + \"String_Node_Str\" + m.group(1));\n } else {\n user.putString(c, v);\n }\n } else {\n user.putString(c, v);\n }\n break;\n case \"String_Node_Str\":\n JsonArray a = user.getArray(c);\n if (a == null) {\n a = new JsonArray();\n user.putArray(c, a);\n }\n if ((\"String_Node_Str\".equals(c) || \"String_Node_Str\".equals(c) || \"String_Node_Str\".equals(c)) && !v.startsWith(structure.getExternalId() + \"String_Node_Str\")) {\n a.add(structure.getExternalId() + \"String_Node_Str\" + v);\n } else {\n a.add(v);\n }\n break;\n case \"String_Node_Str\":\n user.putBoolean(c, \"String_Node_Str\".equals(v.toLowerCase()));\n break;\n default:\n Object o = user.getValue(c);\n final String v2;\n if (\"String_Node_Str\".equals(c) && !v.startsWith(structure.getExternalId() + \"String_Node_Str\")) {\n v2 = structure.getExternalId() + \"String_Node_Str\" + v;\n } else {\n v2 = v;\n }\n if (o != null) {\n if (o instanceof JsonArray) {\n ((JsonArray) o).add(v2);\n } else {\n JsonArray array = new JsonArray();\n array.add(o).add(v2);\n user.putArray(c, array);\n }\n } else {\n user.putString(c, v2);\n }\n }\n if (\"String_Node_Str\".equals(c)) {\n String eId = structure.getExternalId() + '$' + v;\n String[] classId = new String[2];\n classId[0] = structure.getExternalId();\n classId[1] = eId;\n classes.add(classId);\n classesNames.addString(v);\n }\n }\n String ca;\n long seed;\n JsonArray classesA;\n Object co = user.getValue(\"String_Node_Str\");\n if (co != null && co instanceof JsonArray) {\n classesA = (JsonArray) co;\n } else if (co instanceof String) {\n classesA = new JsonArray().add(co);\n } else {\n classesA = null;\n }\n if (\"String_Node_Str\".equals(profile) && classesA != null && classesA.size() == 1) {\n seed = defaultStudentSeed;\n ca = classesA.get(0);\n } else {\n ca = String.valueOf(i);\n seed = System.currentTimeMillis();\n }\n final State state;\n final String externalId = user.getString(\"String_Node_Str\");\n if (externalId == null || externalId.trim().isEmpty()) {\n generateUserExternalId(user, ca, structure, seed);\n state = State.NEW;\n } else {\n if (existExternalId.contains(externalId)) {\n state = State.UPDATED;\n } else {\n state = State.NEW;\n }\n }\n switch(profile) {\n case \"String_Node_Str\":\n JsonArray linkStudents = new JsonArray();\n user.putArray(\"String_Node_Str\", linkStudents);\n for (String attr : user.getFieldNames()) {\n if (\"String_Node_Str\".equals(attr)) {\n Object o = user.getValue(attr);\n if (o instanceof JsonArray) {\n for (Object c : (JsonArray) o) {\n linkStudents.add(c);\n }\n } else {\n linkStudents.add(o);\n }\n } else if (\"String_Node_Str\".equals(attr)) {\n Object childUsername = user.getValue(attr);\n Object childLastName = user.getValue(\"String_Node_Str\");\n Object childFirstName = user.getValue(\"String_Node_Str\");\n Object childClasses = user.getValue(\"String_Node_Str\");\n if (childUsername instanceof JsonArray && childLastName instanceof JsonArray && childFirstName instanceof JsonArray && childClasses instanceof JsonArray && ((JsonArray) childClasses).size() == ((JsonArray) childLastName).size() && ((JsonArray) childFirstName).size() == ((JsonArray) childLastName).size()) {\n for (int j = 0; j < ((JsonArray) childUsername).size(); j++) {\n String mapping = structure.getExternalId() + ((JsonArray) childUsername).<String>get(j).trim() + ((JsonArray) childLastName).<String>get(j).trim() + ((JsonArray) childFirstName).<String>get(j).trim() + ((JsonArray) childClasses).<String>get(j).trim() + CsvFeeder.DEFAULT_STUDENT_SEED;\n relativeStudentMapping(linkStudents, mapping);\n }\n } else if (childUsername instanceof String && childLastName instanceof String && childFirstName instanceof String && childClasses instanceof String) {\n String mapping = structure.getExternalId() + childLastName.toString().trim() + childFirstName.toString().trim() + childClasses.toString().trim() + CsvFeeder.DEFAULT_STUDENT_SEED;\n relativeStudentMapping(linkStudents, mapping);\n } else {\n addError(profile, \"String_Node_Str\");\n handler.handle(result);\n return;\n }\n } else if (\"String_Node_Str\".equals(attr) && !user.getFieldNames().contains(\"String_Node_Str\")) {\n Object childLastName = user.getValue(attr);\n Object childFirstName = user.getValue(\"String_Node_Str\");\n Object childClasses = user.getValue(\"String_Node_Str\");\n if (childLastName instanceof JsonArray && childFirstName instanceof JsonArray && childClasses instanceof JsonArray && ((JsonArray) childClasses).size() == ((JsonArray) childLastName).size() && ((JsonArray) childFirstName).size() == ((JsonArray) childLastName).size()) {\n for (int j = 0; j < ((JsonArray) childLastName).size(); j++) {\n String mapping = structure.getExternalId() + ((JsonArray) childLastName).<String>get(j) + ((JsonArray) childFirstName).<String>get(j) + ((JsonArray) childClasses).<String>get(j) + CsvFeeder.DEFAULT_STUDENT_SEED;\n relativeStudentMapping(linkStudents, mapping);\n }\n } else if (childLastName instanceof String && childFirstName instanceof String && childClasses instanceof String) {\n String mapping = structure.getExternalId() + childLastName.toString().trim() + childFirstName.toString().trim() + childClasses.toString().trim() + CsvFeeder.DEFAULT_STUDENT_SEED;\n relativeStudentMapping(linkStudents, mapping);\n } else {\n addError(profile, \"String_Node_Str\");\n handler.handle(result);\n return;\n }\n }\n }\n for (Object o : linkStudents) {\n if (!(o instanceof String))\n continue;\n if (classesNamesMapping.get(o) != null) {\n classesNames.addString(classesNamesMapping.get(o));\n }\n }\n break;\n }\n String error = validator.validate(user, acceptLanguage);\n if (error != null) {\n log.warn(error);\n addError(profile, error);\n } else {\n final String classesStr = Joiner.on(\"String_Node_Str\").join(classesNames);\n classesNamesMapping.put(user.getString(\"String_Node_Str\"), classesStr);\n addUser(profile, user.putString(\"String_Node_Str\", translate(state.name())).putString(\"String_Node_Str\", translate(profile)).putString(\"String_Node_Str\", classesStr));\n }\n i++;\n }\n } catch (Exception e) {\n addError(profile, \"String_Node_Str\");\n log.error(\"String_Node_Str\", e);\n }\n handler.handle(result);\n}\n"
"public boolean isSlidingEnabled() {\n return mIsSlidingEnabled && mSlideableView != null;\n}\n"
"public Class loadClass(String className) throws ClassNotFoundException {\n try {\n return IReportEngine.class.getClassLoader().loadClass(className);\n } catch (ClassNotFoundException ex) {\n if (loader == null) {\n createWrappedClassLoaders();\n }\n return loader.loadClass(className);\n }\n}\n"
"public boolean loadColumns(OpenJPAStateManager stateManager, BitSet fieldSet, Keyspace keyspace, MetaCache metaCache) {\n List<String> fields = new ArrayList<String>();\n StringColumnField<?> field = null;\n AbstractCollectionField<?> collectionField = null;\n Object entityId = stateManager.getObjectId();\n boolean read = false;\n if (MappingUtils.getTargetObject(entityId) == null) {\n return false;\n }\n for (int i = fieldSet.nextSetBit(0); i >= 0; i = fieldSet.nextSetBit(i + 1)) {\n field = columnFieldIds.get(i);\n if (field == null) {\n collectionField = collectionFieldIds.get(i);\n if (collectionField == null) {\n continue;\n }\n int size = stateManager.getContext().getFetchConfiguration().getFetchBatchSize();\n SliceQuery<byte[], DynamicComposite, byte[]> query = collectionField.createQuery(entityId, keyspace, size);\n collectionField.readField(stateManager, query.execute());\n continue;\n }\n fields.add(field.getName());\n }\n SliceQuery<byte[], String, byte[]> query = MappingUtils.buildSliceQuery(entityId, fields, columnFamilyName, keyspace);\n QueryResult<ColumnSlice<String, byte[]>> result = query.execute();\n for (int i = fieldSet.nextSetBit(0); i >= 0; i = fieldSet.nextSetBit(i + 1)) {\n field = columnFieldIds.get(i);\n if (field == null) {\n continue;\n }\n read |= field.readField(stateManager, result);\n }\n if (!read) {\n return exists(stateManager, keyspace, metaCache);\n }\n return true;\n}\n"
"protected int commit(final String aDatasourceId, final List<Change> aLog) throws Exception {\n for (String validatorName : validators.keySet()) {\n Collection<String> datasourcesUnderControl = validators.get(validatorName);\n if (((datasourcesUnderControl == null || datasourcesUnderControl.isEmpty()) && aDatasourceId == null) || (datasourcesUnderControl != null && datasourcesUnderControl.contains(aDatasourceId))) {\n JSObject validator = ScriptUtils.createModule(validatorName);\n if (validator != null) {\n Object oValidate = validator.getMember(\"String_Node_Str\");\n if (oValidate instanceof JSObject) {\n JSObject fValidate = (JSObject) oValidate;\n Object oResult = ScriptUtils.toJava(fValidate.call(validator, new Object[] { ScriptUtils.toJs(aLog.toArray()), aDatasourceId }));\n if (oResult != null && Boolean.FALSE.equals(ScriptUtils.toJava(oResult))) {\n break;\n }\n } else {\n Logger.getLogger(ScriptedDatabasesClient.class.getName()).log(Level.WARNING, \"String_Node_Str\", validatorName);\n }\n } else {\n Logger.getLogger(ScriptedDatabasesClient.class.getName()).log(Level.WARNING, \"String_Node_Str\", validatorName);\n }\n }\n }\n if (aDatasourceId != null) {\n ApplicationElement appElement = getAppCache().get(aDatasourceId);\n if (appElement != null && appElement.getType() == ClientConstants.ET_COMPONENT) {\n JSObject dataSourceApplier = createModule(aDatasourceId);\n if (dataSourceApplier != null) {\n Object oApply = dataSourceApplier.getMember(\"String_Node_Str\");\n if (oApply instanceof JSObject && ((JSObject) oApply).isFunction()) {\n JSObject fApply = (JSObject) oApply;\n fApply.call(dataSourceApplier, new Object[] { ScriptUtils.toJs(aLog.toArray()) });\n }\n }\n }\n }\n boolean consumed = true;\n for (Change change : aLog) {\n if (!change.consumed) {\n consumed = false;\n }\n }\n if (!consumed) {\n return super.commit(aDatasourceId, aLog);\n } else {\n aLog.clear();\n return 0;\n }\n}\n"
"public void testGetTemporaryDirectoryWhenNotSet() {\n final ServletContext servletContext = getMockery().mock(ServletContext.class);\n getMockery().checking(new Expectations() {\n {\n atLeast(1).of(servletContext).getAttribute(\"String_Node_Str\");\n will(returnValue(servletTmpDir));\n }\n });\n this.environment.setServletContext(servletContext);\n final File tmpDir = this.environment.getTemporaryDirectory();\n Assert.assertEquals(this.servletTmpDir.listFiles()[0].getCanonicalFile(), tmpDir.getCanonicalFile());\n}\n"
"public boolean match(final String annotationInternalName) {\n if (annotationInternalName == null) {\n return false;\n }\n return false;\n}\n"
"final int applyConfigurationToResourcesLocked(Configuration config) {\n if (mResConfiguration == null) {\n mResConfiguration = new Configuration();\n }\n if (!mResConfiguration.isOtherSeqNewer(config)) {\n if (DEBUG_CONFIGURATION)\n Slog.v(TAG, \"String_Node_Str\" + mResConfiguration.seq + \"String_Node_Str\" + config.seq);\n return 0;\n }\n int changes = mResConfiguration.updateFrom(config);\n DisplayMetrics dm = getDisplayMetricsLocked(true);\n if (config.locale != null) {\n Locale.setDefault(config.locale);\n }\n Resources.updateSystemConfiguration(config, dm);\n ContextImpl.ApplicationPackageManager.configurationChanged();\n Iterator<WeakReference<Resources>> it = mActiveResources.values().iterator();\n while (it.hasNext()) {\n WeakReference<Resources> v = it.next();\n Resources r = v.get();\n if (r != null) {\n if (DEBUG_CONFIGURATION)\n Slog.v(TAG, \"String_Node_Str\" + r + \"String_Node_Str\" + config);\n boolean themeChanged = (changes & ActivityInfo.CONFIG_THEME_RESOURCE) != 0;\n if (themeChanged) {\n AssetManager am = r.getAssets();\n if (am.hasThemeSupport()) {\n detachThemeAssets(am);\n if (!TextUtils.isEmpty(config.customTheme.getThemePackageName())) {\n attachThemeAssets(am, config.customTheme);\n }\n }\n }\n r.updateConfiguration(config, dm);\n if (themeChanged) {\n r.updateStringCache();\n }\n } else {\n it.remove();\n }\n }\n return changes;\n}\n"
"public Map<String, String> configIOShares(String clusterName, List<NodeEntity> targetNodes, Priority ioShares) {\n AuAssert.check(clusterName != null && targetNodes != null && !targetNodes.isEmpty());\n Callable<Void>[] storeProcedures = new Callable[targetNodes.size()];\n int i = 0;\n for (NodeEntity node : targetNodes) {\n ConfigIOShareSP ioShareSP = new ConfigIOShareSP(node.getMoId(), ioShares);\n storeProcedures[i] = ioShareSP;\n i++;\n }\n try {\n logger.info(\"String_Node_Str\");\n NoProgressUpdateCallback callback = new NoProgressUpdateCallback();\n ExecutionResult[] result = Scheduler.executeStoredProcedures(com.vmware.aurora.composition.concurrent.Priority.BACKGROUND, storeProcedures, callback);\n if (result == null) {\n logger.error(\"String_Node_Str\");\n throw ClusteringServiceException.RECONFIGURE_IO_SHARE_FAILED(clusterName);\n }\n int total = 0;\n Map<String, String> failedNodes = new HashMap<String, String>();\n for (i = 0; i < storeProcedures.length; i++) {\n if (result[i].finished && result[i].throwable == null) {\n ++total;\n } else if (result[i].throwable != null) {\n logger.error(\"String_Node_Str\", result[i].throwable);\n String nodeName = targetNodes.get(i).getVmName();\n String message = CommonUtil.getCurrentTimestamp() + \"String_Node_Str\" + result[i].throwable.getMessage();\n failedNodes.put(nodeName, message);\n }\n }\n logger.info(total + \"String_Node_Str\");\n return failedNodes;\n } catch (InterruptedException e) {\n logger.error(\"String_Node_Str\", e);\n throw BddException.INTERNAL(e, e.getMessage());\n }\n}\n"
"public void init(CameraActivity activity, View root) {\n mActivity = activity;\n mUI = new VideoUI(activity, this, root);\n mPreferences = ComboPreferences.get(mActivity);\n if (mPreferences == null) {\n mPreferences = new ComboPreferences(mActivity);\n }\n CameraSettings.upgradeGlobalPreferences(mPreferences.getGlobal(), activity);\n mCameraId = getPreferredCameraId(mPreferences);\n mPreferences.setLocalId(mActivity, mCameraId);\n CameraSettings.upgradeLocalPreferences(mPreferences.getLocal());\n mOrientationManager = new OrientationManager(mActivity);\n CameraOpenThread cameraOpenThread = new CameraOpenThread();\n cameraOpenThread.start();\n mContentResolver = mActivity.getContentResolver();\n Storage.setSaveSDCard(mPreferences.getString(CameraSettings.KEY_CAMERA_SAVEPATH, \"String_Node_Str\").equals(\"String_Node_Str\"));\n mSaveToSDCard = Storage.isSaveSDCard();\n mIsVideoCaptureIntent = isVideoCaptureIntent();\n initializeSurfaceView();\n try {\n cameraOpenThread.join();\n if (mCameraDevice == null) {\n return;\n }\n } catch (InterruptedException ex) {\n }\n readVideoPreferences();\n mUI.setPrefChangedListener(this);\n mQuickCapture = mActivity.getIntent().getBooleanExtra(EXTRA_QUICK_CAPTURE, false);\n mLocationManager = new LocationManager(mActivity, null);\n mUI.setOrientationIndicator(0, false);\n setDisplayOrientation();\n mUI.showTimeLapseUI(mCaptureTimeLapse);\n initializeVideoSnapshot();\n resizeForPreviewAspectRatio();\n initializeVideoControl();\n mPendingSwitchCameraId = -1;\n}\n"
"public Long configCluster(String clusterName, ClusterCreate createSpec) throws Exception {\n logger.info(\"String_Node_Str\" + clusterName);\n ClusterEntity cluster;\n if ((cluster = ClusterEntity.findClusterEntityByName(clusterName)) == null) {\n logger.error(\"String_Node_Str\" + clusterName + \"String_Node_Str\");\n throw BddException.NOT_FOUND(\"String_Node_Str\", clusterName);\n }\n if (!ClusterStatus.RUNNING.equals(cluster.getStatus()) && !ClusterStatus.CONFIGURE_ERROR.equals(cluster.getStatus())) {\n logger.error(\"String_Node_Str\" + clusterName + \"String_Node_Str\" + cluster.getStatus());\n throw ClusterManagerException.UPDATE_NOT_ALLOWED_ERROR(clusterName, \"String_Node_Str\");\n }\n clusterConfigMgr.updateAppConfig(clusterName, createSpec);\n ConfigureClusterListener listener = new ConfigureClusterListener(clusterName);\n return createClusterMgmtTaskWithErrorSetting(cluster, listener, ClusterStatus.CONFIGURING);\n}\n"
"public void finish(ItemRecord[] records, IProgressMonitor monitor) throws IOException, CoreException {\n ItemRecord.clear();\n IFile defFile = ResourceManager.getLibrariesFolder().getFile(DEFINITION_FILE_NAME);\n if (definitionFile != null && definitionFile.exists()) {\n File defintionFile = defFile.getLocation().toFile();\n FilesUtils.copyFile(definitionFile, defintionFile);\n } else {\n if (!defFile.exists()) {\n DefinitionHandler.getInstance();\n }\n }\n ResourceService.refreshStructure();\n if (!commTasks.isEmpty() && monitor != null) {\n MigrationTaskManager.doMigrationTask(commTasks, monitor);\n }\n ProxyRepositoryViewObject.fetchAllRepositoryViewObjects(true);\n}\n"
"public boolean isDone(JSONObject instance) throws IncompleteException, IOException {\n String updated = instance.getString(\"String_Node_Str\");\n String state = instance.getString(\"String_Node_Str\");\n String operation = instance.getString(\"String_Node_Str\");\n if (lastModified.equals(updated) || !FINISH_STATES.contains(state)) {\n return false;\n }\n if (state.equals(InstanceState.UNAVAILABLE)) {\n throw new IncompleteException(MessageFormat.format(\"String_Node_Str\", getPageUrl(endpointUrl, instance)));\n }\n if (operations != null && !operations.contains(operation)) {\n throw new IncompleteException(MessageFormat.format(\"String_Node_Str\", operation, instanceUrl));\n }\n return true;\n}\n"
"public void onGestureTypingInput(int x, int y, long eventTime) {\n if (!getGestureTypeingEnabled())\n return;\n mGestureTypingDetector.addPoint(x, y, eventTime);\n}\n"
"public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n if (isDrawerOpen()) {\n closeDrawer();\n return true;\n }\n startActivity(HomeActivity.newInstance(this, R.id.nav_item_teams).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));\n return true;\n }\n return super.onOptionsItemSelected(item);\n}\n"
"public InputStream getRS232InputStream() {\n try {\n if (cc == null) {\n cc = (CommConnection) Connector.open(getCommString(), Connector.READ_WRITE, true);\n }\n if (inputStream == null) {\n inputStream = cc.openInputStream();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n}\n"
"public static org.hl7.fhir.dstu2.model.Observation convertObservation(org.hl7.fhir.dstu3.model.Observation src) throws FHIRException {\n if (src == null)\n return null;\n org.hl7.fhir.dstu2.model.Observation tgt = new org.hl7.fhir.dstu2.model.Observation();\n copyDomainResource(src, tgt);\n for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t));\n tgt.setStatus(convertObservationStatus(src.getStatus()));\n for (org.hl7.fhir.dstu3.model.CodeableConcept c : src.getCategory()) tgt.setCategory(convertCodeableConcept(c));\n tgt.setCode(convertCodeableConcept(src.getCode()));\n tgt.setSubject(convertReference(src.getSubject()));\n tgt.setEncounter(convertReference(src.getEncounter()));\n tgt.setEffective(convertType(src.getEffective()));\n tgt.setIssued(src.getIssued());\n for (org.hl7.fhir.dstu3.model.Reference t : src.getPerformer()) tgt.addPerformer(convertReference(t));\n tgt.setValue(convertType(src.getValue()));\n tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason()));\n tgt.setInterpretation(convertCodeableConcept(src.getInterpretation()));\n tgt.setComments(src.getComment());\n tgt.setBodySite(convertCodeableConcept(src.getBodySite()));\n tgt.setMethod(convertCodeableConcept(src.getMethod()));\n tgt.setSpecimen(convertReference(src.getSpecimen()));\n tgt.setDevice(convertReference(src.getDevice()));\n for (org.hl7.fhir.dstu3.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange()) tgt.addReferenceRange(convertObservationReferenceRangeComponent(t));\n for (org.hl7.fhir.dstu3.model.Observation.ObservationRelatedComponent t : src.getRelated()) tgt.addRelated(convertObservationRelatedComponent(t));\n for (org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent t : src.getComponent()) tgt.addComponent(convertObservationComponentComponent(t));\n return tgt;\n}\n"
"public IRootObject getLatestRootObject(int rootObjectId) throws RepositoryException {\n RootObjectMetaData metadata = getRootObjectCache().getRootObjectMetaData(rootObjectId);\n if (metadata == null) {\n try {\n Iterator<RootObjectMetaData> iterator = loadRootObjectMetaDatas().iterator();\n while (iterator.hasNext()) {\n metadata = iterator.next();\n if (metadata.getRootObjectId() == rootObjectId) {\n getRootObjectCache().add(metadata, false);\n return getRootObject(rootObjectId, metadata.getLatestRelease());\n }\n }\n } catch (Exception e) {\n Debug.error(\"String_Node_Str\" + rootObjectId, e);\n }\n return null;\n }\n return getRootObject(rootObjectId, metadata.getLatestRelease());\n}\n"
"public List<?> getEntities(EntityReference ref, Search search) {\n log.info(userInfo() + \"String_Node_Str\");\n Context context;\n try {\n context = new Context();\n } catch (SQLException ex) {\n throw new EntityException(\"String_Node_Str\", \"String_Node_Str\", 500);\n }\n UserRequestParams uparams;\n uparams = refreshParams(context);\n List<Object> entities = new ArrayList<Object>();\n try {\n QueryArgs arg = new QueryArgs();\n arg.setQuery(query);\n if (_perpage > 0) {\n arg.setPageSize(_perpage);\n }\n arg.setStart(_start);\n if ((_order.equalsIgnoreCase(\"String_Node_Str\")) || (_order.equalsIgnoreCase(\"String_Node_Str\"))) {\n arg.setSortOrder(SortOption.DESCENDING);\n } else {\n arg.setSortOrder(SortOption.ASCENDING);\n }\n QueryResults qre;\n if (_community != null) {\n qre = DSQuery.doQuery(context, arg, _community);\n } else if (_collection != null) {\n qre = DSQuery.doQuery(context, arg, _collection);\n } else {\n qre = DSQuery.doQuery(context, arg);\n }\n entities.add(new SearchResultsInfoEntity(qre.getHitCount(), qre.getHitTypes(), qre.getHitHandles(), qre.getHitIds()));\n for (int x = 0; x < qre.getHitTypes().size(); x++) {\n switch((Integer) (qre.getHitTypes().get(x))) {\n case Constants.ITEM:\n {\n entities.add(idOnly ? new ItemEntityId(qre.getHitIds().get(x).toString(), context) : new ItemEntity(qre.getHitIds().get(x).toString(), context, 1, uparams));\n }\n break;\n case Constants.COMMUNITY:\n {\n entities.add(idOnly ? new CommunityEntityId(qre.getHitIds().get(x).toString(), context) : new CommunityEntity(qre.getHitIds().get(x).toString(), context, 1, uparams));\n }\n break;\n case Constants.COLLECTION:\n {\n entities.add(idOnly ? new CollectionEntityId(qre.getHitIds().get(x).toString(), context) : new CollectionEntity(qre.getHitIds().get(x).toString(), context, 1, uparams));\n }\n break;\n case Constants.BITSTREAM:\n {\n entities.add(idOnly ? new BitstreamEntityId(qre.getHitIds().get(x).toString(), context) : new BitstreamEntity(qre.getHitIds().get(x).toString(), context, 1, uparams));\n }\n break;\n case Constants.BUNDLE:\n {\n entities.add(idOnly ? new BundleEntityId(qre.getHitIds().get(x).toString(), context) : new BundleEntity(qre.getHitIds().get(x).toString(), context, 1, uparams));\n }\n break;\n case Constants.EPERSON:\n {\n entities.add(idOnly ? new UserEntityId(qre.getHitIds().get(x).toString(), context) : new UserEntity(qre.getHitIds().get(x).toString(), context, 1, uparams));\n }\n break;\n }\n }\n } catch (SQLException sql) {\n throw new EntityException(\"String_Node_Str\", \"String_Node_Str\", 500);\n } catch (IOException io) {\n throw new EntityException(\"String_Node_Str\", \"String_Node_Str\", 500);\n }\n if (!idOnly && sortOptions.size() > 0) {\n Collections.sort(entities, new GenComparator(sortOptions));\n }\n removeTrailing(entities);\n return entities;\n}\n"
"private boolean isInRepeatHeader() {\n if (currentRow == null)\n return false;\n IContent rowContent = currentRow.getContent();\n if (rowContent != null) {\n IElement band = rowContent.getParent();\n if (band != null && band instanceof IBandContent) {\n int type = ((IBandContent) band).getBandType();\n if (type == IBandContent.BAND_HEADER || type == IBandContent.BAND_GROUP_HEADER) {\n RowDesign rowDesign = (RowDesign) rowContent.getGenerateBy();\n if (rowDesign == null || rowDesign.getRepeatable()) {\n return true;\n }\n }\n }\n }\n return false;\n}\n"
"public void open(final WindowEvent event) {\n final Shell shell = UIUtil.createDefaultShell();\n shell.setLayout(new FillLayout());\n Browser browser = new Browser(shell, SWT.NONE);\n initialize(display, browser);\n event.browser = browser;\n shell.open();\n}\n"
"public TopologyData getTopology() {\n return _topology;\n}\n"
"public static int deleteCalendarsForAccount(ContentResolver cr, Account account) {\n return Calendar.Calendars.delete(cr, WHERE_DELETE_FOR_ACCOUNT, new String[] { account.name, account.type });\n}\n"
"public Resource parse() throws InvalidStructureException, IOException, XmlPullParserException {\n checkNode(\"String_Node_Str\");\n String id = parser.getAttributeValue(null, \"String_Node_Str\");\n int version = parseInt(parser.getAttributeValue(null, \"String_Node_Str\"));\n Vector<ResourceLocation> locations = new Vector<ResourceLocation>();\n while (nextTagInBlock(\"String_Node_Str\")) {\n String sAuthority = parser.getAttributeValue(null, \"String_Node_Str\");\n String location = parser.nextText();\n int authority = Resource.RESOURCE_AUTHORITY_REMOTE;\n if (sAuthority.toLowerCase().equals(\"String_Node_Str\")) {\n authority = Resource.RESOURCE_AUTHORITY_LOCAL;\n } else if (sAuthority.toLowerCase().equals(\"String_Node_Str\")) {\n authority = Resource.RESOURCE_AUTHORITY_REMOTE;\n }\n if (authority >= maximumAuthority) {\n locations.addElement(new ResourceLocation(authority, location));\n }\n }\n return new Resource(version, id, locations);\n}\n"
"public void flushCommits() throws IOException {\n BufferedMutator bufMutator = connection.getBufferedMutator(this.tableName);\n for (ConcurrentLinkedQueue<Mutation> buffer : bPool) {\n while (!buffer.isEmpty()) {\n Mutation m = buffer.poll();\n bufMutator.mutate(m);\n bufMutator.flush();\n }\n }\n bufMutator.close();\n}\n"
"public void read(ByteBuf buf) {\n List<EntityMetadataItem> items = new LinkedList<>();\n short id;\n while ((id = buf.readUnsignedByte()) != 0xFF) {\n EntityMetadataType type = EntityMetadataType.values()[id];\n Object value = null;\n switch(type) {\n case BYTE:\n value = buf.readByte();\n break;\n case VARINT:\n value = NetData.rvint(buf);\n break;\n case FLOAT:\n value = buf.readFloat();\n break;\n case STRING:\n value = NetData.rstr(buf);\n break;\n case CHAT:\n value = ChatComponent.fromJson(new Gson().fromJson(NetData.rstr(buf), JsonObject.class));\n break;\n case SLOT:\n break;\n case BOOLEAN:\n value = buf.readBoolean();\n break;\n case ROTATION:\n float[] rd = new float[3];\n for (int i = 0; i < 3; i++) {\n rd[i] = buf.readFloat();\n }\n value = new Vector(rd[0], rd[1], rd[2]);\n break;\n case POSITION:\n {\n long val = buf.readLong();\n int x = (int) (val >> 38);\n int y = (int) ((val >> 26) & 0xFFF);\n int z = (int) (val << 38 >> 38);\n value = new Vector(x, y, z);\n break;\n }\n case OPTPOSITION:\n {\n if (buf.readBoolean()) {\n long val = buf.readLong();\n int x = (int) (val >> 38);\n int y = (int) ((val >> 26) & 0xFFF);\n int z = (int) (val << 38 >> 38);\n value = new Vector(x, y, z);\n } else {\n value = null;\n }\n break;\n }\n case DIRECTION:\n value = Direction.values()[NetData.rvint(buf)];\n break;\n case OPTUUID:\n if (buf.readBoolean()) {\n value = new UUID(buf.readLong(), buf.readLong());\n } else {\n value = null;\n }\n break;\n case BLOCKID:\n int bid = NetData.rvint(buf);\n value = new int[] { (bid >> 4) & 0xF, bid & 0xF };\n break;\n }\n if (value != null) {\n items.add(new EntityMetadataItem(id, type, value));\n }\n }\n this.items.clear();\n this.items.addAll(items);\n}\n"
"public static void test() {\n Variables variables = new Variables();\n ParameterVariables parameterVariables = new ParameterVariables(1);\n Variable multiA = variables.newSparseMultionomialVariable(\"String_Node_Str\", 10);\n Variable dirichlet = parameterVariables.newSparseDirichletParameter(\"String_Node_Str\", 10);\n EF_SparseMultinomial_SparseDirichlet dist = new EF_SparseMultinomial_SparseDirichlet(multiA, dirichlet);\n EF_SparseDirichlet distDirichlet = new EF_SparseDirichlet(dirichlet);\n EF_LearningBayesianNetwork ef_learningBayesianNetwork = new EF_LearningBayesianNetwork(Arrays.asList(dist, distDirichlet));\n}\n"
"public void attemptLogin() {\n if (loginTask != null) {\n return;\n }\n usernameEdit.setError(null);\n passwordEdit.setError(null);\n username = usernameEdit.getText().toString();\n password = passwordEdit.getText().toString();\n boolean cancel = false;\n View focusView = null;\n if (TextUtils.isEmpty(username)) {\n CustomToast.showInCenter(getApplicationContext(), R.string.error_username_required);\n focusView = usernameEdit;\n cancel = true;\n } else if (!username.matches(Constants.REGULAR_EXPRESSION_USERNAME)) {\n CustomToast.showInCenter(getApplicationContext(), R.string.error_invalid_username);\n focusView = usernameEdit;\n cancel = true;\n } else if (TextUtils.isEmpty(password)) {\n CustomToast.showInCenter(getApplicationContext(), R.string.error_password_required);\n focusView = passwordEdit;\n cancel = true;\n } else if (password.contains(\"String_Node_Str\")) {\n CustomToast.showInCenter(getApplicationContext(), R.string.error_invalid_password);\n focusView = passwordEdit;\n cancel = true;\n }\n if (cancel) {\n focusView.requestFocus();\n } else {\n customProgressDialog.show(getString(R.string.login_progress_signing_in));\n InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n if (getCurrentFocus() != null) {\n inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);\n }\n loginTask = new LoginTask();\n loginTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n }\n}\n"
"protected void updatePlotComposite(Composite plotComposite, VtkWebClient connection) throws Exception {\n refreshToolBar(toolBar);\n final String representation = getPlotRepresentation();\n boolean representationChanged = (representation != null && !representation.equals(plotRepresentation) && getPlotRepresentations().contains(representation));\n final String category = getPlotCategory();\n final String type = getPlotType();\n boolean plotTypeChanged = ((category != null && !category.equals(plotCategory)) || (type != null && !type.equals(plotType)));\n if (plotTypeChanged && type != null) {\n plotTypeChanged = false;\n String[] types = plot.getPlotTypes().get(category);\n if (types != null) {\n for (int i = 0; !plotTypeChanged && i < types.length; i++) {\n if (type.equals(types[i])) {\n plotTypeChanged = true;\n }\n }\n }\n }\n if (representationChanged || plotTypeChanged) {\n refreshWidget(false, connection);\n }\n if (representationChanged) {\n plotRepresentation = representation;\n refreshRepresentation(representation, connection);\n }\n if (plotTypeChanged) {\n if (category != null) {\n plotCategory = category;\n }\n if (type != null) {\n plotType = type;\n }\n refreshPlotType(type, connection);\n }\n if (representationChanged || plotTypeChanged) {\n refreshWidget(connection);\n }\n return;\n}\n"
"public String getUnits() {\n if (!StringUtil.isBlank(units))\n return units;\n String tempUnits = (String) getPropertyDefn(UNITS_PROP).getDefault();\n if (!StringUtil.isBlank(tempUnits))\n return tempUnits;\n return getSession().getUnits();\n}\n"
"protected void configure() {\n String persistenceUnitName = ninjaProperties.get(NinjaConstant.PERSISTENCE_UNIT_NAME);\n if (persistenceUnitName != null) {\n String connectionUrl = ninjaProperties.get(NinjaConstant.DB_CONNECTION_URL);\n String connectionUsername = ninjaProperties.get(NinjaConstant.DB_CONNECTION_USERNAME);\n String connectionPassword = ninjaProperties.get(NinjaConstant.DB_CONNECTION_PASSWORD);\n Properties jpaProperties = new Properties();\n if (connectionUrl != null) {\n jpaProperties.put(\"String_Node_Str\", connectionUrl);\n }\n if (connectionUsername != null) {\n jpaProperties.put(\"String_Node_Str\", connectionUsername);\n }\n if (connectionPassword != null) {\n jpaProperties.put(\"String_Node_Str\", connectionPassword);\n }\n install(new JpaPersistModule(persistenceUnitName).properties(jpaProperties));\n UnitOfWorkInterceptor unitOfWorkInterceptor = new UnitOfWorkInterceptor(getProvider(com.google.inject.persist.UnitOfWork.class), getProvider(EntityManager.class));\n bindInterceptor(annotatedWith(UnitOfWork.class), any(), unitOfWorkInterceptor);\n bindInterceptor(any(), annotatedWith(UnitOfWork.class), unitOfWorkInterceptor);\n bind(JpaInitializer.class).asEagerSingleton();\n }\n}\n"
"public static void modifyUser(User requestUser, ArrayList<String> keys, ArrayList<String> values) throws EucalyptusServiceException {\n try {\n int i = 0;\n String userId = values.get(i++);\n String userName = values.get(i++);\n String path = values.get(i++);\n i++;\n String enabled = values.get(i++);\n i++;\n i++;\n i++;\n i++;\n i++;\n i++;\n Long expiration = Long.parseLong(values.get(i++));\n i++;\n i++;\n Map<String, String> newInfo = Maps.newHashMap();\n for (int k = i; k < values.size(); k++) {\n String key = keys.get(k);\n String value = values.get(k);\n if (!Strings.isNullOrEmpty(key)) {\n newInfo.put(key, value);\n }\n }\n User user = Accounts.lookupUserById(userId);\n if (user.isSystemAdmin() && user.isAccountAdmin()) {\n throw new EucalyptusServiceException(\"String_Node_Str\");\n }\n EuarePermission.authorizeModifyUser(requestUser, user.getAccount(), user);\n if (!user.getName().equals(userName)) {\n user.setName(ValueCheckerFactory.createUserAndGroupNameChecker().check(userName));\n }\n if (user.getPath() != null && !user.getPath().equals(path)) {\n user.setPath(ValueCheckerFactory.createPathChecker().check(path));\n }\n if (!user.isEnabled().toString().equalsIgnoreCase(enabled)) {\n user.setEnabled(!user.isEnabled());\n }\n if (!user.getPasswordExpires().equals(expiration)) {\n user.setPasswordExpires(expiration);\n }\n user.setInfo(newInfo);\n } catch (EucalyptusServiceException e) {\n LOG.debug(e, e);\n throw e;\n } catch (Exception e) {\n LOG.error(\"String_Node_Str\" + keys + \"String_Node_Str\" + values, e);\n LOG.debug(e, e);\n throw new EucalyptusServiceException(\"String_Node_Str\" + keys + \"String_Node_Str\" + values + \"String_Node_Str\" + e.getMessage());\n }\n}\n"
"private LFgExample getExample(AnnoSentence sent, AnnoSentence gold, boolean labeledExample) {\n ObsFeatureExtractor obsFe = new SrlFeatureExtractor(prm.fePrm.srlFePrm, sent, cs);\n obsFe = new ObsFeatureCache(obsFe);\n FeatureExtractor fe = new DepParseFeatureExtractor(prm.fePrm.dpFePrm, sent, cs, ofc.getFeAlphabet());\n fe = new FeatureCache(fe);\n JointNlpFactorGraph fg = new JointNlpFactorGraph(prm.fgPrm, sent, cs, obsFe, ofc, fe);\n log.trace(\"String_Node_Str\" + fg.getNumVars() + \"String_Node_Str\" + fg.getNumFactors() + \"String_Node_Str\" + fg.getNumEdges());\n VarConfig vc = new VarConfig();\n if (prm.fgPrm.includeDp) {\n if (gold != null && gold.getParents() != null) {\n DepParseEncoder.addDepParseTrainAssignment(gold.getParents(), fg.getDpBuilder(), vc);\n } else if (sent.getParents() != null && prm.fgPrm.includeDp && prm.fgPrm.dpPrm.linkVarType == VarType.OBSERVED) {\n DepParseEncoder.addDepParseTrainAssignment(sent.getParents(), fg.getDpBuilder(), vc);\n }\n }\n if (gold != null && gold.getSrlGraph() != null) {\n SrlEncoder.addSrlTrainAssignment(sent, gold.getSrlGraph(), fg.getSrlBuilder(), vc, prm.fgPrm.srlPrm.predictSense, prm.fgPrm.srlPrm.predictPredPos);\n }\n if (gold != null && gold.getRelations() != null) {\n RelationsEncoder.addRelVarAssignments(sent, gold.getRelations(), fg.getRelBuilder(), vc);\n }\n LFgExample ex;\n FactorTemplateList fts = ofc.getTemplates();\n if (labeledExample) {\n ex = new LabeledFgExample(fg, vc, obsFe, fts);\n } else {\n ex = new UnlabeledFgExample(fg, vc, obsFe, fts);\n }\n fe.init(ex);\n return ex;\n}\n"
"public void write(ItemRecord record, String destination) throws IOException, CoreException {\n IPath itemPath = PropertyHelper.getElementPath(record.getProperty());\n IPath itemDesPath = ResourcesPlugin.getWorkspace().getRoot().getFile(itemPath).getLocation();\n IPath propDesPath = itemDesPath.removeFileExtension().addFileExtension(FactoriesUtil.PROPERTIES_EXTENSION);\n Map<IPath, IPath> resMap = new HashMap<IPath, IPath>();\n resMap.put(record.getFilePath(), itemDesPath);\n resMap.put(record.getPropertyPath(), propDesPath);\n for (IPath resPath : resMap.keySet()) {\n File resFile = resPath.toFile();\n File desFile = resMap.get(resPath).toFile();\n if (desFile.exists()) {\n log.warn(desFile.getAbsoluteFile() + \"String_Node_Str\");\n }\n FilesUtils.copyFile(resFile, desFile);\n String oldProjectLabel = record.getProjectName();\n String curProjectLabel = ResourceManager.getRootProjectName();\n if (!StringUtils.equals(oldProjectLabel, curProjectLabel)) {\n String content = FileUtils.readFileToString(desFile, \"String_Node_Str\");\n content = StringUtils.replace(content, \"String_Node_Str\" + oldProjectLabel + \"String_Node_Str\", \"String_Node_Str\" + curProjectLabel + \"String_Node_Str\");\n FileUtils.writeStringToFile(desFile, content, \"String_Node_Str\");\n }\n }\n}\n"
"public VFSItem resolve(String path) {\n path = VFSManager.sanitizePath(path);\n if (path.equals(\"String_Node_Str\"))\n return this;\n String childName = VFSManager.extractChild(path);\n VFSItem vfsItem = null;\n for (VFSContainer container : mergedContainers) {\n String nextPath = path.substring(childName.length() + 1);\n boolean nameMatch = container.getName().equals(childName);\n if (container instanceof NamedContainerImpl && !nameMatch) {\n container = ((NamedContainerImpl) container).getDelegate();\n String name = container.getName();\n if (name == null) {\n continue;\n }\n nameMatch = name.equals(childName);\n }\n if (nameMatch) {\n vfsItem = container.resolve(nextPath);\n if (vfsItem != null && vfsItem instanceof VFSContainer) {\n VFSContainer resolvedContainer = (VFSContainer) vfsItem;\n resolvedContainer.setDefaultItemFilter(defaultFilter);\n }\n return vfsItem;\n }\n }\n for (Iterator iter = mergedContainersChildren.iterator(); iter.hasNext(); ) {\n VFSContainer container = (VFSContainer) iter.next();\n if (container instanceof NamedContainerImpl) {\n container = ((NamedContainerImpl) container).getDelegate();\n }\n vfsItem = container.resolve(path);\n if (vfsItem != null) {\n if (vfsItem instanceof VFSContainer) {\n VFSContainer resolvedContainer = (VFSContainer) vfsItem;\n resolvedContainer.setDefaultItemFilter(defaultFilter);\n }\n return vfsItem;\n }\n }\n return null;\n}\n"
"public CalculatedValue.ValueType getValue(CalculaterTask thread, CalculatedValue outValue) throws CancelException {\n if (termType != null) {\n leftTerm.getValue(thread, leftTermValue);\n rightTerm.getValue(thread, rightTermValue);\n switch(getComparatorType()) {\n case EQUAL:\n return outValue.setValue((leftTermValue.getReal() == rightTermValue.getReal()) ? 1 : 0);\n case NOT_EQUAL:\n return outValue.setValue((leftTermValue.getReal() != rightTermValue.getReal()) ? 1 : -1);\n case LESS:\n return outValue.setValue((leftTermValue.getReal() < rightTermValue.getReal()) ? 1 : -1);\n case LESS_EQUAL:\n return outValue.setValue((leftTermValue.getReal() <= rightTermValue.getReal()) ? 1 : -1);\n case GREATER:\n return outValue.setValue((leftTermValue.getReal() > rightTermValue.getReal()) ? 1 : -1);\n case GREATER_EQUAL:\n return outValue.setValue((leftTermValue.getReal() >= rightTermValue.getReal()) ? 1 : -1);\n case COMPARATOR_AND:\n return outValue.setValue((leftTermValue.getReal() > 0 && rightTermValue.getReal() > 0) ? 1 : -1);\n case COMPARATOR_OR:\n return outValue.setValue((leftTermValue.getReal() > 0 || rightTermValue.getReal() > 0) ? 1 : -1);\n }\n }\n return outValue.invalidate(CalculatedValue.ErrorType.TERM_NOT_READY);\n}\n"
"protected void evolve() {\n boolean[] blocking = Level.solid;\n int cell;\n for (int i = area.top - 1; i <= area.bottom; i++) {\n for (int j = area.left - 1; j <= area.right; j++) {\n cell = j + i * Dungeon.level.width();\n if (Dungeon.level.insideMap(cell)) {\n if (!blocking[cell]) {\n int count = 1;\n int sum = cur[cell];\n if (j > area.left && !blocking[cell - 1]) {\n sum += cur[cell - 1];\n count++;\n }\n if (j < area.right && !blocking[cell + 1]) {\n sum += cur[cell + 1];\n count++;\n }\n if (i > area.top && !blocking[cell - Dungeon.level.width()]) {\n sum += cur[cell - Dungeon.level.width()];\n count++;\n }\n if (i < area.bottom && !blocking[cell + Dungeon.level.width()]) {\n sum += cur[cell + Dungeon.level.width()];\n count++;\n }\n int value = sum >= count ? (sum / count) - 1 : 0;\n off[cell] = value;\n if (value > 0) {\n if (i < area.top)\n area.top = i;\n else if (i >= area.bottom)\n area.bottom = i + 1;\n if (j < area.left)\n area.left = j;\n else if (j >= area.right)\n area.right = j + 1;\n }\n volume += value;\n } else {\n off[cell] = 0;\n }\n if (j < area.right && !blocking[cell + 1]) {\n sum += cur[cell + 1];\n count++;\n }\n if (i > area.top && !blocking[cell - Dungeon.level.width()]) {\n sum += cur[cell - Dungeon.level.width()];\n count++;\n }\n if (i < area.bottom && !blocking[cell + Dungeon.level.width()]) {\n sum += cur[cell + Dungeon.level.width()];\n count++;\n }\n int value = sum >= count ? (sum / count) - 1 : 0;\n off[cell] = value;\n if (value > 0) {\n if (i < area.top)\n area.top = i;\n else if (i >= area.bottom)\n area.bottom = i + 1;\n if (j < area.left)\n area.left = j;\n else if (j >= area.right)\n area.right = j + 1;\n }\n volume += value;\n } else {\n off[cell] = 0;\n }\n }\n }\n}\n"
"protected boolean hasLeftFragment() {\n return selectedTabIndex == subredditsTabIndex;\n}\n"
"public void init(VaadinRequest request) {\n setContent(AppLayout.getDefaultBuilder(Behaviour.LEFT_RESPONSIVE_HYBRID).withTitle(\"String_Node_Str\").addToAppBar(new AppBarNotificationButton(notifications)).withNavigationElementInfoProducer(new DefaultNavigationElementInfoProducer()).withDesign(AppLayoutDesign.MATERIAL).add(new MenuHeader(\"String_Node_Str\", new ThemeResource(\"String_Node_Str\")), HEADER).add(badge, View1.class).add(SubmenuBuilder.get(\"String_Node_Str\", VaadinIcons.PLUS).add(View2.class).add(View3.class).add(View4.class).build()).add(View5.class).add(View6.class).build());\n}\n"
"private void genElement(String defPath, HeirarchicalTableGenerator gen, List<Row> rows, ElementComponent element, List<ElementComponent> all, Profile profile, ProfileKnowledgeProvider pkp, boolean showMissing, String profileBaseFileName) throws Exception {\n if (!onlyInformationIsMapping(all, element)) {\n Row row = gen.new Row();\n row.setAnchor(element.getPathSimple());\n String s = tail(element.getPathSimple());\n boolean hasDef = element.getDefinition() != null;\n boolean ext = false;\n if (s.equals(\"String_Node_Str\") || s.equals(\"String_Node_Str\")) {\n row.setIcon(\"String_Node_Str\");\n ext = true;\n } else if (!hasDef || element.getDefinition().getType().size() == 0)\n row.setIcon(\"String_Node_Str\");\n else if (hasDef && element.getDefinition().getType().size() > 1) {\n if (allTypesAre(element.getDefinition().getType(), \"String_Node_Str\"))\n row.setIcon(\"String_Node_Str\");\n else\n row.setIcon(\"String_Node_Str\");\n } else if (hasDef && element.getDefinition().getType().get(0).getCode().getValue().startsWith(\"String_Node_Str\"))\n row.setIcon(\"String_Node_Str\");\n else if (hasDef && isPrimitive(element.getDefinition().getType().get(0).getCode().getValue()))\n row.setIcon(\"String_Node_Str\");\n else if (hasDef && isReference(element.getDefinition().getType().get(0).getCode().getValue()))\n row.setIcon(\"String_Node_Str\");\n else if (hasDef && isDataType(element.getDefinition().getType().get(0).getCode().getValue()))\n row.setIcon(\"String_Node_Str\");\n else\n row.setIcon(\"String_Node_Str\");\n String ref = defPath == null ? null : defPath + makePathLink(element);\n UnusedTracker used = new UnusedTracker();\n used.used = true;\n Cell left = gen.new Cell(null, ref, s, !hasDef ? null : element.getDefinition().getFormalSimple(), null);\n row.getCells().add(left);\n if (ext) {\n if (element.getDefinition() != null && element.getDefinition().getType().size() == 1 && element.getDefinition().getType().get(0).getProfile() != null) {\n ExtensionDefinition extDefn = pkp.getExtensionDefinition(profile, element.getDefinition().getType().get(0).getProfileSimple());\n if (extDefn == null) {\n row.getCells().add(gen.new Cell(null, null, !hasDef ? null : describeCardinality(element.getDefinition(), null, used), null, null));\n row.getCells().add(gen.new Cell(null, null, \"String_Node_Str\" + element.getDefinition().getType().get(0).getProfileSimple(), null, null));\n generateDescription(gen, row, element, null, used.used, profile.getUrlSimple(), element.getDefinition().getType().get(0).getProfileSimple(), pkp, profile);\n } else {\n row.getCells().add(gen.new Cell(null, null, !hasDef ? null : describeCardinality(element.getDefinition(), extDefn.getDefn().getElement().get(0).getDefinition(), used), null, null));\n genTypes(gen, pkp, row, extDefn.getDefn().getElement().get(0), profileBaseFileName, profile);\n generateDescription(gen, row, element, extDefn.getDefn().getElement().get(0), used.used, profile.getUrlSimple(), element.getDefinition().getType().get(0).getProfileSimple(), pkp, profile);\n }\n } else if (element.getDefinition() != null) {\n row.getCells().add(gen.new Cell(null, null, !hasDef ? null : describeCardinality(element.getDefinition(), null, used), null, null));\n genTypes(gen, pkp, row, element, profileBaseFileName);\n generateDescription(gen, row, element, null, used.used, null, null, pkp, profile);\n } else {\n row.getCells().add(gen.new Cell(null, null, !hasDef ? null : describeCardinality(element.getDefinition(), null, used), null, null));\n row.getCells().add(gen.new Cell());\n generateDescription(gen, row, element, null, used.used, null, null, pkp, profile);\n }\n } else {\n row.getCells().add(gen.new Cell(null, null, !hasDef ? null : describeCardinality(element.getDefinition(), null, used), null, null));\n if (hasDef)\n genTypes(gen, pkp, row, element, profileBaseFileName);\n else\n row.getCells().add(gen.new Cell());\n generateDescription(gen, row, element, null, used.used, null, null, pkp, profile);\n }\n if (element.getSlicing() != null) {\n row.setIcon(\"String_Node_Str\");\n row.getCells().get(2).getPieces().clear();\n for (Cell cell : row.getCells()) for (Piece p : cell.getPieces()) {\n p.addStyle(\"String_Node_Str\");\n }\n }\n if (used.used || showMissing)\n rows.add(row);\n if (!used.used) {\n for (Cell cell : row.getCells()) for (Piece p : cell.getPieces()) {\n p.setStyle(\"String_Node_Str\");\n p.setReference(null);\n }\n } else {\n List<ElementComponent> children = getChildren(all, element);\n for (ElementComponent child : children) genElement(defPath, gen, row.getSubRows(), child, all, profile, pkp, showMissing, profileBaseFileName);\n }\n }\n}\n"
"private boolean onRow(int aggrIndex, int startingGroupLevel, int endingGroupLevel, boolean populateValue) throws DataException {\n IAggrInfo aggrInfo = getAggrInfo(aggrIndex);\n Accumulator acc = null;\n boolean newGroup = false;\n IParameterDefn[] argDefs = aggrInfo.getAggregation().getParameterDefn();\n if (startingGroupLevel <= aggrInfo.getGroupLevel()) {\n acc = accumulatorManagers[aggrIndex].next();\n acc.start();\n newGroup = true;\n } else {\n acc = accumulatorManagers[aggrIndex].getCurrentAccumulator();\n }\n boolean accepted = true;\n if (aggrInfo.getFilter() != null) {\n try {\n Object filterResult = ExprEvaluateUtil.evaluateValue(aggrInfo.getFilter(), this.populator.getCache().getCurrentIndex(), this.populator.getCache().getCurrentResult(), this.populator.getQuery().getExprProcessor().getScope(), this.populator.getSession().getEngineContext().getScriptContext());\n if (filterResult == null)\n accepted = true;\n else\n accepted = DataTypeUtil.toBoolean(filterResult).booleanValue();\n } catch (BirtException e) {\n if (invalidAggrMsg == null)\n invalidAggrMsg = new HashMap();\n invalidAggrMsg.put(new Integer(aggrIndex), e);\n return false;\n }\n }\n if (aggrInfo.getCalcualteLevel() > 0) {\n if (startingGroupLevel > aggrInfo.getCalcualteLevel())\n accepted = false;\n }\n if (accepted) {\n final IBaseExpression[] arguments = aggrInfo.getArgument();\n if (!isFunctionCount(aggrInfo) && arguments == null) {\n DataException e = new DataException(ResourceConstants.INVALID_AGGR_PARAMETER, aggrInfo.getName());\n wrapException(aggrIndex, e);\n return false;\n }\n try {\n int optionalAgrsNum = 0;\n for (int i = 0; i < argDefs.length; i++) {\n if (argDefs[i].isOptional()) {\n optionalAgrsNum++;\n }\n if (aggrInfo.getArgument() == null || i >= arguments.length + optionalAgrsNum) {\n throw new DataException(ResourceConstants.AGGREGATION_ARGUMENT_ERROR, new Object[] { argDefs[i].getName(), aggrInfo.getName() });\n }\n if (isEmptyAggrArgument(aggrInfo)) {\n aggrArgs[aggrIndex] = null;\n } else {\n evaluateArgsValue(aggrIndex, aggrInfo, i);\n }\n }\n if (aggrInfo.getArgument() == null || ((aggrInfo.getArgument().length != argDefs.length) && !(aggrInfo.getArgument().length == (argDefs.length - optionalAgrsNum)))) {\n DataException e = new DataException(ResourceConstants.INVALID_AGGR_PARAMETER, aggrInfo.getName());\n wrapException(aggrIndex, e);\n return false;\n }\n acc.onRow(aggrArgs[aggrIndex]);\n newGroup = false;\n } catch (DataException e) {\n wrapException(aggrIndex, e);\n return false;\n }\n }\n boolean isRunning = (aggrInfo.getAggregation().getType() == IAggrFunction.RUNNING_AGGR);\n if (isRunning && populateValue) {\n Object value = acc.getValue();\n currentRoundAggrValue[aggrIndex].add(value);\n }\n if (endingGroupLevel <= aggrInfo.getGroupLevel()) {\n acc.finish();\n if ((!isRunning) && populateValue) {\n Object value = acc.getValue();\n currentRoundAggrValue[aggrIndex].add(value);\n }\n }\n return true;\n}\n"
"private void createBootstrapperFromDiskConfiguration() {\n try {\n ServiceConfiguration diskConf = (ServiceConfiguration) FileHelper.getContentsOfFileOrNull(platform.getFile(SERVICE_CONFIGURATION));\n if (diskConf.resolverConfiguration.getResolverLayoutURL() != null) {\n URLFactory.setLayoutURL(diskConf.resolverConfiguration.getResolverLayoutURL().toString());\n }\n if (diskConf.isComplete()) {\n platform.getTransport().setApiToken(diskConf.resolverConfiguration.apiToken);\n bootstrapper = new InternalApplicationBootstrapper(platform);\n } else {\n Logger.log.logError(\"String_Node_Str\");\n }\n } catch (Exception e) {\n Logger.log.logError(\"String_Node_Str\" + e);\n e.printStackTrace();\n }\n}\n"
"public static String toRapidshareComPremium(File file, String userid, String pass) {\n try {\n Browser br = new Browser();\n String[] data = br.getPage(\"String_Node_Str\").split(\"String_Node_Str\");\n PostFormDataRequest r = (PostFormDataRequest) br.createPostFormDataRequest(\"String_Node_Str\" + data[0].trim() + \"String_Node_Str\");\n r.addFormData(new FormData(\"String_Node_Str\", \"String_Node_Str\"));\n r.addFormData(new FormData(\"String_Node_Str\", file.getName(), file));\n r.addFormData(new FormData(\"String_Node_Str\", userid));\n r.addFormData(new FormData(\"String_Node_Str\", pass));\n br.openRequestConnection(r);\n String code = r.read();\n System.out.println(code);\n String[] lines = Regex.getLines(code);\n return lines[1];\n } catch (Exception e) {\n JDLogger.exception(e);\n return null;\n }\n}\n"
"public void onEvent(IEvent<?> event) {\n if (event.getPayload() instanceof AjaxRequestTarget && Broadcast.BUBBLE.equals(event.getType())) {\n AjaxRequestTarget target = ((AjaxRequestTarget) event.getPayload());\n target.add(this);\n onAjaxUpdate(target);\n event.stop();\n }\n}\n"
"public boolean checkTrigger(GameEvent event, Game game) {\n if (event.getType() == EventType.DAMAGED_PLAYER && (!onlyCombat || ((DamagedPlayerEvent) event).isCombatDamage())) {\n Permanent permanent = game.getPermanent(event.getSourceId());\n if (permanent != null && filter.match(permanent, sourceId, controllerId, game)) {\n if (!setTargetPointer.equals(SetTargetPointer.NONE)) {\n for (Effect effect : this.getEffects()) {\n effect.setValue(\"String_Node_Str\", event.getAmount());\n effect.setTargetPointer(new FixedTarget(permanent.getControllerId()));\n }\n }\n return true;\n }\n }\n return false;\n}\n"
"public void flush() throws Exception {\n if ((flushCount.getAndIncrement() % flushLogRecordRate) == 0) {\n logger.info(\"String_Node_Str\", applicationName);\n }\n if (isStopped) {\n return;\n }\n AgentActiveThreadCountList response = new AgentActiveThreadCountList();\n synchronized (aggregatorLock) {\n for (ActiveThreadCountWorker activeThreadCountWorker : activeThreadCountWorkerRepository.values()) {\n String agentId = activeThreadCountWorker.getAgentId();\n AgentActiveThreadCount agentActiveThreadCount = activeThreadCountMap.get(agentId);\n if (agentActiveThreadCount != null) {\n response.add(agentActiveThreadCount);\n } else {\n response.add(activeThreadCountWorker.getDefaultFailedResponse());\n }\n }\n activeThreadCountMap = new HashMap<>(activeThreadCountWorkerRepository.size());\n }\n TextMessage webSocketTextMessage = createWebSocketTextMessage(response);\n if (webSocketTextMessage != null) {\n if (executor == null) {\n flush0(webSocketTextMessage);\n } else {\n flushAsync0(webSocketTextMessage, executor);\n }\n }\n}\n"
"public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {\n TileEntity te = world.getTileEntity(x, y, z);\n if (te != null && te instanceof TileEntityMagReader) {\n TileEntityMagReader icte = (TileEntityMagReader) te;\n return new MagCardContainer(player.inventory, icte);\n } else if (te != null && te instanceof TileEntityRFIDReader) {\n TileEntityCardWriter icte = (TileEntityCardWriter) te;\n return new CardWriterContainer(player.inventory, icte);\n } else {\n return null;\n }\n}\n"
"public long getDurationMs() {\n return durationMs;\n}\n"
"public List<ValidationMessage> validate(final Path path, final GlobalsModel content) {\n try {\n return genericValidator.validate(path, new ByteArrayInputStream(GlobalsPersistence.getInstance().marshal(content).getBytes(Charsets.UTF_8)), FILTER_JAVA);\n } catch (Exception e) {\n throw ExceptionUtilities.handleException(e);\n }\n}\n"
"public static String encodeQueries(Collection<? extends Parameter<String>> queries, Charset charset) {\n StringBuilder sb = new StringBuilder();\n for (Map.Entry<String, String> query : queries) {\n sb.append(encodeParam(query.getKey(), charset));\n sb.append('=');\n sb.append(encodeParam(query.getValue(), charset));\n sb.append('&');\n }\n if (sb.length() > 0) {\n sb.deleteCharAt(sb.length() - 1);\n }\n return sb.toString();\n}\n"
"CodeBaseFingerprint build() {\n return new CodeBaseFingerprint(count, size, lastModified, Long.valueOf(hashCodeSum).hashCode());\n}\n"
"public static ReturnCode deleteRelations(Item item) {\n ReturnCode rc = new ReturnCode(Boolean.TRUE);\n if (item == null || item.getProperty() == null || item instanceof FolderItem) {\n rc.setOk(Boolean.FALSE);\n return rc;\n }\n IFile itemFile = PropertyHelper.getItemFile(item.getProperty());\n if (itemFile == null || itemFile.exists()) {\n rc.setOk(Boolean.FALSE);\n return rc;\n }\n if (item instanceof TDQReportItem) {\n try {\n rc = ReportUtils.deleteRepOutputFolder(itemFile);\n } catch (PersistenceException e) {\n log.error(e);\n rc.setMessage(e.getMessage());\n rc.setOk(false);\n }\n return rc;\n }\n return rc;\n}\n"
"public void continueTaskWithoutPauses() {\n noPauses = true;\n synchronized (lock) {\n lock.notify();\n }\n return;\n}\n"
"protected void onLayout(boolean changed, int left, int top, int right, int bottom) {\n super.onLayout(changed, left, top, right, bottom);\n if (changed) {\n final int width = getWidth();\n final ViewGroup.LayoutParams leftParams = mLeftSpacer.getLayoutParams();\n leftParams.width = width / 2;\n mLeftSpacer.setLayoutParams(leftParams);\n final ViewGroup.LayoutParams rulerViewParams = mRulerView.getLayoutParams();\n rulerViewParams.width = (int) (width * viewMultipleSize);\n lineRulerView.setLayoutParams(rulerViewParams);\n lineRulerView.invalidate();\n final ViewGroup.LayoutParams rightParams = mRightSpacer.getLayoutParams();\n rightParams.width = width / 2;\n mRightSpacer.setLayoutParams(rightParams);\n calculateRulerStrokePath();\n invalidate();\n }\n}\n"
"private void reloadComponentsFromCache() throws BusinessException {\n Map<String, String> bundleIdToPath = new HashMap<String, String>();\n ComponentsCache cache = ComponentManager.getInstance();\n Iterator it = cache.getComponentEntryMap().entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry<String, ComponentInfo> entry = (Map.Entry<String, ComponentInfo>) it.next();\n ComponentInfo info = entry.getValue();\n String name = entry.getKey();\n if (!isComponentVisible(name)) {\n continue;\n }\n IBrandingService service = (IBrandingService) GlobalServiceRegister.getDefault().getService(IBrandingService.class);\n String[] availableComponents = service.getBrandingConfiguration().getAvailableComponents();\n EmfComponent currentComp = new EmfComponent(info.getUriString(), info.getSourceBundleName(), name, info.getPathSource(), cache, true);\n if (availableComponents != null && !ArrayUtils.contains(availableComponents, currentComp.getName()) && !(ArrayUtils.contains(COMPONENTS_ALWAYS_NEEDED, currentComp.getName()) || currentComp.getOriginalFamilyName().contains(\"String_Node_Str\") || currentComp.isTechnical())) {\n continue;\n }\n if (availableComponents != null && !ArrayUtils.contains(availableComponents, currentComp.getName()) && (ArrayUtils.contains(COMPONENTS_ALWAYS_NEEDED, currentComp.getName()) || currentComp.getOriginalFamilyName().contains(\"String_Node_Str\") || currentComp.isTechnical())) {\n currentComp.setVisible(false);\n currentComp.setTechnical(true);\n }\n if (currentComp.getSourceBundleName().contains(\"String_Node_Str\")) {\n currentComp.setPaletteType(\"String_Node_Str\");\n } else {\n currentComp.setPaletteType(\"String_Node_Str\");\n }\n String applicationPath = bundleIdToPath.get(info.getSourceBundleName());\n if (applicationPath == null) {\n try {\n applicationPath = FileLocator.getBundleFile(Platform.getBundle(info.getSourceBundleName())).getPath();\n applicationPath = (new Path(applicationPath)).toPortableString();\n } catch (IOException e2) {\n ExceptionHandler.process(e2);\n return;\n }\n bundleIdToPath.put(info.getSourceBundleName(), applicationPath);\n }\n if (!componentList.contains(currentComp)) {\n currentComp.setResourceBundle(getComponentResourceBundle(currentComp, applicationPath + info.getUriString(), info.getPathSource(), null));\n File currentFile = new File(applicationPath + info.getUriString());\n loadIcons(currentFile.getParentFile(), currentComp);\n componentList.add(currentComp);\n }\n }\n}\n"
"private boolean handleOldNeighbour(int changeIndex) {\n if (valuesEqual(changeIndex - 1, changeIndex)) {\n duplicatesList.set(changeIndex, DUPLICATE);\n return NEIGHBOUR_LEFT;\n }\n int followerIndex = changeIndex + 1;\n while (true) {\n if (valuesEqual(changeIndex, followerIndex)) {\n Object followerType = duplicatesList.get(followerIndex);\n if (followerType == TEMP_UNIQUE) {\n followerIndex++;\n } else {\n duplicatesList.set(changeIndex, UNIQUE);\n duplicatesList.set(followerIndex, null);\n return true;\n }\n } else {\n duplicatesList.set(changeIndex, UNIQUE);\n return false;\n }\n }\n}\n"
"public ExactRelation rewriteWithPartition() {\n ExactRelation newSource1 = source1.rewriteWithPartition();\n ExactRelation newSource2 = source2.rewriteWithPartition();\n List<Pair<Expr, Expr>> newJoinCond = joinCondWithTablesSubstitutioned();\n JoinedRelation r = JoinedRelation.from(vc, newSource1, newSource2, newJoinCond);\n r.setJoinType(getJoinType());\n r.setAlias(getAlias());\n return r;\n}\n"
"public void suspended() {\n execute(new Runnable() {\n\n public void run() {\n listener.suspended();\n }\n });\n}\n"
"void updateNotificationSuccessForMedia(List<MediaModel> mediaList, SiteModel site) {\n if (mediaList != null && !mediaList.isEmpty()) {\n String snackbarMessage = buildSnackbarSuccessMessageForMedia(mediaList.size());\n EventBus.getDefault().postSticky(new UploadService.UploadMediaSuccessEvent(mediaList, snackbarMessage));\n }\n if (!WordPress.sAppIsInTheBackground) {\n return;\n }\n AppLog.d(AppLog.T.MEDIA, \"String_Node_Str\");\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(mContext.getApplicationContext());\n long notificationId = getNotificationIdForMedia(site);\n Intent notificationIntent = new Intent(mContext, MediaBrowserActivity.class);\n notificationIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);\n notificationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n notificationIntent.putExtra(WordPress.SITE, site);\n notificationIntent.setAction(String.valueOf(notificationId));\n PendingIntent pendingIntent = PendingIntent.getActivity(mContext, (int) notificationId, notificationIntent, PendingIntent.FLAG_ONE_SHOT);\n notificationBuilder.setSmallIcon(R.drawable.ic_my_sites_24dp);\n notificationBuilder.setColor(mContext.getResources().getColor(R.color.blue_wordpress));\n String notificationTitle = buildSuccessMessageForMedia(mediaList.size());\n String notificationMessage = TextUtils.isEmpty(site.getName()) ? mContext.getString(R.string.untitled) : site.getName();\n notificationBuilder.setContentTitle(notificationTitle);\n notificationBuilder.setContentText(notificationMessage);\n notificationBuilder.setContentIntent(pendingIntent);\n notificationBuilder.setAutoCancel(true);\n if (mediaList != null && !mediaList.isEmpty()) {\n ArrayList<MediaModel> mediaToIncludeInPost = new ArrayList<>(mediaList);\n Intent writePostIntent = new Intent(mContext, EditPostActivity.class);\n writePostIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);\n writePostIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n writePostIntent.putExtra(WordPress.SITE, site);\n writePostIntent.putExtra(EditPostActivity.EXTRA_IS_PAGE, false);\n writePostIntent.putExtra(EditPostActivity.EXTRA_INSERT_MEDIA, mediaToIncludeInPost);\n writePostIntent.setAction(String.valueOf(notificationId));\n PendingIntent actionPendingIntent = PendingIntent.getActivity(mContext, RequestCodes.EDIT_POST, writePostIntent, PendingIntent.FLAG_CANCEL_CURRENT);\n notificationBuilder.addAction(0, mContext.getString(R.string.media_files_uploaded_write_post), actionPendingIntent);\n }\n doNotify(notificationId, notificationBuilder.build());\n}\n"
"public boolean accept(Path file) throws IOException {\n Path fileName = file.getFileName();\n return Files.isRegularFile(file) && fileName != null && PATTERN_LOOSE_OBJECT.matcher(fileName.toString()).matches();\n}\n"
"private boolean isLinkCDCNode(RepositoryNode node) {\n if (node != null) {\n if (ENodeType.STABLE_SYSTEM_FOLDER.equals(node.getType())) {\n if (node.getParent() != null) {\n RepositoryNode pNode = node.getParent().getParent();\n if (pNode != null) {\n ERepositoryObjectType nodeType = (ERepositoryObjectType) pNode.getProperties(EProperties.CONTENT_TYPE);\n if (nodeType.equals(ERepositoryObjectType.METADATA_CONNECTIONS) && pNode.getObject() != null && pNode.getObject().getProperty().getItem() instanceof DatabaseConnectionItem) {\n DatabaseConnection connection = (DatabaseConnection) ((DatabaseConnectionItem) pNode.getObject().getProperty().getItem()).getConnection();\n if (connection != null) {\n CDCConnection cdcConns = connection.getCdcConns();\n return cdcConns != null;\n }\n }\n }\n }\n }\n }\n return false;\n}\n"
"protected static KloudlessResponse _request(APIResource.RequestMethod method, String path, Map<String, Object> params, Map<String, String> keys) throws AuthenticationException, InvalidRequestException, APIConnectionException, APIException {\n if (keys == null) {\n keys = new HashMap<String, String>();\n }\n if ((Kloudless.apiKey == null || Kloudless.apiKey.length() == 0) && (keys.get(\"String_Node_Str\") == null || keys.get(\"String_Node_Str\").length() == 0) && (Kloudless.developerKey == null || Kloudless.developerKey.length() == 0) && (keys.get(\"String_Node_Str\") == null || keys.get(\"String_Node_Str\").length() == 0) && (Kloudless.bearerToken == null || Kloudless.bearerToken.length() == 0) && (keys.get(\"String_Node_Str\") == null || keys.get(\"String_Node_Str\").length() == 0)) {\n throw new AuthenticationException(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n }\n if (Kloudless.apiKey != null) {\n keys.put(\"String_Node_Str\", Kloudless.apiKey);\n } else if (Kloudless.developerKey != null) {\n keys.put(\"String_Node_Str\", Kloudless.developerKey);\n } else if (Kloudless.bearerToken != null) {\n keys.put(\"String_Node_Str\", Kloudless.bearerToken);\n }\n String query;\n String url = String.format(\"String_Node_Str\", Kloudless.getApiBase(), Kloudless.apiVersion, path);\n try {\n query = createQuery(method, params);\n } catch (UnsupportedEncodingException e) {\n throw new InvalidRequestException(\"String_Node_Str\" + CHARSET + \"String_Node_Str\", null, e);\n }\n KloudlessResponse response;\n try {\n response = makeURLConnectionRequest(method, params, url, query, keys);\n } catch (ClassCastException ce) {\n String appEngineEnv = System.getProperty(\"String_Node_Str\", null);\n if (appEngineEnv != null) {\n response = makeAppEngineRequest(method, params, url, query, keys);\n } else {\n throw ce;\n }\n }\n return response;\n}\n"
"private void updateCell(Worksheet sheet, int left, int top, int right, int bottom) {\n if (this.isInvalidated())\n return;\n String sheetId = Utils.getSheetUuid(sheet);\n if (!getActiveRangeHelper().containsSheet(sheet))\n return;\n left = left > 0 ? left - 1 : 0;\n top = top > 0 ? top - 1 : 0;\n final Rect rect = getActiveRangeHelper().getRect(_selectedSheet);\n final int loadLeft = rect.getLeft();\n final int loadTop = rect.getTop();\n final int loadRight = rect.getRight();\n final int loadBottom = rect.getBottom();\n final int frRow = getRowfreeze();\n final int frCol = getColumnfreeze();\n final int frTop = top <= frRow ? top : -1;\n final int frBottom = frRow;\n final int frLeft = left <= frCol ? left : -1;\n final int frRight = frCol;\n if (loadLeft > left) {\n left = loadLeft;\n }\n if (loadRight < right) {\n right = loadRight;\n }\n if (loadTop > top) {\n top = loadTop;\n }\n if (loadBottom < bottom) {\n bottom = loadBottom;\n }\n if (frTop >= 0 && frTop <= frBottom && left >= 0 && left <= right) {\n responseUpdateCell(sheet, sheetId, left, frTop, right, frBottom);\n }\n if (frLeft >= 0 && frLeft <= frRight && top >= 0 && top <= bottom) {\n responseUpdateCell(sheet, sheetId, frLeft, top, frRight, bottom);\n }\n if (top >= 0 && top <= bottom && left >= 0 && left <= right) {\n responseUpdateCell(sheet, sheetId, left, top, right, bottom);\n }\n}\n"
"private void startUpdateTask(final String taskName) {\n try {\n this.getContainer().run(true, true, new IRunnableWithProgress() {\n\n public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {\n synchronized (BatchImportTraceWizard.this) {\n SubMonitor sm;\n sm = SubMonitor.convert(monitor);\n sm.setTaskName(taskName);\n sm.setWorkRemaining(TOTALWORK);\n updateFiles(sm);\n sm.done();\n }\n }\n });\n } catch (InvocationTargetException e) {\n } catch (InterruptedException e) {\n } finally {\n }\n}\n"
"public static final Connection getTdDataProvider(ModelElementIndicator indicator) {\n Property property = indicator.getModelElementRepositoryNode().getObject().getProperty();\n if (property != null && property.getItem() instanceof ConnectionItem) {\n return ((ConnectionItem) property.getItem()).getConnection();\n }\n return null;\n}\n"
"public static EPerson findByEmail(Context context, String email) throws SQLException, AuthorizeException {\n if (email == null) {\n return null;\n }\n TableRow row = DatabaseManager.findByUnique(context, \"String_Node_Str\", \"String_Node_Str\", email.toLowerCase());\n if (row == null) {\n return null;\n } else {\n EPerson fromCache = (EPerson) context.fromCache(EPerson.class, row.getIntColumn(\"String_Node_Str\"));\n if (fromCache != null) {\n return fromCache;\n } else {\n return new EPerson(context, row);\n }\n }\n}\n"
"public void setGame(Game g, Direction human) {\n game = g;\n table.setHumanDirection(human);\n humanHandDisplay = new AllCardsInOneRow(human, human, game, this);\n humanHandDisplay.display();\n dummy = new OneColumnPerColor(human, North.i(), game, this);\n displayDummyIfWestPlayed();\n}\n"
"public void handleRequest(HttpServerExchange exchange, RequestContext context) throws Exception {\n ObjectId etag = RequestHelper.getUpdateEtag(exchange);\n if (etag == null) {\n ResponseHelper.endExchangeWithMessage(exchange, HttpStatus.SC_CONFLICT, \"String_Node_Str\" + Headers.ETAG + \"String_Node_Str\");\n logger.warn(\"String_Node_Str\", Headers.ETAG);\n return;\n }\n if (context.getWarnings() != null && !context.getWarnings().isEmpty()) {\n DocumentRepresentationFactory.sendDocument(exchange.getRequestPath(), exchange, context, new BasicDBObject());\n }\n exchange.endExchange();\n LocalCachesSingleton.getInstance().invalidateDb(context.getDBName());\n}\n"
"public void rebuild() {\n propertyManager = new OWLObjectPropertyManager(getRootOntology().getOWLOntologyManager(), getRootOntology());\n sub2Super = propertyManager.getPropertyHierarchy();\n super2Sub = new HashMap<>();\n for (Map.Entry<OWLObjectPropertyExpression, Set<OWLObjectPropertyExpression>> entry : sub2Super.entrySet()) {\n for (OWLObjectPropertyExpression superProp : entry.getValue()) {\n super2Sub.computeIfAbsent(superProp, k -> new HashSet<>()).add(entry.getKey());\n }\n }\n}\n"
"private void disconnectMAVConnection() {\n Log.d(LOG_TAG, \"String_Node_Str\");\n if (mavConnection != null && mavConnection.getConnectionStatus() != MavLinkConnection.MAVLINK_DISCONNECTED) {\n mavConnection.disconnect();\n }\n GAUtils.sendEvent(new HitBuilders.EventBuilder().setCategory(GAUtils.Category.MAVLINK_CONNECTION).setAction(\"String_Node_Str\"));\n}\n"
"public Object call() {\n IJ.showProgress(counter.getAndIncrement(), stack.getSize() - 1);\n String path = base_path + stack.getSliceLabel(slice) + \"String_Node_Str\";\n ArrayList<PointMatch> candidates = deserializePointMatches(p, path);\n if (null == candidates) {\n ArrayList<Feature> fs1 = deserializeFeatures(p.sift, base_path + stack.getSliceLabel(slice - 1) + \"String_Node_Str\");\n ArrayList<Feature> fs2 = deserializeFeatures(p.sift, base_path + stack.getSliceLabel(slice) + \"String_Node_Str\");\n candidates = new ArrayList<PointMatch>(FloatArray2DSIFT.createMatches(fs2, fs1, p.rod));\n if (!serializePointMatches(p, candidates, path)) {\n IJ.log(\"String_Node_Str\");\n }\n }\n AbstractAffineModel2D<?> model;\n switch(p.modelIndex) {\n case 0:\n model = new TranslationModel2D();\n break;\n case 1:\n model = new RigidModel2D();\n break;\n case 2:\n model = new SimilarityModel2D();\n break;\n case 3:\n model = new AffineModel2D();\n break;\n default:\n return null;\n }\n final ArrayList<PointMatch> inliers = new ArrayList<PointMatch>();\n boolean modelFound;\n try {\n modelFound = model.filterRansac(candidates, inliers, 1000, p.maxEpsilon, p.minInlierRatio);\n } catch (Exception e) {\n modelFound = false;\n System.err.println(e.getMessage());\n }\n if (modelFound) {\n transforms[slice - 2] = model;\n }\n meshes[slice - 1] = new SpringMesh(p.springMeshResolution, stack.getWidth(), stack.getHeight(), p.stiffness, p.maxStretch, p.springMeshDamp);\n return null;\n}\n"
"public boolean onTouch(View v, MotionEvent event) {\n if ((event.getAction()) == event.ACTION_DOWN) {\n Log.d(TAG, \"String_Node_Str\");\n if (!taking_picture) {\n taking_picture = true;\n mCamera.takePicture(CameraUtils.mShutterFeedback, null, null, new CameraUtils.TimeLapsePictureCallback(timelapse_id));\n }\n return true;\n }\n return false;\n}\n"
"public synchronized void finish() {\n _keepIterating = false;\n _isPaused = false;\n if (_simulationThread != null) {\n synchronized (_simulationThread) {\n _simulationThread.notify();\n }\n }\n}\n"
"public void initializeAndRun() {\n JAXWSBundle jaxwsBundle = new JAXWSBundle(\"String_Node_Str\", jaxwsEnvironment);\n try {\n jaxwsBundle.run(null);\n } catch (Exception e) {\n assertThat(e, is(instanceOf(IllegalArgumentException.class)));\n }\n jaxwsBundle.initialize(bootstrap);\n verify(jaxwsEnvironment).setInstrumentedInvokerBuilder(any(InstrumentedInvokerFactory.class));\n jaxwsBundle.run(environment);\n verify(servletEnvironment).addServlet(startsWith(\"String_Node_Str\"), any(Servlet.class));\n verify(lifecycleEnvironment).addServerLifecycleListener(any(ServerLifecycleListener.class));\n verify(servlet).addMapping(\"String_Node_Str\");\n}\n"
"public void getImplicitTargets(SootMethod source) {\n final SootClass scl = source.getDeclaringClass();\n if (source.isNative())\n return;\n if (source.getSubSignature().indexOf(\"String_Node_Str\") >= 0) {\n handleInit(source, scl);\n }\n Body b = source.retrieveActiveBody();\n boolean warnedAlready = false;\n for (Iterator sIt = b.getUnits().iterator(); sIt.hasNext(); ) {\n final Stmt s = (Stmt) sIt.next();\n if (s.containsInvokeExpr()) {\n InvokeExpr ie = (InvokeExpr) s.getInvokeExpr();\n if (ie.getMethod().getSignature().equals(\"String_Node_Str\")) {\n if (!warnedAlready) {\n G.v().out.println(\"String_Node_Str\" + \"String_Node_Str\" + source + \"String_Node_Str\");\n warnedAlready = true;\n }\n }\n if (ie.getMethod().getNumberedSubSignature() == sigForName) {\n Value name = ie.getArg(0);\n if (name instanceof StringConstant) {\n String cls = ((StringConstant) name).value;\n constantForName(cls, source, s);\n } else {\n if (options.safe_forname()) {\n for (Iterator tgtIt = EntryPoints.v().clinits().iterator(); tgtIt.hasNext(); ) {\n final SootMethod tgt = (SootMethod) tgtIt.next();\n cg.addEdge(new Edge(source, s, tgt, Edge.CLINIT));\n }\n } else {\n VirtualCallSite vcs = new VirtualCallSite(s, source);\n wantedStringConstants.put(name, vcs);\n Set names = pa.reachingObjects((Local) name).possibleStringConstants();\n if (names == null) {\n handleClassName(vcs, null);\n wantedStringConstants.remove(name);\n } else {\n for (Iterator nameStrIt = names.iterator(); nameStrIt.hasNext(); ) {\n final String nameStr = (String) nameStrIt.next();\n handleClassName(vcs, nameStr);\n }\n }\n }\n }\n }\n addEdge(source, s, ie.getMethod().getDeclaringClass(), sigClinit, Edge.CLINIT);\n }\n if (s.containsFieldRef()) {\n FieldRef fr = (FieldRef) s.getFieldRef();\n if (fr instanceof StaticFieldRef) {\n SootClass cl = fr.getField().getDeclaringClass();\n addEdge(source, s, cl, sigClinit, Edge.CLINIT);\n }\n }\n if (s instanceof AssignStmt) {\n Value rhs = ((AssignStmt) s).getRightOp();\n if (rhs instanceof NewExpr) {\n NewExpr r = (NewExpr) rhs;\n addEdge(source, s, r.getBaseType().getSootClass(), sigClinit, Edge.CLINIT);\n } else if (rhs instanceof NewArrayExpr || rhs instanceof NewMultiArrayExpr) {\n Type t = rhs.getType();\n if (t instanceof ArrayType)\n t = ((ArrayType) t).baseType;\n if (t instanceof RefType) {\n addEdge(source, s, ((RefType) t).getSootClass(), sigClinit, Edge.CLINIT);\n }\n }\n }\n }\n}\n"
"public void burstBomb(int x, int y) {\n for (int i = 0; i < this.board.getCols(); i++) {\n int index = i + this.board.getCols() * y;\n Element element = this.board.getElements().get(index);\n if (element != null && element.isBreakable()) {\n this.board.setElement(index, null);\n }\n }\n for (int i = 1; i < this.getBoard().getRows() - 1; i++) {\n int index = x * this.getBoard().getRows() + i;\n this.getBoard().setElement(index, null);\n }\n}\n"
"public void handleMessage(Message msg) {\n super.handleMessage(msg);\n if (msg.what == Constant.MSG_ERROR) {\n SnackBarUtil.showSnackInfo(view, CreateNewRecordTypeActivity.this, getString(R.string.please_not_enter_same_record_type_name));\n } else {\n setResult(RESULT_OK);\n finish();\n }\n}\n"
"void setSortCondition(Object[] sortKeys, boolean[] sortOrderings, int[] sortStrength) {\n this.sortKeys = sortKeys;\n this.sortDirections = sortOrderings;\n this.comparator = new Collator[this.sortKeys.length];\n for (int i = 0; i < this.comparator.length; i++) {\n this.comparator[i] = sortStrength[i] == ISortDefinition.ASCII_SORT_STRENGTH ? null : Collator.getInstance(sortLocale[i]);\n }\n}\n"
"public void widgetSelected(SelectionEvent e) {\n XmlFileSchemaDialog dialog = new XmlFileSchemaDialog(mainSashFormComposite.getShell(), XmlFileOutputStep2Form.this);\n if (dialog != null && dialog.open() == XmlFileSchemaDialog.OK) {\n MetadataTable metadataTable = dialog.getMetadataTable();\n EList columns = metadataTable.getColumns();\n List<MetadataColumn> inputList = new ArrayList<MetadataColumn>();\n for (int i = 0; i < columns.size(); i++) {\n MetadataColumn column = (MetadataColumn) columns.get(i);\n inputList.add(column);\n }\n schemaViewer.setInput(inputList);\n schemaViewer.refresh();\n EList columnList = ConnectionHelper.getTables(getConnection()).toArray(new MetadataTable[0])[0].getColumns();\n columnList.clear();\n columnList.addAll(inputList);\n updateXmlTreeViewer(inputList);\n redrawLinkers();\n checkFieldsValue();\n }\n}\n"
"public void testAverage() {\n final Random randomEngine = new Random();\n final DifferentialExpressionCalculator deCalc = new DifferentialExpressionCalculator() {\n public double getNormalizedExpressionValue(final String sample, final NormalizationMethod method, final MutableString elementId) {\n if (sample.startsWith(\"String_Node_Str\")) {\n return 2 * Math.abs(randomEngine.nextDouble());\n } else {\n return Math.abs(randomEngine.nextDouble());\n }\n }\n };\n deCalc.defineElement(\"String_Node_Str\");\n deCalc.defineElement(\"String_Node_Str\");\n deCalc.defineGroup(\"String_Node_Str\");\n deCalc.defineGroup(\"String_Node_Str\");\n final int numReplicates = 20000;\n deCalc.reserve(2, numReplicates * 2);\n for (int i = 0; i < numReplicates; i++) {\n deCalc.associateSampleToGroup(\"String_Node_Str\" + i, \"String_Node_Str\");\n deCalc.associateSampleToGroup(\"String_Node_Str\" + i, \"String_Node_Str\");\n }\n final DifferentialExpressionInfo info = new DifferentialExpressionInfo(\"String_Node_Str\");\n final DifferentialExpressionResults results = new DifferentialExpressionResults();\n final AverageCalculator averageCalculator = new AverageCalculator(results);\n results.add(info);\n final NormalizationMethod normalizationMethod = new AlignedCountNormalization();\n averageCalculator.evaluate(deCalc, normalizationMethod, results, info, \"String_Node_Str\", \"String_Node_Str\");\n assertEquals(\"String_Node_Str\", 1d, results.getStatistic(info, averageCalculator.getStatisticId(\"String_Node_Str\", \"String_Node_Str\", normalizationMethod)), .1);\n assertEquals(\"String_Node_Str\", 0.5d, results.getStatistic(info, averageCalculator.getStatisticId(\"String_Node_Str\", \"String_Node_Str\", normalizationMethod)), .1);\n System.out.println(results);\n results.write(new PrintWriter(\"String_Node_Str\"), '\\t', deCalc);\n}\n"
"public void endSelfElement(String namespaceURI, String localName, String qName) throws SAXException {\n if (super.nodes.size() == 2) {\n Element endedElement = (Element) nodes.get(nodes.size() - 1);\n if (stringBuffer.length() > 0) {\n Text text = getInitializedDocument().createTextNode(stringBuffer.toString());\n endedElement.appendChild(text);\n stringBuffer.reset();\n }\n } else {\n super.endElement(namespaceURI, localName, qName);\n }\n}\n"
"void traverse(BusTerminal terminal, VoltageLevel.TopologyTraverser traverser, Set<Terminal> traversedTerminals) {\n Objects.requireNonNull(terminal);\n Objects.requireNonNull(traverser);\n Objects.requireNonNull(traversedTerminals);\n if (traversedTerminals.contains(terminal)) {\n return;\n }\n List<TerminalExt> nextTerminals = new ArrayList<>();\n if (traverser.traverse(terminal, terminal.isConnected())) {\n traversedTerminals.add(terminal);\n addNextTerminals(terminal, nextTerminals);\n int v = getVertex(terminal.getConnectableBusId(), true);\n ConfiguredBus bus = graph.getVertexObject(v);\n bus.getTerminals().stream().filter(t -> t != terminal).filter(t -> traverser.traverse(t, t.isConnected())).forEach(t -> addNextTerminals(t, nextTerminals));\n graph.traverse(v, (v1, e, v2) -> {\n SwitchImpl aSwitch = graph.getEdgeObject(e);\n ConfiguredBus otherBus = graph.getVertexObject(v2);\n if (traverser.traverse(aSwitch)) {\n for (BusTerminal otherTerminal : otherBus.getTerminals()) {\n if (traverser.traverse(otherTerminal, otherTerminal.isConnected())) {\n traversedTerminals.add(otherTerminal);\n addNextTerminals(otherTerminal, nextTerminals);\n return TraverseResult.CONTINUE;\n } else {\n return TraverseResult.TERMINATE;\n }\n }\n return TraverseResult.CONTINUE;\n } else {\n return TraverseResult.TERMINATE;\n }\n });\n for (TerminalExt nextTerminal : nextTerminals) {\n nextTerminal.traverse(traverser, traversedTerminals);\n }\n }\n}\n"
"public void map(InfoMap infoMap) {\n infoMap.put(new Info(\"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\").cppTypes().annotations()).put(new Info(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\").define()).put(new Info(\"String_Node_Str\", \"String_Node_Str\").define(false)).put(new Info(\"String_Node_Str\", \"String_Node_Str\").cast().valueTypes(\"String_Node_Str\")).put(new Info(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\").cast().valueTypes(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").annotations(\"String_Node_Str\").valueTypes(\"String_Node_Str\", \"String_Node_Str\").pointerTypes(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\")).put(new Info(\"String_Node_Str\", \"String_Node_Str\").cast().valueTypes(\"String_Node_Str\").pointerTypes(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\")).put(new Info(\"String_Node_Str\", \"String_Node_Str\").cast().valueTypes(\"String_Node_Str\").pointerTypes(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\")).put(new Info(\"String_Node_Str\", \"String_Node_Str\").cast().valueTypes(\"String_Node_Str\").pointerTypes(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\")).put(new Info(\"String_Node_Str\", \"String_Node_Str\").cast().valueTypes(\"String_Node_Str\").pointerTypes(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\")).put(new Info(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\").cast().pointerTypes(\"String_Node_Str\")).put(new Info(\"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\").skip()).put(new Info(\"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\", \"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\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\").skip());\n String[] functionTemplates = { \"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\", \"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\", \"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 for (String t : functionTemplates) {\n infoMap.put(new Info(\"String_Node_Str\" + t + \"String_Node_Str\").javaNames(t + \"String_Node_Str\")).put(new Info(\"String_Node_Str\" + t + \"String_Node_Str\").javaNames(t + \"String_Node_Str\"));\n }\n String[] classTemplates = { \"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\", \"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\", \"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\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n for (String t : classTemplates) {\n boolean purify = t.equals(\"String_Node_Str\") || t.equals(\"String_Node_Str\") || t.equals(\"String_Node_Str\");\n boolean virtualize = t.endsWith(\"String_Node_Str\") || t.endsWith(\"String_Node_Str\");\n String[] annotations = t.startsWith(\"String_Node_Str\") ? new String[] { \"String_Node_Str\" } : null;\n infoMap.put(new Info(\"String_Node_Str\" + t + \"String_Node_Str\").annotations(annotations).pointerTypes(\"String_Node_Str\" + t).purify(purify).virtualize(virtualize)).put(new Info(\"String_Node_Str\" + t + \"String_Node_Str\").annotations(annotations).pointerTypes(\"String_Node_Str\" + t).purify(purify).virtualize(virtualize));\n }\n infoMap.put(new Info(\"String_Node_Str\", \"String_Node_Str\").skip()).put(new Info(\"String_Node_Str\", \"String_Node_Str\").javaText(\"String_Node_Str\" + \"String_Node_Str\")).put(new Info(\"String_Node_Str\").javaText(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").javaText(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").javaText(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").javaText(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").javaNames(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").javaNames(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").javaNames(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").javaNames(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").annotations(\"String_Node_Str\").pointerTypes(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").annotations(\"String_Node_Str\").pointerTypes(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").annotations(\"String_Node_Str\").pointerTypes(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").annotations(\"String_Node_Str\").pointerTypes(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").annotations(\"String_Node_Str\").pointerTypes(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").annotations(\"String_Node_Str\").pointerTypes(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").valueTypes(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").valueTypes(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").javaText(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\")).put(new Info(\"String_Node_Str\").javaText(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\")).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\")).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\").define()).put(new Info(\"String_Node_Str\").pointerTypes(\"String_Node_Str\"));\n}\n"
"public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args) {\n if (command.getName().equalsIgnoreCase(\"String_Node_Str\")) {\n if (sender instanceof Player) {\n Player player = (Player) sender;\n if (!has(player, \"String_Node_Str\")) {\n player.sendMessage(\"String_Node_Str\");\n return true;\n } else if (admins != null && !showStealthed) {\n if (!has(player, \"String_Node_Str\")) {\n whoLimited(player, args);\n return true;\n }\n }\n }\n whoUnlimited(sender, args);\n return true;\n } else if (command.getName().equalsIgnoreCase(\"String_Node_Str\")) {\n if (sender instanceof Player) {\n if (!has((Player) sender, \"String_Node_Str\")) {\n sender.sendMessage(\"String_Node_Str\");\n return true;\n }\n }\n if (args.length < 1) {\n sender.sendMessage(\"String_Node_Str\");\n return true;\n } else {\n whois(sender, args);\n return true;\n }\n }\n return false;\n}\n"
"public void setShape(ICEShape shape) {\n this.currentShape = shape;\n Transformation transformation;\n if (shape == null) {\n transformation = new ICETransformation();\n } else {\n transformation = shape.getTransformation();\n }\n double size = transformation.getSize();\n sizeSpinner.setValue(size);\n double[] scale = transformation.getScale();\n for (int i = 0; i < 3; i++) {\n scaleSpinners[i].setValue(scale[i]);\n }\n double[] rotation = transformation.getRotation();\n for (int i = 0; i < 3; i++) {\n if (degrees) {\n rotationSpinners[i].setValue(Math.toDegrees(rotation[i]));\n } else {\n rotationSpinners[i].setValue(rotation[i]);\n }\n }\n double[] translations = transformation.getTranslation();\n for (int i = 0; i < 3; i++) {\n translateSpinners[i].setValue(translations[i]);\n }\n setSpinnersEnabled(shape != null);\n}\n"
"public void buildContextMenu(IMenuManager menuManager) {\n if (proxy != null) {\n proxy.menuAboutToShow(menuManager);\n proxy = null;\n return;\n }\n GEFActionConstants.addStandardActionGroups(menuManager);\n Object firstSelectedElement = getFirstElement();\n Object selectedElements = getSelectedElement();\n Object multiSelection = getMultiSelectedElement();\n boolean isExtended = false;\n if (firstSelectedElement instanceof IAdaptable) {\n if (((IAdaptable) firstSelectedElement).getAdapter(DesignElementHandle.class) instanceof ExtendedItemHandle)\n isExtended = true;\n }\n if (isMutilSelection(multiSelection)) {\n menuManager.appendToGroup(GEFActionConstants.GROUP_UNDO, getAction(ActionFactory.UNDO.getId()));\n menuManager.appendToGroup(GEFActionConstants.GROUP_UNDO, getAction(ActionFactory.REDO.getId()));\n menuManager.appendToGroup(GEFActionConstants.GROUP_COPY, new CutAction(selectedElements));\n menuManager.appendToGroup(GEFActionConstants.GROUP_COPY, new CopyAction(selectedElements));\n menuManager.appendToGroup(GEFActionConstants.GROUP_COPY, new PasteAction(selectedElements));\n menuManager.appendToGroup(GEFActionConstants.GROUP_COPY, getAction(ActionFactory.DELETE.getId()));\n if (isRootElementHandleClass(multiSelection)) {\n Action action = new RefreshModuleHandleAction(selectedElements);\n menuManager.add(action);\n createInsertElementMenu(menuManager, GEFActionConstants.GROUP_EDIT);\n createThemeMenu(menuManager, GEFActionConstants.GROUP_REST);\n }\n if (isListHandleCalss(multiSelection)) {\n IAction action = getAction(CreatePlaceHolderPartAction.ID);\n menuManager.appendToGroup(GEFActionConstants.GROUP_EDIT, action);\n }\n createStyleMenu(menuManager, GEFActionConstants.GROUP_REST);\n if (Policy.TRACING_MENU_SHOW) {\n System.out.println(\"String_Node_Str\");\n }\n } else if (firstSelectedElement instanceof DesignElementHandle || isExtended) {\n menuManager.appendToGroup(GEFActionConstants.GROUP_UNDO, getAction(ActionFactory.UNDO.getId()));\n menuManager.appendToGroup(GEFActionConstants.GROUP_UNDO, getAction(ActionFactory.REDO.getId()));\n menuManager.appendToGroup(GEFActionConstants.GROUP_COPY, new CutAction(selectedElements));\n menuManager.appendToGroup(GEFActionConstants.GROUP_COPY, new CopyAction(selectedElements));\n menuManager.appendToGroup(GEFActionConstants.GROUP_COPY, new PasteAction(selectedElements));\n createStyleMenu(menuManager, GEFActionConstants.GROUP_REST);\n if (((IStructuredSelection) getSelection()).size() == 1) {\n Object element = ((IStructuredSelection) getSelection()).getFirstElement();\n if (element instanceof LabelEditPart || element instanceof ImageEditPart) {\n if (element instanceof DataEditPart) {\n IAction action = getAction(ChangeDataColumnPartAction.ID);\n menuManager.appendToGroup(GEFActionConstants.GROUP_EDIT, action);\n }\n IAction action = getAction(GEFActionConstants.DIRECT_EDIT);\n action.setAccelerator(SWT.F2);\n if (element instanceof DataEditPart) {\n action.setText(Messages.getString(\"String_Node_Str\"));\n } else {\n action.setText(Messages.getString(\"String_Node_Str\"));\n }\n menuManager.appendToGroup(GEFActionConstants.GROUP_EDIT, action);\n }\n if (firstSelectedElement instanceof ReportItemHandle) {\n IAction action = getAction(CreatePlaceHolderPartAction.ID);\n menuManager.appendToGroup(GEFActionConstants.GROUP_EDIT, action);\n }\n if (firstSelectedElement instanceof TemplateReportItemHandle) {\n IAction action = getAction(RevertToReportItemPartAction.ID);\n menuManager.appendToGroup(GEFActionConstants.GROUP_EDIT, action);\n }\n Object[] objs = ElementAdapterManager.getAdapters(firstSelectedElement, IReportItemViewProvider.class);\n if (objs != null && objs.length == 1) {\n IAction action = getAction(CreateChartAction.ID);\n menuManager.appendToGroup(GEFActionConstants.GROUP_VIEW, action);\n }\n }\n if (firstSelectedElement instanceof RowHandle) {\n if (getRowHandles().size() != 0) {\n MenuManager insertMenu = new MenuManager(INSERT_MENU_ITEM_TEXT);\n MenuManager rowMenu = new MenuManager(INSERT_ROW_MENU_ITEM_TEXT);\n rowMenu.add(getAction(InsertRowAboveAction.ID));\n rowMenu.add(getAction(InsertRowBelowAction.ID));\n RowHandle row = (RowHandle) getRowHandles().get(0);\n if (!(row.getContainer() instanceof GridHandle)) {\n insertMenu.add(getAction(IncludeHeaderAction.ID));\n insertMenu.add(getAction(IncludeDetailAction.ID));\n insertMenu.add(getAction(IncludeFooterAction.ID));\n }\n insertMenu.add(rowMenu);\n menuManager.appendToGroup(GEFActionConstants.GROUP_EDIT, insertMenu);\n }\n menuManager.appendToGroup(GEFActionConstants.GROUP_COPY, getAction(DeleteRowAction.ID));\n menuManager.appendToGroup(GEFActionConstants.GROUP_EDIT, getAction(MergeAction.ID));\n menuManager.appendToGroup(GEFActionConstants.GROUP_EDIT, getAction(SplitAction.ID));\n } else if (firstSelectedElement instanceof ColumnHandle) {\n menuManager.appendToGroup(GEFActionConstants.GROUP_EDIT, new InsertPasteColumnAction(selectedElements));\n if (getColumnHandles().size() != 0) {\n MenuManager subMenu = new MenuManager(INSERT_MENU_ITEM_TEXT);\n subMenu.add(getAction(InsertColumnRightAction.ID));\n subMenu.add(getAction(InsertColumnLeftAction.ID));\n menuManager.appendToGroup(GEFActionConstants.GROUP_EDIT, subMenu);\n }\n menuManager.appendToGroup(GEFActionConstants.GROUP_COPY, getAction(DeleteColumnAction.ID));\n menuManager.appendToGroup(GEFActionConstants.GROUP_EDIT, getAction(MergeAction.ID));\n menuManager.appendToGroup(GEFActionConstants.GROUP_EDIT, getAction(SplitAction.ID));\n } else if (firstSelectedElement instanceof CellHandle) {\n createInsertElementMenu(menuManager, GEFActionConstants.GROUP_EDIT);\n menuManager.appendToGroup(GEFActionConstants.GROUP_EDIT, getAction(CopyCellContentsContextAction.ID));\n menuManager.appendToGroup(GEFActionConstants.GROUP_EDIT, getAction(MergeAction.ID));\n menuManager.appendToGroup(GEFActionConstants.GROUP_EDIT, getAction(SplitAction.ID));\n menuManager.appendToGroup(GEFActionConstants.GROUP_COPY, new DeleteAction(selectedElements));\n } else {\n menuManager.appendToGroup(GEFActionConstants.GROUP_COPY, getAction(ActionFactory.DELETE.getId()));\n }\n if (Policy.TRACING_MENU_SHOW) {\n System.out.println(\"String_Node_Str\" + ((DesignElementHandle) firstSelectedElement).getDefn().getDisplayName());\n }\n } else if (firstSelectedElement instanceof SlotHandle) {\n menuManager.appendToGroup(GEFActionConstants.GROUP_UNDO, getAction(ActionFactory.UNDO.getId()));\n menuManager.appendToGroup(GEFActionConstants.GROUP_UNDO, getAction(ActionFactory.REDO.getId()));\n menuManager.appendToGroup(GEFActionConstants.GROUP_COPY, new CutAction(selectedElements));\n menuManager.appendToGroup(GEFActionConstants.GROUP_COPY, new CopyAction(selectedElements));\n menuManager.appendToGroup(GEFActionConstants.GROUP_COPY, new PasteAction(selectedElements));\n menuManager.appendToGroup(GEFActionConstants.GROUP_COPY, new DeleteAction(selectedElements));\n createInsertElementMenu(menuManager, GEFActionConstants.GROUP_EDIT);\n if (Policy.TRACING_MENU_SHOW) {\n System.out.println(\"String_Node_Str\" + ((SlotHandle) firstSelectedElement).getSlotID() + \"String_Node_Str\" + ((SlotHandle) firstSelectedElement).getElementHandle().getDefn().getDisplayName());\n }\n } else {\n }\n if (!getTableEditParts().isEmpty() || !getTableMultipleEditParts().isEmpty()) {\n createInsertGroupMenu(menuManager, GEFActionConstants.GROUP_ADD);\n if (getTableEditParts().size() == 1 || getTableMultipleEditParts().size() == 1) {\n createDeleteGroupMenus(menuManager, GEFActionConstants.GROUP_ADD);\n createEditGroupMenu(menuManager, GEFActionConstants.GROUP_ADD);\n createInsertGroupHeaderFooter(menuManager, GEFActionConstants.GROUP_ADD);\n Separator separator = new Separator(EditBindingAction.ID);\n menuManager.add(separator);\n menuManager.appendToGroup(EditBindingAction.ID, getAction(EditBindingAction.ID));\n }\n }\n if (!getListEditParts().isEmpty()) {\n createInsertGroupMenu(menuManager, GEFActionConstants.GROUP_ADD);\n if (getListEditParts().size() == 1) {\n createDeleteGroupMenus(menuManager, GEFActionConstants.GROUP_ADD);\n createEditGroupMenu(menuManager, GEFActionConstants.GROUP_ADD);\n Separator separator = new Separator(EditBindingAction.ID);\n menuManager.add(separator);\n menuManager.appendToGroup(EditBindingAction.ID, getAction(EditBindingAction.ID));\n }\n }\n if (getElements().size() == 1 || isMutilSelection(multiSelection)) {\n if (firstSelectedElement instanceof DesignElementHandle) {\n String elementName = ((DesignElementHandle) firstSelectedElement).getDefn().getName();\n IMenuBuilder menuBuilder = ExtensionPointManager.getInstance().getMenuBuilder(elementName);\n if (menuBuilder != null) {\n menuBuilder.buildMenu(menuManager, getElements());\n }\n }\n Object[] menuAdapters = ElementAdapterManager.getAdapters(firstSelectedElement, IMenuListener.class);\n if (menuAdapters != null && menuAdapters.length > 0) {\n for (int i = 0; i < menuAdapters.length; i++) {\n if (menuAdapters[i] instanceof ISchematicMenuListener) {\n ((ISchematicMenuListener) menuAdapters[i]).setActionRegistry(getActionRegistry());\n }\n ((IMenuListener) menuAdapters[i]).menuAboutToShow(menuManager);\n }\n ((IMenuListener) menuAdapter).menuAboutToShow(menuManager);\n }\n }\n}\n"
"public List getColumnKeys(Object dataset) {\n if (isTOPChartInstalled()) {\n return chartService.getColumnKeys(dataset);\n }\n return null;\n}\n"
"public void testValidateColumnName() {\n CoreRuntimePlugin.getInstance().getDesignerCoreService().setPreferenceStoreValue(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, false);\n String columnName = MetadataToolHelper.validateColumnName(\"String_Node_Str\", 0);\n assertEquals(columnName, \"String_Node_Str\");\n columnName = MetadataToolHelper.validateColumnName(\"String_Node_Str\", 0);\n assertEquals(columnName, \"String_Node_Str\");\n columnName = MetadataToolHelper.validateColumnName(\"String_Node_Str\", 0);\n assertEquals(columnName, \"String_Node_Str\");\n columnName = MetadataToolHelper.validateColumnName(\"String_Node_Str\", 0);\n assertEquals(columnName, \"String_Node_Str\");\n columnName = MetadataToolHelper.validateColumnName(\"String_Node_Str\", 0);\n assertEquals(columnName, \"String_Node_Str\");\n columnName = MetadataToolHelper.validateColumnName(\"String_Node_Str\", 0);\n assertEquals(columnName, \"String_Node_Str\");\n columnName = MetadataToolHelper.validateColumnName(\"String_Node_Str\", 0);\n assertEquals(columnName, \"String_Node_Str\");\n columnName = MetadataToolHelper.validateColumnName(\"String_Node_Str\", 0);\n assertEquals(columnName, \"String_Node_Str\");\n columnName = MetadataToolHelper.validateColumnName(\"String_Node_Str\", 0);\n assertEquals(\"String_Node_Str\", columnName);\n columnName = MetadataToolHelper.validateColumnName(\"String_Node_Str\", 0);\n assertEquals(\"String_Node_Str\", columnName);\n CoreRuntimePlugin.getInstance().getDesignerCoreService().getDesignerCorePreferenceStore().setValue(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, true);\n columnName = MetadataToolHelper.validateColumnName(\"String_Node_Str\", 0);\n assertEquals(\"String_Node_Str\", columnName);\n columnName = MetadataToolHelper.validateColumnName(\"String_Node_Str\", 0);\n assertEquals(\"String_Node_Str\", columnName);\n CoreRuntimePlugin.getInstance().getDesignerCoreService().getDesignerCorePreferenceStore().setToDefault(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS);\n}\n"
"public static synchronized GroovyIndentationService get(IJavaProject project) {\n if (lastIndenter != null && project != null && !project.equals(lastIndenter.project)) {\n disposeLastImpl();\n }\n if (lastIndenter == null) {\n lastIndenter = new GroovyIndentationService(project);\n }\n return lastIndenter;\n}\n"
"private XMLDescriptor getDescriptor(QName qName) {\n XPathQName xpathQName = new XPathQName(qName.getNamespaceURI(), qName.getLocalPart(), true);\n return (XMLDescriptor) descriptorsByQName.get(xpathQName);\n}\n"
"public void initGui() {\n super.initGui();\n resetGuiElements();\n xSize = 372;\n ySize = 250;\n ScaledResolution var8 = new ScaledResolution(mc);\n int scaledWidth = var8.getScaledWidth();\n int scaledHeight = var8.getScaledHeight();\n xCenter = scaledWidth / 2;\n yCenter = scaledHeight / 2;\n xStart = xCenter - xSize / 2;\n yStart = yCenter - ySize / 2;\n int guiPadding = 8;\n int xStartPadded = xStart + guiPadding - 1;\n int yStartPadded = yStart + guiPadding - 1;\n int btnWidth = 80;\n int btnWidthAndPadding = 84;\n int btnWidthBool = 50;\n int btnHeight = 20;\n int btnHeightAndPadding = 24;\n int padding = 1;\n int btnSpacing = 22;\n int yEleSize2 = 44;\n int xStartPadded2 = xStartPadded + 168;\n int yStartPadded2 = yStartPadded + 30;\n int yStartPadded3 = yStartPadded2 + 20;\n int btnDimIndex = btnDimIndexStart;\n addButton(new GuiButton(CMD_CLOSE, xStart + xSize - guiPadding - btnWidth, yStart + ySize - guiPadding - btnHeight, btnWidth, btnHeight, \"String_Node_Str\"));\n addButton(new GuiButton(CMD_ADVANCED, xStart + xSize - guiPadding - btnWidth - btnWidthAndPadding, yStart + ySize - guiPadding - btnHeight, btnWidth, btnHeight, \"String_Node_Str\"));\n addButton(new GuiButton(CMD_SUBGUI_PERFORMANCE, xStartPadded + btnWidthAndPadding * 0, yStartPadded, btnWidth, btnHeight, (guiCur.equals(GUI_SUBGUI_PERFORMANCE) ? \"String_Node_Str\" + '2' : \"String_Node_Str\") + GUI_SUBGUI_PERFORMANCE));\n addButton(new GuiButton(CMD_SUBGUI_COMPATIBILITY, xStartPadded + btnWidthAndPadding * 1, yStartPadded, btnWidth, btnHeight, (guiCur.equals(GUI_SUBGUI_COMPATIBILITY) ? \"String_Node_Str\" + '2' : \"String_Node_Str\") + GUI_SUBGUI_COMPATIBILITY));\n addButton(new GuiButton(CMD_SUBGUI_PREFERENCE, xStartPadded + btnWidthAndPadding * 2, yStartPadded, btnWidth, btnHeight, (guiCur.equals(GUI_SUBGUI_PREFERENCE) ? \"String_Node_Str\" + '2' : \"String_Node_Str\") + GUI_SUBGUI_PREFERENCE));\n addButton(new GuiButton(CMD_SUBGUI_DIMENSIONS, xStartPadded + btnWidthAndPadding * 3, yStartPadded, btnWidth, btnHeight, (guiCur.equals(GUI_SUBGUI_DIMENSIONS) ? \"String_Node_Str\" + '2' : \"String_Node_Str\") + GUI_SUBGUI_DIMENSIONS));\n if (guiCur.equals(GUI_SUBGUI_PERFORMANCE)) {\n addButton(new GuiButtonCycle(WeatherUtilConfig.CMD_BTN_PERF_STORM, xStartPadded2 + btnWidthAndPadding * 0, yStartPadded2, btnWidth, btnHeight, WeatherUtilConfig.LIST_RATES, 1));\n addButton(new GuiButtonCycle(WeatherUtilConfig.CMD_BTN_PERF_NATURE, xStartPadded2 + btnWidthAndPadding * 0, yStartPadded2 + btnHeightAndPadding * 1, btnWidth, btnHeight, WeatherUtilConfig.LIST_RATES2, 1));\n addButton(new GuiButtonCycle(WeatherUtilConfig.CMD_BTN_PERF_PRECIPRATE, xStartPadded2 + btnWidthAndPadding * 0, yStartPadded2 + btnHeightAndPadding * 2, btnWidth, btnHeight, WeatherUtilConfig.LIST_RATES2, 1));\n } else if (guiCur.equals(GUI_SUBGUI_COMPATIBILITY)) {\n addButton(new GuiButtonCycle(WeatherUtilConfig.CMD_BTN_COMP_STORM, xStartPadded2 + btnWidthAndPadding * 0, yStartPadded2, btnWidth, btnHeight, WeatherUtilConfig.LIST_STORMSWHEN, 0));\n addButton(new GuiButtonCycle(WeatherUtilConfig.CMD_BTN_COMP_LOCK, xStartPadded2 + btnWidthAndPadding * 0, yStartPadded2 + btnHeightAndPadding * 1, btnWidth, btnHeight, WeatherUtilConfig.LIST_LOCK, 0));\n addButton(new GuiButtonCycle(WeatherUtilConfig.CMD_BTN_COMP_PARTICLEPRECIP, xStartPadded2 + btnWidthAndPadding * 0, yStartPadded2 + btnHeightAndPadding * 2, btnWidth, btnHeight, WeatherUtilConfig.LIST_TOGGLE, 1));\n addButton(new GuiButtonCycle(WeatherUtilConfig.CMD_BTN_COMP_SNOWFALLBLOCKS, xStartPadded2 + btnWidthAndPadding * 0, yStartPadded2 + btnHeightAndPadding * 3, btnWidth, btnHeight, WeatherUtilConfig.LIST_TOGGLE, 0));\n addButton(new GuiButtonCycle(WeatherUtilConfig.CMD_BTN_COMP_PARTICLESNOMODS, xStartPadded2 + btnWidthAndPadding * 0, yStartPadded2 + btnHeightAndPadding * 4, btnWidth, btnHeight, WeatherUtilConfig.LIST_TOGGLE, 0));\n } else if (guiCur.equals(GUI_SUBGUI_PREFERENCE)) {\n addButton(new GuiButtonCycle(WeatherUtilConfig.CMD_BTN_PREF_RATEOFSTORM, xStartPadded2 + btnWidthAndPadding * 0, yStartPadded2, btnWidth, btnHeight, WeatherUtilConfig.LIST_CHANCE, 1));\n addButton(new GuiButtonCycle(WeatherUtilConfig.CMD_BTN_PREF_CHANCEOFSTORM, xStartPadded2 + btnWidthAndPadding * 0, yStartPadded2 + btnHeightAndPadding * 1, btnWidth, btnHeight, WeatherUtilConfig.LIST_RATES, 0));\n addButton(new GuiButtonCycle(WeatherUtilConfig.CMD_BTN_PREF_CHANCEOFRAIN, xStartPadded2 + btnWidthAndPadding * 0, yStartPadded2 + btnHeightAndPadding * 2, btnWidth, btnHeight, WeatherUtilConfig.LIST_RATES2, 0));\n addButton(new GuiButtonCycle(WeatherUtilConfig.CMD_BTN_PREF_BLOCKDESTRUCTION, xStartPadded2 + btnWidthAndPadding * 0, yStartPadded2 + btnHeightAndPadding * 3, btnWidth, btnHeight, WeatherUtilConfig.LIST_TOGGLE, 1));\n addButton(new GuiButtonCycle(WeatherUtilConfig.CMD_BTN_PREF_TORNADOANDCYCLONES, xStartPadded2 + btnWidthAndPadding * 0, yStartPadded2 + btnHeightAndPadding * 4, btnWidth, btnHeight, WeatherUtilConfig.LIST_TOGGLE, 1));\n addButton(new GuiButtonCycle(WeatherUtilConfig.CMD_BTN_PREF_SANDSTORMS, xStartPadded2 + btnWidthAndPadding * 0, yStartPadded2 + btnHeightAndPadding * 5, btnWidth, btnHeight, WeatherUtilConfig.LIST_TOGGLE, 1));\n addButton(new GuiButtonCycle(WeatherUtilConfig.CMD_BTN_PREF_GLOBALRATE, xStartPadded2 + btnWidthAndPadding * 0, yStartPadded2 + btnHeightAndPadding * 6, btnWidth, btnHeight, WeatherUtilConfig.LIST_GLOBALRATE, 1));\n } else if (guiCur.equals(GUI_SUBGUI_DIMENSIONS)) {\n addButton(new GuiButton(CMD_BUTTON_DIMENSIONS_PREV, xStartPadded, yStart + ySize - guiPadding - btnHeight, 60, 20, \"String_Node_Str\"));\n addButton(new GuiButton(CMD_BUTTON_DIMENSIONS_NEXT, xStartPadded + 20 + btnWidthAndPadding * 1, yStart + ySize - guiPadding - btnHeight, 60, 20, \"String_Node_Str\"));\n for (int i = 0; i < curDimListCountPerPage; i++) {\n addButton(new GuiButtonCycle(btnDimIndex++, xStartPadded + 46, yStartPadded3 + yEleSize2 * i, 40, 20, WeatherUtilConfig.LIST_TOGGLE, 1));\n addButton(new GuiButtonCycle(btnDimIndex++, xStartPadded + 132, yStartPadded3 + yEleSize2 * i, 40, 20, WeatherUtilConfig.LIST_TOGGLE, 1));\n addButton(new GuiButtonCycle(btnDimIndex++, xStartPadded + 218, yStartPadded3 + yEleSize2 * i, 40, 20, WeatherUtilConfig.LIST_TOGGLE, 1));\n addButton(new GuiButtonCycle(btnDimIndex++, xStartPadded + 306, yStartPadded3 + yEleSize2 * i, 40, 20, WeatherUtilConfig.LIST_TOGGLE, 1));\n }\n }\n if (guiCur.equals(\"String_Node_Str\")) {\n }\n updateGuiElements();\n}\n"