content
stringlengths 40
137k
|
---|
"public static ReturnCode checkGeneralJdbcJarFilePathDriverClassName(DatabaseConnection dbConn) {\n ReturnCode returnCode = new ReturnCode();\n String driverClass = dbConn.getDriverClass();\n String driverJarPath = dbConn.getDriverJarPath();\n if (driverClass == null || driverClass.trim().equals(\"String_Node_Str\")) {\n returnCode.setOk(false);\n returnCode.setMessage(Messages.getString(\"String_Node_Str\"));\n } else {\n if (driverJarPath == null || driverJarPath.trim().equals(\"String_Node_Str\")) {\n returnCode.setOk(false);\n returnCode.setMessage(Messages.getString(\"String_Node_Str\"));\n } else {\n String[] splits = driverJarPath.split(\"String_Node_Str\");\n for (String str : splits) {\n if (str != null && str.trim().length() > 0) {\n File jarFile = new File(str);\n if (!jarFile.exists() || jarFile.isDirectory()) {\n returnCode.setOk(false);\n returnCode.setMessage(Messages.getString(\"String_Node_Str\"));\n break;\n }\n }\n }\n }\n }\n return returnCode;\n}\n"
|
"protected void processUpdate() throws SteamException {\n if (setHandle == null || setHandle.getNativeHandle() == 0) {\n return;\n }\n for (int i = 0; i < numControllers; i++) {\n SteamControllerHandle handle = controllerHandles[i];\n controller.activateActionSet(handle, setHandle);\n if (digitalActionHandle != null) {\n controller.getDigitalActionData(handle, digitalActionHandle, digitalActionData);\n if (digitalActionData.getActive() && digitalActionData.getState()) {\n System.out.println(\"String_Node_Str\" + digitalActionHandle.getNativeHandle());\n }\n }\n if (analogActionHandle != null) {\n controller.getAnalogActionData(handle, analogActionHandle, analogActionData);\n if (analogActionData.getActive()) {\n float x = analogActionData.getX();\n float y = analogActionData.getY();\n SteamController.SourceMode mode = analogActionData.getMode();\n if (Math.abs(x) > 0.0001f && Math.abs(y) > 0.001f) {\n System.out.println(\"String_Node_Str\" + analogActionData.getX() + \"String_Node_Str\" + analogActionData.getY() + \"String_Node_Str\" + mode.name());\n }\n }\n }\n }\n}\n"
|
"public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch(id) {\n case R.id.points_help:\n Utilities.showHelpDialog(this, R.raw.district_points_help, getString(R.string.district_points_help));\n return true;\n case android.R.id.home:\n if (isDrawerOpen()) {\n closeDrawer();\n return true;\n }\n startActivity(HomeActivity.newInstance(this, R.id.nav_item_districts).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));\n return true;\n }\n return super.onOptionsItemSelected(item);\n}\n"
|
"public void onEvent(int event, String path) {\n String removedPackage = null;\n int removedUid = -1;\n String addedPackage = null;\n int addedUid = -1;\n synchronized (mInstallLock) {\n String fullPathStr = null;\n File fullPath = null;\n if (path != null) {\n fullPath = new File(mRootDir, path);\n fullPathStr = fullPath.getPath();\n }\n if (Config.LOGV)\n Log.v(TAG, \"String_Node_Str\" + fullPathStr + \"String_Node_Str\" + Integer.toHexString(event));\n if (!isPackageFilename(path)) {\n if (Config.LOGV)\n Log.v(TAG, \"String_Node_Str\" + fullPathStr);\n return;\n }\n if (ignoreCodePath(fullPathStr)) {\n return;\n }\n PackageParser.Package p = null;\n synchronized (mPackages) {\n p = mAppDirs.get(fullPathStr);\n }\n if ((event & REMOVE_EVENTS) != 0) {\n if (p != null) {\n removePackageLI(p, true);\n removedPackage = p.applicationInfo.packageName;\n removedUid = p.applicationInfo.uid;\n }\n }\n if ((event & ADD_EVENTS) != 0) {\n if (p == null) {\n p = scanPackageLI(fullPath, (mIsRom ? PackageParser.PARSE_IS_SYSTEM | PackageParser.PARSE_IS_SYSTEM_DIR : 0) | PackageParser.PARSE_CHATTY | PackageParser.PARSE_MUST_BE_APK, SCAN_MONITOR | SCAN_NO_PATHS);\n if (p != null) {\n synchronized (mPackages) {\n updatePermissionsLP(p.packageName, p, p.permissions.size() > 0, false, false);\n }\n addedPackage = p.applicationInfo.packageName;\n addedUid = p.applicationInfo.uid;\n }\n }\n }\n synchronized (mPackages) {\n mSettings.writeLP();\n }\n }\n if (removedPackage != null) {\n Bundle extras = new Bundle(1);\n extras.putInt(Intent.EXTRA_UID, removedUid);\n extras.putBoolean(Intent.EXTRA_DATA_REMOVED, false);\n sendPackageBroadcast(Intent.ACTION_PACKAGE_REMOVED, removedPackage, extras, null);\n }\n if (addedPackage != null) {\n Bundle extras = new Bundle(1);\n extras.putInt(Intent.EXTRA_UID, addedUid);\n sendPackageBroadcast(Intent.ACTION_PACKAGE_ADDED, addedPackage, extras, null);\n }\n}\n"
|
"public static String toEnviromentVariableString(List<ValueRange> portRanges, Map<String, Ports> portsDefinitions) {\n StringBuilder portsString = new StringBuilder();\n if (portsDefinitions != null && !portsDefinitions.isEmpty()) {\n Iterator iter = portsDefinitions.entrySet().iterator();\n int basePort = 0;\n while (iter.hasNext()) {\n Map.Entry entry = (Map.Entry) iter.next();\n String key = (String) entry.getKey();\n Ports ports = (Ports) entry.getValue();\n if (ports.getStart() > 0) {\n portsString.append(key + \"String_Node_Str\" + ports.getStart());\n for (int i = 2; i <= ports.getCount(); i++) {\n portsString.append(\"String_Node_Str\" + (ports.getStart() + i - 1));\n }\n portsString.append(\"String_Node_Str\");\n } else {\n List<ValueRange> assignPorts = ValueRangeUtils.getSubRangeSequence(portRanges, ports.getCount(), basePort);\n basePort = assignPorts.get(assignPorts.size() - 1).getEnd() + 1;\n portsString.append(key + \"String_Node_Str\" + assignPorts.get(0).toDetailString(\"String_Node_Str\"));\n for (int i = 1; i < assignPorts.size(); i++) {\n portsString.append(\"String_Node_Str\" + assignPorts.get(i).toDetailString(\"String_Node_Str\"));\n }\n portsString.append(\"String_Node_Str\");\n }\n }\n }\n return portsString.toString();\n}\n"
|
"protected List<ITmfTreeViewerEntry> updateElements(long start, long end, boolean selection) {\n if (getTrace() == null) {\n return null;\n }\n ITmfTreeViewerEntry root = getInput();\n if ((!selection) && (root != null)) {\n return null;\n }\n if (entries == null || fFilterStatus) {\n entries = buildEntriesList(start);\n } else {\n entries = updateEntriesList(entries, start);\n }\n return entries;\n}\n"
|
"public void onRestoreInstanceState(Parcelable state) {\n if (!(state instanceof SavedState)) {\n super.onRestoreInstanceState(state);\n return;\n }\n SavedState ss = (SavedState) state;\n super.onRestoreInstanceState(ss.getSuperState());\n mTransportState = (ss.transportState);\n mAppWidgetToShow = ss.appWidgetToShow;\n setInsets(ss.insets);\n if (DEBUG)\n Log.d(TAG, \"String_Node_Str\" + mTransportState);\n mSwitchPageRunnable.run();\n}\n"
|
"public void applyRelationships(OSchemaHelper helper) {\n super.applyRelationships(helper);\n helper.setupRelationship(OCLASS_NAME, \"String_Node_Str\", ExecutionEntityHandler.OCLASS_NAME, \"String_Node_Str\");\n helper.setupRelationship(OCLASS_NAME, \"String_Node_Str\", ExecutionEntityHandler.OCLASS_NAME);\n helper.setupRelationship(OCLASS_NAME, \"String_Node_Str\", ProcessDefinitionEntityHandler.OCLASS_NAME, \"String_Node_Str\");\n helper.setupRelationship(OCLASS_NAME, \"String_Node_Str\", CaseDefinitionEntityHandler.OCLASS_NAME, \"String_Node_Str\");\n helper.setupRelationship(OCLASS_NAME, \"String_Node_Str\", CaseExecutionEntityHandler.OCLASS_NAME, \"String_Node_Str\");\n helper.setupRelationship(OCLASS_NAME, \"String_Node_Str\", TaskEntityHandler.OCLASS_NAME, \"String_Node_Str\");\n helper.setupRelationship(OCLASS_NAME, \"String_Node_Str\", ByteArrayEntityHandler.OCLASS_NAME);\n}\n"
|
"public String labelFor(Rule rule) {\n return rule.getLanguage().getName();\n}\n"
|
"public List<AbstractWidget> processItems(List<ViewItem> viewItems, Panel panel, String level) {\n List<AbstractWidget> items = new ArrayList<AbstractWidget>();\n for (ViewItem viewItem : viewItems) {\n Integer type = viewItem.getTypeSelect();\n switch(type) {\n case 0:\n String fieldType = viewItem.getFieldType();\n if (isPanelRelated(fieldType, viewItem)) {\n setPanelRelated(viewItem, items, level);\n } else {\n items.add(createField(viewItem));\n }\n checkDefaultValues(fieldType, viewItem);\n break;\n case 1:\n if (viewItem.getPanelTop()) {\n setMenuItem(viewItem, panel);\n } else {\n items.add(getButton(viewItem));\n }\n break;\n case 2:\n setLabel(viewItem, items);\n break;\n case 3:\n setSpacer(viewItem, items);\n }\n }\n return items;\n}\n"
|
"private void moveAll(InvTweaksContainerSection fromSection, InvTweaksContainerSection toSection, boolean separateStacks, boolean drop, dk stackToMatch) throws TimeoutException {\n int toIndex = getNextIndex(separateStacks, drop);\n for (vv slot : container.getSlots(fromSection)) {\n if (hasStack(slot) && areSameItemType(stackToMatch, getStack(slot))) {\n int fromIndex = container.getSlotIndex(getSlotNumber(slot));\n boolean canStillMove = true;\n while (hasStack(slot) && toIndex != -1 && !(fromSection == toSection && fromIndex == toIndex) && canStillMove) {\n canStillMove = container.move(fromSection, fromIndex, toSection, toIndex);\n toIndex = getNextIndex(separateStacks, drop);\n }\n }\n if (toIndex == -1) {\n break;\n }\n }\n}\n"
|
"public void removeChangeListener(ChangeListener listener) {\n if (listeners != null) {\n listeners.remove(listener);\n }\n}\n"
|
"public boolean put(UUID nodeId, Set<Service> descriptors) {\n Preconditions.checkNotNull(nodeId, \"String_Node_Str\");\n Preconditions.checkNotNull(services, \"String_Node_Str\");\n DateTime expiration = currentTime.get().plusMillis((int) maxAge.toMillis());\n Entry old = descriptors.put(nodeId, new Entry(expiration, ImmutableSet.copyOf(services)));\n return old == null;\n}\n"
|
"private static int compareBlocks(String compareBlock1, String compareBlock2) {\n Integer i1 = getInteger(compareBlock1);\n Integer i2 = getInteger(compareBlock2);\n if (i1 == null && i2 != null) {\n return INTERMEDIATE.equalsIgnoreCase(compareBlock1) ? 1 : -1;\n } else if (i1 != null && i2 == null) {\n return INTERMEDIATE.equals(compareBlock2) ? -1 : 1;\n } else if (i1 == null) {\n if (INTERMEDIATE.equalsIgnoreCase(compareBlock1) && !INTERMEDIATE.equalsIgnoreCase(compareBlock2))\n return 1;\n if (!INTERMEDIATE.equalsIgnoreCase(compareBlock1) && INTERMEDIATE.equalsIgnoreCase(compareBlock2))\n return -1;\n return compareBlock1.compareToIgnoreCase(compareBlock2);\n } else {\n return i1.intValue() - i2.intValue();\n }\n}\n"
|
"public void addToSchemaType(TypeInfo ownerTypeInfo, java.util.List<Property> properties, TypeDefParticle compositor, ComplexType type, Schema workingSchema) {\n if (properties.size() == 0) {\n type.setAll(null);\n type.setSequence(null);\n type.setChoice(null);\n ownerTypeInfo.setCompositor(null);\n } else {\n for (Property next : properties) {\n if (next == null) {\n continue;\n }\n Schema currentSchema = workingSchema;\n TypeDefParticle parentCompositor = compositor;\n boolean isChoice = (parentCompositor instanceof Choice);\n ComplexType parentType = type;\n if (!helper.isAnnotationPresent(next.getElement(), XmlTransient.class) && !next.isInverseReference()) {\n if (next.getXmlPath() != null) {\n if (next.getXmlPath().equals(\"String_Node_Str\")) {\n TypeInfo info = (TypeInfo) typeInfo.get(next.getActualType().getQualifiedName());\n addToSchemaType(info, info.getPropertyList(), compositor, type, info.getSchema());\n continue;\n }\n XMLField xfld = new XMLField(next.getXmlPath());\n xfld.setNamespaceResolver(currentSchema.getNamespaceResolver());\n xfld.initialize();\n XmlPathResult xpr = buildSchemaComponentsForXPath(xfld.getXPathFragment(), new XmlPathResult(parentCompositor, currentSchema), (next.isAny() || next.isAnyAttribute()), isChoice, next);\n parentCompositor = xpr.particle;\n currentSchema = xpr.schema;\n if (parentCompositor == null) {\n continue;\n }\n if (parentCompositor.getOwner() instanceof ComplexType) {\n parentType = ((ComplexType) parentCompositor.getOwner());\n }\n } else if (!isChoice && next.isSetXmlElementWrapper()) {\n XmlElementWrapper wrapper = next.getXmlElementWrapper();\n Element wrapperElement = new Element();\n String name = wrapper.getName();\n if (name.equals(\"String_Node_Str\")) {\n name = next.getPropertyName();\n }\n wrapperElement.setNillable(wrapper.isNillable());\n String wrapperNS = wrapper.getNamespace();\n if (!wrapperNS.equals(\"String_Node_Str\") && !wrapperNS.equals(currentSchema.getTargetNamespace())) {\n wrapperElement.setMinOccurs(Occurs.ONE);\n wrapperElement.setMaxOccurs(Occurs.ONE);\n String prefix = getOrGeneratePrefixForNamespace(wrapperNS, currentSchema);\n wrapperElement.setRef(prefix + \"String_Node_Str\" + name);\n compositor.addElement(wrapperElement);\n continue;\n } else {\n wrapperElement.setName(name);\n if (wrapper.isRequired()) {\n wrapperElement.setMinOccurs(Occurs.ONE);\n } else {\n wrapperElement.setMinOccurs(Occurs.ZERO);\n }\n compositor.addElement(wrapperElement);\n ComplexType wrapperType = new ComplexType();\n Sequence wrapperSequence = new Sequence();\n wrapperType.setSequence(wrapperSequence);\n wrapperElement.setComplexType(wrapperType);\n parentType = wrapperType;\n parentCompositor = wrapperSequence;\n }\n }\n if (next.isMixedContent()) {\n parentType.setMixed(true);\n }\n if (next.isAttribute() && !next.isAnyAttribute()) {\n Attribute attribute = new Attribute();\n QName attributeName = next.getSchemaName();\n attribute.setName(attributeName.getLocalPart());\n if (next.isRequired()) {\n attribute.setUse(Attribute.REQUIRED);\n }\n String fixedValue = next.getFixedValue();\n if (fixedValue != null) {\n attribute.setFixed(fixedValue);\n }\n JavaClass javaType = next.getType();\n if (next.getGenericType() != null) {\n javaType = (JavaClass) next.getGenericType();\n }\n TypeInfo info = (TypeInfo) typeInfo.get(next.getType().getQualifiedName());\n String typeName = null;\n if (next.isXmlId()) {\n typeName = XMLConstants.SCHEMA_PREFIX + \"String_Node_Str\";\n } else if (next.isXmlIdRef()) {\n typeName = XMLConstants.SCHEMA_PREFIX + \"String_Node_Str\";\n } else if (info != null && !info.isComplexType()) {\n typeName = info.getSimpleType().getName();\n } else {\n typeName = getTypeName(next, javaType, currentSchema);\n }\n if (isCollectionType(next)) {\n SimpleType localType = new SimpleType();\n org.eclipse.persistence.internal.oxm.schema.model.List list = new org.eclipse.persistence.internal.oxm.schema.model.List();\n list.setItemType(typeName);\n localType.setList(list);\n attribute.setSimpleType(localType);\n } else {\n if (typeName != null && !typeName.contains(\"String_Node_Str\")) {\n if (info.getSchema() == currentSchema) {\n String prefix = getPrefixForNamespace(currentSchema.getTargetNamespace(), currentSchema.getNamespaceResolver());\n if (prefix != null) {\n typeName = prefix + \"String_Node_Str\" + typeName;\n }\n }\n }\n attribute.setType(typeName);\n }\n String lookupNamespace = currentSchema.getTargetNamespace();\n if (lookupNamespace == null) {\n lookupNamespace = \"String_Node_Str\";\n }\n NamespaceInfo namespaceInfo = getNamespaceInfoForNamespace(lookupNamespace);\n boolean isAttributeFormQualified = true;\n if (namespaceInfo != null) {\n isAttributeFormQualified = namespaceInfo.isAttributeFormQualified();\n }\n if ((isAttributeFormQualified && !attributeName.getNamespaceURI().equals(lookupNamespace)) || (!namespaceInfo.isAttributeFormQualified() && !attributeName.getNamespaceURI().equals(\"String_Node_Str\"))) {\n Schema attributeSchema = this.getSchemaForNamespace(attributeName.getNamespaceURI());\n if (attributeSchema != null && attributeSchema.getTopLevelAttributes().get(attribute.getName()) == null) {\n attributeSchema.getTopLevelAttributes().put(attribute.getName(), attribute);\n }\n addImportIfRequired(currentSchema, attributeSchema, attributeName.getNamespaceURI());\n Attribute reference = new Attribute();\n String prefix = getPrefixForNamespace(attributeName.getNamespaceURI(), currentSchema.getNamespaceResolver());\n if (prefix == null) {\n reference.setRef(attribute.getName());\n } else {\n reference.setRef(prefix + \"String_Node_Str\" + attribute.getName());\n }\n if (parentType.getSimpleContent() != null) {\n parentType.getSimpleContent().getExtension().getOrderedAttributes().add(reference);\n } else {\n parentType.getOrderedAttributes().add(reference);\n }\n } else {\n if (parentType.getSimpleContent() != null) {\n parentType.getSimpleContent().getExtension().getOrderedAttributes().add(attribute);\n } else if (parentType.getComplexContent() != null) {\n parentType.getComplexContent().getExtension().getOrderedAttributes().add(attribute);\n } else {\n parentType.getOrderedAttributes().add(attribute);\n }\n }\n } else if (next.isAnyAttribute()) {\n AnyAttribute anyAttribute = new AnyAttribute();\n anyAttribute.setProcessContents(\"String_Node_Str\");\n anyAttribute.setNamespace(\"String_Node_Str\");\n if (parentType.getSimpleContent() != null) {\n SimpleContent content = parentType.getSimpleContent();\n content.getRestriction().setAnyAttribute(anyAttribute);\n } else {\n parentType.setAnyAttribute(anyAttribute);\n }\n } else if (next.isChoice()) {\n Choice choice = new Choice();\n if (next.getGenericType() != null) {\n choice.setMaxOccurs(Occurs.UNBOUNDED);\n }\n ArrayList<Property> choiceProperties = (ArrayList<Property>) next.getChoiceProperties();\n addToSchemaType(ownerTypeInfo, choiceProperties, choice, parentType, currentSchema);\n if (parentCompositor instanceof Sequence) {\n ((Sequence) parentCompositor).addChoice(choice);\n } else if (parentCompositor instanceof Choice) {\n ((Choice) parentCompositor).addChoice(choice);\n }\n } else if (next.isAny()) {\n Any any = new Any();\n any.setNamespace(\"String_Node_Str\");\n if (next.isLax()) {\n any.setProcessContents(Any.LAX);\n } else {\n any.setProcessContents(\"String_Node_Str\");\n }\n if (isCollectionType(next)) {\n any.setMinOccurs(Occurs.ZERO);\n any.setMaxOccurs(Occurs.UNBOUNDED);\n }\n if (parentCompositor instanceof Sequence) {\n ((Sequence) parentCompositor).addAny(any);\n } else if (parentCompositor instanceof Choice) {\n ((Choice) parentCompositor).addAny(any);\n }\n } else if (next.isReference()) {\n java.util.List<ElementDeclaration> referencedElements = next.getReferencedElements();\n if (referencedElements.size() == 1) {\n Element element = new Element();\n ElementDeclaration decl = referencedElements.get(0);\n String localName = decl.getElementName().getLocalPart();\n Schema referencedSchema = this.getSchemaForNamespace(decl.getElementName().getNamespaceURI());\n addImportIfRequired(currentSchema, referencedSchema, decl.getElementName().getNamespaceURI());\n String prefix = this.getPrefixForNamespace(decl.getElementName().getNamespaceURI(), currentSchema.getNamespaceResolver());\n if (decl.getScopeClass() == GLOBAL.class) {\n if (prefix == null || prefix.equals(\"String_Node_Str\")) {\n element.setRef(localName);\n } else {\n element.setRef(prefix + \"String_Node_Str\" + localName);\n }\n } else {\n element.setType(getTypeName(next, decl.getJavaType(), currentSchema));\n element.setName(localName);\n }\n if (next.getGenericType() != null) {\n element.setMinOccurs(Occurs.ZERO);\n element.setMaxOccurs(Occurs.UNBOUNDED);\n }\n parentCompositor.addElement(element);\n } else {\n Choice choice = new Choice();\n if (next.getGenericType() != null) {\n choice.setMaxOccurs(Occurs.UNBOUNDED);\n }\n for (ElementDeclaration elementDecl : referencedElements) {\n Element element = new Element();\n String localName = elementDecl.getElementName().getLocalPart();\n Schema referencedSchema = this.getSchemaForNamespace(elementDecl.getElementName().getNamespaceURI());\n addImportIfRequired(currentSchema, referencedSchema, elementDecl.getElementName().getNamespaceURI());\n String prefix = this.getPrefixForNamespace(elementDecl.getElementName().getNamespaceURI(), currentSchema.getNamespaceResolver());\n if (elementDecl.getScopeClass() == GLOBAL.class) {\n if (prefix == null || prefix.equals(\"String_Node_Str\")) {\n element.setRef(localName);\n } else {\n element.setRef(prefix + \"String_Node_Str\" + localName);\n }\n } else {\n element.setType(getTypeName(next, elementDecl.getJavaType(), referencedSchema));\n element.setName(localName);\n }\n choice.addElement(element);\n }\n if (parentCompositor instanceof Sequence) {\n ((Sequence) parentCompositor).addChoice(choice);\n } else if (parentCompositor instanceof Choice) {\n ((Choice) parentCompositor).addChoice(choice);\n }\n }\n } else if (!(ownerTypeInfo.getXmlValueProperty() != null && ownerTypeInfo.getXmlValueProperty() == next)) {\n Element element = new Element();\n if (!(parentCompositor instanceof All)) {\n element.setMinOccurs(next.isRequired() ? Occurs.ONE : Occurs.ZERO);\n }\n if (next.shouldSetNillable()) {\n element.setNillable(true);\n }\n if (next.isSetDefaultValue()) {\n element.setDefaultValue(next.getDefaultValue());\n }\n if (next.getMimeType() != null) {\n element.getAttributesMap().put(XMLConstants.EXPECTED_CONTENT_TYPES_QNAME, next.getMimeType());\n }\n QName elementName = next.getSchemaName();\n JavaClass javaType = next.getActualType();\n boolean isComplexType = false;\n element.setName(elementName.getLocalPart());\n String typeName = null;\n if (next.isXmlId()) {\n typeName = XMLConstants.SCHEMA_PREFIX + \"String_Node_Str\";\n } else if (next.isXmlIdRef()) {\n typeName = XMLConstants.SCHEMA_PREFIX + \"String_Node_Str\";\n } else {\n TypeInfo info = (TypeInfo) typeInfo.get(javaType.getQualifiedName());\n if (info != null) {\n isComplexType = info.isComplexType();\n if (isComplexType) {\n typeName = info.getComplexType().getName();\n } else if (info.getSimpleType() != null) {\n typeName = info.getSimpleType().getName();\n } else {\n typeName = info.getSchemaTypeName();\n }\n if (typeName == null) {\n if (!info.hasRootElement()) {\n if (info.isComplexType()) {\n element.setComplexType(info.getComplexType());\n } else {\n element.setSimpleType(info.getSimpleType());\n }\n }\n }\n if (addImportIfRequired(currentSchema, info.getSchema(), info.getClassNamespace())) {\n String prefix = currentSchema.getNamespaceResolver().resolveNamespaceURI(info.getClassNamespace());\n if (prefix != null && !typeName.equals(\"String_Node_Str\")) {\n typeName = prefix + \"String_Node_Str\" + typeName;\n }\n }\n } else if (!next.isMap()) {\n typeName = getTypeName(next, javaType, currentSchema);\n }\n if (typeName != null && !typeName.contains(\"String_Node_Str\")) {\n String prefix = getPrefixForNamespace(info.getSchema().getTargetNamespace(), currentSchema.getNamespaceResolver());\n if (prefix != null) {\n typeName = prefix + \"String_Node_Str\" + typeName;\n }\n }\n }\n if (next.getGenericType() != null) {\n if (next.isXmlList()) {\n SimpleType localSimpleType = new SimpleType();\n org.eclipse.persistence.internal.oxm.schema.model.List list = new org.eclipse.persistence.internal.oxm.schema.model.List();\n list.setItemType(typeName);\n localSimpleType.setList(list);\n element.setSimpleType(localSimpleType);\n } else {\n element.setMaxOccurs(Occurs.UNBOUNDED);\n element.setType(typeName);\n }\n } else if (next.isMap()) {\n ComplexType entryComplexType = new ComplexType();\n Sequence entrySequence = new Sequence();\n Element keyElement = new Element();\n keyElement.setName(Property.DEFAULT_KEY_NAME);\n keyElement.setMinOccurs(Occurs.ZERO);\n JavaClass keyType = next.getKeyType();\n JavaClass valueType = next.getValueType();\n if (keyType == null) {\n keyType = helper.getJavaClass(Object.class);\n }\n if (valueType == null) {\n valueType = helper.getJavaClass(Object.class);\n }\n QName keySchemaType = getSchemaTypeFor(keyType);\n if (keySchemaType != null) {\n TypeInfo targetInfo = this.typeInfo.get(keyType.getQualifiedName());\n if (targetInfo != null) {\n Schema keyElementSchema = this.getSchemaForNamespace(keySchemaType.getNamespaceURI());\n addImportIfRequired(currentSchema, keyElementSchema, keySchemaType.getNamespaceURI());\n }\n String prefix;\n if (keySchemaType.getNamespaceURI().equals(XMLConstants.SCHEMA_URL)) {\n prefix = XMLConstants.SCHEMA_PREFIX;\n } else {\n prefix = getPrefixForNamespace(keySchemaType.getNamespaceURI(), currentSchema.getNamespaceResolver());\n }\n if (prefix != null && !prefix.equals(\"String_Node_Str\")) {\n typeName = prefix + \"String_Node_Str\" + keySchemaType.getLocalPart();\n } else {\n typeName = keySchemaType.getLocalPart();\n }\n keyElement.setType(typeName);\n }\n entrySequence.addElement(keyElement);\n Element valueElement = new Element();\n valueElement.setName(Property.DEFAULT_VALUE_NAME);\n valueElement.setMinOccurs(Occurs.ZERO);\n QName valueSchemaType = getSchemaTypeFor(valueType);\n if (valueSchemaType != null) {\n TypeInfo targetInfo = this.typeInfo.get(valueType.getQualifiedName());\n if (targetInfo != null) {\n Schema valueElementSchema = this.getSchemaForNamespace(valueSchemaType.getNamespaceURI());\n addImportIfRequired(currentSchema, valueElementSchema, valueSchemaType.getNamespaceURI());\n }\n String prefix;\n if (valueSchemaType.getNamespaceURI().equals(XMLConstants.SCHEMA_URL)) {\n prefix = XMLConstants.SCHEMA_PREFIX;\n } else {\n prefix = getPrefixForNamespace(valueSchemaType.getNamespaceURI(), currentSchema.getNamespaceResolver());\n }\n if (prefix != null && !prefix.equals(\"String_Node_Str\")) {\n typeName = prefix + \"String_Node_Str\" + valueSchemaType.getLocalPart();\n } else {\n typeName = valueSchemaType.getLocalPart();\n }\n valueElement.setType(typeName);\n }\n entrySequence.addElement(valueElement);\n entryComplexType.setSequence(entrySequence);\n JavaClass descriptorClass = helper.getJavaClass(ownerTypeInfo.getDescriptor().getJavaClassName());\n JavaClass mapValueClass = helper.getJavaClass(MapValue.class);\n if (mapValueClass.isAssignableFrom(descriptorClass)) {\n element.setComplexType(entryComplexType);\n element.setMaxOccurs(Occurs.UNBOUNDED);\n } else {\n ComplexType complexType = new ComplexType();\n Sequence sequence = new Sequence();\n complexType.setSequence(sequence);\n Element entryElement = new Element();\n entryElement.setName(\"String_Node_Str\");\n entryElement.setMinOccurs(Occurs.ZERO);\n entryElement.setMaxOccurs(Occurs.UNBOUNDED);\n sequence.addElement(entryElement);\n entryElement.setComplexType(entryComplexType);\n element.setComplexType(complexType);\n }\n } else {\n element.setType(typeName);\n }\n String lookupNamespace = currentSchema.getTargetNamespace();\n if (lookupNamespace == null) {\n lookupNamespace = \"String_Node_Str\";\n }\n NamespaceInfo namespaceInfo = getNamespaceInfoForNamespace(lookupNamespace);\n boolean isElementFormQualified = false;\n if (namespaceInfo != null) {\n isElementFormQualified = namespaceInfo.isElementFormQualified();\n }\n if ((isElementFormQualified && !elementName.getNamespaceURI().equals(lookupNamespace)) || (!isElementFormQualified && !elementName.getNamespaceURI().equals(\"String_Node_Str\"))) {\n Element reference = new Element();\n reference.setMinOccurs(element.getMinOccurs());\n reference.setMaxOccurs(element.getMaxOccurs());\n Schema attributeSchema = this.getSchemaForNamespace(elementName.getNamespaceURI());\n if (attributeSchema != null && attributeSchema.getTopLevelElements().get(element.getName()) == null) {\n element.setMinOccurs(null);\n element.setMaxOccurs(null);\n attributeSchema.getTopLevelElements().put(element.getName(), element);\n }\n addImportIfRequired(currentSchema, attributeSchema, elementName.getNamespaceURI());\n String prefix = getPrefixForNamespace(elementName.getNamespaceURI(), currentSchema.getNamespaceResolver());\n if (prefix == null) {\n reference.setRef(element.getName());\n } else {\n reference.setRef(prefix + \"String_Node_Str\" + element.getName());\n }\n if (elementExistsInParticle(reference.getName(), reference.getRef(), parentCompositor) == null) {\n parentCompositor.addElement(reference);\n }\n } else {\n if (elementExistsInParticle(element.getName(), element.getRef(), parentCompositor) == null) {\n if (next.isPositional()) {\n element.setMaxOccurs(Occurs.UNBOUNDED);\n }\n parentCompositor.addElement(element);\n }\n }\n }\n }\n }\n }\n}\n"
|
"private IResultMetaData getRuntimeMetaData(DataSetHandle dataSetHandle) throws BirtException {\n QueryDefinition query = new QueryDefinition();\n query.setDataSetName(dataSetHandle.getQualifiedName());\n query.setMaxRows(1);\n query.setAutoBinding(true);\n IResultMetaData metaData = new QueryExecutionHelper(dataEngine, modelAdaptor, sessionContext, false, this.session).executeQuery(query).getResultMetaData();\n addResultSetColumn(dataSetHandle, metaData);\n if (MetaDataPopulator.needsUseResultHint(dataSetHandle, metaData)) {\n metaData = new QueryExecutionHelper(dataEngine, modelAdaptor, sessionContext, true).executeQuery(query).getResultMetaData();\n }\n return metaData;\n}\n"
|
"public void start(Stage aStage) throws Exception {\n Notifier theNotifier = new Notifier();\n stage = aStage;\n searchPreferences = new SearchPreferences();\n backend = new Backend(theNotifier);\n try {\n searchPreferences.initialize(backend);\n embeddedWebServer = new FrontendEmbeddedWebServer(aStage, backend);\n embeddedWebServer.start();\n } catch (BindException | LockReleaseFailedException | LockObtainFailedException e) {\n URL theURL = new URL(FrontendEmbeddedWebServer.getBringToFrontUrl());\n Object theContent = theURL.getContent();\n System.exit(0);\n }\n aStage.setTitle(\"String_Node_Str\");\n aStage.setWidth(800);\n aStage.setHeight(600);\n aStage.initStyle(StageStyle.TRANSPARENT);\n FXMLLoader theLoader = new FXMLLoader(getClass().getResource(\"String_Node_Str\"));\n AnchorPane theMainScene = theLoader.load();\n final DesktopSearchController theController = theLoader.getController();\n theController.configure(this, backend, FrontendEmbeddedWebServer.getSearchUrl(), stage.getOwner());\n Undecorator theUndecorator = new Undecorator(stage, theMainScene);\n theUndecorator.getStylesheets().add(\"String_Node_Str\");\n Scene theScene = new Scene(theUndecorator);\n theUndecorator.setStyle(\"String_Node_Str\");\n theScene.setFill(Color.TRANSPARENT);\n aStage.setScene(theScene);\n aStage.getIcons().add(new Image(getClass().getResourceAsStream(\"String_Node_Str\")));\n if (SystemTray.isSupported()) {\n Platform.setImplicitExit(false);\n SystemTray theTray = SystemTray.getSystemTray();\n PopupMenu theMenu = new PopupMenu();\n MenuItem theCloseItem = new MenuItem(\"String_Node_Str\");\n theCloseItem.addActionListener(e -> Platform.runLater(this::shutdown));\n theMenu.add(theCloseItem);\n MenuItem theShowItem = new MenuItem(\"String_Node_Str\");\n theShowItem.addActionListener(e -> Platform.runLater(() -> {\n stage.show();\n stage.toFront();\n }));\n theMenu.add(theShowItem);\n java.awt.Image theSystrayIcon = Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"String_Node_Str\"));\n TrayIcon theTrayIcon = new TrayIcon(theSystrayIcon, \"String_Node_Str\", theMenu);\n theTray.add(theTrayIcon);\n aStage.setOnCloseRequest(aEvent -> stage.hide());\n } else {\n aStage.setOnCloseRequest(aEvent -> shutdown());\n }\n aStage.show();\n}\n"
|
"public String[] getNames() {\n throw new RuntimeException(\"String_Node_Str\");\n}\n"
|
"public void initInternalStructure(DatabaseSession databaseSession) throws BimserverLockConflictException, BimserverDatabaseException {\n RecordIterator recordIterator = keyValueStore.getRecordIterator(CLASS_LOOKUP_TABLE, databaseSession);\n try {\n Record record = recordIterator.next();\n while (record != null) {\n String packageAndClassName = BinUtils.byteArrayToString(record.getValue());\n String packageName = packageAndClassName.substring(0, packageAndClassName.indexOf(\"String_Node_Str\"));\n String className = packageAndClassName.substring(packageAndClassName.indexOf(\"String_Node_Str\") + 1);\n EClass eClass = (EClass) getEClassifier(packageName, className);\n boolean transactional = !(eClass.getEPackage() == Ifc2x3tc1Package.eINSTANCE || eClass.getEPackage() == Ifc4Package.eINSTANCE);\n keyValueStore.openTable(packageAndClassName, transactional);\n for (EStructuralFeature eStructuralFeature : eClass.getEAllStructuralFeatures()) {\n if (eStructuralFeature.getEAnnotation(\"String_Node_Str\") != null) {\n String indexTableName = eClass.getEPackage().getName() + \"String_Node_Str\" + eClass.getName() + \"String_Node_Str\" + eStructuralFeature.getName();\n try {\n keyValueStore.openIndexTable(indexTableName, transactional);\n } catch (DatabaseNotFoundException e) {\n }\n }\n }\n Short cid = BinUtils.byteArrayToShort(record.getKey());\n cidToEclass[cid] = eClass;\n eClassToCid.put(eClass, cid);\n record = recordIterator.next();\n }\n } finally {\n recordIterator.close();\n }\n}\n"
|
"String getCompressor() {\n return Paths.get(directory, compressor).toString();\n}\n"
|
"public boolean equals(Object obj) {\n if (obj == null || obj.getClass() != getClass()) {\n return false;\n }\n StationIndex compareId = (StationIndex) obj;\n return index.equals(compareId.index) && side == compareId.side;\n}\n"
|
"public void onMessage(IMessage message) throws JFException {\n if (message.getOrder() != null && message.getOrder().getLabel().substring(0, id.length()).equals(id)) {\n String orderLabel = message.getOrder().getLabel();\n IMessage.Type messageType = message.getType();\n switch(messageType) {\n case ORDER_FILL_OK:\n case ORDER_CHANGED_OK:\n break;\n case ORDER_SUBMIT_OK:\n case ORDER_CLOSE_OK:\n case ORDERS_MERGE_OK:\n console.getOut().println(orderLabel + \"String_Node_Str\" + messageType);\n break;\n case NOTIFICATION:\n console.getNotif().println(orderLabel + \"String_Node_Str\" + message.getContent().replaceAll(\"String_Node_Str\", \"String_Node_Str\"));\n break;\n case ORDER_CHANGED_REJECTED:\n case ORDER_CLOSE_REJECTED:\n case ORDER_FILL_REJECTED:\n case ORDER_SUBMIT_REJECTED:\n case ORDERS_MERGE_REJECTED:\n console.getWarn().println(orderLabel + \"String_Node_Str\" + message.getContent());\n break;\n default:\n console.getErr().println(orderLabel + \"String_Node_Str\" + messageType + \"String_Node_Str\" + message.getContent());\n break;\n }\n }\n}\n"
|
"public void doUnzipWithoutDecryption() throws Exception {\n if (checkArchive && !org.talend.archive.IntegrityUtil.isZipValid(new java.io.File(sourceZip))) {\n Thread.sleep(1000);\n throw new RuntimeException(\"String_Node_Str\" + sourceZip + \"String_Node_Str\");\n }\n Thread.sleep(1000);\n org.apache.commons.compress.archivers.zip.ZipFile zip = null;\n try {\n zip = new org.apache.commons.compress.archivers.zip.ZipFile(sourceZip);\n java.util.Enumeration enuFiles = zip.getEntries();\n java.io.InputStream is = null;\n while (enuFiles.hasMoreElements()) {\n org.apache.commons.compress.archivers.zip.ZipArchiveEntry entry = (org.apache.commons.compress.archivers.zip.ZipArchiveEntry) enuFiles.nextElement();\n if (verbose) {\n System.out.println(\"String_Node_Str\" + entry.getName());\n }\n boolean isDirectory = entry.isDirectory();\n if (!isDirectory) {\n is = zip.getInputStream(entry);\n }\n String filename = entry.getName();\n util.output(targetDir, filename, isDirectory, is);\n applyLastModifiedTime(entry, filename);\n }\n boolean isDirectory = entry.isDirectory();\n if (!isDirectory) {\n is = zip.getInputStream(entry);\n }\n String filename = entry.getName();\n util.output(targetDir, filename, isDirectory, is);\n applyLastModifiedTime(entry, filename);\n }\n zip.close();\n}\n"
|
"static public DocumentBuilderFactory getDocumentBuilderFactory() {\n if (docBuilderFactory == null) {\n DocumentBuilderFactory newFactory = DocumentBuilderFactory.newInstance();\n newFactory.setNamespaceAware(true);\n newFactory.setIgnoringElementContentWhitespace(true);\n docBuilderFactory = newFactory;\n }\n return docBuilderFactory;\n}\n"
|
"public void setIRAndPc(IR ir, int pc) {\n setIR(ir);\n if (pc != NA) {\n setPc(pc);\n } else {\n removeSelection();\n }\n}\n"
|
"public void loadPauseScreen() {\n if (PauseScreen == null) {\n PauseScreen = new Scene();\n Text someText = new Text((base.getCameraWidth() / 2) - 10, (base.getCameraHeight() / 2) - 10, base.mFont, \"String_Node_Str\") {\n public boolean onAreaTouched(TouchEvent pSceneTouchEvent, float pTouchAreaLocalX, float pTouchAreaLocalY) {\n base.sm.GameScreen();\n return super.onAreaTouched(pSceneTouchEvent, pTouchAreaLocalX, pTouchAreaLocalY);\n }\n };\n Text restartText = new Text(someText.getX(), someText.getY() - someText.getHeight(), base.mFont, \"String_Node_Str\") {\n public boolean onAreaTouched(TouchEvent pSceneTouchEvent, float pTouchAreaLocalX, float pTouchAreaLocalY) {\n base.ButtonPress(9);\n return super.onAreaTouched(pSceneTouchEvent, pTouchAreaLocalX, pTouchAreaLocalY);\n }\n };\n Text openFeintText = new Text(someText.getX(), someText.getY() + someText.getHeight(), base.mFont, \"String_Node_Str\") {\n public boolean onAreaTouched(TouchEvent pSceneTouchEvent, float pTouchAreaLocalX, float pTouchAreaLocalY) {\n Dashboard.open();\n return super.onAreaTouched(pSceneTouchEvent, pTouchAreaLocalX, pTouchAreaLocalY);\n }\n };\n PauseScreen.registerTouchArea(someText);\n PauseScreen.registerTouchArea(restartText);\n PauseScreen.registerTouchArea(openFeintText);\n PauseScreen.attachChild(someText);\n PauseScreen.attachChild(restartText);\n PauseScreen.attachChild(openFeintText);\n }\n checkHud();\n base.getEngine().setScene(PauseScreen);\n CameraCheck();\n}\n"
|
"public Object getValue(IResultIterator resultIterator) throws BirtException {\n Object value = resultIterator.getValue(valueColumnName);\n return EngineTask.convertParameterType(value, valueType);\n}\n"
|
"public void setup() throws Exception {\n this.boxDirectory = new File(\"String_Node_Str\");\n this.z = 11;\n this.boxWidth = 148;\n this.boxHeight = 148;\n this.lastRow = 3;\n this.lastColumn = 3;\n this.overviewWidth = 80;\n final double layerMaxX = ((lastColumn + 1) * boxWidth) - 1;\n final double layerMaxY = ((lastRow + 1) * boxHeight) - 1;\n this.stackBounds = new Bounds(0.0, 0.0, layerMaxX, layerMaxY);\n filesAndDirectoriesToDelete = new ArrayList<>();\n}\n"
|
"public void init(IEditorSite site, IEditorInput input) throws PartInitException {\n if (input instanceof TmfEditorInput) {\n fResource = ((TmfEditorInput) input).getResource();\n fTrace = ((TmfEditorInput) input).getTrace();\n } else if (input instanceof IFileEditorInput) {\n fResource = ((IFileEditorInput) input).getFile();\n try {\n String traceTypeId = fResource.getPersistentProperty(TmfTraceElement.TRACETYPE);\n if (traceTypeId != null) {\n for (IConfigurationElement ce : TmfTraceType.getTypeElements()) {\n if (traceTypeId.equals(ce.getAttribute(TmfTraceType.ID_ATTR))) {\n fTrace = (ITmfTrace<?>) ce.createExecutableExtension(TmfTraceType.TRACE_TYPE_ATTR);\n TmfEvent event = (TmfEvent) ce.createExecutableExtension(TmfTraceType.EVENT_TYPE_ATTR);\n String path = fResource.getLocationURI().getPath();\n fTrace.initTrace(path, event.getClass(), true);\n break;\n }\n }\n }\n } catch (InvalidRegistryObjectException e) {\n e.printStackTrace();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (CoreException e) {\n e.printStackTrace();\n }\n input = new TmfEditorInput(fResource, fTrace);\n } else {\n throw new PartInitException(\"String_Node_Str\" + input.getClass());\n }\n if (fTrace == null) {\n throw new PartInitException(\"String_Node_Str\" + fResource.getName());\n }\n super.setSite(site);\n super.setInput(input);\n}\n"
|
"private void addEntry(final TheRLocation nextLocation) {\n final String nextFunctionName = nextLocation.getFunctionName();\n final TheRXFunctionDescriptor descriptor = myEntries.isEmpty() ? myRoot : resolveDescriptor(myEntries.listIterator(myEntries.size()), nextFunctionName);\n myEntries.add(new TheRXResolvingSessionEntry(descriptor, resolveLine(descriptor, nextLocation.getLine())));\n}\n"
|
"protected boolean inflateViews(Entry entry, ViewGroup parent) {\n PackageManager pmUser = getPackageManagerForUser(mContext, entry.notification.getUser().getIdentifier());\n final StatusBarNotification sbn = entry.notification;\n entry.cacheContentViews(mContext, null);\n final RemoteViews contentView = entry.cachedContentView;\n final RemoteViews bigContentView = entry.cachedBigContentView;\n final RemoteViews headsUpContentView = entry.cachedHeadsUpContentView;\n final RemoteViews publicContentView = entry.cachedPublicContentView;\n if (contentView == null) {\n Log.v(TAG, \"String_Node_Str\" + sbn.getNotification());\n return false;\n }\n if (DEBUG) {\n Log.v(TAG, \"String_Node_Str\" + publicContentView);\n }\n ExpandableNotificationRow row;\n boolean hasUserChangedExpansion = false;\n boolean userExpanded = false;\n boolean userLocked = false;\n if (entry.row != null) {\n row = entry.row;\n hasUserChangedExpansion = row.hasUserChangedExpansion();\n userExpanded = row.isUserExpanded();\n userLocked = row.isUserLocked();\n entry.reset();\n if (hasUserChangedExpansion) {\n row.setUserExpanded(userExpanded);\n }\n } else {\n LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n row = (ExpandableNotificationRow) inflater.inflate(R.layout.status_bar_notification_row, parent, false);\n row.setExpansionLogger(this, entry.notification.getKey());\n row.setGroupManager(mGroupManager);\n row.setHeadsUpManager(mHeadsUpManager);\n row.setRemoteInputController(mRemoteInputController);\n row.setOnExpandClickListener(this);\n final String pkg = sbn.getPackageName();\n String appname = pkg;\n try {\n final ApplicationInfo info = pmUser.getApplicationInfo(pkg, PackageManager.GET_UNINSTALLED_PACKAGES | PackageManager.GET_DISABLED_COMPONENTS);\n if (info != null) {\n appname = String.valueOf(pmUser.getApplicationLabel(info));\n }\n } catch (NameNotFoundException e) {\n }\n row.setAppName(appname);\n }\n workAroundBadLayerDrawableOpacity(row);\n bindDismissListener(row);\n NotificationContentView contentContainer = row.getPrivateLayout();\n NotificationContentView contentContainerPublic = row.getPublicLayout();\n row.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);\n if (ENABLE_REMOTE_INPUT) {\n row.setDescendantFocusability(ViewGroup.FOCUS_BEFORE_DESCENDANTS);\n }\n mNotificationClicker.register(row, sbn);\n View contentViewLocal = null;\n View bigContentViewLocal = null;\n View headsUpContentViewLocal = null;\n View publicViewLocal = null;\n try {\n contentViewLocal = contentView.apply(sbn.getPackageContext(mContext), contentContainer, mOnClickHandler);\n if (bigContentView != null) {\n bigContentViewLocal = bigContentView.apply(sbn.getPackageContext(mContext), contentContainer, mOnClickHandler);\n }\n if (headsUpContentView != null) {\n headsUpContentViewLocal = headsUpContentView.apply(sbn.getPackageContext(mContext), contentContainer, mOnClickHandler);\n }\n if (publicContentView != null) {\n publicViewLocal = publicContentView.apply(sbn.getPackageContext(mContext), contentContainerPublic, mOnClickHandler);\n }\n } catch (RuntimeException e) {\n final String ident = sbn.getPackageName() + \"String_Node_Str\" + Integer.toHexString(sbn.getId());\n Log.e(TAG, \"String_Node_Str\" + ident, e);\n return false;\n }\n if (contentViewLocal != null) {\n contentViewLocal.setIsRootNamespace(true);\n contentContainer.setContractedChild(contentViewLocal);\n }\n if (bigContentViewLocal != null) {\n bigContentViewLocal.setIsRootNamespace(true);\n contentContainer.setExpandedChild(bigContentViewLocal);\n }\n if (headsUpContentViewLocal != null) {\n headsUpContentViewLocal.setIsRootNamespace(true);\n contentContainer.setHeadsUpChild(headsUpContentViewLocal);\n }\n if (publicViewLocal != null) {\n publicViewLocal.setIsRootNamespace(true);\n contentContainerPublic.setContractedChild(publicViewLocal);\n }\n try {\n ApplicationInfo info = pmUser.getApplicationInfo(sbn.getPackageName(), 0);\n entry.targetSdk = info.targetSdkVersion;\n } catch (NameNotFoundException ex) {\n Log.e(TAG, \"String_Node_Str\" + sbn.getPackageName(), ex);\n }\n entry.autoRedacted = entry.notification.getNotification().publicVersion == null;\n if (MULTIUSER_DEBUG) {\n TextView debug = (TextView) row.findViewById(R.id.debug_info);\n if (debug != null) {\n debug.setVisibility(View.VISIBLE);\n debug.setText(\"String_Node_Str\" + mCurrentUserId + \"String_Node_Str\" + entry.notification.getUserId());\n }\n }\n entry.row = row;\n entry.row.setOnActivatedListener(this);\n entry.row.setExpandable(bigContentViewLocal != null);\n applyColorsAndBackgrounds(sbn, entry);\n if (hasUserChangedExpansion) {\n row.setUserExpanded(userExpanded);\n }\n row.setUserLocked(userLocked);\n row.onNotificationUpdated(entry);\n return true;\n}\n"
|
"public Map<String, SymbolType> createMapping(Class<?> interfaceToInspect, SymbolType inferredArg, Executable method) throws Exception {\n Map<String, SymbolType> typeMapping = new HashMap<String, SymbolType>();\n GenericsBuilderFromClassParameterTypes builder = new GenericsBuilderFromClassParameterTypes(typeMapping, scope, symTable);\n builder.build(method.getDeclaringClass());\n typeMapping = builder.getTypeMapping();\n Map<String, SymbolType> update = new HashMap<String, SymbolType>();\n Map<String, List<String>> equivalences = new HashMap<String, List<String>>();\n createEquivalenceMapping(classToInspect, interfaceToInspect, equivalences);\n Set<String> keys = equivalences.keySet();\n for (String key : keys) {\n SymbolType st1 = update.get(key);\n Class<?> clazz = st1.getClazz();\n if (Object.class.equals(clazz)) {\n SymbolType aux = typeMapping.get(key);\n if (aux != null) {\n subset.put(key, aux);\n }\n }\n }\n update.clear();\n if (inferredArg != null) {\n SymbolType.valueOf(interfaceToInspect, inferredArg, update, subset);\n }\n update.putAll(subset);\n return update;\n}\n"
|
"public void setMaxPlayers(short maxPlayer) {\n if (maxPlayer <= 0 || maxPlayer > CommonConstants.MAX_PLAYERS) {\n throw new IllegalArgumentException(\"String_Node_Str\" + CommonConstants.MAX_PLAYERS);\n }\n ShortPoint2D[] newPlayerStarts = new ShortPoint2D[maxPlayer];\n for (int i = 0; i < maxPlayer; i++) {\n newPlayerStarts[i] = i < playerCount ? playerStarts[i] : new ShortPoint2D(width / 2, height / 2);\n }\n this.playercount = maxPlayer;\n this.playerStarts = newPlayerStarts;\n}\n"
|
"public void fileReport(String outputDir) {\n String filename = text.replaceAll(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\";\n StringBuilder sb = new StringBuilder();\n sb.append(\"String_Node_Str\" + text);\n sb.append(\"String_Node_Str\");\n try {\n Files.write(Paths.get(outputDir, filename), sb.toString().getBytes(\"String_Node_Str\"), StandardOpenOption.APPEND);\n } catch (UnsupportedEncodingException e) {\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n synchronized (texts) {\n for (Text t : texts) {\n sb = new StringBuilder();\n sb.append(\"String_Node_Str\" + t.filename + \"String_Node_Str\");\n sb.append(\"String_Node_Str\" + t.text);\n try {\n Files.write(Paths.get(outputDir, filename), sb.toString().getBytes(\"String_Node_Str\"), StandardOpenOption.APPEND);\n } catch (UnsupportedEncodingException e) {\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n }\n}\n"
|
"public static FactorGraph getLinearChainGraph() {\n FactorGraph fg = new FactorGraph();\n Var t0 = new Var(VarType.PREDICTED, 2, \"String_Node_Str\", null);\n Var t1 = new Var(VarType.PREDICTED, 2, \"String_Node_Str\", null);\n Var t2 = new Var(VarType.PREDICTED, 2, \"String_Node_Str\", null);\n ExplicitFactor emit0 = new ExplicitFactor(new VarSet(t0));\n ExplicitFactor emit1 = new ExplicitFactor(new VarSet(t1));\n ExplicitFactor emit2 = new ExplicitFactor(new VarSet(t2));\n emit0.setValue(0, 0.1);\n emit0.setValue(1, 0.9);\n emit1.setValue(0, 0.3);\n emit1.setValue(1, 0.7);\n emit2.setValue(0, 0.5);\n emit2.setValue(1, 0.5);\n ExplicitFactor tran0 = new ExplicitFactor(new VarSet(t0, t1));\n ExplicitFactor tran1 = new ExplicitFactor(new VarSet(t1, t2));\n tran0.fill(1);\n tran0.setValue(0, 0.2);\n tran0.setValue(1, 0.4);\n tran0.setValue(2, 0.3);\n tran0.setValue(3, 0.5);\n tran1.fill(1);\n tran1.setValue(0, 1.2);\n tran1.setValue(1, 1.3);\n tran1.setValue(2, 1.4);\n tran1.setValue(3, 1.5);\n fg.addFactor(emit0);\n fg.addFactor(emit1);\n fg.addFactor(emit2);\n fg.addFactor(tran0);\n fg.addFactor(tran1);\n for (Factor f : fg.getFactors()) {\n ((ExplicitFactor) f).convertRealToLog();\n }\n return fg;\n}\n"
|
"public void onDestroy() {\n if (deleteDialog != null) {\n deleteDialog.cancel();\n }\n if (modPlayer != null) {\n try {\n modPlayer.unregisterCallback(playerCallback);\n } catch (RemoteException e) {\n Log.e(TAG, \"String_Node_Str\");\n }\n }\n unregisterReceiver(screenReceiver);\n try {\n unbindService(connection);\n Log.i(TAG, \"String_Node_Str\");\n } catch (IllegalArgumentException e) {\n Log.i(TAG, \"String_Node_Str\");\n }\n super.onDestroy();\n}\n"
|
"public void run() {\n Looper.prepare();\n Realm realm = Realm.getInstance(realmConfig);\n try {\n realm.waitForChange();\n fail();\n } catch (IllegalStateException ignored) {\n } finally {\n realm.close();\n bgRealmClosed.countDown();\n }\n}\n"
|
"public void stopMonitoring() {\n if (!monitorStarted)\n return;\n try {\n beaconManager.stopMonitoringBeaconsInRegion(region);\n Log.d(TAG, \"String_Node_Str\");\n } catch (RemoteException e) {\n Log.e(TAG, \"String_Node_Str\", e);\n }\n}\n"
|
"private int getFloatPosition(int y, int position, int top) {\n final int floatViewMidY = Math.max(mFloatViewHeightHalf + getPaddingTop(), Math.min(getHeight() - getPaddingBottom() - mFloatViewHeightHalf, y - mDragPointY + mFloatViewHeightHalf));\n int visItemTop;\n int visItemPos;\n final int divHeight = getDividerHeight();\n switch(mDragState) {\n case SRC_ABOVE:\n visItemTop = top;\n if (position == mSrcDragPos + 1) {\n visItemTop -= mItemHeightCollapsed + divHeight;\n }\n if (position > mSrcDragPos && position <= mExpDragPos) {\n visItemPos = position - 1;\n } else {\n visItemPos = position;\n }\n break;\n case SRC_BELOW:\n visItemTop = top;\n if (position == mSrcDragPos) {\n visItemTop += mItemHeightCollapsed + divHeight;\n }\n if (position < mSrcDragPos && position >= mExpDragPos) {\n visItemPos = position + 1;\n } else {\n visItemPos = position;\n }\n break;\n default:\n visItemTop = top;\n visItemPos = position;\n }\n int edge = getDragEdge(visItemPos, visItemTop);\n if (floatViewMidY < edge) {\n while (visItemPos >= 0) {\n visItemPos--;\n if (visItemPos <= 0) {\n visItemPos = 0;\n break;\n }\n visItemTop -= getVisualItemHeight(visItemPos);\n edge = getDragEdge(visItemPos, visItemTop);\n if (floatViewMidY >= edge) {\n break;\n }\n }\n } else {\n final int count = getCount();\n while (visItemPos < count) {\n if (visItemPos == count - 1) {\n break;\n }\n visItemTop += getVisualItemHeight(visItemPos);\n edge = getDragEdge(visItemPos + 1, visItemTop);\n if (floatViewMidY < edge) {\n break;\n }\n visItemPos++;\n }\n }\n final int numHeaders = getHeaderViewsCount();\n final int numFooters = getFooterViewsCount();\n if (visItemPos < numHeaders) {\n return numHeaders;\n } else if (visItemPos >= getCount() - numFooters) {\n return getCount() - numFooters - 1;\n }\n return visItemPos;\n}\n"
|
"static ActivityRecord restoreFromXml(XmlPullParser in, int taskId, ActivityStackSupervisor stackSupervisor) throws IOException, XmlPullParserException {\n Intent intent = null;\n PersistableBundle persistentState = null;\n int launchedFromUid = 0;\n String launchedFromPackage = null;\n String resolvedType = null;\n boolean componentSpecified = false;\n int userId = 0;\n long createTime = -1;\n final int outerDepth = in.getDepth();\n TaskDescription taskDescription = new TaskDescription();\n for (int attrNdx = in.getAttributeCount() - 1; attrNdx >= 0; --attrNdx) {\n final String attrName = in.getAttributeName(attrNdx);\n final String attrValue = in.getAttributeValue(attrNdx);\n if (TaskPersister.DEBUG)\n Slog.d(TaskPersister.TAG, \"String_Node_Str\" + attrName + \"String_Node_Str\" + attrValue);\n if (ATTR_ID.equals(attrName)) {\n createTime = Long.valueOf(attrValue);\n } else if (ATTR_LAUNCHEDFROMUID.equals(attrName)) {\n launchedFromUid = Integer.valueOf(attrValue);\n } else if (ATTR_LAUNCHEDFROMPACKAGE.equals(attrName)) {\n launchedFromPackage = attrValue;\n } else if (ATTR_RESOLVEDTYPE.equals(attrName)) {\n resolvedType = attrValue;\n } else if (ATTR_COMPONENTSPECIFIED.equals(attrName)) {\n componentSpecified = Boolean.valueOf(attrValue);\n } else if (ATTR_USERID.equals(attrName)) {\n userId = Integer.valueOf(attrValue);\n } else if (TaskRecord.readTaskDescriptionAttribute(taskDescription, attrName, attrValue)) {\n } else {\n Log.d(TAG, \"String_Node_Str\" + attrName);\n }\n }\n int event;\n while (((event = in.next()) != XmlPullParser.END_DOCUMENT) && (event != XmlPullParser.END_TAG || in.getDepth() < outerDepth)) {\n if (event == XmlPullParser.START_TAG) {\n final String name = in.getName();\n if (TaskPersister.DEBUG)\n Slog.d(TaskPersister.TAG, \"String_Node_Str\" + name);\n if (TAG_INTENT.equals(name)) {\n intent = Intent.restoreFromXml(in);\n if (TaskPersister.DEBUG)\n Slog.d(TaskPersister.TAG, \"String_Node_Str\" + intent);\n } else if (TAG_PERSISTABLEBUNDLE.equals(name)) {\n persistentState = PersistableBundle.restoreFromXml(in);\n if (TaskPersister.DEBUG)\n Slog.d(TaskPersister.TAG, \"String_Node_Str\" + persistentState);\n } else {\n Slog.w(TAG, \"String_Node_Str\" + name);\n XmlUtils.skipCurrentTag(in);\n }\n }\n }\n if (intent == null) {\n throw new XmlPullParserException(\"String_Node_Str\" + intent);\n }\n final ActivityManagerService service = stackSupervisor.mService;\n final ActivityInfo aInfo = stackSupervisor.resolveActivity(intent, resolvedType, 0, null, null, userId);\n if (aInfo == null) {\n throw new XmlPullParserException(\"String_Node_Str\" + intent + \"String_Node_Str\" + resolvedType);\n }\n final ActivityRecord r = new ActivityRecord(service, null, launchedFromUid, launchedFromPackage, intent, resolvedType, aInfo, service.getConfiguration(), null, null, 0, componentSpecified, stackSupervisor, null, null);\n r.persistentState = persistentState;\n if (createTime >= 0) {\n taskDescription.setIcon(TaskPersister.restoreImage(createImageFilename(createTime, taskId)));\n }\n r.taskDescription = taskDescription;\n r.createTime = createTime;\n return r;\n}\n"
|
"private static ImageLayout layoutHelper(Vector sources, ImageLayout il) {\n ImageLayout layout = (il == null) ? new ImageLayout() : (ImageLayout) il.clone();\n int numSources = sources.size();\n int destNumBands = totalNumBands(sources);\n int destDataType = DataBuffer.TYPE_BYTE;\n RenderedImage srci = (RenderedImage) sources.get(0);\n Rectangle destBounds = new Rectangle(srci.getMinX(), srci.getMinY(), srci.getWidth(), srci.getHeight());\n for (int i = 0; i < numSources; i++) {\n srci = (RenderedImage) sources.get(i);\n destBounds = destBounds.intersection(new Rectangle(srci.getMinX(), srci.getMinY(), srci.getWidth(), srci.getHeight()));\n int typei = srci.getSampleModel().getTransferType();\n destDataType = typei > destDataType ? typei : destDataType;\n }\n SampleModel sm = layout.getSampleModel((RenderedImage) sources.get(0));\n if (sm.getNumBands() < destNumBands) {\n int[] destOffsets = new int[destNumBands];\n for (int i = 0; i < destNumBands; i++) {\n destOffsets[i] = i;\n }\n int destTileWidth = sm.getWidth();\n int destTileHeight = sm.getHeight();\n if (layout.isValid(ImageLayout.TILE_WIDTH_MASK)) {\n destTileWidth = layout.getTileWidth((RenderedImage) sources.get(0));\n }\n if (layout.isValid(ImageLayout.TILE_HEIGHT_MASK)) {\n destTileHeight = layout.getTileHeight((RenderedImage) sources.get(0));\n }\n sm = RasterFactory.createComponentSampleModel(sm, destDataType, destTileWidth, destTileHeight, destNumBands);\n layout.setSampleModel(sm);\n }\n ColorModel cm = layout.getColorModel(null);\n if (cm != null && !JDKWorkarounds.areCompatibleDataModels(sm, cm)) {\n layout.unsetValid(ImageLayout.COLOR_MODEL_MASK);\n }\n return layout;\n}\n"
|
"private void createAssistText(org.eclipse.swt.graphics.Point cursorRelativePosition) {\n if (bindingService != null) {\n bindingService.setKeyFilterEnabled(false);\n }\n highlightOveredConnection(cursorRelativePosition);\n assistText = new Text((Composite) graphicControl, SWT.BORDER);\n assistText.setLocation(cursorRelativePosition.x, cursorRelativePosition.y - assistText.getLineHeight());\n assistText.setSize(200, assistText.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);\n assistText.setFocus();\n TalendEditorComponentProposalProvider proposalProvider = new TalendEditorComponentProposalProvider(this, proposalList, process);\n contentProposalAdapter = new ContentProposalAdapter(assistText, new TextContentAdapter(), proposalProvider, null, null);\n contentProposalAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);\n contentProposalAdapter.setLabelProvider(new TalendEditorComponentLabelProvider(assistText));\n}\n"
|
"public void onCurrencySubtraction(CurrencySubtractEvent event) {\n if (event.isSubtracted()) {\n return;\n }\n World world = event.getWorld();\n provider.withdrawPlayer(NameManager.getUsername(event.getTarget()), world.getName(), event.getDoubleAmount());\n}\n"
|
"private Set<String> availablePermissions(final UserInfo userInfo) {\n Set<String> availablePermissions = new HashSet<>();\n if (userInfo.getUserId() != 1) {\n Set<String> roles = userInfo.getRoles();\n if (roles != null && roles.size() > 0) {\n List<Role> roleList = roleService.getRoleByName(roles);\n for (Role role : roleList) {\n if (role.getPermissions() != null) {\n for (Permission permission : role.getPermissions()) {\n if (Status.ACTIVE.getStatusEntity().getStatus().equalsIgnoreCase(permission.getStatus())) {\n availablePermissions.add(permission.getName());\n }\n }\n }\n }\n }\n }\n return availablePermissions;\n}\n"
|
"public boolean validateTool(ItemStack item) {\n int id = item.getTypeId();\n if (id >= 256 && id <= 259 || id >= 267 && id <= 279 || id >= 283 && id <= 286 || id >= 290 && id <= 294 || id == 346) {\n return true;\n } else {\n return false;\n }\n}\n"
|
"private void DisplayName() {\n if (cb.hasBukkitContrib) {\n BukkitContrib.getAppearanceManager().setGlobalTitle(MyWolf, ChatColor.AQUA + Name);\n }\n}\n"
|
"public static String translateJapanesePersonNameToRomaji(String japanesePersonName) {\n for (int i = 0; i < japanesePersonName.length(); i++) {\n if (JapaneseCharacter.isKanji(japanesePersonName.charAt(i)))\n return translateStringJapaneseToEnglish(japanesePersonName);\n }\n String romaji = JapaneseCharacter.convertToRomaji(japanesePersonName);\n if (romaji != null) {\n romaji = WordUtils.capitalize(romaji).trim();\n return romaji;\n else\n return translateStringJapaneseToEnglish(japanesePersonName);\n}\n"
|
"private void onHighlight(HighlightBrickEvent event) {\n BrickColumnManager manager = stratomex.getBrickColumnManager();\n BrickColumn brickColumn = manager.getBrickColumn(event.getStratification());\n if (brickColumn == null)\n return;\n ElementLayout layout = null;\n if (event.getGroup() == null) {\n layout = brickColumn.getLayout();\n } else {\n Group g = event.getGroup();\n for (GLBrick brick : brickColumn.getSegmentBricks()) {\n if (g.equals(brick.getTablePerspective().getRecordGroup())) {\n layout = brick.getLayout();\n break;\n }\n }\n }\n if (layout == null)\n return;\n if (!event.isHighlight()) {\n layout.clearBackgroundRenderers();\n } else {\n layout.addBackgroundRenderer(new BrickHighlightRenderer(event.getColor().getColorComponents(null)));\n }\n if (layout.getLayoutManager() != null)\n layout.updateSubLayout();\n}\n"
|
"protected String getCompName(Object currentComponent) {\n return getComponentName((Widget) currentComponent);\n}\n"
|
"public void put(String jvmUuid, String signature, long invokedAtMillis, long millisSinceJvmStart, SignatureConfidence confidence) {\n if (signature == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (invokedAtMillis < 0) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (invokedAtMillis > 0 && invokedAtMillis < jvmStartedAtMillis) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n int count = jdbcTemplate.queryForObject(\"String_Node_Str\" + \"String_Node_Str\", Integer.class, jvmUuid, signature, invokedAtMillis);\n if (count == 0) {\n jdbcTemplate.update(\"String_Node_Str\" + \"String_Node_Str\", jvmUuid, signature, invokedAtMillis, millisSinceJvmStart, confidence == null ? -1 : confidence.ordinal());\n }\n}\n"
|
"public void search(String query) {\n fragment = new LocatedLibraryListFragment();\n Bundle args = new Bundle();\n args.putInt(\"String_Node_Str\", LEVEL_LIBRARY);\n fragment.setArguments(args);\n Set<LibrarySearchResult> data = new HashSet<LibrarySearchResult>();\n query = query.toLowerCase(Locale.GERMAN);\n for (Library lib : libraries) {\n int rank = 0;\n if (lib.getCity().toLowerCase(Locale.GERMAN).contains(query))\n rank += 3;\n if (lib.getTitle().toLowerCase(Locale.GERMAN).contains(query))\n rank += 3;\n if (lib.getState().toLowerCase(Locale.GERMAN).contains(query))\n rank += 2;\n if (lib.getCountry().toLowerCase(Locale.GERMAN).contains(query))\n rank += 1;\n if (rank > 0) {\n data.add(new LibrarySearchResult(lib, rank));\n }\n }\n List<LibrarySearchResult> list = new ArrayList<LibrarySearchResult>(data);\n Collections.sort(list);\n List<Library> libraries = new ArrayList<Library>();\n for (LibrarySearchResult sr : list) {\n libraries.add(sr.getLibrary());\n }\n LibraryAdapter adapter = new LibraryAdapter(this, R.layout.listitem_library, R.id.tvTitle, libraries);\n fragment.setListAdapter(adapter);\n if (findViewById(R.id.llFragments) != null) {\n fragment4 = fragment;\n getSupportFragmentManager().beginTransaction().replace(R.id.container4, fragment4).commit();\n } else {\n this.fragment = fragment;\n getSupportFragmentManager().beginTransaction().replace(R.id.container, fragment).addToBackStack(null).setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN).commit();\n }\n TextView tvLocateString = (TextView) findViewById(R.id.tvLocateString);\n ImageView ivLocationIcon = (ImageView) findViewById(R.id.ivLocationIcon);\n tvLocateString.setText(R.string.alphabetic_list);\n ivLocationIcon.setImageResource(R.drawable.ic_list);\n}\n"
|
"public ContainerDefinition findContainerWithExposedPort(EcsPushDefinition definition, boolean isAlb) {\n if (!getTaskType(definition).equals(TaskType.WEB)) {\n throw new AwsExecException(\"String_Node_Str\");\n }\n ContainerDefinition container = null;\n for (ContainerDefinition containerDefinition : definition.getContainerDefinitions()) {\n if (containerDefinition.getPortMappings() != null && !containerDefinition.getPortMappings().isEmpty()) {\n for (PortMapping p : containerDefinition.getPortMappings()) {\n if (p.getHostPort() == 0) {\n if (container == null) {\n container = containerDefinition;\n } else {\n throw new AwsExecException(\"String_Node_Str\");\n }\n }\n }\n }\n }\n if (container != null) {\n if (!isAlb) {\n int randomPort = (int) ((Math.random() * (DOCKER_MAX_PORT - DOCKER_MIN_PORT)) + DOCKER_MIN_PORT);\n container.getPortMappings().get(0).setHostPort(randomPort);\n }\n } else {\n throw new AwsExecException(\"String_Node_Str\");\n }\n return container;\n}\n"
|
"protected void doRelease() {\n result.releaseBuffer(this);\n node = null;\n dataInput = null;\n dataGeneralized = null;\n dataAggregated = null;\n registry = null;\n subset = null;\n columnToDataType = null;\n columnToIndex = null;\n columnToData = null;\n definition = null;\n header = null;\n headerMap = null;\n node = null;\n}\n"
|
"static final AutoScale computeScale(IDisplayServer xs, OneAxis ax, DataSetIterator dsi, int iType, double dStart, double dEnd, AxisOrigin axisOrigin, RunTimeContext rtc, int direction, double zoomFactor, int iMarginPercent, PlotComputation plotComp) throws ChartException {\n final Scale scModel = ax.getModelAxis().getScale();\n final FormatSpecifier fs = ax.getFormatSpecifier();\n final Label la = ax.getLabel();\n final int iLabelLocation = ax.getLabelPosition();\n final int iOrientation = ax.getOrientation();\n DataElement oMinimum = scModel.getMin();\n DataElement oMaximum = scModel.getMax();\n final Double oStep = scModel.isSetStep() ? new Double(scModel.getStep()) : null;\n final Integer oStepNumber = scModel.isSetStepNumber() ? Integer.valueOf(scModel.getStepNumber()) : null;\n AutoScale sc = null;\n AutoScale scCloned = null;\n final Object oMinValue, oMaxValue;\n final boolean bIsPercent = ax.getModelAxis().isPercent();\n if (scModel.isSetFactor() && (iType & LINEAR) == LINEAR && !ax.isCategoryScale()) {\n double factor = scModel.getFactor() * 72 / xs.getDpiResolution();\n Object oValue;\n double dValue, dMinValue = Double.MAX_VALUE, dMaxValue = -Double.MAX_VALUE;\n dsi.reset();\n double dPrecision = Double.NaN;\n while (dsi.hasNext()) {\n oValue = dsi.next();\n if (oValue == null) {\n continue;\n }\n dValue = ((Double) oValue).doubleValue();\n if (dValue < dMinValue)\n dMinValue = dValue;\n if (dValue > dMaxValue)\n dMaxValue = dValue;\n dPrecision = getPrecision(dPrecision, dValue, fs, rtc.getULocale(), bIsPercent);\n }\n if (oMinimum != null && oMinimum instanceof NumberDataElement) {\n dMinValue = ((NumberDataElement) oMinimum).getValue();\n }\n double length = Math.abs(dEnd - dStart);\n double valueLength = length * factor;\n dMaxValue = dMinValue + valueLength;\n double dStep = 1;\n double dDelta = dMaxValue - dMinValue;\n if (dDelta == 0) {\n dStep = dPrecision;\n } else {\n dStep = Math.floor(Math.log(dDelta) / LOG_10);\n dStep = Math.pow(10, dStep);\n if (dStep < dPrecision) {\n dStep = dPrecision;\n }\n }\n ScaleInfo info = new ScaleInfo(plotComp, iType, rtc, fs, ax, direction, scModel.isAutoExpand()).dZoomFactor(zoomFactor).iMarginPercent(iMarginPercent).dPrecision(dPrecision).bStepFixed(true).dsiData(dsi).dFactor(factor);\n sc = new AutoScale(info);\n sc.setMinimum(Double.valueOf(0));\n sc.setMaximum(Double.valueOf(0));\n sc.setStep(new Double(dStep));\n sc.setStepNumber(oStepNumber);\n setStepToScale(sc, oStep, null, rtc);\n oMinValue = new Double(dMinValue);\n oMaxValue = new Double(dMaxValue);\n sc.setMinimum(oMinValue);\n sc.setMaximum(oMaxValue);\n sc.computeTicks(xs, la, iLabelLocation, iOrientation, dStart, dEnd, false, null);\n sc.setData(dsi);\n return sc;\n }\n if ((iType & TEXT) == TEXT || ax.isCategoryScale()) {\n ScaleInfo info = new ScaleInfo(plotComp, iType, rtc, fs, ax, direction, scModel.isAutoExpand()).dZoomFactor(zoomFactor).iMarginPercent(iMarginPercent);\n sc = new AutoScale(info);\n sc.setData(dsi);\n sc.computeTicks(xs, ax.getLabel(), iLabelLocation, iOrientation, dStart, dEnd, false, null);\n oMinValue = null;\n oMaxValue = null;\n } else if ((iType & LINEAR) == LINEAR) {\n Object oValue;\n double dValue, dMinValue = Double.MAX_VALUE, dMaxValue = -Double.MAX_VALUE;\n dsi.reset();\n double dPrecision = Double.NaN;\n ;\n while (dsi.hasNext()) {\n oValue = dsi.next();\n if (oValue == null) {\n continue;\n }\n dValue = ((Double) oValue).doubleValue();\n if (dValue < dMinValue)\n dMinValue = dValue;\n if (dValue > dMaxValue)\n dMaxValue = dValue;\n dPrecision = getPrecision(dPrecision, dValue, fs, rtc.getULocale(), bIsPercent);\n }\n if (axisOrigin != null && axisOrigin.getType().equals(IntersectionType.VALUE_LITERAL) && axisOrigin.getValue() instanceof NumberDataElement) {\n double origin = asDouble(axisOrigin.getValue()).doubleValue();\n if (oMinimum == null && origin < dMinValue) {\n oMinimum = axisOrigin.getValue();\n }\n if (oMaximum == null && origin > dMaxValue) {\n oMaximum = axisOrigin.getValue();\n }\n }\n final double dAbsMax = Math.abs(dMaxValue);\n final double dAbsMin = Math.abs(dMinValue);\n double dStep = Math.max(dAbsMax, dAbsMin);\n double dDelta = dMaxValue - dMinValue;\n if (dDelta == 0) {\n dStep = dPrecision;\n } else {\n dStep = Math.floor(Math.log(dDelta) / LOG_10);\n dStep = Math.pow(10, dStep);\n if (dStep < dPrecision) {\n dStep = dPrecision;\n }\n }\n ScaleInfo info = new ScaleInfo(plotComp, iType, rtc, fs, ax, direction, scModel.isAutoExpand()).dZoomFactor(zoomFactor).iMarginPercent(iMarginPercent).dPrecision(dPrecision);\n sc = new AutoScale(info);\n sc.setMaximum(Double.valueOf(0));\n sc.setMinimum(Double.valueOf(0));\n sc.setStep(new Double(dStep));\n sc.setStepNumber(oStepNumber);\n sc.setData(dsi);\n setNumberMinMaxToScale(sc, oMinimum, oMaximum, rtc, ax);\n setStepToScale(sc, oStep, oStepNumber, rtc);\n oMinValue = new Double(dMinValue);\n oMaxValue = new Double(dMaxValue);\n sc.updateAxisMinMax(oMinValue, oMaxValue);\n } else if ((iType & LOGARITHMIC) == LOGARITHMIC) {\n Object oValue;\n double dValue, dMinValue = Double.MAX_VALUE, dMaxValue = -Double.MAX_VALUE;\n if ((iType & PERCENT) == PERCENT) {\n dMinValue = 0;\n dMaxValue = 100;\n } else {\n dsi.reset();\n while (dsi.hasNext()) {\n oValue = dsi.next();\n if (oValue == null) {\n continue;\n }\n dValue = ((Double) oValue).doubleValue();\n if (dValue < dMinValue)\n dMinValue = dValue;\n if (dValue > dMaxValue)\n dMaxValue = dValue;\n }\n if (axisOrigin != null && axisOrigin.getType().equals(IntersectionType.VALUE_LITERAL) && axisOrigin.getValue() instanceof NumberDataElement) {\n double origin = asDouble(axisOrigin.getValue()).doubleValue();\n if (oMinimum == null && origin < dMinValue) {\n oMinimum = axisOrigin.getValue();\n }\n if (oMaximum == null && origin > dMaxValue) {\n oMaximum = axisOrigin.getValue();\n }\n }\n if (dMinValue == 0) {\n dMinValue = dMaxValue > 0 ? 1 : -1;\n }\n }\n ScaleInfo info = new ScaleInfo(plotComp, iType, rtc, fs, ax, direction, scModel.isAutoExpand()).dZoomFactor(zoomFactor).iMarginPercent(iMarginPercent);\n sc = new AutoScale(info);\n sc.setMaximum(Double.valueOf(0));\n sc.setMinimum(Double.valueOf(0));\n sc.setStep(new Double(10));\n sc.setStepNumber(oStepNumber);\n sc.setData(dsi);\n setNumberMinMaxToScale(sc, oMinimum, oMaximum, rtc, ax);\n setStepToScale(sc, oStep, oStepNumber, rtc);\n oMinValue = new Double(dMinValue);\n oMaxValue = new Double(dMaxValue);\n sc.updateAxisMinMax(oMinValue, oMaxValue);\n if ((iType & PERCENT) == PERCENT) {\n sc.info.bStepFixed(true);\n sc.info.bMaximumFixed(true);\n sc.info.bMinimumFixed(true);\n sc.computeTicks(xs, ax.getLabel(), iLabelLocation, iOrientation, dStart, dEnd, false, null);\n return sc;\n }\n } else if ((iType & DATE_TIME) == DATE_TIME) {\n Calendar cValue;\n Calendar caMin = null, caMax = null;\n dsi.reset();\n while (dsi.hasNext()) {\n cValue = (Calendar) dsi.next();\n if (cValue == null) {\n continue;\n }\n if (caMin == null) {\n caMin = cValue;\n }\n if (caMax == null) {\n caMax = cValue;\n }\n if (cValue.before(caMin))\n caMin = cValue;\n else if (cValue.after(caMax))\n caMax = cValue;\n }\n oMinValue = new CDateTime(caMin);\n oMaxValue = new CDateTime(caMax);\n if (axisOrigin != null && axisOrigin.getType().equals(IntersectionType.VALUE_LITERAL) && axisOrigin.getValue() instanceof DateTimeDataElement) {\n CDateTime origin = asDateTime(axisOrigin.getValue());\n if (oMinimum == null && origin.before(oMinValue)) {\n oMinimum = axisOrigin.getValue();\n }\n if (oMaximum == null && origin.after(oMaxValue)) {\n oMaximum = axisOrigin.getValue();\n }\n }\n int iUnit;\n if (oStep != null || oStepNumber != null) {\n iUnit = ChartUtil.convertUnitTypeToCalendarConstant(scModel.getUnit());\n } else {\n iUnit = CDateTime.getPreferredUnit((CDateTime) oMinValue, (CDateTime) oMaxValue);\n }\n if (iUnit == 0)\n iUnit = Calendar.SECOND;\n CDateTime cdtMinAxis = ((CDateTime) oMinValue).backward(iUnit, 1);\n CDateTime cdtMaxAxis = ((CDateTime) oMaxValue).forward(iUnit, 1);\n cdtMinAxis.clearBelow(iUnit);\n cdtMaxAxis.clearBelow(iUnit);\n ScaleInfo info = new ScaleInfo(plotComp, DATE_TIME, rtc, fs, ax, direction, scModel.isAutoExpand()).dZoomFactor(zoomFactor).iMarginPercent(iMarginPercent).iMinUnit(oMinValue.equals(oMaxValue) ? getUnitId(iUnit) : getMinUnitId(fs, rtc));\n sc = new AutoScale(info);\n sc.setMaximum(cdtMaxAxis);\n sc.setMinimum(cdtMinAxis);\n sc.setStep(Integer.valueOf(1));\n sc.setStepNumber(oStepNumber);\n sc.context.setUnit(Integer.valueOf(iUnit));\n if (oMinimum instanceof DateTimeDataElement) {\n sc.setMinimum(((DateTimeDataElement) oMinimum).getValueAsCDateTime());\n sc.info.oMinimumFixed(((DateTimeDataElement) oMinimum).getValueAsCDateTime());\n sc.info.bMinimumFixed(true);\n }\n if (oMaximum != null) {\n if (oMaximum instanceof DateTimeDataElement) {\n sc.setMaximum(((DateTimeDataElement) oMaximum).getValueAsCDateTime());\n sc.info.oMaximumFixed(((DateTimeDataElement) oMaximum).getValueAsCDateTime());\n } else {\n throw new ChartException(ChartEnginePlugin.ID, ChartException.GENERATION, \"String_Node_Str\", new Object[] { oMaximum, ax.getModelAxis().getType().getName() }, Messages.getResourceBundle(rtc.getULocale()));\n }\n sc.info.bMaximumFixed(true);\n }\n if (sc.info.bMaximumFixed && sc.info.bMinimumFixed) {\n if (((CDateTime) sc.getMinimum()).after(sc.getMaximum())) {\n throw new ChartException(ChartEnginePlugin.ID, ChartException.GENERATION, \"String_Node_Str\", new Object[] { sc.getMinimum(), sc.getMaximum() }, Messages.getResourceBundle(rtc.getULocale()));\n }\n }\n setStepToScale(sc, oStep, oStepNumber, rtc);\n sc.updateAxisMinMax(oMinValue, oMaxValue);\n } else {\n oMinValue = null;\n oMaxValue = null;\n }\n if ((iType & TEXT) != TEXT && !ax.isCategoryScale()) {\n sc.computeTicks(xs, la, iLabelLocation, iOrientation, dStart, dEnd, false, null);\n dStart = sc.dStart;\n dEnd = sc.dEnd;\n boolean bFirstFit = sc.checkFit(xs, la, iLabelLocation);\n boolean bFits = bFirstFit;\n boolean bZoomSuccess = false;\n for (int i = 0; bFits == bFirstFit && i < 50; i++) {\n bZoomSuccess = true;\n scCloned = (AutoScale) sc.clone();\n if (sc.info.bStepFixed || rtc.getSharedScale() != null && rtc.getSharedScale().isShared()) {\n break;\n }\n if (bFirstFit) {\n if (!bFits) {\n break;\n }\n bZoomSuccess = sc.zoomIn();\n } else {\n if (!bFits && sc.getTickCordinates().size() == 2) {\n break;\n }\n bZoomSuccess = sc.zoomOut();\n }\n if (!bZoomSuccess)\n break;\n sc.updateAxisMinMax(oMinValue, oMaxValue);\n sc.computeTicks(xs, la, iLabelLocation, iOrientation, dStart, dEnd, false, null);\n bFits = sc.checkFit(xs, la, iLabelLocation);\n if (!bFits && sc.getTickCordinates().size() == 2) {\n sc = scCloned;\n break;\n }\n }\n if (scCloned != null && bFirstFit && bZoomSuccess) {\n sc = scCloned;\n }\n updateSharedScaleContext(rtc, iType, sc.tmpSC);\n }\n if (sc != null) {\n sc.setData(dsi);\n }\n return sc;\n}\n"
|
"public void upgrade() throws Exception {\n TableId datasetSpecId = tableUtil.createHTableId(NamespaceId.SYSTEM, DatasetMetaTableUtil.INSTANCE_TABLE_NAME);\n HBaseAdmin hBaseAdmin = new HBaseAdmin(conf);\n if (!tableUtil.tableExists(hBaseAdmin, datasetSpecId)) {\n LOG.error(\"String_Node_Str\", datasetSpecId);\n return;\n }\n HTable specTable = tableUtil.createHTable(conf, datasetSpecId);\n try {\n ScanBuilder scanBuilder = tableUtil.buildScan();\n scanBuilder.setTimeRange(0, HConstants.LATEST_TIMESTAMP);\n scanBuilder.setMaxVersions();\n try (ResultScanner resultScanner = specTable.getScanner(scanBuilder.build())) {\n Result result;\n while ((result = resultScanner.next()) != null) {\n Put put = new Put(result.getRow());\n for (Map.Entry<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>> familyMap : result.getMap().entrySet()) {\n for (Map.Entry<byte[], NavigableMap<Long, byte[]>> columnMap : familyMap.getValue().entrySet()) {\n for (Map.Entry<Long, byte[]> columnEntry : columnMap.getValue().entrySet()) {\n Long timeStamp = columnEntry.getKey();\n byte[] colVal = columnEntry.getValue();\n if (colVal == null || colVal.length == 0) {\n continue;\n }\n String specEntry = Bytes.toString(colVal);\n DatasetSpecification specification = GSON.fromJson(specEntry, DatasetSpecification.class);\n DatasetSpecification updatedSpec = updateTTLInSpecification(specification, null);\n colVal = Bytes.toBytes(GSON.toJson(updatedSpec));\n put.add(familyMap.getKey(), columnMap.getKey(), timeStamp, colVal);\n }\n }\n }\n if (put.size() > 0) {\n specTable.put(put);\n }\n }\n }\n } finally {\n specTable.flushCommits();\n specTable.close();\n }\n}\n"
|
"public EndpointDefinition registerWithTTL(final String serviceName, final int port, final int timeToLiveSeconds) {\n if (trace) {\n logger.trace(\"String_Node_Str\" + serviceName + \"String_Node_Str\" + port);\n }\n watch(serviceName);\n EndpointDefinition endpointDefinition = new EndpointDefinition(HealthStatus.PASS, serviceName + \"String_Node_Str\" + ServiceDiscovery.uniqueString(port), serviceName, host, port, timeToLiveSeconds);\n return doRegister(endpointDefinition);\n}\n"
|
"public void testJelevaCastingSavageBeatingFromExile() {\n String jeleva = \"String_Node_Str\";\n String savageBeating = \"String_Node_Str\";\n skipInitShuffling();\n addCard(Zone.LIBRARY, playerA, savageBeating, 2);\n addCard(Zone.HAND, playerA, jeleva);\n addCard(Zone.BATTLEFIELD, playerA, \"String_Node_Str\", 3);\n addCard(Zone.BATTLEFIELD, playerA, \"String_Node_Str\", 3);\n addCard(Zone.BATTLEFIELD, playerA, \"String_Node_Str\", 3);\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, jeleva);\n attack(3, playerA, jeleva);\n setChoice(playerA, \"String_Node_Str\");\n setChoice(playerA, savageBeating);\n setChoice(playerA, \"String_Node_Str\");\n setModeChoice(playerA, \"String_Node_Str\");\n setStopAt(3, PhaseStep.END_COMBAT);\n execute();\n assertTapped(jeleva, true);\n assertLife(playerB, 18);\n assertAbility(playerA, jeleva, DoubleStrikeAbility.getInstance(), true);\n assertGraveyardCount(playerA, savageBeating, 1);\n}\n"
|
"public JDefinedClass createClass(JClassContainer parent, int mod, String name, Locator source, ClassType kind) {\n try {\n if (parent.isClass() && kind == ClassType.CLASS)\n mod |= JMod.STATIC;\n JDefinedClass r = parent._class(mod, name, kind);\n r.metadata = source;\n return r;\n } catch (JClassAlreadyExistsException e) {\n JDefinedClass cls = e.getExistingClass();\n errorReceiver.error(new SAXParseException(Messages.format(Messages.ERR_CLASSNAME_COLLISION, cls.fullName()), (Locator) cls.metadata));\n errorReceiver.error(new SAXParseException(Messages.format(Messages.ERR_CLASSNAME_COLLISION_SOURCE, name), source));\n if (!name.equals(cls.name())) {\n errorReceiver.error(new SAXParseException(Messages.format(Messages.ERR_CASE_SENSITIVITY_COLLISION, name, cls.name()), null));\n }\n try {\n return parent._class(\"String_Node_Str\" + (ticketMaster++));\n } catch (JClassAlreadyExistsException ee) {\n return ee.getExistingClass();\n }\n }\n}\n"
|
"private void initComponents() {\n headlineLabel.setFont(headlineLabel.getFont().deriveFont(Font.BOLD));\n messageLabel.setMargin(new Insets(0, 0, 0, 0));\n messageLabel.setEditable(false);\n messageLabel.setLineWrap(true);\n messageLabel.setWrapStyleWord(true);\n messageLabel.setFont(new JButton().getFont());\n JScrollPane scrollPane = new JScrollPane(messageLabel);\n scrollPane.setBorder(BorderFactory.createEmptyBorder());\n Logo logo = new Logo();\n GroupLayout layout = new GroupLayout(this);\n setLayout(layout);\n layout.setAutoCreateGaps(true);\n layout.setAutoCreateContainerGaps(true);\n layout.setHorizontalGroup(layout.createSequentialGroup().addComponent(logo, 60, 60, 60).addGap(20).addGroup(layout.createParallelGroup().addComponent(headlineLabel).addComponent(scrollPane)));\n layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.CENTER).addComponent(logo).addGroup(layout.createSequentialGroup().addComponent(headlineLabel).addComponent(scrollPane)));\n}\n"
|
"public static Node layoutEvents(Model model, TurboIssue issue, List<TurboIssueEvent> events, List<Comment> comments) {\n VBox result = new VBox();\n result.setSpacing(3);\n VBox.setMargin(result, new Insets(3, 0, 0, 0));\n List<TurboIssueEvent> labelUpdateEvents = events.stream().filter(e -> e.isLabelUpdateEvent()).collect(Collectors.toList());\n List<Node> labelUpdateEventNodes = TurboIssueEvent.createLabelUpdateEventNodes(model, labelUpdateEvents);\n labelUpdateEventNodes.forEach(node -> result.getChildren().add(node));\n events.stream().filter(e -> !e.isLabelUpdateEvent()).map(e -> e.display(model, issue)).forEach(e -> result.getChildren().add(e));\n if (comments.size() > 0) {\n String names = comments.stream().map(comment -> comment.getUser().getLogin()).distinct().collect(Collectors.joining(\"String_Node_Str\"));\n HBox commentDisplay = new HBox();\n commentDisplay.getChildren().addAll(TurboIssueEvent.octicon(TurboIssueEvent.OCTICON_QUOTE), new javafx.scene.control.Label(String.format(\"String_Node_Str\", comments.size(), names)));\n result.getChildren().add(commentDisplay);\n }\n return result;\n}\n"
|
"public void checkIn(final Queue<ServiceHealthCheckIn> checkInsQueue) {\n if (trace) {\n logger.trace(sputs(\"String_Node_Str\", checkInsQueue));\n }\n ServiceHealthCheckIn checkIn = checkInsQueue.poll();\n if (checkIn != null) {\n Consul consul = consul();\n try {\n while (checkIn != null) {\n Status status = convertStatus(checkIn.getHealthStatus());\n consul.agent().checkTtl(checkIn.getServiceId(), status, \"String_Node_Str\" + checkIn.getHealthStatus());\n } catch (Exception ex) {\n handleConsulRecovery(consul, ex);\n }\n checkIn = checkInsQueue.poll();\n }\n }\n}\n"
|
"public void testBadTemplateType4() throws Exception {\n testTypes(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", FunctionTypeBuilder.TEMPLATE_TYPE_EXPECTED.format());\n}\n"
|
"public String getControllingUser() {\n ControlArb controlArb = app.getControlArb();\n if (controlArb instanceof ControlArbNull)\n return null;\n return ((ControlArbXrw) controlArb).getController();\n}\n"
|
"public void toArray(final double[] data) {\n data[0] = 1;\n data[1] = 0;\n data[2] = 0;\n data[3] = 1;\n data[4] = tx;\n data[5] = ty;\n}\n"
|
"public void callCb() {\n if (cb != null) {\n ActionCallbackQueue.add(cb);\n }\n}\n"
|
"protected boolean includeJavaEngineIndicator() {\n for (ModelElementIndicator modelElementIndicator : this.treeViewer.getModelElementIndicator()) {\n if (modelElementIndicator.containsAny(IndicatorEnum.getJavaIndicatorsEnum()) || (modelElementIndicator.contains(IndicatorEnum.UserDefinedIndicatorEnum) && checkUDIInvalid(modelElementIndicator, true))) {\n return true;\n }\n }\n return false;\n}\n"
|
"Work processStatelessEvent(final byte eventId, final TcpReplicator.TcpSocketChannelEntryWriter writer, final ByteBufferBytes reader) {\n final StatelessChronicleMap.EventId event = VALUES[eventId];\n long transactionId = reader.readLong();\n long timestamp = transactionId / TcpReplicator.TIMESTAMP_FACTOR;\n byte identifier = reader.readByte();\n int headerSize = reader.readInt();\n reader.skip(headerSize);\n switch(event) {\n case KEY_SET:\n return keySet(reader, writer.in(), transactionId);\n case VALUES:\n return values(reader, writer.in(), transactionId);\n case ENTRY_SET:\n return entrySet(reader, writer.in(), transactionId);\n case PUT_WITHOUT_ACC:\n return put(reader, timestamp, identifier);\n case PUT_ALL_WITHOUT_ACC:\n return putAll(reader, timestamp, identifier);\n case REMOVE_WITHOUT_ACC:\n return remove(reader, timestamp, identifier);\n }\n final long sizeLocation = reflectTransactionId(writer.in(), transactionId);\n switch(event) {\n case LONG_SIZE:\n return longSize(writer.in(), sizeLocation);\n case IS_EMPTY:\n return isEmpty(writer.in(), sizeLocation);\n case CONTAINS_KEY:\n return containsKey(reader, writer.in(), sizeLocation);\n case CONTAINS_VALUE:\n return containsValue(reader, writer.in(), sizeLocation);\n case GET:\n return get(reader, writer, sizeLocation, timestamp);\n case PUT:\n return put(reader, writer, sizeLocation, timestamp, identifier);\n case REMOVE:\n return remove(reader, writer, sizeLocation, timestamp, identifier);\n case CLEAR:\n return clear(writer.in(), sizeLocation, timestamp, identifier);\n case REPLACE:\n return replace(reader, writer, sizeLocation, timestamp, identifier);\n case REPLACE_WITH_OLD_AND_NEW_VALUE:\n return replaceWithOldAndNew(reader, writer.in(), sizeLocation, timestamp, identifier);\n case PUT_IF_ABSENT:\n return putIfAbsent(reader, writer, sizeLocation, timestamp, identifier);\n case REMOVE_WITH_VALUE:\n return removeWithValue(reader, writer.in(), sizeLocation, timestamp, identifier);\n case TO_STRING:\n return toString(writer.in(), sizeLocation);\n case PUT_ALL:\n return putAll(reader, writer.in(), sizeLocation, timestamp, identifier);\n case HASH_CODE:\n return hashCode(writer.in(), sizeLocation);\n case MAP_FOR_KEY:\n return mapForKey(reader, writer.in(), sizeLocation);\n case PUT_MAPPED:\n return putMapped(reader, writer.in(), sizeLocation);\n default:\n throw new IllegalStateException(\"String_Node_Str\" + event);\n }\n}\n"
|
"private void updateQuery(String queryType, Query query, String expr, SeriesDefinition seriesDefinition) {\n String actualExpr = expr;\n if (dataProvider.checkState(IDataServiceProvider.SHARE_QUERY) || dataProvider.checkState(IDataServiceProvider.INHERIT_COLUMNS_GROUPS)) {\n boolean isGroupOrAggr = false;\n Object obj = getCurrentColumnHeadObject();\n if (obj instanceof ColumnBindingInfo) {\n ColumnBindingInfo cbi = (ColumnBindingInfo) obj;\n int type = cbi.getColumnType();\n if (type == ColumnBindingInfo.GROUP_COLUMN || type == ColumnBindingInfo.AGGREGATE_COLUMN) {\n actualExpr = cbi.getExpression();\n isGroupOrAggr = true;\n }\n }\n if (seriesDefinition != null && (queryType.equals(ChartUIConstants.QUERY_CATEGORY) || queryType.equals(ChartUIConstants.QUERY_VALUE))) {\n seriesDefinition.getGrouping().setEnabled(isGroupOrAggr);\n }\n }\n query.setDefinition(actualExpr);\n}\n"
|
"public void Start() {\n array1 = new int[max_mac_size + 1];\n array2 = new int[max_mac_size + 1];\n System.out.println(\"String_Node_Str\");\n mac_coprocessor m = new mac_coprocessor();\n int ts = Native.rdMem(Const.IO_CNT);\n int te = Native.rdMem(Const.IO_CNT);\n int to = te - ts;\n int icount = 0;\n for (int mac_size = 1; mac_size < max_mac_size; icount++) {\n int i, j, time, out, expect = 0;\n boolean error = false;\n int max_time = 0;\n int min_time = 1 << 30;\n int total_time = 0;\n for (i = 0; i < mac_size; i++) {\n array1[i] = mac_size + 123 + (i * 99) + (i * i * 12);\n array2[i] = mac_size + 456 + (i * 78) + (i * i * 9);\n expect += array1[i] * array2[i];\n }\n System.out.print(mac_size);\n System.out.print(\"String_Node_Str\");\n out = m.mac1(mac_size, array1, array2);\n for (i = 0; i < max_cycles; i++) {\n ts = Native.rdMem(Const.IO_CNT);\n out = m.mac1(mac_size, array1, array2);\n te = Native.rdMem(Const.IO_CNT);\n time = te - ts - to;\n if (time > max_time) {\n max_time = time;\n }\n if (time < min_time) {\n min_time = time;\n }\n total_time += time;\n if (out != expect) {\n error = true;\n break;\n }\n }\n if (error) {\n System.out.println(\"String_Node_Str\");\n break;\n }\n System.out.print(min_time);\n System.out.print(\"String_Node_Str\");\n System.out.print(total_time / max_cycles);\n System.out.print(\"String_Node_Str\");\n System.out.println(max_time);\n mac_size++;\n if (icount > 100) {\n mac_size += mac_size / 4;\n }\n }\n System.out.println(\"String_Node_Str\");\n}\n"
|
"public void init(Ability source, Game game) {\n landTypes.clear();\n Player controller = game.getPlayer(source.getControllerId());\n if (controller != null) {\n Set<String> choiceSet = new LinkedHashSet<>();\n choiceSet.add(\"String_Node_Str\");\n choiceSet.add(\"String_Node_Str\");\n ChoiceImpl choice = new ChoiceImpl(true);\n choice.setChoices(choiceSet);\n choice.setMessage(\"String_Node_Str\");\n while (!controller.choose(outcome, choice, game)) {\n if (!controller.canRespond()) {\n return;\n }\n }\n landTypes.add(choice.getChoice());\n } else {\n this.discard();\n }\n super.init(source, game);\n}\n"
|
"public void persist(Node node) {\n EntityMetadata metadata = KunderaMetadataManager.getEntityMetadata(node.getDataClass());\n String id = ObjectGraphBuilder.getEntityId(node.getNodeId());\n Session s;\n Transaction tx;\n try {\n s = getStatelessSession();\n Transaction tx = s.beginTransaction();\n s.insert(node.getData());\n tx.commit();\n } catch (org.hibernate.exception.ConstraintViolationException e) {\n log.info(e.getMessage());\n } catch (HibernateException e) {\n log.info(e.getMessage());\n }\n List<RelationHolder> relationHolders = getRelationHolders(node);\n for (RelationHolder rh : relationHolders) {\n String linkName = rh.getRelationName();\n String linkValue = rh.getRelationValue();\n if (linkName != null && linkValue != null) {\n s = getSessionInstance();\n tx = s.beginTransaction();\n String updateSql = \"String_Node_Str\" + metadata.getTableName() + \"String_Node_Str\" + linkName + \"String_Node_Str\" + linkValue + \"String_Node_Str\" + metadata.getIdColumn().getName() + \"String_Node_Str\" + id + \"String_Node_Str\";\n s.createSQLQuery(updateSql).executeUpdate();\n tx.commit();\n }\n }\n if (!MetadataUtils.useSecondryIndex(getPersistenceUnit())) {\n indexNode(node, metadata, getIndexManager());\n }\n}\n"
|
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n switch(requestCode) {\n case IMPORT_WORDLIST:\n if (resultCode != RESULT_OK) {\n initMasterSeed();\n return;\n }\n UUID accountid = (UUID) data.getSerializableExtra(AddAccountActivity.RESULT_KEY);\n WalletAccount account = _mbwManager.getWalletManager(false).getAccount(accountid);\n String defaultName = getString(R.string.account) + \"String_Node_Str\" + (((Bip44Account) account).getAccountIndex() + 1);\n _mbwManager.getMetadataStorage().storeAccountLabel(accountid, defaultName);\n delayedFinish.run();\n return;\n case StringHandlerActivity.IMPORT_ENCRYPTED_BIP38_PRIVATE_KEY_CODE:\n String content = data.getStringExtra(\"String_Node_Str\");\n if (content != null) {\n InMemoryPrivateKey key = InMemoryPrivateKey.fromBase58String(content, _mbwManager.getNetwork()).get();\n UUID onTheFlyAccount = MbwManager.getInstance(this).createOnTheFlyAccount(key);\n SendInitializationActivity.callMe(this, onTheFlyAccount, true);\n finish();\n return;\n }\n case REQUEST_FROM_URI:\n if (resultCode == RESULT_OK) {\n Bundle extras = Preconditions.checkNotNull(data.getExtras());\n for (String key : extras.keySet()) {\n if (!key.equals(Constants.TRANSACTION_ID_INTENT_KEY)) {\n data.removeExtra(key);\n }\n }\n setResult(RESULT_OK, data);\n } else {\n setResult(RESULT_CANCELED);\n }\n break;\n default:\n setResult(RESULT_CANCELED);\n }\n finish();\n}\n"
|
"private void heartbeatCheckHasReceived(final SelectionKey key, final long approxTimeOutTime) {\n final Attached attached = (Attached) key.attachment();\n if (attached.isServer && !attached.isHandShakingComplete())\n return;\n final SocketChannel channel = (SocketChannel) key.channel();\n if (approxTimeOutTime > attached.entryReader.lastHeartBeatReceived + attached.remoteHeartbeatInterval) {\n if (LOG.isDebugEnabled())\n LOG.debug(\"String_Node_Str\" + \"String_Node_Str\" + attached.remoteIdentifier);\n activeKeys.clear(attached.remoteIdentifier);\n closeables.closeQuietly(channel.socket());\n if (replicationConfig.autoReconnectedUponDroppedConnection())\n attached.connector.connectLater();\n }\n}\n"
|
"protected boolean isMember(Simplex simplex) {\n boolean isMember = false;\n int[] vertices = simplex.getVertices();\n IntDoublePair witnessAndDistance = this.getWitnessAndDistance(vertices);\n int n_star = witnessAndDistance.getFirst();\n double e_ij = witnessAndDistance.getSecond();\n if (e_ij <= this.maxDistance + this.epsilon) {\n isMember = true;\n this.updateWitnessInformationInternalIndices(n_star, e_ij, simplex.getVertices());\n }\n return new BooleanDoublePair(isMember, e_ij);\n}\n"
|
"public void buildConsolidationNormal(paloelements paloElements, String strElementName, int iParentPosition) throws paloexception {\n boolean bConsolidationElementsFound = false;\n paloconsolidations paloCons = new paloconsolidations();\n for (tPaloDimensionElements tConsElement : lstPaloDimensionElements) {\n if (tConsElement.getParentPosition() == iParentPosition && tConsElement.getElementName() != null && !tConsElement.getElementName().equals(strElementName)) {\n paloCons.addElementToConsolidation(paloElements.getElement(tConsElement.getElementName()), tConsElement.getFactor());\n bConsolidationElementsFound = true;\n }\n }\n if (bConsolidationElementsFound) {\n paloElements.getElement(strElementName).updateElement(paloCons, true);\n }\n}\n"
|
"public void removeLike(User user, Post post) {\n if (likedby.contains(user))\n likedby.remove(user);\n if (liked.contains(post))\n liked.remove(post);\n user.getLikes().remove(this);\n post.getLikes().remove(this);\n}\n"
|
"public Address pickAddress(Node node, final ServerSocketChannel serverSocketChannel) throws Exception {\n String currentAddress = null;\n try {\n final Config config = node.getConfig();\n final String localAddress = System.getProperty(\"String_Node_Str\");\n if (localAddress != null) {\n currentAddress = InetAddress.getByName(localAddress.trim()).getHostAddress();\n }\n if (currentAddress == null) {\n final Enumeration<NetworkInterface> enums = NetworkInterface.getNetworkInterfaces();\n interfaces: while (enums.hasMoreElements()) {\n final NetworkInterface ni = enums.nextElement();\n final Enumeration<InetAddress> e = ni.getInetAddresses();\n while (e.hasMoreElements()) {\n final InetAddress inetAddress = e.nextElement();\n if (inetAddress instanceof Inet4Address) {\n final String address = inetAddress.getHostAddress();\n final List<String> interfaces = config.getNetworkConfig().getInterfaces().getLsInterfaces();\n if (config.getNetworkConfig().getInterfaces().isEnabled()) {\n if (matchAddress(address, interfaces)) {\n currentAddress = address;\n break interfaces;\n }\n } else {\n if (!inetAddress.isLoopbackAddress()) {\n currentAddress = address;\n break interfaces;\n }\n }\n }\n }\n }\n if (config.getNetworkConfig().getInterfaces().isEnabled() && currentAddress == null) {\n String msg = \"String_Node_Str\";\n msg += \"String_Node_Str\";\n logger.log(Level.SEVERE, msg);\n return null;\n }\n }\n if (currentAddress == null) {\n currentAddress = \"String_Node_Str\";\n }\n final InetAddress inetAddress = InetAddress.getByName(currentAddress);\n ServerSocket serverSocket = serverSocketChannel.socket();\n serverSocket.setReuseAddress(reuseAddress);\n InetSocketAddress isa;\n int port = config.getPort();\n for (int i = 0; i < 100; i++) {\n try {\n isa = new InetSocketAddress(inetAddress, port);\n serverSocket.bind(isa, 100);\n break;\n } catch (final Exception e) {\n if (config.isPortAutoIncrement()) {\n serverSocket = serverSocketChannel.socket();\n serverSocket.setReuseAddress(true);\n port++;\n } else {\n String msg = \"String_Node_Str\" + port + \"String_Node_Str\" + \"String_Node_Str\";\n logger.log(Level.SEVERE, msg);\n throw e;\n }\n }\n }\n serverSocketChannel.configureBlocking(false);\n return new Address(currentAddress, port);\n } catch (Exception e) {\n e.printStackTrace();\n throw e;\n }\n}\n"
|
"public void removeRegistrations(List<Registration> regs) {\n for (Map<String, List<Registration>> allRegs : map.values()) {\n if (allRegs != null) {\n for (String key : allRegs.keySet()) {\n allRegs.get(key).removeAll(regs);\n }\n }\n }\n}\n"
|
"public Object load() {\n if (DEUtil.getInputSize(input) != 1)\n return null;\n DataSetHandle dataset = ((TabularCubeHandle) DEUtil.getInputFirstElement(input)).getDataSet();\n if (dataset != null)\n return dataset.getName();\n else\n return \"String_Node_Str\";\n}\n"
|
"private static void visitValue(AnnotationVisitor visitor, String key, IValue value) {\n int valueType = value.valueTag();\n if (valueType == IValue.ARRAY) {\n AnnotationVisitor arrayVisitor = visitor.visitArray(key);\n Array array = (Array) value;\n int count = array.valueCount();\n for (int i = 0; i < count; i++) {\n visitValue(arrayVisitor, null, array.getValue(i));\n }\n } else if (valueType == IValue.ENUM) {\n EnumValue enumValue = (EnumValue) value;\n visitor.visitEnum(key, enumValue.type.getExtendedName(), enumValue.name.qualified);\n } else if (value.isConstant()) {\n visitor.visit(key, value.toObject());\n }\n}\n"
|
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n ((WordPress) getActivity().getApplication()).component().inject(this);\n mViewModel = ViewModelProviders.of(getActivity(), mViewModelFactory).get(PluginBrowserViewModel.class);\n mListType = (PluginListType) getArguments().getSerializable(ARG_LIST_TYPE);\n}\n"
|
"private String getTableCellText(Parameter parameter, int columnIndex) {\n switch(columnIndex) {\n case NAME_TABLE_COLUMN:\n return parameter.getName();\n case TYPE_TABLE_COLUMN:\n final String paramType = parameter.getType();\n return CompSystemI18n.getString(paramType, true);\n default:\n StringBuilder msg = new StringBuilder();\n msg.append(Messages.ColumnIndex).append(StringConstants.SPACE).append(StringConstants.APOSTROPHE).append(columnIndex).append(StringConstants.APOSTROPHE).append(StringConstants.SPACE).append(Messages.DoesNotExist).append(StringConstants.EXCLAMATION_MARK);\n Assert.notReached(msg.toString());\n break;\n }\n return EMPTY_ENTRY;\n}\n"
|
"public String toStringForQuery() {\n return originalRepresentation.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n}\n"
|
"public void handle(ClientMessage message, ClientConnection connection) {\n int threadIndex = hashToIndex(INT_HOLDER.get().getAndInc(), responseThreads.length);\n responseThreads[threadIndex].responseQueue.add(new ClientPacket(connection, message));\n}\n"
|
"public ItemStack getStackInSlot(int slot) {\n slot = getAdjustedSlot(slot);\n if (slot >= getTrueSizeInventory()) {\n return isConnected() ? connection.inventory[slot % getTrueSizeInventory()] : null;\n } else {\n return inventory[slot];\n }\n}\n"
|
"public void onReceive(int id, Object obj) {\n if (id == Constants.MESSENGER_ID_SIGN_IN_OR_OUT) {\n if (obj == null) {\n mSignIn = false;\n mAvatar.setImageURI(DEFAULT_AVATAR_URI);\n mUsename.setText(\"String_Node_Str\");\n mAction.setText(getContext().getString(R.string.signin));\n } else if (obj instanceof String) {\n mSignIn = true;\n mUsename.setText((String) obj);\n mAction.setText(mContext.getString(R.string.signout));\n }\n } else if (id == Constants.MESSENGER_ID_USER_AVATAR) {\n if (mSignIn && obj instanceof Uri) {\n mAvatar.setImageURI((Uri) obj);\n }\n }\n}\n"
|
"public static int compareObjects(Object ob1, Object ob2) {\n try {\n return ScriptEvalUtil.compare(ob1, ob2);\n } catch (DataException e) {\n return -1;\n }\n if (ob1 == null || ob2 == null) {\n if (ob1 == null) {\n result = -1;\n } else {\n result = 1;\n }\n return result;\n }\n if (ob1.equals(ob2)) {\n return result;\n } else if (ob1 instanceof Comparable && ob2 instanceof Comparable) {\n Comparable comp1 = (Comparable) ob1;\n Comparable comp2 = (Comparable) ob2;\n if (ob1.getClass() != ob2.getClass()) {\n try {\n if (ob1 instanceof Number && ob2 instanceof Number) {\n comp1 = DataTypeUtil.toDouble(ob1);\n comp2 = DataTypeUtil.toDouble(ob2);\n } else if (ob1 instanceof Date && ob2 instanceof Date) {\n comp1 = DataTypeUtil.toDate(ob1);\n comp2 = DataTypeUtil.toDate(ob1);\n }\n } catch (BirtException ex) {\n }\n }\n result = comp1.compareTo(comp2);\n } else if (ob1 instanceof Boolean && ob2 instanceof Boolean) {\n Boolean bool = (Boolean) ob1;\n if (bool.equals(Boolean.TRUE))\n result = 1;\n else\n result = -1;\n } else {\n }\n return result;\n}\n"
|
"public IGraphItem createReactionEdge(final IGraph parentPathway, final String sReactionName, final String sReactionType) {\n IGraphItem pathwayReactionEdge = new PathwayReactionEdgeGraphItem(sReactionName, sReactionType);\n IGraphItem pathwayReactionEdgeRep = new PathwayReactionEdgeGraphItemRep();\n IGraph rootPathway = generalManager.getPathwayManager().getRootPathway();\n rootPathway.addItem(pathwayReactionEdge);\n pathwayReactionEdge.addGraph(rootPathway, EGraphItemHierarchy.GRAPH_PARENT);\n parentPathway.addItem(pathwayReactionEdgeRep);\n pathwayReactionEdgeRep.addGraph(parentPathway, EGraphItemHierarchy.GRAPH_PARENT);\n pathwayReactionEdgeRep.addItem(pathwayReactionEdge, EGraphItemProperty.ALIAS_PARENT);\n pathwayReactionEdge.addItem(pathwayReactionEdgeRep, EGraphItemProperty.ALIAS_CHILD);\n return pathwayReactionEdgeRep;\n}\n"
|
"public final void close() {\n try {\n this.headerIndexes = null;\n if (writer != null) {\n writer.close();\n writer = null;\n }\n } catch (Throwable ex) {\n throw new IllegalStateException(\"String_Node_Str\", ex);\n }\n if (this.partialLineIndex != 0) {\n throw new TextWritingException(\"String_Node_Str\" + \"String_Node_Str\", recordCount, Arrays.copyOf(partialLine, partialLineIndex));\n }\n}\n"
|
"public static void checkAggregateType(ChartWizardContext context) {\n boolean isValid = true;\n SeriesDefinition baseSD = ChartUIUtil.getBaseSeriesDefinitions(context.getModel()).get(0);\n for (SeriesDefinition orthSD : ChartUIUtil.getOrthogonalSeriesDefinitions(context.getModel(), 0)) {\n if (!isValid) {\n return;\n }\n SeriesDefinition orthSD = iter.next();\n if (orthSD.getGrouping() != null && orthSD.getGrouping().isEnabled()) {\n isValidAgg = isValidAggregation(context, orthSD.getGrouping(), false);\n }\n }\n if (isValidAgg) {\n SeriesDefinition baseSD = ChartUIUtil.getBaseSeriesDefinitions(context.getModel()).get(0);\n if (baseSD.getGrouping() != null && baseSD.getGrouping().isEnabled()) {\n isValidAggregation(context, baseSD.getGrouping(), true);\n }\n }\n}\n"
|
"private int internalAddRow(ResultSet resultSet, int column) throws SQLException {\n RolapMember member = null;\n if (currMember != null) {\n member = currMember;\n } else {\n for (int i = 0; i <= levelDepth; i++) {\n RolapLevel childLevel = levels[i];\n if (childLevel.isAll()) {\n member = allMember;\n continue;\n }\n MemberChildrenConstraint mcc = constraint.getMemberChildrenConstraint(member);\n List cachedChildren = cache.getChildrenFromCache(member, mcc);\n if (i < levelDepth && cachedChildren == null) {\n siblings[i + 1] = new ArrayList();\n } else {\n siblings[i + 1] = null;\n }\n members[i] = member;\n if (siblings[i] != null) {\n if (value == RolapUtil.sqlNullValue) {\n addAsOldestSibling(siblings[i], member);\n } else {\n siblings[i].add(member);\n }\n }\n }\n }\n list.add(member);\n return column;\n}\n"
|
"public AtlasGlossaryCategory createCategory(AtlasGlossaryCategory glossaryCategory) throws AtlasBaseException {\n if (DEBUG_ENABLED) {\n LOG.debug(\"String_Node_Str\", glossaryCategory);\n }\n if (Objects.isNull(glossaryCategory)) {\n throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, \"String_Node_Str\");\n }\n if (Objects.isNull(glossaryCategory.getAnchor())) {\n throw new AtlasBaseException(AtlasErrorCode.MISSING_MANDATORY_ANCHOR);\n }\n if (StringUtils.isEmpty(glossaryCategory.getQualifiedName())) {\n String displayName = glossaryCategory.getDisplayName();\n String glossaryName = glossaryCategory.getAnchor().getDisplayText();\n if (StringUtils.isEmpty(displayName) || StringUtils.isEmpty(glossaryName)) {\n throw new AtlasBaseException(AtlasErrorCode.GLOSSARY_CATEGORY_QUALIFIED_NAME_CANT_BE_DERIVED);\n } else {\n glossaryCategory.setQualifiedName(displayName + \"String_Node_Str\" + glossaryName);\n }\n }\n if (categoryExists(glossaryCategory)) {\n throw new AtlasBaseException(AtlasErrorCode.GLOSSARY_CATEGORY_ALREADY_EXISTS, glossaryCategory.getQualifiedName());\n }\n AtlasGlossaryCategory saved = dataAccess.save(glossaryCategory);\n glossaryCategoryUtils.processCategoryRelations(glossaryCategory, saved, GlossaryUtils.RelationshipOperation.CREATE);\n saved = dataAccess.load(glossaryCategory);\n setInfoForRelations(saved);\n if (DEBUG_ENABLED) {\n LOG.debug(\"String_Node_Str\", saved);\n }\n return saved;\n}\n"
|
"public void moveTo(Session session, int newPos) throws SQLException {\n PageStore store = index.getPageStore();\n store.logUndo(this, data);\n PageDataNode p2 = PageDataNode.create(index, newPos, parentPageId);\n p2.rowCountStored = rowCountStored;\n p2.rowCount = rowCount;\n p2.childPageIds = childPageIds;\n p2.keys = keys;\n p2.entryCount = entryCount;\n p2.length = length;\n store.update(p2);\n if (parentPageId == ROOT) {\n index.setRootPageId(session, newPos);\n } else {\n PageDataNode p = (PageDataNode) store.getPage(parentPageId);\n p.moveChild(getPos(), newPos);\n }\n for (int i = 0; i < childPageIds.length; i++) {\n PageData p = (PageData) store.getPage(childPageIds[i]);\n p.setParentPageId(newPos);\n store.update(p);\n }\n store.free(getPos());\n}\n"
|
"public String getCommandByTalendJob(String project, String jobName, String context) throws ProcessorException {\n project = project.replace(\"String_Node_Str\", \"String_Node_Str\");\n if (jobName.split(\"String_Node_Str\").length > 2) {\n jobName = jobName.substring(jobName.lastIndexOf(\"String_Node_Str\") + 1, jobName.length());\n } else {\n jobName = jobName.replace(\"String_Node_Str\", \"String_Node_Str\");\n }\n context = context.replace(\"String_Node_Str\", \"String_Node_Str\");\n ProcessItem selectedProcessItem = ItemCacheManager.getProcessItem(mainJobInfoByName.get(jobName).getJobId());\n StringBuffer sb = new StringBuffer();\n sb.append(\"String_Node_Str\");\n for (String s : cmd) {\n sb.append(' ').append(s);\n }\n return sb.toString();\n}\n"
|
"public static int parseInt(String s, int radix) throws NumberFormatException {\n return (int) __parseAndValidateLong(s, radix, MIN_VALUE, MAX_VALUE);\n}\n"
|
"public static boolean checkConnection() {\n int index = getUrl().indexOf(getDbName());\n String surl = \"String_Node_Str\";\n if (index > 0) {\n surl = url.substring(0, index);\n }\n ReturnCode checkConnection = ConnectionService.checkConnection(surl, driver, props);\n return checkConnection.isOk();\n}\n"
|
"protected void getAllObjectInternal(List<Data> keys, List<Object> resultingKeyValuePairs) {\n Map<Data, Boolean> keyStates = createHashMap(keys.size());\n try {\n getCachedValue(keys, resultingKeyValuePairs);\n keyStates = createHashMap(keys.size());\n for (Data key : keys) {\n keyStates.put(key, keyStateMarker.tryMark(key));\n }\n int currentSize = resultingKeyValuePairs.size();\n super.getAllObjectInternal(keys, resultingKeyValuePairs);\n for (int i = currentSize; i < resultingKeyValuePairs.size(); ) {\n Data key = toData(resultingKeyValuePairs.get(i++));\n Data value = toData(resultingKeyValuePairs.get(i++));\n boolean marked = keyStates.remove(key);\n if (marked) {\n tryToPutNearCache(key, value);\n }\n }\n } finally {\n unmarkRemainingMarkedKeys(keyStates);\n }\n}\n"
|
"private static Set<Send> checkMessageLiveness(WFState init, Set<WFState> termset) throws ScribbleException {\n Set<Send> res = new HashSet<>();\n Set<Role> roles = termset.iterator().next().config.states.keySet();\n Iterator<WFState> i = termset.iterator();\n Map<Role, Map<Role, Send>> b0 = i.next().config.buffs.getBuffers();\n while (i.hasNext()) {\n WFState s = i.next();\n Set<Send> ms = roles.stream().flatMap((r) -> s.config.buffs.get(r).values().stream().filter((v) -> v != null)).collect(Collectors.toSet());\n for (Send m : ms) {\n if (!seen.contains(m)) {\n res.add(m);\n }\n }\n for (Send m : new HashSet<>(res)) {\n if (!ms.contains(m)) {\n seen.add(m);\n res.remove(m);\n }\n }\n }\n return res;\n}\n"
|
"public static FileObject readVirtualFile(String url) throws FileSystemException {\n FileSystemManager fsManager = VFS.getManager();\n if (fsManager == null) {\n throw newError(\"String_Node_Str\");\n }\n if (url.startsWith(\"String_Node_Str\")) {\n url = url.substring(\"String_Node_Str\".length());\n }\n if (url.startsWith(\"String_Node_Str\")) {\n url = url.substring(\"String_Node_Str\".length());\n }\n File userDir = new File(\"String_Node_Str\").getAbsoluteFile();\n FileObject file = fsManager.resolveFile(userDir, url);\n if (!file.isReadable()) {\n throw newError(\"String_Node_Str\" + url);\n }\n FileContent fileContent = file.getContent();\n if (fileContent == null) {\n throw newError(\"String_Node_Str\" + url);\n }\n return fileContent;\n}\n"
|
"public static void main(String[] args) {\n try {\n InputStream is = WebServerLauncher.class.getResourceAsStream(\"String_Node_Str\");\n Properties props = new Properties();\n props.load(is);\n for (Object prop : props.keySet()) {\n if (!System.getProperties().containsKey(prop)) {\n System.setProperty((String) prop, props.getProperty((String) prop));\n }\n }\n } catch (Exception ex) {\n LOGGER.log(Level.SEVERE, \"String_Node_Str\", ex);\n System.exit(-1);\n }\n if (!parseArguments(args)) {\n usage();\n System.exit(-1);\n }\n File logDir = new File(SystemPropertyUtil.getProperty(\"String_Node_Str\"));\n if (!logDir.exists() && !logDir.mkdirs()) {\n System.err.println(\"String_Node_Str\" + \"String_Node_Str\" + logDir + \"String_Node_Str\");\n }\n if (System.getProperty(\"String_Node_Str\") == null && System.getProperty(\"String_Node_Str\") == null) {\n try {\n InputStream logConfig;\n Properties p = new Properties();\n p.load(WebServerLauncher.class.getResourceAsStream(\"String_Node_Str\"));\n String filePattern = p.getProperty(\"String_Node_Str\");\n if (filePattern != null && filePattern.contains(\"String_Node_Str\")) {\n String quoted = logDir.getPath().replace('\\\\', '/');\n p.setProperty(\"String_Node_Str\", filePattern.replaceAll(\"String_Node_Str\", quoted));\n File tmpLog = File.createTempFile(\"String_Node_Str\", \"String_Node_Str\");\n p.store(new FileOutputStream(tmpLog), null);\n logConfig = new FileInputStream(tmpLog);\n } else {\n logConfig = WebServerLauncher.class.getResourceAsStream(\"String_Node_Str\");\n }\n LogManager.getLogManager().readConfiguration(logConfig);\n } catch (IOException ioe) {\n LOGGER.log(Level.WARNING, \"String_Node_Str\", ioe);\n }\n }\n if (System.getProperty(Constants.WEBSERVER_PORT_PROP) == null) {\n System.setProperty(Constants.WEBSERVER_PORT_PROP, \"String_Node_Str\");\n }\n String killSwitchStr = System.getProperty(WEBSERVER_KILLSWITCH_PROPERTY);\n if (killSwitchStr != null) {\n KillSwitch ks = new KillSwitch(Integer.parseInt(killSwitchStr));\n new Thread(ks).start();\n }\n try {\n File webDir = new File(RunUtil.getRunDir(), \"String_Node_Str\");\n webDir.mkdirs();\n if (!compareVersions(RunUtil.getRunDir())) {\n System.setProperty(Constants.WEBSERVER_NEWVERSION_PROP, \"String_Node_Str\");\n extractWebserverJars(webDir);\n writeVersion(RunUtil.getRunDir());\n }\n List<URL> urls = new ArrayList<URL>();\n for (File jar : webDir.listFiles()) {\n URL u = jar.toURI().toURL();\n LOGGER.fine(\"String_Node_Str\" + u);\n urls.add(u);\n }\n classLoader = new LauncherClassLoader(urls.toArray(new URL[0]));\n Thread.currentThread().setContextClassLoader(classLoader);\n String launchClass = System.getProperty(WEBSERVER_LAUNCH_CLASS_PROPERTY, WEBSERVER_LAUNCH_CLASS_DEFAULT);\n Class c = classLoader.loadClass(launchClass);\n c.newInstance();\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\" + SystemPropertyUtil.getProperty(\"String_Node_Str\"));\n System.out.println(\"String_Node_Str\" + SystemPropertyUtil.getProperty(Constants.WEBSERVER_URL_PROP));\n System.out.println(\"String_Node_Str\");\n } catch (Exception ex) {\n LOGGER.log(Level.SEVERE, \"String_Node_Str\", ex);\n System.out.println(\"String_Node_Str\" + ex + \"String_Node_Str\");\n ex.printStackTrace();\n System.exit(-1);\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.