content stringlengths 40 137k |
|---|
"public void setValue(BindELContext ctx, Object value) {\n int index = BindChildRenderer.this.getRenderedIndex(owner, comp.getParent().getChildren().indexOf(comp));\n Collection<?> collection = (Collection<?>) owner.getAttribute(BindELContext.getModelName(owner));\n if (collection instanceof List<?>) {\n List<Object> list = (List<Object>) collection;\n try {\n list.set(index, value);\n } catch (UnsupportedOperationException e) {\n throw new PropertyNotWritableException(e);\n } catch (IndexOutOfBoundsException e) {\n throw new PropertyNotFoundException(e);\n }\n }\n}\n"
|
"public boolean createEntity(Dao dao, Entity<?> en) {\n StringBuilder sb = new StringBuilder(\"String_Node_Str\" + en.getTableName() + \"String_Node_Str\");\n for (MappingField mf : en.getMappingFields()) {\n sb.append('\\n').append(mf.getColumnName());\n sb.append(' ').append(evalFieldType(mf));\n if (mf.isName() && en.getPkType() != PkType.NAME) {\n sb.append(\"String_Node_Str\");\n } else {\n if (mf.isUnsigned())\n sb.append(\"String_Node_Str\");\n if (mf.isNotNull())\n sb.append(\"String_Node_Str\");\n if (mf.isAutoIncreasement())\n sb.append(\"String_Node_Str\");\n if (mf.hasDefaultValue())\n sb.append(\"String_Node_Str\").append(getDefaultValue(mf)).append('\\'');\n }\n sb.append(',');\n }\n List<MappingField> pks = en.getPks();\n if (!pks.isEmpty()) {\n sb.append('\\n');\n sb.append(\"String_Node_Str\");\n for (MappingField pk : pks) {\n sb.append(pk.getColumnName()).append(',');\n }\n sb.setCharAt(sb.length() - 1, ')');\n sb.append(\"String_Node_Str\");\n }\n sb.setCharAt(sb.length() - 1, ')');\n dao.execute(Sqls.create(sb.toString()));\n createRelation(dao, en);\n return true;\n}\n"
|
"public List<Place> deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.registerModule(new TwitterModule());\n jp.setCodec(mapper);\n JsonNode treeNode = jp.readValueAs(JsonNode.class).get(\"String_Node_Str\");\n return (List<Place>) mapper.readerFor(new TypeReference<List<Place>>() {\n }).readValue(treeNode);\n}\n"
|
"public static ColumnAlias columnsWithFunction(String functionName, ColumnAlias... columnAliases) {\n QueryBuilder queryBuilder = new QueryBuilder<>(functionName).append(\"String_Node_Str\");\n for (int i = 0; i < columnAliases.length; i++) {\n if (i > 0) {\n queryBuilder.append(\"String_Node_Str\");\n }\n queryBuilder.appendQuoted(columnAliases[i].getAliasName());\n }\n queryBuilder.append(\"String_Node_Str\");\n return columnRaw(queryBuilder.getQuery());\n}\n"
|
"public OperationOutcome validate(String location, byte[] source, FhirFormat cntType, List<String> profiles) throws Exception {\n List<ValidationMessage> messages = new ArrayList<ValidationMessage>();\n if (doNative) {\n if (cntType == FhirFormat.JSON)\n validateJsonSchema(location, messages);\n if (cntType == FhirFormat.XML)\n validateXmlSchema(location, messages);\n if (cntType == FhirFormat.TURTLE)\n validateSHEX(location, messages);\n }\n InstanceValidator validator = new InstanceValidator(context, null);\n validator.setNoInvariantChecks(isNoInvariantChecks());\n validator.validate(null, messages, new ByteArrayInputStream(source), cntType, new ValidationProfileSet(profiles, true));\n return messagesToOutcome(messages);\n}\n"
|
"public boolean apply(Game game, Ability source) {\n Player you = game.getPlayer(source.getControllerId());\n FilterCard filter = new FilterCard(\"String_Node_Str\");\n filter.add(new CardTypePredicate(CardType.ARTIFACT));\n if (you != null && you.getHand().count(filter, game) > 0 && you.chooseUse(Outcome.Discard, \"String_Node_Str\", game)) {\n Cost cost = new DiscardTargetCost(new TargetCardInHand(filter));\n if (cost.canPay(source.getSourceId(), you.getId(), game)) {\n if (cost.pay(source, game, source.getSourceId(), you.getId(), false)) {\n return true;\n }\n return true;\n }\n }\n if (you != null && you.getHand().count(filter, game) == 0) {\n you.discard(2, source, game);\n }\n return false;\n}\n"
|
"private void processPresentations() throws RepositoryException {\n mLogger.debug(\"String_Node_Str\");\n Map<String, Presentation> tNewPresentations = new HashMap<String, Presentation>();\n Map<String, Long> tPathEntries = getChildrenRevisions(getLocation(\"String_Node_Str\"));\n for (Map.Entry<String, Long> tEntry : tPathEntries.entrySet()) {\n ;\n Presentation tPresentation = (Presentation) mApplicationContext.getBean(\"String_Node_Str\", new Object[] { tEntry.getValue(), \"String_Node_Str\" + tEntry.getKey() });\n tNewPresentations.put(tEntry.getKey(), tPresentation);\n }\n mLogger.debug(\"String_Node_Str\");\n Repository tRepository = getRepository();\n RepositoryChangeset<Presentation> tChangeset = new RepositoryChangeset<Presentation>(tRepository.getPresentations(), tNewPresentations);\n for (Map.Entry<String, Presentation> tEntry : tChangeset.getRemovals().entrySet()) {\n tRepository.removePresentation(tEntry.getKey(), tEntry.getValue());\n }\n for (Map.Entry<String, Presentation> tEntry : tChangeset.getAdditions().entrySet()) {\n tRepository.addPresentation(tEntry.getKey(), tEntry.getValue());\n }\n for (Map.Entry<String, Presentation> tEntry : tChangeset.getUpdates().entrySet()) {\n tRepository.updatePresentation(tEntry.getKey(), tEntry.getValue());\n }\n}\n"
|
"protected boolean end(final String uri, final String localName, final String qName) throws SAXException {\n if (vocabulary.isMetadata(localName)) {\n if (vocabularyVersion == null) {\n vocabularyVersion = \"String_Node_Str\";\n }\n WorkerLoad.this.vocabulary = Vocabulary.forVersion(vocabularyVersion);\n WorkerLoad.this.vocabulary.checkVersion(version);\n } else if (vocabulary.isVersion(localName)) {\n version = payload;\n } else if (vocabulary.isVocabulary(localName)) {\n vocabularyVersion = payload;\n } else {\n return false;\n }\n return true;\n}\n"
|
"public Instances createTrainingInstances() {\n ArrayList<Attribute> attributes = new ArrayList<Attribute>();\n for (int i = 1; i <= featureStack.getSize(); i++) {\n String attString = featureStack.getSliceLabel(i) + \"String_Node_Str\";\n attributes.add(new Attribute(attString));\n }\n final ArrayList<String> classes = new ArrayList<String>();\n int numOfInstances = 0;\n for (int i = 0; i < numOfClasses; i++) {\n if (examples[i].size() > 0)\n classes.add(classLabels[i]);\n numOfInstances += examples[i].size();\n }\n attributes.add(new Attribute(\"String_Node_Str\", classes));\n final Instances trainingData = new Instances(\"String_Node_Str\", attributes, numOfInstances);\n IJ.log(\"String_Node_Str\");\n for (int l = 0; l < numOfClasses; l++) {\n int nl = 0;\n for (int j = 0; j < examples[l].size(); j++) {\n Roi r = examples[l].get(j);\n if (r instanceof PolygonRoi && r.getType() != Roi.FREEROI) {\n if (r.getStrokeWidth() == 1) {\n int[] x = r.getPolygon().xpoints;\n int[] y = r.getPolygon().ypoints;\n final int n = r.getPolygon().npoints;\n for (int i = 0; i < n; i++) {\n double[] values = new double[featureStack.getSize() + 1];\n for (int z = 1; z <= featureStack.getSize(); z++) values[z - 1] = featureStack.getProcessor(z).getPixelValue(x[i], y[i]);\n values[featureStack.getSize()] = (double) l;\n trainingData.add(new DenseInstance(1.0, values));\n nl++;\n }\n } else {\n final int width = (int) Math.round(r.getStrokeWidth());\n FloatPolygon p = r.getFloatPolygon();\n int n = p.npoints;\n double x1, y1;\n double x2 = p.xpoints[0] - (p.xpoints[1] - p.xpoints[0]);\n double y2 = p.ypoints[0] - (p.ypoints[1] - p.ypoints[0]);\n for (int i = 0; i < n; i++) {\n x1 = x2;\n y1 = y2;\n x2 = p.xpoints[i];\n y2 = p.ypoints[i];\n double dx = x2 - x1;\n double dy = y1 - y2;\n double length = (float) Math.sqrt(dx * dx + dy * dy);\n dx /= length;\n dy /= length;\n double x = x2 - dy * width / 2.0;\n double y = y2 - dx * width / 2.0;\n int n2 = width;\n do {\n if (x >= 0 && x < featureStack.getWidth() && y >= 0 && y < featureStack.getHeight()) {\n double[] values = new double[featureStack.getSize() + 1];\n for (int z = 1; z <= featureStack.getSize(); z++) values[z - 1] = featureStack.getProcessor(z).getInterpolatedValue(x, y);\n values[featureStack.getSize()] = (double) l;\n trainingData.add(new DenseInstance(1.0, values));\n nl++;\n }\n x += dy;\n y += dx;\n } while (--n2 > 0);\n }\n }\n } else {\n final ShapeRoi shapeRoi = new ShapeRoi(r);\n final Rectangle rect = shapeRoi.getBounds();\n final int lastX = rect.x + rect.width;\n final int lastY = rect.y + rect.height;\n for (int x = rect.x; x < lastX; x++) for (int y = rect.y; y < lastY; y++) if (shapeRoi.contains(x, y)) {\n double[] values = new double[featureStack.getSize() + 1];\n for (int z = 1; z <= featureStack.getSize(); z++) values[z - 1] = featureStack.getProcessor(z).getPixelValue(x, y);\n values[featureStack.getSize()] = (double) l;\n trainingData.add(new DenseInstance(1.0, values));\n nl++;\n }\n }\n }\n IJ.log(\"String_Node_Str\" + classLabels[l] + \"String_Node_Str\" + nl);\n }\n return trainingData;\n}\n"
|
"private boolean isUidALocationProvider(int uid) {\n if (uid == Process.SYSTEM_UID) {\n return true;\n }\n if (mGeocodeProvider != null) {\n if (doesUidHavePackage(uid, mGeocodeProvider.getConnectedPackageName()))\n return true;\n }\n for (LocationProviderProxy proxy : mProxyProviders) {\n if (doesPackageHaveUid(uid, proxy.getConnectedPackageName()))\n return true;\n }\n return false;\n}\n"
|
"public org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderEnteralFormulaComponent convertNutritionOrderEnteralFormulaComponent(org.hl7.fhir.dstu3.model.NutritionRequest.NutritionRequestEnteralFormulaComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderEnteralFormulaComponent tgt = new org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderEnteralFormulaComponent();\n copyElement(src, tgt);\n tgt.setBaseFormulaType(convertCodeableConcept(src.getBaseFormulaType()));\n tgt.setBaseFormulaProductName(src.getBaseFormulaProductName());\n tgt.setAdditiveType(convertCodeableConcept(src.getAdditiveType()));\n tgt.setAdditiveProductName(src.getAdditiveProductName());\n tgt.setCaloricDensity(convertSimpleQuantity(src.getCaloricDensity()));\n tgt.setRouteofAdministration(convertCodeableConcept(src.getRouteofAdministration()));\n for (org.hl7.fhir.dstu3.model.NutritionRequest.NutritionRequestEnteralFormulaAdministrationComponent t : src.getAdministration()) tgt.addAdministration(convertNutritionOrderEnteralFormulaAdministrationComponent(t));\n tgt.setMaxVolumeToDeliver(convertSimpleQuantity(src.getMaxVolumeToDeliver()));\n tgt.setAdministrationInstruction(src.getAdministrationInstruction());\n return tgt;\n}\n"
|
"private List convertParamterBindings(Iterator paramBindingIt) {\n if (paramBindingIt == null)\n return null;\n List parameterBindings = new ArrayList();\n while (paramBindingIt.hasNext()) {\n Object paramObj = paramBindingIt.next();\n if (paramObj instanceof ParamBindingHandle) {\n ParamBindingHandle paramBinding = (ParamBindingHandle) paramObj;\n if (paramBinding.getExpression() != null) {\n ScriptExpression paramValueExpr = new ScriptExpression(paramBinding.getExpression());\n InputParameterBinding inputParamBinding = new InputParameterBinding(paramBinding.getParamName(), paramValueExpr);\n parameterBindings.add(inputParamBinding);\n }\n } else if (paramObj instanceof OdaDataSetParameterHandle) {\n if (((OdaDataSetParameterHandle) paramObj).getParamName() != null) {\n String defaultValueExpr = ExpressionUtil.createJSParameterExpression((((OdaDataSetParameterHandle) paramObj).getParamName()));\n InputParameterBinding inputParamBinding = new InputParameterBinding((String) ((OdaDataSetParameterHandle) paramObj).getName(), modelAdaptor.adaptExpression(defaultValueExpr, ((OdaDataSetParameterHandle) paramObj).getDataType()));\n parameterBindings.add(inputParamBinding);\n } else {\n OdaDataSetParameterHandle paramBinding = (OdaDataSetParameterHandle) paramObj;\n ExpressionHandle handle = paramBinding.getExpressionProperty(DataSetParameter.DEFAULT_VALUE_MEMBER);\n InputParameterBinding inputParamBinding = new InputParameterBinding(paramBinding.getName(), this.session.getModelAdaptor().adaptExpression((Expression) handle.getValue()));\n parameterBindings.add(inputParamBinding);\n }\n }\n }\n return parameterBindings;\n}\n"
|
"public static boolean canPlaceBlockAt(World world, int x, int y, int z, ForgeDirection placeSide, int rot) {\n Vector3 pos = new Vector3(x, y, z);\n Block block = Block.blocksList[pos.getBlockID(world)];\n if (block == null || block.isBlockReplaceable(world, x, y, z)) {\n Vector3[] vecs = TileEntityMissileTable.getMultiBlockVectors(placeSide, (byte) rot);\n for (int i = 0; i > vecs.length; i++) {\n block = Block.blocksList[world.getBlockId(x + vecs[i].intX(), y + vecs[i].intY(), z + vecs[i].intZ())];\n if (block != null && !block.isBlockReplaceable(world, x, y, z)) {\n return false;\n }\n }\n return true;\n }\n return false;\n}\n"
|
"private File getFrameworkApk(int id, String frameTag) throws AndrolibException {\n File dir = getFrameworkDir();\n File apk;\n if (frameTag != null) {\n apk = new File(dir, String.valueOf(id) + '-' + frameTag + \"String_Node_Str\");\n if (apk.exists()) {\n return apk;\n }\n }\n apk = new File(dir, String.valueOf(id) + \"String_Node_Str\");\n if (apk.exists()) {\n return apk;\n }\n if (id == 1) {\n InputStream in = null;\n OutputStream out = null;\n try {\n in = AndrolibResources.class.getResourceAsStream(\"String_Node_Str\");\n out = new FileOutputStream(apk);\n IOUtils.copy(in, out);\n return apk;\n } catch (IOException ex) {\n throw new AndrolibException(ex);\n } finally {\n if (in != null) {\n try {\n in.close();\n } catch (IOException ex) {\n }\n }\n if (out != null) {\n try {\n out.close();\n } catch (IOException ex) {\n }\n }\n }\n }\n throw new CantFindFrameworkResException(id);\n}\n"
|
"public void openTrace() throws JniException {\n if (tracepath == \"String_Node_Str\") {\n throw new JniTraceException(\"String_Node_Str\");\n }\n if (thisTracePtr.getPointer() != NULL) {\n closeTrace();\n }\n int newLibraryId = initializeLibrary();\n if (newLibraryId != -1) {\n long newPtr;\n if (isLiveTraceSupported()) {\n try {\n newPtr = ltt_openTraceLive(newLibraryId, tracepath, printLttDebug);\n } catch (UnsatisfiedLinkError e) {\n setLiveTraceSupported(false);\n newPtr = ltt_openTrace(newLibraryId, tracepath, printLttDebug);\n }\n } else {\n newPtr = ltt_openTrace(newLibraryId, tracepath, printLttDebug);\n }\n if (newPtr == NULL) {\n thisTracePtr = new Jni_C_Pointer_And_Library_Id();\n throw new JniOpenTraceFailedException(\"String_Node_Str\");\n }\n thisTracePtr = new Jni_C_Pointer_And_Library_Id(newLibraryId, newPtr);\n populateTraceInformation();\n } else {\n thisTracePtr = new Jni_C_Pointer_And_Library_Id();\n throw new JniTraceException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n}\n"
|
"public void run() {\n try {\n final String content = editorPart.getDocumentProvider().getDocument(editorPart.getEditorInput()).get();\n send(toID, new StartMessage(our, fName, toID, content, fileName));\n localStartShare(getLocalRosterManager(), our, our, toID, editorPart);\n } catch (final Exception e) {\n logError(Messages.DocShare_ERROR_STARTING_EDITOR_TITLE, e);\n showErrorToUser(Messages.DocShare_ERROR_STARTING_EDITOR_TITLE, NLS.bind(Messages.DocShare_ERROR_STARTING_EDITOR_MESSAGE, e.getLocalizedMessage()));\n }\n}\n"
|
"public Set<URI> findBaseURIs(String prefix) {\n Set<URI> result = new HashSet<URI>();\n Set<URI> urIs = findURIs(prefix);\n String path = packagePrefixToPath(prefix);\n for (URI urI : urIs) {\n String schemeSpecificPart = urI.getSchemeSpecificPart();\n int l = path.length();\n if (schemeSpecificPart.endsWith(\"String_Node_Str\") && !path.endsWith(\"String_Node_Str\")) {\n l++;\n }\n String based = schemeSpecificPart.substring(0, schemeSpecificPart.length() - l);\n try {\n result.add(new URI(urI.getScheme(), based, urI.getFragment()));\n } catch (URISyntaxException e) {\n throw new RuntimeException(e);\n }\n }\n logger.debug(\"String_Node_Str\", result);\n return result;\n}\n"
|
"public void registerSubscriber(RequestContext rc, Subscriber subscriber, Filter filter) {\n Class eClass = rc.elementType();\n if (eClass == Entry.class || eClass == MapEvent.class)\n registerSubscriber0(rc, subscriber, filter);\n else\n registerKeySubscriber(rc, subscriber, filter);\n}\n"
|
"private void requestBlogInfo(final long blogId) {\n if (!mHasBlogInfo) {\n showProgress();\n }\n ReaderActions.UpdateBlogInfoListener listener = new ReaderActions.UpdateBlogInfoListener() {\n\n public void onResult(ReaderBlogInfo blogInfo) {\n hideProgress();\n if (blogInfo != null) {\n showBlogInfo(blogInfo);\n }\n }\n };\n ReaderBlogActions.updateBlogInfo(blogId, listener);\n}\n"
|
"public void createGithubCommentOnRequestClaimed(final RequestClaimedEvent event) {\n if (addComment) {\n final RequestDto request = event.getRequestDto();\n final IssueInformationDto issueInformation = request.getIssueInformation();\n if (issueInformation.getPlatform() == Platform.GITHUB) {\n placeComment(request, issueInformation);\n }\n }\n}\n"
|
"public String configFile() {\n String templateUrl = driver.getEntity().getConfig(NginxController.SERVER_CONF_TEMPLATE_URL);\n ResourceUtils.create(this).checkUrlExists(templateUrl);\n ProxySslConfig ssl = driver.getEntity().getConfig(NginxController.SSL_CONFIG);\n if (ssl != null && Strings.isEmpty(ssl.getCertificateDestination()) && Strings.isEmpty(ssl.getCertificateSourceUrl())) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n Iterable<UrlMapping> mappings = ((NginxController) driver.getEntity()).getUrlMappings();\n Multimap<String, UrlMapping> mappingsByDomain = LinkedHashMultimap.create();\n for (UrlMapping mapping : mappings) {\n Collection<String> addrs = mapping.getAttribute(UrlMapping.TARGET_ADDRESSES);\n if (addrs != null && addrs.size() > 0) {\n mappingsByDomain.put(mapping.getDomain(), mapping);\n }\n }\n MutableMap.Builder<String, Object> builder = MutableMap.<String, Object>builder().put(\"String_Node_Str\", mappings).put(\"String_Node_Str\", mappingsByDomain);\n if (ssl != null)\n builder.put(\"String_Node_Str\", ssl);\n Map<String, Object> substitutions = builder.build();\n String contents = ResourceUtils.create(driver.getEntity()).getResourceAsString(templateUrl);\n return TemplateProcessor.processTemplateContents(contents, driver, substitutions);\n}\n"
|
"public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {\n TableCellRenderer r = table.getTableHeader().getDefaultRenderer();\n JLabel l = (JLabel) r.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);\n RowSorter<? extends TableModel> rs = table.getRowSorter();\n if (rs instanceof DefaultRowSorter) {\n l.setForeground(((DefaultRowSorter<? extends TableModel, ?>) rs).isSortable(t.convertColumnIndexToModel(col)) ? Color.BLACK : Color.GRAY);\n }\n return l;\n}\n"
|
"public FrequenciesState transformFrequencies(FrequenciesState fs, int offset, int powOf2NearestLength, int length) {\n int avg = 0;\n int nb = 0;\n for (int i = 1; i < 10; i++) {\n int f0 = FrequenciesHelper.f0(fs, i);\n int fk = FrequenciesHelper.loudestMultiple(fs, f0, 50, 1200);\n if (fk != 0) {\n avg += fk;\n nb++;\n }\n }\n this.loudestfreqs[index] = avg / nb;\n this.index++;\n return fs;\n}\n"
|
"final public static void fillAlignmentGap(Address start, Address end) throws InlinePragma {\n if ((MAX_ALIGNMENT - MIN_ALIGNMENT) == BYTES_IN_INT) {\n if (!end.diff(start).isZero()) {\n start.store(ALIGNMENT_VALUE);\n }\n } else {\n while (start.LT(end)) {\n start.store(ALIGNMENT_VALUE);\n start = start.add(BYTES_IN_INT);\n }\n }\n}\n"
|
"public long getColumnLong() {\n return realmGetter$columnLong();\n}\n"
|
"private Object getEntityWithAssociationFromNode(EntityMetadata m, Node node) {\n Map<String, Object> relationMap = new HashMap<String, Object>();\n Map<Long, Object> nodeIdToEntityMap = new HashMap<Long, Object>();\n Object entity = mapper.getEntityFromNode(node, m);\n nodeIdToEntityMap.put(node.getId(), entity);\n populateRelations(m, entity, relationMap, node, nodeIdToEntityMap);\n nodeIdToEntityMap.clear();\n if (!relationMap.isEmpty() && entity != null) {\n return new EnhanceEntity(entity, PropertyAccessorHelper.getId(entity, m), relationMap);\n } else {\n return entity;\n }\n}\n"
|
"public void customColumnNameShouldBeUsableForRevisionProperty() throws Exception {\n Animal animal = createAndPersistAnimal();\n String newRevision = doConcurrentUpdateToAnimal();\n assertThat(newRevision).isNotEqualTo(animal.getRevision());\n Transaction transaction = session.beginTransaction();\n animal.setName(\"String_Node_Str\");\n transaction.commit();\n}\n"
|
"public void onSuccess(OrgUnitDTOLight result) {\n if (result != null) {\n view.getStore().removeAll();\n view.getStore().add(result, true);\n new Timer() {\n public void run() {\n view.getTree().expandAll();\n }\n }.schedule(2000);\n }\n}\n"
|
"public IPAddressVO disassociatePortableIPToGuestNetwork(long ipId, long networkId) throws ResourceAllocationException, ResourceUnavailableException, InsufficientAddressCapacityException, ConcurrentOperationException {\n Account caller = CallContext.current().getCallingAccount();\n Account owner = null;\n Network network = _networksDao.findById(networkId);\n if (network == null) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n }\n IPAddressVO ipToAssoc = _ipAddressDao.findById(ipId);\n if (ipToAssoc != null) {\n if (ipToAssoc.getAssociatedWithNetworkId() == null) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + ipToAssoc + \"String_Node_Str\");\n }\n if (ipToAssoc.getAssociatedWithNetworkId() != network.getId()) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + ipToAssoc + \"String_Node_Str\" + networkId);\n }\n DataCenter zone = _entityMgr.findById(DataCenter.class, network.getDataCenterId());\n if (zone.getNetworkType() == NetworkType.Advanced) {\n if (network.getGuestType() == Network.GuestType.Shared) {\n assert (isSharedNetworkOfferingWithServices(network.getNetworkOfferingId()));\n _accountMgr.checkAccess(CallContext.current().getCallingAccount(), AccessType.UseNetwork, false, network);\n }\n } else {\n _accountMgr.checkAccess(caller, null, true, ipToAssoc);\n }\n owner = _accountMgr.getAccount(ipToAssoc.getAllocatedToAccountId());\n } else {\n s_logger.debug(\"String_Node_Str\" + ipId);\n return null;\n }\n DataCenter zone = _entityMgr.findById(DataCenter.class, network.getDataCenterId());\n if (network.getAccountId() != owner.getId()) {\n if (zone.getNetworkType() != NetworkType.Basic && !(zone.getNetworkType() == NetworkType.Advanced && network.getGuestType() == Network.GuestType.Shared)) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n }\n }\n List<PublicIpAddress> ipList = new ArrayList<PublicIpAddress>();\n PublicIp publicIp = PublicIp.createFromAddrAndVlan(ipToAssoc, _vlanDao.findById(ipToAssoc.getVlanId()));\n ipList.add(publicIp);\n Map<PublicIpAddress, Set<Service>> ipToServices = _networkModel.getIpToServices(ipList, false, true);\n if (ipToServices != null & !ipToServices.isEmpty()) {\n Set<Service> services = ipToServices.get(publicIp);\n if (services != null && !services.isEmpty()) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + ipToAssoc + \"String_Node_Str\" + networkId);\n }\n }\n IPAddressVO ip = _ipAddressDao.findById(ipId);\n ip.setAssociatedWithNetworkId(null);\n _ipAddressDao.update(ipId, ip);\n try {\n boolean success = applyIpAssociations(network, false);\n if (success) {\n s_logger.debug(\"String_Node_Str\" + ip.getAddress().addr() + \"String_Node_Str\" + network);\n } else {\n s_logger.warn(\"String_Node_Str\" + ip.getAddress().addr() + \"String_Node_Str\" + network);\n }\n return ip;\n } finally {\n }\n}\n"
|
"private QueueView acquireQV() {\n if (qv != null)\n return qv;\n String path = \"String_Node_Str\" + localIdentifier;\n RequestContext requestContext = requestContext(path).elementType(NetworkStats.class);\n if (ChronicleQueueView.isQueueReplicationAvailable())\n requestContext.cluster(clusterName());\n qv = asset.root().acquireAsset(requestContext.fullName()).acquireView(QueueView.class, requestContext);\n return qv;\n}\n"
|
"private Sequence getSequencePrivate(Property aProperty) {\n if ((aProperty != null) && ((SDOProperty) aProperty).getType().isSequenced() && isSet(aProperty) && !((SDOProperty) aProperty).getType().isDataType() && !aProperty.isMany()) {\n return ((DataObject) get(aProperty)).getSequence();\n } else {\n throw SDOException.sequenceNotSupportedForProperty(aProperty.getName());\n }\n}\n"
|
"protected void showSelection() {\n JoinConditionEditPart part = (JoinConditionEditPart) this.getHost();\n ((ColumnConnection) this.getHostFigure()).setLineWidth(2);\n if (part.getTarget() instanceof ColumnEditPart) {\n part.getSource().setSelected(EditPart.SELECTED);\n part.getTarget().setSelected(EditPart.SELECTED);\n }\n}\n"
|
"public Runtime scrapeRuntime() {\n Element lengthElement = document.select(\"String_Node_Str\").first();\n String lengthText = lengthElement.text();\n if (lengthText.length() > 0) {\n return new Runtime(lengthText);\n } else\n return new moviescraper.doctord.model.dataitem.Runtime(\"String_Node_Str\");\n}\n"
|
"private void parseValue() {\n if (ignoreTrailingWhitespace) {\n while (ch != delimiter && ch != newLine && ch != '\\0') {\n output.appender.appendIgnoringWhitespace(ch);\n ch = input.nextChar();\n }\n } else {\n while (ch != delimiter && ch != newLine) {\n output.appender.append(ch);\n ch = input.nextChar();\n }\n }\n}\n"
|
"private IRenderTask createRenderTask(OutputStream out, IReportDocument reportDocument, InputOptions inputOptions, long pageNumber, List activeIds) throws ReportServiceException {\n HttpServletRequest request = (HttpServletRequest) inputOptions.getOption(InputOptions.OPT_REQUEST);\n Locale locale = (Locale) inputOptions.getOption(InputOptions.OPT_LOCALE);\n TimeZone timeZone = (TimeZone) inputOptions.getOption(InputOptions.OPT_TIMEZONE);\n Boolean isMasterPageContent = (Boolean) inputOptions.getOption(InputOptions.OPT_IS_MASTER_PAGE_CONTENT);\n boolean masterPage = isMasterPageContent == null ? true : isMasterPageContent.booleanValue();\n Boolean svgFlag = (Boolean) inputOptions.getOption(InputOptions.OPT_SVG_FLAG);\n String format = (String) inputOptions.getOption(InputOptions.OPT_FORMAT);\n String emitterId = (String) inputOptions.getOption(InputOptions.OPT_EMITTER_ID);\n String iServletPath = (String) inputOptions.getOption(InputOptions.OPT_SERVLET_PATH);\n boolean rtl = isRtl(inputOptions);\n boolean isDesigner = isDesigner(inputOptions);\n int pageOverflow = getPageOverflow(inputOptions);\n if (reportDocument == null) {\n throw new ReportServiceException(BirtResources.getMessage(ResourceConstants.ACTION_EXCEPTION_NO_REPORT_DOCUMENT));\n }\n String servletPath = iServletPath;\n if (servletPath == null)\n servletPath = request.getServletPath();\n IRenderTask renderTask = engine.createRenderTask(reportDocument);\n BirtUtility.addTask(request, renderTask);\n Map context = BirtUtility.getAppContext(request);\n renderTask.setAppContext(context);\n RenderOption renderOption = null;\n if (format == null)\n format = ParameterAccessor.getFormat(request);\n if (ParameterAccessor.isPDFLayout(format)) {\n renderOption = createPDFRenderOption(servletPath, request, pageOverflow, ParameterAccessor.isDesigner());\n } else {\n if (!IBirtConstants.HTML_RENDER_FORMAT.equalsIgnoreCase(format))\n svgFlag = false;\n IViewingSession session = ViewingSessionUtil.getSession(request);\n if (session == null) {\n throw new IllegalStateException(BirtResources.getMessage(ResourceConstants.GENERAL_ERROR_NO_VIEWING_SESSION));\n }\n renderOption = createHTMLRenderOption(svgFlag, servletPath, request, session);\n }\n if (!IBirtConstants.EXCEL_RENDER_FORMAT.equalsIgnoreCase(format)) {\n ((IRenderOption) renderOption).setOption(IRenderOption.HTML_PAGINATION, Boolean.TRUE);\n }\n renderOption.setOutputStream(out);\n renderOption.setOutputFormat(format);\n renderOption.setEmitterID(emitterId);\n ViewerHTMLActionHandler handler = null;\n if (ParameterAccessor.isPDFLayout(format)) {\n handler = new ViewerHTMLActionHandler(reportDocument, pageNumber, locale, timeZone, false, rtl, masterPage, format, Boolean.valueOf(svgFlag), Boolean.toString(isDesigner));\n } else {\n boolean isEmbeddable = false;\n if (IBirtConstants.SERVLET_PATH_FRAMESET.equalsIgnoreCase(servletPath) || IBirtConstants.SERVLET_PATH_RUN.equalsIgnoreCase(servletPath))\n isEmbeddable = true;\n if (renderOption instanceof IHTMLRenderOption)\n ((IHTMLRenderOption) renderOption).setEmbeddable(isEmbeddable);\n renderOption.setOption(IHTMLRenderOption.INSTANCE_ID_LIST, activeIds);\n renderOption.setOption(IHTMLRenderOption.MASTER_PAGE_CONTENT, Boolean.valueOf(masterPage));\n handler = new ViewerHTMLActionHandler(reportDocument, pageNumber, locale, timeZone, isEmbeddable, rtl, masterPage, format, Boolean.valueOf(svgFlag), Boolean.toString(isDesigner));\n IViewingSession session = ViewingSessionUtil.getSession(request);\n if (session == null) {\n throw new ReportServiceException(BirtResources.getMessage(ResourceConstants.GENERAL_ERROR_NO_VIEWING_SESSION));\n }\n handler.setViewingSessionId(session.getId());\n }\n handler.setPageOverflow(pageOverflow);\n String resourceFolder = ParameterAccessor.getParameter(request, ParameterAccessor.PARAM_RESOURCE_FOLDER);\n handler.setResourceFolder(resourceFolder);\n renderOption.setActionHandler(handler);\n if (pageNumber >= 0) {\n initializeEmitterConfigs(request, renderOption.getOptions());\n }\n String reportTitle = ParameterAccessor.htmlDecode(ParameterAccessor.getTitle(request));\n if (reportTitle != null)\n renderOption.setOption(IHTMLRenderOption.HTML_TITLE, reportTitle);\n renderTask.setRenderOption(renderOption);\n renderTask.setLocale(locale);\n com.ibm.icu.util.TimeZone tz = BirtUtility.toICUTimeZone(timeZone);\n if (tz != null) {\n renderTask.setTimeZone(tz);\n }\n return renderTask;\n}\n"
|
"public Iterator<T> iterator() {\n ArrayList<T> result = new ArrayList<T>();\n for (int i = 0; i <= maxIndex; i++) {\n result.add((T) store[i]);\n }\n return result.iterator();\n}\n"
|
"private List<Integer> getPermutation(Matrix4d transformation) {\n double rmsdThresholdSq = Math.pow(this.parameters.getRmsdThreshold(), 2);\n List<Point3d> centers = subunits.getOriginalCenters();\n List<Integer> seqClusterId = subunits.getClusterIds();\n List<Integer> permutations = new ArrayList<Integer>(centers.size());\n double[] dSqs = new double[centers.size()];\n boolean[] used = new boolean[centers.size()];\n Arrays.fill(used, false);\n for (int i = 0; i < centers.size(); i++) {\n Point3d tCenter = new Point3d(centers.get(i));\n transformation.transform(tCenter);\n int permutation = -1;\n double minDistSq = Double.MAX_VALUE;\n for (int j = 0; j < centers.size(); j++) {\n if (seqClusterId.get(i) == seqClusterId.get(j)) {\n if (!used[j]) {\n double dSq = tCenter.distanceSquared(centers.get(j));\n if (dSq < minDistSq && dSq <= rmsdThresholdSq) {\n minDistSq = dSq;\n permutation = j;\n dSqs[j] = dSq;\n }\n }\n }\n }\n if (permutations.size() == permutation) {\n permutation = -1;\n }\n if (permutation != -1) {\n used[permutation] = true;\n }\n permutations.add(permutation);\n }\n return permutations;\n}\n"
|
"public boolean isCapableNetconfDevice(Node node) {\n NetconfNode netconfAugmentation = node.getAugmentation(NetconfNode.class);\n if (netconfAugmentation == null) {\n LOG.debug(\"String_Node_Str\", node.getNodeId().getValue());\n return ret;\n }\n AvailableCapabilities capabilities = netconfAugmentation.getAvailableCapabilities();\n return capabilities != null && capabilities.getAvailableCapability().containsAll(requiredCapabilities);\n}\n"
|
"public void testJEXLExpressions() throws IOException {\n Map beans = new HashMap();\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"String_Node_Str\");\n beans.put(\"String_Node_Str\", dateFormat);\n MyBean obj = new MyBean();\n Bean bean = new Bean();\n beans.put(\"String_Node_Str\", bean);\n beans.put(\"String_Node_Str\", obj);\n beans.put(\"String_Node_Str\", ((Department) departments.get(0)).getStaff());\n beans.put(\"String_Node_Str\", new ArrayList());\n beans.put(\"String_Node_Str\", ((Department) departments.get(1)).getStaff());\n beans.put(\"String_Node_Str\", new ArrayList());\n beans.put(\"String_Node_Str\", ((Department) departments.get(2)).getStaff());\n InputStream is = new BufferedInputStream(getClass().getResourceAsStream(jexlXLS));\n XLSTransformer transformer = new XLSTransformer();\n transformer.setJexlInnerCollectionsAccess(true);\n HSSFWorkbook resultWorkbook = transformer.transformXLS(is, beans);\n is.close();\n is = new BufferedInputStream(getClass().getResourceAsStream(jexlXLS));\n POIFSFileSystem fs = new POIFSFileSystem(is);\n HSSFWorkbook sourceWorkbook = new HSSFWorkbook(fs);\n HSSFSheet sourceSheet = sourceWorkbook.getSheetAt(0);\n HSSFSheet resultSheet = resultWorkbook.getSheetAt(0);\n Map props = new HashMap();\n props.put(\"String_Node_Str\", obj.getName());\n props.put(\"String_Node_Str\", \"String_Node_Str\");\n props.put(\"String_Node_Str\", Boolean.valueOf(obj.getFlag()));\n props.put(\"String_Node_Str\", Boolean.valueOf(obj.getName() == null));\n props.put(\"String_Node_Str\", new Integer(obj.getName().length()));\n props.put(\"String_Node_Str\", Boolean.valueOf(!obj.getCollection().isEmpty() && obj.getId() > 0));\n props.put(\"String_Node_Str\", Boolean.valueOf(obj.getCollection().isEmpty() && obj.getId() == 1));\n props.put(\"String_Node_Str\", Boolean.valueOf(!obj.getCollection().isEmpty()));\n props.put(\"String_Node_Str\", Boolean.valueOf(obj.getId() > 1));\n props.put(\"String_Node_Str\", Boolean.valueOf(obj.getId() == 1));\n props.put(\"String_Node_Str\", Boolean.valueOf(obj.getId() != 1));\n props.put(\"String_Node_Str\", Boolean.valueOf(obj.getId() == 1));\n props.put(\"String_Node_Str\", new Integer(obj.getId() % 2));\n props.put(\"String_Node_Str\", obj.getMyArray()[0] + \"String_Node_Str\" + obj.getMyArray()[1]);\n props.put(\"String_Node_Str\", dateFormat.format(obj.getDate()));\n props.put(\"String_Node_Str\", obj.printIt());\n props.put(\"String_Node_Str\", obj.getName());\n props.put(\"String_Node_Str\", obj.echo(\"String_Node_Str\"));\n CellsChecker checker = new CellsChecker(props);\n checker.checkSection(sourceSheet, resultSheet, 0, 0, (short) 0, (short) 1, 25, false, false);\n props.clear();\n props.put(\"String_Node_Str\", \"String_Node_Str\");\n checker.checkListCells(sourceSheet, 25, resultSheet, 25, (short) 1, new String[] { ((Bean.InnerBean) bean.getCollection().get(0)).getInnerCollection().get(0).toString(), ((Bean.InnerBean) bean.getCollection().get(1)).getInnerCollection().get(0).toString(), ((Bean.InnerBean) bean.getCollection().get(2)).getInnerCollection().get(0).toString() });\n saveWorkbook(resultWorkbook, jexlDestXLS);\n}\n"
|
"public int compare(TransactionSummary p1, TransactionSummary p2) {\n if (p2 == null) {\n return -1;\n } else if (p1 == null) {\n return 1;\n } else {\n return (int) (p2.time - p1.time);\n }\n}\n"
|
"public double distance(Instance first, Instance second) {\n double sum_nominal = 0.0;\n double sum_continuous = 0.0;\n for (int i = 0; i < first.numAttributes(); i++) {\n if (first.attribute(i).isNominal()) {\n if (!first.attribute(i).equals(second.attribute(i)))\n sum_nominal += 1.0;\n } else if (first.attribute(i).isNumeric()) {\n sum_continuous += distance(first, second, Double.POSITIVE_INFINITY) * distance(first, second, Double.POSITIVE_INFINITY);\n }\n }\n return Math.sqrt(sum_continuous) + m_Gamma * sum_nominal;\n}\n"
|
"public void onTimePassed(TimerHandler pTimerHandler) {\n currentEarthDuration++;\n if (currentEarthDuration >= EarthQuakeDuration) {\n base.sm.GameScreen.unregisterUpdateHandler(pTimerHandler);\n currentEarthDuration = 0;\n base.getCamera().setCenter(base.getCameraWidth() / 2, base.getCameraHeight() / 2);\n base.backgroundSprite1.setPosition(0.0f, 0.0f + (base.getCameraHeight() - base.getParallaxLayerBack().getHeight()));\n base.backgroundSprite2.setPosition(0.0f, 0.0f + 80);\n base.backgroundSprite3.setPosition(0.0f + 35, 0.0f + 62);\n base.mEarthQuaking = false;\n } else {\n if (currentEarthDuration % 6 == 0 || currentEarthDuration == 1) {\n if ((base.mana - 500) >= 0) {\n base.mana -= 500;\n base.CustomHUD.updateManaValue();\n float theX = MathUtils.random(-10.0f, 10.0f);\n float theY = MathUtils.random(-10.0f, 10.0f);\n base.sCamera.offsetCenter(theX, theY);\n base.backgroundSprite1.setPosition(base.backgroundSprite1.getX() - theX, base.backgroundSprite1.getY() - theY);\n base.backgroundSprite2.setPosition(base.backgroundSprite2.getX() - theX, base.backgroundSprite2.getY() - theY);\n base.backgroundSprite3.setPosition(base.backgroundSprite3.getX() - theX, base.backgroundSprite3.getY() - theY);\n base.mEarthQuaking = true;\n } else {\n base.mEarthQuaking = false;\n currentEarthDuration = EarthQuakeDuration;\n }\n } else {\n float theX = MathUtils.random(-10.0f, 10.0f);\n float theY = MathUtils.random(-10.0f, 10.0f);\n base.sCamera.offsetCenter(theX, theY);\n base.backgroundSprite1.setPosition(base.backgroundSprite1.getX() - theX, base.backgroundSprite1.getY() - theY);\n base.backgroundSprite2.setPosition(base.backgroundSprite2.getX() - theX, base.backgroundSprite2.getY() - theY);\n base.backgroundSprite3.setPosition(base.backgroundSprite3.getX() - theX, base.backgroundSprite3.getY() - theY);\n base.mEarthQuaking = false;\n }\n pTimerHandler.reset();\n }\n}\n"
|
"public ContactIcqImpl findContactByScreenName(String screenName) {\n Iterator<ContactGroup> contactGroups = rootGroup.subgroups();\n ContactIcqImpl result = null;\n while (contactGroups.hasNext()) {\n ContactGroupIcqImpl contactGroup = contactGroups.next();\n result = contactGroup.findContact(screenName);\n if (result != null)\n return result;\n }\n return null;\n}\n"
|
"private static Object convertCollectionToClojureTypes(Collection<?> val, Object empty) {\n Object ret = Transient.invoke(empty);\n for (Object o : val) ret = ConjBang.invoke(ret, javaToClojure(o));\n return Persistent.invoke(ret);\n}\n"
|
"public StructuredStore getLazyStore(String indexConfigPath, String indexName, String sourcePath, Templates preFilter, boolean removeDoctypeDecl) throws IOException {\n boolean useLazy = true;\n if (indexConfigPath == null || indexName == null)\n return null;\n if (sourcePath.startsWith(\"String_Node_Str\"))\n return null;\n if (sourcePath.startsWith(\"String_Node_Str\"))\n return null;\n File sourceFile = new File(sourcePath);\n if (!sourceFile.isFile())\n return null;\n File lazyFile = IndexUtil.calcLazyPath(new File(servlet.getRealPath(\"String_Node_Str\")), new File(indexConfigPath), indexName, new File(sourcePath), false);\n if (!lazyFile.canRead())\n buildLazyStore(lazyFile, sourcePath, preFilter, removeDoctypeDecl);\n return StructuredFile.open(lazyFile);\n}\n"
|
"public void run() {\n synchronized (this) {\n try {\n long shutDownTimeout = SHUTDOWN_TIMEOUT_DEFAULT;\n try {\n String shutdownCustomValue = System.getProperty(SHUTDOWN_TIMEOUT_PROP);\n if (shutdownCustomValue != null && shutdownCustomValue.length() > 0) {\n long custom = Long.valueOf(shutdownCustomValue);\n if (custom > 0)\n shutDownTimeout = custom;\n }\n } catch (Throwable t) {\n }\n if (logger.isTraceEnabled())\n logger.trace(\"String_Node_Str\" + shutDownTimeout + \"String_Node_Str\");\n wait(shutDownTimeout);\n logger.error(\"String_Node_Str\");\n Runtime.getRuntime().halt(SYSTEM_EXIT_CODE);\n } catch (InterruptedException ex) {\n if (logger.isDebugEnabled())\n logger.debug(\"String_Node_Str\");\n }\n }\n}\n"
|
"public static void main(String[] args) {\n Gpio led = new Gpio(4);\n Aio lightSensor = new Aio(0);\n led.dir(Dir.DIR_OUT);\n int on = 0;\n long lightValue = 0;\n String command = \"String_Node_Str\";\n Socket clientSocket = null;\n BufferedReader in = null;\n try {\n clientSocket = new Socket(args[0], Integer.parseInt(args[1]));\n } catch (Exception e) {\n }\n try {\n in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));\n } catch (Exception e) {\n }\n while (true) {\n lightValue = lightSensor.read();\n try {\n command = in.readLine().trim().toLowerCase();\n } catch (Exception e) {\n }\n if (command.equals(\"String_Node_Str\"))\n on = 1;\n else if (command.equals(\"String_Node_Str\"))\n on = -1;\n else if (command.equals(\"String_Node_Str\"))\n on = 0;\n if (lightValue < 200 && on != -1) {\n led.write(1);\n } else if (on != 1) {\n led.write(0);\n }\n wait1Msec(10);\n }\n}\n"
|
"public static File patchHiveClasses(File sourceJar, File targetJar) throws IOException {\n try (JarFile input = new JarFile(sourceJar)) {\n boolean needPatch = false;\n for (String classFile : HIVE_CLASS_FILES_TO_PATCH.keySet()) {\n needPatch = needPatch || (input.getEntry(classFile) != null);\n }\n if (!needPatch) {\n return sourceJar;\n }\n try (JarOutputStream output = new JarOutputStream(new FileOutputStream(targetJar))) {\n Enumeration<JarEntry> sourceEntries = input.entries();\n while (sourceEntries.hasMoreElements()) {\n JarEntry entry = sourceEntries.nextElement();\n output.putNextEntry(new JarEntry(entry.getName()));\n try (InputStream entryInputStream = input.getInputStream(entry)) {\n Set<String> patchMethods = HIVE_CLASS_FILES_TO_PATCH.get(entry.getName());\n if (patchMethods == null) {\n ByteStreams.copy(entryInputStream, output);\n continue;\n }\n output.write(Classes.rewriteMethodToNoop(entry.getName(), entryInputStream, patchMethods));\n }\n }\n }\n return targetJar;\n }\n}\n"
|
"public void run() {\n try {\n Thread.sleep(delay);\n HttpServletRequest hreq = (HttpServletRequest) ctx.getRequest();\n HttpServletResponse hresp = (HttpServletResponse) ctx.getResponse();\n RequestDispatcher rd;\n switch(type) {\n case TEXT:\n LOGGER.fine(\"String_Node_Str\");\n StringBuilder txt = new StringBuilder(128);\n txt.append(\"String_Node_Str\" + portletName + \"String_Node_Str\");\n txt.append(\"String_Node_Str\").append(hreq.getDispatcherType().toString());\n txt.append(\"String_Node_Str\");\n hresp.getWriter().write(txt.toString());\n if (done) {\n ctx.complete();\n }\n break;\n case AUTO:\n LOGGER.fine(\"String_Node_Str\");\n hreq.setAttribute(ATTRIB_AUTO, new Boolean(true));\n ctx.dispatch();\n break;\n case DISPATCH:\n LOGGER.fine(\"String_Node_Str\");\n hreq.setAttribute(ATTRIB_TITLE, \"String_Node_Str\");\n ctx.dispatch(JSP);\n break;\n case FWD:\n LOGGER.fine(\"String_Node_Str\");\n hreq.setAttribute(ATTRIB_TITLE, \"String_Node_Str\");\n rd = hreq.getRequestDispatcher(JSP);\n rd.forward(hreq, hresp);\n if (done) {\n ctx.complete();\n }\n break;\n case INC:\n LOGGER.fine(\"String_Node_Str\");\n hreq.setAttribute(ATTRIB_TITLE, \"String_Node_Str\");\n rd = hreq.getRequestDispatcher(JSP);\n rd.include(hreq, hresp);\n if (done) {\n ctx.complete();\n }\n break;\n }\n } catch (Exception e) {\n LOGGER.warning(\"String_Node_Str\" + e.toString());\n }\n}\n"
|
"private void unsetJavaBreakpointUpdater() {\n try {\n ISourceViewer viewer = getSourceViewer();\n if (viewer != null) {\n IAnnotationModel model = viewer.getAnnotationModel();\n if (model instanceof AbstractMarkerAnnotationModel) {\n if (ReflectionUtils.getPrivateField(AbstractMarkerAnnotationModel.class, \"String_Node_Str\", model) == null) {\n ReflectionUtils.executeNoArgPrivateMethod(AbstractMarkerAnnotationModel.class, \"String_Node_Str\", model);\n }\n List<IConfigurationElement> updaterSpecs = (List<IConfigurationElement>) ReflectionUtils.getPrivateField(AbstractMarkerAnnotationModel.class, \"String_Node_Str\", model);\n for (Iterator<IConfigurationElement> specIter = updaterSpecs.iterator(); specIter.hasNext(); ) {\n IConfigurationElement spec = specIter.next();\n if (spec.getAttribute(\"String_Node_Str\").equals(BreakpointMarkerUpdater.class.getCanonicalName())) {\n specIter.remove();\n break;\n }\n }\n }\n }\n } catch (Exception e) {\n GroovyPlugin.getDefault().logError(\"String_Node_Str\", e);\n }\n}\n"
|
"public void setUp() {\n owner = ownerCurator.create(new Owner(OWNER_NAME));\n Role ownerAdminRole = createAdminRole(owner);\n roleCurator.create(ownerAdminRole);\n User user = new User(\"String_Node_Str\", \"String_Node_Str\");\n principal = new UserPrincipal(\"String_Node_Str\", new ArrayList<Permission>(permFactory.createPermissions(user, ownerAdminRole.getPermissions())), false);\n setupPrincipal(principal);\n ConsumerType ueberCertType = new ConsumerType(ConsumerTypeEnum.UEBER_CERT);\n consumerTypeCurator.create(ueberCertType);\n or = new OwnerResource(ownerCurator, null, consumerCurator, null, i18n, null, null, null, null, null, poolManager, null, null, null, null, consumerTypeCurator, entCertCurator, entitlementCurator, ueberCertGenerator, null, null, contentOverrideValidator, serviceLevelValidator, null, null, null, null, null);\n}\n"
|
"synchronized void _zoom(int x, int y) {\n Graphics graphics = getGraphics();\n boolean handled = false;\n if ((_zoomin == true) && (_drawn == true)) {\n if (_zoomxn != -1 || _zoomyn != -1) {\n int minx = Math.min(_zoomx, _zoomxn);\n int maxx = Math.max(_zoomx, _zoomxn);\n int miny = Math.min(_zoomy, _zoomyn);\n int maxy = Math.max(_zoomy, _zoomyn);\n graphics.setXORMode(_boxColor);\n graphics.drawRect(minx, miny, maxx - minx, maxy - miny);\n graphics.setPaintMode();\n if (y > _lry)\n y = _lry;\n if (y < _uly)\n y = _uly;\n if (x > _lrx)\n x = _lrx;\n if (x < _ulx)\n x = _ulx;\n if ((Math.abs(_zoomx - x) > 5) && (Math.abs(_zoomy - y) > 5)) {\n double a = _xMin + (_zoomx - _ulx) / _xscale;\n double b = _xMin + (x - _ulx) / _xscale;\n if (a < b)\n _setXRange(a, b);\n else\n _setXRange(b, a);\n a = _yMax - (_zoomy - _uly) / _yscale;\n b = _yMax - (y - _uly) / _yscale;\n if (a < b)\n _setYRange(a, b);\n else\n _setYRange(b, a);\n }\n repaint();\n handled = true;\n }\n } else if ((_zoomout == true) && (_drawn == true)) {\n graphics.setXORMode(_background);\n int x_diff = Math.abs(_zoomx - _zoomxn);\n int y_diff = Math.abs(_zoomy - _zoomyn);\n graphics.drawRect(_zoomx - 15 - x_diff, _zoomy - 15 - y_diff, 30 + x_diff * 2, 30 + y_diff * 2);\n graphics.setPaintMode();\n double a = (double) (Math.abs(_zoomx - x)) / 30.0;\n double b = (double) (Math.abs(_zoomy - y)) / 30.0;\n double newx1 = _xMax + (_xMax - _xMin) * a;\n double newx2 = _xMin - (_xMax - _xMin) * a;\n double newy1 = _yMax + (_yMax - _yMin) * b;\n double newy2 = _yMin - (_yMax - _yMin) * b;\n zoom(newx2, newy2, newx1, newy1);\n handled = true;\n } else if (_drawn == false) {\n repaint();\n handled = true;\n }\n _drawn = false;\n _zoomin = _zoomout = false;\n _zoomxn = _zoomyn = _zoomx = _zoomy = -1;\n}\n"
|
"public void run() {\n refreshOnce(true);\n}\n"
|
"private void call(final UDPCallback callback, final Object... args) {\n loop.callbackHandler.handleUDPCallback(callback, args);\n}\n"
|
"protected String performAdd(PlatformBroker platformBroker) {\n SchemaCatalog catalog = platformBroker.getCatalog();\n String addURI = getOptions().getAddOrUpdateURI();\n if (addURI == null)\n throw new IllegalArgumentException(\"String_Node_Str\");\n String tableName = getOptions().getTableName();\n String stereotypeName = getOptions().getStereotypeName();\n Protocol protocol = Protocol.getProtocol(getOptions().getProtocolName());\n Format format = Format.getFormat(getOptions().getFormatName());\n String schemaName = getOptions().getSchemaName();\n return catalog.createTableDefFor(schemaName, tableName, addURI, stereotypeName, protocol, format);\n}\n"
|
"public List<Parameter<?>> getParameters() {\n return Parameter.forConstructor(errorHandler, constructor);\n}\n"
|
"public boolean addMapping(SchemaMappingTO mapping) {\n if (this.mappings == null)\n this.mappings = new ArrayList<SchemaMappingTO>();\n }\n return this.mappings.add(mapping);\n}\n"
|
"protected void evaluateTextField() {\n super.evaluateTextField();\n boolean isValid = true;\n String text = filenameText.getText();\n if (text != null && !text.isEmpty()) {\n File file = new File(text);\n if (!file.exists()) {\n try {\n url = new URL(text);\n InputStream is = url.openStream();\n if (is == null) {\n url = null;\n }\n if (is != null) {\n is.close();\n }\n } catch (Exception e) {\n url = null;\n }\n } else {\n try {\n url = file.toURI().toURL();\n } catch (MalformedURLException e) {\n url = null;\n }\n }\n if (url == null) {\n nameStatus = createStatus(IStatus.ERROR, \"String_Node_Str\" + text + \"String_Node_Str\");\n isValid = false;\n }\n updatePageStatus();\n }\n if (isValid && !Pattern.matches(RepositoryConstants.getPattern(ERepositoryObjectType.PROCESS), nameText.getText()) || nameText.getText().trim().contains(\"String_Node_Str\")) {\n nameStatus = createStatus(IStatus.ERROR, \"String_Node_Str\");\n updatePageStatus();\n }\n}\n"
|
"public boolean equals(Object obj) {\n boolean isEqual = true;\n if (this == obj) {\n isEqual = true;\n } else if (obj == null || getClass() != obj.getClass()) {\n isEqual = false;\n } else {\n final MatchEngineDescriptor other = (MatchEngineDescriptor) obj;\n if (engineClassName == null && other.engineClassName != null) {\n isEqual = false;\n } else if (engineClassName != null && !engineClassName.equals(other.engineClassName)) {\n isEqual = false;\n } else if (fileExtension == null && other.fileExtension != null) {\n isEqual = false;\n } else if (!fileExtension.equals(other.fileExtension)) {\n isEqual = false;\n } else if (priority == null && other.priority != null) {\n isEqual = false;\n } else if (!priority.equals(other.priority)) {\n isEqual = false;\n }\n }\n return isEqual;\n}\n"
|
"public void populateInputs(String line, boolean lenient) throws CommandLineParserException {\n UIWizard command = getSourceCommand();\n try {\n fullCommandLineParser = populate(command, command, line, true);\n if (!lenient) {\n fullCommandLineParser.parse(line, false);\n }\n } catch (CommandLineParserException cpe) {\n throw cpe;\n } catch (Exception e) {\n throw new IllegalStateException(e);\n }\n}\n"
|
"public MediaType getMediaType() {\n return Constants.APPLICATION_XML;\n}\n"
|
"private String getFormattedAdvCfgText(Properties config) {\n String advCfg = \"String_Node_Str\";\n String filterReloadURL = config.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n StringTokenizer urlTokens = new StringTokenizer(filterReloadURL, \"String_Node_Str\");\n int urlCnt = urlTokens.countTokens();\n for (int i = 0; i < urlCnt; i++) {\n String url = urlTokens.nextToken().trim();\n advCfg = advCfg + \"String_Node_Str\" + url;\n if (i + 1 < urlCnt)\n advCfg = advCfg + \"String_Node_Str\";\n else\n advCfg = advCfg + \"String_Node_Str\";\n }\n advCfg = advCfg + \"String_Node_Str\" + config.getProperty(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\";\n return advCfg;\n}\n"
|
"public void testPerformance() {\n final Context targetContext = getContext();\n MockContentResolver resolver = new MockContentResolver();\n MockContext context = new MockContext() {\n public Resources getResources() {\n return targetContext.getResources();\n }\n };\n RenamingDelegatingContext targetContextWrapper = new RenamingDelegatingContext(context, targetContext, \"String_Node_Str\");\n targetContextWrapper.makeExistingFilesAndDbsAccessible();\n IsolatedContext providerContext = new IsolatedContext(resolver, targetContextWrapper);\n SynchronousContactsProvider2 provider = new SynchronousContactsProvider2();\n provider.setDataWipeEnabled(false);\n provider.attachInfo(providerContext, null);\n resolver.addProvider(ContactsContract.AUTHORITY, provider);\n long rawContactCount = provider.getRawContactCount();\n if (rawContactCount == 0) {\n Log.w(TAG, \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n return;\n }\n provider.prepareForFullAggregation(500);\n rawContactCount = provider.getRawContactCount();\n long start = System.currentTimeMillis();\n if (TRACE) {\n Debug.startMethodTracing(\"String_Node_Str\");\n }\n scheduler.trigger();\n if (TRACE) {\n Debug.stopMethodTracing();\n }\n long end = System.currentTimeMillis();\n long contactCount = provider.getContactCount();\n Log.i(TAG, String.format(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", end - start, rawContactCount, contactCount, ((double) (end - start) / rawContactCount)));\n}\n"
|
"public JsonValue apply(Representation representation) throws AuditException {\n try {\n return extractValues((Map<String, Object>) (new JacksonRepresentation(representation).getObject()));\n } catch (IOException e) {\n throw new AuditException(\"String_Node_Str\", e);\n }\n}\n"
|
"public void testGetOperator() {\n Assert.assertTrue(operators.length == 19);\n for (SqlPredicate equalOp : operators) {\n CwmZExpression<?> exp = new CwmZExpression<Integer>(equalOp);\n String operator = exp.getOperator();\n Assert.assertEquals(equalOp.getLiteral(), operator);\n }\n}\n"
|
"void placeEndCrystalEvent(PlayerInteractEvent e) {\n Player p = e.getPlayer();\n if (DEBUG) {\n plugin.getLogger().info(\"String_Node_Str\" + \"String_Node_Str\" + e.getEventName());\n }\n if (!IslandGuard.inWorld(p)) {\n return;\n }\n if (p.isOp() || VaultHelper.checkPerm(p, Settings.PERMPREFIX + \"String_Node_Str\")) {\n return;\n }\n ItemStack inHand = e.getPlayer().getItemInHand();\n if (inHand != null && inHand.getType().equals(Material.END_CRYSTAL)) {\n Island island = plugin.getGrid().getIslandAt(e.getPlayer().getLocation());\n if (island == null && Settings.defaultWorldSettings.get(SettingsFlag.PLACE_BLOCKS)) {\n return;\n }\n if (island != null && (island.getMembers().contains(p.getUniqueId()) || island.getIgsFlag(SettingsFlag.PLACE_BLOCKS))) {\n if (Settings.limitedBlocks.containsKey(\"String_Node_Str\") && Settings.limitedBlocks.get(\"String_Node_Str\") > -1) {\n int count = island.getTileEntityCount(Material.END_CRYSTAL, e.getPlayer().getWorld());\n if (Settings.limitedBlocks.get(\"String_Node_Str\") <= count) {\n Util.sendMessage(e.getPlayer(), ChatColor.RED + (plugin.myLocale(e.getPlayer().getUniqueId()).entityLimitReached.replace(\"String_Node_Str\", Util.prettifyText(Material.END_CRYSTAL.toString()))).replace(\"String_Node_Str\", String.valueOf(Settings.limitedBlocks.get(\"String_Node_Str\"))));\n e.setCancelled(true);\n return;\n }\n }\n return;\n }\n e.setCancelled(true);\n Util.sendMessage(e.getPlayer(), ChatColor.RED + plugin.myLocale(e.getPlayer().getUniqueId()).islandProtected);\n e.getPlayer().updateInventory();\n }\n}\n"
|
"public boolean execute(Plugin plugin, CommandSender sender, String[] args) throws SMSException {\n ScrollingMenuSign smsPlugin = (ScrollingMenuSign) plugin;\n SMSView view = null;\n SMSMenu menu = SMSMenu.getMenu(args[0]);\n String viewName = getStringOption(\"String_Node_Str\");\n Location loc = hasOption(\"String_Node_Str\") ? MiscUtil.parseLocation(getStringOption(\"String_Node_Str\")) : null;\n if (hasOption(\"String_Node_Str\")) {\n if (smsPlugin.isSpoutEnabled())\n view = SMSSpoutView.addSpoutViewToMenu(viewName, menu, sender);\n else\n throw new SMSException(\"String_Node_Str\");\n } else if (hasOption(\"String_Node_Str\")) {\n if (loc == null) {\n interactiveCreation(sender, viewName, menu, \"String_Node_Str\");\n return true;\n } else {\n view = SMSSignView.addSignToMenu(viewName, menu, loc);\n }\n } else if (hasOption(\"String_Node_Str\")) {\n if (loc == null) {\n interactiveCreation(sender, viewName, menu, \"String_Node_Str\");\n return true;\n } else {\n view = SMSRedstoneView.addRedstoneViewToMenu(viewName, menu, loc);\n }\n } else if (hasOption(\"String_Node_Str\") || hasOption(\"String_Node_Str\")) {\n view = SMSInventoryView.addInventoryViewToMenu(viewName, menu);\n } else if (hasOption(\"String_Node_Str\") && loc != null) {\n view = SMSMultiSignView.addSignToMenu(viewName, menu, loc);\n } else if (hasOption(\"String_Node_Str\")) {\n try {\n short mapId = (short) getIntOption(\"String_Node_Str\");\n view = SMSMapView.addMapToMenu(viewName, menu, mapId);\n } catch (NumberFormatException e) {\n throw new SMSException(e.getMessage());\n }\n } else if (args.length > 1) {\n throw new SMSException(\"String_Node_Str\" + args[1]);\n }\n if (view == null) {\n notFromConsole(sender);\n Player player = (Player) sender;\n if (player.getItemInHand().getType() == Material.MAP) {\n PermissionUtils.requirePerms(sender, \"String_Node_Str\");\n short mapId = player.getItemInHand().getDurability();\n view = SMSMapView.addMapToMenu(viewName, menu, mapId);\n ((SMSMapView) view).setMapItemName(player.getItemInHand());\n } else {\n try {\n Block b = player.getTargetBlock(null, ScrollingMenuSign.BLOCK_TARGET_DIST);\n if (hasOption(\"String_Node_Str\") && b.getType() == Material.WALL_SIGN) {\n view = SMSMultiSignView.addSignToMenu(viewName, menu, b.getLocation());\n } else if (b.getType() == Material.WALL_SIGN || b.getType() == Material.SIGN_POST) {\n view = SMSSignView.addSignToMenu(viewName, menu, b.getLocation());\n }\n } catch (IllegalStateException e) {\n }\n }\n }\n if (view != null) {\n MiscUtil.statusMessage(sender, String.format(\"String_Node_Str\", view.getType(), view.getName(), menu.getName()));\n } else {\n throw new SMSException(\"String_Node_Str\");\n }\n return true;\n}\n"
|
"public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n gl.glEnable(GL10.GL_TEXTURE_2D);\n gl.glShadeModel(GL10.GL_SMOOTH);\n gl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f);\n gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);\n gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);\n gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);\n gl.glTexEnvx(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE, GL10.GL_MODULATE);\n gl.glEnable(GL10.GL_BLEND);\n gl.glBlendFunc(GL10.GL_ONE, GL10.GL_ONE_MINUS_SRC_ALPHA);\n {\n Log.v(\"String_Node_Str\", \"String_Node_Str\" + gl.glGetString(GL10.GL_VERSION));\n Log.v(\"String_Node_Str\", \"String_Node_Str\");\n String extensions = gl.glGetString(GL10.GL_EXTENSIONS);\n for (String extension : extensions.split(\"String_Node_Str\")) {\n Log.v(\"String_Node_Str\", \"String_Node_Str\" + extension);\n }\n Log.v(\"String_Node_Str\", \"String_Node_Str\" + gl.glGetString(GL10.GL_RENDERER));\n }\n Resources resources = mContext.getResources();\n Map<Integer, Bitmap> bitmaps = new HashMap<Integer, Bitmap>();\n for (int resourceID : RESOURCES_TO_LOAD) {\n bitmaps.put(resourceID, loadBitmap(resourceID));\n }\n mPlayerEntityPainters = new HashMap<Player, Painter[]>();\n for (int player = 0; player < Game.NUM_PLAYERS; player++) {\n Painter[] painters = new Painter[Entity.TYPES.length];\n switch(player) {\n case 0:\n painters[Entity.FIGHTER] = Painter.CreateMinSize(gl, mVBOSupport, bitmaps.get(R.drawable.ohblue), Fighter.DIAMETER);\n painters[Entity.BOMBER] = Painter.CreateMinSize(gl, mVBOSupport, bitmaps.get(R.drawable.ohblue), Bomber.DIAMETER);\n painters[Entity.FRIGATE] = Painter.CreateMinSize(gl, mVBOSupport, bitmaps.get(R.drawable.ohblue), Frigate.DIAMETER);\n painters[Entity.FACTORY] = Painter.CreateMinSize(gl, mVBOSupport, bitmaps.get(R.drawable.ohblue), Factory.DIAMETER);\n painters[Entity.LASER] = Painter.CreateMinSize(gl, mVBOSupport, bitmaps.get(R.drawable.ohblue), Laser.DIAMETER);\n painters[Entity.BOMB] = Painter.CreateMinSize(gl, mVBOSupport, bitmaps.get(R.drawable.ohblue), Bomb.DIAMETER);\n painters[Entity.MISSILE] = Painter.CreateMinSize(gl, mVBOSupport, bitmaps.get(R.drawable.ohblue), Missile.DIAMETER);\n break;\n case 1:\n default:\n painters[Entity.FIGHTER] = Painter.CreateMinSize(gl, mVBOSupport, bitmaps.get(R.drawable.ohred), Fighter.DIAMETER);\n painters[Entity.BOMBER] = Painter.CreateMinSize(gl, mVBOSupport, bitmaps.get(R.drawable.ohred), Bomber.DIAMETER);\n painters[Entity.FRIGATE] = Painter.CreateMinSize(gl, mVBOSupport, bitmaps.get(R.drawable.ohred), Frigate.DIAMETER);\n painters[Entity.FACTORY] = Painter.CreateMinSize(gl, mVBOSupport, bitmaps.get(R.drawable.ohred), Factory.DIAMETER);\n painters[Entity.LASER] = Painter.CreateMinSize(gl, mVBOSupport, bitmaps.get(R.drawable.ohred), Laser.DIAMETER);\n painters[Entity.BOMB] = Painter.CreateMinSize(gl, mVBOSupport, bitmaps.get(R.drawable.ohred), Bomb.DIAMETER);\n painters[Entity.MISSILE] = Painter.CreateMinSize(gl, mVBOSupport, bitmaps.get(R.drawable.ohred), Missile.DIAMETER);\n break;\n }\n mPlayerEntityPainters.put(mGame.mPlayers[player], painters);\n }\n mHighlight = Painter.Create(gl, mVBOSupport, bitmaps.get(R.drawable.white20));\n for (Bitmap bitmap : bitmaps.values()) {\n bitmap.recycle();\n }\n mBackgroundPainter = null;\n}\n"
|
"public void testEventConstructors() {\n JniTracefile testTracefile = null;\n JniEvent testEvent1 = null;\n JniEvent testEvent2 = null;\n try {\n testTracefile = JniTraceFactory.getJniTrace(tracepath, null, printLttDebug).requestTracefileByName(eventName);\n } catch (JniException e) {\n }\n try {\n testTracefile.allocateNewJniEvent(testTracefile.getCurrentEvent().getEventPtr(), null, testTracefile);\n fail(\"String_Node_Str\");\n } catch (JniException e) {\n }\n try {\n testEvent1 = testTracefile.allocateNewJniEvent(testTracefile.getCurrentEvent().getEventPtr(), testTracefile.getTracefileMarkersMap(), null);\n fail(\"String_Node_Str\");\n } catch (JniException e) {\n }\n try {\n testEvent1 = testTracefile.allocateNewJniEvent(testTracefile.getCurrentEvent().getEventPtr(), testTracefile.getTracefileMarkersMap(), testTracefile);\n } catch (JniException e) {\n fail(\"String_Node_Str\");\n }\n}\n"
|
"public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {\n Set<String> resolvedPackagesToScan = resolvePackagesToScan(packagesToScan);\n if (!CollectionUtils.isEmpty(resolvedPackagesToScan)) {\n registerServiceBeans(resolvedPackagesToScan, registry);\n } else {\n if (logger.isWarnEnabled()) {\n logger.warn(\"String_Node_Str\");\n }\n }\n}\n"
|
"private void printResults(List<List<DirichletCluster<Vector>>> clusters, int significant) {\n int row = 0;\n for (List<DirichletCluster<Vector>> r : clusters) {\n System.out.print(\"String_Node_Str\" + row++ + \"String_Node_Str\");\n for (int k = 0; k < r.size(); k++) {\n Model<Vector> model = r.get(k).model;\n if (model.count() > significant) {\n int total = (int) r.get(k).totalCount;\n System.out.print(\"String_Node_Str\" + k + '(' + total + ')' + model.toString() + \"String_Node_Str\");\n }\n }\n System.out.println();\n }\n System.out.println();\n}\n"
|
"public void testTrustedListSetAndGet() {\n String test = \"String_Node_Str\";\n assertTrue(RouterServiceValidator.setTrustedList(mContext, test));\n String retVal = RouterServiceValidator.getTrustedList(mContext);\n assertNotNull(retVal);\n assertTrue(test.equals(retVal));\n retVal = null;\n StringBuilder builder = new StringBuilder();\n for (int i = 0; i < 1000; i++) {\n builder.append(TEST);\n }\n assertTrue(RouterServiceValidator.setTrustedList(mContext, builder.toString()));\n retVal = RouterServiceValidator.getTrustedList(mContext);\n assertNotNull(retVal);\n assertTrue(builder.toString().equals(retVal));\n}\n"
|
"public static IProblem createIncompatibleTypeProblem(IComponentNamePO cN, ProblemType type) {\n if (type.equals(ProblemType.REASON_INCOMPATIBLE_MAP_TYPE)) {\n return new Problem(NLS.bind(Messages.ProblemIncompatibleMapTypeMarkerText, cN.getName()), new Status(IStatus.ERROR, Activator.PLUGIN_ID, NLS.bind(Messages.ProblemIncompatibleMapTypeMarkerText, cN.getName())), cN, type);\n }\n return new Problem(NLS.bind(Messages.ProblemIncompatibleUsageTypeMarkerText, cN.getName()), new Status(IStatus.ERROR, Activator.PLUGIN_ID, NLS.bind(Messages.ProblemIncompatibleUsageTypeMarkerText, cN.getName())), cN.getName(), type);\n}\n"
|
"public double[] getQuality(Random rand, double[] ids) {\n double[] res = new double[ids.length];\n double log2 = Math.log(2);\n double dist;\n int r;\n int max = ((DistanceDiversityEmbedding) this.embedding).getMax();\n double exp = ((DistanceDiversityEmbedding) this.embedding).getExponent();\n for (int i = 0; i < res.length; i++) {\n Vector<Integer> numb = new Vector<Integer>(this.knownIDs.length);\n for (int j = 0; j < this.knownIDs.length; j++) {\n if (ids[i] != this.knownIDs[j]) {\n dist = this.embedding.computeDistance(ids[i], this.knownIDs[j]);\n } else {\n dist = this.embedding.computeDistance(ids[i], ids[(i + 1) % 2]);\n }\n r = (int) (Math.min(Math.ceil(-Math.log(Math.abs(dist)) / log2), max) * Math.signum(dist));\n if (!numb.contains(r)) {\n numb.add(r);\n }\n if (this.embedding.getDistance() == Distance.SIGNED && numb.size() == 2 * (max - 1)) {\n break;\n }\n if (this.embedding.getDistance() == Distance.RING && numb.size() == (max - 1)) {\n break;\n }\n if (this.embedding.getDistance() == Distance.CLOCKWISE && numb.size() == max) {\n break;\n }\n }\n for (int j = 0; j < numb.size(); j++) {\n for (int k = j + 1; k < numb.size(); k++) {\n res[i] = res[i] + Math.pow(Math.abs(numb.get(j) - numb.get(k)), exp);\n }\n }\n }\n return res;\n}\n"
|
"private int checkServerErrors(HttpResponseEntity res) throws ArangoException {\n int statusCode = res.getStatusCode();\n if (statusCode >= 400) {\n DefaultEntity defaultEntity = new DefaultEntity();\n if (res.getText() != null && !\"String_Node_Str\".equals(res.getText()) && statusCode != 500) {\n JsonParser jsonParser = new JsonParser();\n JsonElement jsonElement = jsonParser.parse(res.getText());\n JsonObject jsonObject = jsonElement.getAsJsonObject();\n JsonElement errorMessage = jsonObject.get(\"String_Node_Str\");\n defaultEntity.setErrorMessage(errorMessage.getAsString());\n JsonElement errorNumber = jsonObject.get(\"String_Node_Str\");\n defaultEntity.setErrorNumber(errorNumber.getAsInt());\n } else {\n String statusPhrase = \"String_Node_Str\";\n switch(statusCode) {\n case 400:\n statusPhrase = \"String_Node_Str\";\n break;\n case 401:\n statusPhrase = \"String_Node_Str\";\n break;\n case 403:\n statusPhrase = \"String_Node_Str\";\n break;\n case 404:\n statusPhrase = \"String_Node_Str\";\n break;\n case 405:\n statusPhrase = \"String_Node_Str\";\n break;\n case 406:\n statusPhrase = \"String_Node_Str\";\n break;\n case 407:\n statusPhrase = \"String_Node_Str\";\n break;\n case 408:\n statusPhrase = \"String_Node_Str\";\n break;\n case 409:\n statusPhrase = \"String_Node_Str\";\n break;\n case 500:\n statusPhrase = \"String_Node_Str\";\n break;\n default:\n statusPhrase = \"String_Node_Str\";\n break;\n }\n defaultEntity.setErrorMessage(statusPhrase);\n if (statusCode == 500) {\n defaultEntity.setErrorMessage(statusPhrase + \"String_Node_Str\" + res.getText());\n }\n }\n defaultEntity.setCode(statusCode);\n defaultEntity.setStatusCode(statusCode);\n defaultEntity.setError(true);\n ArangoException arangoException = new ArangoException(defaultEntity);\n arangoException.setCode(statusCode);\n throw arangoException;\n }\n return statusCode;\n}\n"
|
"public void testValidateRequestNewAuthenticateInvalidCredentialFailure() throws Exception {\n IdentityStoreHandler mish = new MyIdentityStoreHandler();\n withMessageContext(ap).withNewAuthenticate(coCred);\n withIDSBeanInstance(ids, false, false).withIDSHandlerBeanInstance(mish);\n withJaspicSessionEnabled(false);\n AuthenticationStatus status = cfam.validateRequest(request, res, hmc);\n assertEquals(\"String_Node_Str\", AuthenticationStatus.SEND_FAILURE, status);\n}\n"
|
"public void prepareForTrack() {\n reset();\n if (isConnected() && hasCurrent()) {\n mRemoteMediaPlayer.stop(mApiClient);\n }\n mState = STATE_BUFFERING;\n notifyOnPlaybackStatusChanged(mState);\n}\n"
|
"private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {\n optimizeWrites();\n in.defaultReadObject();\n String v11nName = in.readUTF();\n Versification v11n = Versifications.instance().getVersification(v11nName);\n store = new BitSet(v11n.maximumOrdinal() + 1);\n readObjectSupport(in);\n}\n"
|
"private IterationResult<XMLEvent2> endElement2() {\n DomEndElement2 end = new DomEndElement2(current);\n XMLEvent2 event = new InMemoryXMLEvent2(null, end, null);\n return IterationResult.next(event);\n}\n"
|
"private void addClientInfo(Node hazelcastNode, PhoneHomeParameterCreator parameterCreator) {\n Map<ClientType, Integer> clusterClientStats = hazelcastNode.clientEngine.getConnectedClientStats();\n parameterCreator.addParam(\"String_Node_Str\", Integer.toString(clusterClientStats.get(ClientType.CPP))).addParam(\"String_Node_Str\", Integer.toString(clusterClientStats.get(ClientType.CSHARP))).addParam(\"String_Node_Str\", Integer.toString(clusterClientStats.get(ClientType.JAVA))).addParam(\"String_Node_Str\", Integer.toString(clusterClientStats.get(ClientType.NODEJS))).addParam(\"String_Node_Str\", Integer.toString(clusterClientStats.get(ClientType.PYTHON)));\n}\n"
|
"public void shouldConstructCorrectLocalAndRemoteAddressesForHttpAcceptAndConnectSessions() {\n helperConstructLocalRemoteAddressesForAcceptAndConnectSessions(null, null);\n}\n"
|
"public void complete(final CompleteOperation completeOperation, final InputComponent<?, Object> input, final ShellContext context, final String typedValue, final ConverterFactory converterFactory) {\n SelectComponent<?, Object> selectComponent = (SelectComponent<?, Object>) input;\n Converter<Object, String> itemLabelConverter = (Converter<Object, String>) InputComponents.getItemLabelConverter(converterFactory, selectComponent);\n Iterable<Object> valueChoices = selectComponent.getValueChoices();\n List<String> choices = new ArrayList<String>();\n for (Object choice : valueChoices) {\n String convert = itemLabelConverter.convert(choice);\n if (convert != null) {\n choices.add(convert);\n }\n }\n if (choices.size() > 1) {\n String startsWith = Parser.findStartsWith(choices);\n if (startsWith.length() > typedValue.length()) {\n String substring = startsWith.substring(typedValue.length());\n String candidate = Parser.switchSpacesToEscapedSpacesInWord(substring);\n completeOperation.addCompletionCandidate(candidate);\n completeOperation.setOffset(completeOperation.getCursor() - typedValue.length());\n } else {\n completeOperation.addCompletionCandidates(choices);\n if (!completeOperation.getCompletionCandidates().isEmpty() && !typedValue.isEmpty()) {\n completeOperation.setOffset(completeOperation.getCursor() - typedValue.length());\n }\n }\n } else if (choices.size() == 1) {\n completeOperation.addCompletionCandidate(choices.get(0).substring(typedValue.length()));\n if (!completeOperation.getCompletionCandidates().isEmpty() && !typedValue.isEmpty()) {\n completeOperation.setOffset(completeOperation.getCursor() - typedValue.length());\n }\n }\n}\n"
|
"public static void compile() {\n ArrayList<CallStatement> calls = new ArrayList<CallStatement>();\n while (tokens.size() > 0) {\n clearS();\n if (tokens.get(0).equals(\"String_Node_Str\")) {\n compileDef();\n } else if (tokens.get(0).equals(\"String_Node_Str\") || tokens.get(0).equals(\"String_Node_Str\")) {\n compileLoopStart(mainROM);\n } else if (tokens.get(0).equals(\"String_Node_Str\")) {\n compileSub(mainROM);\n } else if (tokens.get(0).equals(\"String_Node_Str\")) {\n compileLoopStop(mainROM);\n } else if (tokens.get(0).equals(\"String_Node_Str\")) {\n CallStatement call = new CallStatement(mainROM.size(), rmStatementTokens());\n Subroutine isLocal = null;\n for (int i = subs.size() - 1; i >= 0; i--) {\n if (subs.get(i).args.contains(call.pointerName())) {\n isLocal = subs.get(i);\n }\n }\n if (isLocal == null) {\n type.put(call.pointerName(), call.subName());\n } else {\n isLocal.type.put(call.pointerName(), call.subName());\n }\n calls.add(0, call);\n } else {\n if (tokens.get(0).equals(\"String_Node_Str\")) {\n compileDef();\n } else if (tokens.get(0).equals(\"String_Node_Str\") || tokens.get(0).equals(\"String_Node_Str\")) {\n compileLoopStart(mainROM);\n } else if (tokens.get(0).equals(\"String_Node_Str\")) {\n compileSub(mainROM);\n } else if (tokens.get(0).equals(\"String_Node_Str\")) {\n compileLoopStop(mainROM);\n } else {\n compileMove(mainROM);\n }\n prevCall = null;\n }\n }\n for (int i = 0; i < calls.size(); i++) {\n clearS();\n compileCall(mainROM, calls.get(i));\n }\n}\n"
|
"public static org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent convertConceptSetComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.dstu2016may.model.ValueSet.ConceptSetComponent();\n copyElement(src, tgt);\n tgt.setSystem(src.getSystem());\n tgt.setVersion(src.getVersion());\n for (org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t));\n for (org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent t : src.getFilter()) tgt.addFilter(convertConceptSetFilterComponent(t));\n return tgt;\n}\n"
|
"protected void onViewRemoved(View child) {\n super.onViewRemoved(child);\n mStackScrollAlgorithm.notifyChildrenChanged(this);\n if (mChangePositionInProgress) {\n return;\n }\n ((ExpandableView) child).setOnHeightChangedListener(null);\n mCurrentStackScrollState.removeViewStateForView(child);\n updateScrollStateForRemovedChild(child);\n boolean animationGenerated = generateRemoveAnimation(child);\n if (animationGenerated && !mSwipedOutViews.contains(child)) {\n getOverlay().add(child);\n }\n}\n"
|
"public void readData(DataInput in) throws IOException {\n long now = System.currentTimeMillis();\n cost = in.readLong();\n expirationTime = in.readLong() + now;\n lastAccessTime = in.readLong() + now;\n lastUpdateTime = in.readLong() + now;\n creationTime = in.readLong() + now;\n version = in.readLong();\n hits = in.readInt();\n name = in.readUTF();\n keyData = new Data();\n keyData.readData(in);\n valueData = new Data();\n valueData.readData(in);\n byte indexCount = in.readByte();\n if (indexCount > 0) {\n indexes = new Long[indexCount];\n indexTypes = new byte[indexCount];\n for (byte i = 0; i < indexCount; i++) {\n indexes[i] = in.readLong();\n indexTypes[i] = in.readByte();\n }\n }\n}\n"
|
"public void saveScoreEvaluation(CourseNode courseNode, Identity identity, Identity assessedIdentity, ScoreEvaluation scoreEvaluation, UserCourseEnvironment userCourseEnv, boolean incrementUserAttempts) {\n ICourse course = CourseFactory.loadCourse(courseEntry.getOlatResource());\n Float score = scoreEvaluation.getScore();\n Boolean passed = scoreEvaluation.getPassed();\n Long assessmentId = scoreEvaluation.getAssessmentID();\n AssessmentEntry assessmentEntry = getOrCreate(assessedIdentity, courseNode);\n if (score == null) {\n nodeAssessment.setScore(null);\n } else {\n nodeAssessment.setScore(new BigDecimal(Float.toString(score)));\n }\n nodeAssessment.setPassed(passed);\n nodeAssessment.setFullyAssessed(scoreEvaluation.getFullyAssessed());\n nodeAssessment.setAssessmentId(assessmentId);\n if (incrementUserAttempts) {\n int attempts = nodeAssessment.getAttempts() == null ? 1 : nodeAssessment.getAttempts().intValue() + 1;\n nodeAssessment.setAttempts(attempts);\n }\n nodeAssessment = assessmentService.updateAssessmentEntry(nodeAssessment);\n if (courseNode instanceof AssessableCourseNode) {\n efficiencyStatementManager.updateUserEfficiencyStatement(userCourseEnv);\n }\n if (passed != null && passed.booleanValue() && course.getCourseConfig().isAutomaticCertificationEnabled()) {\n if (certificatesManager.isRecertificationAllowed(assessedIdentity, courseEntry)) {\n CertificateTemplate template = null;\n Long templateId = course.getCourseConfig().getCertificateTemplate();\n if (templateId != null) {\n template = certificatesManager.getTemplateById(templateId);\n }\n CertificateInfos certificateInfos = new CertificateInfos(assessedIdentity, score, passed);\n MailerResult result = new MailerResult();\n certificatesManager.generateCertificate(certificateInfos, courseEntry, template, result);\n }\n }\n}\n"
|
"public boolean equals(Object object) {\n if (object == null) {\n return false;\n }\n if (!(object instanceof ConfirmationKeyEntity)) {\n return false;\n }\n final ConfirmationKeyEntity other = (ConfirmationKeyEntity) object;\n if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {\n return false;\n }\n if (this.expirationDate != other.expirationDate && (this.expirationDate == null || !this.expirationDate.equals(other.expirationDate))) {\n return false;\n }\n if ((this.confirmationKey == null) ? (other.confirmationKey != null) : !this.confirmationKey.equals(other.confirmationKey)) {\n return false;\n }\n if (this.user != other.user && (this.user == null || !this.user.equals(other.user))) {\n return false;\n }\n return true;\n}\n"
|
"protected synchronized void reevaluateMyself(Pair<Master, Machine> master) {\n if (master == null) {\n master = broker.getMasterReally();\n }\n boolean restarted = false;\n boolean iAmCurrentlyMaster = masterServer != null;\n msgLog.logMessage(\"String_Node_Str\" + machineId + \"String_Node_Str\" + master + \"String_Node_Str\" + iAmCurrentlyMaster + \"String_Node_Str\");\n if (master.other().getMachineId() == machineId) {\n if (this.localGraph == null || !iAmCurrentlyMaster) {\n internalShutdown();\n startAsMaster();\n restarted = true;\n }\n broker.rebindMaster();\n } else {\n if (this.localGraph == null || iAmCurrentlyMaster) {\n internalShutdown();\n startAsSlave();\n restarted = true;\n } else {\n ((SlaveIdGeneratorFactory) getConfig().getIdGeneratorFactory()).forgetIdAllocationsFromMaster();\n }\n tryToEnsureIAmNotABrokenMachine(broker.getMaster());\n }\n if (restarted) {\n doAfterLocalGraphStarted();\n }\n}\n"
|
"private ClientStatus ensureClientStatus(String clientId, String clientDesc) {\n ClientStatus clientStatus = clientStatuses.get(clientId);\n if (clientStatus == null) {\n clientStatus = new ClientStatus(clientInfo);\n clientStatuses.put(id, clientStatus);\n } else {\n clientStatus.clientDesc = clientDesc;\n }\n return clientStatus;\n}\n"
|
"public void readField(OpenJPAStateManager stateManager, QueryResult<ColumnSlice<DynamicComposite, byte[]>> result) {\n Object[] fields = null;\n StoreContext context = stateManager.getContext();\n Collection<Object> collection = (Collection<Object>) stateManager.newProxy(fieldId);\n DynamicComposite dynamicCol = null;\n for (HColumn<DynamicComposite, byte[]> col : result.get().getColumns()) {\n Object nativeId = col.getName().get(compositeFieldLength - 1, this.idSerizlizer);\n Object oid = context.newObjectId(targetClass, nativeId);\n Object found = context.find(oid, true, null);\n if (found == null) {\n continue;\n }\n collection.add(found);\n }\n stateManager.storeObject(fieldId, collection);\n}\n"
|
"private Object getAggregateValue(int aggrIndex) throws DataException {\n AggrExprInfo aggrInfo = getAggrInfo(aggrIndex);\n if (this.odiResult.getRowCount() == 0) {\n if (aggrInfo.aggregation.getName().equalsIgnoreCase(BuiltInAggregationFactory.TOTAL_COUNT_FUNC) || aggrInfo.aggregation.getName().equalsIgnoreCase(BuiltInAggregationFactory.TOTAL_COUNTDISTINCT_FUNC))\n return new Integer(0);\n else\n return null;\n }\n try {\n int groupIndex;\n if (aggrInfo.aggregation.getType() == IAggregation.SUMMARY_AGGR) {\n if (aggrInfo.groupLevel == 0)\n groupIndex = 0;\n else\n groupIndex = this.odiResult.getCurrentGroupIndex(aggrInfo.groupLevel);\n } else {\n groupIndex = this.odiResult.getCurrentResultIndex();\n }\n return this.aggrValues[aggrIndex].get(groupIndex);\n } catch (DataException e) {\n throw e;\n }\n}\n"
|
"public Call createVideoCall(Contact callee, MediaDevice device) throws OperationFailedException {\n CallJabberImpl call = (CallJabberImpl) super.createVideoCall(callee, device);\n CallPeerJabberImpl callPeer = call.getCallPeers().next();\n callPeer.addCallPeerListener(callPeerListener);\n size = (((VideoMediaFormat) call.getDefaultDevice(MediaType.VIDEO).getFormat()).getSize());\n origin = getOriginForMediaDevice(device);\n return call;\n}\n"
|
"public void onSuccess() {\n if (getActivity() == null)\n return;\n Animation fadeInAnim = AnimationUtils.loadAnimation(getActivity(), android.R.anim.fade_in);\n mainInfoBlockColorFade.start();\n td.startTransition(500);\n coverImage.setVisibility(View.VISIBLE);\n coverImage.startAnimation(fadeInAnim);\n}\n"
|
"public Text getHelp(CommandSource source) {\n return this.help;\n}\n"
|
"public boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, Object value, AbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext) {\n if (value instanceof XMLRoot) {\n XMLRoot root = (XMLRoot) value;\n XPathFragment fragment = this.xmlField.getXPathFragment();\n while (fragment != null && !fragment.nameIsText) {\n if (fragment.getNextFragment() == null || fragment.getHasText()) {\n if (fragment.getLocalName().equals(root.getLocalName())) {\n String fragUri = fragment.getNamespaceURI();\n String namespaceUri = root.getNamespaceURI();\n if ((namespaceUri == null && fragUri == null) || (namespaceUri != null && fragUri != null && namespaceUri.equals(fragUri))) {\n return this.choiceElementNodeValue.marshalSingleValue(xPathFragment, marshalRecord, object, value, session, namespaceResolver, marshalContext);\n }\n }\n }\n fragment = fragment.getNextFragment();\n }\n } else if (value != null) {\n if (xmlChoiceMapping.getClassToFieldMappings().get(value.getClass()) == this.xmlField) {\n return this.choiceElementNodeValue.marshalSingleValue(xPathFragment, marshalRecord, object, value, session, namespaceResolver, marshalContext);\n }\n List<XMLField> sourceFields = xmlChoiceMapping.getClassToSourceFieldsMappings().get(value.getClass());\n if (sourceFields != null && sourceFields.contains(this.xmlField)) {\n return this.choiceElementNodeValue.marshalSingleValue(xPathFragment, marshalRecord, object, value, session, namespaceResolver, marshalContext);\n } else if (value != null) {\n List<XMLField> sourceFields = xmlChoiceMapping.getClassToSourceFieldsMappings().get(value.getClass());\n if (sourceFields != null && sourceFields.contains(this.xmlField)) {\n return this.choiceElementNodeValue.marshalSingleValue(xPathFragment, marshalRecord, object, value, session, namespaceResolver, marshalContext);\n }\n }\n }\n return false;\n}\n"
|
"public boolean select(Viewer viewer, Object parentElement, Object element) {\n if (IProject.class.isInstance(element)) {\n return \"String_Node_Str\".equals(((IProject) element).getName());\n } else if (IFolder.class.isInstance(element)) {\n IPath path = new Path(\"String_Node_Str\");\n IPath projectRelativePath = ((IFolder) element).getProjectRelativePath();\n return path.isPrefixOf(projectRelativePath);\n }\n return false;\n}\n"
|
"public boolean equals(Object obj) {\n if (this == obj) {\n return true;\n }\n if (obj == null || getClass() != obj.getClass()) {\n return false;\n }\n if (compareValues(getDomainid(), other.getDomainid()) && compareValues(getRoleid(), other.getRoleid()) && compareValues(getUserid(), other.getUserid())) {\n return true;\n }\n return false;\n}\n"
|
"public void callStateChanged(CallChangeEvent evt) {\n if (evt.getEventType().equals(CallChangeEvent.CALL_STATE_CHANGE) && ((CallState) evt.getNewValue()).equals(CallState.CALL_ENDED)) {\n CallGibberishImpl sourceCall = (CallGibberishImpl) this.activeCalls.remove(evt.getSourceCall().getCallID());\n if (logger.isTraceEnabled())\n logger.trace(\"String_Node_Str\" + sourceCall + \"String_Node_Str\" + \"String_Node_Str\");\n fireCallEvent(CallEvent.CALL_ENDED, sourceCall);\n }\n}\n"
|
"public DataInputBuffer getKey() throws IOException {\n throw new RuntimeException(\"String_Node_Str\");\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.